text: var t=Object.defineProperty,r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(r,e,n)=>e in r?t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;import{_ as i,u as a,L as u}from"./LoginFormTitle.a44855a5.js";import{k as f,r as s,a4 as h,a as c,o as l,n as g,a3 as p,aI as d,aT as y,f as v,K as w,q as m,P as E,X as b,s as A,S as B,W as T}from"./vendor.d660e98f.js";/* empty css              */import{i as C,d as R}from"./index.e2ea082d.js";import{d as I}from"./download.1a585a2f.js";var P={},U={},L={}.toString,S=Array.isArray||function(t){return"[object Array]"==L.call(t)},M=S;_.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(r){return!1}}();var N=_.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function _(t,r,e){return _.TYPED_ARRAY_SUPPORT||this instanceof _?"number"==typeof t?k(this,t):function(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer)return function(t,r,e,n){if(e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");var o;o=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);_.TYPED_ARRAY_SUPPORT?o.__proto__=_.prototype:o=Y(t,o);return o}(t,r,e,n);if("string"==typeof r)return function(t,r){var e=0|j(r),n=O(t,e),o=n.write(r);o!==e&&(n=n.slice(0,o));return n}(t,r);return function(t,r){if(_.isBuffer(r)){var e=0|x(r.length),n=O(t,e);return 0===n.length||r.copy(n,0,0,e),n}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(o=r.length)!=o?O(t,0):Y(t,r);if("Buffer"===r.type&&Array.isArray(r.data))return Y(t,r.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}(this,t,r,e):new _(t,r,e)}function x(t){if(t>=N)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N.toString(16)+" bytes");return 0|t}function O(t,r){var e;return _.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r)).__proto__=_.prototype:(null===(e=t)&&(e=new _(r)),e.length=r),e}function k(t,r){var e=O(t,r<0?0:0|x(r));if(!_.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function Y(t,r){for(var e=r.length<0?0:0|x(r.length),n=O(t,e),o=0;o<e;o+=1)n[o]=255&r[o];return n}function D(t,r){var e;r=r||Infinity;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function j(t){return _.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:D(t).length)}_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&_[Symbol.species]===_&&Object.defineProperty(_,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),_.prototype.write=function(t,r,e){void 0===r||void 0===e&&"string"==typeof r?(e=this.length,r=0):isFinite(r)&&(r|=0,isFinite(e)?e|=0:e=void 0);var n=this.length-r;if((void 0===e||e>n)&&(e=n),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,r,e,n){return function(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}(D(r,t.length-e),t,e,n)}(this,t,r,e)},_.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),_.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=_.prototype;else{var o=r-t;e=new _(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},_.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!_.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},_.prototype.fill=function(t,r,e){if("string"==typeof t){if("string"==typeof r?(r=0,e=this.length):"string"==typeof e&&(e=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var i=_.isBuffer(t)?t:new _(t),a=i.length;for(o=0;o<e-r;++o)this[o+r]=i[o%a]}return this},_.concat=function(t,r){if(!M(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return O(null,0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=k(null,r),o=0;for(e=0;e<t.length;++e){var i=t[e];if(!_.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},_.byteLength=j,_.prototype._isBuffer=!0,_.isBuffer=function(t){return!(null==t||!t._isBuffer)},U.alloc=function(t){var r=new _(t);return r.fill(0),r},U.from=function(t){return new _(t)};var F,z={},H=[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];z.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},z.getSymbolTotalCodewords=function(t){return H[t]},z.getBCHDigit=function(t){for(var r=0;0!==t;)r++,t>>>=1;return r},z.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');F=t},z.isKanjiModeEnabled=function(){return void 0!==F},z.toSJIS=function(t){return F(t)};var J,K={};function V(){this.buffer=[],this.length=0}(J=K).L={bit:1},J.M={bit:0},J.Q={bit:3},J.H={bit:2},J.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},J.from=function(t,r){if(J.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 J.L;case"m":case"medium":return J.M;case"q":case"quartile":return J.Q;case"h":case"high":return J.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return r}},V.prototype={get:function(t){var r=Math.floor(t/8);return 1==(this.buffer[r]>>>7-t%8&1)},put:function(t,r){for(var e=0;e<r;e++)this.putBit(1==(t>>>r-e-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}};var Q=V,q=U;function $(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=q.alloc(t*t),this.reservedBit=q.alloc(t*t)}$.prototype.set=function(t,r,e,n){var o=t*this.size+r;this.data[o]=e,n&&(this.reservedBit[o]=!0)},$.prototype.get=function(t,r){return this.data[t*this.size+r]},$.prototype.xor=function(t,r,e){this.data[t*this.size+r]^=e},$.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]};var X=$,W={};!function(t){var r=z.getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7],a=1;a<e-1;a++)i[a]=i[a-1]-o;return i.push(6),i.reverse()},t.getPositions=function(r){for(var e=[],n=t.getRowColCoords(r),o=n.length,i=0;i<o;i++)for(var a=0;a<o;a++)0===i&&0===a||0===i&&a===o-1||i===o-1&&0===a||e.push([n[i],n[a]]);return e}}(W);var Z={},G=z.getSymbolSize;Z.getPositions=function(t){var r=G(t);return[[0,0],[r-7,0],[0,r-7]]};var tt={};!function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,e=3,n=40,o=10;function i(r,e,n){switch(r){case t.Patterns.PATTERN000:return(e+n)%2==0;case t.Patterns.PATTERN001:return e%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(e+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return e*n%2+e*n%3==0;case t.Patterns.PATTERN110:return(e*n%2+e*n%3)%2==0;case t.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(t){for(var e=t.size,n=0,o=0,i=0,a=null,u=null,f=0;f<e;f++){o=i=0,a=u=null;for(var s=0;s<e;s++){var h=t.get(f,s);h===a?o++:(o>=5&&(n+=r+(o-5)),a=h,o=1),(h=t.get(s,f))===u?i++:(i>=5&&(n+=r+(i-5)),u=h,i=1)}o>=5&&(n+=r+(o-5)),i>=5&&(n+=r+(i-5))}return n},t.getPenaltyN2=function(t){for(var r=t.size,n=0,o=0;o<r-1;o++)for(var i=0;i<r-1;i++){var a=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==a&&0!==a||n++}return n*e},t.getPenaltyN3=function(t){for(var r=t.size,e=0,o=0,i=0,a=0;a<r;a++){o=i=0;for(var u=0;u<r;u++)o=o<<1&2047|t.get(a,u),u>=10&&(1488===o||93===o)&&e++,i=i<<1&2047|t.get(u,a),u>=10&&(1488===i||93===i)&&e++}return e*n},t.getPenaltyN4=function(t){for(var r=0,e=t.data.length,n=0;n<e;n++)r+=t.data[n];return Math.abs(Math.ceil(100*r/e/5)-10)*o},t.applyMask=function(t,r){for(var e=r.size,n=0;n<e;n++)for(var o=0;o<e;o++)r.isReserved(o,n)||r.xor(o,n,i(t,o,n))},t.getBestMask=function(r,e){for(var n=Object.keys(t.Patterns).length,o=0,i=Infinity,a=0;a<n;a++){e(a),t.applyMask(a,r);var u=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(a,r),u<i&&(i=u,o=a)}return o}}(tt);var rt={},et=K,nt=[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],ot=[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];rt.getBlocksCount=function(t,r){switch(r){case et.L:return nt[4*(t-1)+0];case et.M:return nt[4*(t-1)+1];case et.Q:return nt[4*(t-1)+2];case et.H:return nt[4*(t-1)+3];default:return}},rt.getTotalCodewordsCount=function(t,r){switch(r){case et.L:return ot[4*(t-1)+0];case et.M:return ot[4*(t-1)+1];case et.Q:return ot[4*(t-1)+2];case et.H:return ot[4*(t-1)+3];default:return}};var it={},at={},ut=U,ft=ut.alloc(512),st=ut.alloc(256);!function(){for(var t=1,r=0;r<255;r++)ft[r]=t,st[t]=r,256&(t<<=1)&&(t^=285);for(r=255;r<512;r++)ft[r]=ft[r-255]}(),at.log=function(t){if(t<1)throw new Error("log("+t+")");return st[t]},at.exp=function(t){return ft[t]},at.mul=function(t,r){return 0===t||0===r?0:ft[st[t]+st[r]]},function(t){var r=U,e=at;t.mul=function(t,n){for(var o=r.alloc(t.length+n.length-1),i=0;i<t.length;i++)for(var a=0;a<n.length;a++)o[i+a]^=e.mul(t[i],n[a]);return o},t.mod=function(t,n){for(var o=r.from(t);o.length-n.length>=0;){for(var i=o[0],a=0;a<n.length;a++)o[a]^=e.mul(n[a],i);for(var u=0;u<o.length&&0===o[u];)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(n){for(var o=r.from([1]),i=0;i<n;i++)o=t.mul(o,[1,e.exp(i)]);return o}}(it);for(var ht={},ct={byteLength:function(t){var r=wt(t),e=r[0],n=r[1];return 3*(e+n)/4-n},toByteArray:function(t){var r,e,n=wt(t),o=n[0],i=n[1],a=new pt(function(t,r,e){return 3*(r+e)/4-e}(0,o,i)),u=0,f=i>0?o-4:o;for(e=0;e<f;e+=4)r=gt[t.charCodeAt(e)]<<18|gt[t.charCodeAt(e+1)]<<12|gt[t.charCodeAt(e+2)]<<6|gt[t.charCodeAt(e+3)],a[u++]=r>>16&255,a[u++]=r>>8&255,a[u++]=255&r;2===i&&(r=gt[t.charCodeAt(e)]<<2|gt[t.charCodeAt(e+1)]>>4,a[u++]=255&r);1===i&&(r=gt[t.charCodeAt(e)]<<10|gt[t.charCodeAt(e+1)]<<4|gt[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r);return a},fromByteArray:function(t){for(var r,e=t.length,n=e%3,o=[],i=16383,a=0,u=e-n;a<u;a+=i)o.push(mt(t,a,a+i>u?u:a+i));1===n?(r=t[e-1],o.push(lt[r>>2]+lt[r<<4&63]+"==")):2===n&&(r=(t[e-2]<<8)+t[e-1],o.push(lt[r>>10]+lt[r>>4&63]+lt[r<<2&63]+"="));return o.join("")}},lt=[],gt=[],pt="undefined"!=typeof Uint8Array?Uint8Array:Array,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yt=0,vt=dt.length;yt<vt;++yt)lt[yt]=dt[yt],gt[dt.charCodeAt(yt)]=yt;function wt(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function mt(t,r,e){for(var n,o,i=[],a=r;a<e;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),i.push(lt[(o=n)>>18&63]+lt[o>>12&63]+lt[o>>6&63]+lt[63&o]);return i.join("")}gt["-".charCodeAt(0)]=62,gt["_".charCodeAt(0)]=63;var Et={
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  read:function(t,r,e,n,o){var i,a,u=8*o-n-1,f=(1<<u)-1,s=f>>1,h=-7,c=e?o-1:0,l=e?-1:1,g=t[r+c];for(c+=l,i=g&(1<<-h)-1,g>>=-h,h+=u;h>0;i=256*i+t[r+c],c+=l,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===i)i=1-s;else{if(i===f)return a?NaN:Infinity*(g?-1:1);a+=Math.pow(2,n),i-=s}return(g?-1:1)*a*Math.pow(2,i-n)},write:function(t,r,e,n,o,i){var a,u,f,s=8*i-o-1,h=(1<<s)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,p=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||Infinity===r?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),(r+=a+c>=1?l/f:l*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=h?(u=0,a=h):a+c>=1?(u=(r*f-1)*Math.pow(2,o),a+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[e+g]=255&u,g+=p,u/=256,o-=8);for(a=a<<o|u,s+=o;s>0;t[e+g]=255&a,g+=p,a/=256,s-=8);t[e+g-p]|=128*d}};
  /*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  !function(t){var r=ct,e=Et,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function i(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,a.prototype),r}function a(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return s(t)}return u(t,r,e)}function u(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|g(t,r),n=i(e),o=n.write(t,r);o!==e&&(n=n.slice(0,o));return n}(t,r);if(ArrayBuffer.isView(t))return function(t){if(D(t,Uint8Array)){var r=new Uint8Array(t);return c(r.buffer,r.byteOffset,r.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(D(t,ArrayBuffer)||t&&D(t.buffer,ArrayBuffer))return c(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(D(t,SharedArrayBuffer)||t&&D(t.buffer,SharedArrayBuffer)))return c(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,r,e);var o=function(t){if(a.isBuffer(t)){var r=0|l(t.length),e=i(r);return 0===e.length||t.copy(e,0,0,r),e}if(void 0!==t.length)return"number"!=typeof t.length||j(t.length)?i(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function s(t){return f(t),i(t<0?0:0|l(t))}function h(t){for(var r=t.length<0?0:0|l(t.length),e=i(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function c(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e),Object.setPrototypeOf(n,a.prototype),n}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function g(t,r){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||D(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return k(t).length;default:if(o)return n?-1:O(t).length;r=(""+r).toLowerCase(),o=!0}}function p(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,r,e);case"utf8":case"utf-8":return T(this,r,e);case"ascii":return R(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function d(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function y(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),j(e=+e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:v(t,r,e,n,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):v(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function v(t,r,e,n,o){var i,a=1,u=t.length,f=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;a=2,u/=2,f/=2,e/=2}function s(t,r){return 1===a?t[r]:t.readUInt16BE(r*a)}if(o){var h=-1;for(i=e;i<u;i++)if(s(t,i)===s(r,-1===h?0:i-h)){if(-1===h&&(h=i),i-h+1===f)return h*a}else-1!==h&&(i-=i-h),h=-1}else for(e+f>u&&(e=u-f),i=e;i>=0;i--){for(var c=!0,l=0;l<f;l++)if(s(t,i+l)!==s(r,l)){c=!1;break}if(c)return i}return-1}function w(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var u=parseInt(r.substr(2*a,2),16);if(j(u))return a;t[e+a]=u}return a}function m(t,r,e,n){return Y(O(r,t.length-e),t,e,n)}function E(t,r,e,n){return Y(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function b(t,r,e,n){return Y(k(r),t,e,n)}function A(t,r,e,n){return Y(function(t,r){for(var e,n,o,i=[],a=0;a<t.length&&!((r-=2)<0);++a)n=(e=t.charCodeAt(a))>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function B(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function T(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,a,u,f,s=t[o],h=null,c=s>239?4:s>223?3:s>191?2:1;if(o+c<=e)switch(c){case 1:s<128&&(h=s);break;case 2:128==(192&(i=t[o+1]))&&(f=(31&s)<<6|63&i)>127&&(h=f);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(f=(15&s)<<12|(63&i)<<6|63&a)>2047&&(f<55296||f>57343)&&(h=f);break;case 4:i=t[o+1],a=t[o+2],u=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(f=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(h=f)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=c}return function(t){var r=t.length;if(r<=C)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=C));return e}(n)}t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),42===t.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,r,e){return u(t,r,e)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,r,e){return function(t,r,e){return f(t),t<=0?i(t):void 0!==r?"string"==typeof e?i(t).fill(r,e):i(t).fill(r):i(t)}(t,r,e)},a.allocUnsafe=function(t){return s(t)},a.allocUnsafeSlow=function(t){return s(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,r){if(D(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),D(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=a.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var i=t[e];if(D(i,Uint8Array))o+i.length>n.length?a.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},a.byteLength=g,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)d(this,r,r+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)d(this,r,r+3),d(this,r+1,r+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)d(this,r,r+7),d(this,r+1,r+6),d(this,r+2,r+5),d(this,r+3,r+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var r="",e=t.INSPECT_MAX_BYTES;return r=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(r+=" ... "),"<Buffer "+r+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(t,r,e,n,o){if(D(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),f=Math.min(i,u),s=this.slice(n,o),h=t.slice(r,e),c=0;c<f;++c)if(s[c]!==h[c]){i=s[c],u=h[c];break}return i<u?-1:u<i?1:0},a.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},a.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},a.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},a.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":case"latin1":case"binary":return E(this,t,r,e);case"base64":return b(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function R(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function P(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=F[t[i]];return o}function U(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function L(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function S(t,r,e,n,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function M(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,r,n,o,i){return r=+r,n>>>=0,i||M(t,0,n,4),e.write(t,r,n,o,23,4),n+4}function _(t,r,n,o,i){return r=+r,n>>>=0,i||M(t,0,n,8),e.write(t,r,n,o,52,8),n+8}a.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,r){return t>>>=0,r||L(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,r){return t>>>=0,r||L(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,r){return t>>>=0,r||L(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,r){return t>>>=0,r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,r){return t>>>=0,r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},a.prototype.readInt8=function(t,r){return t>>>=0,r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){t>>>=0,r||L(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){t>>>=0,r||L(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return t>>>=0,r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return t>>>=0,r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return t>>>=0,r||L(t,4,this.length),e.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return t>>>=0,r||L(t,4,this.length),e.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return t>>>=0,r||L(t,8,this.length),e.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return t>>>=0,r||L(t,8,this.length),e.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||S(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||S(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,1,255,0),this[r]=255&t,r+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);S(this,t,r,e,o-1,-o)}var i=0,a=1,u=0;for(this[r]=255&t;++i<e&&(a*=256);)t<0&&0===u&&0!==this[r+i-1]&&(u=1),this[r+i]=(t/a>>0)-u&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);S(this,t,r,e,o-1,-o)}var i=e-1,a=1,u=0;for(this[r+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[r+i+1]&&(u=1),this[r+i]=(t/a>>0)-u&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||S(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},a.prototype.writeFloatLE=function(t,r,e){return N(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return N(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return _(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return _(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o=n-e;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,e,n):Uint8Array.prototype.set.call(t,this.subarray(e,n),r),o},a.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=a.isBuffer(t)?t:a.from(t,n),f=u.length;if(0===f)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<e-r;++i)this[i+r]=u[i%f]}return this};var x=/[^+/0-9A-Za-z-_]/g;function O(t,r){var e;r=r||Infinity;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function k(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function D(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function j(t){return t!=t}var F=function(){for(var t="0123456789abcdef",r=new Array(256),e=0;e<16;++e)for(var n=16*e,o=0;o<16;++o)r[n+o]=t[e]+t[o];return r}()}(ht);var bt=U,At=it,Bt=ht.Buffer;function Tt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Tt.prototype.initialize=function(t){this.degree=t,this.genPoly=At.generateECPolynomial(this.degree)},Tt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var r=bt.alloc(this.degree),e=Bt.concat([t,r],t.length+this.degree),n=At.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){var i=bt.alloc(this.degree);return n.copy(i,o),i}return n};var Ct=Tt,Rt={},It={},Pt={isValid:function(t){return!isNaN(t)&&t>=1&&t<=40}},Ut={},Lt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",St="(?:(?![A-Z0-9 $%*+\\-./:]|"+(Lt=Lt.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";Ut.KANJI=new RegExp(Lt,"g"),Ut.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ut.BYTE=new RegExp(St,"g"),Ut.NUMERIC=new RegExp("[0-9]+","g"),Ut.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var Mt=new RegExp("^"+Lt+"$"),Nt=new RegExp("^[0-9]+$"),_t=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ut.testKanji=function(t){return Mt.test(t)},Ut.testNumeric=function(t){return Nt.test(t)},Ut.testAlphanumeric=function(t){return _t.test(t)},function(t){var r=Pt,e=Ut;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(r){return e.testNumeric(r)?t.NUMERIC:e.testAlphanumeric(r)?t.ALPHANUMERIC:e.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(r,e){if(t.isValid(r))return r;try{return function(r){if("string"!=typeof r)throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}(r)}catch(n){return e}}}(It),function(t){var r=z,e=rt,n=K,o=It,i=Pt,a=S,u=r.getBCHDigit(7973);function f(t,r){return o.getCharCountIndicator(t,r)+4}function s(t,r){var e=0;return t.forEach((function(t){var n=f(t.mode,r);e+=n+t.getBitsLength()})),e}t.from=function(t,r){return i.isValid(t)?parseInt(t,10):r},t.getCapacity=function(t,n,a){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===a&&(a=o.BYTE);var u=8*(r.getSymbolTotalCodewords(t)-e.getTotalCodewordsCount(t,n));if(a===o.MIXED)return u;var s=u-f(a,t);switch(a){case o.NUMERIC:return Math.floor(s/10*3);case o.ALPHANUMERIC:return Math.floor(s/11*2);case o.KANJI:return Math.floor(s/13);case o.BYTE:default:return Math.floor(s/8)}},t.getBestVersionForData=function(r,e){var i,u=n.from(e,n.M);if(a(r)){if(r.length>1)return function(r,e){for(var n=1;n<=40;n++)if(s(r,n)<=t.getCapacity(n,e,o.MIXED))return n}(r,u);if(0===r.length)return 1;i=r[0]}else i=r;return function(r,e,n){for(var o=1;o<=40;o++)if(e<=t.getCapacity(o,n,r))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;r.getBCHDigit(e)-u>=0;)e^=7973<<r.getBCHDigit(e)-u;return t<<12|e}}(Rt);var xt={},Ot=z,kt=Ot.getBCHDigit(1335);xt.getEncodedBits=function(t,r){for(var e=t.bit<<3|r,n=e<<10;Ot.getBCHDigit(n)-kt>=0;)n^=1335<<Ot.getBCHDigit(n)-kt;return 21522^(e<<10|n)};var Yt={},Dt=It;function jt(t){this.mode=Dt.NUMERIC,this.data=t.toString()}jt.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},jt.prototype.getLength=function(){return this.data.length},jt.prototype.getBitsLength=function(){return jt.getBitsLength(this.data.length)},jt.prototype.write=function(t){var r,e,n;for(r=0;r+3<=this.data.length;r+=3)e=this.data.substr(r,3),n=parseInt(e,10),t.put(n,10);var o=this.data.length-r;o>0&&(e=this.data.substr(r),n=parseInt(e,10),t.put(n,3*o+1))};var Ft=jt,zt=It,Ht=["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 Jt(t){this.mode=zt.ALPHANUMERIC,this.data=t}Jt.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},Jt.prototype.getLength=function(){return this.data.length},Jt.prototype.getBitsLength=function(){return Jt.getBitsLength(this.data.length)},Jt.prototype.write=function(t){var r;for(r=0;r+2<=this.data.length;r+=2){var e=45*Ht.indexOf(this.data[r]);e+=Ht.indexOf(this.data[r+1]),t.put(e,11)}this.data.length%2&&t.put(Ht.indexOf(this.data[r]),6)};var Kt=Jt,Vt=U,Qt=It;function qt(t){this.mode=Qt.BYTE,this.data=Vt.from(t)}qt.getBitsLength=function(t){return 8*t},qt.prototype.getLength=function(){return this.data.length},qt.prototype.getBitsLength=function(){return qt.getBitsLength(this.data.length)},qt.prototype.write=function(t){for(var r=0,e=this.data.length;r<e;r++)t.put(this.data[r],8)};var $t=qt,Xt=It,Wt=z;function Zt(t){this.mode=Xt.KANJI,this.data=t}Zt.getBitsLength=function(t){return 13*t},Zt.prototype.getLength=function(){return this.data.length},Zt.prototype.getBitsLength=function(){return Zt.getBitsLength(this.data.length)},Zt.prototype.write=function(t){var r;for(r=0;r<this.data.length;r++){var e=Wt.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}};var Gt,tr=Zt,rr={exports:{}};rr.exports=Gt={single_source_shortest_paths:function(t,r,e){var n={},o={};o[r]=0;var i,a,u,f,s,h,c,l=Gt.PriorityQueue.make();for(l.push(r,0);!l.empty();)for(u in a=(i=l.pop()).value,f=i.cost,s=t[a]||{})s.hasOwnProperty(u)&&(h=f+s[u],c=o[u],(void 0===o[u]||c>h)&&(o[u]=h,l.push(u,h),n[u]=a));if(void 0!==e&&void 0===o[e]){var g=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(g)}return n},extract_shortest_path_from_predecessor_list:function(t,r){for(var e=[],n=r;n;)e.push(n),n=t[n];return e.reverse(),e},find_path:function(t,r,e){var n=Gt.single_source_shortest_paths(t,r,e);return Gt.extract_shortest_path_from_predecessor_list(n,e)},PriorityQueue:{make:function(t){var r,e=Gt.PriorityQueue,n={};for(r in t=t||{},e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n.queue=[],n.sorter=t.sorter||e.default_sorter,n},default_sorter:function(t,r){return t.cost-r.cost},push:function(t,r){var e={value:t,cost:r};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}},function(t){var r=It,e=Ft,n=Kt,o=$t,i=tr,a=Ut,u=z,f=rr.exports;function s(t){return unescape(encodeURIComponent(t)).length}function h(t,r,e){for(var n,o=[];null!==(n=t.exec(e));)o.push({data:n[0],index:n.index,mode:r,length:n[0].length});return o}function c(t){var e,n,o=h(a.NUMERIC,r.NUMERIC,t),i=h(a.ALPHANUMERIC,r.ALPHANUMERIC,t);return u.isKanjiModeEnabled()?(e=h(a.BYTE,r.BYTE,t),n=h(a.KANJI,r.KANJI,t)):(e=h(a.BYTE_KANJI,r.BYTE,t),n=[]),o.concat(i,e,n).sort((function(t,r){return t.index-r.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function l(t,a){switch(a){case r.NUMERIC:return e.getBitsLength(t);case r.ALPHANUMERIC:return n.getBitsLength(t);case r.KANJI:return i.getBitsLength(t);case r.BYTE:return o.getBitsLength(t)}}function g(t,a){var f,s=r.getBestModeForData(t);if((f=r.from(a,s))!==r.BYTE&&f.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(f)+".\n Suggested mode is: "+r.toString(s));switch(f!==r.KANJI||u.isKanjiModeEnabled()||(f=r.BYTE),f){case r.NUMERIC:return new e(t);case r.ALPHANUMERIC:return new n(t);case r.KANJI:return new i(t);case r.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,r){return"string"==typeof r?t.push(g(r,null)):r.data&&t.push(g(r.data,r.mode)),t}),[])},t.fromString=function(e,n){for(var o=function(t,e){for(var n={},o={start:{}},i=["start"],a=0;a<t.length;a++){for(var u=t[a],f=[],s=0;s<u.length;s++){var h=u[s],c=""+a+s;f.push(c),n[c]={node:h,lastCount:0},o[c]={};for(var g=0;g<i.length;g++){var p=i[g];n[p]&&n[p].node.mode===h.mode?(o[p][c]=l(n[p].lastCount+h.length,h.mode)-l(n[p].lastCount,h.mode),n[p].lastCount+=h.length):(n[p]&&(n[p].lastCount=h.length),o[p][c]=l(h.length,h.mode)+4+r.getCharCountIndicator(h.mode,e))}}i=f}for(g=0;g<i.length;g++)o[i[g]].end=0;return{map:o,table:n}}(function(t){for(var e=[],n=0;n<t.length;n++){var o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:s(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:s(o.data)}])}}return e}(c(e,u.isKanjiModeEnabled())),n),i=f.find_path(o.map,"start","end"),a=[],h=1;h<i.length-1;h++)a.push(o.table[i[h]].node);return t.fromArray(function(t){return t.reduce((function(t,r){var e=t.length-1>=0?t[t.length-1]:null;return e&&e.mode===r.mode?(t[t.length-1].data+=r.data,t):(t.push(r),t)}),[])}(a))},t.rawSplit=function(r){return t.fromArray(c(r,u.isKanjiModeEnabled()))}}(Yt);var er=U,nr=z,or=K,ir=Q,ar=X,ur=W,fr=Z,sr=tt,hr=rt,cr=Ct,lr=Rt,gr=xt,pr=It,dr=Yt,yr=S;function vr(t,r,e){var n,o,i=t.size,a=gr.getEncodedBits(r,e);for(n=0;n<15;n++)o=1==(a>>n&1),n<6?t.set(n,8,o,!0):n<8?t.set(n+1,8,o,!0):t.set(i-15+n,8,o,!0),n<8?t.set(8,i-n-1,o,!0):n<9?t.set(8,15-n-1+1,o,!0):t.set(8,15-n-1,o,!0);t.set(i-8,8,1,!0)}function wr(t,r,e){var n=new ir;e.forEach((function(r){n.put(r.mode.bit,4),n.put(r.getLength(),pr.getCharCountIndicator(r.mode,t)),r.write(n)}));var o=8*(nr.getSymbolTotalCodewords(t)-hr.getTotalCodewordsCount(t,r));for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);for(var i=(o-n.getLengthInBits())/8,a=0;a<i;a++)n.put(a%2?17:236,8);return function(t,r,e){for(var n=nr.getSymbolTotalCodewords(r),o=hr.getTotalCodewordsCount(r,e),i=n-o,a=hr.getBlocksCount(r,e),u=a-n%a,f=Math.floor(n/a),s=Math.floor(i/a),h=s+1,c=f-s,l=new cr(c),g=0,p=new Array(a),d=new Array(a),y=0,v=er.from(t.buffer),w=0;w<a;w++){var m=w<u?s:h;p[w]=v.slice(g,g+m),d[w]=l.encode(p[w]),g+=m,y=Math.max(y,m)}var E,b,A=er.alloc(n),B=0;for(E=0;E<y;E++)for(b=0;b<a;b++)E<p[b].length&&(A[B++]=p[b][E]);for(E=0;E<c;E++)for(b=0;b<a;b++)A[B++]=d[b][E];return A}(n,t,r)}function mr(t,r,e,n){var o;if(yr(t))o=dr.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var i=r;if(!i){var a=dr.rawSplit(t);i=lr.getBestVersionForData(a,e)}o=dr.fromString(t,i||40)}var u=lr.getBestVersionForData(o,e);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(r){if(r<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else r=u;var f=wr(r,e,o),s=nr.getSymbolSize(r),h=new ar(s);return function(t,r){for(var e=t.size,n=fr.getPositions(r),o=0;o<n.length;o++)for(var i=n[o][0],a=n[o][1],u=-1;u<=7;u++)if(!(i+u<=-1||e<=i+u))for(var f=-1;f<=7;f++)a+f<=-1||e<=a+f||(u>=0&&u<=6&&(0===f||6===f)||f>=0&&f<=6&&(0===u||6===u)||u>=2&&u<=4&&f>=2&&f<=4?t.set(i+u,a+f,!0,!0):t.set(i+u,a+f,!1,!0))}(h,r),function(t){for(var r=t.size,e=8;e<r-8;e++){var n=e%2==0;t.set(e,6,n,!0),t.set(6,e,n,!0)}}(h),function(t,r){for(var e=ur.getPositions(r),n=0;n<e.length;n++)for(var o=e[n][0],i=e[n][1],a=-2;a<=2;a++)for(var u=-2;u<=2;u++)-2===a||2===a||-2===u||2===u||0===a&&0===u?t.set(o+a,i+u,!0,!0):t.set(o+a,i+u,!1,!0)}(h,r),vr(h,e,0),r>=7&&function(t,r){for(var e,n,o,i=t.size,a=lr.getEncodedBits(r),u=0;u<18;u++)e=Math.floor(u/3),n=u%3+i-8-3,o=1==(a>>u&1),t.set(e,n,o,!0),t.set(n,e,o,!0)}(h,r),function(t,r){for(var e=t.size,n=-1,o=e-1,i=7,a=0,u=e-1;u>0;u-=2)for(6===u&&u--;;){for(var f=0;f<2;f++)if(!t.isReserved(o,u-f)){var s=!1;a<r.length&&(s=1==(r[a]>>>i&1)),t.set(o,u-f,s),-1==--i&&(a++,i=7)}if((o+=n)<0||e<=o){o-=n,n=-n;break}}}(h,f),isNaN(n)&&(n=sr.getBestMask(h,vr.bind(null,h,e))),sr.applyMask(n,h),vr(h,e,n),{modules:h,version:r,errorCorrectionLevel:e,maskPattern:n,segments:o}}P.create=function(t,r){if(void 0===t||""===t)throw new Error("No input text");var e,n,o=or.M;return void 0!==r&&(o=or.from(r.errorCorrectionLevel,or.M),e=lr.from(r.version),n=sr.from(r.maskPattern),r.toSJISFunc&&nr.setToSJISFunction(r.toSJISFunc)),mr(t,e,o,n)};var Er={},br={};!function(t){function r(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var r=t.slice().replace("#","").split("");if(r.length<3||5===r.length||r.length>8)throw new Error("Invalid hex color: "+t);3!==r.length&&4!==r.length||(r=Array.prototype.concat.apply([],r.map((function(t){return[t,t]})))),6===r.length&&r.push("F","F");var e=parseInt(r.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:255&e,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:n,scale:n?4:o,margin:e,color:{dark:r(t.color.dark||"#000000ff"),light:r(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,r){return r.width&&r.width>=t+2*r.margin?r.width/(t+2*r.margin):r.scale},t.getImageWidth=function(r,e){var n=t.getScale(r,e);return Math.floor((r+2*e.margin)*n)},t.qrToImageData=function(r,e,n){for(var o=e.modules.size,i=e.modules.data,a=t.getScale(o,n),u=Math.floor((o+2*n.margin)*a),f=n.margin*a,s=[n.color.light,n.color.dark],h=0;h<u;h++)for(var c=0;c<u;c++){var l=4*(h*u+c),g=n.color.light;if(h>=f&&c>=f&&h<u-f&&c<u-f)g=s[i[Math.floor((h-f)/a)*o+Math.floor((c-f)/a)]?1:0];r[l++]=g.r,r[l++]=g.g,r[l++]=g.b,r[l]=g.a}}}(br),function(t){var r=br;t.render=function(t,e,n){var o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);var a=r.getImageWidth(t.modules.size,o),u=i.getContext("2d"),f=u.createImageData(a,a);return r.qrToImageData(f.data,t,o),function(t,r,e){t.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=e,r.width=e,r.style.height=e+"px",r.style.width=e+"px"}(u,i,a),u.putImageData(f,0,0),i},t.renderToDataURL=function(r,e,n){var o=n;void 0!==o||e&&e.getContext||(o=e,e=void 0),o||(o={});var i=t.render(r,e,o),a=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(a,u.quality)}}(Er);var Ar={},Br=br;function Tr(t,r){var e=t.a/255,n=r+'="'+t.hex+'"';return e<1?n+" "+r+'-opacity="'+e.toFixed(2).slice(1)+'"':n}function Cr(t,r,e){var n=t+r;return void 0!==e&&(n+=" "+e),n}Ar.render=function(t,r,e){var n=Br.getOptions(r),o=t.modules.size,i=t.modules.data,a=o+2*n.margin,u=n.color.light.a?"<path "+Tr(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",f="<path "+Tr(n.color.dark,"stroke")+' d="'+function(t,r,e){for(var n="",o=0,i=!1,a=0,u=0;u<t.length;u++){var f=Math.floor(u%r),s=Math.floor(u/r);f||i||(i=!0),t[u]?(a++,u>0&&f>0&&t[u-1]||(n+=i?Cr("M",f+e,.5+s+e):Cr("m",o,0),o=0,i=!1),f+1<r&&t[u+1]||(n+=Cr("h",a),a=0)):o++}return n}(i,o,n.margin)+'"/>',s='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+s+' shape-rendering="crispEdges">'+u+f+"</svg>\n";return"function"==typeof e&&e(null,h),h};var Rr=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},Ir=P,Pr=Er,Ur=Ar;function Lr(t,r,e,n,o){var i=[].slice.call(arguments,1),a=i.length,u="function"==typeof i[a-1];if(!u&&!Rr())throw new Error("Callback required as last argument");if(!u){if(a<1)throw new Error("Too few arguments provided");return 1===a?(e=r,r=n=void 0):2!==a||r.getContext||(n=e,e=r,r=void 0),new Promise((function(o,i){try{var a=Ir.create(e,n);o(t(a,r,n))}catch(u){i(u)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(o=e,e=r,r=n=void 0):3===a&&(r.getContext&&void 0===o?(o=n,n=void 0):(o=n,n=e,e=r,r=void 0));try{var f=Ir.create(e,n);o(null,t(f,r,n))}catch(s){o(s)}}var Sr=Lr.bind(null,Pr.render),Mr=Lr.bind(null,Pr.renderToDataURL);Lr.bind(null,(function(t,r,e){return Ur.render(t,e)}));const Nr=({canvas:t,content:r,width:e=0,options:n={}})=>(n.errorCorrectionLevel=n.errorCorrectionLevel||function(t){return t.length>36?"M":t.length>16?"Q":"H"}(r),function(t,r){const e=document.createElement("canvas");return Sr(e,t,r).then((()=>e.width))}(r,n).then((o=>(n.scale=0===e?void 0:e/o*4,Sr(t,r,n)))));const _r=({canvas:t,logo:r})=>{if(!r)return new Promise((r=>{r(t.toDataURL())}));const e=t.width,{logoSize:n=.15,bgColor:o="#ffffff",borderSize:i=.05,crossOrigin:a,borderRadius:u=8,logoRadius:f=0}=r,s=C(r)?r:r.src,h=e*n,c=e*(1-n)/2,l=e*(n+i),g=e*(1-n-i)/2,p=t.getContext("2d");if(!p)return;xr(p)(g,g,l,l,u),p.fillStyle=o,p.fill();const d=new Image;(a||f)&&d.setAttribute("crossOrigin",a||"anonymous"),d.src=s;return new Promise((r=>{d.onload=()=>{var e;f?(t=>{const r=document.createElement("canvas");r.width=c+h,r.height=c+h;const e=r.getContext("2d");if(!e||!p)return;if(e.drawImage(t,c,c,h,h),xr(p)(c,c,h,h,f),!p)return;const n=p.createPattern(r,"no-repeat");n&&(p.fillStyle=n,p.fill())})(d):(e=d,p.drawImage(e,c,c,h,h)),r(t.toDataURL())}}))};function xr(t){return(r,e,n,o,i)=>{const a=Math.min(n,o);return i>a/2&&(i=a/2),t.beginPath(),t.moveTo(r+i,e),t.arcTo(r+n,e,r+n,e+o,i),t.arcTo(r+n,e+o,r,e+o,i),t.arcTo(r,e+o,r,e,i),t.arcTo(r,e,r+n,e,i),t.closePath(),t}}var Or=f({name:"QrCode",props:{value:{type:[String,Array],default:null},options:{type:Object,default:null},width:{type:Number,default:200},logo:{type:[String,Object],default:""},tag:{type:String,default:"canvas",validator:t=>["canvas","img"].includes(t)}},emits:{done:t=>!!t,error:t=>!!t},setup(t,{emit:i}){const a=s(null);function u(){return u=this,f=null,s=function*(){try{const{tag:u,value:f,options:s={},width:h,logo:l}=t,g=String(f),p=c(a);if(!p)return;if("canvas"===u){const t=yield(t=>Nr(t).then((()=>t)).then(_r))({canvas:p,width:h,logo:l,content:g,options:s||{}});return void i("done",{url:t,ctx:p.getContext("2d")})}if("img"===u){const t=yield Mr(g,((t,i)=>{for(var a in i||(i={}))e.call(i,a)&&o(t,a,i[a]);if(r)for(var a of r(i))n.call(i,a)&&o(t,a,i[a]);return t})({errorCorrectionLevel:"H",width:h},s));c(a).src=t,i("done",{url:t})}}catch(u){i("error",u)}},new Promise(((t,r)=>{var e=t=>{try{o(s.next(t))}catch(e){r(e)}},n=t=>{try{o(s.throw(t))}catch(e){r(e)}},o=r=>r.done?t(r.value):Promise.resolve(r.value).then(e,n);o((s=s.apply(u,f)).next())}));var u,f,s}return h((()=>{setTimeout((()=>{u()}),30)})),{wrapRef:a,download:function(t){let r="";const e=c(a);e instanceof HTMLCanvasElement?r=e.toDataURL():e instanceof HTMLImageElement&&(r=e.src),r&&I({url:r,fileName:t})}}}});Or.render=function(t,r,e,n,o,i){return l(),g("div",null,[(l(),g(p(t.tag),{ref:"wrapRef"},null,512))])};var kr=f({name:"QrCodeForm",components:{Button:d,QrCode:Or,Divider:y,LoginFormTitle:i},setup(){const{t:t}=R(),{handleBackLogin:r,getLoginState:e}=a();return{t:t,handleBackLogin:r,qrCodeUrl:"https://vvbin.cn/next/login",getShow:v((()=>c(e)===u.QR_CODE))}}});const Yr={class:"enter-x min-w-64 min-h-64"};kr.render=function(t,r,e,n,o,i){const a=w("LoginFormTitle"),u=w("QrCode"),f=w("Divider"),s=w("Button");return t.getShow?(l(),g(B,{key:0},[m(a,{class:"enter-x"}),m("div",Yr,[m(u,{value:t.qrCodeUrl,class:"enter-x flex justify-center xl:justify-start",width:280},null,8,["value"]),m(f,{class:"enter-x"},{default:E((()=>[b(A(t.t("sys.login.scanSign")),1)])),_:1}),m(s,{size:"large",block:"",class:"mt-4 enter-x",onClick:t.handleBackLogin},{default:E((()=>[b(A(t.t("sys.login.backSignIn")),1)])),_:1},8,["onClick"])])],64)):T("",!0)};export default kr;
  