import{g as Yt}from"./_commonjsHelpers-Cpj98o6Y.js";function $t(kt,Gt){for(var Dt=0;Dtft[it]})}}}return Object.freeze(Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"}))}var Xt={exports:{}};(function(kt,Gt){(function(Dt,ft){kt.exports=ft()})(self,function(){return(()=>{var Dt={192:(Y,V)=>{var dt,qt,Nt=function(){var st=function(m,y){var v=m,f=Ct[y],d=null,p=0,P=null,C=[],z={},X=function(u,w){d=function(l){for(var _=new Array(l),b=0;b=7&&rt(u),P==null&&(P=mt(v,f,C)),Mt(P,w)},$=function(u,w){for(var l=-1;l<=7;l+=1)if(!(u+l<=-1||p<=u+l))for(var _=-1;_<=7;_+=1)w+_<=-1||p<=w+_||(d[u+l][w+_]=0<=l&&l<=6&&(_==0||_==6)||0<=_&&_<=6&&(l==0||l==6)||2<=l&&l<=4&&2<=_&&_<=4)},H=function(){for(var u=8;u>l&1)==1;d[Math.floor(l/3)][l%3+p-8-3]=_}for(l=0;l<18;l+=1)_=!u&&(w>>l&1)==1,d[l%3+p-8-3][Math.floor(l/3)]=_},tt=function(u,w){for(var l=f<<3|w,_=pt.getBCHTypeInfo(l),b=0;b<15;b+=1){var I=!u&&(_>>b&1)==1;b<6?d[b][8]=I:b<8?d[b+1][8]=I:d[p-15+b][8]=I}for(b=0;b<15;b+=1)I=!u&&(_>>b&1)==1,b<8?d[8][p-b-1]=I:b<9?d[8][15-b-1+1]=I:d[8][15-b-1]=I;d[p-8][8]=!u},Mt=function(u,w){for(var l=-1,_=p-1,b=7,I=0,L=pt.getMaskFunction(w),N=p-1;N>0;N-=2)for(N==6&&(N-=1);;){for(var a=0;a<2;a+=1)if(d[_][N-a]==null){var t=!1;I>>b&1)==1),L(_,N-a)&&(t=!t),d[_][N-a]=t,(b-=1)==-1&&(I+=1,b=7)}if((_+=l)<0||p<=_){_-=l,l=-l;break}}},mt=function(u,w,l){for(var _=Rt.getRSBlocks(u,w),b=K(),I=0;I8*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=0?M.getAt(A):0}}var E=0;for(h=0;ht)&&(L=t,N=a)}return N}())},z.createTableTag=function(u,w){u=u||2;var l="";l+='";for(var b=0;b';l+=""}return(l+="")+"
"},z.createSvgTag=function(u,w,l,_){var b={};typeof arguments[0]=="object"&&(u=(b=arguments[0]).cellSize,w=b.margin,l=b.alt,_=b.title),u=u||2,w=w===void 0?4*u:w,(l=typeof l=="string"?{text:l}:l||{}).text=l.text||null,l.id=l.text?l.id||"qrcode-description":null,(_=typeof _=="string"?{text:_}:_||{}).text=_.text||null,_.id=_.text?_.id||"qrcode-title":null;var I,L,N,a,t=z.getModuleCount()*u+2*w,e="";for(a="l"+u+",0 0,"+u+" -"+u+",0 0,-"+u+"z ",e+=''+Q(_.text)+"":"",e+=l.text?''+Q(l.text)+"":"",e+='',e+='"},z.createDataURL=function(u,w){u=u||2,w=w===void 0?4*u:w;var l=z.getModuleCount()*u+2*w,_=w,b=l-w;return zt(l,l,function(I,L){if(_<=I&&I"};var Q=function(u){for(var w="",l=0;l":w+=">";break;case"&":w+="&";break;case'"':w+=""";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={"██":"█","█ ":"▀"," █":"▄"," ":" "},T={"██":"▀","█ ":"▀"," █":" "," ":" "},R="";for(o=0;o=A?T[h]:E[h];R+=` `}return x%2&&i>0?R.substring(0,R.length-x-1)+Array(x+1).join("▀"):R.substring(0,R.length-1)}(w);u-=1,w=w===void 0?2*u:w;var l,_,b,I,L=z.getModuleCount()*u+2*w,N=w,a=L-w,t=Array(u+1).join("██"),e=Array(u+1).join(" "),r="",n="";for(l=0;l>>8),p.push(255&z)):p.push(f)}}return p}};var gt,ut,ct,j,lt,Ct={L:1,M:0,Q:3,H:2},pt=(gt=[[],[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]],ut=1335,ct=7973,lt=function(m){for(var y=0;m!=0;)y+=1,m>>>=1;return y},(j={}).getBCHTypeInfo=function(m){for(var y=m<<10;lt(y)-lt(ut)>=0;)y^=ut<=0;)y^=ct<5&&(v+=3+p-5)}for(f=0;f=256;)f-=255;return m[f]}}}();function Pt(m,y){if(m.length===void 0)throw m.length+"/"+y;var v=function(){for(var d=0;d>>7-f%8&1)==1},put:function(f,d){for(var p=0;p>>d-p-1&1)==1)},getLengthInBits:function(){return y},putBit:function(f){var d=Math.floor(y/8);m.length<=d&&m.push(0),f&&(m[d]|=128>>>y%8),y+=1}};return v},Bt=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>>8&255)+(255&P),f.put(P,13),p+=2}if(p>>8)},writeBytes:function(v,f,d){f=f||0,d=d||v.length;for(var p=0;p0&&(v+=","),v+=m[f];return v+"]"}};return y},jt=function(m){var y=m,v=0,f=0,d=0,p={read:function(){for(;d<8;){if(v>=y.length){if(d==0)return-1;throw"unexpected end of file./"+d}var C=y.charAt(v);if(v+=1,C=="=")return d=0,-1;C.match(/^\s$/)||(f=f<<6|P(C.charCodeAt(0)),d+=6)}var z=f>>>d-8&255;return d-=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},zt=function(m,y,v){for(var f=function($,H){var W=$,rt=H,tt=new Array($*H),Mt={setPixel:function(u,w,l){tt[w*W+u]=l},write:function(u){u.writeString("GIF87a"),u.writeShort(W),u.writeShort(rt),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(W),u.writeShort(rt),u.writeByte(0);var w=mt(2);u.writeByte(2);for(var l=0;w.length-l>255;)u.writeByte(255),u.writeBytes(w,l,255),l+=255;u.writeByte(w.length-l),u.writeBytes(w,l,w.length-l),u.writeByte(0),u.writeString(";")}},mt=function(u){for(var w=1<>>s)throw"length over";for(;N+s>=8;)L.writeByte(255&(o<>>=8-N,a=0,N=0;a|=o<0&&L.writeByte(a)}});e.write(w,_);var r=0,n=String.fromCharCode(tt[r]);for(r+=1;r=6;)Mt($>>>H-6),H-=6},tt.flush=function(){if(H>0&&(Mt($<<6-H),$=0,H=0),W%3!=0)for(var Q=3-W%3,u=0;u>6,128|63&j):j<55296||j>=57344?ut.push(224|j>>12,128|j>>6&63,128|63&j):(ct++,j=65536+((1023&j)<<10|1023>.charCodeAt(ct)),ut.push(240|j>>18,128|j>>12&63,128|j>>6&63,128|63&j))}return ut}(st)},(qt=typeof(dt=function(){return Nt})=="function"?dt.apply(V,[]):dt)===void 0||(Y.exports=qt)},796:(Y,V,dt)=>{dt.d(V,{default:()=>N});var qt=function(){return(qt=Object.assign||function(a){for(var t,e=1,r=arguments.length;er||n&&n2||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}(),Lt="square",Tt="extra-rounded";var xt=function(){return(xt=Object.assign||function(a){for(var t,e=1,r=arguments.length;e0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&D>=(o-g.hideYDots)/2&&D<(o+g.hideYDots)/2||!((k=v[B])===null||k===void 0)&&k[D]||!((S=v[B-o+7])===null||S===void 0)&&S[D]||!((F=v[B])===null||F===void 0)&&F[D-o+7]||!((q=f[B])===null||q===void 0)&&q[D]||!((U=f[B-o+7])===null||U===void 0)&&U[D]||!((Z=f[B])===null||Z===void 0)&&Z[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 Bt({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,F){return!(R+S<0||k+F<0||R+S>=i||k+F>=i)&&!(t&&!t(R+S,k+F))&&!!e._qr&&e._qr.isDark(R+S,k+F)}):"continue"},D=0;D=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;e2||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;e0&&S[S.length-1])||O[0]!==6&&O[0]!==2)){q=0;continue}if(O[0]===3&&(!S||O[1]>S[0]&&O[1]=(o-g.hideXDots)/2&&B<(o+g.hideXDots)/2&&D>=(o-g.hideYDots)/2&&D<(o+g.hideYDots)/2||!((k=H[B])===null||k===void 0)&&k[D]||!((S=H[B-o+7])===null||S===void 0)&&S[D]||!((F=H[B])===null||F===void 0)&&F[D-o+7]||!((q=W[B])===null||q===void 0)&&q[D]||!((U=W[B-o+7])===null||U===void 0)&&U[D]||!((Z=W[B])===null||Z===void 0)&&Z[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(T){for(var R=function(D){return t&&!t(T,D)?"continue":!((r=A._qr)===null||r===void 0)&&r.isDark(T,D)?(x.draw(g+T*c,h+D*c,c,function(k,S){return!(T+k<0||D+S<0||T+k>=o||D+S>=o)&&!(t&&!t(T+k,D+S))&&!!n._qr&&n._qr.isDark(T+k,D+S)}),void(x._element&&A._dotsClipPath&&A._dotsClipPath.appendChild(x._element))):"continue"},B=0;Bs?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),T=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?(T-=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,T-=c/2/Math.tan(A),D+=s/2,B+=c/2/Math.tan(A)):E>.75*Math.PI&&E<=1.25*Math.PI?(T+=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,T+=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(T))),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(k){var S=k.offset,F=k.color,q=document.createElementNS("http://www.w3.org/2000/svg","stop");q.setAttribute("offset",100*S+"%"),q.setAttribute("stop-color",F),M.appendChild(q)}),x.setAttribute("fill","url('#"+g+"')"),this._defs.appendChild(M)}else r&&x.setAttribute("fill",r);this._element.appendChild(x)},a}(),tt="canvas";for(var Mt={},mt=0;mt<=40;mt++)Mt[mt]=mt;const Q={type:tt,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Mt[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;eMath.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 _=dt(192),b=dt.n(_),I=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,[])).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]\r `+n],{type:"image/svg+xml"})]):[2,new Promise(function(o){return e.getCanvas().toBlob(o,"image/"+t,1)})]}})})},a.prototype.download=function(t){return I(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=`\r `+(o=i.serializeToString(n.getElement())),ut("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),r+".svg")):ut(n.getCanvas().toDataURL("image/"+e),r+"."+e),[2]}})})},a}()}},ft={};function it(Y){if(ft[Y])return ft[Y].exports;var V=ft[Y]={exports:{}};return Dt[Y](V,V.exports,it),V.exports}return it.n=Y=>{var V=Y&&Y.__esModule?()=>Y.default:()=>Y;return it.d(V,{a:V}),V},it.d=(Y,V)=>{for(var dt in V)it.o(V,dt)&&!it.o(Y,dt)&&Object.defineProperty(Y,dt,{enumerable:!0,get:V[dt]})},it.o=(Y,V)=>Object.prototype.hasOwnProperty.call(Y,V),it(796)})().default})})(Xt);var Ut=Xt.exports;const Wt=Yt(Ut),Jt=$t({__proto__:null,default:Wt},[Ut]);export{Jt as q}; //# sourceMappingURL=qr-code-styling-CvBVNv73.js.map