@agendize/vue-tools 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { useBlocState } from "./bloc/useBlocState";
2
2
  import { dateToString } from "./utils/date";
3
+ import { onPictureUpdated, readBlobFromUrl } from "./utils/file";
4
+ import { pad, parseToInt } from "./utils/format";
3
5
  import QRCode from "./presentation/component/qr-code/View.vue";
4
6
  export * from './bloc/Bloc';
5
- export { useBlocState, dateToString, QRCode };
7
+ export { useBlocState, dateToString, QRCode, onPictureUpdated, readBlobFromUrl, pad, parseToInt };
@@ -31,6 +31,58 @@ function dateToString(date, short = false) {
31
31
  return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day) + "T" + (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds);
32
32
  }
33
33
  }
34
+ function onPictureUpdated(item, objectDefinition) {
35
+ objectDefinition.urlPicture.value = void 0;
36
+ objectDefinition.pictureAsData.value = "";
37
+ objectDefinition.filePicture.value = void 0;
38
+ if (!item)
39
+ return;
40
+ toBase64(item).then((data) => {
41
+ if (!data)
42
+ return;
43
+ if (typeof data === "string")
44
+ objectDefinition.pictureAsData.value = data;
45
+ });
46
+ }
47
+ const toBase64 = (file) => new Promise((resolve, reject) => {
48
+ const reader = new FileReader();
49
+ reader.readAsDataURL(file);
50
+ reader.onload = () => resolve(reader.result);
51
+ reader.onerror = (error) => reject(error);
52
+ });
53
+ function readBlobFromUrl(url, callback) {
54
+ let xhr = new XMLHttpRequest();
55
+ xhr.open("get", url);
56
+ xhr.responseType = "blob";
57
+ xhr.onload = function() {
58
+ let fr = new FileReader();
59
+ fr.onload = function() {
60
+ if (!callback && fr.result)
61
+ return;
62
+ let value;
63
+ if (typeof fr.result === "string")
64
+ value = fr.result;
65
+ else
66
+ value = Buffer.from(String.fromCharCode(...new Uint8Array(fr.result)), "base64").toString();
67
+ callback(value);
68
+ };
69
+ fr.readAsDataURL(xhr.response);
70
+ };
71
+ xhr.send();
72
+ }
73
+ function parseToInt(value) {
74
+ try {
75
+ return parseInt(value);
76
+ } catch (e) {
77
+ return 0;
78
+ }
79
+ }
80
+ function pad(value, size = 2) {
81
+ let s = value + "";
82
+ while (s.length < size)
83
+ s = "0" + s;
84
+ return s;
85
+ }
34
86
  function getDefaultExportFromCjs(x) {
35
87
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
36
88
  }
@@ -2037,4 +2089,4 @@ class Bloc {
2037
2089
  }
2038
2090
  }
2039
2091
  }
