ScopeSentry/static/assets/Qrcode-TE947nUj.js

2 lines
30 KiB
JavaScript
Raw Normal View History

2024-06-17 14:41:04 +00:00
import{d as t,a5 as e,r as n,B as r,a3 as o,U as i,V as s,W as a,o as l,c as u,i as c,G as d,n as f,a as h,f as g,e as p,t as m,j as w,F as v,k as y,aO as E,b1 as b,dI as x,_ as C,b as A,l as B,w as I,a2 as T}from"./index-rxu9Faad.js";import{_ as M}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CLuWlWlx.js";import{a as P,E as N}from"./el-col-BKZxb-_G.js";import{E as R}from"./el-card-C0XrHsE5.js";import{_ as L}from"./logo-BM2ksA2B.js";import"./el-tooltip-l0sNRNKZ.js";import"./el-popper-BJkW0SkV.js";var _={},S={},U={};let D;const k=[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];U.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 4*t+17},U.getSymbolTotalCodewords=function(t){return k[t]},U.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},U.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');D=t},U.isKanjiModeEnabled=function(){return void 0!==D},U.toSJIS=function(t){return D(t)};var z,q={};function F(){this.buffer=[],this.length=0}(z=q).L={bit:1},z.M={bit:0},z.Q={bit:3},z.H={bit:2},z.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},z.from=function(t,e){if(z.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return z.L;case"m":case"medium":return z.M;case"q":case"quartile":return z.Q;case"h":case"high":return z.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(n){return e}},F.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var H=F;function j(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}j.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},j.prototype.get=function(t,e){return this.data[t*this.size+e]},j.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},j.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var J=j,K={};!function(t){const e=U.getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(K);var Y={};const O=U.getSymbolSize;Y.getPositions=function(t){const e=O(t);return[[0,0],[e-7,0],[0,e-7]]};var V={};!function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,o=0,i=0,s=null,a=null;for(let l=0;l<n;l++){o=i=0,s=a=null;for(let u=0;u<n;u++){let n=t.get(l,u);n===s?o++:(o>=5&&(r+=e+(o-5)),s=n,o=1),n=t.get