You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
160 KiB
16 lines
160 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36dd65b4"],{"00fd":function(e,t,n){var r=n("9e69"),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;function u(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(u){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}e.exports=u},"0676":function(e,t){function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=n},"11b0":function(e,t,n){function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n("a4d3"),n("e01a"),n("d28b"),n("a630"),n("d3b7"),n("3ca3"),n("ddb0"),e.exports=r},1310:function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},"1a8c":function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},"1d92":function(e,t,n){var r=n("e0ef");function i(e){return r(2,e)}e.exports=i},2236:function(e,t,n){var r=n("5a43");function i(e){if(Array.isArray(e))return r(e)}e.exports=i},2655:function(e,t){function n(e){return!!e&&("object"===typeof e||"function"===typeof e)&&"function"===typeof e.then}e.exports=n,e.exports.default=n},"278c":function(e,t,n){var r=n("c135"),i=n("9b42"),o=n("6613"),s=n("c240");function a(e,t){return r(e)||i(e,t)||o(e,t)||s()}e.exports=a},"29f3":function(e,t){var n=Object.prototype,r=n.toString;function i(e){return r.call(e)}e.exports=i},"2b3e":function(e,t,n){var r=n("585a"),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},"2e39":function(e,t,n){"use strict";function r(e,t){var n=t.length,r=e.length;if(r>n)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){var s=e.charCodeAt(i);while(o<n)if(t.charCodeAt(o++)===s)continue e;return!1}return!0}e.exports=r},3156:function(e,t,n){n("a4d3"),n("99af"),n("4de4"),n("4160"),n("e439"),n("b64b"),n("159b");var r=n("9523");function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}e.exports=i},3729:function(e,t,n){var r=n("9e69"),i=n("00fd"),o=n("29f3"),s="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;function l(e){return null==e?void 0===e?a:s:u&&u in Object(e)?i(e):o(e)}e.exports=l},"408c":function(e,t,n){var r=n("2b3e"),i=function(){return r.Date.now()};e.exports=i},4416:function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},"448a":function(e,t,n){var r=n("2236"),i=n("11b0"),o=n("6613"),s=n("0676");function a(e){return r(e)||i(e)||o(e)||s()}e.exports=a},"4b17":function(e,t,n){var r=n("6428");function i(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}e.exports=i},"542c":function(e,t,n){},"585a":function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n("c8ba"))},"5a43":function(e,t){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=n},6428:function(e,t,n){var r=n("b4b0"),i=1/0,o=17976931348623157e292;function s(e){if(!e)return 0===e?e:0;if(e=r(e),e===i||e===-i){var t=e<0?-1:1;return t*o}return e===e?e:0}e.exports=s},"658f5":function(e,t,n){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=14)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(15)},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d}));var r=n(0),i=n.n(r),o=n(1),s=n.n(o);function a(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=Number(e)?3:0)}var u=function(){function e(t){i()(this,e),this.mode=h.MODE_8BIT_BYTE,this.parsedData=[],this.data=t;for(var n=[],r=0,o=this.data.length;r<o;r++){var s=[],a=this.data.charCodeAt(r);a>65536?(s[0]=240|(1835008&a)>>>18,s[1]=128|(258048&a)>>>12,s[2]=128|(4032&a)>>>6,s[3]=128|63&a):a>2048?(s[0]=224|(61440&a)>>>12,s[1]=128|(4032&a)>>>6,s[2]=128|63&a):a>128?(s[0]=192|(1984&a)>>>6,s[1]=128|63&a):s[0]=a,n.push(s)}this.parsedData=Array.prototype.concat.apply([],n),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}return s()(e,[{key:"getLength",value:function(){return this.parsedData.length}},{key:"write",value:function(e){for(var t=0,n=this.parsedData.length;t<n;t++)e.put(this.parsedData[t],8)}}]),e}(),l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.L;i()(this,e),this.moduleCount=0,this.dataList=[],this.typeNumber=t,this.errorCorrectLevel=n,this.moduleCount=0,this.dataList=[]}return s()(e,[{key:"addData",value:function(e){if(this.typeNumber<=0)this.typeNumber=function(e,t){for(var n=1,r=a(e),i=0,o=m.length;i<o;i++){var s=0;switch(t){case c.L:s=m[i][0];break;case c.M:s=m[i][1];break;case c.Q:s=m[i][2];break;case c.H:s=m[i][3]}if(r<=s)break;n++}if(n>m.length)throw new Error("Too long data");return n}(e,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error("Invalid QR version: ".concat(this.typeNumber));if(!function(e,t,n){var r=a(t),i=e-1,o=0;switch(n){case c.L:o=m[i][0];break;case c.M:o=m[i][1];break;case c.Q:o=m[i][2];break;case c.H:o=m[i][3]}return r<=o}(this.typeNumber,e,this.errorCorrectLevel))throw new Error("Data is too long for QR version: ".concat(this.typeNumber))}var t=new u(e);this.dataList.push(t),this.dataCache=void 0}},{key:"isDark",value:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error("".concat(e,",").concat(t));return this.modules[e][t]}},{key:"getModuleCount",value:function(){return this.moduleCount}},{key:"make",value:function(){this.makeImpl(!1,this.getBestMaskPattern())}},{key:"makeImpl",value:function(t,n){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[r][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,n),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,n)}},{key:"setupPositionProbePattern",value:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)}},{key:"getBestMaskPattern",value:function(){if(Number.isInteger(this.maskPattern)&&Object.values(f).includes(this.maskPattern))return this.maskPattern;for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=d.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t}},{key:"setupTimingPattern",value:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)}},{key:"setupPositionAdjustPattern",value:function(){for(var e=d.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}}},{key:"setupTypeNumber",value:function(e){for(var t=d.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++)r=!e&&1==(t>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},{key:"setupTypeInfo",value:function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=d.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++)o=!e&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o;this.modules[this.moduleCount-8][8]=!e}},{key:"mapData",value:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var u=!1;o<e.length&&(u=1==(e[o]>>>i&1)),d.getMask(t,r,s-a)&&(u=!u),this.modules[r][s-a]=u,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}}],[{key:"createData",value:function(t,n,r){for(var i=v.getRSBlocks(t,n),o=new y,s=0;s<r.length;s++){var a=r[s];o.put(a.mode,4),o.put(a.getLength(),d.getLengthInBits(a.mode,t)),a.write(o)}var u=0;for(s=0;s<i.length;s++)u+=i[s].dataCount;if(o.getLengthInBits()>8*u)throw new Error("code length overflow. (".concat(o.getLengthInBits(),">").concat(8*u,")"));for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u||(o.put(e.PAD0,8),o.getLengthInBits()>=8*u));)o.put(e.PAD1,8);return e.createBytes(o,i)}},{key:"createBytes",value:function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),a=0;a<t.length;a++){var u=t[a].dataCount,l=t[a].totalCount-u;r=Math.max(r,u),i=Math.max(i,l),o[a]=new Array(u);for(var c=0;c<o[a].length;c++)o[a][c]=255&e.buffer[c+n];n+=u;var h=d.getErrorCorrectPolynomial(l),f=new g(o[a],h.getLength()-1).mod(h);for(s[a]=new Array(h.getLength()-1),c=0;c<s[a].length;c++){var p=c+f.getLength()-s[a].length;s[a][c]=p>=0?f.get(p):0}}var v=0;for(c=0;c<t.length;c++)v+=t[c].totalCount;var y=new Array(v),m=0;for(c=0;c<r;c++)for(a=0;a<t.length;a++)c<o[a].length&&(y[m++]=o[a][c]);for(c=0;c<i;c++)for(a=0;a<t.length;a++)c<s[a].length&&(y[m++]=s[a][c]);return y}}]),e}();l.PAD0=236,l.PAD1=17;var c={L:1,M:0,Q:3,H:2},h={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},f={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},d=function(){function e(){i()(this,e)}return s()(e,null,[{key:"getBCHTypeInfo",value:function(t){for(var n=t<<10;e.getBCHDigit(n)-e.getBCHDigit(e.G15)>=0;)n^=e.G15<<e.getBCHDigit(n)-e.getBCHDigit(e.G15);return(t<<10|n)^e.G15_MASK}},{key:"getBCHTypeNumber",value:function(t){for(var n=t<<12;e.getBCHDigit(n)-e.getBCHDigit(e.G18)>=0;)n^=e.G18<<e.getBCHDigit(n)-e.getBCHDigit(e.G18);return t<<12|n}},{key:"getBCHDigit",value:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t}},{key:"getPatternPosition",value:function(t){return e.PATTERN_POSITION_TABLE[t-1]}},{key:"getMask",value:function(e,t,n){switch(e){case f.PATTERN000:return(t+n)%2==0;case f.PATTERN001:return t%2==0;case f.PATTERN010:return n%3==0;case f.PATTERN011:return(t+n)%3==0;case f.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case f.PATTERN101:return t*n%2+t*n%3==0;case f.PATTERN110:return(t*n%2+t*n%3)%2==0;case f.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:".concat(e))}}},{key:"getErrorCorrectPolynomial",value:function(e){for(var t=new g([1],0),n=0;n<e;n++)t=t.multiply(new g([1,p.gexp(n)],0));return t}},{key:"getLengthInBits",value:function(e,t){if(1<=t&&t<10)switch(e){case h.MODE_NUMBER:return 10;case h.MODE_ALPHA_NUM:return 9;case h.MODE_8BIT_BYTE:case h.MODE_KANJI:return 8;default:throw new Error("mode:".concat(e))}else if(t<27)switch(e){case h.MODE_NUMBER:return 12;case h.MODE_ALPHA_NUM:return 11;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 10;default:throw new Error("mode:".concat(e))}else{if(!(t<41))throw new Error("type:".concat(t));switch(e){case h.MODE_NUMBER:return 14;case h.MODE_ALPHA_NUM:return 13;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 12;default:throw new Error("mode:".concat(e))}}}},{key:"getLostPoint",value:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var o=0,s=e.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||t<=r+a))for(var u=-1;u<=1;u++)i+u<0||t<=i+u||0==a&&0==u||s==e.isDark(r+a,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var l=0;e.isDark(r,i)&&l++,e.isDark(r+1,i)&&l++,e.isDark(r,i+1)&&l++,e.isDark(r+1,i+1)&&l++,0!=l&&4!=l||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var c=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&c++;return n+Math.abs(100*c/t/t-50)/5*10}}]),e}();d.PATTERN_POSITION_TABLE=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],d.G15=1335,d.G18=7973,d.G15_MASK=21522;var p=function(){function e(){i()(this,e)}return s()(e,null,[{key:"glog",value:function(t){if(t<1)throw new Error("glog(".concat(t,")"));return e.LOG_TABLE[t]}},{key:"gexp",value:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e.EXP_TABLE[t]}}]),e}();p.EXP_TABLE=new Array(256),p.LOG_TABLE=new Array(256),p._constructor=function(){for(var e=0;e<8;e++)p.EXP_TABLE[e]=1<<e;for(e=8;e<256;e++)p.EXP_TABLE[e]=p.EXP_TABLE[e-4]^p.EXP_TABLE[e-5]^p.EXP_TABLE[e-6]^p.EXP_TABLE[e-8];for(e=0;e<255;e++)p.LOG_TABLE[p.EXP_TABLE[e]]=e}();var g=function(){function e(t,n){if(i()(this,e),null==t.length)throw new Error("".concat(t.length,"/").concat(n));for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+n);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}return s()(e,[{key:"get",value:function(e){return this.num[e]}},{key:"getLength",value:function(){return this.num.length}},{key:"multiply",value:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var i=0;i<t.getLength();i++)n[r+i]^=p.gexp(p.glog(this.get(r))+p.glog(t.get(i)));return new e(n,0)}},{key:"mod",value:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=p.glog(this.get(0))-p.glog(t.get(0)),r=new Array(this.getLength()),i=0;i<this.getLength();i++)r[i]=this.get(i);for(i=0;i<t.getLength();i++)r[i]^=p.gexp(p.glog(t.get(i))+n);return new e(r,0).mod(t)}}]),e}(),v=function(){function e(t,n){i()(this,e),this.totalCount=t,this.dataCount=n}return s()(e,null,[{key:"getRSBlocks",value:function(t,n){var r=e.getRsBlockTable(t,n);if(null==r)throw new Error("bad rs block @ typeNumber:".concat(t,"/errorCorrectLevel:").concat(n));for(var i=r.length/3,o=[],s=0;s<i;s++)for(var a=r[3*s+0],u=r[3*s+1],l=r[3*s+2],c=0;c<a;c++)o.push(new e(u,l));return o}},{key:"getRsBlockTable",value:function(t,n){switch(n){case c.L:return e.RS_BLOCK_TABLE[4*(t-1)+0];case c.M:return e.RS_BLOCK_TABLE[4*(t-1)+1];case c.Q:return e.RS_BLOCK_TABLE[4*(t-1)+2];case c.H:return e.RS_BLOCK_TABLE[4*(t-1)+3];default:return}}}]),e}();v.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];var y=function(){function e(){i()(this,e),this.buffer=[],this.length=0}return s()(e,[{key:"get",value:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)}},{key:"put",value:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))}},{key:"getLengthInBits",value:function(){return this.length}},{key:"putBit",value:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}]),e}(),m=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]]},function(e,t,n){"use strict";(function(t){function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var n,r="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var i={resolve:function(){for(var e,i="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=t.cwd()),a=e),n(a),0!==a.length&&(i=a+"/"+i,o=47===a.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var u=t.length-a,l=s<u?s:u,c=-1,h=0;h<=l;++h){if(h===l){if(u>l){if(47===t.charCodeAt(a+h))return t.slice(a+h+1);if(0===h)return t.slice(a+h)}else s>l&&(47===e.charCodeAt(r+h)?c=h:0===h&&(c=0));break}var f=e.charCodeAt(r+h);if(f!==t.charCodeAt(a+h))break;47===f&&(c=h)}var d="";for(h=r+c+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(a+c):(a+=c,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!s){i=r+1;break}}else-1===u&&(s=!1,u=r+1),a>=0&&(l===t.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===i&&(o=!1,i=a+1),46===u?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){r=a+1;break}}return-1===t||-1===i||0===s||1===s&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var s=-1,a=0,u=-1,l=!0,c=e.length-1,h=0;c>=r;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===s?s=c:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=c+1;break}return-1===s||-1===u||0===h||1===h&&s===u-1&&s===a+1?-1!==u&&(t.base=t.name=0===a&&o?e.slice(1,u):e.slice(a,u)):(0===a&&o?(t.name=e.slice(1,s),t.base=e.slice(1,u)):(t.name=e.slice(a,s),t.base=e.slice(a,u)),t.ext=e.slice(s,u)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}).call(this,n(20))},function(e,t){function n(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,u,"next",e)}function u(e){n(s,i,o,a,u,"throw",e)}a(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return S}));const r=(e,t)=>(n,r,i,o)=>{t(n,r,i)&&o(n,e,r,i)},i=(e=0)=>t=>t.data[t.pos+e],o=e=>t=>t.data.subarray(t.pos,t.pos+=e),s=e=>t=>t.data.subarray(t.pos,t.pos+e),a=e=>t=>Array.from(o(e)(t)).map(e=>String.fromCharCode(e)).join(""),u=e=>t=>{const n=o(2)(t);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]},l=(e,t)=>(n,r,i)=>{const s="function"==typeof t?t(n,r,i):t,a=o(e),u=new Array(s);for(var l=0;l<s;l++)u[l]=a(n);return u},c=e=>t=>{const n=(e=>e.data[e.pos++])(t),r=new Array(8);for(var i=0;i<8;i++)r[7-i]=!!(n&1<<i);return Object.keys(e).reduce((t,n)=>{const i=e[n];return i.length?t[n]=((e,t,n)=>{for(var r=0,i=0;i<n;i++)r+=e[t+i]&&2**(n-i-1);return r})(r,i.index,i.length):t[n]=r[i.index],t},{})};var h={blocks:e=>{const t=[],n=e.data.length;for(var r=0,i=(e=>e.data[e.pos++])(e);0!==i;i=(e=>e.data[e.pos++])(e)){if(e.pos+i>=n){const i=n-e.pos;t.push(o(i)(e)),r+=i;break}t.push(o(i)(e)),r+=i}const s=new Uint8Array(r);for(var a=0,u=0;u<t.length;u++)s.set(t[u],a),a+=t[u].length;return s}};const f=r({gce:[{codes:o(2)},{byteSize:e=>e.data[e.pos++]},{extras:c({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:u(!0)},{transparentColorIndex:e=>e.data[e.pos++]},{terminator:e=>e.data[e.pos++]}]},e=>{var t=s(2)(e);return 33===t[0]&&249===t[1]}),d=r({image:[{code:e=>e.data[e.pos++]},{descriptor:[{left:u(!0)},{top:u(!0)},{width:u(!0)},{height:u(!0)},{lct:c({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},r({lct:l(3,(e,t,n)=>Math.pow(2,n.descriptor.lct.size+1))},(e,t,n)=>n.descriptor.lct.exists),{data:[{minCodeSize:e=>e.data[e.pos++]},h]}]},e=>44===i()(e)),p=r({text:[{codes:o(2)},{blockSize:e=>e.data[e.pos++]},{preData:(e,t,n)=>o(n.text.blockSize)(e)},h]},e=>{var t=s(2)(e);return 33===t[0]&&1===t[1]}),g=r({application:[{codes:o(2)},{blockSize:e=>e.data[e.pos++]},{id:(e,t,n)=>a(n.blockSize)(e)},h]},e=>{var t=s(2)(e);return 33===t[0]&&255===t[1]}),v=r({comment:[{codes:o(2)},h]},e=>{var t=s(2)(e);return 33===t[0]&&254===t[1]});var y=[{header:[{signature:a(3)},{version:a(3)}]},{lsd:[{width:u(!0)},{height:u(!0)},{gct:c({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:e=>e.data[e.pos++]},{pixelAspectRatio:e=>e.data[e.pos++]}]},r({gct:l(3,(e,t)=>Math.pow(2,t.lsd.gct.size+1))},(e,t)=>t.lsd.gct.exists),{frames:((e,t)=>(n,r,i,o)=>{const s=[];for(;t(n,r,i);){const t={};o(n,e,r,t),s.push(t)}return s})([f,g,v,d,p],e=>{var t=i()(e);return 33===t||44===t})}],m=n(12),b=function(e){var t=new Uint8Array(e);return Object(m.parse)({data:t,pos:0},y)},w=function(e,t,n){if(e.image){var r=e.image,i=r.descriptor.width*r.descriptor.height,o=function(e,t,n){var r,i,o,s,a,u,l,c,h,f,d,p,g,v,y,m,b=n,w=new Array(n),S=new Array(4096),x=new Array(4096),_=new Array(4097);for(a=1+(i=1<<(f=e)),r=i+2,l=-1,o=(1<<(s=f+1))-1,c=0;c<i;c++)S[c]=0,x[c]=c;for(d=p=g=v=y=m=0,h=0;h<b;){if(0===v){if(p<s){d+=t[m]<<p,p+=8,m++;continue}if(c=d&o,d>>=s,p-=s,c>r||c==a)break;if(c==i){o=(1<<(s=f+1))-1,r=i+2,l=-1;continue}if(-1==l){_[v++]=x[c],l=c,g=c;continue}for(u=c,c==r&&(_[v++]=g,c=l);c>i;)_[v++]=x[c],c=S[c];g=255&x[c],_[v++]=g,r<4096&&(S[r]=l,x[r]=g,0==(++r&o)&&r<4096&&(s++,o+=r)),l=u}v--,w[y++]=_[v],h++}for(h=y;h<b;h++)w[h]=0;return w}(r.data.minCodeSize,r.data.blocks,i);r.descriptor.lct.interlaced&&(o=function(e,t){for(var n=new Array(e.length),r=e.length/t,i=function(r,i){var o=e.slice(i*t,(i+1)*t);n.splice.apply(n,[r*t,t].concat(o))},o=[0,4,2,1],s=[8,8,4,2],a=0,u=0;u<4;u++)for(var l=o[u];l<r;l+=s[u])i(l,a),a++;return n}(o,r.descriptor.width));var s={pixels:o,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return r.descriptor.lct&&r.descriptor.lct.exists?s.colorTable=r.lct:s.colorTable=t,e.gce&&(s.delay=10*(e.gce.delay||10),s.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(s.transparentIndex=e.gce.transparentColorIndex)),n&&(s.patch=function(e){for(var t=e.pixels.length,n=new Uint8ClampedArray(4*t),r=0;r<t;r++){var i=4*r,o=e.pixels[r],s=e.colorTable[o];n[i]=s[0],n[i+1]=s[1],n[i+2]=s[2],n[i+3]=o!==e.transparentIndex?255:0}return n}(s)),s}console.warn("gif frame does not have associated image.")},S=function(e,t){return e.frames.filter((function(e){return e.image})).map((function(n){return w(n,e.gct,t)}))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m}));var r=n(3),i=n.n(r),o=n(0),s=n.n(o),a=n(1),u=n.n(a),l=n(2),c=n.n(l),h=n(10),f=n(7),d=n(4),p=n(13),g=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},v=h.a.Canvas;function y(e){if(e)return new Promise((function(n,r){if("data"==e.slice(0,4)){var i=new Image;return i.onload=function(){n(i),t(i)},i.onerror=function(){r("Image load error"),t(i)},void(i.src=e)}var o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.onload=function(){n(o)},o.onerror=function(){r("Image load error")},o.src=e}));function t(e){e.onload=null,e.onerror=null}}var m=function(){function t(e){s()(this,t);var n=Object.assign({},e);if(Object.keys(t.defaultOptions).forEach((function(e){e in n||Object.defineProperty(n,e,{value:t.defaultOptions[e],enumerable:!0,writable:!0})})),n.components?"object"===i()(n.components)&&Object.keys(t.defaultComponentOptions).forEach((function(e){e in n.components?Object.defineProperty(n.components,e,{value:Object.assign(Object.assign({},t.defaultComponentOptions[e]),n.components[e]),enumerable:!0,writable:!0}):Object.defineProperty(n.components,e,{value:t.defaultComponentOptions[e],enumerable:!0,writable:!0})})):n.components=t.defaultComponentOptions,null!==n.dotScale&&void 0!==n.dotScale){if(n.dotScale<=0||n.dotScale>1)throw new Error("dotScale should be in range (0, 1].");n.components.data.scale=n.dotScale,n.components.timing.scale=n.dotScale,n.components.alignment.scale=n.dotScale}this.options=n,this.canvas=new v(e.size,e.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new d.a(-1,this.options.correctLevel),Number.isInteger(this.options.maskPattern)&&(this.qrCode.maskPattern=this.options.maskPattern),Number.isInteger(this.options.version)&&(this.qrCode.typeNumber=this.options.version),this.qrCode.addData(this.options.text),this.qrCode.make()}return u()(t,[{key:"draw",value:function(){var e=this;return new Promise((function(t){return e._draw().then(t)}))}},{key:"_clear",value:function(){this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}},{key:"_draw",value:function(){var n,r,i,o,s,a,u,l,h,m,w,S,x,_,E,O,A,C,T;return g(this,void 0,void 0,c.a.mark((function g(){var B,L,R,k,N,D,M,I,P,j,z,$,F,U,V,H,W,Y,G,Q,q,K,X,J,Z,ee,te,ne,re,ie,oe,se,ae,ue,le,ce,he,fe,de,pe,ge,ve,ye,me,be,we,Se,xe,_e,Ee,Oe,Ae,Ce,Te,Be,Le,Re,ke,Ne,De,Me,Ie,Pe,je,ze,$e,Fe,Ue,Ve,He,We,Ye;return c.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(B=null===(n=this.qrCode)||void 0===n?void 0:n.moduleCount,L=this.options.size,((R=this.options.margin)<0||2*R>=L)&&(R=0),k=Math.ceil(R),N=L-2*R,D=this.options.whiteMargin,M=this.options.backgroundDimming,I=Math.ceil(N/B),z=new v(j=(P=I*B)+2*k,j),$=z.getContext("2d"),this._clear(),$.save(),$.translate(k,k),F=new v(j,j),U=F.getContext("2d"),V=null,H=[],!this.options.gifBackground){c.next=47;break}if(W=Object(f.b)(this.options.gifBackground),V=W,H=Object(f.a)(W,!0),!this.options.autoColor){c.next=45;break}Y=0,G=0,Q=0,q=0,K=0;case 28:if(!(K<H[0].colorTable.length)){c.next=41;break}if(!((X=H[0].colorTable[K])[0]>200||X[1]>200||X[2]>200)){c.next=32;break}return c.abrupt("continue",38);case 32:if(0!==X[0]||0!==X[1]||0!==X[2]){c.next=34;break}return c.abrupt("continue",38);case 34:q++,Y+=X[0],G+=X[1],Q+=X[2];case 38:K++,c.next=28;break;case 41:Y=~~(Y/q),G=~~(G/q),Q=~~(Q/q),this.options.colorDark="rgb(".concat(Y,",").concat(G,",").concat(Q,")");case 45:c.next=61;break;case 47:if(!this.options.backgroundImage){c.next=58;break}return c.next=50,y(this.options.backgroundImage);case 50:J=c.sent,this.options.autoColor&&(Z=t._getAverageRGB(J),this.options.colorDark="rgb(".concat(Z.r,",").concat(Z.g,",").concat(Z.b,")")),U.drawImage(J,0,0,J.width,J.height,0,0,j,j),U.rect(0,0,j,j),U.fillStyle=M,U.fill(),c.next=61;break;case 58:U.rect(0,0,j,j),U.fillStyle=this.options.colorLight,U.fill();case 61:for(ee=d.c.getPatternPosition(this.qrCode.typeNumber),te=(null===(i=null===(r=this.options.components)||void 0===r?void 0:r.data)||void 0===i?void 0:i.scale)||.4,ne=.5*(1-te),re=0;re<B;re++)for(ie=0;ie<B;ie++){for(oe=this.qrCode.isDark(re,ie),se=6==re&&ie>=8&&ie<=B-8||6==ie&&re>=8&&re<=B-8,ae=ie<8&&(re<8||re>=B-8)||ie>=B-8&&re<8||se,ue=1;ue<ee.length-1;ue++)ae=ae||re>=ee[ue]-2&&re<=ee[ue]+2&&ie>=ee[ue]-2&&ie<=ee[ue]+2;le=ie*I+(ae?0:ne*I),ce=re*I+(ae?0:ne*I),$.strokeStyle=oe?this.options.colorDark:this.options.colorLight,$.lineWidth=.5,$.fillStyle=oe?this.options.colorDark:this.options.colorLight,0===ee.length?ae||$.fillRect(le,ce,(ae?1:te)*I,(ae?1:te)*I):(he=ie<B-4&&ie>=B-4-5&&re<B-4&&re>=B-4-5,ae||he||$.fillRect(le,ce,(ae?1:te)*I,(ae?1:te)*I))}if(fe=ee[ee.length-1],de=this.options.colorLight,$.fillStyle=de,$.fillRect(0,0,8*I,8*I),$.fillRect(0,(B-8)*I,8*I,8*I),$.fillRect((B-8)*I,0,8*I,8*I),(null===(s=null===(o=this.options.components)||void 0===o?void 0:o.timing)||void 0===s?void 0:s.protectors)&&($.fillRect(8*I,6*I,(B-8-8)*I,I),$.fillRect(6*I,8*I,I,(B-8-8)*I)),(null===(u=null===(a=this.options.components)||void 0===a?void 0:a.cornerAlignment)||void 0===u?void 0:u.protectors)&&t._drawAlignProtector($,fe,fe,I),!(null===(h=null===(l=this.options.components)||void 0===l?void 0:l.alignment)||void 0===h?void 0:h.protectors)){c.next=99;break}pe=0;case 75:if(!(pe<ee.length)){c.next=99;break}ge=0;case 77:if(!(ge<ee.length)){c.next=96;break}if(ve=ee[ge],ye=ee[pe],6!==ve||6!==ye&&ye!==fe){c.next=84;break}return c.abrupt("continue",93);case 84:if(6!==ye||6!==ve&&ve!==fe){c.next=88;break}return c.abrupt("continue",93);case 88:if(ve!==fe||ye!==fe){c.next=92;break}return c.abrupt("continue",93);case 92:t._drawAlignProtector($,ve,ye,I);case 93:ge++,c.next=77;break;case 96:pe++,c.next=75;break;case 99:for($.fillStyle=this.options.colorDark,$.fillRect(0,0,7*I,I),$.fillRect((B-7)*I,0,7*I,I),$.fillRect(0,6*I,7*I,I),$.fillRect((B-7)*I,6*I,7*I,I),$.fillRect(0,(B-7)*I,7*I,I),$.fillRect(0,(B-7+6)*I,7*I,I),$.fillRect(0,0,I,7*I),$.fillRect(6*I,0,I,7*I),$.fillRect((B-7)*I,0,I,7*I),$.fillRect((B-7+6)*I,0,I,7*I),$.fillRect(0,(B-7)*I,I,7*I),$.fillRect(6*I,(B-7)*I,I,7*I),$.fillRect(2*I,2*I,3*I,3*I),$.fillRect((B-7+2)*I,2*I,3*I,3*I),$.fillRect(2*I,(B-7+2)*I,3*I,3*I),me=(null===(w=null===(m=this.options.components)||void 0===m?void 0:m.timing)||void 0===w?void 0:w.scale)||.4,be=.5*(1-me),we=0;we<B-8;we+=2)t._drawDot($,8+we,6,I,be,me),t._drawDot($,6,8+we,I,be,me);Se=(null===(x=null===(S=this.options.components)||void 0===S?void 0:S.cornerAlignment)||void 0===x?void 0:x.scale)||.4,xe=.5*(1-Se),t._drawAlign($,fe,fe,I,xe,Se,this.options.colorDark,(null===(E=null===(_=this.options.components)||void 0===_?void 0:_.cornerAlignment)||void 0===E?void 0:E.protectors)||!1),_e=(null===(A=null===(O=this.options.components)||void 0===O?void 0:O.alignment)||void 0===A?void 0:A.scale)||.4,Ee=.5*(1-_e),Oe=0;case 124:if(!(Oe<ee.length)){c.next=148;break}Ae=0;case 126:if(!(Ae<ee.length)){c.next=145;break}if(Ce=ee[Ae],Te=ee[Oe],6!==Ce||6!==Te&&Te!==fe){c.next=133;break}return c.abrupt("continue",142);case 133:if(6!==Te||6!==Ce&&Ce!==fe){c.next=137;break}return c.abrupt("continue",142);case 137:if(Ce!==fe||Te!==fe){c.next=141;break}return c.abrupt("continue",142);case 141:t._drawAlign($,Ce,Te,I,Ee,_e,this.options.colorDark,(null===(T=null===(C=this.options.components)||void 0===C?void 0:C.alignment)||void 0===T?void 0:T.protectors)||!1);case 142:Ae++,c.next=126;break;case 145:Oe++,c.next=124;break;case 148:if(D&&($.fillStyle=this.options.backgroundColor,$.fillRect(-k,-k,j,k),$.fillRect(-k,P,j,k),$.fillRect(P,-k,k,j),$.fillRect(-k,-k,k,j)),!this.options.logoImage){c.next=179;break}return c.next=152,y(this.options.logoImage);case 152:Be=c.sent,Le=this.options.logoScale,Re=this.options.logoMargin,ke=this.options.logoCornerRadius,(Le<=0||Le>=1)&&(Le=.2),Re<0&&(Re=0),ke<0&&(ke=0),Me=De=.5*(j-(Ne=P*Le)),$.restore(),$.fillStyle=this.options.logoBackgroundColor,$.save(),t._prepareRoundedCornerClip($,De-Re,Me-Re,Ne+2*Re,Ne+2*Re,ke+Re),$.clip(),Ie=$.globalCompositeOperation,$.globalCompositeOperation="destination-out",$.fill(),$.globalCompositeOperation=Ie,$.restore(),$.save(),t._prepareRoundedCornerClip($,De,Me,Ne,Ne,ke),$.clip(),$.drawImage(Be,De,Me,Ne,Ne),$.restore(),$.save(),$.translate(k,k);case 179:if(!V){c.next=191;break}if(H.forEach((function(e){Pe||((Pe=new p.a(L,L)).setDelay(e.delay),Pe.setRepeat(0));var t=e.dims,n=t.width,r=t.height;je||(je=new v(n,r),(ze=je.getContext("2d")).rect(0,0,je.width,je.height),ze.fillStyle="#ffffff",ze.fill()),$e&&Ue&&n===$e.width&&r===$e.height||($e=new v(n,r),Fe=$e.getContext("2d"),Ue=Fe.createImageData(n,r)),Ue.data.set(e.patch),Fe.putImageData(Ue,0,0),ze.drawImage($e.getContext("2d").canvas,e.dims.left,e.dims.top);var i=new v(j,j),o=i.getContext("2d");o.drawImage(je.getContext("2d").canvas,0,0,j,j),o.rect(0,0,j,j),o.fillStyle=M,o.fill(),o.drawImage(z.getContext("2d").canvas,0,0,j,j);var s=new v(L,L),a=s.getContext("2d");a.drawImage(i.getContext("2d").canvas,0,0,L,L),Pe.addFrame(a.getImageData(0,0,s.width,s.height).data)})),Pe){c.next=183;break}throw new Error("No frames.");case 183:if(Pe.finish(),!b(this.canvas)){c.next=188;break}return Ve=Pe.stream().toFlattenUint8Array(),He=Ve.reduce((function(e,t){return e+String.fromCharCode(t)}),""),c.abrupt("return",Promise.resolve("data:image/gif;base64,".concat(window.btoa(He))));case 188:return c.abrupt("return",Promise.resolve(e.from(Pe.stream().toFlattenUint8Array())));case 191:if(U.drawImage(z.getContext("2d").canvas,0,0,j,j),$.drawImage(F.getContext("2d").canvas,-k,-k,j,j),We=new v(L,L),We.getContext("2d").drawImage(z.getContext("2d").canvas,0,0,L,L),this.canvas=We,Ye=this.options.gifBackground?"gif":"png",!b(this.canvas)){c.next=200;break}return c.abrupt("return",Promise.resolve(this.canvas.toDataURL(Ye)));case 200:return c.abrupt("return",Promise.resolve(this.canvas.toBuffer(Ye)));case 201:case"end":return c.stop()}}),g,this)})))}}],[{key:"_prepareRoundedCornerClip",value:function(e,t,n,r,i,o){e.beginPath(),e.moveTo(t,n),e.arcTo(t+r,n,t+r,n+i,o),e.arcTo(t+r,n+i,t,n+i,o),e.arcTo(t,n+i,t,n,o),e.arcTo(t,n,t+r,n,o),e.closePath()}},{key:"_getAverageRGB",value:function(e){var t,n,r={r:0,g:0,b:0},i=-4,o={r:0,g:0,b:0},s=0;n=e.naturalHeight||e.height,t=e.naturalWidth||e.width;var a,u=new v(t,n).getContext("2d");if(!u)return r;u.drawImage(e,0,0);try{a=u.getImageData(0,0,t,n)}catch(e){return r}for(;(i+=20)<a.data.length;)a.data[i]>200||a.data[i+1]>200||a.data[i+2]>200||(++s,o.r+=a.data[i],o.g+=a.data[i+1],o.b+=a.data[i+2]);return o.r=~~(o.r/s),o.g=~~(o.g/s),o.b=~~(o.b/s),o}},{key:"_drawDot",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;e.fillRect((t+i)*r,(n+i)*r,o*r,o*r)}},{key:"_drawAlignProtector",value:function(e,t,n,r){e.clearRect((t-2)*r,(n-2)*r,5*r,5*r),e.fillRect((t-2)*r,(n-2)*r,5*r,5*r)}},{key:"_drawAlign",value:function(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,l=e.fillStyle;e.fillStyle=a,new Array(4).fill(0).map((function(a,u){t._drawDot(e,n-2+u,r-2,i,o,s),t._drawDot(e,n+2,r-2+u,i,o,s),t._drawDot(e,n+2-u,r+2,i,o,s),t._drawDot(e,n-2,r+2-u,i,o,s)})),t._drawDot(e,n,r,i,o,s),u||(e.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map((function(a,u){t._drawDot(e,n-1+u,r-1,i,o,s),t._drawDot(e,n+1,r-1+u,i,o,s),t._drawDot(e,n+1-u,r+1,i,o,s),t._drawDot(e,n-1,r+1-u,i,o,s)}))),e.fillStyle=l}}]),t}();function b(e){try{return e instanceof HTMLElement}catch(t){return"object"===i()(e)&&1===e.nodeType&&"object"===i()(e.style)&&"object"===i()(e.ownerDocument)}}m.CorrectLevel=d.b,m.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},m.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:d.b.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:m.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"}}).call(this,n(16).Buffer)},function(e,t,n){"use strict";var r=n(11);const{asBuffer:i,asDownload:o,asZipDownload:s,atScale:a,options:u}=r.a,l=Symbol.for("toDataURL"),{CanvasRenderingContext2D:c,CanvasGradient:h,CanvasPattern:f,Image:d,ImageData:p,Path2D:g,DOMMatrix:v,DOMRect:y,DOMPoint:m}=window,b={Canvas:class{constructor(e,t){let n=document.createElement("canvas"),r=[];for(var[c,h]of(Object.defineProperty(n,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>i(n,"image/png"),jpg:()=>i(n,"image/jpeg"),pages:()=>r.concat(n).map(e=>e.getContext("2d"))})))Object.defineProperty(n,c,{get:h});return Object.assign(n,{width:e,height:t,newPage(...e){var{width:t,height:i}=n,o=Object.assign(document.createElement("canvas"),{width:t,height:i});o.getContext("2d").drawImage(n,0,0),r.push(o);var[t,i]=e.length?e:[t,i];return Object.assign(n,{width:t,height:i}).getContext("2d")},saveAs(e,t){t="number"==typeof t?{quality:t}:t;let n=u(this.pages,{filename:e,...t}),{pattern:r,padding:i,mime:l,quality:c,matte:h,density:f,archive:d}=n,p=a(n.pages,f);return null==i?o(p[0],l,c,h,e):s(p,l,c,h,d,r,i)},toBuffer(e="png",t={}){t="number"==typeof t?{quality:t}:t;let n=u(this.pages,{extension:e,...t}),{mime:r,quality:o,matte:s,pages:l,density:c}=n,h=a(l,c,s)[0];return i(h,r,o,s)},[l]:n.toDataURL.bind(n),toDataURL(e="png",t={}){t="number"==typeof t?{quality:t}:t;let r=u(this.pages,{extension:e,...t}),{mime:i,quality:o,matte:s,pages:c,density:h}=r,f=a(c,h,s)[0],d=f[f===n?l:"toDataURL"](i,o);return Promise.resolve(d)}})}},loadImage:e=>new Promise((t,n)=>Object.assign(new d,{crossOrigin:"Anonymous",onload:t,onerror:n,src:e})),CanvasRenderingContext2D:c,CanvasGradient:h,CanvasPattern:f,Image:d,ImageData:p,Path2D:g,DOMMatrix:v,DOMRect:y,DOMPoint:m};t.a=b},function(e,t,n){"use strict";(function(e){var r=n(5);class i{constructor(){let t=void 0===e,n="image/png",r="image/jpeg",i="application/pdf",o="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:t?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:t?{png:n,jpg:r,jpeg:"image/jpeg",webp:"image/webp"}:{png:n,jpg:r,jpeg:"image/jpeg",pdf:i,svg:o},mimes:t?{[n]:"png",[r]:"jpg","image/webp":"webp"}:{[n]:"png",[r]:"jpg",[i]:"pdf",[o]:"svg"}})}toMime(e){return this.formats[(e||"").replace(/^\./,"").toLowerCase()]}fromMime(e){return this.mimes[e]}}class o{static for(e){return(new o).append(e).get()}constructor(){this.crc=-1}get(){return~this.crc}append(e){for(var t=0|this.crc,n=this.table,r=0,i=0|e.length;r<i;r++)t=t>>>8^n[255&(t^e[r])];return this.crc=t,this}}function s(e){let t=new Uint8Array(e),n=new DataView(t.buffer),r={array:t,view:n,size:e,set8:(e,t)=>(n.setUint8(e,t),r),set16:(e,t)=>(n.setUint16(e,t,!0),r),set32:(e,t)=>(n.setUint32(e,t,!0),r),bytes:(e,n)=>(t.set(n,e),r)};return r}o.prototype.table=(()=>{var e,t,n,r=[];for(e=0;e<256;e++){for(n=e,t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;r[e]=n}return r})();class a{constructor(e){let t=new Date;Object.assign(this,{directory:e,offset:0,files:[],time:(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,date:(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate()}),this.add(e)}async add(e,t){let n=!t,r=a.encoder.encode(`${this.directory}/${n?"":e}`),i=new Uint8Array(n?0:await t.arrayBuffer()),u=30+r.length,l=u+i.length,{offset:c}=this,h=s(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,o.for(i)).set32(14,i.length).set32(18,i.length).set16(22,r.length);c+=u;let f=s(u+i.length+16).set32(0,67324752).bytes(4,h.array).bytes(30,r).bytes(u,i);c+=i.length,f.set32(l,134695760).bytes(l+4,h.array.slice(10,22)),c+=16,this.files.push({offset:c,folder:n,name:r,header:h,payload:f}),this.offset=c}toBuffer(){let e=this.files.reduce((e,{name:t})=>46+t.length+e,0),t=s(e+22),n=0;for(var{offset:r,name:i,header:o,folder:a}of this.files)t.set32(n,33639248).set16(n+4,20).bytes(n+6,o.array).set8(n+38,a?16:0).set32(n+42,r).bytes(n+46,i),n+=46+i.length;t.set32(n,101010256).set16(n+8,this.files.length).set16(n+10,this.files.length).set32(n+12,e).set32(n+16,this.offset);let u=new Uint8Array(this.offset+t.size),l=0;for(var{payload:c}of this.files)u.set(c.array,l),l+=c.size;return u.set(t.array,l),u}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}a.encoder=new TextEncoder;const u=(e,t,n,r)=>{if(r){let{width:t,height:n}=e,i=Object.assign(document.createElement("canvas"),{width:t,height:n}),o=i.getContext("2d");o.fillStyle=r,o.fillRect(0,0,t,n),o.drawImage(e,0,0),e=i}return new Promise((r,i)=>e.toBlob(r,t,n))},l=(e,t)=>{const n=window.URL.createObjectURL(t),r=document.createElement("a");r.style.display="none",r.href=n,r.setAttribute("download",e),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),setTimeout(()=>window.URL.revokeObjectURL(n),100)},c={asBuffer:(...e)=>u(...e).then(e=>e.arrayBuffer()),asDownload:async(e,t,n,r,i)=>{l(i,await u(e,t,n,r))},asZipDownload:async(e,t,n,i,o,s,c)=>{let h=Object(r.basename)(o,".zip")||"archive",f=new a(h);await Promise.all(e.map(async(e,r)=>{let o=(e=>s.replace("{}",String(e+1).padStart(c,"0")))(r);await f.add(o,await u(e,t,n,i))})),l(h+".zip",f.blob)},atScale:(e,t,n)=>e.map(e=>{if(1==t&&!n)return e.canvas;let r=document.createElement("canvas"),i=r.getContext("2d"),o=e.canvas?e.canvas:e;return r.width=o.width*t,r.height=o.height*t,n&&(i.fillStyle=n,i.fillRect(0,0,r.width,r.height)),i.scale(t,t),i.drawImage(o,0,0),r}),options:function(e,{filename:t="",extension:n="",format:o,page:s,quality:a,matte:u,density:l,outline:c,archive:h}={}){var{fromMime:f,toMime:d,expected:p}=new i,g=(h=h||"canvas",o||n.replace(/@\d+x$/i,"")||Object(r.extname)(t)),v=(o=f(d(g)||g),d(o)),y=e.length;if(!g)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!o)throw new Error(`Unsupported file format "${g}" (expected ${p})`);if(!y)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let m,b,w=t.replace(/{(\d*)}/g,(e,t)=>(b=!0,t=parseInt(t,10),m=isFinite(t)?t:isFinite(m)?m:-1,"{}")),S=s>0?s-1:s<0?y+s:void 0;if(isFinite(S)&&S<0||S>=y)throw new RangeError(1==y?`Canvas only has a ‘page 1’ (${S} is out of bounds)`:`Canvas has pages 1–${y} (${S} is out of bounds)`);if(e=isFinite(S)?[e[S]]:b||"pdf"==o?e:e.slice(-1),void 0===a)a=.92;else if("number"!=typeof a||!isFinite(a)||a<0||a>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(void 0===l){let e=(n||Object(r.basename)(t,g)).match(/@(\d+)x$/i);l=e?parseInt(e[1],10):1}else if("number"!=typeof l||!Number.isInteger(l)||l<1)throw new TypeError("The density option must be a non-negative integer");return void 0===c?c=!0:"svg"==o&&(c=!!c),{filename:t,pattern:w,format:o,mime:v,pages:e,padding:m,quality:a,matte:u,density:l,outline:c,archive:h}}};t.a=c}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loop=t.conditional=t.parse=void 0,t.parse=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;if(Array.isArray(n))n.forEach((function(n){return e(t,n,r,i)}));else if("function"==typeof n)n(t,r,i,e);else{var o=Object.keys(n)[0];Array.isArray(n[o])?(i[o]={},e(t,n[o],r,i[o])):i[o]=n[o](t,r,i,e)}return r},t.conditional=function(e,t){return function(n,r,i,o){t(n,r,i)&&o(n,e,r,i)}},t.loop=function(e,t){return function(n,r,i,o){for(var s=[];t(n,r,i);){var a={};o(n,e,r,a),s.push(a)}return s}}},function(e,t,n){"use strict";var r=function(e,t){var n,r,i,o,s;function a(e,t,r,i,o){n[t][0]-=e*(n[t][0]-r)/1024,n[t][1]-=e*(n[t][1]-i)/1024,n[t][2]-=e*(n[t][2]-o)/1024}function u(e,t,r,i,o){for(var a,u,l=Math.abs(t-e),c=Math.min(t+e,256),h=t+1,f=t-1,d=1;h<c||f>l;)u=s[d++],h<c&&((a=n[h++])[0]-=u*(a[0]-r)/(1<<18),a[1]-=u*(a[1]-i)/(1<<18),a[2]-=u*(a[2]-o)/(1<<18)),f>l&&((a=n[f--])[0]-=u*(a[0]-r)/(1<<18),a[1]-=u*(a[1]-i)/(1<<18),a[2]-=u*(a[2]-o)/(1<<18))}function l(e,t,r){var s,a,u,l,c,h=~(1<<31),f=h,d=-1,p=d;for(s=0;s<256;s++)a=n[s],(u=Math.abs(a[0]-e)+Math.abs(a[1]-t)+Math.abs(a[2]-r))<h&&(h=u,d=s),(l=u-(i[s]>>12))<f&&(f=l,p=s),c=o[s]>>10,o[s]-=c,i[s]+=c<<10;return o[d]+=64,i[d]-=65536,p}this.buildColormap=function(){!function(){var e,t;for(n=[],r=new Int32Array(256),i=new Int32Array(256),o=new Int32Array(256),s=new Int32Array(32),e=0;e<256;e++)t=(e<<12)/256,n[e]=new Float64Array([t,t,t,0]),o[e]=256,i[e]=0}(),function(){var n,r,i,o,c,h,f=e.length,d=30+(t-1)/3,p=f/(3*t),g=~~(p/100),v=1024,y=2048,m=y>>6;for(m<=1&&(m=0),n=0;n<m;n++)s[n]=v*(256*(m*m-n*n)/(m*m));f<1509?(t=1,r=3):r=f%499!=0?1497:f%491!=0?1473:f%487!=0?1461:1509;var b=0;for(n=0;n<p;)if(a(v,h=l(i=(255&e[b])<<4,o=(255&e[b+1])<<4,c=(255&e[b+2])<<4),i,o,c),0!==m&&u(m,h,i,o,c),(b+=r)>=f&&(b-=f),0===g&&(g=1),++n%g==0)for(v-=v/d,(m=(y-=y/30)>>6)<=1&&(m=0),h=0;h<m;h++)s[h]=v*(256*(m*m-h*h)/(m*m))}(),function(){for(var e=0;e<256;e++)n[e][0]>>=4,n[e][1]>>=4,n[e][2]>>=4,n[e][3]=e}(),function(){var e,t,i,o,s,a,u=0,l=0;for(e=0;e<256;e++){for(s=e,a=(i=n[e])[1],t=e+1;t<256;t++)(o=n[t])[1]<a&&(s=t,a=o[1]);if(o=n[s],e!=s&&(t=o[0],o[0]=i[0],i[0]=t,t=o[1],o[1]=i[1],i[1]=t,t=o[2],o[2]=i[2],i[2]=t,t=o[3],o[3]=i[3],i[3]=t),a!=u){for(r[u]=l+e>>1,t=u+1;t<a;t++)r[t]=e;u=a,l=e}}for(r[u]=l+255>>1,t=u+1;t<256;t++)r[t]=255}()},this.getColormap=function(){for(var e=[],t=[],r=0;r<256;r++)t[n[r][3]]=r;for(var i=0,o=0;o<256;o++){var s=t[o];e[i++]=n[s][0],e[i++]=n[s][1],e[i++]=n[s][2]}return e},this.lookupRGB=function(e,t,i){for(var o,s,a,u=1e3,l=-1,c=r[t],h=c-1;c<256||h>=0;)c<256&&((a=(s=n[c])[1]-t)>=u?c=256:(c++,a<0&&(a=-a),(o=s[0]-e)<0&&(o=-o),(a+=o)<u&&((o=s[2]-i)<0&&(o=-o),(a+=o)<u&&(u=a,l=s[3])))),h>=0&&((a=t-(s=n[h])[1])>=u?h=-1:(h--,a<0&&(a=-a),(o=s[0]-e)<0&&(o=-o),(a+=o)<u&&((o=s[2]-i)<0&&(o=-o),(a+=o)<u&&(u=a,l=s[3]))));return l}},i=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],o=function(e,t,n,r){var o,s,a,u,l,c,h,f,d,p=Math.max(2,r),g=new Uint8Array(256),v=new Int32Array(5003),y=new Int32Array(5003),m=0,b=0,w=!1;function S(e,t){g[s++]=e,s>=254&&E(t)}function x(e){_(5003),b=l+2,w=!0,C(l,e)}function _(e){for(var t=0;t<e;++t)v[t]=-1}function E(e){s>0&&(e.writeByte(s),e.writeBytes(g,0,s),s=0)}function O(e){return(1<<e)-1}function A(){return 0===h?-1:(--h,255&n[f++])}function C(e,t){for(o&=i[m],m>0?o|=e<<m:o=e,m+=d;m>=8;)S(255&o,t),o>>=8,m-=8;if((b>a||w)&&(w?(a=O(d=u),w=!1):(++d,a=12==d?4096:O(d))),e==c){for(;m>0;)S(255&o,t),o>>=8,m-=8;E(t)}}this.encode=function(n){n.writeByte(p),h=e*t,f=0,function(e,t){var n,r,i,o,h,f;for(w=!1,a=O(d=u=e),c=1+(l=1<<e-1),b=l+2,s=0,o=A(),f=0,n=5003;n<65536;n*=2)++f;f=8-f,_(5003),C(l,t);e:for(;-1!=(r=A());)if(n=(r<<12)+o,v[i=r<<f^o]!==n){if(v[i]>=0){h=5003-i,0===i&&(h=1);do{if((i-=h)<0&&(i+=5003),v[i]===n){o=y[i];continue e}}while(v[i]>=0)}C(o,t),o=r,b<4096?(y[i]=b++,v[i]=n):x(t)}else o=y[i];C(o,t),C(c,t)}(p+1,n),n.writeByte(0)}};function s(){this.page=-1,this.pages=[],this.newPage()}s.pageSize=4096,s.charMap={};for(var a=0;a<256;a++)s.charMap[a]=String.fromCharCode(a);function u(e,t){this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new s}s.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(s.pageSize),this.cursor=0},s.prototype.getData=function(){for(var e="",t=0;t<this.pages.length;t++)for(var n=0;n<s.pageSize;n++)e+=s.charMap[this.pages[t][n]];return e},s.prototype.toFlattenUint8Array=function(){for(var e=[],t=0;t<this.pages.length;t++)if(t===this.pages.length-1){var n=Uint8Array.from(this.pages[t].slice(0,this.cursor));e.push(n)}else e.push(this.pages[t]);var r=new Uint8Array(e.reduce((function(e,t){return e+t.length}),0));return e.reduce((function(e,t){return r.set(t,e),e+t.length}),0),r},s.prototype.writeByte=function(e){this.cursor>=s.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=e},s.prototype.writeUTFBytes=function(e){for(var t=e.length,n=0;n<t;n++)this.writeByte(e.charCodeAt(n))},s.prototype.writeBytes=function(e,t,n){for(var r=n||e.length,i=t||0;i<r;i++)this.writeByte(e[i])},u.prototype.setDelay=function(e){this.delay=Math.round(e/10)},u.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},u.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},u.prototype.setRepeat=function(e){this.repeat=e},u.prototype.setTransparent=function(e){this.transparent=e},u.prototype.addFrame=function(e){this.image=e,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeHeader(),this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.globalPalette||this.writePalette(),this.writePixels(),this.firstFrame=!1},u.prototype.finish=function(){this.out.writeByte(59)},u.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},u.prototype.setDither=function(e){!0===e&&(e="FloydSteinberg"),this.dither=e},u.prototype.setGlobalPalette=function(e){this.globalPalette=e},u.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},u.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},u.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new r(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},u.prototype.indexPixels=function(e){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var n=0,r=0;r<t;r++){var i=this.findClosestRGB(255&this.pixels[n++],255&this.pixels[n++],255&this.pixels[n++]);this.usedEntry[i]=!0,this.indexedPixels[r]=i}},u.prototype.ditherPixels=function(e,t){var n={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!e||!n[e])throw"Unknown dithering kernel: "+e;var r=n[e],i=0,o=this.height,s=this.width,a=this.pixels,u=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var l=0;l<o;l++){t&&(u*=-1);for(var c=1==u?0:s-1,h=1==u?s:0;c!==h;c+=u){var f=3*(i=l*s+c),d=a[f],p=a[f+1],g=a[f+2];f=this.findClosestRGB(d,p,g),this.usedEntry[f]=!0,this.indexedPixels[i]=f,f*=3;for(var v=d-this.colorTab[f],y=p-this.colorTab[f+1],m=g-this.colorTab[f+2],b=1==u?0:r.length-1,w=1==u?r.length:0;b!==w;b+=u){var S=r[b][1],x=r[b][2];if(S+c>=0&&S+c<s&&x+l>=0&&x+l<o){var _=r[b][0];f=i+S+x*s,a[f*=3]=Math.max(0,Math.min(255,a[f]+v*_)),a[f+1]=Math.max(0,Math.min(255,a[f+1]+y*_)),a[f+2]=Math.max(0,Math.min(255,a[f+2]+m*_))}}}}},u.prototype.findClosest=function(e,t){return this.findClosestRGB((16711680&e)>>16,(65280&e)>>8,255&e,t)},u.prototype.findClosestRGB=function(e,t,n,r){if(null===this.colorTab)return-1;if(this.neuQuant&&!r)return this.neuQuant.lookupRGB(e,t,n);for(var i=0,o=16777216,s=this.colorTab.length,a=0,u=0;a<s;u++){var l=e-(255&this.colorTab[a++]),c=t-(255&this.colorTab[a++]),h=n-(255&this.colorTab[a++]),f=l*l+c*c+h*h;(!r||this.usedEntry[u])&&f<o&&(o=f,i=u)}return i},u.prototype.getImagePixels=function(){var e=this.width,t=this.height;this.pixels=new Uint8Array(e*t*3);for(var n=this.image,r=0,i=0,o=0;o<t;o++)for(var s=0;s<e;s++)this.pixels[i++]=n[r++],this.pixels[i++]=n[r++],this.pixels[i++]=n[r++],r++},u.prototype.writeGraphicCtrlExt=function(){var e,t;this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4),null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&this.dispose),t<<=2,this.out.writeByte(0|t|e),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},u.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},u.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},u.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},u.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.out.writeByte(0)},u.prototype.writeShort=function(e){this.out.writeByte(255&e),this.out.writeByte(e>>8&255)},u.prototype.writePixels=function(){new o(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},u.prototype.stream=function(){return this.out},t.a=u},function(e,t,n){e.exports=n(21)},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),s=new _(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===c)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,s),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function h(){}function f(){}function d(){}var p={};a(p,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(E([])));v&&v!==t&&n.call(v,i)&&(p=v);var y=d.prototype=h.prototype=Object.create(p);function m(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function s(){return new t((function(r,s){!function r(i,o,s,a){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(h).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,a)}))}a(u.arg)}(i,o,r,s)}))}return r=r?r.then(s,s):s()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,a(y,"constructor",d),a(d,"constructor",f),f.displayName=a(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},m(b.prototype),a(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},m(y),a(y,s,"Generator"),a(y,i,(function(){return this})),a(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";(function(e){
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
var r=n(17),i=n(18),o=n(19);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(c(t),e=a(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return $(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(l(e,o+f)!==l(t,f)){h=!1;break}if(h)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return U($(t,e.length-n),e,n,r)}function S(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return S(e,t,n,r)}function _(e,t,n,r){return U(F(t),e,n,r)}function E(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,l=e[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function B(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=z(e[o]);return i}function L(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,r,o){return o||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return h(null,e)},u.allocUnsafeSlow=function(e){return h(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).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}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(r,i),c=e.slice(t,n),h=0;h<a;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:$(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(8))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),c=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(c(e,s,s+16383>a?a:s+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,h=n?i-1:0,f=n?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=l}return(d?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+d]=255&s,d+=p,s/=256,l-=8);e[n+d-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++h<t;)u&&u[h].run();h=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r=n(6),i=n.n(r),o=n(2),s=n.n(o);function a(e){return""===e?e:"true"===e||"1"==e}var u=function(e,t){return new Promise((function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(r.response)},r.open("GET",e),r.send()}))},l=n(9),c=function(e,t,n,r,i,o,s,a){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=u):i&&(u=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,u):[u]}return{exports:e,options:l}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var e=this;return i()(s.a.mark((function t(){var n,r,i,o;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.gifBgSrc){t.next=7;break}return t.next=3,u(e.gifBgSrc);case 3:return n=t.sent,r=e.logoSrc,e.render(void 0,r,n),t.abrupt("return");case 7:i=e.bgSrc,o=e.logoSrc,e.render(i,o);case 10:case"end":return t.stop()}}),t)})))()},render:function(e,t,n){var r=this;return i()(s.a.mark((function i(){var o;return s.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=r,new l.a({gifBackground:n,text:o.text,size:o.size,margin:o.margin,colorDark:o.colorDark,colorLight:o.colorLight,backgroundColor:o.backgroundColor,backgroundImage:e,backgroundDimming:o.backgroundDimming,logoImage:t,logoScale:o.logoScale,logoBackgroundColor:o.logoBackgroundColor,correctLevel:o.correctLevel,logoMargin:o.logoMargin,logoCornerRadius:o.logoCornerRadius,whiteMargin:a(o.whiteMargin),dotScale:o.dotScale,autoColor:a(o.autoColor),binarize:a(o.binarize),binarizeThreshold:o.binarizeThreshold,components:o.components}).draw().then((function(e){r.imgUrl=e,o.callback&&o.callback(e,o.qid)}));case 2:case"end":return i.stop()}}),i)})))()}}},(function(){var e=this.$createElement,t=this._self._c||e;return this.bindElement?t("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()}),[],!1,null,null,null).exports;c.install=function(e){return e.component(c.name,c)};var h=c,f=[h];"undefined"!=typeof window&&window.Vue&&function(e){f.map((function(t){e.component(t.name,t)}))}(window.Vue),t.default=h}])}))},6613:function(e,t,n){n("a630"),n("fb6a"),n("b0c0"),n("d3b7"),n("25f0"),n("3ca3");var r=n("5a43");function i(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}e.exports=i},"69a0":function(e,t,n){(function(t){e.exports=t()})((function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];n+=(r&i|~r&o)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[2]+606105819|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[10]-42063|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&o|i&~o)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[11]+643717713|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[15]-660478335|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[3]-187363961|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^o)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[7]-155497632|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[3]-722521979|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[15]+530742520|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~o))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[10]-1051523|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[2]+718787259|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,l=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(c,r(e.substring(t-64,t)));for(e=e.substring(t-64),i=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return s=8*l,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(c,o),c}function s(e){var t,r,o,s,a,u,l=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(c,i(e.subarray(t-64,t)));for(e=t-64<l?e.subarray(t-64):new Uint8Array(0),r=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return s=8*l,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(c,o),c}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function h(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==u(o("hello"))&&function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return e=0|e||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,l=t(n,u),c=u;return r!==e&&(c=t(r,u)),l>c?new ArrayBuffer(0):(i=c-l,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,l,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=8*this._length,r=r.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=o(e),r=u(n);return t?d(r):r},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=f(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=h(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=c(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=s(new Uint8Array(e)),r=u(n);return t?d(r):r},p}))},7026:function(e,t,n){
|
|
/*!
|
|
* vue-treeselect v0.0.38 | (c) 2017-2019 Riophae Lee
|
|
* Released under the MIT License.
|
|
* https://vue-treeselect.js.org/
|
|
*/
|
|
e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=17)}([function(e,t){e.exports=n("278c")},function(e,t){e.exports=n("9523")},function(e,t){e.exports=n("448a")},function(e,t){e.exports=n("3156")},function(e,t){e.exports=n("2e39")},function(e,t){e.exports=n("bcdf")},function(e,t){e.exports=n("b047")},function(e,t){e.exports=n("df0f")},function(e,t){e.exports=n("2655")},function(e,t){e.exports=n("1d92")},function(e,t){e.exports=n("cd9d")},function(e,t){e.exports=n("72f0")},function(e,t){e.exports=n("7037")},function(e,t){e.exports=n("4416")},function(e,t){e.exports=n("92fa")},function(e,t){e.exports=n("2b0e")},function(e,t,n){},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(1),s=n.n(o),a=n(2),u=n.n(a),l=n(3),c=n.n(l),h=n(4),f=n.n(h),d=n(5),p=n.n(d),g=p.a;function v(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.call.apply(e,[this,t].concat(r))}}}function y(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight):r.top-i<n.top&&(e.scrollTop=Math.max(t.offsetTop-i,0))}var m,b=n(6),w=n.n(b),S=n(7),x=n.n(S);function _(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}var E=[],O=100;function A(){m=setInterval((function(){E.forEach(T)}),O)}function C(){clearInterval(m),m=null}function T(e){var t=e.$el,n=e.listener,r=e.lastWidth,i=e.lastHeight,o=t.offsetWidth,s=t.offsetHeight;r===o&&i===s||(e.lastWidth=o,e.lastHeight=s,n({width:o,height:s}))}function B(e,t){var n={$el:e,listener:t,lastWidth:null,lastHeight:null},r=function(){_(E,n),E.length||C()};return E.push(n),T(n),A(),r}function L(e,t){var n=9===document.documentMode,r=!0,i=function(){return r||t.apply(void 0,arguments)},o=n?B:x.a,s=o(e,i);return r=!1,s}function R(e){var t=[],n=e.parentNode;while(n&&"BODY"!==n.nodeName&&n.nodeType===document.ELEMENT_NODE)k(n)&&t.push(n),n=n.parentNode;return t.push(window),t}function k(e){var t=getComputedStyle(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)}function N(e,t){var n=R(e);return window.addEventListener("resize",t,{passive:!0}),n.forEach((function(e){e.addEventListener("scroll",t,{passive:!0})})),function(){window.removeEventListener("resize",t),n.forEach((function(e){e.removeEventListener("scroll",t)}))}}function D(e){return e!==e}var M=n(8),I=n.n(M),P=n(9),j=n.n(P),z=n(10),$=n.n(z),F=n(11),U=n.n(F),V=function(){return Object.create(null)},H=n(12),W=n.n(H);function Y(e){return null!=e&&"object"===W()(e)&&Object.getPrototypeOf(e)===Object.prototype}function G(e,t,n){Y(n)?(e[t]||(e[t]={}),Q(e[t],n)):e[t]=n}function Q(e,t){if(Y(t))for(var n=Object.keys(t),r=0,i=n.length;r<i;r++)G(e,n[r],t[n[r]]);return e}var q=n(13),K=n.n(q);function X(e,t){return-1!==e.indexOf(t)}function J(e,t,n){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}function Z(e,t){if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}var ee=null,te=0,ne=1,re=2,ie="ALL_CHILDREN",oe="ALL_DESCENDANTS",se="LEAF_CHILDREN",ae="LEAF_DESCENDANTS",ue="LOAD_ROOT_OPTIONS",le="LOAD_CHILDREN_OPTIONS",ce="ASYNC_SEARCH",he="ALL",fe="BRANCH_PRIORITY",de="LEAF_PRIORITY",pe="ALL_WITH_INDETERMINATE",ge="ORDER_SELECTED",ve="LEVEL",ye="INDEX",me={BACKSPACE:8,ENTER:13,ESCAPE:27,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46},be=200,we=5,Se=40;function xe(e,t){var n=0;do{if(e.level<n)return-1;if(t.level<n)return 1;if(e.index[n]!==t.index[n])return e.index[n]-t.index[n];n++}while(1)}function _e(e,t){return e.level===t.level?xe(e,t):e.level-t.level}function Ee(){return{isLoaded:!1,isLoading:!1,loadingError:""}}function Oe(e){return"string"===typeof e?e:"number"!==typeof e||D(e)?"":e+""}function Ae(e,t,n){return e?f()(t,n):X(n,t)}function Ce(e){return e.message||String(e)}var Te=0,Be={provide:function(){return{instance:this}},props:{allowClearingDisabled:{type:Boolean,default:!1},allowSelectingDisabledDescendants:{type:Boolean,default:!1},alwaysOpen:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},async:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},autoLoadRootOptions:{type:Boolean,default:!0},autoDeselectAncestors:{type:Boolean,default:!1},autoDeselectDescendants:{type:Boolean,default:!1},autoSelectAncestors:{type:Boolean,default:!1},autoSelectDescendants:{type:Boolean,default:!1},backspaceRemoves:{type:Boolean,default:!0},beforeClearAll:{type:Function,default:U()(!0)},branchNodesFirst:{type:Boolean,default:!1},cacheOptions:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},clearAllText:{type:String,default:"Clear all"},clearOnSelect:{type:Boolean,default:!1},clearValueText:{type:String,default:"Clear value"},closeOnSelect:{type:Boolean,default:!0},defaultExpandLevel:{type:Number,default:0},defaultOptions:{default:!1},deleteRemoves:{type:Boolean,default:!0},delimiter:{type:String,default:","},flattenSearchResults:{type:Boolean,default:!1},disableBranchNodes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disableFuzzyMatching:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},id:{default:null},instanceId:{default:function(){return"".concat(Te++,"$$")},type:[String,Number]},joinValues:{type:Boolean,default:!1},limit:{type:Number,default:1/0},limitText:{type:Function,default:function(e){return"and ".concat(e," more")}},loading:{type:Boolean,default:!1},loadingText:{type:String,default:"Loading..."},loadOptions:{type:Function},matchKeys:{type:Array,default:U()(["label"])},maxHeight:{type:Number,default:300},multiple:{type:Boolean,default:!1},name:{type:String},noChildrenText:{type:String,default:"No sub-options."},noOptionsText:{type:String,default:"No options available."},noResultsText:{type:String,default:"No results found..."},normalizer:{type:Function,default:$.a},openDirection:{type:String,default:"auto",validator:function(e){var t=["auto","top","bottom","above","below"];return X(t,e)}},openOnClick:{type:Boolean,default:!0},openOnFocus:{type:Boolean,default:!1},options:{type:Array},placeholder:{type:String,default:"Select..."},required:{type:Boolean,default:!1},retryText:{type:String,default:"Retry?"},retryTitle:{type:String,default:"Click to retry"},searchable:{type:Boolean,default:!0},searchNested:{type:Boolean,default:!1},searchPromptText:{type:String,default:"Type to search..."},showCount:{type:Boolean,default:!1},showCountOf:{type:String,default:ie,validator:function(e){var t=[ie,oe,se,ae];return X(t,e)}},showCountOnSearch:null,sortValueBy:{type:String,default:ge,validator:function(e){var t=[ge,ve,ye];return X(t,e)}},tabIndex:{type:Number,default:0},value:null,valueConsistsOf:{type:String,default:fe,validator:function(e){var t=[he,fe,de,pe];return X(t,e)}},valueFormat:{type:String,default:"id"},zIndex:{type:[Number,String],default:999}},data:function(){return{trigger:{isFocused:!1,searchQuery:""},menu:{isOpen:!1,current:null,lastScrollPosition:0,placement:"bottom"},forest:{normalizedOptions:[],nodeMap:V(),checkedStateMap:V(),selectedNodeIds:this.extractCheckedNodeIdsFromValue(),selectedNodeMap:V()},rootOptionsStates:Ee(),localSearch:{active:!1,noResults:!0,countMap:V()},remoteSearch:V()}},computed:{selectedNodes:function(){return this.forest.selectedNodeIds.map(this.getNode)},internalValue:function(){var e,t=this;if(this.single||this.flat||this.disableBranchNodes||this.valueConsistsOf===he)e=this.forest.selectedNodeIds.slice();else if(this.valueConsistsOf===fe)e=this.forest.selectedNodeIds.filter((function(e){var n=t.getNode(e);return!!n.isRootNode||!t.isSelected(n.parentNode)}));else if(this.valueConsistsOf===de)e=this.forest.selectedNodeIds.filter((function(e){var n=t.getNode(e);return!!n.isLeaf||0===n.children.length}));else if(this.valueConsistsOf===pe){var n,r=[];e=this.forest.selectedNodeIds.slice(),this.selectedNodes.forEach((function(t){t.ancestors.forEach((function(t){X(r,t.id)||X(e,t.id)||r.push(t.id)}))})),(n=e).push.apply(n,r)}return this.sortValueBy===ve?e.sort((function(e,n){return _e(t.getNode(e),t.getNode(n))})):this.sortValueBy===ye&&e.sort((function(e,n){return xe(t.getNode(e),t.getNode(n))})),e},hasValue:function(){return this.internalValue.length>0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"===typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){var n=Z(e,t);n&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue(),t=Z(e,this.internalValue);t&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(g((function(){return null==e.id}),(function(){return"`id` prop is deprecated. Use `instanceId` instead."})),g((function(){return!e.autofocus}),(function(){return"`autofocus` prop is deprecated. Use `autoFocus` instead."})),g((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||g((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&g((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){var t=["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"];t.forEach((function(t){g((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=V(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(ee,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return g((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n=this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),r={id:e,label:n,ancestors:[],parentNode:ee,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,r)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};if("id"===this.valueFormat)return n;var r=this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],i=J(r,(function(n){return n&&t.enhancedNormalizer(n).id===e}));return i||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||this.valueConsistsOf===he)n=e;else if(this.valueConsistsOf===fe)e.forEach((function(e){n.push(e);var r=t.getNode(e);r.isBranch&&t.traverseDescendantsBFS(r,(function(e){n.push(e.id)}))}));else if(this.valueConsistsOf===de){var r=V(),i=e.slice();while(i.length){var o=i.shift(),s=this.getNode(o);n.push(o),s.isRootNode||(s.parentNode.id in r||(r[s.parentNode.id]=s.parentNode.children.length),0===--r[s.parentNode.id]&&i.push(s.parentNode.id))}}else if(this.valueConsistsOf===pe){var a=V(),u=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));while(u.length){var l=u.shift(),c=this.getNode(l);n.push(l),c.isRootNode||(c.parentNode.id in a||(a[c.parentNode.id]=c.parentNode.children.length),0===--a[c.parentNode.id]&&u.push(c.parentNode.id))}}var h=Z(this.forest.selectedNodeIds,n);h&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var r=c()({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,r)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch){var n=e.children.slice();while(n.length){var r=n[0];r.isBranch&&n.push.apply(n,u()(r.children)),t(r),n.shift()}}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){var t=function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))};t({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:v((function(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){var t=this.getValueContainer().$el.contains(e.target);t&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags()}})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},s()(n,ie,0),s()(n,oe,0),s()(n,se,0),s()(n,ae,0),n)))}));var r=t.trim().toLocaleLowerCase(),i=r.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&i.length>1?t.isMatched=i.every((function(e){return Ae(!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return Ae(!e.disableFuzzyMatching,r,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id][oe]++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id][ae]++})),t.parentNode!==ee&&(e.localSearch.countMap[t.parentNode.id][ie]+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id][se]+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&t.parentNode!==ee&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),r=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return r();this.callLoadOptionsProp({action:ce,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(i){n.isLoaded=!0,n.options=i,e.trigger.searchQuery===t&&r()},fail:function(e){n.loadingError=Ce(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||c()({},Ee(),{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=this.appendToBody?this.$refs.portal.portalTarget:this,t=e.$refs.menu.$refs.menu;return t&&"#comment"!==t.nodeName?t:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.menu.current;if(null!=r&&r in this.forest.nodeMap&&(this.forest.nodeMap[r].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var i=function(){var n=t.getMenu(),r=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));r&&y(n,r)};this.getMenu()?i():this.$nextTick(i)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=K()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch,t&&(e.showAllChildrenOnSearch=!0)):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=V();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=V();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=te})),this.selectedNodes.forEach((function(t){n[t.id]=re,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=ne)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return c()({},e,this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var r=this,o=t.map((function(e){return[r.enhancedNormalizer(e),e]})).map((function(t,o){var a=i()(t,2),u=a[0],l=a[1];r.checkDuplication(u),r.verifyNodeShape(u);var h=u.id,f=u.label,d=u.children,p=u.isDefaultExpanded,v=e===ee,y=v?0:e.level+1,m=Array.isArray(d)||null===d,b=!m,w=!!u.isDisabled||!r.flat&&!v&&e.isDisabled,S=!!u.isNew,x=r.matchKeys.reduce((function(e,t){return c()({},e,s()({},t,Oe(u[t]).toLocaleLowerCase()))}),{}),_=v?x.label:e.nestedSearchLabel+" "+x.label,E=r.$set(r.forest.nodeMap,h,V());if(r.$set(E,"id",h),r.$set(E,"label",f),r.$set(E,"level",y),r.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),r.$set(E,"index",(v?[]:e.index).concat(o)),r.$set(E,"parentNode",e),r.$set(E,"lowerCased",x),r.$set(E,"nestedSearchLabel",_),r.$set(E,"isDisabled",w),r.$set(E,"isNew",S),r.$set(E,"isMatched",!1),r.$set(E,"isHighlighted",!1),r.$set(E,"isBranch",m),r.$set(E,"isLeaf",b),r.$set(E,"isRootNode",v),r.$set(E,"raw",l),m){var O,A=Array.isArray(d);r.$set(E,"childrenStates",c()({},Ee(),{isLoaded:A})),r.$set(E,"isExpanded","boolean"===typeof p?p:y<r.defaultExpandLevel),r.$set(E,"hasMatchedDescendants",!1),r.$set(E,"hasDisabledDescendants",!1),r.$set(E,"isExpandedOnSearch",!1),r.$set(E,"showAllChildrenOnSearch",!1),r.$set(E,"count",(O={},s()(O,ie,0),s()(O,oe,0),s()(O,se,0),s()(O,ae,0),O)),r.$set(E,"children",A?r.normalize(E,d,n):[]),!0===p&&E.ancestors.forEach((function(e){e.isExpanded=!0})),A||"function"===typeof r.loadOptions?!A&&E.isExpanded&&r.loadChildrenOptions(E):g((function(){return!1}),(function(){return'Unloaded branch node detected. "loadOptions" prop is required to load its children.'}))}if(E.ancestors.forEach((function(e){return e.count[oe]++})),b&&E.ancestors.forEach((function(e){return e.count[ae]++})),v||(e.count[ie]+=1,b&&(e.count[se]+=1),w&&(e.hasDisabledDescendants=!0)),n&&n[h]){var C=n[h];E.isMatched=C.isMatched,E.showAllChildrenOnSearch=C.showAllChildrenOnSearch,E.isHighlighted=C.isHighlighted,C.isBranch&&E.isBranch&&(E.isExpanded=C.isExpanded,E.isExpandedOnSearch=C.isExpandedOnSearch,C.childrenStates.isLoaded&&!E.childrenStates.isLoaded?E.isExpanded=!1:E.childrenStates=c()({},C.childrenStates))}return E}));if(this.branchNodesFirst){var a=o.filter((function(e){return e.isBranch})),u=o.filter((function(e){return e.isLeaf}));o=a.concat(u)}return o},loadRootOptions:function(){var e=this;this.callLoadOptionsProp({action:ue,isPending:function(){return e.rootOptionsStates.isLoading},start:function(){e.rootOptionsStates.isLoading=!0,e.rootOptionsStates.loadingError=""},succeed:function(){e.rootOptionsStates.isLoaded=!0,e.$nextTick((function(){e.resetHighlightedOptionWhenNecessary(!0)}))},fail:function(t){e.rootOptionsStates.loadingError=Ce(t)},end:function(){e.rootOptionsStates.isLoading=!1}})},loadChildrenOptions:function(e){var t=this,n=e.id,r=e.raw;this.callLoadOptionsProp({action:le,args:{parentNode:r},isPending:function(){return t.getNode(n).childrenStates.isLoading},start:function(){t.getNode(n).childrenStates.isLoading=!0,t.getNode(n).childrenStates.loadingError=""},succeed:function(){t.getNode(n).childrenStates.isLoaded=!0},fail:function(e){t.getNode(n).childrenStates.loadingError=Ce(e)},end:function(){t.getNode(n).childrenStates.isLoading=!1}})},callLoadOptionsProp:function(e){var t=e.action,n=e.args,r=e.isPending,i=e.start,o=e.succeed,s=e.fail,a=e.end;if(this.loadOptions&&!r()){i();var u=j()((function(e,t){e?s(e):o(t),a()})),l=this.loadOptions(c()({id:this.getInstanceId(),instanceId:this.getInstanceId(),action:t},n,{callback:u}));I()(l)&&l.then((function(){u()}),(function(e){u(e)})).catch((function(e){console.error(e)}))}},checkDuplication:function(e){var t=this;g((function(){return!(e.id in t.forest.nodeMap&&!t.forest.nodeMap[e.id].isFallbackNode)}),(function(){return"Detected duplicate presence of node id ".concat(JSON.stringify(e.id),". ")+'Their labels are "'.concat(t.forest.nodeMap[e.id].label,'" and "').concat(e.label,'" respectively.')}))},verifyNodeShape:function(e){g((function(){return!(void 0===e.children&&!0===e.isBranch)}),(function(){return"Are you meant to declare an unloaded branch node? `isBranch: true` is no longer supported, please use `children: null` instead."}))},select:function(e){if(!this.disabled&&!e.isDisabled){this.single&&this.clear();var t=this.multiple&&!this.flat?this.forest.checkedStateMap[e.id]===te:!this.isSelected(e);t?this._selectNode(e):this._deselectNode(e),this.buildForestState(),t?this.$emit("select",e.raw,this.getInstanceId()):this.$emit("deselect",e.raw,this.getInstanceId()),this.localSearch.active&&t&&(this.single||this.clearOnSelect)&&this.resetSearchQuery(),this.single&&this.closeOnSelect&&(this.closeMenu(),this.searchable&&(this._blurOnSelect=!0))}},clear:function(){var e=this;this.hasValue&&(this.single||this.allowClearingDisabled?this.forest.selectedNodeIds=[]:this.forest.selectedNodeIds=this.forest.selectedNodeIds.filter((function(t){return e.getNode(t).isDisabled})),this.buildForestState())},_selectNode:function(e){var t=this;if(this.single||this.disableBranchNodes)return this.addValue(e);if(this.flat)return this.addValue(e),void(this.autoSelectAncestors?e.ancestors.forEach((function(e){t.isSelected(e)||e.isDisabled||t.addValue(e)})):this.autoSelectDescendants&&this.traverseDescendantsBFS(e,(function(e){t.isSelected(e)||e.isDisabled||t.addValue(e)})));var n=e.isLeaf||!e.hasDisabledDescendants||this.allowSelectingDisabledDescendants;if(n&&this.addValue(e),e.isBranch&&this.traverseDescendantsBFS(e,(function(e){e.isDisabled&&!t.allowSelectingDisabledDescendants||t.addValue(e)})),n){var r=e;while((r=r.parentNode)!==ee){if(!r.children.every(this.isSelected))break;this.addValue(r)}}},_deselectNode:function(e){var t=this;if(this.disableBranchNodes)return this.removeValue(e);if(this.flat)return this.removeValue(e),void(this.autoDeselectAncestors?e.ancestors.forEach((function(e){t.isSelected(e)&&!e.isDisabled&&t.removeValue(e)})):this.autoDeselectDescendants&&this.traverseDescendantsBFS(e,(function(e){t.isSelected(e)&&!e.isDisabled&&t.removeValue(e)})));var n=!1;if(e.isBranch&&this.traverseDescendantsDFS(e,(function(e){e.isDisabled&&!t.allowSelectingDisabledDescendants||(t.removeValue(e),n=!0)})),e.isLeaf||n||0===e.children.length){this.removeValue(e);var r=e;while((r=r.parentNode)!==ee){if(!this.isSelected(r))break;this.removeValue(r)}}},addValue:function(e){this.forest.selectedNodeIds.push(e.id),this.forest.selectedNodeMap[e.id]=!0},removeValue:function(e){_(this.forest.selectedNodeIds,e.id),delete this.forest.selectedNodeMap[e.id]},removeLastValue:function(){if(this.hasValue){if(this.single)return this.clear();var e=K()(this.internalValue),t=this.getNode(e);this.select(t)}},saveMenuScrollPosition:function(){var e=this.getMenu();e&&(this.menu.lastScrollPosition=e.scrollTop)},restoreMenuScrollPosition:function(){var e=this.getMenu();e&&(e.scrollTop=this.menu.lastScrollPosition)}},created:function(){this.verifyProps(),this.resetFlags()},mounted:function(){(this.autoFocus||this.autofocus)&&this.focusInput(),this.options||this.async||!this.autoLoadRootOptions||this.loadRootOptions(),this.alwaysOpen&&this.openMenu(),this.async&&this.defaultOptions&&this.handleRemoteSearch()},destroyed:function(){this.toggleClickOutsideEvent(!1)}};function Le(e){return"string"===typeof e?e:null==e||D(e)?"":JSON.stringify(e)}var Re,ke,Ne={name:"vue-treeselect--hidden-fields",inject:["instance"],functional:!0,render:function(e,t){var n=arguments[0],r=t.injections.instance;if(!r.name||r.disabled||!r.hasValue)return null;var i=r.internalValue.map(Le);return r.multiple&&r.joinValues&&(i=[i.join(r.delimiter)]),i.map((function(e,t){return n("input",{attrs:{type:"hidden",name:r.name},domProps:{value:e},key:"hidden-field-"+t})}))}},De=Ne;function Me(e,t,n,r,i,o,s,a){var u,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=u):i&&(u=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,u):[u]}return{exports:e,options:l}}var Ie=Me(De,Re,ke,!1,null,null,null);Ie.options.__file="HiddenFields.vue";var Pe,je,ze=Ie.exports,$e=n(14),Fe=n.n($e),Ue=[me.ENTER,me.END,me.HOME,me.ARROW_LEFT,me.ARROW_UP,me.ARROW_RIGHT,me.ARROW_DOWN],Ve={name:"vue-treeselect--input",inject:["instance"],data:function(){return{inputWidth:we,value:""}},computed:{needAutoSize:function(){var e=this.instance;return e.searchable&&!e.disabled&&e.multiple},inputStyle:function(){return{width:this.needAutoSize?"".concat(this.inputWidth,"px"):null}}},watch:{"instance.trigger.searchQuery":function(e){this.value=e},value:function(){this.needAutoSize&&this.$nextTick(this.updateInputWidth)}},created:function(){this.debouncedCallback=w()(this.updateSearchQuery,be,{leading:!0,trailing:!0})},methods:{clear:function(){this.onInput({target:{value:""}})},focus:function(){var e=this.instance;e.disabled||this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},onFocus:function(){var e=this.instance;e.trigger.isFocused=!0,e.openOnFocus&&e.openMenu()},onBlur:function(){var e=this.instance;if(document.activeElement===e.$refs.menu)return this.focus();e.trigger.isFocused=!1,e.closeMenu()},onInput:function(e){var t=e.target.value;this.value=t,t?this.debouncedCallback():(this.debouncedCallback.cancel(),this.updateSearchQuery())},onKeyDown:function(e){var t=this.instance,n="which"in e?e.which:e.keyCode;if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)){if(!t.menu.isOpen&&X(Ue,n))return e.preventDefault(),t.openMenu();switch(n){case me.BACKSPACE:t.backspaceRemoves&&!this.value.length&&t.removeLastValue();break;case me.ENTER:e.preventDefault();var r=t.getNode(t.menu.current);if(r.isBranch&&t.disableBranchNodes)return;t.select(r);break;case me.ESCAPE:this.value.length?this.clear():t.menu.isOpen&&t.closeMenu();break;case me.END:e.preventDefault(),t.highlightLastOption();break;case me.HOME:e.preventDefault(),t.highlightFirstOption();break;case me.ARROW_LEFT:var i=t.getNode(t.menu.current);i.isBranch&&t.shouldExpand(i)?(e.preventDefault(),t.toggleExpanded(i)):!i.isRootNode&&(i.isLeaf||i.isBranch&&!t.shouldExpand(i))&&(e.preventDefault(),t.setCurrentHighlightedOption(i.parentNode));break;case me.ARROW_UP:e.preventDefault(),t.highlightPrevOption();break;case me.ARROW_RIGHT:var o=t.getNode(t.menu.current);o.isBranch&&!t.shouldExpand(o)&&(e.preventDefault(),t.toggleExpanded(o));break;case me.ARROW_DOWN:e.preventDefault(),t.highlightNextOption();break;case me.DELETE:t.deleteRemoves&&!this.value.length&&t.removeLastValue();break;default:t.openMenu()}}},onMouseDown:function(e){this.value.length&&e.stopPropagation()},renderInputContainer:function(){var e=this.$createElement,t=this.instance,n={},r=[];return t.searchable&&!t.disabled&&(r.push(this.renderInput()),this.needAutoSize&&r.push(this.renderSizer())),t.searchable||Q(n,{on:{focus:this.onFocus,blur:this.onBlur,keydown:this.onKeyDown},ref:"input"}),t.searchable||t.disabled||Q(n,{attrs:{tabIndex:t.tabIndex}}),e("div",Fe()([{class:"vue-treeselect__input-container"},n]),[r])},renderInput:function(){var e=this.$createElement,t=this.instance;return e("input",{ref:"input",class:"vue-treeselect__input",attrs:{type:"text",autocomplete:"off",tabIndex:t.tabIndex,required:t.required&&!t.hasValue},domProps:{value:this.value},style:this.inputStyle,on:{focus:this.onFocus,input:this.onInput,blur:this.onBlur,keydown:this.onKeyDown,mousedown:this.onMouseDown}})},renderSizer:function(){var e=this.$createElement;return e("div",{ref:"sizer",class:"vue-treeselect__sizer"},[this.value])},updateInputWidth:function(){this.inputWidth=Math.max(we,this.$refs.sizer.scrollWidth+15)},updateSearchQuery:function(){var e=this.instance;e.trigger.searchQuery=this.value}},render:function(){return this.renderInputContainer()}},He=Ve,We=Me(He,Pe,je,!1,null,null,null);We.options.__file="Input.vue";var Ye,Ge,Qe=We.exports,qe={name:"vue-treeselect--placeholder",inject:["instance"],render:function(){var e=arguments[0],t=this.instance,n={"vue-treeselect__placeholder":!0,"vue-treeselect-helper-zoom-effect-off":!0,"vue-treeselect-helper-hide":t.hasValue||t.trigger.searchQuery};return e("div",{class:n},[t.placeholder])}},Ke=qe,Xe=Me(Ke,Ye,Ge,!1,null,null,null);Xe.options.__file="Placeholder.vue";var Je,Ze,et=Xe.exports,tt={name:"vue-treeselect--single-value",inject:["instance"],methods:{renderSingleValueLabel:function(){var e=this.instance,t=e.selectedNodes[0],n=e.$scopedSlots["value-label"];return n?n({node:t}):t.label}},render:function(){var e=arguments[0],t=this.instance,n=this.$parent.renderValueContainer,r=t.hasValue&&!t.trigger.searchQuery;return n([r&&e("div",{class:"vue-treeselect__single-value"},[this.renderSingleValueLabel()]),e(et),e(Qe,{ref:"input"})])}},nt=tt,rt=Me(nt,Je,Ze,!1,null,null,null);rt.options.__file="SingleValue.vue";var it=rt.exports,ot=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 348.333 348.333"}},[n("path",{attrs:{d:"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z"}})])},st=[],at={name:"vue-treeselect--x"},ut=at,lt=Me(ut,ot,st,!1,null,null,null);lt.options.__file="Delete.vue";var ct,ht,ft=lt.exports,dt={name:"vue-treeselect--multi-value-item",inject:["instance"],props:{node:{type:Object,required:!0}},methods:{handleMouseDown:v((function(){var e=this.instance,t=this.node;e.select(t)}))},render:function(){var e=arguments[0],t=this.instance,n=this.node,r={"vue-treeselect__multi-value-item":!0,"vue-treeselect__multi-value-item-disabled":n.isDisabled,"vue-treeselect__multi-value-item-new":n.isNew},i=t.$scopedSlots["value-label"],o=i?i({node:n}):n.label;return e("div",{class:"vue-treeselect__multi-value-item-container"},[e("div",{class:r,on:{mousedown:this.handleMouseDown}},[e("span",{class:"vue-treeselect__multi-value-label"},[o]),e("span",{class:"vue-treeselect__icon vue-treeselect__value-remove"},[e(ft)])])])}},pt=dt,gt=Me(pt,ct,ht,!1,null,null,null);gt.options.__file="MultiValueItem.vue";var vt,yt,mt=gt.exports,bt={name:"vue-treeselect--multi-value",inject:["instance"],methods:{renderMultiValueItems:function(){var e=this.$createElement,t=this.instance;return t.internalValue.slice(0,t.limit).map(t.getNode).map((function(t){return e(mt,{key:"multi-value-item-".concat(t.id),attrs:{node:t}})}))},renderExceedLimitTip:function(){var e=this.$createElement,t=this.instance,n=t.internalValue.length-t.limit;return n<=0?null:e("div",{class:"vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off",key:"exceed-limit-tip"},[e("span",{class:"vue-treeselect__limit-tip-text"},[t.limitText(n)])])}},render:function(){var e=arguments[0],t=this.$parent.renderValueContainer,n={props:{tag:"div",name:"vue-treeselect__multi-value-item--transition",appear:!0}};return t(e("transition-group",Fe()([{class:"vue-treeselect__multi-value"},n]),[this.renderMultiValueItems(),this.renderExceedLimitTip(),e(et,{key:"placeholder"}),e(Qe,{ref:"input",key:"input"})]))}},wt=bt,St=Me(wt,vt,yt,!1,null,null,null);St.options.__file="MultiValue.vue";var xt=St.exports,_t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.362 292.362"}},[n("path",{attrs:{d:"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"}})])},Et=[],Ot={name:"vue-treeselect--arrow"},At=Ot,Ct=Me(At,_t,Et,!1,null,null,null);Ct.options.__file="Arrow.vue";var Tt,Bt,Lt=Ct.exports,Rt={name:"vue-treeselect--control",inject:["instance"],computed:{shouldShowX:function(){var e=this.instance;return e.clearable&&!e.disabled&&e.hasValue&&(this.hasUndisabledValue||e.allowClearingDisabled)},shouldShowArrow:function(){var e=this.instance;return!e.alwaysOpen||!e.menu.isOpen},hasUndisabledValue:function(){var e=this.instance;return e.hasValue&&e.internalValue.some((function(t){return!e.getNode(t).isDisabled}))}},methods:{renderX:function(){var e=this.$createElement,t=this.instance,n=t.multiple?t.clearAllText:t.clearValueText;return this.shouldShowX?e("div",{class:"vue-treeselect__x-container",attrs:{title:n},on:{mousedown:this.handleMouseDownOnX}},[e(ft,{class:"vue-treeselect__x"})]):null},renderArrow:function(){var e=this.$createElement,t=this.instance,n={"vue-treeselect__control-arrow":!0,"vue-treeselect__control-arrow--rotated":t.menu.isOpen};return this.shouldShowArrow?e("div",{class:"vue-treeselect__control-arrow-container",on:{mousedown:this.handleMouseDownOnArrow}},[e(Lt,{class:n})]):null},handleMouseDownOnX:v((function(e){e.stopPropagation(),e.preventDefault();var t=this.instance,n=t.beforeClearAll(),r=function(e){e&&t.clear()};I()(n)?n.then(r):setTimeout((function(){return r(n)}),0)})),handleMouseDownOnArrow:v((function(e){e.preventDefault(),e.stopPropagation();var t=this.instance;t.focusInput(),t.toggleMenu()})),renderValueContainer:function(e){var t=this.$createElement;return t("div",{class:"vue-treeselect__value-container"},[e])}},render:function(){var e=arguments[0],t=this.instance,n=t.single?it:xt;return e("div",{class:"vue-treeselect__control",on:{mousedown:t.handleMouseDown}},[e(n,{ref:"value-container"}),this.renderX(),this.renderArrow()])}},kt=Rt,Nt=Me(kt,Tt,Bt,!1,null,null,null);Nt.options.__file="Control.vue";var Dt,Mt,It=Nt.exports,Pt={name:"vue-treeselect--tip",functional:!0,props:{type:{type:String,required:!0},icon:{type:String,required:!0}},render:function(e,t){var n=arguments[0],r=t.props,i=t.children;return n("div",{class:"vue-treeselect__tip vue-treeselect__".concat(r.type,"-tip")},[n("div",{class:"vue-treeselect__icon-container"},[n("span",{class:"vue-treeselect__icon-".concat(r.icon)})]),n("span",{class:"vue-treeselect__tip-text vue-treeselect__".concat(r.type,"-tip-text")},[i])])}},jt=Pt,zt=Me(jt,Dt,Mt,!1,null,null,null);zt.options.__file="Tip.vue";var $t,Ft,Ut,Vt,Ht,Wt=zt.exports,Yt={name:"vue-treeselect--option",inject:["instance"],props:{node:{type:Object,required:!0}},computed:{shouldExpand:function(){var e=this.instance,t=this.node;return t.isBranch&&e.shouldExpand(t)},shouldShow:function(){var e=this.instance,t=this.node;return e.shouldShowOptionInMenu(t)}},methods:{renderOption:function(){var e=this.$createElement,t=this.instance,n=this.node,r={"vue-treeselect__option":!0,"vue-treeselect__option--disabled":n.isDisabled,"vue-treeselect__option--selected":t.isSelected(n),"vue-treeselect__option--highlight":n.isHighlighted,"vue-treeselect__option--matched":t.localSearch.active&&n.isMatched,"vue-treeselect__option--hide":!this.shouldShow};return e("div",{class:r,on:{mouseenter:this.handleMouseEnterOption},attrs:{"data-id":n.id}},[this.renderArrow(),this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]),this.renderLabel()])])},renderSubOptionsList:function(){var e=this.$createElement;return this.shouldExpand?e("div",{class:"vue-treeselect__list"},[this.renderSubOptions(),this.renderNoChildrenTip(),this.renderLoadingChildrenTip(),this.renderLoadingChildrenErrorTip()]):null},renderArrow:function(){var e=this.$createElement,t=this.instance,n=this.node;if(t.shouldFlattenOptions&&this.shouldShow)return null;if(n.isBranch){var r={props:{name:"vue-treeselect__option-arrow--prepare",appear:!0}},i={"vue-treeselect__option-arrow":!0,"vue-treeselect__option-arrow--rotated":this.shouldExpand};return e("div",{class:"vue-treeselect__option-arrow-container",on:{mousedown:this.handleMouseDownOnArrow}},[e("transition",r,[e(Lt,{class:i})])])}return t.hasBranchNodes?($t||($t=e("div",{class:"vue-treeselect__option-arrow-placeholder"},[" "])),$t):null},renderLabelContainer:function(e){var t=this.$createElement;return t("div",{class:"vue-treeselect__label-container",on:{mousedown:this.handleMouseDownOnLabelContainer}},[e])},renderCheckboxContainer:function(e){var t=this.$createElement,n=this.instance,r=this.node;return n.single||n.disableBranchNodes&&r.isBranch?null:t("div",{class:"vue-treeselect__checkbox-container"},[e])},renderCheckbox:function(){var e=this.$createElement,t=this.instance,n=this.node,r=t.forest.checkedStateMap[n.id],i={"vue-treeselect__checkbox":!0,"vue-treeselect__checkbox--checked":r===re,"vue-treeselect__checkbox--indeterminate":r===ne,"vue-treeselect__checkbox--unchecked":r===te,"vue-treeselect__checkbox--disabled":n.isDisabled};return Ft||(Ft=e("span",{class:"vue-treeselect__check-mark"})),Ut||(Ut=e("span",{class:"vue-treeselect__minus-mark"})),e("span",{class:i},[Ft,Ut])},renderLabel:function(){var e=this.$createElement,t=this.instance,n=this.node,r=n.isBranch&&(t.localSearch.active?t.showCountOnSearchComputed:t.showCount),i=r?t.localSearch.active?t.localSearch.countMap[n.id][t.showCountOf]:n.count[t.showCountOf]:NaN,o="vue-treeselect__label",s="vue-treeselect__count",a=t.$scopedSlots["option-label"];return a?a({node:n,shouldShowCount:r,count:i,labelClassName:o,countClassName:s}):e("label",{class:o},[n.label,r&&e("span",{class:s},["(",i,")"])])},renderSubOptions:function(){var e=this.$createElement,t=this.node;return t.childrenStates.isLoaded?t.children.map((function(t){return e(Yt,{attrs:{node:t},key:t.id})})):null},renderNoChildrenTip:function(){var e=this.$createElement,t=this.instance,n=this.node;return!n.childrenStates.isLoaded||n.children.length?null:e(Wt,{attrs:{type:"no-children",icon:"warning"}},[t.noChildrenText])},renderLoadingChildrenTip:function(){var e=this.$createElement,t=this.instance,n=this.node;return n.childrenStates.isLoading?e(Wt,{attrs:{type:"loading",icon:"loader"}},[t.loadingText]):null},renderLoadingChildrenErrorTip:function(){var e=this.$createElement,t=this.instance,n=this.node;return n.childrenStates.loadingError?e(Wt,{attrs:{type:"error",icon:"error"}},[n.childrenStates.loadingError,e("a",{class:"vue-treeselect__retry",attrs:{title:t.retryTitle},on:{mousedown:this.handleMouseDownOnRetry}},[t.retryText])]):null},handleMouseEnterOption:function(e){var t=this.instance,n=this.node;e.target===e.currentTarget&&t.setCurrentHighlightedOption(n,!1)},handleMouseDownOnArrow:v((function(){var e=this.instance,t=this.node;e.toggleExpanded(t)})),handleMouseDownOnLabelContainer:v((function(){var e=this.instance,t=this.node;t.isBranch&&e.disableBranchNodes?e.toggleExpanded(t):e.select(t)})),handleMouseDownOnRetry:v((function(){var e=this.instance,t=this.node;e.loadChildrenOptions(t)}))},render:function(){var e=arguments[0],t=this.node,n=this.instance.shouldFlattenOptions?0:t.level,r=s()({"vue-treeselect__list-item":!0},"vue-treeselect__indent-level-".concat(n),!0),i={props:{name:"vue-treeselect__list--transition"}};return e("div",{class:r},[this.renderOption(),e("transition",i,[this.renderSubOptionsList()])])}},Gt=Yt,Qt=Gt,qt=Me(Qt,Vt,Ht,!1,null,null,null);qt.options.__file="Option.vue";var Kt,Xt,Jt=qt.exports,Zt={top:"top",bottom:"bottom",above:"top",below:"bottom"},en={name:"vue-treeselect--menu",inject:["instance"],computed:{menuStyle:function(){var e=this.instance;return{maxHeight:e.maxHeight+"px"}},menuContainerStyle:function(){var e=this.instance;return{zIndex:e.appendToBody?null:e.zIndex}}},watch:{"instance.menu.isOpen":function(e){e?this.$nextTick(this.onMenuOpen):this.onMenuClose()}},created:function(){this.menuSizeWatcher=null,this.menuResizeAndScrollEventListeners=null},mounted:function(){var e=this.instance;e.menu.isOpen&&this.$nextTick(this.onMenuOpen)},destroyed:function(){this.onMenuClose()},methods:{renderMenu:function(){var e=this.$createElement,t=this.instance;return t.menu.isOpen?e("div",{ref:"menu",class:"vue-treeselect__menu",on:{mousedown:t.handleMouseDown},style:this.menuStyle},[t.async?this.renderAsyncSearchMenuInner():t.localSearch.active?this.renderLocalSearchMenuInner():this.renderNormalMenuInner()]):null},renderNormalMenuInner:function(){var e=this.instance;return e.rootOptionsStates.isLoading?this.renderLoadingOptionsTip():e.rootOptionsStates.loadingError?this.renderLoadingRootOptionsErrorTip():e.rootOptionsStates.isLoaded&&0===e.forest.normalizedOptions.length?this.renderNoAvailableOptionsTip():this.renderOptionList()},renderLocalSearchMenuInner:function(){var e=this.instance;return e.rootOptionsStates.isLoading?this.renderLoadingOptionsTip():e.rootOptionsStates.loadingError?this.renderLoadingRootOptionsErrorTip():e.rootOptionsStates.isLoaded&&0===e.forest.normalizedOptions.length?this.renderNoAvailableOptionsTip():e.localSearch.noResults?this.renderNoResultsTip():this.renderOptionList()},renderAsyncSearchMenuInner:function(){var e=this.instance,t=e.getRemoteSearchEntry(),n=""===e.trigger.searchQuery&&!e.defaultOptions,r=!n&&(t.isLoaded&&0===t.options.length);return n?this.renderSearchPromptTip():t.isLoading?this.renderLoadingOptionsTip():t.loadingError?this.renderAsyncSearchLoadingErrorTip():r?this.renderNoResultsTip():this.renderOptionList()},renderOptionList:function(){var e=this.$createElement,t=this.instance;return e("div",{class:"vue-treeselect__list"},[t.forest.normalizedOptions.map((function(t){return e(Jt,{attrs:{node:t},key:t.id})}))])},renderSearchPromptTip:function(){var e=this.$createElement,t=this.instance;return e(Wt,{attrs:{type:"search-prompt",icon:"warning"}},[t.searchPromptText])},renderLoadingOptionsTip:function(){var e=this.$createElement,t=this.instance;return e(Wt,{attrs:{type:"loading",icon:"loader"}},[t.loadingText])},renderLoadingRootOptionsErrorTip:function(){var e=this.$createElement,t=this.instance;return e(Wt,{attrs:{type:"error",icon:"error"}},[t.rootOptionsStates.loadingError,e("a",{class:"vue-treeselect__retry",on:{click:t.loadRootOptions},attrs:{title:t.retryTitle}},[t.retryText])])},renderAsyncSearchLoadingErrorTip:function(){var e=this.$createElement,t=this.instance,n=t.getRemoteSearchEntry();return e(Wt,{attrs:{type:"error",icon:"error"}},[n.loadingError,e("a",{class:"vue-treeselect__retry",on:{click:t.handleRemoteSearch},attrs:{title:t.retryTitle}},[t.retryText])])},renderNoAvailableOptionsTip:function(){var e=this.$createElement,t=this.instance;return e(Wt,{attrs:{type:"no-options",icon:"warning"}},[t.noOptionsText])},renderNoResultsTip:function(){var e=this.$createElement,t=this.instance;return e(Wt,{attrs:{type:"no-results",icon:"warning"}},[t.noResultsText])},onMenuOpen:function(){this.adjustMenuOpenDirection(),this.setupMenuSizeWatcher(),this.setupMenuResizeAndScrollEventListeners()},onMenuClose:function(){this.removeMenuSizeWatcher(),this.removeMenuResizeAndScrollEventListeners()},adjustMenuOpenDirection:function(){var e=this.instance;if(e.menu.isOpen){var t=e.getMenu(),n=e.getControl(),r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=r.height,s=window.innerHeight,a=i.top,u=window.innerHeight-i.bottom,l=i.top>=0&&i.top<=s||i.top<0&&i.bottom>0,c=u>o+Se,h=a>o+Se;l?"auto"!==e.openDirection?e.menu.placement=Zt[e.openDirection]:e.menu.placement=c||!h?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance,t=e.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:L(t,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance,t=e.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:N(t,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},tn=en,nn=Me(tn,Kt,Xt,!1,null,null,null);nn.options.__file="Menu.vue";var rn,on,sn,an=nn.exports,un=n(15),ln=n.n(un),cn={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){var e=this.instance;e.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance,t=e.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:N(t,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance,n=t.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:L(n,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl(),r=n.getBoundingClientRect();t.style.width=r.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o="bottom"===e.menu.placement?r.height:0,s=Math.round(r.left-i.left)+"px",a=Math.round(r.top-i.top+o)+"px",u=this.$refs.menu.$refs["menu-container"].style,l=["transform","webkitTransform","MozTransform","msTransform"],c=J(l,(function(e){return e in document.body.style}));u[c]="translate(".concat(s,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],r={zIndex:t.zIndex};return e("div",{class:n,style:r,attrs:{"data-instance-id":t.getInstanceId()}},[e(an,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},hn={name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new ln.a(c()({el:e,parent:this},cn))},teardown:function(){document.body.removeChild(this.portalTarget.$el),this.portalTarget.$el.innerHTML="",this.portalTarget.$destroy(),this.portalTarget=null}},render:function(){var e=arguments[0];return rn||(rn=e("div",{class:"vue-treeselect__menu-placeholder"})),rn}},fn=hn,dn=Me(fn,on,sn,!1,null,null,null);dn.options.__file="MenuPortal.vue";var pn,gn,vn=dn.exports,yn={name:"vue-treeselect",mixins:[Be],computed:{wrapperClass:function(){return{"vue-treeselect":!0,"vue-treeselect--single":this.single,"vue-treeselect--multi":this.multiple,"vue-treeselect--searchable":this.searchable,"vue-treeselect--disabled":this.disabled,"vue-treeselect--focused":this.trigger.isFocused,"vue-treeselect--has-value":this.hasValue,"vue-treeselect--open":this.menu.isOpen,"vue-treeselect--open-above":"top"===this.menu.placement,"vue-treeselect--open-below":"bottom"===this.menu.placement,"vue-treeselect--branch-nodes-disabled":this.disableBranchNodes,"vue-treeselect--append-to-body":this.appendToBody}}},render:function(){var e=arguments[0];return e("div",{ref:"wrapper",class:this.wrapperClass},[e(ze),e(It,{ref:"control"}),this.appendToBody?e(vn,{ref:"portal"}):e(an,{ref:"menu"})])}},mn=yn,bn=Me(mn,pn,gn,!1,null,null,null);bn.options.__file="Treeselect.vue";var wn=bn.exports;n(16);n.d(t,"__esModule",(function(){return Sn})),n.d(t,"VERSION",(function(){return xn})),n.d(t,"Treeselect",(function(){return wn})),n.d(t,"treeselectMixin",(function(){return Be})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return ue})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return le})),n.d(t,"ASYNC_SEARCH",(function(){return ce}));t["default"]=wn;var Sn=!0,xn="0.0.38"}])},7037:function(e,t,n){function r(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),e.exports=r},"72f0":function(e,t){function n(e){return function(){return e}}e.exports=n},"8a79":function(e,t,n){"use strict";var r=n("23e7"),i=n("06cf").f,o=n("50c4"),s=n("5a34"),a=n("1d80"),u=n("ab13"),l=n("c430"),c="".endsWith,h=Math.min,f=u("endsWith"),d=!l&&!f&&!!function(){var e=i(String.prototype,"endsWith");return e&&!e.writable}();r({target:"String",proto:!0,forced:!d&&!f},{endsWith:function(e){var t=String(a(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=o(t.length),i=void 0===n?r:h(o(n),r),u=String(e);return c?c.call(t,u,i):t.slice(i-u.length,i)===u}})},9523:function(e,t){function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=n},"9b42":function(e,t,n){function r(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),t&&n.length===t)break}catch(u){i=!0,o=u}finally{try{r||null==a["return"]||a["return"]()}finally{if(i)throw o}}return n}}n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),e.exports=r},"9e69":function(e,t,n){var r=n("2b3e"),i=r.Symbol;e.exports=i},a623:function(e,t,n){"use strict";var r=n("23e7"),i=n("b727").every,o=n("a640"),s=n("ae40"),a=o("every"),u=s("every");r({target:"Array",proto:!0,forced:!a||!u},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},b047:function(e,t,n){var r=n("1a8c"),i=n("408c"),o=n("b4b0"),s="Expected a function",a=Math.max,u=Math.min;function l(e,t,n){var l,c,h,f,d,p,g=0,v=!1,y=!1,m=!0;if("function"!=typeof e)throw new TypeError(s);function b(t){var n=l,r=c;return l=c=void 0,g=t,f=e.apply(r,n),f}function w(e){return g=e,d=setTimeout(_,t),v?b(e):f}function S(e){var n=e-p,r=e-g,i=t-n;return y?u(i,h-r):i}function x(e){var n=e-p,r=e-g;return void 0===p||n>=t||n<0||y&&r>=h}function _(){var e=i();if(x(e))return E(e);d=setTimeout(_,S(e))}function E(e){return d=void 0,m&&l?b(e):(l=c=void 0,f)}function O(){void 0!==d&&clearTimeout(d),g=0,l=p=c=d=void 0}function A(){return void 0===d?f:E(i())}function C(){var e=i(),n=x(e);if(l=arguments,c=this,p=e,n){if(void 0===d)return w(p);if(y)return clearTimeout(d),d=setTimeout(_,t),b(p)}return void 0===d&&(d=setTimeout(_,t)),f}return t=o(t)||0,r(n)&&(v=!!n.leading,y="maxWait"in n,h=y?a(o(n.maxWait)||0,t):h,m="trailing"in n?!!n.trailing:m),C.cancel=O,C.flush=A,C}e.exports=l},b4b0:function(e,t,n){var r=n("1a8c"),i=n("ffd6"),o=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function h(e){if("number"==typeof e)return e;if(i(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=u.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?o:+e}e.exports=h},bcdf:function(e,t){function n(){}e.exports=n},c135:function(e,t){function n(e){if(Array.isArray(e))return e}e.exports=n},c240:function(e,t){function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=n},cd9d:function(e,t){function n(e){return e}e.exports=n},df0f:function(e,t,n){"use strict";n.r(t);var r=function(e,t){var n=document.createElement("_"),r=n.appendChild(document.createElement("_")),i=n.appendChild(document.createElement("_")),o=r.appendChild(document.createElement("_")),s=void 0,a=void 0;return r.style.cssText=n.style.cssText="height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1",o.style.cssText=i.style.cssText="display:block;height:100%;transition:0s;width:100%",o.style.width=o.style.height="200%",e.appendChild(n),u(),c;function u(){l();var o=e.offsetWidth,c=e.offsetHeight;o===s&&c===a||(s=o,a=c,i.style.width=2*o+"px",i.style.height=2*c+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,t({width:o,height:c})),r.addEventListener("scroll",u),n.addEventListener("scroll",u)}function l(){r.removeEventListener("scroll",u),n.removeEventListener("scroll",u)}function c(){l(),e.removeChild(n)}};t["default"]=r},e0ef:function(e,t,n){var r=n("4b17"),i="Expected a function";function o(e,t){var n;if("function"!=typeof t)throw new TypeError(i);return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}e.exports=o},ffd6:function(e,t,n){var r=n("3729"),i=n("1310"),o="[object Symbol]";function s(e){return"symbol"==typeof e||i(e)&&r(e)==o}e.exports=s}}]);
|