2040
- export { Bloc, View as QRCode, dateToString, useBlocState };
2092
+ export { Bloc, View as QRCode, dateToString, onPictureUpdated, pad, parseToInt, readBlobFromUrl, useBlocState };
@@ -1,5 +1,5 @@
1
- (function(at,T){typeof exports=="object"&&typeof module!="undefined"?T(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],T):(at=typeof globalThis!="undefined"?globalThis:at||self,T((at.agendize=at.agendize||{},at.agendize.tools={}),at.Vue))})(this,function(at,T){"use strict";var ae=Object.defineProperty;var se=(at,T,Rt)=>T in at?ae(at,T,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):at[T]=Rt;var Yt=(at,T,Rt)=>(se(at,typeof T!="symbol"?T+"":T,Rt),Rt);function Rt(Q){const G=T.ref(Q.state),K=nt=>{G.value=nt};return T.onMounted(()=>{Q.subscribe(K)}),T.onUnmounted(()=>{Q.unsubscribe(K)}),T.readonly(G)}function Wt(Q,G=!1){var K=Q.getFullYear(),nt=Q.getMonth()+1,tt=Q.getDate(),Y=Q.getHours(),$=Q.getMinutes(),ot=Q.getSeconds();return G?(tt<10?"0"+tt:tt)+"/"+(nt<10?"0"+nt:nt)+"/"+K:K+"-"+(nt<10?"0"+nt:nt)+"-"+(tt<10?"0"+tt:tt)+"T"+(Y<10?"0"+Y:Y)+":"+($<10?"0"+$:$)+":"+(ot<10?"0"+ot:ot)}function Zt(Q){return Q&&Q.__esModule&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q}var $t={exports:{}};(function(Q,G){(function(K,nt){Q.exports=nt()})(self,function(){return(()=>{var K={192:(Y,$)=>{var ot,kt,Bt=function(){var ft=function(m,y){var v=m,f=Dt[y],l=null,p=0,P=null,C=[],z={},W=function(u,w){l=function(d){for(var _=new Array(d),b=0;b<d;b+=1){_[b]=new Array(d);for(var k=0;k<d;k+=1)_[b][k]=null}return _}(p=4*v+17),J(0,0),J(p-7,0),J(0,p-7),et(),U(),ut(u,w),v>=7&&ht(u),P==null&&(P=Ct(v,f,C)),zt(P,w)},J=function(u,w){for(var d=-1;d<=7;d+=1)if(!(u+d<=-1||p<=u+d))for(var _=-1;_<=7;_+=1)w+_<=-1||p<=w+_||(l[u+d][w+_]=0<=d&&d<=6&&(_==0||_==6)||0<=_&&_<=6&&(d==0||d==6)||2<=d&&d<=4&&2<=_&&_<=4)},U=function(){for(var u=8;u<p-8;u+=1)l[u][6]==null&&(l[u][6]=u%2==0);for(var w=8;w<p-8;w+=1)l[6][w]==null&&(l[6][w]=w%2==0)},et=function(){for(var u=mt.getPatternPosition(v),w=0;w<u.length;w+=1)for(var d=0;d<u.length;d+=1){var _=u[w],b=u[d];if(l[_][b]==null)for(var k=-2;k<=2;k+=1)for(var L=-2;L<=2;L+=1)l[_+k][b+L]=k==-2||k==2||L==-2||L==2||k==0&&L==0}},ht=function(u){for(var w=mt.getBCHTypeNumber(v),d=0;d<18;d+=1){var _=!u&&(w>>d&1)==1;l[Math.floor(d/3)][d%3+p-8-3]=_}for(d=0;d<18;d+=1)_=!u&&(w>>d&1)==1,l[d%3+p-8-3][Math.floor(d/3)]=_},ut=function(u,w){for(var d=f<<3|w,_=mt.getBCHTypeInfo(d),b=0;b<15;b+=1){var k=!u&&(_>>b&1)==1;b<6?l[b][8]=k:b<8?l[b+1][8]=k:l[p-15+b][8]=k}for(b=0;b<15;b+=1)k=!u&&(_>>b&1)==1,b<8?l[8][p-b-1]=k:b<9?l[8][15-b-1+1]=k:l[8][15-b-1]=k;l[p-8][8]=!u},zt=function(u,w){for(var d=-1,_=p-1,b=7,k=0,L=mt.getMaskFunction(w),N=p-1;N>0;N-=2)for(N==6&&(N-=1);;){for(var a=0;a<2;a+=1)if(l[_][N-a]==null){var t=!1;k<u.length&&(t=(u[k]>>>b&1)==1),L(_,N-a)&&(t=!t),l[_][N-a]=t,(b-=1)==-1&&(k+=1,b=7)}if((_+=d)<0||p<=_){_-=d,d=-d;break}}},Ct=function(u,w,d){for(var _=Tt.getRSBlocks(u,w),b=st(),k=0;k<d.length;k+=1){var L=d[k];b.put(L.getMode(),4),b.put(L.getLength(),mt.getLengthInBits(L.getMode(),u)),L.write(b)}var N=0;for(k=0;k<_.length;k+=1)N+=_[k].dataCount;if(b.getLengthInBits()>8*N)throw"code length overflow. ("+b.getLengthInBits()+">"+8*N+")";for(b.getLengthInBits()+4<=8*N&&b.put(0,4);b.getLengthInBits()%8!=0;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*N||(b.put(236,8),b.getLengthInBits()>=8*N));)b.put(17,8);return function(a,t){for(var e=0,r=0,n=0,i=new Array(t.length),o=new Array(t.length),s=0;s<t.length;s+=1){var c=t[s].dataCount,g=t[s].totalCount-c;r=Math.max(r,c),n=Math.max(n,g),i[s]=new Array(c);for(var h=0;h<i[s].length;h+=1)i[s][h]=255&a.getBuffer()[h+e];e+=c;var x=mt.getErrorCorrectPolynomial(g),M=It(i[s],x.getLength()-1).mod(x);for(o[s]=new Array(x.getLength()-1),h=0;h<o[s].length;h+=1){var A=h+M.getLength()-o[s].length;o[s][h]=A>=0?M.getAt(A):0}}var E=0;for(h=0;h<t.length;h+=1)E+=t[h].totalCount;var F=new Array(E),R=0;for(h=0;h<r;h+=1)for(s=0;s<t.length;s+=1)h<i[s].length&&(F[R]=i[s][h],R+=1);for(h=0;h<n;h+=1)for(s=0;s<t.length;s+=1)h<o[s].length&&(F[R]=o[s][h],R+=1);return F}(b,_)};z.addData=function(u,w){var d=null;switch(w=w||"Byte"){case"Numeric":d=Ft(u);break;case"Alphanumeric":d=Qt(u);break;case"Byte":d=Ht(u);break;case"Kanji":d=Ot(u);break;default:throw"mode:"+w}C.push(d),P=null},z.isDark=function(u,w){if(u<0||p<=u||w<0||p<=w)throw u+","+w;return l[u][w]},z.getModuleCount=function(){return p},z.make=function(){if(v<1){for(var u=1;u<40;u++){for(var w=Tt.getRSBlocks(u,f),d=st(),_=0;_<C.length;_++){var b=C[_];d.put(b.getMode(),4),d.put(b.getLength(),mt.getLengthInBits(b.getMode(),u)),b.write(d)}var k=0;for(_=0;_<w.length;_++)k+=w[_].dataCount;if(d.getLengthInBits()<=8*k)break}v=u}W(!1,function(){for(var L=0,N=0,a=0;a<8;a+=1){W(!0,a);var t=mt.getLostPoint(z);(a==0||L>t)&&(L=t,N=a)}return N}())},z.createTableTag=function(u,w){u=u||2;var d="";d+='<table style="',d+=" border-width: 0px; border-style: none;",d+=" border-collapse: collapse;",d+=" padding: 0px; margin: "+(w=w===void 0?4*u:w)+"px;",d+='">',d+="<tbody>";for(var _=0;_<z.getModuleCount();_+=1){d+="<tr>";for(var b=0;b<z.getModuleCount();b+=1)d+='<td style="',d+=" border-width: 0px; border-style: none;",d+=" border-collapse: collapse;",d+=" padding: 0px; margin: 0px;",d+=" width: "+u+"px;",d+=" height: "+u+"px;",d+=" background-color: ",d+=z.isDark(_,b)?"#000000":"#ffffff",d+=";",d+='"/>';d+="</tr>"}return(d+="</tbody>")+"</table>"},z.createSvgTag=function(u,w,d,_){var b={};typeof arguments[0]=="object"&&(u=(b=arguments[0]).cellSize,w=b.margin,d=b.alt,_=b.title),u=u||2,w=w===void 0?4*u:w,(d=typeof d=="string"?{text:d}:d||{}).text=d.text||null,d.id=d.text?d.id||"qrcode-description":null,(_=typeof _=="string"?{text:_}:_||{}).text=_.text||null,_.id=_.text?_.id||"qrcode-title":null;var k,L,N,a,t=z.getModuleCount()*u+2*w,e="";for(a="l"+u+",0 0,"+u+" -"+u+",0 0,-"+u+"z ",e+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',e+=b.scalable?"":' width="'+t+'px" height="'+t+'px"',e+=' viewBox="0 0 '+t+" "+t+'" ',e+=' preserveAspectRatio="xMinYMin meet"',e+=_.text||d.text?' role="img" aria-labelledby="'+V([_.id,d.id].join(" ").trim())+'"':"",e+=">",e+=_.text?'<title id="'+V(_.id)+'">'+V(_.text)+"</title>":"",e+=d.text?'<description id="'+V(d.id)+'">'+V(d.text)+"</description>":"",e+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',e+='<path d="',L=0;L<z.getModuleCount();L+=1)for(N=L*u+w,k=0;k<z.getModuleCount();k+=1)z.isDark(L,k)&&(e+="M"+(k*u+w)+","+N+a);return(e+='" stroke="transparent" fill="black"/>')+"</svg>"},z.createDataURL=function(u,w){u=u||2,w=w===void 0?4*u:w;var d=z.getModuleCount()*u+2*w,_=w,b=d-w;return Et(d,d,function(k,L){if(_<=k&&k<b&&_<=L&&L<b){var N=Math.floor((k-_)/u),a=Math.floor((L-_)/u);return z.isDark(a,N)?0:1}return 1})},z.createImgTag=function(u,w,d){u=u||2,w=w===void 0?4*u:w;var _=z.getModuleCount()*u+2*w,b="";return b+="<img",b+=' src="',b+=z.createDataURL(u,w),b+='"',b+=' width="',b+=_,b+='"',b+=' height="',b+=_,b+='"',d&&(b+=' alt="',b+=V(d),b+='"'),b+"/>"};var V=function(u){for(var w="",d=0;d<u.length;d+=1){var _=u.charAt(d);switch(_){case"<":w+="&lt;";break;case">":w+="&gt;";break;case"&":w+="&amp;";break;case'"':w+="&quot;";break;default:w+=_}}return w};return z.createASCII=function(u,w){if((u=u||1)<2)return function(i){i=i===void 0?2:i;var o,s,c,g,h,x=1*z.getModuleCount()+2*i,M=i,A=x-i,E={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},F={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},R="";for(o=0;o<x;o+=2){for(c=Math.floor((o-M)/1),g=Math.floor((o+1-M)/1),s=0;s<x;s+=1)h="\u2588",M<=s&&s<A&&M<=o&&o<A&&z.isDark(c,Math.floor((s-M)/1))&&(h=" "),M<=s&&s<A&&M<=o+1&&o+1<A&&z.isDark(g,Math.floor((s-M)/1))?h+=" ":h+="\u2588",R+=i<1&&o+1>=A?F[h]:E[h];R+=`
2
- `}return x%2&&i>0?R.substring(0,R.length-x-1)+Array(x+1).join("\u2580"):R.substring(0,R.length-1)}(w);u-=1,w=w===void 0?2*u:w;var d,_,b,k,L=z.getModuleCount()*u+2*w,N=w,a=L-w,t=Array(u+1).join("\u2588\u2588"),e=Array(u+1).join(" "),r="",n="";for(d=0;d<L;d+=1){for(b=Math.floor((d-N)/u),n="",_=0;_<L;_+=1)k=1,N<=_&&_<a&&N<=d&&d<a&&z.isDark(b,Math.floor((_-N)/u))&&(k=0),n+=k?t:e;for(b=0;b<u;b+=1)r+=n+`
3
- `}return r.substring(0,r.length-1)},z.renderTo2dContext=function(u,w){w=w||2;for(var d=z.getModuleCount(),_=0;_<d;_++)for(var b=0;b<d;b++)u.fillStyle=z.isDark(_,b)?"black":"white",u.fillRect(_*w,b*w,w,w)},z};ft.stringToBytes=(ft.stringToBytesFuncs={default:function(m){for(var y=[],v=0;v<m.length;v+=1){var f=m.charCodeAt(v);y.push(255&f)}return y}}).default,ft.createStringToBytes=function(m,y){var v=function(){for(var l=Gt(m),p=function(){var U=l.read();if(U==-1)throw"eof";return U},P=0,C={};;){var z=l.read();if(z==-1)break;var W=p(),J=p()<<8|p();C[String.fromCharCode(z<<8|W)]=J,P+=1}if(P!=y)throw P+" != "+y;return C}(),f="?".charCodeAt(0);return function(l){for(var p=[],P=0;P<l.length;P+=1){var C=l.charCodeAt(P);if(C<128)p.push(C);else{var z=v[l.charAt(P)];typeof z=="number"?(255&z)==z?p.push(z):(p.push(z>>>8),p.push(255&z)):p.push(f)}}return p}};var _t,pt,vt,H,wt,Dt={L:1,M:0,Q:3,H:2},mt=(_t=[[],[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]],pt=1335,vt=7973,wt=function(m){for(var y=0;m!=0;)y+=1,m>>>=1;return y},(H={}).getBCHTypeInfo=function(m){for(var y=m<<10;wt(y)-wt(pt)>=0;)y^=pt<<wt(y)-wt(pt);return 21522^(m<<10|y)},H.getBCHTypeNumber=function(m){for(var y=m<<12;wt(y)-wt(vt)>=0;)y^=vt<<wt(y)-wt(vt);return m<<12|y},H.getPatternPosition=function(m){return _t[m-1]},H.getMaskFunction=function(m){switch(m){case 0:return function(y,v){return(y+v)%2==0};case 1:return function(y,v){return y%2==0};case 2:return function(y,v){return v%3==0};case 3:return function(y,v){return(y+v)%3==0};case 4:return function(y,v){return(Math.floor(y/2)+Math.floor(v/3))%2==0};case 5:return function(y,v){return y*v%2+y*v%3==0};case 6:return function(y,v){return(y*v%2+y*v%3)%2==0};case 7:return function(y,v){return(y*v%3+(y+v)%2)%2==0};default:throw"bad maskPattern:"+m}},H.getErrorCorrectPolynomial=function(m){for(var y=It([1],0),v=0;v<m;v+=1)y=y.multiply(It([1,bt.gexp(v)],0));return y},H.getLengthInBits=function(m,y){if(1<=y&&y<10)switch(m){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+m}else if(y<27)switch(m){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+m}else{if(!(y<41))throw"type:"+y;switch(m){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+m}}},H.getLostPoint=function(m){for(var y=m.getModuleCount(),v=0,f=0;f<y;f+=1)for(var l=0;l<y;l+=1){for(var p=0,P=m.isDark(f,l),C=-1;C<=1;C+=1)if(!(f+C<0||y<=f+C))for(var z=-1;z<=1;z+=1)l+z<0||y<=l+z||C==0&&z==0||P==m.isDark(f+C,l+z)&&(p+=1);p>5&&(v+=3+p-5)}for(f=0;f<y-1;f+=1)for(l=0;l<y-1;l+=1){var W=0;m.isDark(f,l)&&(W+=1),m.isDark(f+1,l)&&(W+=1),m.isDark(f,l+1)&&(W+=1),m.isDark(f+1,l+1)&&(W+=1),W!=0&&W!=4||(v+=3)}for(f=0;f<y;f+=1)for(l=0;l<y-6;l+=1)m.isDark(f,l)&&!m.isDark(f,l+1)&&m.isDark(f,l+2)&&m.isDark(f,l+3)&&m.isDark(f,l+4)&&!m.isDark(f,l+5)&&m.isDark(f,l+6)&&(v+=40);for(l=0;l<y;l+=1)for(f=0;f<y-6;f+=1)m.isDark(f,l)&&!m.isDark(f+1,l)&&m.isDark(f+2,l)&&m.isDark(f+3,l)&&m.isDark(f+4,l)&&!m.isDark(f+5,l)&&m.isDark(f+6,l)&&(v+=40);var J=0;for(l=0;l<y;l+=1)for(f=0;f<y;f+=1)m.isDark(f,l)&&(J+=1);return v+Math.abs(100*J/y/y-50)/5*10},H),bt=function(){for(var m=new Array(256),y=new Array(256),v=0;v<8;v+=1)m[v]=1<<v;for(v=8;v<256;v+=1)m[v]=m[v-4]^m[v-5]^m[v-6]^m[v-8];for(v=0;v<255;v+=1)y[m[v]]=v;return{glog:function(f){if(f<1)throw"glog("+f+")";return y[f]},gexp:function(f){for(;f<0;)f+=255;for(;f>=256;)f-=255;return m[f]}}}();function It(m,y){if(m.length===void 0)throw m.length+"/"+y;var v=function(){for(var l=0;l<m.length&&m[l]==0;)l+=1;for(var p=new Array(m.length-l+y),P=0;P<m.length-l;P+=1)p[P]=m[P+l];return p}(),f={getAt:function(l){return v[l]},getLength:function(){return v.length},multiply:function(l){for(var p=new Array(f.getLength()+l.getLength()-1),P=0;P<f.getLength();P+=1)for(var C=0;C<l.getLength();C+=1)p[P+C]^=bt.gexp(bt.glog(f.getAt(P))+bt.glog(l.getAt(C)));return It(p,0)},mod:function(l){if(f.getLength()-l.getLength()<0)return f;for(var p=bt.glog(f.getAt(0))-bt.glog(l.getAt(0)),P=new Array(f.getLength()),C=0;C<f.getLength();C+=1)P[C]=f.getAt(C);for(C=0;C<l.getLength();C+=1)P[C]^=bt.gexp(bt.glog(l.getAt(C))+p);return It(P,0).mod(l)}};return f}var Tt=function(){var m=[[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]],y=function(f,l){var p={};return p.totalCount=f,p.dataCount=l,p},v={getRSBlocks:function(f,l){var p=function(ht,ut){switch(ut){case Dt.L:return m[4*(ht-1)+0];case Dt.M:return m[4*(ht-1)+1];case Dt.Q:return m[4*(ht-1)+2];case Dt.H:return m[4*(ht-1)+3];default:return}}(f,l);if(p===void 0)throw"bad rs block @ typeNumber:"+f+"/errorCorrectionLevel:"+l;for(var P=p.length/3,C=[],z=0;z<P;z+=1)for(var W=p[3*z+0],J=p[3*z+1],U=p[3*z+2],et=0;et<W;et+=1)C.push(y(J,U));return C}};return v}(),st=function(){var m=[],y=0,v={getBuffer:function(){return m},getAt:function(f){var l=Math.floor(f/8);return(m[l]>>>7-f%8&1)==1},put:function(f,l){for(var p=0;p<l;p+=1)v.putBit((f>>>l-p-1&1)==1)},getLengthInBits:function(){return y},putBit:function(f){var l=Math.floor(y/8);m.length<=l&&m.push(0),f&&(m[l]|=128>>>y%8),y+=1}};return v},Ft=function(m){var y=m,v={getMode:function(){return 1},getLength:function(p){return y.length},write:function(p){for(var P=y,C=0;C+2<P.length;)p.put(f(P.substring(C,C+3)),10),C+=3;C<P.length&&(P.length-C==1?p.put(f(P.substring(C,C+1)),4):P.length-C==2&&p.put(f(P.substring(C,C+2)),7))}},f=function(p){for(var P=0,C=0;C<p.length;C+=1)P=10*P+l(p.charAt(C));return P},l=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+p};return v},Qt=function(m){var y=m,v={getMode:function(){return 2},getLength:function(l){return y.length},write:function(l){for(var p=y,P=0;P+1<p.length;)l.put(45*f(p.charAt(P))+f(p.charAt(P+1)),11),P+=2;P<p.length&&l.put(f(p.charAt(P)),6)}},f=function(l){if("0"<=l&&l<="9")return l.charCodeAt(0)-"0".charCodeAt(0);if("A"<=l&&l<="Z")return l.charCodeAt(0)-"A".charCodeAt(0)+10;switch(l){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 :"+l}};return v},Ht=function(m){var y=ft.stringToBytes(m);return{getMode:function(){return 4},getLength:function(v){return y.length},write:function(v){for(var f=0;f<y.length;f+=1)v.put(y[f],8)}}},Ot=function(m){var y=ft.stringToBytesFuncs.SJIS;if(!y)throw"sjis not supported.";(function(f,l){var p=y("\u53CB");if(p.length!=2||(p[0]<<8|p[1])!=38726)throw"sjis not supported."})();var v=y(m);return{getMode:function(){return 8},getLength:function(f){return~~(v.length/2)},write:function(f){for(var l=v,p=0;p+1<l.length;){var P=(255&l[p])<<8|255&l[p+1];if(33088<=P&&P<=40956)P-=33088;else{if(!(57408<=P&&P<=60351))throw"illegal char at "+(p+1)+"/"+P;P-=49472}P=192*(P>>>8&255)+(255&P),f.put(P,13),p+=2}if(p<l.length)throw"illegal char at "+(p+1)}}},Vt=function(){var m=[],y={writeByte:function(v){m.push(255&v)},writeShort:function(v){y.writeByte(v),y.writeByte(v>>>8)},writeBytes:function(v,f,l){f=f||0,l=l||v.length;for(var p=0;p<l;p+=1)y.writeByte(v[p+f])},writeString:function(v){for(var f=0;f<v.length;f+=1)y.writeByte(v.charCodeAt(f))},toByteArray:function(){return m},toString:function(){var v="";v+="[";for(var f=0;f<m.length;f+=1)f>0&&(v+=","),v+=m[f];return v+"]"}};return y},Gt=function(m){var y=m,v=0,f=0,l=0,p={read:function(){for(;l<8;){if(v>=y.length){if(l==0)return-1;throw"unexpected end of file./"+l}var C=y.charAt(v);if(v+=1,C=="=")return l=0,-1;C.match(/^\s$/)||(f=f<<6|P(C.charCodeAt(0)),l+=6)}var z=f>>>l-8&255;return l-=8,z}},P=function(C){if(65<=C&&C<=90)return C-65;if(97<=C&&C<=122)return C-97+26;if(48<=C&&C<=57)return C-48+52;if(C==43)return 62;if(C==47)return 63;throw"c:"+C};return p},Et=function(m,y,v){for(var f=function(J,U){var et=J,ht=U,ut=new Array(J*U),zt={setPixel:function(u,w,d){ut[w*et+u]=d},write:function(u){u.writeString("GIF87a"),u.writeShort(et),u.writeShort(ht),u.writeByte(128),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(255),u.writeByte(255),u.writeByte(255),u.writeString(","),u.writeShort(0),u.writeShort(0),u.writeShort(et),u.writeShort(ht),u.writeByte(0);var w=Ct(2);u.writeByte(2);for(var d=0;w.length-d>255;)u.writeByte(255),u.writeBytes(w,d,255),d+=255;u.writeByte(w.length-d),u.writeBytes(w,d,w.length-d),u.writeByte(0),u.writeString(";")}},Ct=function(u){for(var w=1<<u,d=1+(1<<u),_=u+1,b=V(),k=0;k<w;k+=1)b.add(String.fromCharCode(k));b.add(String.fromCharCode(w)),b.add(String.fromCharCode(d));var L,N,a,t=Vt(),e=(L=t,N=0,a=0,{write:function(o,s){if(o>>>s!=0)throw"length over";for(;N+s>=8;)L.writeByte(255&(o<<N|a)),s-=8-N,o>>>=8-N,a=0,N=0;a|=o<<N,N+=s},flush:function(){N>0&&L.writeByte(a)}});e.write(w,_);var r=0,n=String.fromCharCode(ut[r]);for(r+=1;r<ut.length;){var i=String.fromCharCode(ut[r]);r+=1,b.contains(n+i)?n+=i:(e.write(b.indexOf(n),_),b.size()<4095&&(b.size()==1<<_&&(_+=1),b.add(n+i)),n=i)}return e.write(b.indexOf(n),_),e.write(d,_),e.flush(),t.toByteArray()},V=function(){var u={},w=0,d={add:function(_){if(d.contains(_))throw"dup key:"+_;u[_]=w,w+=1},size:function(){return w},indexOf:function(_){return u[_]},contains:function(_){return u[_]!==void 0}};return d};return zt}(m,y),l=0;l<y;l+=1)for(var p=0;p<m;p+=1)f.setPixel(p,l,v(p,l));var P=Vt();f.write(P);for(var C=function(){var J=0,U=0,et=0,ht="",ut={},zt=function(V){ht+=String.fromCharCode(Ct(63&V))},Ct=function(V){if(!(V<0)){if(V<26)return 65+V;if(V<52)return V-26+97;if(V<62)return V-52+48;if(V==62)return 43;if(V==63)return 47}throw"n:"+V};return ut.writeByte=function(V){for(J=J<<8|255&V,U+=8,et+=1;U>=6;)zt(J>>>U-6),U-=6},ut.flush=function(){if(U>0&&(zt(J<<6-U),J=0,U=0),et%3!=0)for(var V=3-et%3,u=0;u<V;u+=1)ht+="="},ut.toString=function(){return ht},ut}(),z=P.toByteArray(),W=0;W<z.length;W+=1)C.writeByte(z[W]);return C.flush(),"data:image/gif;base64,"+C};return ft}();Bt.stringToBytesFuncs["UTF-8"]=function(ft){return function(_t){for(var pt=[],vt=0;vt<_t.length;vt++){var H=_t.charCodeAt(vt);H<128?pt.push(H):H<2048?pt.push(192|H>>6,128|63&H):H<55296||H>=57344?pt.push(224|H>>12,128|H>>6&63,128|63&H):(vt++,H=65536+((1023&H)<<10|1023&_t.charCodeAt(vt)),pt.push(240|H>>18,128|H>>12&63,128|H>>6&63,128|63&H))}return pt}(ft)},(kt=typeof(ot=function(){return Bt})=="function"?ot.apply($,[]):ot)===void 0||(Y.exports=kt)},796:(Y,$,ot)=>{ot.d($,{default:()=>N});var kt=function(){return(kt=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)},Bt=function(){for(var a=0,t=0,e=arguments.length;t<e;t++)a+=arguments[t].length;var r=Array(a),n=0;for(t=0;t<e;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,n++)r[n]=i[o];return r},ft=function(a){return!!a&&typeof a=="object"&&!Array.isArray(a)};function _t(a){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!t.length)return a;var r=t.shift();return r!==void 0&&ft(a)&&ft(r)?(a=kt({},a),Object.keys(r).forEach(function(n){var i=a[n],o=r[n];Array.isArray(i)&&Array.isArray(o)?a[n]=o:ft(i)&&ft(o)?a[n]=_t(Object.assign({},i),o):a[n]=o}),_t.apply(void 0,Bt([a],t))):a}function pt(a,t){var e=document.createElement("a");e.download=t,e.href=a,document.body.appendChild(e),e.click(),document.body.removeChild(e)}function vt(a){var t=a.originalHeight,e=a.originalWidth,r=a.maxHiddenDots,n=a.maxHiddenAxisDots,i=a.dotSize,o={x:0,y:0},s={x:0,y:0};if(t<=0||e<=0||r<=0||i<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var c=t/e;return o.x=Math.floor(Math.sqrt(r/c)),o.x<=0&&(o.x=1),n&&n<o.x&&(o.x=n),o.x%2==0&&o.x--,s.x=o.x*i,o.y=1+2*Math.ceil((o.x*c-1)/2),s.y=Math.round(s.x*c),(o.y*o.x>r||n&&n<o.y)&&(n&&n<o.y?(o.y=n,o.y%2==0&&o.x--):o.y-=2,s.y=o.y*i,o.x=1+2*Math.ceil((o.y/c-1)/2),s.x=Math.round(s.y/c)),{height:s.y,width:s.x,hideYDots:o.y,hideXDots:o.x}}const H={L:.07,M:.15,Q:.25,H:.3},wt="dots",Dt="rounded",mt="classy",bt="classy-rounded",It="square",Tt="extra-rounded";var st=function(){return(st=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const Ft=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case wt:i=this._drawDot;break;case mt:i=this._drawClassy;break;case bt:i=this._drawClassyRounded;break;case Dt:i=this._drawRounded;break;case Tt:i=this._drawExtraRounded;break;case It:default:i=this._drawSquare}i.call(this,{x:t,y:e,size:r,context:o,getNeighbor:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.rect(-e/2,-e/2,e,e)}}))},a.prototype._basicSideRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,Math.PI/2),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornerRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,0),r.lineTo(e/2,e/2),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornerExtraRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(-e/2,e/2,e,-Math.PI/2,0),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2)}}))},a.prototype._basicCornersRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,0),r.lineTo(e/2,e/2),r.lineTo(0,e/2),r.arc(0,0,e/2,Math.PI/2,Math.PI),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornersExtraRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(-e/2,e/2,e,-Math.PI/2,0),r.arc(e/2,-e/2,e,Math.PI/2,Math.PI)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context;this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context;this._basicSquare({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0,x=s+c+g+h;if(x!==0)if(x>2||s&&c||g&&h)this._basicSquare({x:e,y:r,size:n,context:i,rotation:0});else{if(x===2){var M=0;return s&&g?M=Math.PI/2:g&&c?M=Math.PI:c&&h&&(M=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:M})}if(x===1)return M=0,g?M=Math.PI/2:c?M=Math.PI:h&&(M=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,context:i,rotation:M})}else this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0,x=s+c+g+h;if(x!==0)if(x>2||s&&c||g&&h)this._basicSquare({x:e,y:r,size:n,context:i,rotation:0});else{if(x===2){var M=0;return s&&g?M=Math.PI/2:g&&c?M=Math.PI:c&&h&&(M=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:M})}if(x===1)return M=0,g?M=Math.PI/2:c?M=Math.PI:h&&(M=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,context:i,rotation:M})}else this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawClassy=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0;s+c+g+h!==0?s||g?c||h?this._basicSquare({x:e,y:r,size:n,context:i,rotation:0}):this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2})},a.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0;s+c+g+h!==0?s||g?c||h?this._basicSquare({x:e,y:r,size:n,context:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2})},a}(),Qt="square",Ht="extra-rounded";var Ot=function(){return(Ot=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const Vt=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case Qt:i=this._drawSquare;break;case Ht:i=this._drawExtraRounded;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,context:o,rotation:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI),r.arc(0,0,e/2-n,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.rect(-e/2,-e/2,e,e),r.rect(-e/2+n,-e/2+n,e-2*n,e-2*n)}}))},a.prototype._basicExtraRounded=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.arc(-n,-n,2.5*n,Math.PI,-Math.PI/2),r.lineTo(n,-3.5*n),r.arc(n,-n,2.5*n,-Math.PI/2,0),r.lineTo(3.5*n,-n),r.arc(n,n,2.5*n,0,Math.PI/2),r.lineTo(-n,3.5*n),r.arc(-n,n,2.5*n,Math.PI/2,Math.PI),r.lineTo(-3.5*n,-n),r.arc(-n,-n,1.5*n,Math.PI,-Math.PI/2),r.lineTo(n,-2.5*n),r.arc(n,-n,1.5*n,-Math.PI/2,0),r.lineTo(2.5*n,-n),r.arc(n,n,1.5*n,0,Math.PI/2),r.lineTo(-n,2.5*n),r.arc(-n,n,1.5*n,Math.PI/2,Math.PI),r.lineTo(-2.5*n,-n)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicDot({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicSquare({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicExtraRounded({x:e,y:r,size:n,context:i,rotation:o})},a}(),Gt="square";var Et=function(){return(Et=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const m=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case Gt:i=this._drawSquare;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,context:o,rotation:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context;this._rotateFigure(Et(Et({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context;this._rotateFigure(Et(Et({},t),{draw:function(){r.rect(-e/2,-e/2,e,e)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicDot({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicSquare({x:e,y:r,size:n,context:i,rotation:o})},a}(),y="radial";var v=[[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]],f=[[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 l=function(){function a(t){this._canvas=document.createElement("canvas"),this._canvas.width=t.width,this._canvas.height=t.height,this._options=t}return Object.defineProperty(a.prototype,"context",{get:function(){return this._canvas.getContext("2d")},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"width",{get:function(){return this._canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._canvas.height},enumerable:!1,configurable:!0}),a.prototype.getCanvas=function(){return this._canvas},a.prototype.clear=function(){var t=this.context;t&&t.clearRect(0,0,this._canvas.width,this._canvas.height)},a.prototype.drawQR=function(t){return e=this,r=void 0,i=function(){var o,s,c,g,h,x,M,A,E,F=this;return function(R,B){var D,I,S,j,q={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return j={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function Z(rt){return function(gt){return function(O){if(D)throw new TypeError("Generator is already executing.");for(;q;)try{if(D=1,I&&(S=2&O[0]?I.return:O[0]?I.throw||((S=I.return)&&S.call(I),0):I.next)&&!(S=S.call(I,O[1])).done)return S;switch(I=0,S&&(O=[2&O[0],S.value]),O[0]){case 0:case 1:S=O;break;case 4:return q.label++,{value:O[1],done:!1};case 5:q.label++,I=O[1],O=[0];continue;case 7:O=q.ops.pop(),q.trys.pop();continue;default:if(!((S=(S=q.trys).length>0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]<S[3])){q.label=O[1];break}if(O[0]===6&&q.label<S[1]){q.label=S[1],S=O;break}if(S&&q.label<S[2]){q.label=S[2],q.ops.push(O);break}S[2]&&q.ops.pop(),q.trys.pop();continue}O=B.call(R,q)}catch(ct){O=[6,ct],I=0}finally{D=S=0}if(5&O[0])throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}([rt,gt])}}}(this,function(R){switch(R.label){case 0:return o=t.getModuleCount(),s=Math.min(this._options.width,this._options.height)-2*this._options.margin,c=Math.floor(s/o),g={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(R.sent(),!this._image)return[2];h=this._options,x=h.imageOptions,M=h.qrOptions,A=x.imageSize*H[M.errorCorrectionLevel],E=Math.floor(A*o*o),g=vt({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:E,maxHiddenAxisDots:o-14,dotSize:c}),R.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots(function(B,D){var I,S,j,q,Z,rt;return!(F._options.imageOptions.hideBackgroundDots&&B>=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&D>=(o-g.hideYDots)/2&&D<(o+g.hideYDots)/2||((I=v[B])===null||I===void 0?void 0:I[D])||((S=v[B-o+7])===null||S===void 0?void 0:S[D])||((j=v[B])===null||j===void 0?void 0:j[D-o+7])||((q=f[B])===null||q===void 0?void 0:q[D])||((Z=f[B-o+7])===null||Z===void 0?void 0:Z[D])||((rt=f[B])===null||rt===void 0?void 0:rt[D-o+7]))}),this.drawCorners(),this._options.image&&this.drawImage({width:g.width,height:g.height,count:o,dotSize:c}),[2]}})},new((n=void 0)||(n=Promise))(function(o,s){function c(x){try{h(i.next(x))}catch(M){s(M)}}function g(x){try{h(i.throw(x))}catch(M){s(M)}}function h(x){var M;x.done?o(x.value):(M=x.value,M instanceof n?M:new n(function(A){A(M)})).then(c,g)}h((i=i.apply(e,r||[])).next())});var e,r,n,i},a.prototype.drawBackground=function(){var t=this.context,e=this._options;if(t){if(e.backgroundOptions.gradient){var r=e.backgroundOptions.gradient,n=this._createGradient({context:t,options:r,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});r.colorStops.forEach(function(i){var o=i.offset,s=i.color;n.addColorStop(o,s)}),t.fillStyle=n}else e.backgroundOptions.color&&(t.fillStyle=e.backgroundOptions.color);t.fillRect(0,0,this._canvas.width,this._canvas.height)}},a.prototype.drawDots=function(t){var e=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var n=this._options,i=this._qr.getModuleCount();if(i>n.width||i>n.height)throw"The canvas is too small.";var o=Math.min(n.width,n.height)-2*n.margin,s=Math.floor(o/i),c=Math.floor((n.width-i*s)/2),g=Math.floor((n.height-i*s)/2),h=new Ft({context:r,type:n.dotsOptions.type});r.beginPath();for(var x=function(R){for(var B=function(I){return t&&!t(R,I)?"continue":M._qr.isDark(R,I)?void h.draw(c+R*s,g+I*s,s,function(S,j){return!(R+S<0||I+j<0||R+S>=i||I+j>=i)&&!(t&&!t(R+S,I+j))&&!!e._qr&&e._qr.isDark(R+S,I+j)}):"continue"},D=0;D<i;D++)B(D)},M=this,A=0;A<i;A++)x(A);if(n.dotsOptions.gradient){var E=n.dotsOptions.gradient,F=this._createGradient({context:r,options:E,additionalRotation:0,x:c,y:g,size:i*s});E.colorStops.forEach(function(R){var B=R.offset,D=R.color;F.addColorStop(B,D)}),r.fillStyle=r.strokeStyle=F}else n.dotsOptions.color&&(r.fillStyle=r.strokeStyle=n.dotsOptions.color);r.fill("evenodd")},a.prototype.drawCorners=function(t){var e=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var n=this._options,i=this._qr.getModuleCount(),o=Math.min(n.width,n.height)-2*n.margin,s=Math.floor(o/i),c=7*s,g=3*s,h=Math.floor((n.width-i*s)/2),x=Math.floor((n.height-i*s)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(M){var A,E,F,R,B,D,I,S,j,q,Z=M[0],rt=M[1],gt=M[2];if(!t||t(Z,rt)){var O=h+Z*s*(i-7),ct=x+rt*s*(i-7);if(!((A=n.cornersSquareOptions)===null||A===void 0)&&A.type){var qt=new Vt({context:r,type:(E=n.cornersSquareOptions)===null||E===void 0?void 0:E.type});r.beginPath(),qt.draw(O,ct,c,gt)}else{var xt=new Ft({context:r,type:n.dotsOptions.type});r.beginPath();for(var Pt=function(X){for(var St=function(lt){if(!(!((F=v[X])===null||F===void 0)&&F[lt]))return"continue";xt.draw(O+X*s,ct+lt*s,s,function(Nt,Lt){var dt;return!!(!((dt=v[X+Nt])===null||dt===void 0)&&dt[lt+Lt])})},it=0;it<v[X].length;it++)St(it)},Mt=0;Mt<v.length;Mt++)Pt(Mt)}if(!((R=n.cornersSquareOptions)===null||R===void 0)&&R.gradient){var yt=n.cornersSquareOptions.gradient,Ut=e._createGradient({context:r,options:yt,additionalRotation:gt,x:O,y:ct,size:c});yt.colorStops.forEach(function(X){var St=X.offset,it=X.color;Ut.addColorStop(St,it)}),r.fillStyle=r.strokeStyle=Ut}else!((B=n.cornersSquareOptions)===null||B===void 0)&&B.color&&(r.fillStyle=r.strokeStyle=n.cornersSquareOptions.color);if(r.fill("evenodd"),(D=n.cornersDotOptions)===null||D===void 0?void 0:D.type){var At=new m({context:r,type:(I=n.cornersDotOptions)===null||I===void 0?void 0:I.type});r.beginPath(),At.draw(O+2*s,ct+2*s,g,gt)}else{xt=new Ft({context:r,type:n.dotsOptions.type}),r.beginPath();var jt=function(X){for(var St=function(lt){if(!(!((S=f[X])===null||S===void 0)&&S[lt]))return"continue";xt.draw(O+X*s,ct+lt*s,s,function(Nt,Lt){var dt;return!!(!((dt=f[X+Nt])===null||dt===void 0)&&dt[lt+Lt])})},it=0;it<f[X].length;it++)St(it)};for(Mt=0;Mt<f.length;Mt++)jt(Mt)}if(!((j=n.cornersDotOptions)===null||j===void 0)&&j.gradient){yt=n.cornersDotOptions.gradient;var Xt=e._createGradient({context:r,options:yt,additionalRotation:gt,x:O+2*s,y:ct+2*s,size:g});yt.colorStops.forEach(function(X){var St=X.offset,it=X.color;Xt.addColorStop(St,it)}),r.fillStyle=r.strokeStyle=Xt}else!((q=n.cornersDotOptions)===null||q===void 0)&&q.color&&(r.fillStyle=r.strokeStyle=n.cornersDotOptions.color);r.fill("evenodd")}})},a.prototype.loadImage=function(){var t=this;return new Promise(function(e,r){var n=t._options,i=new Image;if(!n.image)return r("Image is not defined");typeof n.imageOptions.crossOrigin=="string"&&(i.crossOrigin=n.imageOptions.crossOrigin),t._image=i,i.onload=function(){e()},i.src=n.image})},a.prototype.drawImage=function(t){var e=t.width,r=t.height,n=t.count,i=t.dotSize,o=this.context;if(!o)throw"canvasContext is not defined";if(!this._image)throw"image is not defined";var s=this._options,c=Math.floor((s.width-n*i)/2),g=Math.floor((s.height-n*i)/2),h=c+s.imageOptions.margin+(n*i-e)/2,x=g+s.imageOptions.margin+(n*i-r)/2,M=e-2*s.imageOptions.margin,A=r-2*s.imageOptions.margin;o.drawImage(this._image,h,x,M<0?0:M,A<0?0:A)},a.prototype._createGradient=function(t){var e,r=t.context,n=t.options,i=t.additionalRotation,o=t.x,s=t.y,c=t.size;if(n.type===y)e=r.createRadialGradient(o+c/2,s+c/2,0,o+c/2,s+c/2,c/2);else{var g=((n.rotation||0)+i)%(2*Math.PI),h=(g+2*Math.PI)%(2*Math.PI),x=o+c/2,M=s+c/2,A=o+c/2,E=s+c/2;h>=0&&h<=.25*Math.PI||h>1.75*Math.PI&&h<=2*Math.PI?(x-=c/2,M-=c/2*Math.tan(g),A+=c/2,E+=c/2*Math.tan(g)):h>.25*Math.PI&&h<=.75*Math.PI?(M-=c/2,x-=c/2/Math.tan(g),E+=c/2,A+=c/2/Math.tan(g)):h>.75*Math.PI&&h<=1.25*Math.PI?(x+=c/2,M+=c/2*Math.tan(g),A-=c/2,E-=c/2*Math.tan(g)):h>1.25*Math.PI&&h<=1.75*Math.PI&&(M+=c/2,x+=c/2/Math.tan(g),E-=c/2,A-=c/2/Math.tan(g)),e=r.createLinearGradient(Math.round(x),Math.round(M),Math.round(A),Math.round(E))}return e},a}();var p=function(){return(p=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const P=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case wt:i=this._drawDot;break;case mt:i=this._drawClassy;break;case bt:i=this._drawClassyRounded;break;case Dt:i=this._drawRounded;break;case Tt:i=this._drawExtraRounded;break;case It:default:i=this._drawSquare}i.call(this,{x:t,y:e,size:r,getNeighbor:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(i+r/2)),e._element.setAttribute("r",String(r/2))}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(i)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r))}}))},a.prototype._basicSideRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, 0 "+-r)}}))},a.prototype._basicCornerRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},a.prototype._basicCornerExtraRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"a "+r+" "+r+", 0, 0, 0, "+-r+" "+-r)}}))},a.prototype._basicCornersRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+r/2+" "+r/2+"h "+r/2+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size;this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size;this._basicSquare({x:e,y:r,size:n,rotation:0})},a.prototype._drawRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0,h=o+s+c+g;if(h!==0)if(h>2||o&&s||c&&g)this._basicSquare({x:e,y:r,size:n,rotation:0});else{if(h===2){var x=0;return o&&c?x=Math.PI/2:c&&s?x=Math.PI:s&&g&&(x=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:n,rotation:x})}if(h===1)return x=0,c?x=Math.PI/2:s?x=Math.PI:g&&(x=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:x})}else this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0,h=o+s+c+g;if(h!==0)if(h>2||o&&s||c&&g)this._basicSquare({x:e,y:r,size:n,rotation:0});else{if(h===2){var x=0;return o&&c?x=Math.PI/2:c&&s?x=Math.PI:s&&g&&(x=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:x})}if(h===1)return x=0,c?x=Math.PI/2:s?x=Math.PI:g&&(x=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:x})}else this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawClassy=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0;o+s+c+g!==0?o||c?s||g?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2})},a.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0;o+s+c+g!==0?o||c?s||g?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2})},a}();var C=function(){return(C=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const z=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case Qt:i=this._drawSquare;break;case Ht:i=this._drawExtraRounded;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,rotation:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+(n+r/2)+" "+i+"a "+r/2+" "+r/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(r/2-o)+" "+(r/2-o)+" 0 1 1 -0.1 0Z")}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r+"zM "+(n+o)+" "+(i+o)+"h "+(r-2*o)+"v "+(r-2*o)+"h "+(2*o-r)+"z")}}))},a.prototype._basicExtraRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:i})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:i})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicExtraRounded({x:e,y:r,size:n,rotation:i})},a}();var W=function(){return(W=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const J=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case Gt:i=this._drawSquare;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,rotation:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(W(W({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(i+r/2)),e._element.setAttribute("r",String(r/2))}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(W(W({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(i)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r))}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:i})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:i})},a}();var U=[[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]],et=[[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 ht=function(){function a(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(a.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),a.prototype.getElement=function(){return this._element},a.prototype.clear=function(){var t,e=this._element;this._element=e.cloneNode(!1),(t=e==null?void 0:e.parentNode)===null||t===void 0||t.replaceChild(this._element,e),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs)},a.prototype.drawQR=function(t){return e=this,r=void 0,i=function(){var o,s,c,g,h,x,M,A,E,F=this;return function(R,B){var D,I,S,j,q={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return j={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function Z(rt){return function(gt){return function(O){if(D)throw new TypeError("Generator is already executing.");for(;q;)try{if(D=1,I&&(S=2&O[0]?I.return:O[0]?I.throw||((S=I.return)&&S.call(I),0):I.next)&&!(S=S.call(I,O[1])).done)return S;switch(I=0,S&&(O=[2&O[0],S.value]),O[0]){case 0:case 1:S=O;break;case 4:return q.label++,{value:O[1],done:!1};case 5:q.label++,I=O[1],O=[0];continue;case 7:O=q.ops.pop(),q.trys.pop();continue;default:if(!((S=(S=q.trys).length>0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]<S[3])){q.label=O[1];break}if(O[0]===6&&q.label<S[1]){q.label=S[1],S=O;break}if(S&&q.label<S[2]){q.label=S[2],q.ops.push(O);break}S[2]&&q.ops.pop(),q.trys.pop();continue}O=B.call(R,q)}catch(ct){O=[6,ct],I=0}finally{D=S=0}if(5&O[0])throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}([rt,gt])}}}(this,function(R){switch(R.label){case 0:return o=t.getModuleCount(),s=Math.min(this._options.width,this._options.height)-2*this._options.margin,c=Math.floor(s/o),g={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(R.sent(),!this._image)return[2];h=this._options,x=h.imageOptions,M=h.qrOptions,A=x.imageSize*H[M.errorCorrectionLevel],E=Math.floor(A*o*o),g=vt({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:E,maxHiddenAxisDots:o-14,dotSize:c}),R.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots(function(B,D){var I,S,j,q,Z,rt;return!(F._options.imageOptions.hideBackgroundDots&&B>=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&D>=(o-g.hideYDots)/2&&D<(o+g.hideYDots)/2||((I=U[B])===null||I===void 0?void 0:I[D])||((S=U[B-o+7])===null||S===void 0?void 0:S[D])||((j=U[B])===null||j===void 0?void 0:j[D-o+7])||((q=et[B])===null||q===void 0?void 0:q[D])||((Z=et[B-o+7])===null||Z===void 0?void 0:Z[D])||((rt=et[B])===null||rt===void 0?void 0:rt[D-o+7]))}),this.drawCorners(),this._options.image&&this.drawImage({width:g.width,height:g.height,count:o,dotSize:c}),[2]}})},new((n=void 0)||(n=Promise))(function(o,s){function c(x){try{h(i.next(x))}catch(M){s(M)}}function g(x){try{h(i.throw(x))}catch(M){s(M)}}function h(x){var M;x.done?o(x.value):(M=x.value,M instanceof n?M:new n(function(A){A(M)})).then(c,g)}h((i=i.apply(e,r||[])).next())});var e,r,n,i},a.prototype.drawBackground=function(){var t,e,r=this._element,n=this._options;if(r){var i=(t=n.backgroundOptions)===null||t===void 0?void 0:t.gradient,o=(e=n.backgroundOptions)===null||e===void 0?void 0:e.color;(i||o)&&this._createColor({options:i,color:o,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:"background-color"})}},a.prototype.drawDots=function(t){var e,r,n=this;if(!this._qr)throw"QR code is not defined";var i=this._options,o=this._qr.getModuleCount();if(o>i.width||o>i.height)throw"The canvas is too small.";var s=Math.min(i.width,i.height)-2*i.margin,c=Math.floor(s/o),g=Math.floor((i.width-o*c)/2),h=Math.floor((i.height-o*c)/2),x=new P({svg:this._element,type:i.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(e=i.dotsOptions)===null||e===void 0?void 0:e.gradient,color:i.dotsOptions.color,additionalRotation:0,x:g,y:h,height:o*c,width:o*c,name:"dot-color"});for(var M=function(F){for(var R=function(D){return t&&!t(F,D)?"continue":!((r=A._qr)===null||r===void 0)&&r.isDark(F,D)?(x.draw(g+F*c,h+D*c,c,function(I,S){return!(F+I<0||D+S<0||F+I>=o||D+S>=o)&&!(t&&!t(F+I,D+S))&&!!n._qr&&n._qr.isDark(F+I,D+S)}),void(x._element&&A._dotsClipPath&&A._dotsClipPath.appendChild(x._element))):"continue"},B=0;B<o;B++)R(B)},A=this,E=0;E<o;E++)M(E)},a.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var e=this._element,r=this._options;if(!e)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=Math.floor(i/n),s=7*o,c=3*o,g=Math.floor((r.width-n*o)/2),h=Math.floor((r.height-n*o)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(x){var M,A,E,F,R,B,D,I,S,j,q,Z,rt=x[0],gt=x[1],O=x[2],ct=g+rt*o*(n-7),qt=h+gt*o*(n-7),xt=t._dotsClipPath,Pt=t._dotsClipPath;if((((M=r.cornersSquareOptions)===null||M===void 0?void 0:M.gradient)||((A=r.cornersSquareOptions)===null||A===void 0?void 0:A.color))&&((xt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+rt+"-"+gt),t._defs.appendChild(xt),t._cornersSquareClipPath=t._cornersDotClipPath=Pt=xt,t._createColor({options:(E=r.cornersSquareOptions)===null||E===void 0?void 0:E.gradient,color:(F=r.cornersSquareOptions)===null||F===void 0?void 0:F.color,additionalRotation:O,x:ct,y:qt,height:s,width:s,name:"corners-square-color-"+rt+"-"+gt})),(R=r.cornersSquareOptions)===null||R===void 0?void 0:R.type){var Mt=new z({svg:t._element,type:r.cornersSquareOptions.type});Mt.draw(ct,qt,s,O),Mt._element&&xt&&xt.appendChild(Mt._element)}else for(var yt=new P({svg:t._element,type:r.dotsOptions.type}),Ut=function(X){for(var St=function(lt){if(!(!((B=U[X])===null||B===void 0)&&B[lt]))return"continue";yt.draw(ct+X*o,qt+lt*o,o,function(Nt,Lt){var dt;return!!(!((dt=U[X+Nt])===null||dt===void 0)&&dt[lt+Lt])}),yt._element&&xt&&xt.appendChild(yt._element)},it=0;it<U[X].length;it++)St(it)},At=0;At<U.length;At++)Ut(At);if((((D=r.cornersDotOptions)===null||D===void 0?void 0:D.gradient)||((I=r.cornersDotOptions)===null||I===void 0?void 0:I.color))&&((Pt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+rt+"-"+gt),t._defs.appendChild(Pt),t._cornersDotClipPath=Pt,t._createColor({options:(S=r.cornersDotOptions)===null||S===void 0?void 0:S.gradient,color:(j=r.cornersDotOptions)===null||j===void 0?void 0:j.color,additionalRotation:O,x:ct+2*o,y:qt+2*o,height:c,width:c,name:"corners-dot-color-"+rt+"-"+gt})),(q=r.cornersDotOptions)===null||q===void 0?void 0:q.type){var jt=new J({svg:t._element,type:r.cornersDotOptions.type});jt.draw(ct+2*o,qt+2*o,c,O),jt._element&&Pt&&Pt.appendChild(jt._element)}else{yt=new P({svg:t._element,type:r.dotsOptions.type});var Xt=function(X){for(var St=function(lt){if(!(!((Z=et[X])===null||Z===void 0)&&Z[lt]))return"continue";yt.draw(ct+X*o,qt+lt*o,o,function(Nt,Lt){var dt;return!!(!((dt=et[X+Nt])===null||dt===void 0)&&dt[lt+Lt])}),yt._element&&Pt&&Pt.appendChild(yt._element)},it=0;it<et[X].length;it++)St(it)};for(At=0;At<et.length;At++)Xt(At)}})},a.prototype.loadImage=function(){var t=this;return new Promise(function(e,r){var n=t._options,i=new Image;if(!n.image)return r("Image is not defined");typeof n.imageOptions.crossOrigin=="string"&&(i.crossOrigin=n.imageOptions.crossOrigin),t._image=i,i.onload=function(){e()},i.src=n.image})},a.prototype.drawImage=function(t){var e=t.width,r=t.height,n=t.count,i=t.dotSize,o=this._options,s=Math.floor((o.width-n*i)/2),c=Math.floor((o.height-n*i)/2),g=s+o.imageOptions.margin+(n*i-e)/2,h=c+o.imageOptions.margin+(n*i-r)/2,x=e-2*o.imageOptions.margin,M=r-2*o.imageOptions.margin,A=document.createElementNS("http://www.w3.org/2000/svg","image");A.setAttribute("href",o.image||""),A.setAttribute("x",String(g)),A.setAttribute("y",String(h)),A.setAttribute("width",x+"px"),A.setAttribute("height",M+"px"),this._element.appendChild(A)},a.prototype._createColor=function(t){var e=t.options,r=t.color,n=t.additionalRotation,i=t.x,o=t.y,s=t.height,c=t.width,g=t.name,h=c>s?c:s,x=document.createElementNS("http://www.w3.org/2000/svg","rect");if(x.setAttribute("x",String(i)),x.setAttribute("y",String(o)),x.setAttribute("height",String(s)),x.setAttribute("width",String(c)),x.setAttribute("clip-path","url('#clip-path-"+g+"')"),e){var M;if(e.type===y)(M=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",g),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("fx",String(i+c/2)),M.setAttribute("fy",String(o+s/2)),M.setAttribute("cx",String(i+c/2)),M.setAttribute("cy",String(o+s/2)),M.setAttribute("r",String(h/2));else{var A=((e.rotation||0)+n)%(2*Math.PI),E=(A+2*Math.PI)%(2*Math.PI),F=i+c/2,R=o+s/2,B=i+c/2,D=o+s/2;E>=0&&E<=.25*Math.PI||E>1.75*Math.PI&&E<=2*Math.PI?(F-=c/2,R-=s/2*Math.tan(A),B+=c/2,D+=s/2*Math.tan(A)):E>.25*Math.PI&&E<=.75*Math.PI?(R-=s/2,F-=c/2/Math.tan(A),D+=s/2,B+=c/2/Math.tan(A)):E>.75*Math.PI&&E<=1.25*Math.PI?(F+=c/2,R+=s/2*Math.tan(A),B-=c/2,D-=s/2*Math.tan(A)):E>1.25*Math.PI&&E<=1.75*Math.PI&&(R+=s/2,F+=c/2/Math.tan(A),D-=s/2,B-=c/2/Math.tan(A)),(M=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",g),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("x1",String(Math.round(F))),M.setAttribute("y1",String(Math.round(R))),M.setAttribute("x2",String(Math.round(B))),M.setAttribute("y2",String(Math.round(D)))}e.colorStops.forEach(function(I){var S=I.offset,j=I.color,q=document.createElementNS("http://www.w3.org/2000/svg","stop");q.setAttribute("offset",100*S+"%"),q.setAttribute("stop-color",j),M.appendChild(q)}),x.setAttribute("fill","url('#"+g+"')"),this._defs.appendChild(M)}else r&&x.setAttribute("fill",r);this._element.appendChild(x)},a}(),ut="canvas";for(var zt={},Ct=0;Ct<=40;Ct++)zt[Ct]=Ct;const V={type:ut,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:zt[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 u=function(){return(u=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};function w(a){var t=u({},a);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map(function(e){return u(u({},e),{offset:Number(e.offset)})}),t}function d(a){var t=u({},a);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=u(u({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=u({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=w(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=u({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=w(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=u({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=w(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=u({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=w(t.backgroundOptions.gradient))),t}var _=ot(192),b=ot.n(_),k=function(a,t,e,r){return new(e||(e=Promise))(function(n,i){function o(g){try{c(r.next(g))}catch(h){i(h)}}function s(g){try{c(r.throw(g))}catch(h){i(h)}}function c(g){var h;g.done?n(g.value):(h=g.value,h instanceof e?h:new e(function(x){x(h)})).then(o,s)}c((r=r.apply(a,t||[])).next())})},L=function(a,t){var e,r,n,i,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(g){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(n=2&h[0]?r.return:h[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,h[1])).done)return n;switch(r=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){o.label=h[1];break}if(h[0]===6&&o.label<n[1]){o.label=n[1],n=h;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(h);break}n[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(a,o)}catch(x){h=[6,x],r=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([c,g])}}};const N=function(){function a(t){this._options=t?d(_t(V,t)):V,this.update()}return a._clearContainer=function(t){t&&(t.innerHTML="")},a.prototype._getQRStylingElement=function(t){return t===void 0&&(t="png"),k(this,void 0,void 0,function(){var e,r,n;return L(this,function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return t.toLowerCase()!=="svg"?[3,2]:(r=void 0,e=void 0,this._svg&&this._svgDrawingPromise?(e=this._svg,r=this._svgDrawingPromise):(e=new ht(this._options),r=e.drawQR(this._qr)),[4,r]);case 1:return i.sent(),[2,e];case 2:return r=void 0,n=void 0,this._canvas&&this._canvasDrawingPromise?(n=this._canvas,r=this._canvasDrawingPromise):(n=new l(this._options),r=n.drawQR(this._qr)),[4,r];case 3:return i.sent(),[2,n]}})})},a.prototype.update=function(t){a._clearContainer(this._container),this._options=t?d(_t(this._options,t)):this._options,this._options.data&&(this._qr=b()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===ut?(this._canvas=new l(this._options),this._canvasDrawingPromise=this._canvas.drawQR(this._qr),this._svgDrawingPromise=void 0,this._svg=void 0):(this._svg=new ht(this._options),this._svgDrawingPromise=this._svg.drawQR(this._qr),this._canvasDrawingPromise=void 0,this._canvas=void 0),this.append(this._container))},a.prototype.append=function(t){if(t){if(typeof t.appendChild!="function")throw"Container should be a single DOM node";this._options.type===ut?this._canvas&&t.appendChild(this._canvas.getCanvas()):this._svg&&t.appendChild(this._svg.getElement()),this._container=t}},a.prototype.getRawData=function(t){return t===void 0&&(t="png"),k(this,void 0,void 0,function(){var e,r,n;return L(this,function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getQRStylingElement(t)];case 1:return e=i.sent(),t.toLowerCase()==="svg"?(r=new XMLSerializer,n=r.serializeToString(e.getElement()),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
4
- `+n],{type:"image/svg+xml"})]):[2,new Promise(function(o){return e.getCanvas().toBlob(o,"image/"+t,1)})]}})})},a.prototype.download=function(t){return k(this,void 0,void 0,function(){var e,r,n,i,o;return L(this,function(s){switch(s.label){case 0:if(!this._qr)throw"QR code is empty";return e="png",r="qr",typeof t=="string"?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof t=="object"&&t!==null&&(t.name&&(r=t.name),t.extension&&(e=t.extension)),[4,this._getQRStylingElement(e)];case 1:return n=s.sent(),e.toLowerCase()==="svg"?(i=new XMLSerializer,o=`<?xml version="1.0" standalone="no"?>\r
5
- `+(o=i.serializeToString(n.getElement())),pt("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),r+".svg")):pt(n.getCanvas().toDataURL("image/"+e),r+"."+e),[2]}})})},a}()}},nt={};function tt(Y){if(nt[Y])return nt[Y].exports;var $=nt[Y]={exports:{}};return K[Y]($,$.exports,tt),$.exports}return tt.n=Y=>{var $=Y&&Y.__esModule?()=>Y.default:()=>Y;return tt.d($,{a:$}),$},tt.d=(Y,$)=>{for(var ot in $)tt.o($,ot)&&!tt.o(Y,ot)&&Object.defineProperty(Y,ot,{enumerable:!0,get:$[ot]})},tt.o=(Y,$)=>Object.prototype.hasOwnProperty.call(Y,$),tt(796)})().default})})($t);var Jt=Zt($t.exports),ue="",Kt=(Q,G)=>{const K=Q.__vccOpts||Q;for(const[nt,tt]of G)K[nt]=tt;return K};const te={class:"az-qrcode"},ee={class:"az-qrcode-left"},re={class:"az-qrcode-right"},ne={class:"az-qrcode-bottom"};var oe=Kt(T.defineComponent({__name:"View",props:{width:null,height:null,bgColor:null,dotsColor:null,value:null,outlineValue:null},setup(Q){var Y,$,ot,kt;const G=Q,K=T.ref({width:G.width,height:G.height,type:"svg",data:G.value,qrOptions:{typeNumber:0,mode:"Byte",errorCorrectionLevel:"H"},backgroundOptions:{color:(Y=G.bgColor)!=null?Y:"white"},dotsOptions:{color:($=G.dotsColor)!=null?$:"black",type:"square"},cornersSquareOptions:{color:(ot=G.dotsColor)!=null?ot:"black",type:"square"},cornersDotOptions:{color:(kt=G.dotsColor)!=null?kt:"black",type:"square"}}),nt=new Jt(K.value),tt=T.ref();return T.onMounted(()=>{nt.append(tt.value)}),T.watch(()=>G.value,Bt=>{K.value.data=Bt,nt.update(K.value)}),(Bt,ft)=>(T.openBlock(),T.createElementBlock("div",te,[T.createElementVNode("div",null,T.toDisplayString(Q.outlineValue),1),T.createElementVNode("div",{class:"az-qrcode-center",style:T.normalizeStyle(`grid-template-columns: auto ${G.width}px auto;`)},[T.createElementVNode("div",ee,T.toDisplayString(Q.outlineValue),1),T.createElementVNode("div",null,[T.createElementVNode("div",{ref_key:"qrCode",ref:tt},null,512)]),T.createElementVNode("div",re,T.toDisplayString(Q.outlineValue),1)],4),T.createElementVNode("div",ne,T.toDisplayString(Q.outlineValue),1)]))}}),[["__scopeId","data-v-da2a1ac4"]]);class ie{constructor(G){Yt(this,"internalState");Yt(this,"listeners",[]);this.internalState=G}get state(){return this.internalState}changeState(G){this.internalState=G,this.listeners.length>0&&this.listeners.forEach(K=>K(this.state))}subscribe(G){this.listeners.push(G)}unsubscribe(G){const K=this.listeners.indexOf(G);K>-1&&this.listeners.splice(K,1)}}at.Bloc=ie,at.QRCode=oe,at.dateToString=Wt,at.useBlocState=Rt,Object.defineProperties(at,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(tt,Q){typeof exports=="object"&&typeof module!="undefined"?Q(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Q):(tt=typeof globalThis!="undefined"?globalThis:tt||self,Q((tt.agendize=tt.agendize||{},tt.agendize.tools={}),tt.Vue))})(this,function(tt,Q){"use strict";var le=Object.defineProperty;var de=(tt,Q,Rt)=>Q in tt?le(tt,Q,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):tt[Q]=Rt;var Yt=(tt,Q,Rt)=>(de(tt,typeof Q!="symbol"?Q+"":Q,Rt),Rt);function Rt(N){const T=Q.ref(N.state),j=U=>{T.value=U};return Q.onMounted(()=>{N.subscribe(j)}),Q.onUnmounted(()=>{N.unsubscribe(j)}),Q.readonly(T)}function Wt(N,T=!1){var j=N.getFullYear(),U=N.getMonth()+1,Y=N.getDate(),Z=N.getHours(),J=N.getMinutes(),it=N.getSeconds();return T?(Y<10?"0"+Y:Y)+"/"+(U<10?"0"+U:U)+"/"+j:j+"-"+(U<10?"0"+U:U)+"-"+(Y<10?"0"+Y:Y)+"T"+(Z<10?"0"+Z:Z)+":"+(J<10?"0"+J:J)+":"+(it<10?"0"+it:it)}function Zt(N,T){T.urlPicture.value=void 0,T.pictureAsData.value="",T.filePicture.value=void 0,N&&Jt(N).then(j=>{!j||typeof j=="string"&&(T.pictureAsData.value=j)})}const Jt=N=>new Promise((T,j)=>{const U=new FileReader;U.readAsDataURL(N),U.onload=()=>T(U.result),U.onerror=Y=>j(Y)});function Kt(N,T){let j=new XMLHttpRequest;j.open("get",N),j.responseType="blob",j.onload=function(){let U=new FileReader;U.onload=function(){if(!T&&U.result)return;let Y;typeof U.result=="string"?Y=U.result:Y=Buffer.from(String.fromCharCode(...new Uint8Array(U.result)),"base64").toString(),T(Y)},U.readAsDataURL(j.response)},j.send()}function te(N){try{return parseInt(N)}catch{return 0}}function ee(N,T=2){let j=N+"";for(;j.length<T;)j="0"+j;return j}function re(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}var $t={exports:{}};(function(N,T){(function(j,U){N.exports=U()})(self,function(){return(()=>{var j={192:(Z,J)=>{var it,Dt,Bt=function(){var ft=function(m,y){var v=m,f=It[y],l=null,p=0,P=null,C=[],z={},K=function(u,w){l=function(d){for(var _=new Array(d),b=0;b<d;b+=1){_[b]=new Array(d);for(var D=0;D<d;D+=1)_[b][D]=null}return _}(p=4*v+17),rt(0,0),rt(p-7,0),rt(0,p-7),nt(),$(),ut(u,w),v>=7&&ht(u),P==null&&(P=Ct(v,f,C)),zt(P,w)},rt=function(u,w){for(var d=-1;d<=7;d+=1)if(!(u+d<=-1||p<=u+d))for(var _=-1;_<=7;_+=1)w+_<=-1||p<=w+_||(l[u+d][w+_]=0<=d&&d<=6&&(_==0||_==6)||0<=_&&_<=6&&(d==0||d==6)||2<=d&&d<=4&&2<=_&&_<=4)},$=function(){for(var u=8;u<p-8;u+=1)l[u][6]==null&&(l[u][6]=u%2==0);for(var w=8;w<p-8;w+=1)l[6][w]==null&&(l[6][w]=w%2==0)},nt=function(){for(var u=mt.getPatternPosition(v),w=0;w<u.length;w+=1)for(var d=0;d<u.length;d+=1){var _=u[w],b=u[d];if(l[_][b]==null)for(var D=-2;D<=2;D+=1)for(var F=-2;F<=2;F+=1)l[_+D][b+F]=D==-2||D==2||F==-2||F==2||D==0&&F==0}},ht=function(u){for(var w=mt.getBCHTypeNumber(v),d=0;d<18;d+=1){var _=!u&&(w>>d&1)==1;l[Math.floor(d/3)][d%3+p-8-3]=_}for(d=0;d<18;d+=1)_=!u&&(w>>d&1)==1,l[d%3+p-8-3][Math.floor(d/3)]=_},ut=function(u,w){for(var d=f<<3|w,_=mt.getBCHTypeInfo(d),b=0;b<15;b+=1){var D=!u&&(_>>b&1)==1;b<6?l[b][8]=D:b<8?l[b+1][8]=D:l[p-15+b][8]=D}for(b=0;b<15;b+=1)D=!u&&(_>>b&1)==1,b<8?l[8][p-b-1]=D:b<9?l[8][15-b-1+1]=D:l[8][15-b-1]=D;l[p-8][8]=!u},zt=function(u,w){for(var d=-1,_=p-1,b=7,D=0,F=mt.getMaskFunction(w),L=p-1;L>0;L-=2)for(L==6&&(L-=1);;){for(var a=0;a<2;a+=1)if(l[_][L-a]==null){var t=!1;D<u.length&&(t=(u[D]>>>b&1)==1),F(_,L-a)&&(t=!t),l[_][L-a]=t,(b-=1)==-1&&(D+=1,b=7)}if((_+=d)<0||p<=_){_-=d,d=-d;break}}},Ct=function(u,w,d){for(var _=Tt.getRSBlocks(u,w),b=st(),D=0;D<d.length;D+=1){var F=d[D];b.put(F.getMode(),4),b.put(F.getLength(),mt.getLengthInBits(F.getMode(),u)),F.write(b)}var L=0;for(D=0;D<_.length;D+=1)L+=_[D].dataCount;if(b.getLengthInBits()>8*L)throw"code length overflow. ("+b.getLengthInBits()+">"+8*L+")";for(b.getLengthInBits()+4<=8*L&&b.put(0,4);b.getLengthInBits()%8!=0;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*L||(b.put(236,8),b.getLengthInBits()>=8*L));)b.put(17,8);return function(a,t){for(var e=0,r=0,n=0,i=new Array(t.length),o=new Array(t.length),s=0;s<t.length;s+=1){var c=t[s].dataCount,g=t[s].totalCount-c;r=Math.max(r,c),n=Math.max(n,g),i[s]=new Array(c);for(var h=0;h<i[s].length;h+=1)i[s][h]=255&a.getBuffer()[h+e];e+=c;var x=mt.getErrorCorrectPolynomial(g),M=kt(i[s],x.getLength()-1).mod(x);for(o[s]=new Array(x.getLength()-1),h=0;h<o[s].length;h+=1){var A=h+M.getLength()-o[s].length;o[s][h]=A>=0?M.getAt(A):0}}var E=0;for(h=0;h<t.length;h+=1)E+=t[h].totalCount;var H=new Array(E),R=0;for(h=0;h<r;h+=1)for(s=0;s<t.length;s+=1)h<i[s].length&&(H[R]=i[s][h],R+=1);for(h=0;h<n;h+=1)for(s=0;s<t.length;s+=1)h<o[s].length&&(H[R]=o[s][h],R+=1);return H}(b,_)};z.addData=function(u,w){var d=null;switch(w=w||"Byte"){case"Numeric":d=Ft(u);break;case"Alphanumeric":d=Qt(u);break;case"Byte":d=Ht(u);break;case"Kanji":d=Ot(u);break;default:throw"mode:"+w}C.push(d),P=null},z.isDark=function(u,w){if(u<0||p<=u||w<0||p<=w)throw u+","+w;return l[u][w]},z.getModuleCount=function(){return p},z.make=function(){if(v<1){for(var u=1;u<40;u++){for(var w=Tt.getRSBlocks(u,f),d=st(),_=0;_<C.length;_++){var b=C[_];d.put(b.getMode(),4),d.put(b.getLength(),mt.getLengthInBits(b.getMode(),u)),b.write(d)}var D=0;for(_=0;_<w.length;_++)D+=w[_].dataCount;if(d.getLengthInBits()<=8*D)break}v=u}K(!1,function(){for(var F=0,L=0,a=0;a<8;a+=1){K(!0,a);var t=mt.getLostPoint(z);(a==0||F>t)&&(F=t,L=a)}return L}())},z.createTableTag=function(u,w){u=u||2;var d="";d+='<table style="',d+=" border-width: 0px; border-style: none;",d+=" border-collapse: collapse;",d+=" padding: 0px; margin: "+(w=w===void 0?4*u:w)+"px;",d+='">',d+="<tbody>";for(var _=0;_<z.getModuleCount();_+=1){d+="<tr>";for(var b=0;b<z.getModuleCount();b+=1)d+='<td style="',d+=" border-width: 0px; border-style: none;",d+=" border-collapse: collapse;",d+=" padding: 0px; margin: 0px;",d+=" width: "+u+"px;",d+=" height: "+u+"px;",d+=" background-color: ",d+=z.isDark(_,b)?"#000000":"#ffffff",d+=";",d+='"/>';d+="</tr>"}return(d+="</tbody>")+"</table>"},z.createSvgTag=function(u,w,d,_){var b={};typeof arguments[0]=="object"&&(u=(b=arguments[0]).cellSize,w=b.margin,d=b.alt,_=b.title),u=u||2,w=w===void 0?4*u:w,(d=typeof d=="string"?{text:d}:d||{}).text=d.text||null,d.id=d.text?d.id||"qrcode-description":null,(_=typeof _=="string"?{text:_}:_||{}).text=_.text||null,_.id=_.text?_.id||"qrcode-title":null;var D,F,L,a,t=z.getModuleCount()*u+2*w,e="";for(a="l"+u+",0 0,"+u+" -"+u+",0 0,-"+u+"z ",e+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',e+=b.scalable?"":' width="'+t+'px" height="'+t+'px"',e+=' viewBox="0 0 '+t+" "+t+'" ',e+=' preserveAspectRatio="xMinYMin meet"',e+=_.text||d.text?' role="img" aria-labelledby="'+X([_.id,d.id].join(" ").trim())+'"':"",e+=">",e+=_.text?'<title id="'+X(_.id)+'">'+X(_.text)+"</title>":"",e+=d.text?'<description id="'+X(d.id)+'">'+X(d.text)+"</description>":"",e+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',e+='<path d="',F=0;F<z.getModuleCount();F+=1)for(L=F*u+w,D=0;D<z.getModuleCount();D+=1)z.isDark(F,D)&&(e+="M"+(D*u+w)+","+L+a);return(e+='" stroke="transparent" fill="black"/>')+"</svg>"},z.createDataURL=function(u,w){u=u||2,w=w===void 0?4*u:w;var d=z.getModuleCount()*u+2*w,_=w,b=d-w;return Et(d,d,function(D,F){if(_<=D&&D<b&&_<=F&&F<b){var L=Math.floor((D-_)/u),a=Math.floor((F-_)/u);return z.isDark(a,L)?0:1}return 1})},z.createImgTag=function(u,w,d){u=u||2,w=w===void 0?4*u:w;var _=z.getModuleCount()*u+2*w,b="";return b+="<img",b+=' src="',b+=z.createDataURL(u,w),b+='"',b+=' width="',b+=_,b+='"',b+=' height="',b+=_,b+='"',d&&(b+=' alt="',b+=X(d),b+='"'),b+"/>"};var X=function(u){for(var w="",d=0;d<u.length;d+=1){var _=u.charAt(d);switch(_){case"<":w+="&lt;";break;case">":w+="&gt;";break;case"&":w+="&amp;";break;case'"':w+="&quot;";break;default:w+=_}}return w};return z.createASCII=function(u,w){if((u=u||1)<2)return function(i){i=i===void 0?2:i;var o,s,c,g,h,x=1*z.getModuleCount()+2*i,M=i,A=x-i,E={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},H={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},R="";for(o=0;o<x;o+=2){for(c=Math.floor((o-M)/1),g=Math.floor((o+1-M)/1),s=0;s<x;s+=1)h="\u2588",M<=s&&s<A&&M<=o&&o<A&&z.isDark(c,Math.floor((s-M)/1))&&(h=" "),M<=s&&s<A&&M<=o+1&&o+1<A&&z.isDark(g,Math.floor((s-M)/1))?h+=" ":h+="\u2588",R+=i<1&&o+1>=A?H[h]:E[h];R+=`
2
+ `}return x%2&&i>0?R.substring(0,R.length-x-1)+Array(x+1).join("\u2580"):R.substring(0,R.length-1)}(w);u-=1,w=w===void 0?2*u:w;var d,_,b,D,F=z.getModuleCount()*u+2*w,L=w,a=F-w,t=Array(u+1).join("\u2588\u2588"),e=Array(u+1).join(" "),r="",n="";for(d=0;d<F;d+=1){for(b=Math.floor((d-L)/u),n="",_=0;_<F;_+=1)D=1,L<=_&&_<a&&L<=d&&d<a&&z.isDark(b,Math.floor((_-L)/u))&&(D=0),n+=D?t:e;for(b=0;b<u;b+=1)r+=n+`
3
+ `}return r.substring(0,r.length-1)},z.renderTo2dContext=function(u,w){w=w||2;for(var d=z.getModuleCount(),_=0;_<d;_++)for(var b=0;b<d;b++)u.fillStyle=z.isDark(_,b)?"black":"white",u.fillRect(_*w,b*w,w,w)},z};ft.stringToBytes=(ft.stringToBytesFuncs={default:function(m){for(var y=[],v=0;v<m.length;v+=1){var f=m.charCodeAt(v);y.push(255&f)}return y}}).default,ft.createStringToBytes=function(m,y){var v=function(){for(var l=Vt(m),p=function(){var $=l.read();if($==-1)throw"eof";return $},P=0,C={};;){var z=l.read();if(z==-1)break;var K=p(),rt=p()<<8|p();C[String.fromCharCode(z<<8|K)]=rt,P+=1}if(P!=y)throw P+" != "+y;return C}(),f="?".charCodeAt(0);return function(l){for(var p=[],P=0;P<l.length;P+=1){var C=l.charCodeAt(P);if(C<128)p.push(C);else{var z=v[l.charAt(P)];typeof z=="number"?(255&z)==z?p.push(z):(p.push(z>>>8),p.push(255&z)):p.push(f)}}return p}};var _t,pt,vt,G,wt,It={L:1,M:0,Q:3,H:2},mt=(_t=[[],[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]],pt=1335,vt=7973,wt=function(m){for(var y=0;m!=0;)y+=1,m>>>=1;return y},(G={}).getBCHTypeInfo=function(m){for(var y=m<<10;wt(y)-wt(pt)>=0;)y^=pt<<wt(y)-wt(pt);return 21522^(m<<10|y)},G.getBCHTypeNumber=function(m){for(var y=m<<12;wt(y)-wt(vt)>=0;)y^=vt<<wt(y)-wt(vt);return m<<12|y},G.getPatternPosition=function(m){return _t[m-1]},G.getMaskFunction=function(m){switch(m){case 0:return function(y,v){return(y+v)%2==0};case 1:return function(y,v){return y%2==0};case 2:return function(y,v){return v%3==0};case 3:return function(y,v){return(y+v)%3==0};case 4:return function(y,v){return(Math.floor(y/2)+Math.floor(v/3))%2==0};case 5:return function(y,v){return y*v%2+y*v%3==0};case 6:return function(y,v){return(y*v%2+y*v%3)%2==0};case 7:return function(y,v){return(y*v%3+(y+v)%2)%2==0};default:throw"bad maskPattern:"+m}},G.getErrorCorrectPolynomial=function(m){for(var y=kt([1],0),v=0;v<m;v+=1)y=y.multiply(kt([1,bt.gexp(v)],0));return y},G.getLengthInBits=function(m,y){if(1<=y&&y<10)switch(m){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+m}else if(y<27)switch(m){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+m}else{if(!(y<41))throw"type:"+y;switch(m){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+m}}},G.getLostPoint=function(m){for(var y=m.getModuleCount(),v=0,f=0;f<y;f+=1)for(var l=0;l<y;l+=1){for(var p=0,P=m.isDark(f,l),C=-1;C<=1;C+=1)if(!(f+C<0||y<=f+C))for(var z=-1;z<=1;z+=1)l+z<0||y<=l+z||C==0&&z==0||P==m.isDark(f+C,l+z)&&(p+=1);p>5&&(v+=3+p-5)}for(f=0;f<y-1;f+=1)for(l=0;l<y-1;l+=1){var K=0;m.isDark(f,l)&&(K+=1),m.isDark(f+1,l)&&(K+=1),m.isDark(f,l+1)&&(K+=1),m.isDark(f+1,l+1)&&(K+=1),K!=0&&K!=4||(v+=3)}for(f=0;f<y;f+=1)for(l=0;l<y-6;l+=1)m.isDark(f,l)&&!m.isDark(f,l+1)&&m.isDark(f,l+2)&&m.isDark(f,l+3)&&m.isDark(f,l+4)&&!m.isDark(f,l+5)&&m.isDark(f,l+6)&&(v+=40);for(l=0;l<y;l+=1)for(f=0;f<y-6;f+=1)m.isDark(f,l)&&!m.isDark(f+1,l)&&m.isDark(f+2,l)&&m.isDark(f+3,l)&&m.isDark(f+4,l)&&!m.isDark(f+5,l)&&m.isDark(f+6,l)&&(v+=40);var rt=0;for(l=0;l<y;l+=1)for(f=0;f<y;f+=1)m.isDark(f,l)&&(rt+=1);return v+Math.abs(100*rt/y/y-50)/5*10},G),bt=function(){for(var m=new Array(256),y=new Array(256),v=0;v<8;v+=1)m[v]=1<<v;for(v=8;v<256;v+=1)m[v]=m[v-4]^m[v-5]^m[v-6]^m[v-8];for(v=0;v<255;v+=1)y[m[v]]=v;return{glog:function(f){if(f<1)throw"glog("+f+")";return y[f]},gexp:function(f){for(;f<0;)f+=255;for(;f>=256;)f-=255;return m[f]}}}();function kt(m,y){if(m.length===void 0)throw m.length+"/"+y;var v=function(){for(var l=0;l<m.length&&m[l]==0;)l+=1;for(var p=new Array(m.length-l+y),P=0;P<m.length-l;P+=1)p[P]=m[P+l];return p}(),f={getAt:function(l){return v[l]},getLength:function(){return v.length},multiply:function(l){for(var p=new Array(f.getLength()+l.getLength()-1),P=0;P<f.getLength();P+=1)for(var C=0;C<l.getLength();C+=1)p[P+C]^=bt.gexp(bt.glog(f.getAt(P))+bt.glog(l.getAt(C)));return kt(p,0)},mod:function(l){if(f.getLength()-l.getLength()<0)return f;for(var p=bt.glog(f.getAt(0))-bt.glog(l.getAt(0)),P=new Array(f.getLength()),C=0;C<f.getLength();C+=1)P[C]=f.getAt(C);for(C=0;C<l.getLength();C+=1)P[C]^=bt.gexp(bt.glog(l.getAt(C))+p);return kt(P,0).mod(l)}};return f}var Tt=function(){var m=[[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]],y=function(f,l){var p={};return p.totalCount=f,p.dataCount=l,p},v={getRSBlocks:function(f,l){var p=function(ht,ut){switch(ut){case It.L:return m[4*(ht-1)+0];case It.M:return m[4*(ht-1)+1];case It.Q:return m[4*(ht-1)+2];case It.H:return m[4*(ht-1)+3];default:return}}(f,l);if(p===void 0)throw"bad rs block @ typeNumber:"+f+"/errorCorrectionLevel:"+l;for(var P=p.length/3,C=[],z=0;z<P;z+=1)for(var K=p[3*z+0],rt=p[3*z+1],$=p[3*z+2],nt=0;nt<K;nt+=1)C.push(y(rt,$));return C}};return v}(),st=function(){var m=[],y=0,v={getBuffer:function(){return m},getAt:function(f){var l=Math.floor(f/8);return(m[l]>>>7-f%8&1)==1},put:function(f,l){for(var p=0;p<l;p+=1)v.putBit((f>>>l-p-1&1)==1)},getLengthInBits:function(){return y},putBit:function(f){var l=Math.floor(y/8);m.length<=l&&m.push(0),f&&(m[l]|=128>>>y%8),y+=1}};return v},Ft=function(m){var y=m,v={getMode:function(){return 1},getLength:function(p){return y.length},write:function(p){for(var P=y,C=0;C+2<P.length;)p.put(f(P.substring(C,C+3)),10),C+=3;C<P.length&&(P.length-C==1?p.put(f(P.substring(C,C+1)),4):P.length-C==2&&p.put(f(P.substring(C,C+2)),7))}},f=function(p){for(var P=0,C=0;C<p.length;C+=1)P=10*P+l(p.charAt(C));return P},l=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+p};return v},Qt=function(m){var y=m,v={getMode:function(){return 2},getLength:function(l){return y.length},write:function(l){for(var p=y,P=0;P+1<p.length;)l.put(45*f(p.charAt(P))+f(p.charAt(P+1)),11),P+=2;P<p.length&&l.put(f(p.charAt(P)),6)}},f=function(l){if("0"<=l&&l<="9")return l.charCodeAt(0)-"0".charCodeAt(0);if("A"<=l&&l<="Z")return l.charCodeAt(0)-"A".charCodeAt(0)+10;switch(l){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 :"+l}};return v},Ht=function(m){var y=ft.stringToBytes(m);return{getMode:function(){return 4},getLength:function(v){return y.length},write:function(v){for(var f=0;f<y.length;f+=1)v.put(y[f],8)}}},Ot=function(m){var y=ft.stringToBytesFuncs.SJIS;if(!y)throw"sjis not supported.";(function(f,l){var p=y("\u53CB");if(p.length!=2||(p[0]<<8|p[1])!=38726)throw"sjis not supported."})();var v=y(m);return{getMode:function(){return 8},getLength:function(f){return~~(v.length/2)},write:function(f){for(var l=v,p=0;p+1<l.length;){var P=(255&l[p])<<8|255&l[p+1];if(33088<=P&&P<=40956)P-=33088;else{if(!(57408<=P&&P<=60351))throw"illegal char at "+(p+1)+"/"+P;P-=49472}P=192*(P>>>8&255)+(255&P),f.put(P,13),p+=2}if(p<l.length)throw"illegal char at "+(p+1)}}},Ut=function(){var m=[],y={writeByte:function(v){m.push(255&v)},writeShort:function(v){y.writeByte(v),y.writeByte(v>>>8)},writeBytes:function(v,f,l){f=f||0,l=l||v.length;for(var p=0;p<l;p+=1)y.writeByte(v[p+f])},writeString:function(v){for(var f=0;f<v.length;f+=1)y.writeByte(v.charCodeAt(f))},toByteArray:function(){return m},toString:function(){var v="";v+="[";for(var f=0;f<m.length;f+=1)f>0&&(v+=","),v+=m[f];return v+"]"}};return y},Vt=function(m){var y=m,v=0,f=0,l=0,p={read:function(){for(;l<8;){if(v>=y.length){if(l==0)return-1;throw"unexpected end of file./"+l}var C=y.charAt(v);if(v+=1,C=="=")return l=0,-1;C.match(/^\s$/)||(f=f<<6|P(C.charCodeAt(0)),l+=6)}var z=f>>>l-8&255;return l-=8,z}},P=function(C){if(65<=C&&C<=90)return C-65;if(97<=C&&C<=122)return C-97+26;if(48<=C&&C<=57)return C-48+52;if(C==43)return 62;if(C==47)return 63;throw"c:"+C};return p},Et=function(m,y,v){for(var f=function(rt,$){var nt=rt,ht=$,ut=new Array(rt*$),zt={setPixel:function(u,w,d){ut[w*nt+u]=d},write:function(u){u.writeString("GIF87a"),u.writeShort(nt),u.writeShort(ht),u.writeByte(128),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(255),u.writeByte(255),u.writeByte(255),u.writeString(","),u.writeShort(0),u.writeShort(0),u.writeShort(nt),u.writeShort(ht),u.writeByte(0);var w=Ct(2);u.writeByte(2);for(var d=0;w.length-d>255;)u.writeByte(255),u.writeBytes(w,d,255),d+=255;u.writeByte(w.length-d),u.writeBytes(w,d,w.length-d),u.writeByte(0),u.writeString(";")}},Ct=function(u){for(var w=1<<u,d=1+(1<<u),_=u+1,b=X(),D=0;D<w;D+=1)b.add(String.fromCharCode(D));b.add(String.fromCharCode(w)),b.add(String.fromCharCode(d));var F,L,a,t=Ut(),e=(F=t,L=0,a=0,{write:function(o,s){if(o>>>s!=0)throw"length over";for(;L+s>=8;)F.writeByte(255&(o<<L|a)),s-=8-L,o>>>=8-L,a=0,L=0;a|=o<<L,L+=s},flush:function(){L>0&&F.writeByte(a)}});e.write(w,_);var r=0,n=String.fromCharCode(ut[r]);for(r+=1;r<ut.length;){var i=String.fromCharCode(ut[r]);r+=1,b.contains(n+i)?n+=i:(e.write(b.indexOf(n),_),b.size()<4095&&(b.size()==1<<_&&(_+=1),b.add(n+i)),n=i)}return e.write(b.indexOf(n),_),e.write(d,_),e.flush(),t.toByteArray()},X=function(){var u={},w=0,d={add:function(_){if(d.contains(_))throw"dup key:"+_;u[_]=w,w+=1},size:function(){return w},indexOf:function(_){return u[_]},contains:function(_){return u[_]!==void 0}};return d};return zt}(m,y),l=0;l<y;l+=1)for(var p=0;p<m;p+=1)f.setPixel(p,l,v(p,l));var P=Ut();f.write(P);for(var C=function(){var rt=0,$=0,nt=0,ht="",ut={},zt=function(X){ht+=String.fromCharCode(Ct(63&X))},Ct=function(X){if(!(X<0)){if(X<26)return 65+X;if(X<52)return X-26+97;if(X<62)return X-52+48;if(X==62)return 43;if(X==63)return 47}throw"n:"+X};return ut.writeByte=function(X){for(rt=rt<<8|255&X,$+=8,nt+=1;$>=6;)zt(rt>>>$-6),$-=6},ut.flush=function(){if($>0&&(zt(rt<<6-$),rt=0,$=0),nt%3!=0)for(var X=3-nt%3,u=0;u<X;u+=1)ht+="="},ut.toString=function(){return ht},ut}(),z=P.toByteArray(),K=0;K<z.length;K+=1)C.writeByte(z[K]);return C.flush(),"data:image/gif;base64,"+C};return ft}();Bt.stringToBytesFuncs["UTF-8"]=function(ft){return function(_t){for(var pt=[],vt=0;vt<_t.length;vt++){var G=_t.charCodeAt(vt);G<128?pt.push(G):G<2048?pt.push(192|G>>6,128|63&G):G<55296||G>=57344?pt.push(224|G>>12,128|G>>6&63,128|63&G):(vt++,G=65536+((1023&G)<<10|1023&_t.charCodeAt(vt)),pt.push(240|G>>18,128|G>>12&63,128|G>>6&63,128|63&G))}return pt}(ft)},(Dt=typeof(it=function(){return Bt})=="function"?it.apply(J,[]):it)===void 0||(Z.exports=Dt)},796:(Z,J,it)=>{it.d(J,{default:()=>L});var Dt=function(){return(Dt=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)},Bt=function(){for(var a=0,t=0,e=arguments.length;t<e;t++)a+=arguments[t].length;var r=Array(a),n=0;for(t=0;t<e;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,n++)r[n]=i[o];return r},ft=function(a){return!!a&&typeof a=="object"&&!Array.isArray(a)};function _t(a){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!t.length)return a;var r=t.shift();return r!==void 0&&ft(a)&&ft(r)?(a=Dt({},a),Object.keys(r).forEach(function(n){var i=a[n],o=r[n];Array.isArray(i)&&Array.isArray(o)?a[n]=o:ft(i)&&ft(o)?a[n]=_t(Object.assign({},i),o):a[n]=o}),_t.apply(void 0,Bt([a],t))):a}function pt(a,t){var e=document.createElement("a");e.download=t,e.href=a,document.body.appendChild(e),e.click(),document.body.removeChild(e)}function vt(a){var t=a.originalHeight,e=a.originalWidth,r=a.maxHiddenDots,n=a.maxHiddenAxisDots,i=a.dotSize,o={x:0,y:0},s={x:0,y:0};if(t<=0||e<=0||r<=0||i<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var c=t/e;return o.x=Math.floor(Math.sqrt(r/c)),o.x<=0&&(o.x=1),n&&n<o.x&&(o.x=n),o.x%2==0&&o.x--,s.x=o.x*i,o.y=1+2*Math.ceil((o.x*c-1)/2),s.y=Math.round(s.x*c),(o.y*o.x>r||n&&n<o.y)&&(n&&n<o.y?(o.y=n,o.y%2==0&&o.x--):o.y-=2,s.y=o.y*i,o.x=1+2*Math.ceil((o.y/c-1)/2),s.x=Math.round(s.y/c)),{height:s.y,width:s.x,hideYDots:o.y,hideXDots:o.x}}const G={L:.07,M:.15,Q:.25,H:.3},wt="dots",It="rounded",mt="classy",bt="classy-rounded",kt="square",Tt="extra-rounded";var st=function(){return(st=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const Ft=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case wt:i=this._drawDot;break;case mt:i=this._drawClassy;break;case bt:i=this._drawClassyRounded;break;case It:i=this._drawRounded;break;case Tt:i=this._drawExtraRounded;break;case kt:default:i=this._drawSquare}i.call(this,{x:t,y:e,size:r,context:o,getNeighbor:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.rect(-e/2,-e/2,e,e)}}))},a.prototype._basicSideRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,Math.PI/2),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornerRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,0),r.lineTo(e/2,e/2),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornerExtraRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(-e/2,e/2,e,-Math.PI/2,0),r.lineTo(-e/2,e/2),r.lineTo(-e/2,-e/2)}}))},a.prototype._basicCornersRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(0,0,e/2,-Math.PI/2,0),r.lineTo(e/2,e/2),r.lineTo(0,e/2),r.arc(0,0,e/2,Math.PI/2,Math.PI),r.lineTo(-e/2,-e/2),r.lineTo(0,-e/2)}}))},a.prototype._basicCornersExtraRounded=function(t){var e=t.size,r=t.context;this._rotateFigure(st(st({},t),{draw:function(){r.arc(-e/2,e/2,e,-Math.PI/2,0),r.arc(e/2,-e/2,e,Math.PI/2,Math.PI)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context;this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context;this._basicSquare({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0,x=s+c+g+h;if(x!==0)if(x>2||s&&c||g&&h)this._basicSquare({x:e,y:r,size:n,context:i,rotation:0});else{if(x===2){var M=0;return s&&g?M=Math.PI/2:g&&c?M=Math.PI:c&&h&&(M=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:M})}if(x===1)return M=0,g?M=Math.PI/2:c?M=Math.PI:h&&(M=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,context:i,rotation:M})}else this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0,x=s+c+g+h;if(x!==0)if(x>2||s&&c||g&&h)this._basicSquare({x:e,y:r,size:n,context:i,rotation:0});else{if(x===2){var M=0;return s&&g?M=Math.PI/2:g&&c?M=Math.PI:c&&h&&(M=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:M})}if(x===1)return M=0,g?M=Math.PI/2:c?M=Math.PI:h&&(M=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,context:i,rotation:M})}else this._basicDot({x:e,y:r,size:n,context:i,rotation:0})},a.prototype._drawClassy=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0;s+c+g+h!==0?s||g?c||h?this._basicSquare({x:e,y:r,size:n,context:i,rotation:0}):this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:n,context:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2})},a.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.getNeighbor,s=o?+o(-1,0):0,c=o?+o(1,0):0,g=o?+o(0,-1):0,h=o?+o(0,1):0;s+c+g+h!==0?s||g?c||h?this._basicSquare({x:e,y:r,size:n,context:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:n,context:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,context:i,rotation:Math.PI/2})},a}(),Qt="square",Ht="extra-rounded";var Ot=function(){return(Ot=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const Ut=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case Qt:i=this._drawSquare;break;case Ht:i=this._drawExtraRounded;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,context:o,rotation:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI),r.arc(0,0,e/2-n,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.rect(-e/2,-e/2,e,e),r.rect(-e/2+n,-e/2+n,e-2*n,e-2*n)}}))},a.prototype._basicExtraRounded=function(t){var e=t.size,r=t.context,n=e/7;this._rotateFigure(Ot(Ot({},t),{draw:function(){r.arc(-n,-n,2.5*n,Math.PI,-Math.PI/2),r.lineTo(n,-3.5*n),r.arc(n,-n,2.5*n,-Math.PI/2,0),r.lineTo(3.5*n,-n),r.arc(n,n,2.5*n,0,Math.PI/2),r.lineTo(-n,3.5*n),r.arc(-n,n,2.5*n,Math.PI/2,Math.PI),r.lineTo(-3.5*n,-n),r.arc(-n,-n,1.5*n,Math.PI,-Math.PI/2),r.lineTo(n,-2.5*n),r.arc(n,-n,1.5*n,-Math.PI/2,0),r.lineTo(2.5*n,-n),r.arc(n,n,1.5*n,0,Math.PI/2),r.lineTo(-n,2.5*n),r.arc(-n,n,1.5*n,Math.PI/2,Math.PI),r.lineTo(-2.5*n,-n)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicDot({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicSquare({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicExtraRounded({x:e,y:r,size:n,context:i,rotation:o})},a}(),Vt="square";var Et=function(){return(Et=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const m=function(){function a(t){var e=t.context,r=t.type;this._context=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i,o=this._context;switch(this._type){case Vt:i=this._drawSquare;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,context:o,rotation:n})},a.prototype._rotateFigure=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation,s=o===void 0?0:o,c=t.draw,g=e+n/2,h=r+n/2;i.translate(g,h),s&&i.rotate(s),c(),i.closePath(),s&&i.rotate(-s),i.translate(-g,-h)},a.prototype._basicDot=function(t){var e=t.size,r=t.context;this._rotateFigure(Et(Et({},t),{draw:function(){r.arc(0,0,e/2,0,2*Math.PI)}}))},a.prototype._basicSquare=function(t){var e=t.size,r=t.context;this._rotateFigure(Et(Et({},t),{draw:function(){r.rect(-e/2,-e/2,e,e)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicDot({x:e,y:r,size:n,context:i,rotation:o})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.context,o=t.rotation;this._basicSquare({x:e,y:r,size:n,context:i,rotation:o})},a}(),y="radial";var v=[[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]],f=[[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 l=function(){function a(t){this._canvas=document.createElement("canvas"),this._canvas.width=t.width,this._canvas.height=t.height,this._options=t}return Object.defineProperty(a.prototype,"context",{get:function(){return this._canvas.getContext("2d")},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"width",{get:function(){return this._canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._canvas.height},enumerable:!1,configurable:!0}),a.prototype.getCanvas=function(){return this._canvas},a.prototype.clear=function(){var t=this.context;t&&t.clearRect(0,0,this._canvas.width,this._canvas.height)},a.prototype.drawQR=function(t){return e=this,r=void 0,i=function(){var o,s,c,g,h,x,M,A,E,H=this;return function(R,B){var I,k,S,V,q={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return V={next:et(0),throw:et(1),return:et(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function et(ot){return function(gt){return function(O){if(I)throw new TypeError("Generator is already executing.");for(;q;)try{if(I=1,k&&(S=2&O[0]?k.return:O[0]?k.throw||((S=k.return)&&S.call(k),0):k.next)&&!(S=S.call(k,O[1])).done)return S;switch(k=0,S&&(O=[2&O[0],S.value]),O[0]){case 0:case 1:S=O;break;case 4:return q.label++,{value:O[1],done:!1};case 5:q.label++,k=O[1],O=[0];continue;case 7:O=q.ops.pop(),q.trys.pop();continue;default:if(!((S=(S=q.trys).length>0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]<S[3])){q.label=O[1];break}if(O[0]===6&&q.label<S[1]){q.label=S[1],S=O;break}if(S&&q.label<S[2]){q.label=S[2],q.ops.push(O);break}S[2]&&q.ops.pop(),q.trys.pop();continue}O=B.call(R,q)}catch(ct){O=[6,ct],k=0}finally{I=S=0}if(5&O[0])throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}([ot,gt])}}}(this,function(R){switch(R.label){case 0:return o=t.getModuleCount(),s=Math.min(this._options.width,this._options.height)-2*this._options.margin,c=Math.floor(s/o),g={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(R.sent(),!this._image)return[2];h=this._options,x=h.imageOptions,M=h.qrOptions,A=x.imageSize*G[M.errorCorrectionLevel],E=Math.floor(A*o*o),g=vt({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:E,maxHiddenAxisDots:o-14,dotSize:c}),R.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots(function(B,I){var k,S,V,q,et,ot;return!(H._options.imageOptions.hideBackgroundDots&&B>=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&I>=(o-g.hideYDots)/2&&I<(o+g.hideYDots)/2||((k=v[B])===null||k===void 0?void 0:k[I])||((S=v[B-o+7])===null||S===void 0?void 0:S[I])||((V=v[B])===null||V===void 0?void 0:V[I-o+7])||((q=f[B])===null||q===void 0?void 0:q[I])||((et=f[B-o+7])===null||et===void 0?void 0:et[I])||((ot=f[B])===null||ot===void 0?void 0:ot[I-o+7]))}),this.drawCorners(),this._options.image&&this.drawImage({width:g.width,height:g.height,count:o,dotSize:c}),[2]}})},new((n=void 0)||(n=Promise))(function(o,s){function c(x){try{h(i.next(x))}catch(M){s(M)}}function g(x){try{h(i.throw(x))}catch(M){s(M)}}function h(x){var M;x.done?o(x.value):(M=x.value,M instanceof n?M:new n(function(A){A(M)})).then(c,g)}h((i=i.apply(e,r||[])).next())});var e,r,n,i},a.prototype.drawBackground=function(){var t=this.context,e=this._options;if(t){if(e.backgroundOptions.gradient){var r=e.backgroundOptions.gradient,n=this._createGradient({context:t,options:r,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});r.colorStops.forEach(function(i){var o=i.offset,s=i.color;n.addColorStop(o,s)}),t.fillStyle=n}else e.backgroundOptions.color&&(t.fillStyle=e.backgroundOptions.color);t.fillRect(0,0,this._canvas.width,this._canvas.height)}},a.prototype.drawDots=function(t){var e=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var n=this._options,i=this._qr.getModuleCount();if(i>n.width||i>n.height)throw"The canvas is too small.";var o=Math.min(n.width,n.height)-2*n.margin,s=Math.floor(o/i),c=Math.floor((n.width-i*s)/2),g=Math.floor((n.height-i*s)/2),h=new Ft({context:r,type:n.dotsOptions.type});r.beginPath();for(var x=function(R){for(var B=function(k){return t&&!t(R,k)?"continue":M._qr.isDark(R,k)?void h.draw(c+R*s,g+k*s,s,function(S,V){return!(R+S<0||k+V<0||R+S>=i||k+V>=i)&&!(t&&!t(R+S,k+V))&&!!e._qr&&e._qr.isDark(R+S,k+V)}):"continue"},I=0;I<i;I++)B(I)},M=this,A=0;A<i;A++)x(A);if(n.dotsOptions.gradient){var E=n.dotsOptions.gradient,H=this._createGradient({context:r,options:E,additionalRotation:0,x:c,y:g,size:i*s});E.colorStops.forEach(function(R){var B=R.offset,I=R.color;H.addColorStop(B,I)}),r.fillStyle=r.strokeStyle=H}else n.dotsOptions.color&&(r.fillStyle=r.strokeStyle=n.dotsOptions.color);r.fill("evenodd")},a.prototype.drawCorners=function(t){var e=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var n=this._options,i=this._qr.getModuleCount(),o=Math.min(n.width,n.height)-2*n.margin,s=Math.floor(o/i),c=7*s,g=3*s,h=Math.floor((n.width-i*s)/2),x=Math.floor((n.height-i*s)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(M){var A,E,H,R,B,I,k,S,V,q,et=M[0],ot=M[1],gt=M[2];if(!t||t(et,ot)){var O=h+et*s*(i-7),ct=x+ot*s*(i-7);if(!((A=n.cornersSquareOptions)===null||A===void 0)&&A.type){var qt=new Ut({context:r,type:(E=n.cornersSquareOptions)===null||E===void 0?void 0:E.type});r.beginPath(),qt.draw(O,ct,c,gt)}else{var xt=new Ft({context:r,type:n.dotsOptions.type});r.beginPath();for(var Pt=function(W){for(var St=function(lt){if(!(!((H=v[W])===null||H===void 0)&&H[lt]))return"continue";xt.draw(O+W*s,ct+lt*s,s,function(Nt,Lt){var dt;return!!(!((dt=v[W+Nt])===null||dt===void 0)&&dt[lt+Lt])})},at=0;at<v[W].length;at++)St(at)},Mt=0;Mt<v.length;Mt++)Pt(Mt)}if(!((R=n.cornersSquareOptions)===null||R===void 0)&&R.gradient){var yt=n.cornersSquareOptions.gradient,Gt=e._createGradient({context:r,options:yt,additionalRotation:gt,x:O,y:ct,size:c});yt.colorStops.forEach(function(W){var St=W.offset,at=W.color;Gt.addColorStop(St,at)}),r.fillStyle=r.strokeStyle=Gt}else!((B=n.cornersSquareOptions)===null||B===void 0)&&B.color&&(r.fillStyle=r.strokeStyle=n.cornersSquareOptions.color);if(r.fill("evenodd"),(I=n.cornersDotOptions)===null||I===void 0?void 0:I.type){var At=new m({context:r,type:(k=n.cornersDotOptions)===null||k===void 0?void 0:k.type});r.beginPath(),At.draw(O+2*s,ct+2*s,g,gt)}else{xt=new Ft({context:r,type:n.dotsOptions.type}),r.beginPath();var jt=function(W){for(var St=function(lt){if(!(!((S=f[W])===null||S===void 0)&&S[lt]))return"continue";xt.draw(O+W*s,ct+lt*s,s,function(Nt,Lt){var dt;return!!(!((dt=f[W+Nt])===null||dt===void 0)&&dt[lt+Lt])})},at=0;at<f[W].length;at++)St(at)};for(Mt=0;Mt<f.length;Mt++)jt(Mt)}if(!((V=n.cornersDotOptions)===null||V===void 0)&&V.gradient){yt=n.cornersDotOptions.gradient;var Xt=e._createGradient({context:r,options:yt,additionalRotation:gt,x:O+2*s,y:ct+2*s,size:g});yt.colorStops.forEach(function(W){var St=W.offset,at=W.color;Xt.addColorStop(St,at)}),r.fillStyle=r.strokeStyle=Xt}else!((q=n.cornersDotOptions)===null||q===void 0)&&q.color&&(r.fillStyle=r.strokeStyle=n.cornersDotOptions.color);r.fill("evenodd")}})},a.prototype.loadImage=function(){var t=this;return new Promise(function(e,r){var n=t._options,i=new Image;if(!n.image)return r("Image is not defined");typeof n.imageOptions.crossOrigin=="string"&&(i.crossOrigin=n.imageOptions.crossOrigin),t._image=i,i.onload=function(){e()},i.src=n.image})},a.prototype.drawImage=function(t){var e=t.width,r=t.height,n=t.count,i=t.dotSize,o=this.context;if(!o)throw"canvasContext is not defined";if(!this._image)throw"image is not defined";var s=this._options,c=Math.floor((s.width-n*i)/2),g=Math.floor((s.height-n*i)/2),h=c+s.imageOptions.margin+(n*i-e)/2,x=g+s.imageOptions.margin+(n*i-r)/2,M=e-2*s.imageOptions.margin,A=r-2*s.imageOptions.margin;o.drawImage(this._image,h,x,M<0?0:M,A<0?0:A)},a.prototype._createGradient=function(t){var e,r=t.context,n=t.options,i=t.additionalRotation,o=t.x,s=t.y,c=t.size;if(n.type===y)e=r.createRadialGradient(o+c/2,s+c/2,0,o+c/2,s+c/2,c/2);else{var g=((n.rotation||0)+i)%(2*Math.PI),h=(g+2*Math.PI)%(2*Math.PI),x=o+c/2,M=s+c/2,A=o+c/2,E=s+c/2;h>=0&&h<=.25*Math.PI||h>1.75*Math.PI&&h<=2*Math.PI?(x-=c/2,M-=c/2*Math.tan(g),A+=c/2,E+=c/2*Math.tan(g)):h>.25*Math.PI&&h<=.75*Math.PI?(M-=c/2,x-=c/2/Math.tan(g),E+=c/2,A+=c/2/Math.tan(g)):h>.75*Math.PI&&h<=1.25*Math.PI?(x+=c/2,M+=c/2*Math.tan(g),A-=c/2,E-=c/2*Math.tan(g)):h>1.25*Math.PI&&h<=1.75*Math.PI&&(M+=c/2,x+=c/2/Math.tan(g),E-=c/2,A-=c/2/Math.tan(g)),e=r.createLinearGradient(Math.round(x),Math.round(M),Math.round(A),Math.round(E))}return e},a}();var p=function(){return(p=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const P=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case wt:i=this._drawDot;break;case mt:i=this._drawClassy;break;case bt:i=this._drawClassyRounded;break;case It:i=this._drawRounded;break;case Tt:i=this._drawExtraRounded;break;case kt:default:i=this._drawSquare}i.call(this,{x:t,y:e,size:r,getNeighbor:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(i+r/2)),e._element.setAttribute("r",String(r/2))}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(i)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r))}}))},a.prototype._basicSideRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, 0 "+-r)}}))},a.prototype._basicCornerRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},a.prototype._basicCornerExtraRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"a "+r+" "+r+", 0, 0, 0, "+-r+" "+-r)}}))},a.prototype._basicCornersRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+i+"v "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+r/2+" "+r/2+"h "+r/2+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size;this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size;this._basicSquare({x:e,y:r,size:n,rotation:0})},a.prototype._drawRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0,h=o+s+c+g;if(h!==0)if(h>2||o&&s||c&&g)this._basicSquare({x:e,y:r,size:n,rotation:0});else{if(h===2){var x=0;return o&&c?x=Math.PI/2:c&&s?x=Math.PI:s&&g&&(x=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:n,rotation:x})}if(h===1)return x=0,c?x=Math.PI/2:s?x=Math.PI:g&&(x=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:x})}else this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0,h=o+s+c+g;if(h!==0)if(h>2||o&&s||c&&g)this._basicSquare({x:e,y:r,size:n,rotation:0});else{if(h===2){var x=0;return o&&c?x=Math.PI/2:c&&s?x=Math.PI:s&&g&&(x=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:x})}if(h===1)return x=0,c?x=Math.PI/2:s?x=Math.PI:g&&(x=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:x})}else this._basicDot({x:e,y:r,size:n,rotation:0})},a.prototype._drawClassy=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0;o+s+c+g!==0?o||c?s||g?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2})},a.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,c=i?+i(0,-1):0,g=i?+i(0,1):0;o+s+c+g!==0?o||c?s||g?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2})},a}();var C=function(){return(C=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const z=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case Qt:i=this._drawSquare;break;case Ht:i=this._drawExtraRounded;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,rotation:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+(n+r/2)+" "+i+"a "+r/2+" "+r/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(r/2-o)+" "+(r/2-o)+" 0 1 1 -0.1 0Z")}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+i+"v "+r+"h "+r+"v "+-r+"zM "+(n+o)+" "+(i+o)+"h "+(r-2*o)+"v "+(r-2*o)+"h "+(2*o-r)+"z")}}))},a.prototype._basicExtraRounded=function(t){var e=this,r=t.size,n=t.x,i=t.y,o=r/7;this._rotateFigure(C(C({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:i})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:i})},a.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicExtraRounded({x:e,y:r,size:n,rotation:i})},a}();var K=function(){return(K=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};const rt=function(){function a(t){var e=t.svg,r=t.type;this._svg=e,this._type=r}return a.prototype.draw=function(t,e,r,n){var i;switch(this._type){case Vt:i=this._drawSquare;break;case"dot":default:i=this._drawDot}i.call(this,{x:t,y:e,size:r,rotation:n})},a.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,i=t.size,o=t.rotation,s=o===void 0?0:o,c=r+i/2,g=n+i/2;(0,t.draw)(),(e=this._element)===null||e===void 0||e.setAttribute("transform","rotate("+180*s/Math.PI+","+c+","+g+")")},a.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(K(K({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(i+r/2)),e._element.setAttribute("r",String(r/2))}}))},a.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,i=t.y;this._rotateFigure(K(K({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(i)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r))}}))},a.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:i})},a.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,i=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:i})},a}();var $=[[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]],nt=[[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 ht=function(){function a(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(a.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),a.prototype.getElement=function(){return this._element},a.prototype.clear=function(){var t,e=this._element;this._element=e.cloneNode(!1),(t=e==null?void 0:e.parentNode)===null||t===void 0||t.replaceChild(this._element,e),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs)},a.prototype.drawQR=function(t){return e=this,r=void 0,i=function(){var o,s,c,g,h,x,M,A,E,H=this;return function(R,B){var I,k,S,V,q={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return V={next:et(0),throw:et(1),return:et(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function et(ot){return function(gt){return function(O){if(I)throw new TypeError("Generator is already executing.");for(;q;)try{if(I=1,k&&(S=2&O[0]?k.return:O[0]?k.throw||((S=k.return)&&S.call(k),0):k.next)&&!(S=S.call(k,O[1])).done)return S;switch(k=0,S&&(O=[2&O[0],S.value]),O[0]){case 0:case 1:S=O;break;case 4:return q.label++,{value:O[1],done:!1};case 5:q.label++,k=O[1],O=[0];continue;case 7:O=q.ops.pop(),q.trys.pop();continue;default:if(!((S=(S=q.trys).length>0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]<S[3])){q.label=O[1];break}if(O[0]===6&&q.label<S[1]){q.label=S[1],S=O;break}if(S&&q.label<S[2]){q.label=S[2],q.ops.push(O);break}S[2]&&q.ops.pop(),q.trys.pop();continue}O=B.call(R,q)}catch(ct){O=[6,ct],k=0}finally{I=S=0}if(5&O[0])throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}([ot,gt])}}}(this,function(R){switch(R.label){case 0:return o=t.getModuleCount(),s=Math.min(this._options.width,this._options.height)-2*this._options.margin,c=Math.floor(s/o),g={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(R.sent(),!this._image)return[2];h=this._options,x=h.imageOptions,M=h.qrOptions,A=x.imageSize*G[M.errorCorrectionLevel],E=Math.floor(A*o*o),g=vt({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:E,maxHiddenAxisDots:o-14,dotSize:c}),R.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots(function(B,I){var k,S,V,q,et,ot;return!(H._options.imageOptions.hideBackgroundDots&&B>=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&I>=(o-g.hideYDots)/2&&I<(o+g.hideYDots)/2||((k=$[B])===null||k===void 0?void 0:k[I])||((S=$[B-o+7])===null||S===void 0?void 0:S[I])||((V=$[B])===null||V===void 0?void 0:V[I-o+7])||((q=nt[B])===null||q===void 0?void 0:q[I])||((et=nt[B-o+7])===null||et===void 0?void 0:et[I])||((ot=nt[B])===null||ot===void 0?void 0:ot[I-o+7]))}),this.drawCorners(),this._options.image&&this.drawImage({width:g.width,height:g.height,count:o,dotSize:c}),[2]}})},new((n=void 0)||(n=Promise))(function(o,s){function c(x){try{h(i.next(x))}catch(M){s(M)}}function g(x){try{h(i.throw(x))}catch(M){s(M)}}function h(x){var M;x.done?o(x.value):(M=x.value,M instanceof n?M:new n(function(A){A(M)})).then(c,g)}h((i=i.apply(e,r||[])).next())});var e,r,n,i},a.prototype.drawBackground=function(){var t,e,r=this._element,n=this._options;if(r){var i=(t=n.backgroundOptions)===null||t===void 0?void 0:t.gradient,o=(e=n.backgroundOptions)===null||e===void 0?void 0:e.color;(i||o)&&this._createColor({options:i,color:o,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:"background-color"})}},a.prototype.drawDots=function(t){var e,r,n=this;if(!this._qr)throw"QR code is not defined";var i=this._options,o=this._qr.getModuleCount();if(o>i.width||o>i.height)throw"The canvas is too small.";var s=Math.min(i.width,i.height)-2*i.margin,c=Math.floor(s/o),g=Math.floor((i.width-o*c)/2),h=Math.floor((i.height-o*c)/2),x=new P({svg:this._element,type:i.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(e=i.dotsOptions)===null||e===void 0?void 0:e.gradient,color:i.dotsOptions.color,additionalRotation:0,x:g,y:h,height:o*c,width:o*c,name:"dot-color"});for(var M=function(H){for(var R=function(I){return t&&!t(H,I)?"continue":!((r=A._qr)===null||r===void 0)&&r.isDark(H,I)?(x.draw(g+H*c,h+I*c,c,function(k,S){return!(H+k<0||I+S<0||H+k>=o||I+S>=o)&&!(t&&!t(H+k,I+S))&&!!n._qr&&n._qr.isDark(H+k,I+S)}),void(x._element&&A._dotsClipPath&&A._dotsClipPath.appendChild(x._element))):"continue"},B=0;B<o;B++)R(B)},A=this,E=0;E<o;E++)M(E)},a.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var e=this._element,r=this._options;if(!e)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=Math.floor(i/n),s=7*o,c=3*o,g=Math.floor((r.width-n*o)/2),h=Math.floor((r.height-n*o)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(x){var M,A,E,H,R,B,I,k,S,V,q,et,ot=x[0],gt=x[1],O=x[2],ct=g+ot*o*(n-7),qt=h+gt*o*(n-7),xt=t._dotsClipPath,Pt=t._dotsClipPath;if((((M=r.cornersSquareOptions)===null||M===void 0?void 0:M.gradient)||((A=r.cornersSquareOptions)===null||A===void 0?void 0:A.color))&&((xt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+ot+"-"+gt),t._defs.appendChild(xt),t._cornersSquareClipPath=t._cornersDotClipPath=Pt=xt,t._createColor({options:(E=r.cornersSquareOptions)===null||E===void 0?void 0:E.gradient,color:(H=r.cornersSquareOptions)===null||H===void 0?void 0:H.color,additionalRotation:O,x:ct,y:qt,height:s,width:s,name:"corners-square-color-"+ot+"-"+gt})),(R=r.cornersSquareOptions)===null||R===void 0?void 0:R.type){var Mt=new z({svg:t._element,type:r.cornersSquareOptions.type});Mt.draw(ct,qt,s,O),Mt._element&&xt&&xt.appendChild(Mt._element)}else for(var yt=new P({svg:t._element,type:r.dotsOptions.type}),Gt=function(W){for(var St=function(lt){if(!(!((B=$[W])===null||B===void 0)&&B[lt]))return"continue";yt.draw(ct+W*o,qt+lt*o,o,function(Nt,Lt){var dt;return!!(!((dt=$[W+Nt])===null||dt===void 0)&&dt[lt+Lt])}),yt._element&&xt&&xt.appendChild(yt._element)},at=0;at<$[W].length;at++)St(at)},At=0;At<$.length;At++)Gt(At);if((((I=r.cornersDotOptions)===null||I===void 0?void 0:I.gradient)||((k=r.cornersDotOptions)===null||k===void 0?void 0:k.color))&&((Pt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+ot+"-"+gt),t._defs.appendChild(Pt),t._cornersDotClipPath=Pt,t._createColor({options:(S=r.cornersDotOptions)===null||S===void 0?void 0:S.gradient,color:(V=r.cornersDotOptions)===null||V===void 0?void 0:V.color,additionalRotation:O,x:ct+2*o,y:qt+2*o,height:c,width:c,name:"corners-dot-color-"+ot+"-"+gt})),(q=r.cornersDotOptions)===null||q===void 0?void 0:q.type){var jt=new rt({svg:t._element,type:r.cornersDotOptions.type});jt.draw(ct+2*o,qt+2*o,c,O),jt._element&&Pt&&Pt.appendChild(jt._element)}else{yt=new P({svg:t._element,type:r.dotsOptions.type});var Xt=function(W){for(var St=function(lt){if(!(!((et=nt[W])===null||et===void 0)&&et[lt]))return"continue";yt.draw(ct+W*o,qt+lt*o,o,function(Nt,Lt){var dt;return!!(!((dt=nt[W+Nt])===null||dt===void 0)&&dt[lt+Lt])}),yt._element&&Pt&&Pt.appendChild(yt._element)},at=0;at<nt[W].length;at++)St(at)};for(At=0;At<nt.length;At++)Xt(At)}})},a.prototype.loadImage=function(){var t=this;return new Promise(function(e,r){var n=t._options,i=new Image;if(!n.image)return r("Image is not defined");typeof n.imageOptions.crossOrigin=="string"&&(i.crossOrigin=n.imageOptions.crossOrigin),t._image=i,i.onload=function(){e()},i.src=n.image})},a.prototype.drawImage=function(t){var e=t.width,r=t.height,n=t.count,i=t.dotSize,o=this._options,s=Math.floor((o.width-n*i)/2),c=Math.floor((o.height-n*i)/2),g=s+o.imageOptions.margin+(n*i-e)/2,h=c+o.imageOptions.margin+(n*i-r)/2,x=e-2*o.imageOptions.margin,M=r-2*o.imageOptions.margin,A=document.createElementNS("http://www.w3.org/2000/svg","image");A.setAttribute("href",o.image||""),A.setAttribute("x",String(g)),A.setAttribute("y",String(h)),A.setAttribute("width",x+"px"),A.setAttribute("height",M+"px"),this._element.appendChild(A)},a.prototype._createColor=function(t){var e=t.options,r=t.color,n=t.additionalRotation,i=t.x,o=t.y,s=t.height,c=t.width,g=t.name,h=c>s?c:s,x=document.createElementNS("http://www.w3.org/2000/svg","rect");if(x.setAttribute("x",String(i)),x.setAttribute("y",String(o)),x.setAttribute("height",String(s)),x.setAttribute("width",String(c)),x.setAttribute("clip-path","url('#clip-path-"+g+"')"),e){var M;if(e.type===y)(M=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",g),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("fx",String(i+c/2)),M.setAttribute("fy",String(o+s/2)),M.setAttribute("cx",String(i+c/2)),M.setAttribute("cy",String(o+s/2)),M.setAttribute("r",String(h/2));else{var A=((e.rotation||0)+n)%(2*Math.PI),E=(A+2*Math.PI)%(2*Math.PI),H=i+c/2,R=o+s/2,B=i+c/2,I=o+s/2;E>=0&&E<=.25*Math.PI||E>1.75*Math.PI&&E<=2*Math.PI?(H-=c/2,R-=s/2*Math.tan(A),B+=c/2,I+=s/2*Math.tan(A)):E>.25*Math.PI&&E<=.75*Math.PI?(R-=s/2,H-=c/2/Math.tan(A),I+=s/2,B+=c/2/Math.tan(A)):E>.75*Math.PI&&E<=1.25*Math.PI?(H+=c/2,R+=s/2*Math.tan(A),B-=c/2,I-=s/2*Math.tan(A)):E>1.25*Math.PI&&E<=1.75*Math.PI&&(R+=s/2,H+=c/2/Math.tan(A),I-=s/2,B-=c/2/Math.tan(A)),(M=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",g),M.setAttribute("gradientUnits","userSpaceOnUse"),M.setAttribute("x1",String(Math.round(H))),M.setAttribute("y1",String(Math.round(R))),M.setAttribute("x2",String(Math.round(B))),M.setAttribute("y2",String(Math.round(I)))}e.colorStops.forEach(function(k){var S=k.offset,V=k.color,q=document.createElementNS("http://www.w3.org/2000/svg","stop");q.setAttribute("offset",100*S+"%"),q.setAttribute("stop-color",V),M.appendChild(q)}),x.setAttribute("fill","url('#"+g+"')"),this._defs.appendChild(M)}else r&&x.setAttribute("fill",r);this._element.appendChild(x)},a}(),ut="canvas";for(var zt={},Ct=0;Ct<=40;Ct++)zt[Ct]=Ct;const X={type:ut,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:zt[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 u=function(){return(u=Object.assign||function(a){for(var t,e=1,r=arguments.length;e<r;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(a[n]=t[n]);return a}).apply(this,arguments)};function w(a){var t=u({},a);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map(function(e){return u(u({},e),{offset:Number(e.offset)})}),t}function d(a){var t=u({},a);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=u(u({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=u({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=w(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=u({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=w(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=u({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=w(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=u({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=w(t.backgroundOptions.gradient))),t}var _=it(192),b=it.n(_),D=function(a,t,e,r){return new(e||(e=Promise))(function(n,i){function o(g){try{c(r.next(g))}catch(h){i(h)}}function s(g){try{c(r.throw(g))}catch(h){i(h)}}function c(g){var h;g.done?n(g.value):(h=g.value,h instanceof e?h:new e(function(x){x(h)})).then(o,s)}c((r=r.apply(a,t||[])).next())})},F=function(a,t){var e,r,n,i,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(g){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(n=2&h[0]?r.return:h[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,h[1])).done)return n;switch(r=0,n&&(h=[2&h[0],n.value]),h[0]){case 0:case 1:n=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){o.label=h[1];break}if(h[0]===6&&o.label<n[1]){o.label=n[1],n=h;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(h);break}n[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(a,o)}catch(x){h=[6,x],r=0}finally{e=n=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([c,g])}}};const L=function(){function a(t){this._options=t?d(_t(X,t)):X,this.update()}return a._clearContainer=function(t){t&&(t.innerHTML="")},a.prototype._getQRStylingElement=function(t){return t===void 0&&(t="png"),D(this,void 0,void 0,function(){var e,r,n;return F(this,function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return t.toLowerCase()!=="svg"?[3,2]:(r=void 0,e=void 0,this._svg&&this._svgDrawingPromise?(e=this._svg,r=this._svgDrawingPromise):(e=new ht(this._options),r=e.drawQR(this._qr)),[4,r]);case 1:return i.sent(),[2,e];case 2:return r=void 0,n=void 0,this._canvas&&this._canvasDrawingPromise?(n=this._canvas,r=this._canvasDrawingPromise):(n=new l(this._options),r=n.drawQR(this._qr)),[4,r];case 3:return i.sent(),[2,n]}})})},a.prototype.update=function(t){a._clearContainer(this._container),this._options=t?d(_t(this._options,t)):this._options,this._options.data&&(this._qr=b()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===ut?(this._canvas=new l(this._options),this._canvasDrawingPromise=this._canvas.drawQR(this._qr),this._svgDrawingPromise=void 0,this._svg=void 0):(this._svg=new ht(this._options),this._svgDrawingPromise=this._svg.drawQR(this._qr),this._canvasDrawingPromise=void 0,this._canvas=void 0),this.append(this._container))},a.prototype.append=function(t){if(t){if(typeof t.appendChild!="function")throw"Container should be a single DOM node";this._options.type===ut?this._canvas&&t.appendChild(this._canvas.getCanvas()):this._svg&&t.appendChild(this._svg.getElement()),this._container=t}},a.prototype.getRawData=function(t){return t===void 0&&(t="png"),D(this,void 0,void 0,function(){var e,r,n;return F(this,function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getQRStylingElement(t)];case 1:return e=i.sent(),t.toLowerCase()==="svg"?(r=new XMLSerializer,n=r.serializeToString(e.getElement()),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
4
+ `+n],{type:"image/svg+xml"})]):[2,new Promise(function(o){return e.getCanvas().toBlob(o,"image/"+t,1)})]}})})},a.prototype.download=function(t){return D(this,void 0,void 0,function(){var e,r,n,i,o;return F(this,function(s){switch(s.label){case 0:if(!this._qr)throw"QR code is empty";return e="png",r="qr",typeof t=="string"?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof t=="object"&&t!==null&&(t.name&&(r=t.name),t.extension&&(e=t.extension)),[4,this._getQRStylingElement(e)];case 1:return n=s.sent(),e.toLowerCase()==="svg"?(i=new XMLSerializer,o=`<?xml version="1.0" standalone="no"?>\r
5
+ `+(o=i.serializeToString(n.getElement())),pt("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),r+".svg")):pt(n.getCanvas().toDataURL("image/"+e),r+"."+e),[2]}})})},a}()}},U={};function Y(Z){if(U[Z])return U[Z].exports;var J=U[Z]={exports:{}};return j[Z](J,J.exports,Y),J.exports}return Y.n=Z=>{var J=Z&&Z.__esModule?()=>Z.default:()=>Z;return Y.d(J,{a:J}),J},Y.d=(Z,J)=>{for(var it in J)Y.o(J,it)&&!Y.o(Z,it)&&Object.defineProperty(Z,it,{enumerable:!0,get:J[it]})},Y.o=(Z,J)=>Object.prototype.hasOwnProperty.call(Z,J),Y(796)})().default})})($t);var ne=re($t.exports),fe="",oe=(N,T)=>{const j=N.__vccOpts||N;for(const[U,Y]of T)j[U]=Y;return j};const ie={class:"az-qrcode"},ae={class:"az-qrcode-left"},se={class:"az-qrcode-right"},ue={class:"az-qrcode-bottom"};var ce=oe(Q.defineComponent({__name:"View",props:{width:null,height:null,bgColor:null,dotsColor:null,value:null,outlineValue:null},setup(N){var Z,J,it,Dt;const T=N,j=Q.ref({width:T.width,height:T.height,type:"svg",data:T.value,qrOptions:{typeNumber:0,mode:"Byte",errorCorrectionLevel:"H"},backgroundOptions:{color:(Z=T.bgColor)!=null?Z:"white"},dotsOptions:{color:(J=T.dotsColor)!=null?J:"black",type:"square"},cornersSquareOptions:{color:(it=T.dotsColor)!=null?it:"black",type:"square"},cornersDotOptions:{color:(Dt=T.dotsColor)!=null?Dt:"black",type:"square"}}),U=new ne(j.value),Y=Q.ref();return Q.onMounted(()=>{U.append(Y.value)}),Q.watch(()=>T.value,Bt=>{j.value.data=Bt,U.update(j.value)}),(Bt,ft)=>(Q.openBlock(),Q.createElementBlock("div",ie,[Q.createElementVNode("div",null,Q.toDisplayString(N.outlineValue),1),Q.createElementVNode("div",{class:"az-qrcode-center",style:Q.normalizeStyle(`grid-template-columns: auto ${T.width}px auto;`)},[Q.createElementVNode("div",ae,Q.toDisplayString(N.outlineValue),1),Q.createElementVNode("div",null,[Q.createElementVNode("div",{ref_key:"qrCode",ref:Y},null,512)]),Q.createElementVNode("div",se,Q.toDisplayString(N.outlineValue),1)],4),Q.createElementVNode("div",ue,Q.toDisplayString(N.outlineValue),1)]))}}),[["__scopeId","data-v-da2a1ac4"]]);class he{constructor(T){Yt(this,"internalState");Yt(this,"listeners",[]);this.internalState=T}get state(){return this.internalState}changeState(T){this.internalState=T,this.listeners.length>0&&this.listeners.forEach(j=>j(this.state))}subscribe(T){this.listeners.push(T)}unsubscribe(T){const j=this.listeners.indexOf(T);j>-1&&this.listeners.splice(j,1)}}tt.Bloc=he,tt.QRCode=ce,tt.dateToString=Wt,tt.onPictureUpdated=Zt,tt.pad=ee,tt.parseToInt=te,tt.readBlobFromUrl=Kt,tt.useBlocState=Rt,Object.defineProperties(tt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agendize/vue-tools",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Agendize tools",
5
5
  "private": false,
6
6
  "keywords": [