/**
* Skipped minification because the original files appears to be already minified.
* Original file: /npm/webcomponent-qr-code@1.2.0/dist/index.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){var n,o,i;o=[],void 0===(i="function"==typeof(n=function(){for(var t=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],e=/^\d*$/,r=/^[A-Za-z0-9 $%*+\-./:]*$/,n=/^[A-Z0-9 $%*+\-./:]*$/,o=[],i=[-1],a=0,u=1;a<255;++a)o.push(u),i[u]=a,u=2*u^(u>=128?285:0);var f=[[]];for(a=0;a<30;++a){for(var c=f[a],s=[],l=0;l<=a;++l){var h=l6},y=function(e,r){var n=-8&function(e){var r=t[e],n=16*e*e+128*e+64;return g(e)&&(n-=36),r[2].length&&(n-=25*r[2].length*r[2].length-10*r[2].length-55),n}(e),o=t[e];return n-=8*o[0][r]*o[1][r]},b=function(t,e){switch(e){case 1:return t<10?10:t<27?12:14;case 2:return t<10?9:t<27?11:13;case 4:return t<10?8:16;case 8:return t<10?8:t<27?10:12}},m=function(t,e,r){var n=y(t,r)-4-b(t,e);switch(e){case 1:return 3*(n/10|0)+(n%10<4?0:n%10<7?1:2);case 2:return 2*(n/11|0)+(n%11<6?0:1);case 4:return n/8|0;case 8:return n/13|0}},w=function(t,e){for(var r=t.slice(0),n=t.length,a=e.length,u=0;u=0)for(var c=0;c=0;--i)o>>n+i&1&&(o^=r<>a&1}return t},j=function(t){for(var e=function(t){for(var e=0,r=0;r=5&&(e+=t[r]-5+3);for(r=5;r=4*n||t[r+1]>=4*n)&&(e+=40)}return e},r=t.length,n=0,o=0,i=0;i=a){for(o.push(i|t>>(e-=a));e>=8;)o.push(t>>(e-=8)&255);i=0,a=8}e>0&&(i|=(t&(1<>3);u=function(t,e,r){for(var n=[],o=t.length/e|0,i=0,a=e-t.length%e,u=0;u>f&1,i[t+u][e+f]=1};for(u(0,0,9,9,[127,65,93,93,93,65,383,0,64]),u(n-8,0,8,9,[256,127,65,93,93,93,65,127]),u(0,n-8,9,8,[254,130,186,186,186,130,254,0,0]),a=9;a>p++&1,i[a][n-11+l]=i[n-11+l][a]=1}return{matrix:o,reserved:i}}(r),s=c.matrix,l=c.reserved;if(function(t,e,r){for(var n=t.length,o=0,i=-1,a=n-1;a>=0;a-=2){6==a&&--a;for(var u=i<0?n-1:0,f=0;fa-2;--c)e[u][c]||(t[u][c]=r[o>>3]>>(7&~o)&1,++o);u+=i}i=-i}}(s,l,u),i<0){O(s,l,0),P(s,0,o,0);var h=0,p=j(s);for(O(s,l,0),i=1;i<8;++i){O(s,l,i),P(s,0,o,i);var v=j(s);p>v&&(p=v,h=i),O(s,l,i)}i=h}return O(s,l,i),P(s,0,o,i),s},M={generate:function(t,o){var i={numeric:1,alphanumeric:2,octet:4},a={L:1,M:0,Q:3,H:2},u=(o=o||{}).version||-1,f=a[(o.ecclevel||"L").toUpperCase()],c=o.mode?i[o.mode.toLowerCase()]:-1,s="mask"in o?o.mask:-1;if(c<0)c="string"==typeof t?t.match(e)?1:t.match(n)?2:4:4;else if(1!=c&&2!=c&&4!=c)throw"invalid or unsupported mode";if(null===(t=function(t,n){switch(t){case 1:return n.match(e)?n:null;case 2:return n.match(r)?n.toUpperCase():null;case 4:if("string"==typeof n){for(var o=[],i=0;i>6,128|63&a):a<65536?o.push(224|a>>12,128|a>>6&63,128|63&a):o.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|63&a)}return o}return n}}(c,t)))throw"invalid data format";if(f<0||f>3)throw"invalid ECC level";if(u<0){for(u=1;u<=40&&!(t.length<=m(u,c,f));++u);if(u>40)throw"too large data"}else if(u<1||u>40)throw"invalid version";if(-1!=s&&(s<0||s>8))throw"invalid mask";return S(t,u,c,f,s)},generateHTML:function(t,e){e=e||{};for(var r=M.generate(t,e),n=Math.max(e.modulesize||5,.5),o=e.unit||"px",i=e.ratio||1,a=Math.max(null!==e.margin?e.margin:4,0),u=document.createElement("div"),f=r.length,c=[''],s=0;s");for(var l=0;l')}c.push("")}return u.className="qrcode",u.innerHTML=c.join("")+"
",u},generateSVG:function(t,e){e=e||{};var r=M.generate(t,e),n=r.length,o=Math.max(e.modulesize||5,.5),i=Math.max(null!==e.margin?e.margin:4,0),a=o*(n+2*i),u=' class= "fg" width="'+o+'" height="'+o+'"/>',f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("viewBox","0 0 "+a+" "+a),f.setAttribute("style","shape-rendering:crispEdges"),e.modulesize&&(f.setAttribute("width",a),f.setAttribute("height",a));for(var c=["",''],s=i*o,l=0;l