mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueQr=e():t.VueQr=e()}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var n=r(13),i=o(n);t.exports=i.default},function(t,e){t.exports={L:1,M:0,Q:3,H:2}},function(t,e,r){function o(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}var n=r(3);o.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var i=0;i<t.getLength();i++)e[r+i]^=n.gexp(n.glog(this.get(r))+n.glog(t.get(i)));return new o(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=n.glog(this.get(0))-n.glog(t.get(0)),r=new Array(this.getLength()),i=0;i<this.getLength();i++)r[i]=this.get(i);for(var i=0;i<t.getLength();i++)r[i]^=n.gexp(n.glog(t.get(i))+e);return new o(r,0).mod(t)}},t.exports=o},function(t,e){for(var r={glog:function(t){if(t<1)throw new Error("glog("+t+")");return r.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return r.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)r.EXP_TABLE[o]=1<<o;for(var o=8;o<256;o++)r.EXP_TABLE[o]=r.EXP_TABLE[o-4]^r.EXP_TABLE[o-5]^r.EXP_TABLE[o-6]^r.EXP_TABLE[o-8];for(var o=0;o<255;o++)r.LOG_TABLE[r.EXP_TABLE[o]]=o;t.exports=r},function(t,e){t.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t){return t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1}Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),a=o(i),s=function(){this.update()};e.default={props:{val:{type:String,required:!0},size:{type:Number,default:100},level:String,bgColor:{type:String,default:"#FFFFFF"},fgColor:{type:String,default:"#000000"}},beforeUpdate:s,mounted:s,methods:{update:function(){var t=this.size,e=this.bgColor,r=this.fgColor,o=this.$refs.qr,i=(0,a.default)(this.val),s=o.getContext("2d"),u=i.modules,h=t/u.length,l=t/u.length,f=(window.devicePixelRatio||1)/n(s);o.height=o.width=t*f,s.scale(f,f),u.forEach(function(t,o){t.forEach(function(t,n){s.fillStyle=t?r:e;var i=Math.ceil((n+1)*h)-Math.floor(n*h),a=Math.ceil((o+1)*l)-Math.floor(o*l);s.fillRect(Math.round(n*h),Math.round(o*l),i,a)})})}}}},function(t,e,r){var o=r(9),n=r(1),i=function(t,e){e=e||{};var r=new o(e.typeNumber||-1,e.errorCorrectLevel||n.H);return r.addData(t),r.make(),r};i.ErrorCorrectLevel=n,t.exports=i},function(t,e,r){function o(t){this.mode=n.MODE_8BIT_BYTE,this.data=t}var n=r(4);o.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},t.exports=o},function(t,e){function r(){this.buffer=new Array,this.length=0}r.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=r},function(t,e,r){function o(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var n=r(7),i=r(10),a=r(8),s=r(11),u=r(2),h=o.prototype;h.addData=function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},h.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e
|