diff --git a/packages/examples/static/index.html b/packages/examples/static/index.html index 427b90f7..cad03909 100644 --- a/packages/examples/static/index.html +++ b/packages/examples/static/index.html @@ -1 +1 @@ -二维码
\ No newline at end of file +二维码
\ No newline at end of file diff --git a/packages/examples/static/public/js/74b68919d98b4113.js b/packages/examples/static/public/js/f8a083a23fa2b5dd.js similarity index 98% rename from packages/examples/static/public/js/74b68919d98b4113.js rename to packages/examples/static/public/js/f8a083a23fa2b5dd.js index 7da39821..6713410a 100644 --- a/packages/examples/static/public/js/74b68919d98b4113.js +++ b/packages/examples/static/public/js/f8a083a23fa2b5dd.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,u,i,f={},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return f[e](n,n.exports,c),n.exports}c.m=f,e=[],c.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(c.O).every(function(e){return c.O[e](n[a])})?n.splice(a--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(c.O).every(function(e){return c.O[e](n[a])})?n.splice(a--,1):(f=!1,o * @description A pure JavaScript QRCode encode and decode library. * @see https://github.com/nuintun/qrcode#readme - */class O{#c;#h;#u;#f;#g;constructor(e,...t){let n=0,r=0;for(let{count:e,numDataCodewords:w}of t)n+=e,r+=w*e;let w=e*n;this.#c=t,this.#u=w,this.#f=r,this.#g=e,this.#h=r+w}get ecBlocks(){return this.#c}get numTotalCodewords(){return this.#h}get numTotalECCodewords(){return this.#u}get numTotalDataCodewords(){return this.#f}get numECCodewordsPerBlock(){return this.#g}}class k{#d;#p;#c;#b;constructor(e,t,...n){this.#p=e,this.#c=n,this.#d=17+4*e,this.#b=t}get size(){return this.#d}get version(){return this.#p}get alignmentPatterns(){return this.#b}getECBlocks(e){let{level:t}=e;return this.#c[t]}}let N=[new k(1,[],new O(7,new z(1,19)),new O(10,new z(1,16)),new O(13,new z(1,13)),new O(17,new z(1,9))),new k(2,[6,18],new O(10,new z(1,34)),new O(16,new z(1,28)),new O(22,new z(1,22)),new O(28,new z(1,16))),new k(3,[6,22],new O(15,new z(1,55)),new O(26,new z(1,44)),new O(18,new z(2,17)),new O(22,new z(2,13))),new k(4,[6,26],new O(20,new z(1,80)),new O(18,new z(2,32)),new O(26,new z(2,24)),new O(16,new z(4,9))),new k(5,[6,30],new O(26,new z(1,108)),new O(24,new z(2,43)),new O(18,new z(2,15),new z(2,16)),new O(22,new z(2,11),new z(2,12))),new k(6,[6,34],new O(18,new z(2,68)),new O(16,new z(4,27)),new O(24,new z(4,19)),new O(28,new z(4,15))),new k(7,[6,22,38],new O(20,new z(2,78)),new O(18,new z(4,31)),new O(18,new z(2,14),new z(4,15)),new O(26,new z(4,13),new z(1,14))),new k(8,[6,24,42],new O(24,new z(2,97)),new O(22,new z(2,38),new z(2,39)),new O(22,new z(4,18),new z(2,19)),new O(26,new z(4,14),new z(2,15))),new k(9,[6,26,46],new O(30,new z(2,116)),new O(22,new z(3,36),new z(2,37)),new O(20,new z(4,16),new z(4,17)),new O(24,new z(4,12),new z(4,13))),new k(10,[6,28,50],new O(18,new z(2,68),new z(2,69)),new O(26,new z(4,43),new z(1,44)),new O(24,new z(6,19),new z(2,20)),new O(28,new z(6,15),new z(2,16))),new k(11,[6,30,54],new O(20,new z(4,81)),new O(30,new z(1,50),new z(4,51)),new O(28,new z(4,22),new z(4,23)),new O(24,new z(3,12),new z(8,13))),new k(12,[6,32,58],new O(24,new z(2,92),new z(2,93)),new O(22,new z(6,36),new z(2,37)),new O(26,new z(4,20),new z(6,21)),new O(28,new z(7,14),new z(4,15))),new k(13,[6,34,62],new O(26,new z(4,107)),new O(22,new z(8,37),new z(1,38)),new O(24,new z(8,20),new z(4,21)),new O(22,new z(12,11),new z(4,12))),new k(14,[6,26,46,66],new O(30,new z(3,115),new z(1,116)),new O(24,new z(4,40),new z(5,41)),new O(20,new z(11,16),new z(5,17)),new O(24,new z(11,12),new z(5,13))),new k(15,[6,26,48,70],new O(22,new z(5,87),new z(1,88)),new O(24,new z(5,41),new z(5,42)),new O(30,new z(5,24),new z(7,25)),new O(24,new z(11,12),new z(7,13))),new k(16,[6,26,50,74],new O(24,new z(5,98),new z(1,99)),new O(28,new z(7,45),new z(3,46)),new O(24,new z(15,19),new z(2,20)),new O(30,new z(3,15),new z(13,16))),new k(17,[6,30,54,78],new O(28,new z(1,107),new z(5,108)),new O(28,new z(10,46),new z(1,47)),new O(28,new z(1,22),new z(15,23)),new O(28,new z(2,14),new z(17,15))),new k(18,[6,30,56,82],new O(30,new z(5,120),new z(1,121)),new O(26,new z(9,43),new z(4,44)),new O(28,new z(17,22),new z(1,23)),new O(28,new z(2,14),new z(19,15))),new k(19,[6,30,58,86],new O(28,new z(3,113),new z(4,114)),new O(26,new z(3,44),new z(11,45)),new O(26,new z(17,21),new z(4,22)),new O(26,new z(9,13),new z(16,14))),new k(20,[6,34,62,90],new O(28,new z(3,107),new z(5,108)),new O(26,new z(3,41),new z(13,42)),new O(30,new z(15,24),new z(5,25)),new O(28,new z(15,15),new z(10,16))),new k(21,[6,28,50,72,94],new O(28,new z(4,116),new z(4,117)),new O(26,new z(17,42)),new O(28,new z(17,22),new z(6,23)),new O(30,new z(19,16),new z(6,17))),new k(22,[6,26,50,74,98],new O(28,new z(2,111),new z(7,112)),new O(28,new z(17,46)),new O(30,new z(7,24),new z(16,25)),new O(24,new z(34,13))),new k(23,[6,30,54,78,102],new O(30,new z(4,121),new z(5,122)),new O(28,new z(4,47),new z(14,48)),new O(30,new z(11,24),new z(14,25)),new O(30,new z(16,15),new z(14,16))),new k(24,[6,28,54,80,106],new O(30,new z(6,117),new z(4,118)),new O(28,new z(6,45),new z(14,46)),new O(30,new z(11,24),new z(16,25)),new O(30,new z(30,16),new z(2,17))),new k(25,[6,32,58,84,110],new O(26,new z(8,106),new z(4,107)),new O(28,new z(8,47),new z(13,48)),new O(30,new z(7,24),new z(22,25)),new O(30,new z(22,15),new z(13,16))),new k(26,[6,30,58,86,114],new O(28,new z(10,114),new z(2,115)),new O(28,new z(19,46),new z(4,47)),new O(28,new z(28,22),new z(6,23)),new O(30,new z(33,16),new z(4,17))),new k(27,[6,34,62,90,118],new O(30,new z(8,122),new z(4,123)),new O(28,new z(22,45),new z(3,46)),new O(30,new z(8,23),new z(26,24)),new O(30,new z(12,15),new z(28,16))),new k(28,[6,26,50,74,98,122],new O(30,new z(3,117),new z(10,118)),new O(28,new z(3,45),new z(23,46)),new O(30,new z(4,24),new z(31,25)),new O(30,new z(11,15),new z(31,16))),new k(29,[6,30,54,78,102,126],new O(30,new z(7,116),new z(7,117)),new O(28,new z(21,45),new z(7,46)),new O(30,new z(1,23),new z(37,24)),new O(30,new z(19,15),new z(26,16))),new k(30,[6,26,52,78,104,130],new O(30,new z(5,115),new z(10,116)),new O(28,new z(19,47),new z(10,48)),new O(30,new z(15,24),new z(25,25)),new O(30,new z(23,15),new z(25,16))),new k(31,[6,30,56,82,108,134],new O(30,new z(13,115),new z(3,116)),new O(28,new z(2,46),new z(29,47)),new O(30,new z(42,24),new z(1,25)),new O(30,new z(23,15),new z(28,16))),new k(32,[6,34,60,86,112,138],new O(30,new z(17,115)),new O(28,new z(10,46),new z(23,47)),new O(30,new z(10,24),new z(35,25)),new O(30,new z(19,15),new z(35,16))),new k(33,[6,30,58,86,114,142],new O(30,new z(17,115),new z(1,116)),new O(28,new z(14,46),new z(21,47)),new O(30,new z(29,24),new z(19,25)),new O(30,new z(11,15),new z(46,16))),new k(34,[6,34,62,90,118,146],new O(30,new z(13,115),new z(6,116)),new O(28,new z(14,46),new z(23,47)),new O(30,new z(44,24),new z(7,25)),new O(30,new z(59,16),new z(1,17))),new k(35,[6,30,54,78,102,126,150],new O(30,new z(12,121),new z(7,122)),new O(28,new z(12,47),new z(26,48)),new O(30,new z(39,24),new z(14,25)),new O(30,new z(22,15),new z(41,16))),new k(36,[6,24,50,76,102,128,154],new O(30,new z(6,121),new z(14,122)),new O(28,new z(6,47),new z(34,48)),new O(30,new z(46,24),new z(10,25)),new O(30,new z(2,15),new z(64,16))),new k(37,[6,28,54,80,106,132,158],new O(30,new z(17,122),new z(4,123)),new O(28,new z(29,46),new z(14,47)),new O(30,new z(49,24),new z(10,25)),new O(30,new z(24,15),new z(46,16))),new k(38,[6,32,58,84,110,136,162],new O(30,new z(4,122),new z(18,123)),new O(28,new z(13,46),new z(32,47)),new O(30,new z(48,24),new z(14,25)),new O(30,new z(42,15),new z(32,16))),new k(39,[6,26,54,82,110,138,166],new O(30,new z(20,117),new z(4,118)),new O(28,new z(40,47),new z(7,48)),new O(30,new z(43,24),new z(22,25)),new O(30,new z(10,15),new z(67,16))),new k(40,[6,30,58,86,114,142,170],new O(30,new z(19,118),new z(6,119)),new O(28,new z(18,47),new z(31,48)),new O(30,new z(34,24),new z(34,25)),new O(30,new z(20,15),new z(61,16)))],D=[[8,0],[8,1],[8,2],[8,3],[8,4],[8,5],[8,7],[8,8],[7,8],[5,8],[4,8],[3,8],[2,8],[1,8],[0,8]],x=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,1,1,1,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],P=[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]];function U(e,t,n){return -1===e.get(t,n)}function L(e,t,n){for(let r=0;r<7;r++){let w=x[r];for(let i=0;i<7;i++)e.set(t+i,n+r,w[i])}}function R(e,t,n){for(let r=0;r<8;r++)e.set(t+r,n,0)}function $(e,t,n){for(let r=0;r<7;r++)e.set(t,n+r,0)}function Z(e,t,n,w,s){e.clear(-1),function(e){let{size:t}=e;L(e,0,0),L(e,t-7,0),L(e,0,t-7),R(e,0,7),R(e,t-8,7),R(e,0,t-8),$(e,7,0),$(e,t-7-1,0),$(e,7,t-7)}(e),function(e){e.set(8,e.size-8,1)}(e),function(e,t){let{version:n}=t;if(n>=2){let{alignmentPatterns:t}=N[n-1],{length:r}=t;for(let n=0;n=7){let t=new i;!function(e,t){e.append(t,6);let n=r(t,7973);e.append(n,12)}(t,n);let w=17,{size:s}=e;for(let n=0;n<6;n++)for(let r=0;r<3;r++){let i=t.get(w--);e.set(n,s-11+r,i),e.set(s-11+r,n,i)}}}(e,n),function(e,t,n){let r=0,{size:w}=e,{length:i}=t;for(let s=w-1;s>=1;s-=2){6===s&&(s=5);for(let o=0;o=2){let{alignmentPatterns:t}=N[n-1],{length:r}=t;for(let n=0;n=7){let t=new i;!function(e,t){e.append(t,6);let n=r(t,7973);e.append(n,12)}(t,n);let w=17,{size:s}=e;for(let n=0;n<6;n++)for(let r=0;r<3;r++){let i=t.get(w--);e.set(n,s-11+r,i),e.set(s-11+r,n,i)}}}(e,n),function(e,t,n){let r=0,{size:w}=e,{length:i}=t;for(let s=w-1;s>=1;s-=2){6===s&&(s=5);for(let o=0;o