1import{Bb as Ft,Cb as kt,Db as zt,Fa as Dt,Ja as _t,Lb as Ht,Y as at,ha as Ut,ib as vt,kd as Vt,la as xt}from"./chunk-CXBPM7YT.js";import{e as h,g as Ke}from"./chunk-IM5V7DCU.js";var Kt=h((zn,Qt)=>{Qt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var A=h(R=>{var ut,Oe=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];R.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};R.getSymbolTotalCodewords=function(t){return Oe[t]};R.getBCHDigit=function(r){let t=0;for(;r!==0;)t++,r>>>=1;return t};R.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');ut=t};R.isKanjiModeEnabled=function(){return typeof ut<"u"};R.toSJIS=function(t){return ut(t)}});var Y=h(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Je(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+r)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Je(t)}catch{return e}}});var Yt=h((Qn,Jt)=>{function Ot(){this.buffer=[],this.length=0}Ot.prototype={get:function(r){let t=Math.floor(r/8);return(this.buffer[t]>>>7-r%8&1)===1},put:function(r,t){for(let e=0;e<t;e++)this.putBit((r>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),r&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Jt.exports=Ot});var jt=h((Kn,Gt)=>{function k(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}k.prototype.set=function(r,t,e,n){let o=r*this.size+t;this.data[o]=e,n&&(this.reservedBit[o]=!0)};k.prototype.get=function(r,t){return this.data[r*this.size+t]};k.prototype.xor=function(r,t,e){this.data[r*this.size+t]^=e};k.prototype.isReserved=function(r,t){return this.reservedBit[r*this.size+t]};Gt.exports=k});var Wt=h(G=>{var Ye=A().getSymbolSize;G.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,n=Ye(t),o=n===145?26:Math.ceil((n-13)/(2*e-2))*2,i=[n-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};G.getPositions=function(t){let e=[],n=G.getRowColCoords(t),o=n.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([n[i],n[s]]);return e}});var Xt=h(Zt=>{var Ge=A().getSymbolSize,$t=7;Zt.getPositions=function(t){let e=Ge(t);return[[0,0],[e-$t,0],[0,e-$t]]}});var te=h(d=>{d.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var N={N1:3,N2:3,N3:40,N4:10};d.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};d.from=function(t){return d.isValid(t)?parseInt(t,10):void 0};d.getPenaltyN1=function(t){let e=t.size,n=0,o=0,i=0,s=null,a=null;for(let u=0;u<e;u++){o=i=0,s=a=null;for(let c=0;c<e;c++){let l=t.get(u,c);l===s?o++:(o>=5&&(n+=N.N1+(o-5)),s=l,o=1),l=t.get(c,u),l===a?i++:(i>=5&&(n+=N.N1+(i-5)),a=l,i=1)}o>=5&&(n+=N.N1+(o-5)),i>=5&&(n+=N.N1+(i-5))}return n};d.getPenaltyN2=function(t){let e=t.size,n=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&n++}return n*N.N2};d.getPenaltyN3=function(t){let e=t.size,n=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let a=0;a<e;a++)o=o<<1&2047|t.get(s,a),a>=10&&(o===1488||o===93)&&n++,i=i<<1&2047|t.get(a,s),a>=10&&(i===1488||i===93)&&n++}return n*N.N3};d.getPenaltyN4=function(t){let e=0,n=t.data.length;for(let i=0;i<n;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/n/5)-10)*N.N4};function je(r,t,e){switch(r){case d.Patterns.PATTERN000:return(t+e)%2===0;case d.Patterns.PATTERN001:return t%2===0;case d.Patterns.PATTERN010:return e%3===0;case d.Patterns.PATTERN011:return(t+e)%3===0;case d.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case d.Patterns.PATTERN101:return t*e%2+t*e%3===0;case d.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case d.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}d.applyMask=function(t,e){let n=e.size;
1for(let o=0;o<n;o++)for(let i=0;i<n;i++)e.isReserved(i,o)||e.xor(i,o,je(t,i,o))};d.getBestMask=function(t,e){let n=Object.keys(d.Patterns).length,o=0,i=1/0;for(let s=0;s<n;s++){e(s),d.applyMask(s,t);let a=d.getPenaltyN1(t)+d.getPenaltyN2(t)+d.getPenaltyN3(t)+d.getPenaltyN4(t);d.applyMask(s,t),a<i&&(i=a,o=s)}return o}});var lt=h(ct=>{var T=Y(),j=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],W=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ct.getBlocksCount=function(t,e){switch(e){case T.L:return j[(t-1)*4+0];case T.M:return j[(t-1)*4+1];case T.Q:return j[(t-1)*4+2];case T.H:return j[(t-1)*4+3];default:return}};ct.getTotalCodewordsCount=function(t,e){switch(e){case T.L:return W[(t-1)*4+0];case T.M:return W[(t-1)*4+1];case T.Q:return W[(t-1)*4+2];case T.H:return W[(t-1)*4+3];default:return}}});var ee=h(Z=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();Z.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};Z.exp=function(t){return z[t]};Z.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var ne=h(H=>{var ft=ee();H.mul=function(t,e){let n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=ft.mul(t[o],e[i]);return n};H.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){let o=n[0];for(let s=0;s<e.length;s++)n[s]^=ft.mul(e[s],o);let i=0;for(;i<n.length&&n[i]===0;)i++;n=n.slice(i)}return n};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let n=0;n<t;n++)e=H.mul(e,new Uint8Array([1,ft.exp(n)]));return e}});var ie=h(($n,oe)=>{var re=ne();function ht(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}ht.prototype.initialize=function(t){this.degree=t,this.genPoly=re.generateECPolynomial(this.degree)};ht.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let n=re.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(n,o),i}return n};oe.exports=ht});var dt=h(se=>{se.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var gt=h(B=>{var ae="[0-9]+",We="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var $e="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r 2]))+`;B.KANJI=new RegExp(V,"g");B.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");B.BYTE=new RegExp($e,"g");B.NUMERIC=new RegExp(ae,"g");B.ALPHANUMERIC=new RegExp(We,"g");var Ze=new RegExp("^"+V+"$"),Xe=new RegExp("^"+ae+"$"),tn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");B.testKanji=function(t){return Ze.test(t)};B.testNumeric=function(t){return Xe.test(t)};B.testAlphanumeric=function(t){return tn.test(t)}});var S=h(m=>{var en=dt(),mt=gt();m.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};m.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};m.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};m.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};m.MIXED={bit:-1};m.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!en.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]};m.getBestModeForData=function(t){return mt.testNumeric(t)?m.NUMERIC:mt.testAlphanumeric(t)?m.ALPHANUMERIC:mt.testKanji(t)?m.KANJI:m.BYTE};m.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};m.isValid=function(t){return t&&t.bit&&t.ccBits};function nn(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return m.NUMERIC;case"alphanumeric":return m.ALPHANUMERIC;case"kanji":return m.KANJI;case"byte":return m.BYTE;default:throw new Error("Unknown mode: "+r)}}m.from=function(t,e){if(m.isValid(t))return t;try{return nn(t)}catch{return e}}});var he=h(M=>{var X=A(),rn=lt(),ue=Y(),L=S(),pt=dt(),le=7973,ce=X.getBCHDigit
2(le);function on(r,t,e){for(let n=1;n<=40;n++)if(t<=M.getCapacity(n,e,r))return n}function fe(r,t){return L.getCharCountIndicator(r,t)+4}function sn(r,t){let e=0;return r.forEach(function(n){let o=fe(n.mode,t);e+=o+n.getBitsLength()}),e}function an(r,t){for(let e=1;e<=40;e++)if(sn(r,e)<=M.getCapacity(e,t,L.MIXED))return e}M.from=function(t,e){return pt.isValid(t)?parseInt(t,10):e};M.getCapacity=function(t,e,n){if(!pt.isValid(t))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=L.BYTE);let o=X.getSymbolTotalCodewords(t),i=rn.getTotalCodewordsCount(t,e),s=(o-i)*8;if(n===L.MIXED)return s;let a=s-fe(n,t);switch(n){case L.NUMERIC:return Math.floor(a/10*3);case L.ALPHANUMERIC:return Math.floor(a/11*2);case L.KANJI:return Math.floor(a/13);case L.BYTE:default:return Math.floor(a/8)}};M.getBestVersionForData=function(t,e){let n,o=ue.from(e,ue.M);if(Array.isArray(t)){if(t.length>1)return an(t,o);if(t.length===0)return 1;n=t[0]}else n=t;return on(n.mode,n.getLength(),o)};M.getEncodedBits=function(t){if(!pt.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;X.getBCHDigit(e)-ce>=0;)e^=le<<X.getBCHDigit(e)-ce;return t<<12|e}});var pe=h(me=>{var wt=A(),ge=1335,un=21522,de=wt.getBCHDigit(ge);me.getEncodedBits=function(t,e){let n=t.bit<<3|e,o=n<<10;for(;wt.getBCHDigit(o)-de>=0;)o^=ge<<wt.getBCHDigit(o)-de;return(n<<10|o)^un}});var Ce=h((rr,we)=>{var cn=S();function U(r){this.mode=cn.NUMERIC,this.data=r.toString()}U.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(t){let e,n,o;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),o=parseInt(n,10),t.put(o,10);let i=this.data.length-e;i>0&&(n=this.data.substr(e),o=parseInt(n,10),t.put(o,i*3+1))};we.exports=U});var Ee=h((or,ye)=>{var ln=S(),Ct=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(r){this.mode=ln.ALPHANUMERIC,this.data=r}x.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=Ct.indexOf(this.data[e])*45;n+=Ct.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(Ct.indexOf(this.data[e]),6)};ye.exports=x});var Ie=h((ir,Be)=>{var fn=S();function D(r){this.mode=fn.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}D.getBitsLength=function(t){return t*8};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(r){for(let t=0,e=this.data.length;t<e;t++)r.put(this.data[t],8)};Be.exports=D});var Ae=h((sr,be)=>{var hn=S(),dn=A();function _(r){this.mode=hn.KANJI,this.data=r}_.getBitsLength=function(t){return t*13};_.prototype.getLength=function(){return this.data.length};_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)};_.prototype.write=function(r){let t;for(t=0;t<this.data.length;t++){let e=dn.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` 3Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),r.put(e,13)}};be.exports=_});var Te=h((ar,yt)=>{"use strict";var Q={single_source_shortest_paths:function(r,t,e){var n={},o={};o[t]=0;var i=Q.PriorityQueue.make();i.push(t,0);for(var s,a,u,c,l,p,g,C,I;!i.empty();){s=i.pop(),a=s.value,c=s.cost,l=r[a]||{};for(u in l)l.hasOwnProperty(u)&&(p=l[u],g=c+p,C=o[u],I=typeof o[u]>"u",(I||C>g)&&(o[u]=g,i.push(u,g),n[u]=a))}if(typeof e<"u"&&typeof o[e]>"u"){var b=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(b)}return n},extract_shortest_path_from_predecessor_list:function(r,t){for(var e=[],n=t,o;n;)e.push(n),o=r[n],n=r[n];return e.reverse(),e},find_path:function(r,t,e){var n=Q.single_source_shortest_paths(r,t,e);return Q.extract_shortest_path_from_predecessor_list(n,e)},PriorityQueue:{make:function(r){var t=Q.PriorityQueue,e={},n;r=r||{};for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e.queue=[],e.sorter=r.sorter||t.default_sorter,e},default_sorter:function(r,t){return r.cost-t.cost},push:function(r,t){var e={value:r,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof yt<"u"&&(yt.exports=Q)});var Ue=h(v=>{var f=S(),Re=Ce(),Ne=Ee(),Me=Ie(),Pe=Ae(),K=gt(),tt=A(),gn=Te();function Se(r){return unescape(encodeURIComponent(r)).length}function O(r,t,e){let n=[],o;for(;(o=r.exec(e))!==null;)n.push({data:o[0],index:o.index,mode:t,length:o[0].length});return n}function qe(r){let t=O(K.NUMERIC,f.NUMERIC,r),e=O(K.ALPHANUMERIC,f.ALPHANUMERIC,r),n,o;return tt.isKanjiModeEnabled()?(n=O(K.BYTE,f.BYTE,r),o=O(K.KANJI,f.KANJI,r)):(n=O(K.BYTE_KANJI,f.BYTE,r),o=[]),t.concat(e,n,o).sort(function(s,a){return s.index-a.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function Et(r,t){switch(t){case f.NUMERIC:return Re.getBitsLength(r);case f.ALPHANUMERIC:return Ne.getBitsLength(r);case f.KANJI:return Pe.getBitsLength(r);case f.BYTE:return Me.getBitsLength(r)}}function mn(r){return r.reduce(function(t,e){let n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}function pn(r){let t=[];for(let e=0;e<r.length;e++){let n=r[e];switch(n.mode){case f.NUMERIC:t.push([n,{data:n.data,mode:f.ALPHANUMERIC,length:n.length},{data:n.data,mode:f.BYTE,length:n.length}]);break;case f.ALPHANUMERIC:t.push([n,{data:n.data,mode:f.BYTE,length:n.length}]);break;case f.KANJI:t.push([n,{data:n.data,mode:f.BYTE,length:Se(n.data)}]);break;case f.BYTE:t.push([{data:n.data,mode:f.BYTE,length:Se(n.data)}])}}return t}function wn(r,t){let e={},n={start:{}},o=["start"];for(let i=0;i<r.length;i++){let s=r[i],a=[];for(let u=0;u<s.length;u++){let c=s[u],l=""+i+u;a.push(l),e[l]={node:c,lastCount:0},n[l]={};for(let p=0;p<o.length;p++){let g=o[p];e[g]&&e[g].node.mode===c.mode?(n[g][l]=Et(e[g].lastCount+c.length,c.mode)-Et(e[g].lastCount,c.mode),e[g].lastCount+=c.length):(e[g]&&(e[g].lastCount=c.length),n[g][l]=Et(c.length,c.mode)+4+f.getCharCountIndicator(c.mode,t))}}o=a}for(let i=0;i<o.length;i++)n[o[i]].end=0;return{map:n,table:e}}function Le(r,t){let e,n=f.getBestModeForData(r);if(e=f.from(t,n),e!==f.BYTE&&e.bit<n.bit)throw new Error('"'+r+'" cannot be encoded with mode '+f.toString(e)+`. 4 Suggested mode is: `+f.toString(n));switch(e===f.KANJI&&!tt.isKanjiModeEnabled()&&(e=f.BYTE),e){case f.NUMERIC:return new Re(r);case f.ALPHANUMERIC:return new Ne(r);case f.KANJI:return new Pe(r);case f.BYTE:return new Me(r)}}v.fromArray=function(t){return t.reduce(function(e,n){return typeof n=="string"?e.push(Le(n,null)):n.data&&e.push(Le(n.data,n.mode)),e},[])};v.fromString=function(t,e){let n=qe(t,tt.isKanjiModeEnabled()),o=pn(n),i=wn(o,e),s=gn.find_path(i.map,"start","end"),a=[];for(let u=1;u<s.length-1;u++)a.push(i.table[s[u]].node);return v.fromArray(mn(a))};v.rawSplit=function(t){return v.fromArray(qe(t,tt.isKanjiModeEnabled()))}});var De=h(xe=>{var nt=A(),Bt=Y(),Cn=Yt(),yn=jt(),En=Wt(),Bn=Xt(),At=te(),Tt=lt(),In=ie(),et=he(),bn=pe(),An=S(),It=Ue();function Tn(r,t){let e=r.size,n=Bn.getPositions(t);for(let o=0;o<n.length;o++){let i=n[o][0],s=n[o][1];for(let a=-1;a<=7;a++)if(!(i+a<=-1||e<=i+a))for(let u=-1;u<=7;u++)s+u<=-1||e<=s+u||(a>=0&&a<=6&&(u===0||u===6)||u>=0&&u<=6&&(a===0||a===6)||a>=2&&a<=4&&u>=2&&u<=4?r.set(i+a,s+u,!0,!0):r.set(i+a,s+u,!1,!0))}}function Sn(r){let t=r.size;
4for(let e=8;e<t-8;e++){let n=e%2===0;r.set(e,6,n,!0),r.set(6,e,n,!0)}}function Ln(r,t){let e=En.getPositions(t);for(let n=0;n<e.length;n++){let o=e[n][0],i=e[n][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?r.set(o+s,i+a,!0,!0):r.set(o+s,i+a,!1,!0)}}function Rn(r,t){let e=r.size,n=et.getEncodedBits(t),o,i,s;for(let a=0;a<18;a++)o=Math.floor(a/3),i=a%3+e-8-3,s=(n>>a&1)===1,r.set(o,i,s,!0),r.set(i,o,s,!0)}function bt(r,t,e){let n=r.size,o=bn.getEncodedBits(t,e),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?r.set(i,8,s,!0):i<8?r.set(i+1,8,s,!0):r.set(n-15+i,8,s,!0),i<8?r.set(8,n-i-1,s,!0):i<9?r.set(8,15-i-1+1,s,!0):r.set(8,15-i-1,s,!0);r.set(n-8,8,1,!0)}function Nn(r,t){let e=r.size,n=-1,o=e-1,i=7,s=0;for(let a=e-1;a>0;a-=2)for(a===6&&a--;;){for(let u=0;u<2;u++)if(!r.isReserved(o,a-u)){let c=!1;s<t.length&&(c=(t[s]>>>i&1)===1),r.set(o,a-u,c),i--,i===-1&&(s++,i=7)}if(o+=n,o<0||e<=o){o-=n,n=-n;break}}}function Mn(r,t,e){let n=new Cn;e.forEach(function(u){n.put(u.mode.bit,4),n.put(u.getLength(),An.getCharCountIndicator(u.mode,r)),u.write(n)});let o=nt.getSymbolTotalCodewords(r),i=Tt.getTotalCodewordsCount(r,t),s=(o-i)*8;for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let a=(s-n.getLengthInBits())/8;for(let u=0;u<a;u++)n.put(u%2?17:236,8);return Pn(n,r,t)}function Pn(r,t,e){let n=nt.getSymbolTotalCodewords(t),o=Tt.getTotalCodewordsCount(t,e),i=n-o,s=Tt.getBlocksCount(t,e),a=n%s,u=s-a,c=Math.floor(n/s),l=Math.floor(i/s),p=l+1,g=c-l,C=new In(g),I=0,b=new Array(s),Pt=new Array(s),ot=0,Qe=new Uint8Array(r.buffer);for(let q=0;q<s;q++){let st=q<u?l:p;b[q]=Qe.slice(I,I+st),Pt[q]=C.encode(b[q]),I+=st,ot=Math.max(ot,st)}let it=new Uint8Array(n),qt=0,y,E;for(y=0;y<ot;y++)for(E=0;E<s;E++)y<b[E].length&&(it[qt++]=b[E][y]);for(y=0;y<g;y++)for(E=0;E<s;E++)it[qt++]=Pt[E][y];return it}function qn(r,t,e,n){let o;if(Array.isArray(r))o=It.fromArray(r);else if(typeof r=="string"){let c=t;if(!c){let l=It.rawSplit(r);c=et.getBestVersionForData(l,e)}o=It.fromString(r,c||40)}else throw new Error("Invalid data");let i=et.getBestVersionForData(o,e);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(` 5The chosen QR Code version cannot contain this amount of data. 6Minimum version required to store current data is: `+i+`. 7`);let s=Mn(t,e,o),a=nt.getSymbolSize(t),u=new yn(a);return Tn(u,t),Sn(u),Ln(u,t),bt(u,e,0),t>=7&&Rn(u,t),Nn(u,s),isNaN(n)&&(n=At.getBestMask(u,bt.bind(null,u,e))),At.applyMask(n,u),bt(u,e,n),{modules:u,version:t,errorCorrectionLevel:e,maskPattern:n,segments:o}}xe.create=function(t,e){if(typeof t>"u"||t==="")throw new Error("No input text");let n=Bt.M,o,i;return typeof e<"u"&&(n=Bt.from(e.errorCorrectionLevel,Bt.M),o=et.from(e.version),i=At.from(e.maskPattern),e.toSJISFunc&&nt.setToSJISFunction(e.toSJISFunc)),qn(t,o,n,i)}});var St=h(P=>{function _e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let t=r.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+r);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(n){return[n,n]}))),t.length===6&&t.push("F","F");let e=parseInt(t.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+t.slice(0,6).join("")}}P.getOptions=function(t){t||(t={}),t.color||(t.color={});let e=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;
7return{width:n,scale:n?4:o,margin:e,color:{dark:_e(t.color.dark||"#000000ff"),light:_e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};P.getScale=function(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale};P.getImageWidth=function(t,e){let n=P.getScale(t,e);return Math.floor((t+e.margin*2)*n)};P.qrToImageData=function(t,e,n){let o=e.modules.size,i=e.modules.data,s=P.getScale(o,n),a=Math.floor((o+n.margin*2)*s),u=n.margin*s,c=[n.color.light,n.color.dark];for(let l=0;l<a;l++)for(let p=0;p<a;p++){let g=(l*a+p)*4,C=n.color.light;if(l>=u&&p>=u&&l<a-u&&p<a-u){let I=Math.floor((l-u)/s),b=Math.floor((p-u)/s);C=c[i[I*o+b]?1:0]}t[g++]=C.r,t[g++]=C.g,t[g++]=C.b,t[g]=C.a}}});var ve=h(rt=>{var Lt=St();function Un(r,t,e){r.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=e,t.width=e,t.style.height=e+"px",t.style.width=e+"px"}function xn(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}rt.render=function(t,e,n){let o=n,i=e;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),e||(i=xn()),o=Lt.getOptions(o);let s=Lt.getImageWidth(t.modules.size,o),a=i.getContext("2d"),u=a.createImageData(s,s);return Lt.qrToImageData(u.data,t,o),Un(a,i,s),a.putImageData(u,0,0),i};rt.renderToDataURL=function(t,e,n){let o=n;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),o||(o={});let i=rt.render(t,e,o),s=o.type||"image/png",a=o.rendererOpts||{};return i.toDataURL(s,a.quality)}});var ze=h(ke=>{var Dn=St();function Fe(r,t){let e=r.a/255,n=t+'="'+r.hex+'"';return e<1?n+" "+t+'-opacity="'+e.toFixed(2).slice(1)+'"':n}function Rt(r,t,e){let n=r+t;return typeof e<"u"&&(n+=" "+e),n}function _n(r,t,e){let n="",o=0,i=!1,s=0;for(let a=0;a<r.length;a++){let u=Math.floor(a%t),c=Math.floor(a/t);!u&&!i&&(i=!0),r[a]?(s++,a>0&&u>0&&r[a-1]||(n+=i?Rt("M",u+e,.5+c+e):Rt("m",o,0),o=0,i=!1),u+1<t&&r[a+1]||(n+=Rt("h",s),s=0)):o++}return n}ke.render=function(t,e,n){let o=Dn.getOptions(e),i=t.modules.size,s=t.modules.data,a=i+o.margin*2,u=o.color.light.a?"<path "+Fe(o.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+Fe(o.color.dark,"stroke")+' d="'+_n(s,i,o.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+l+' shape-rendering="crispEdges">'+u+c+`</svg> 8`;return typeof n=="function"&&n(null,g),g}});var Ve=h(J=>{var vn=Kt(),Nt=De(),He=ve(),Fn=ze();function Mt(r,t,e,n,o){let i=[].slice.call(arguments,1),s=i.length,a=typeof i[s-1]=="function";if(!a&&!vn())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(o=e,e=t,t=n=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=e,e=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(e=t,t=n=void 0):s===2&&!t.getContext&&(n=e,e=t,t=void 0),new Promise(function(u,c){try{let l=Nt.create(e,n);u(r(l,t,n))}catch(l){c(l)}})}try{let u=Nt.create(e,n);o(null,r(u,t,n))}catch(u){o(u)}}J.create=Nt.create;J.toCanvas=Mt.bind(null,He.render);J.toDataURL=Mt.bind(null,He.renderToDataURL);J.toString=Mt.bind(null,function(r,t,e){return Fn.render(r,e)})});var F=Ke(Ve(),1),kn=["qrcElement"],Ir=(()=>{class r{allowEmptyString=!1;colorDark="#000000ff";colorLight="#ffffffff";cssClass="qrcode";elementType="canvas";errorCorrectionLevel="M";imageSrc;imageHeight;imageWidth;margin=4;qrdata="";scale=4;version;width=10;alt;ariaLabel;title;qrCodeURL=new Ut;qrcElement;context=null;centerImage;renderer=at(Dt);sanitizer=at(Vt);async ngOnChanges(){await this.createQRCode()}isValidQrCodeText(e){return this.allowEmptyString===!1?!(typeof e>"u"||e===""||e==="null"||e===null):!(typeof e>"u")}toDataURL(e){return new Promise((n,o)=>{(0,F.toDataURL)(this.qrdata,e,(i,s)=>{i?o(i):n(s)})})}toCanvas(e,n){return new Promise((o,i)=>{(0,F.toCanvas)(e,this.qrdata,n,s=>{s?i(s):o("success")})})}toSVG(e){return new Promise((n,o)=>{(0,F.toString)(this.qrdata,e,(i,s)=>{i?o(i):n(s)})})}renderElement(e){for(let n of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,n);this.renderer.appendChild(this.qrcElement.nativeElement,e)}async createQRCode(){this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):this.version!==void 0&&isNaN(this.version)&&(console.warn("[angularx-qrcode] ver
8sion should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");this.isValidQrCodeText(this.qrdata)&&this.qrdata===""&&(this.qrdata=" ");let e={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,version:this.version,width:this.width},n=this.imageSrc,o=this.imageHeight?+this.imageHeight:40,i=this.imageWidth?+this.imageWidth:40;switch(this.elementType){case"canvas":{let s=this.renderer.createElement("canvas");this.context=s.getContext("2d"),this.toCanvas(s,e).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(s,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(s,"title",`${this.title}`),n&&this.context){this.centerImage=new Image(i,o),n!==this.centerImage.src&&(this.centerImage.crossOrigin="anonymous",this.centerImage.src=n),o!==this.centerImage.height&&(this.centerImage.height=o),i!==this.centerImage.width&&(this.centerImage.width=i);let a=this.centerImage;a&&(a.onload=()=>{this.context?.drawImage(a,s.width/2-i/2,s.height/2-o/2,i,o)})}this.renderElement(s),this.emitQRCodeURL(s)}).catch(a=>{console.error("[angularx-qrcode] canvas error:",a)});break}case"svg":{let s=this.renderer.createElement("div");this.toSVG(e).then(a=>{this.renderer.setProperty(s,"innerHTML",a);let u=s.firstChild;this.renderer.setAttribute(u,"height",`${this.width}`),this.renderer.setAttribute(u,"width",`${this.width}`),this.renderElement(u),this.emitQRCodeURL(u)}).catch(a=>{console.error("[angularx-qrcode] svg error:",a)});break}default:{let s=this.renderer.createElement("img");this.toDataURL(e).then(a=>{this.alt&&s.setAttribute("alt",this.alt),this.ariaLabel&&s.setAttribute("aria-label",this.ariaLabel),s.setAttribute("src",a),this.title&&s.setAttribute("title",this.title),this.renderElement(s),this.emitQRCodeURL(s)}).catch(a=>{console.error("[angularx-qrcode] img/url error:",a)})}}}catch(e){console.error("[angularx-qrcode] Error generating QR Code:",e.message)}}convertBase64ImageUrlToBlob(e){let n=e.split(";base64,"),o=n[0].split(":")[1],i=atob(n[1]),s=new Uint8Array(i.length);for(let a=0;a<i.length;++a)s[a]=i.charCodeAt(a);return new Blob([s],{type:o})}emitQRCodeURL(e){let n=e.constructor.name;if(n===SVGSVGElement.name){let u=e.outerHTML,c=new Blob([u],{type:"image/svg+xml"}),l=URL.createObjectURL(c),p=this.sanitizer.bypassSecurityTrustUrl(l);this.qrCodeURL.emit(p);return}let o="";n===HTMLCanvasElement.name&&(o=e.toDataURL("image/png")),n===HTMLImageElement.name&&(o=e.src);let i=this.convertBase64ImageUrlToBlob(o),s=URL.createObjectURL(i),a=this.sanitizer.bypassSecurityTrustUrl(s);this.qrCodeURL.emit(a)}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=_t({type:r,selectors:[["qrcode"]],viewQuery:function(n,o){if(n&1&&Ft(kn,7),n&2){let i;kt(i=zt())&&(o.qrcElement=i.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[xt],decls:2,vars:2,consts:[["qrcElement",""]],template:function(n,o){n&1&&vt(0,"div",null,0),n&2&&Ht(o.cssClass)},encapsulation:2,changeDetection:0})}return r})();export{Ir as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.