diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index f9ab5cd5..f0c15e77 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -190,11 +190,11 @@ do && QRLINK=$(ipfs add -q ~/.zen/game/players/${PLAYER}/voeux/${WISHNAME}/${VOEUKEY}/voeu.png | tail -n 1) [[ $QRLINK == "" ]] && QRLINK=$(ipfs add -q ~/.zen/game/players/${PLAYER}/QRG1avatar.png | tail -n 1) + ### APPLY FOR ${WISHNAME} MODEL : make index.html + ################################## ${WISHNAME}/index.html + if [[ -s ${MY_PATH}/../www/${WISHNAME}/index.html ]]; then - ################################## PasseportTerre/index.html - if [[ ${WISHNAME} == "CopierYoutube" ]]; then - - cat $MY_PATH/../www/PasseportTerre/index.html \ + cat ${MY_PATH}/../www/${WISHNAME}/index.html \ | sed -e "s~_LIBRA_~$(myIpfsGw)~g" \ -e "s~_G1VOEU_~${WISHNAME}~g" \ -e "s~_PLAYER_~${PLAYER}~g" \ diff --git a/www/PasseportTerre/_STATION_ b/www/PasseportTerre/_STATION_ deleted file mode 100644 index 8552fc6a..00000000 --- a/www/PasseportTerre/_STATION_ +++ /dev/null @@ -1 +0,0 @@ -HELLO THERE diff --git a/www/PasseportTerre/favicon.ico b/www/PasseportTerre/favicon.ico deleted file mode 100644 index e0128c6b..00000000 Binary files a/www/PasseportTerre/favicon.ico and /dev/null differ diff --git a/www/PasseportTerre/images/earth-glow-shadows.png b/www/PasseportTerre/images/earth-glow-shadows.png deleted file mode 100644 index c9618037..00000000 Binary files a/www/PasseportTerre/images/earth-glow-shadows.png and /dev/null differ diff --git a/www/PasseportTerre/images/earth1024x1024.jpg b/www/PasseportTerre/images/earth1024x1024.jpg deleted file mode 100644 index 04d23d8e..00000000 Binary files a/www/PasseportTerre/images/earth1024x1024.jpg and /dev/null differ diff --git a/www/PasseportTerre/images/mars-glow-shadows.png b/www/PasseportTerre/images/mars-glow-shadows.png deleted file mode 100644 index 87168b08..00000000 Binary files a/www/PasseportTerre/images/mars-glow-shadows.png and /dev/null differ diff --git a/www/PasseportTerre/images/mars1024x1024.jpg b/www/PasseportTerre/images/mars1024x1024.jpg deleted file mode 100644 index a7e0f38f..00000000 Binary files a/www/PasseportTerre/images/mars1024x1024.jpg and /dev/null differ diff --git a/www/PasseportTerre/images/plain.png b/www/PasseportTerre/images/plain.png deleted file mode 100644 index 11ceddcd..00000000 Binary files a/www/PasseportTerre/images/plain.png and /dev/null differ diff --git a/www/PasseportTerre/index.html b/www/PasseportTerre/index.html deleted file mode 100644 index 1ec8dd17..00000000 --- a/www/PasseportTerre/index.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - _G1VOEU_ : _PLAYER_ : http://astroport.localhost:1234 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- - Link in Le Claude -
-

G1_G1VOEU_ _PLAYER_

-
A Friendly Planet of Friends
- -
- -
- -
-
- - -
-
- - -

-

_PLAYER_

-

- - - -

-

:⚡:~ Cesium ~:📱: _____

-

-

🏡 : _G1PUB_
-

- -
- -
-
-

-

- -
- -
-
- -

TW♥BOX of "_PLAYER_"

- -

-
-
👍 IPFS DATA STORAGE 👍

-

Powered by Astroport.ONE

-

/ STI / La♥BOX / - -

- -
- - - -
- Choose Planet: -
-
- Show code - Hide code - -
- - diff --git a/www/PasseportTerre/index_fichiers/demo.css b/www/PasseportTerre/index_fichiers/demo.css deleted file mode 100644 index a4bf64c9..00000000 --- a/www/PasseportTerre/index_fichiers/demo.css +++ /dev/null @@ -1,129 +0,0 @@ -body { - background: black; - margin: 0; - padding: 0; - color: #DDD; - text-align: center; - padding-bottom: 20px; -} - -h1 { - margin-top: 10px; - font-size: 40px; - margin-bottom: 10px; -} - -.subtitle { - font-size: 20px; - margin-bottom: 20px; - color: #777; -} - -a { - color: white; -} - -#demo { - overflow: hidden; -} - -#description { - text-align: left; - float: left; - width: 49%; - max-width: 500px; - padding-top: 50px; - padding-left: 20px; -} - -#showoff { - float: left; - width: 49%; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -#container { - position: relative; - display: inline-block; - width: 400px; - height: 400px; -} - -#sphere, #flights, #glow-shadows, #locations, #drag { - position: absolute; - top: 0px; - left: 0px; - width: 400px; - height: 400px; -} - -#glow-shadows { - top: 1px; - left: 1px; -} - -.location { - position: absolute; - width: 10px; - height: 10px; - left: 10px; - top: 10px; - border: 2px solid white; - margin-left: -5px; - margin-top: -5px; - border-radius: 50%; - cursor: pointer; -} - -.location:hover { - width: 15px; - height: 15px; - margin-left: -7.5px; - margin-top: -7.5px; -} - - -.flight:hover { - width: 36px; - height: 37.5px; - margin-left: -18px; - margin-top: -18.75px; -} - - -.choose_example { - width: 35%; - margin-left: 32.5%; -} - -#example_code { - width: 100%; - height: 200px; - background-color: black; - color: white; - border: 0px; - resize: none; - display: none; -} - -.code { - margin-top: 10px; -} - -.social { - display: inline-block; -} - -.social.twitter { - vertical-align: -3px; -} - -.social.google { - vertical-align: -7px; -} diff --git a/www/PasseportTerre/index_fichiers/demo.js b/www/PasseportTerre/index_fichiers/demo.js deleted file mode 100644 index 6301ab46..00000000 --- a/www/PasseportTerre/index_fichiers/demo.js +++ /dev/null @@ -1,39 +0,0 @@ -function selectExample(example) { - $('#sphere').earth3d('destroy'); - $('#sphere').replaceWith($('')); - $('.location').remove(); - //~ $('.flight').remove(); - //~ $('#flights')[0].getContext('2d').clearRect(0, 0, 400, 400); - if (example == 'simple_mars') { - $('#glow-shadows').removeClass('earth').addClass('mars'); - } else { - $('#glow-shadows').removeClass('mars').addClass('earth'); - } - var code = examples[example].toString(); - code = code.substring(14); - code = code.substring(0, code.length - 2); - var lines = code.split("\n"); - for (var i = 0; i < lines.length; i++) { - lines[i] = lines[i].substring(2); - } - code = lines.join("\n"); - $('#example_code').val(code); - - examples[example](); -} - - -$(document).ready(function() { - selectExample('locations'); - - $('#example').change(function() { - selectExample($(this).val()); - }); -}); - -function addPath() { - $('#sphere').earth3d('changePaths', {path2: { - origin: 'obj1', - destination: 'obj3' - }}); -} diff --git a/www/PasseportTerre/index_fichiers/html5-qrcode.min.js b/www/PasseportTerre/index_fichiers/html5-qrcode.min.js deleted file mode 100644 index faf941bf..00000000 --- a/www/PasseportTerre/index_fichiers/html5-qrcode.min.js +++ /dev/null @@ -1 +0,0 @@ -var __Html5QrcodeLibrary__;(()=>{var t={449:function(t,e,r){!function(t){"use strict";function e(t){return null==t}var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};var i,o=function(t){function e(e){var r,n,i,o=this.constructor,s=t.call(this,e)||this;return Object.defineProperty(s,"name",{value:o.name,enumerable:!1}),r=s,n=o.prototype,(i=Object.setPrototypeOf)?i(r,n):r.__proto__=n,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(Error);class s extends o{constructor(t){super(t),this.message=t}getKind(){return this.constructor.kind}}s.kind="Exception";class a extends s{}a.kind="ArgumentException";class l extends s{}l.kind="IllegalArgumentException";class c{constructor(t){if(this.binarizer=t,null===t)throw new l("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(t,e){return this.binarizer.getBlackRow(t,e)}getBlackMatrix(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(t,e,r,n){const i=this.binarizer.getLuminanceSource().crop(t,e,r,n);return new c(this.binarizer.createBinarizer(i))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new c(this.binarizer.createBinarizer(t))}rotateCounterClockwise45(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new c(this.binarizer.createBinarizer(t))}toString(){try{return this.getBlackMatrix().toString()}catch(t){return""}}}class h extends s{static getChecksumInstance(){return new h}}h.kind="ChecksumException";class u{constructor(t){this.source=t}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class d{static arraycopy(t,e,r,n,i){for(;i--;)r[n++]=t[e++]}static currentTimeMillis(){return Date.now()}}class f extends s{}f.kind="IndexOutOfBoundsException";class g extends f{constructor(t,e){super(e),this.index=t,this.message=e}}g.kind="ArrayIndexOutOfBoundsException";class w{static fill(t,e){for(let r=0,n=t.length;rr)throw new l("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new g(e);if(r>t)throw new g(r)}static asList(...t){return t}static create(t,e,r){return Array.from({length:t}).map((t=>Array.from({length:e}).fill(r)))}static createInt32Array(t,e,r){return Array.from({length:t}).map((t=>Int32Array.from({length:e}).fill(r)))}static equals(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(let r=0,n=t.length;r>1,s=r(e,t[o]);if(s>0)n=o+1;else{if(!(s<0))return o;i=o-1}}return-n-1}static numberComparator(t,e){return t-e}}class m{static numberOfTrailingZeros(t){let e;if(0===t)return 32;let r=31;return e=t<<16,0!==e&&(r-=16,t=e),e=t<<8,0!==e&&(r-=8,t=e),e=t<<4,0!==e&&(r-=4,t=e),e=t<<2,0!==e&&(r-=2,t=e),r-(t<<1>>>31)}static numberOfLeadingZeros(t){if(0===t)return 32;let e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31,e}static toHexString(t){return t.toString(16)}static toBinaryString(t){return String(parseInt(String(t),2))}static bitCount(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)}static truncDivision(t,e){return Math.trunc(t/e)}static parseInt(t,e){return parseInt(t,e)}}m.MIN_VALUE_32_BITS=-2147483648,m.MAX_VALUE=Number.MAX_SAFE_INTEGER;class p{constructor(t,e){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=null==e?p.makeArray(t):e)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(t){if(t>32*this.bits.length){const e=p.makeArray(t);d.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}}get(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))}set(t){this.bits[Math.floor(t/32)]|=1<<(31&t)}flip(t){this.bits[Math.floor(t/32)]^=1<<(31&t)}getNextSet(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=r[n];i&=~((1<<(31&t))-1);const o=r.length;for(;0===i;){if(++n===o)return e;i=r[n]}const s=32*n+m.numberOfTrailingZeros(i);return s>e?e:s}getNextUnset(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=~r[n];i&=~((1<<(31&t))-1);const o=r.length;for(;0===i;){if(++n===o)return e;i=~r[n]}const s=32*n+m.numberOfTrailingZeros(i);return s>e?e:s}setBulk(t,e){this.bits[Math.floor(t/32)]=e}setRange(t,e){if(ethis.size)throw new l;if(e===t)return;e--;const r=Math.floor(t/32),n=Math.floor(e/32),i=this.bits;for(let o=r;o<=n;o++){const s=(2<<(or?0:31&t));i[o]|=s}}clear(){const t=this.bits.length,e=this.bits;for(let r=0;rthis.size)throw new l;if(e===t)return!0;e--;const n=Math.floor(t/32),i=Math.floor(e/32),o=this.bits;for(let s=n;s<=i;s++){const a=(2<<(sn?0:31&t))&4294967295;if((o[s]&a)!==(r?a:0))return!1}return!0}appendBit(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++}appendBits(t,e){if(e<0||e>32)throw new l("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(let r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))}appendBitArray(t){const e=t.size;this.ensureCapacity(this.size+e);for(let r=0;r>1&1431655765|(1431655765&r)<<1,r=r>>2&858993459|(858993459&r)<<2,r=r>>4&252645135|(252645135&r)<<4,r=r>>8&16711935|(16711935&r)<<8,r=r>>16&65535|(65535&r)<<16,t[e-i]=r}if(this.size!==32*r){const e=32*r-this.size;let n=t[0]>>>e;for(let i=1;i>>e}t[r-1]=n}this.bits=t}static makeArray(t){return new Int32Array(Math.floor((t+31)/32))}equals(t){if(!(t instanceof p))return!1;const e=t;return this.size===e.size&&w.equals(this.bits,e.bits)}hashCode(){return 31*this.size+w.hashCode(this.bits)}toString(){let t="";for(let e=0,r=this.size;e=900)throw new E("incorect value");const e=I.VALUES_TO_ECI.get(t);if(void 0===e)throw new E("incorect value");return e}static getCharacterSetECIByName(t){const e=I.NAME_TO_ECI.get(t);if(void 0===e)throw new E("incorect value");return e}equals(t){if(!(t instanceof I))return!1;const e=t;return this.getName()===e.getName()}}I.VALUE_IDENTIFIER_TO_ECI=new Map,I.VALUES_TO_ECI=new Map,I.NAME_TO_ECI=new Map,I.Cp437=new I(A.Cp437,Int32Array.from([0,2]),"Cp437"),I.ISO8859_1=new I(A.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),I.ISO8859_2=new I(A.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),I.ISO8859_3=new I(A.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),I.ISO8859_4=new I(A.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),I.ISO8859_5=new I(A.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),I.ISO8859_6=new I(A.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),I.ISO8859_7=new I(A.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),I.ISO8859_8=new I(A.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),I.ISO8859_9=new I(A.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),I.ISO8859_10=new I(A.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),I.ISO8859_11=new I(A.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),I.ISO8859_13=new I(A.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),I.ISO8859_14=new I(A.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),I.ISO8859_15=new I(A.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),I.ISO8859_16=new I(A.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),I.SJIS=new I(A.SJIS,20,"SJIS","Shift_JIS"),I.Cp1250=new I(A.Cp1250,21,"Cp1250","windows-1250"),I.Cp1251=new I(A.Cp1251,22,"Cp1251","windows-1251"),I.Cp1252=new I(A.Cp1252,23,"Cp1252","windows-1252"),I.Cp1256=new I(A.Cp1256,24,"Cp1256","windows-1256"),I.UnicodeBigUnmarked=new I(A.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),I.UTF8=new I(A.UTF8,26,"UTF8","UTF-8"),I.ASCII=new I(A.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),I.Big5=new I(A.Big5,28,"Big5"),I.GB18030=new I(A.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),I.EUC_KR=new I(A.EUC_KR,30,"EUC_KR","EUC-KR");class S extends s{}S.kind="UnsupportedOperationException";class _{static decode(t,e){const r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)}static shouldDecodeOnFallback(t){return!_.isBrowser()&&"ISO-8859-1"===t}static encode(t,e){const r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)}static isBrowser(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)}static encodingName(t){return"string"==typeof t?t:t.getName()}static encodingCharacterSet(t){return t instanceof I?t:I.getCharacterSetECIByName(t)}static decodeFallback(t,e){const r=this.encodingCharacterSet(e);if(_.isDecodeFallbackSupported(r)){let e="";for(let r=0,n=t.length;r3&&239===t[0]&&187===t[1]&&191===t[2];for(let e=0;e0?0==(128&r)?o=!1:s--:0!=(128&r)&&(0==(64&r)?o=!1:(s++,0==(32&r)?a++:(s++,0==(16&r)?l++:(s++,0==(8&r)?c++:o=!1))))),n&&(r>127&&r<160?n=!1:r>159&&(r<192||215===r||247===r)&&m++),i&&(h>0?r<64||127===r||r>252?i=!1:h--:128===r||160===r||r>239?i=!1:r>160&&r<224?(u++,f=0,d++,d>g&&(g=d)):r>127?(h++,d=0,f++,f>w&&(w=f)):(d=0,f=0))}return o&&s>0&&(o=!1),i&&h>0&&(i=!1),o&&(p||a+l+c>0)?T.UTF8:i&&(T.ASSUME_SHIFT_JIS||g>=3||w>=3)?T.SHIFT_JIS:n&&i?2===g&&2===u||10*m>=r?T.SHIFT_JIS:T.ISO88591:n?T.ISO88591:i?T.SHIFT_JIS:o?T.UTF8:T.PLATFORM_DEFAULT_ENCODING}static format(t,...e){let r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,i,o,s,a){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let l,c=s?parseInt(s.substr(1)):void 0;switch(a){case"s":l=e[r];break;case"c":l=e[r][0];break;case"f":l=parseFloat(e[r]).toFixed(t);break;case"p":l=parseFloat(e[r]).toPrecision(t);break;case"e":l=parseFloat(e[r]).toExponential(t);break;case"x":l=parseInt(e[r]).toString(c||16);break;case"d":l=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}l="object"==typeof l?JSON.stringify(l):(+l).toString(c);let h=parseInt(i),u=i&&i[0]+""=="0"?"0":" ";for(;l.lengtho){if(-1===s)s=i-o;else if(i-o!==s)throw new l("row lengths do not match");o=i,a++}c++}else if(t.substring(c,c+e.length)===e)c+=e.length,n[i]=!0,i++;else{if(t.substring(c,c+r.length)!==r)throw new l("illegal character encountered: "+t.substring(c));c+=r.length,n[i]=!1,i++}if(i>o){if(-1===s)s=i-o;else if(i-o!==s)throw new l("row lengths do not match");a++}const h=new N(s,a);for(let t=0;t>>(31&t)&1)}set(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295}unset(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)}flip(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295}xor(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new l("input matrix dimensions do not match");const e=new p(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits;for(let i=0,o=this.height;ithis.height||i>this.width)throw new l("The region must fit inside the matrix");const s=this.rowSize,a=this.bits;for(let r=e;ra&&(a=t),32*es){let t=31;for(;l>>>t==0;)t--;32*e+t>s&&(s=32*e+t)}}}return s=0&&0===e[r];)r--;if(r<0)return null;const n=Math.floor(r/t);let i=32*Math.floor(r%t);const o=e[r];let s=31;for(;o>>>s==0;)s--;return i+=s,Int32Array.from([i,n])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(t){if(!(t instanceof N))return!1;const e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&w.equals(this.bits,e.bits)}hashCode(){let t=this.width;return t=31*t+this.width,t=31*t+this.height,t=31*t+this.rowSize,t=31*t+w.hashCode(this.bits),t}toString(t="X ",e=" ",r="\n"){return this.buildToString(t,e,r)}buildToString(t,e,r){let n=new y;for(let i=0,o=this.height;i>M.LUMINANCE_SHIFT]++;const s=M.estimateBlackPoint(o);if(n<3)for(let t=0;t>M.LUMINANCE_SHIFT]++}const o=M.estimateBlackPoint(i),s=t.getMatrix();for(let t=0;ti&&(n=o,i=t[o]),t[o]>r&&(r=t[o]);let o=0,s=0;for(let r=0;rs&&(o=r,s=i)}if(n>o){const t=n;n=o,o=t}if(o-n<=e/16)throw new D;let a=o-1,l=-1;for(let e=o-1;e>n;e--){const i=e-n,s=i*i*(o-e)*(r-t[e]);s>l&&(a=e,l=s)}return a<=R.MINIMUM_DIMENSION&&r>=R.MINIMUM_DIMENSION){const n=t.getMatrix();let i=e>>R.BLOCK_SIZE_POWER;0!=(e&R.BLOCK_SIZE_MASK)&&i++;let o=r>>R.BLOCK_SIZE_POWER;0!=(r&R.BLOCK_SIZE_MASK)&&o++;const s=R.calculateBlackPoints(n,i,o,e,r),a=new N(e,r);R.calculateThresholdForBlock(n,i,o,e,r,s,a),this.matrix=a}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(t){return new R(t)}static calculateThresholdForBlock(t,e,r,n,i,o,s){const a=i-R.BLOCK_SIZE,l=n-R.BLOCK_SIZE;for(let i=0;ia&&(c=a);const h=R.cap(i,2,r-3);for(let r=0;rl&&(i=l);const a=R.cap(r,2,e-3);let u=0;for(let t=-2;t<=2;t++){const e=o[h+t];u+=e[a-2]+e[a-1]+e[a]+e[a+1]+e[a+2]}const d=u/25;R.thresholdBlock(t,i,c,d,n,s)}}}static cap(t,e,r){return tr?r:t}static thresholdBlock(t,e,r,n,i,o){for(let s=0,a=r*i+e;so&&(r=o);for(let o=0;os&&(e=s);let l=0,c=255,h=0;for(let i=0,o=r*n+e;ih&&(h=r)}if(h-c>R.MIN_DYNAMIC_RANGE)for(i++,o+=n;i>2*R.BLOCK_SIZE_POWER;if(h-c<=R.MIN_DYNAMIC_RANGE&&(u=c/2,i>0&&o>0)){const t=(a[i-1][o]+2*a[i][o-1]+a[i-1][o-1])/4;c>10,n[r]=i}return n}getRow(t,e){if(t<0||t>=this.getHeight())throw new l("Requested row is outside the image: "+t);const r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.lengthnew L(t.deviceId,t.label)))}))}findDeviceById(t){return v(this,void 0,void 0,(function*(){const e=yield this.listVideoInputDevices();return e?e.find((e=>e.deviceId===t)):null}))}decodeFromInputVideoDevice(t,e){return v(this,void 0,void 0,(function*(){return yield this.decodeOnceFromVideoDevice(t,e)}))}decodeOnceFromVideoDevice(t,e){return v(this,void 0,void 0,(function*(){let r;this.reset(),r=t?{deviceId:{exact:t}}:{facingMode:"environment"};const n={video:r};return yield this.decodeOnceFromConstraints(n,e)}))}decodeOnceFromConstraints(t,e){return v(this,void 0,void 0,(function*(){const r=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeOnceFromStream(r,e)}))}decodeOnceFromStream(t,e){return v(this,void 0,void 0,(function*(){this.reset();const r=yield this.attachStreamToVideo(t,e);return yield this.decodeOnce(r)}))}decodeFromInputVideoDeviceContinuously(t,e,r){return v(this,void 0,void 0,(function*(){return yield this.decodeFromVideoDevice(t,e,r)}))}decodeFromVideoDevice(t,e,r){return v(this,void 0,void 0,(function*(){let n;n=t?{deviceId:{exact:t}}:{facingMode:"environment"};const i={video:n};return yield this.decodeFromConstraints(i,e,r)}))}decodeFromConstraints(t,e,r){return v(this,void 0,void 0,(function*(){const n=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeFromStream(n,e,r)}))}decodeFromStream(t,e,r){return v(this,void 0,void 0,(function*(){this.reset();const n=yield this.attachStreamToVideo(t,e);return yield this.decodeContinuously(n,r)}))}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(t,e){return v(this,void 0,void 0,(function*(){const r=this.prepareVideoElement(e);return this.addVideoSource(r,t),this.videoElement=r,this.stream=t,yield this.playVideoOnLoadAsync(r),r}))}playVideoOnLoadAsync(t){return new Promise(((e,r)=>this.playVideoOnLoad(t,(()=>e()))))}playVideoOnLoad(t,e){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(t),t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)}isVideoPlaying(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2}tryPlayVideo(t){return v(this,void 0,void 0,(function*(){if(this.isVideoPlaying(t))console.warn("Trying to play video that is already playing.");else try{yield t.play()}catch(t){console.warn("It was not possible to play the video.")}}))}getMediaElement(t,e){const r=document.getElementById(t);if(!r)throw new a(`element with id '${t}' not found`);if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new a(`element with id '${t}' must be an ${e} element`);return r}decodeFromImage(t,e){if(!t&&!e)throw new a("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)}decodeFromVideo(t,e){if(!t&&!e)throw new a("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)}decodeFromVideoContinuously(t,e,r){if(void 0===t&&void 0===e)throw new a("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)}decodeFromImageElement(t){if(!t)throw new a("An image element must be provided.");this.reset();const e=this.prepareImageElement(t);let r;return this.imageElement=e,r=this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e),r}decodeFromVideoElement(t){const e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)}decodeFromVideoElementContinuously(t,e){const r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)}_decodeFromVideoElementSetup(t){if(!t)throw new a("A video element must be provided.");this.reset();const e=this.prepareVideoElement(t);return this.videoElement=e,e}decodeFromImageUrl(t){if(!t)throw new a("An URL must be provided.");this.reset();const e=this.prepareImageElement();this.imageElement=e;const r=this._decodeOnLoadImage(e);return e.src=t,r}decodeFromVideoUrl(t){if(!t)throw new a("An URL must be provided.");this.reset();const e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r}decodeFromVideoUrlContinuously(t,e){if(!t)throw new a("An URL must be provided.");this.reset();const r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n}_decodeOnLoadImage(t){return new Promise(((e,r)=>{this.imageLoadedListener=()=>this.decodeOnce(t,!1,!0).then(e,r),t.addEventListener("load",this.imageLoadedListener)}))}_decodeOnLoadVideo(t){return v(this,void 0,void 0,(function*(){return yield this.playVideoOnLoadAsync(t),yield this.decodeOnce(t)}))}_decodeOnLoadVideoContinuously(t,e){return v(this,void 0,void 0,(function*(){yield this.playVideoOnLoadAsync(t),this.decodeContinuously(t,e)}))}isImageLoaded(t){return!!t.complete&&0!==t.naturalWidth}prepareImageElement(t){let e;return void 0===t&&(e=document.createElement("img"),e.width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e}prepareVideoElement(t){let e;return t||"undefined"==typeof document||(e=document.createElement("video"),e.width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e}decodeOnce(t,e=!0,r=!0){this._stopAsyncDecode=!1;const n=(i,o)=>{if(this._stopAsyncDecode)return o(new D("Video stream has ended before any code could be detected.")),void(this._stopAsyncDecode=void 0);try{i(this.decode(t))}catch(t){const s=(t instanceof h||t instanceof E)&&r;if(e&&t instanceof D||s)return setTimeout(n,this._timeBetweenDecodingAttempts,i,o);o(t)}};return new Promise(((t,e)=>n(t,e)))}decodeContinuously(t,e){this._stopContinuousDecode=!1;const r=()=>{if(this._stopContinuousDecode)this._stopContinuousDecode=void 0;else try{const n=this.decode(t);e(n,null),setTimeout(r,this.timeBetweenScansMillis)}catch(t){e(null,t);const n=t instanceof D;(t instanceof h||t instanceof E||n)&&setTimeout(r,this._timeBetweenDecodingAttempts)}};r()}decode(t){const e=this.createBinaryBitmap(t);return this.decodeBitmap(e)}_isHTMLVideoElement(t){return 0!==t.videoWidth}drawFrameOnCanvas(t,e,r){e||(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),r||(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)}drawImageOnCanvas(t,e,r=this.captureCanvasContext){e||(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),r||(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)}createBinaryBitmap(t){this.getCaptureCanvasContext(t),this._isHTMLVideoElement(t)?this.drawFrameOnCanvas(t):this.drawImageOnCanvas(t);const e=this.getCaptureCanvas(t),r=new B(e),n=new R(r);return new c(n)}getCaptureCanvasContext(t){if(!this.captureCanvasContext){const e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext}getCaptureCanvas(t){if(!this.captureCanvas){const e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas}decodeBitmap(t){return this.reader.decode(t,this._hints)}createCaptureCanvas(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;const e=document.createElement("canvas");let r,n;return void 0!==t&&(t instanceof HTMLVideoElement?(r=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(r=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),e.style.width=r+"px",e.style.height=n+"px",e.width=r,e.height=n,e}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach((t=>t.stop())),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()}reset(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()}_destroyVideoElement(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)}_destroyImageElement(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)}_destroyCaptureCanvas(){this.captureCanvasContext=void 0,this.captureCanvas=void 0}addVideoSource(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}}cleanVideoSource(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")}}class x{constructor(t,e,r=(null==e?0:8*e.length),n,i,o=d.currentTimeMillis()){this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=i,this.timestamp=o,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=i,this.resultMetadata=null,this.timestamp=null==o?d.currentTimeMillis():o}getText(){return this.text}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}getResultPoints(){return this.resultPoints}getBarcodeFormat(){return this.format}getResultMetadata(){return this.resultMetadata}putMetadata(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)}putAllMetadata(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))}addResultPoints(t){const e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){const r=new Array(e.length+t.length);d.arraycopy(e,0,r,0,e.length),d.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}}getTimestamp(){return this.timestamp}toString(){return this.text}}!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(P||(P={}));var k,U=P;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(k||(k={}));var H,V,z,G,Y,X,W=k;class j{constructor(t,e,r,n,i=-1,o=-1){this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=o,this.numBits=null==t?0:8*t.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(t){this.numBits=t}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(t){this.errorsCorrected=t}getErasures(){return this.erasures}setErasures(t){this.erasures=t}getOther(){return this.other}setOther(t){this.other=t}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class Z{exp(t){return this.expTable[t]}log(t){if(0===t)throw new l;return this.logTable[t]}static addOrSubtract(t,e){return t^e}}class Q{constructor(t,e){if(0===e.length)throw new l;this.field=t;const r=e.length;if(r>1&&0===e[0]){let t=1;for(;tr.length){const t=e;e=r,r=t}let n=new Int32Array(r.length);const i=r.length-e.length;d.arraycopy(r,0,n,0,i);for(let t=i;t=t.getDegree()&&!n.isZero();){const i=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),o),a=t.multiplyByMonomial(i,s),l=e.buildMonomial(i,s);r=r.addOrSubtract(l),n=n.addOrSubtract(a)}return[r,n]}toString(){let t="";for(let e=this.getDegree();e>=0;e--){let r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){const e=this.field.log(r);0===e?t+="1":1===e?t+="a":(t+="a^",t+=e)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t}}class K extends s{}K.kind="ArithmeticException";class q extends Z{constructor(t,e,r){super(),this.primitive=t,this.size=e,this.generatorBase=r;const n=new Int32Array(e);let i=1;for(let r=0;r=e&&(i^=t,i&=e-1);this.expTable=n;const o=new Int32Array(e);for(let t=0;t=(r/2|0);){let t=i,e=s;if(i=o,s=a,i.isZero())throw new J("r_{i-1} was zero");o=t;let r=n.getZero();const l=i.getCoefficient(i.getDegree()),c=n.inverse(l);for(;o.getDegree()>=i.getDegree()&&!o.isZero();){const t=o.getDegree()-i.getDegree(),e=n.multiply(o.getCoefficient(o.getDegree()),c);r=r.addOrSubtract(n.buildMonomial(t,e)),o=o.addOrSubtract(i.multiplyByMonomial(t,e))}if(a=r.multiply(s).addOrSubtract(e),o.getDegree()>=i.getDegree())throw new $("Division algorithm failed to reduce polynomial?")}const l=a.getCoefficient(0);if(0===l)throw new J("sigmaTilde(0) was zero");const c=n.inverse(l);return[a.multiplyScalar(c),o.multiplyScalar(c)]}findErrorLocations(t){const e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);const r=new Int32Array(e);let n=0;const i=this.field;for(let o=1;o1,h,h+r-1),h+=r-1;else for(let t=r-1;t>=0;--t)c[h++]=0!=(e&1<=8?et.readCode(t,e,8):et.readCode(t,e,r)<<8-r}static convertBoolArrayToByteArray(t){let e=new Uint8Array((t.length+7)/8);for(let r=0;r","?","[","]","{","}","CTRL_UL"],et.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class rt{constructor(){}static round(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0}static distance(t,e,r,n){const i=t-r,o=e-n;return Math.sqrt(i*i+o*o)}static sum(t){let e=0;for(let r=0,n=t.length;r!==n;r++)e+=t[r];return e}}class nt{static floatToIntBits(t){return t}}nt.MAX_VALUE=Number.MAX_SAFE_INTEGER;class it{constructor(t,e){this.x=t,this.y=e}getX(){return this.x}getY(){return this.y}equals(t){if(t instanceof it){const e=t;return this.x===e.x&&this.y===e.y}return!1}hashCode(){return 31*nt.floatToIntBits(this.x)+nt.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(t){const e=this.distance(t[0],t[1]),r=this.distance(t[1],t[2]),n=this.distance(t[0],t[2]);let i,o,s;if(r>=e&&r>=n?(o=t[0],i=t[1],s=t[2]):n>=r&&n>=e?(o=t[1],i=t[0],s=t[2]):(o=t[2],i=t[0],s=t[1]),this.crossProductZ(i,o,s)<0){const t=i;i=s,s=t}t[0]=i,t[1]=o,t[2]=s}static distance(t,e){return rt.distance(t.x,t.y,e.x,e.y)}static crossProductZ(t,e,r){const n=e.x,i=e.y;return(r.x-n)*(t.y-i)-(r.y-i)*(t.x-n)}}class ot{constructor(t,e){this.bits=t,this.points=e}getBits(){return this.bits}getPoints(){return this.points}}class st extends ot{constructor(t,e,r,n,i){super(t,e),this.compact=r,this.nbDatablocks=n,this.nbLayers=i}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class at{constructor(t,e,r,n){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),null==e&&(e=at.INIT_SIZE),null==r&&(r=t.getWidth()/2|0),null==n&&(n=t.getHeight()/2|0);const i=e/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=n-i,this.downInit=n+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new D}detect(){let t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,i=!1,o=!0,s=!1,a=!1,l=!1,c=!1,h=!1;const u=this.width,d=this.height;for(;o;){o=!1;let f=!0;for(;(f||!a)&&e=u){i=!0;break}let g=!0;for(;(g||!l)&&n=d){i=!0;break}let w=!0;for(;(w||!c)&&t>=0;)w=this.containsBlackPoint(r,n,t,!1),w?(t--,o=!0,c=!0):c||t--;if(t<0){i=!0;break}let m=!0;for(;(m||!h)&&r>=0;)m=this.containsBlackPoint(t,e,r,!0),m?(r--,o=!0,h=!0):h||r--;if(r<0){i=!0;break}o&&(s=!0)}if(!i&&s){const i=e-t;let o=null;for(let e=1;null===o&&er||s<-1||s>n)throw new D;i=!1,-1===o?(e[t]=0,i=!0):o===r&&(e[t]=r-1,i=!0),-1===s?(e[t+1]=0,i=!0):s===n&&(e[t+1]=n-1,i=!0)}i=!0;for(let t=e.length-2;t>=0&&i;t-=2){const o=Math.floor(e[t]),s=Math.floor(e[t+1]);if(o<-1||o>r||s<-1||s>n)throw new D;i=!1,-1===o?(e[t]=0,i=!0):o===r&&(e[t]=r-1,i=!0),-1===s?(e[t+1]=0,i=!0):s===n&&(e[t+1]=n-1,i=!0)}}}class ct{constructor(t,e,r,n,i,o,s,a,l){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=i,this.a32=o,this.a13=s,this.a23=a,this.a33=l}static quadrilateralToQuadrilateral(t,e,r,n,i,o,s,a,l,c,h,u,d,f,g,w){const m=ct.quadrilateralToSquare(t,e,r,n,i,o,s,a);return ct.squareToQuadrilateral(l,c,h,u,d,f,g,w).times(m)}transformPoints(t){const e=t.length,r=this.a11,n=this.a12,i=this.a13,o=this.a21,s=this.a22,a=this.a23,l=this.a31,c=this.a32,h=this.a33;for(let u=0;u>1&127):(n<<=10,n+=(e>>2&992)+(e>>1&31))}let i=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(i>>6),this.nbDataBlocks=1+(63&i)):(this.nbLayers=1+(i>>11),this.nbDataBlocks=1+(2047&i))}getRotation(t,e){let r=0;t.forEach(((t,n,i)=>{r=(t>>e-2<<1)+(1&t)+(r<<3)})),r=((1&r)<<11)+(r>>1);for(let t=0;t<4;t++)if(m.bitCount(r^this.EXPECTED_CORNER_BITS[t])<=2)return t;throw new D}getCorrectedParameterData(t,e){let r,n;e?(r=7,n=2):(r=10,n=4);let i=r-n,o=new Int32Array(r);for(let e=r-1;e>=0;--e)o[e]=15&t,t>>=4;try{new tt(q.AZTEC_PARAM).decode(o,i)}catch(t){throw new D}let s=0;for(let t=0;t2){let r=this.distancePoint(l,t)*this.nbCenterLayers/(this.distancePoint(i,e)*(this.nbCenterLayers+2));if(r<.75||r>1.25||!this.isWhiteOrBlackRectangle(t,s,a,l))break}e=t,r=s,n=a,i=l,o=!o}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new D;this.compact=5===this.nbCenterLayers;let s=new it(e.getX()+.5,e.getY()-.5),a=new it(r.getX()+.5,r.getY()+.5),l=new it(n.getX()-.5,n.getY()+.5),c=new it(i.getX()-.5,i.getY()-.5);return this.expandSquare([s,a,l,c],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let t,e,r,n;try{let i=new at(this.image).detect();t=i[0],e=i[1],r=i[2],n=i[3]}catch(i){let o=this.image.getWidth()/2,s=this.image.getHeight()/2;t=this.getFirstDifferent(new dt(o+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new dt(o+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new dt(o-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new dt(o-7,s-7),!1,-1,-1).toResultPoint()}let i=rt.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=rt.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{let s=new at(this.image,15,i,o).detect();t=s[0],e=s[1],r=s[2],n=s[3]}catch(s){t=this.getFirstDifferent(new dt(i+7,o-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new dt(i+7,o+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new dt(i-7,o+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new dt(i-7,o-7),!1,-1,-1).toResultPoint()}return i=rt.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=rt.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new dt(i,o)}getMatrixCornerPoints(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())}sampleGrid(t,e,r,n,i){let o=ut.getInstance(),s=this.getDimension(),a=s/2-this.nbCenterLayers,l=s/2+this.nbCenterLayers;return o.sampleGrid(t,s,s,a,a,l,a,l,l,a,l,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY())}sampleLine(t,e,r){let n=0,i=this.distanceResultPoint(t,e),o=i/r,s=t.getX(),a=t.getY(),l=o*(e.getX()-t.getX())/i,c=o*(e.getY()-t.getY())/i;for(let t=0;t.1&&h<.9?0:h<=.1===l?1:-1}getFirstDifferent(t,e,r,n){let i=t.getX()+r,o=t.getY()+n;for(;this.isValid(i,o)&&this.image.get(i,o)===e;)i+=r,o+=n;for(i-=r,o-=n;this.isValid(i,o)&&this.image.get(i,o)===e;)i+=r;for(i-=r;this.isValid(i,o)&&this.image.get(i,o)===e;)o+=n;return o-=n,new dt(i,o)}expandSquare(t,e,r){let n=r/(2*e),i=t[0].getX()-t[2].getX(),o=t[0].getY()-t[2].getY(),s=(t[0].getX()+t[2].getX())/2,a=(t[0].getY()+t[2].getY())/2,l=new it(s+n*i,a+n*o),c=new it(s-n*i,a-n*o);return i=t[1].getX()-t[3].getX(),o=t[1].getY()-t[3].getY(),s=(t[1].getX()+t[3].getX())/2,a=(t[1].getY()+t[3].getY())/2,[l,new it(s+n*i,a+n*o),c,new it(s-n*i,a-n*o)]}isValid(t,e){return t>=0&&t0&&e{r.foundPossibleResultPoint(t)}))}}reset(){}}class wt{decode(t,e){try{return this.doDecode(t,e)}catch(r){if(e&&!0===e.get(C.TRY_HARDER)&&t.isRotateSupported()){const r=t.rotateCounterClockwise(),n=this.doDecode(r,e),i=n.getResultMetadata();let o=270;null!==i&&!0===i.get(W.ORIENTATION)&&(o+=i.get(W.ORIENTATION)%360),n.putMetadata(W.ORIENTATION,o);const s=n.getResultPoints();if(null!==s){const t=r.getHeight();for(let e=0;e>(o?8:5));let a;a=o?n:15;const l=Math.trunc(n/2);for(let o=0;o=n)break;try{i=t.getBlackRow(c,i)}catch(t){continue}for(let t=0;t<2;t++){if(1===t&&(i.reverse(),e&&!0===e.get(C.NEED_RESULT_POINT_CALLBACK))){const t=new Map;e.forEach(((e,r)=>t.set(r,e))),t.delete(C.NEED_RESULT_POINT_CALLBACK),e=t}try{const n=this.decodeRow(c,i,e);if(1===t){n.putMetadata(W.ORIENTATION,180);const t=n.getResultPoints();null!==t&&(t[0]=new it(r-t[0].getX()-1,t[0].getY()),t[1]=new it(r-t[1].getX()-1,t[1].getY()))}return n}catch(t){}}}throw new D}static recordPattern(t,e,r){const n=r.length;for(let t=0;t=i)throw new D;let o=!t.get(e),s=0,a=e;for(;a0&&n>=0;)t.get(--e)!==i&&(n--,i=!i);if(n>=0)throw new D;wt.recordPattern(t,e+1,r)}static patternMatchVariance(t,e,r){const n=t.length;let i=0,o=0;for(let r=0;ro?n-o:o-n;if(l>r)return Number.POSITIVE_INFINITY;a+=l}return a/i}}class mt extends wt{static findStartPattern(t){const e=t.getSize(),r=t.getNextSet(0);let n=0,i=Int32Array.from([0,0,0,0,0,0]),o=r,s=!1;for(let a=r;a=0&&t.isRange(Math.max(0,o-(a-o)/2),o,!1))return Int32Array.from([o,a,r]);o+=i[0]+i[1],i=i.slice(2,i.length-1),i[n-1]=0,i[n]=0,n--}else n++;i[n]=1,s=!s}throw new D}static decodeCode(t,e,r){wt.recordPattern(t,r,e);let n=mt.MAX_AVG_VARIANCE,i=-1;for(let t=0;t=0)return i;throw new D}decodeRow(t,e,r){const n=r&&!0===r.get(C.ASSUME_GS1),i=mt.findStartPattern(e),o=i[2];let s=0;const a=new Uint8Array(20);let l;switch(a[s++]=o,o){case mt.CODE_START_A:l=mt.CODE_CODE_A;break;case mt.CODE_START_B:l=mt.CODE_CODE_B;break;case mt.CODE_START_C:l=mt.CODE_CODE_C;break;default:throw new E}let c=!1,u=!1,d="",f=i[0],g=i[1];const w=Int32Array.from([0,0,0,0,0,0]);let m=0,p=0,A=o,I=0,S=!0,_=!1,T=!1;for(;!c;){const t=u;switch(u=!1,m=p,p=mt.decodeCode(e,w,g),a[s++]=p,p!==mt.CODE_STOP&&(S=!0),p!==mt.CODE_STOP&&(I++,A+=I*p),f=g,g+=w.reduce(((t,e)=>t+e),0),p){case mt.CODE_START_A:case mt.CODE_START_B:case mt.CODE_START_C:throw new E}switch(l){case mt.CODE_CODE_A:if(p<64)d+=T===_?String.fromCharCode(" ".charCodeAt(0)+p):String.fromCharCode(" ".charCodeAt(0)+p+128),T=!1;else if(p<96)d+=T===_?String.fromCharCode(p-64):String.fromCharCode(p+64),T=!1;else switch(p!==mt.CODE_STOP&&(S=!1),p){case mt.CODE_FNC_1:n&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case mt.CODE_FNC_2:case mt.CODE_FNC_3:break;case mt.CODE_FNC_4_A:!_&&T?(_=!0,T=!1):_&&T?(_=!1,T=!1):T=!0;break;case mt.CODE_SHIFT:u=!0,l=mt.CODE_CODE_B;break;case mt.CODE_CODE_B:l=mt.CODE_CODE_B;break;case mt.CODE_CODE_C:l=mt.CODE_CODE_C;break;case mt.CODE_STOP:c=!0}break;case mt.CODE_CODE_B:if(p<96)d+=T===_?String.fromCharCode(" ".charCodeAt(0)+p):String.fromCharCode(" ".charCodeAt(0)+p+128),T=!1;else switch(p!==mt.CODE_STOP&&(S=!1),p){case mt.CODE_FNC_1:n&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case mt.CODE_FNC_2:case mt.CODE_FNC_3:break;case mt.CODE_FNC_4_B:!_&&T?(_=!0,T=!1):_&&T?(_=!1,T=!1):T=!0;break;case mt.CODE_SHIFT:u=!0,l=mt.CODE_CODE_A;break;case mt.CODE_CODE_A:l=mt.CODE_CODE_A;break;case mt.CODE_CODE_C:l=mt.CODE_CODE_C;break;case mt.CODE_STOP:c=!0}break;case mt.CODE_CODE_C:if(p<100)p<10&&(d+="0"),d+=p;else switch(p!==mt.CODE_STOP&&(S=!1),p){case mt.CODE_FNC_1:n&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case mt.CODE_CODE_A:l=mt.CODE_CODE_A;break;case mt.CODE_CODE_B:l=mt.CODE_CODE_B;break;case mt.CODE_STOP:c=!0}}t&&(l=l===mt.CODE_CODE_A?mt.CODE_CODE_B:mt.CODE_CODE_A)}const y=g-f;if(g=e.getNextUnset(g),!e.isRange(g,Math.min(e.getSize(),g+(g-f)/2),!1))throw new D;if(A-=I*m,A%103!==m)throw new h;const N=d.length;if(0===N)throw new D;N>0&&S&&(d=l===mt.CODE_CODE_C?d.substring(0,N-2):d.substring(0,N-1));const M=(i[1]+i[0])/2,R=f+y/2,O=a.length,b=new Uint8Array(O);for(let t=0;tn&&(i=e);n=i,e=0;let o=0,s=0;for(let i=0;in&&(s|=1<0;i++){let r=t[i];if(r>n&&(e--,2*r>=o))return-1}return s}}while(e>3);return-1}static patternToChar(t){for(let e=0;e="A"&&i<="Z"))throw new E;o=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new E;o=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")o=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")o=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")o=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)o="\0";else if("V"===i)o="@";else if("W"===i)o="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new E;o=""}break;case"/":if(i>="A"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new E;o=":"}}r+=o,n++}else r+=e}return r}}pt.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",pt.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],pt.ASTERISK_ENCODING=148;class At extends wt{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(t,e,r){let n=this.decodeStart(e),i=this.decodeEnd(e),o=new y;At.decodeMiddle(e,n[1],i[0],o);let s=o.toString(),a=null;null!=r&&(a=r.get(C.ALLOWED_LENGTHS)),null==a&&(a=At.DEFAULT_ALLOWED_LENGTHS);let l=s.length,c=!1,h=0;for(let t of a){if(l===t){c=!0;break}t>h&&(h=t)}if(!c&&l>h&&(c=!0),!c)throw new E;const u=[new it(n[1],t),new it(i[0],t)];return new x(s,null,0,u,U.ITF,(new Date).getTime())}static decodeMiddle(t,e,r,n){let i=new Int32Array(10),o=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),o.fill(0),s.fill(0);e0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new D}static skipWhiteSpace(t){const e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new D;return r}decodeEnd(t){t.reverse();try{let e,r=At.skipWhiteSpace(t);try{e=At.findGuardPattern(t,r,At.END_PATTERN_REVERSED[0])}catch(n){n instanceof D&&(e=At.findGuardPattern(t,r,At.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,e[0]);let n=e[0];return e[0]=t.getSize()-e[1],e[1]=t.getSize()-n,e}finally{t.reverse()}}static findGuardPattern(t,e,r){let n=r.length,i=new Int32Array(n),o=t.getSize(),s=!1,a=0,l=e;i.fill(0);for(let c=e;c=0)return r%10;throw new D}}At.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],At.MAX_AVG_VARIANCE=.38,At.MAX_INDIVIDUAL_VARIANCE=.5,At.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],At.START_PATTERN=Int32Array.from([1,1,1,1]),At.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class Ct extends wt{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(t){let e,r=!1,n=0,i=Int32Array.from([0,0,0]);for(;!r;){i=Int32Array.from([0,0,0]),e=Ct.findGuardPattern(t,n,!1,this.START_END_PATTERN,i);let o=e[0];n=e[1];let s=o-(n-o);s>=0&&(r=t.isRange(s,o,!1))}return e}static checkChecksum(t){return Ct.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return Ct.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}return(1e3-r)%10}static decodeEnd(t,e){return Ct.findGuardPattern(t,e,!1,Ct.START_END_PATTERN,new Int32Array(Ct.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))}static findGuardPattern(t,e,r,n,i){let o=t.getSize(),s=0,a=e=r?t.getNextUnset(e):t.getNextSet(e),l=n.length,c=r;for(let r=e;r=0)return o;throw new D}}Ct.MAX_AVG_VARIANCE=.48,Ct.MAX_INDIVIDUAL_VARIANCE=.7,Ct.START_END_PATTERN=Int32Array.from([1,1,1]),Ct.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),Ct.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),Ct.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])];class Et{constructor(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),s=Et.parseExtensionString(o),a=[new it((r[0]+r[1])/2,t),new it(i,t)],l=new x(o,null,0,a,U.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&l.putAllMetadata(s),l}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<5&&o=10&&(s|=1<<4-e),4!==e&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(5!==r.length)throw new D;let a=this.determineCheckDigit(s);if(Et.extensionChecksum(r.toString())!==a)throw new D;return o}static extensionChecksum(t){let e=t.length,r=0;for(let n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(let n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return r*=3,r%10}determineCheckDigit(t){for(let e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new D}static parseExtensionString(t){if(5!==t.length)return null;let e=Et.parseExtension5String(t);return null==e?null:new Map([[W.SUGGESTED_PRICE,e]])}static parseExtension5String(t){let e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}let r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())}}class It{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),s=It.parseExtensionString(o),a=[new it((r[0]+r[1])/2,t),new it(i,t)],l=new x(o,null,0,a,U.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&l.putAllMetadata(s),l}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<2&&o=10&&(s|=1<<1-e),1!==e&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(2!==r.length)throw new D;if(parseInt(r.toString())%4!==s)throw new D;return o}static parseExtensionString(t){return 2!==t.length?null:new Map([[W.ISSUE_NUMBER,parseInt(t)]])}}class St{static decodeRow(t,e,r){let n=Ct.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new Et).decodeRow(t,e,n)}catch(r){return(new It).decodeRow(t,e,n)}}}St.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class _t extends Ct{constructor(){super(),this.decodeRowStringBuffer="",_t.L_AND_G_PATTERNS=_t.L_PATTERNS.map((t=>Int32Array.from(t)));for(let t=10;t<20;t++){let e=_t.L_PATTERNS[t-10],r=new Int32Array(e.length);for(let t=0;t=e.getSize()||!e.isRange(c,u,!1))throw new D;let d=a.toString();if(d.length<8)throw new E;if(!_t.checkChecksum(d))throw new h;let f=(n[1]+n[0])/2,g=(l[1]+l[0])/2,w=this.getBarcodeFormat(),m=[new it(f,t),new it(g,t)],p=new x(d,null,0,m,w,(new Date).getTime()),A=0;try{let r=St.decodeRow(t,e,l[1]);p.putMetadata(W.UPC_EAN_EXTENSION,r.getText()),p.putAllMetadata(r.getResultMetadata()),p.addResultPoints(r.getResultPoints()),A=r.getText().length}catch(t){}let I=null==r?null:r.get(C.ALLOWED_EAN_EXTENSIONS);if(null!=I){let t=!1;for(let e in I)if(A.toString()===e){t=!0;break}if(!t)throw new D}return p}decodeEnd(t,e){return _t.findGuardPattern(t,e,!1,_t.START_END_PATTERN,new Int32Array(_t.START_END_PATTERN.length).fill(0))}static checkChecksum(t){return _t.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return _t.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}return(1e3-r)%10}}class Tt extends _t{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<6&&o=10&&(s|=1<<5-e)}r=Tt.determineFirstDigit(r,s),o=_t.findGuardPattern(t,o,!0,_t.MIDDLE_PATTERN,new Int32Array(_t.MIDDLE_PATTERN.length).fill(0))[1];for(let e=0;e<6&&ot));n[0]=0,n[1]=0,n[2]=0,n[3]=0;const i=t.getSize();let o=e[1],s=0;for(let e=0;e<6&&o=10&&(s|=1<<5-e)}return{rowOffset:o,resultString:Dt.determineNumSysAndCheckDigit(r,s)}}decodeEnd(t,e){return Dt.findGuardPatternWithoutCounters(t,e,!0,Dt.MIDDLE_END_PATTERN)}checkChecksum(t){return _t.checkChecksum(Dt.convertUPCEtoUPCA(t))}static determineNumSysAndCheckDigit(t,e){for(let r=0;r<=1;r++)for(let n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return String.fromCharCode("0".charCodeAt(0)+r)+t+String.fromCharCode("0".charCodeAt(0)+n);throw D.getNotFoundInstance()}getBarcodeFormat(){return U.UPC_E}static convertUPCEtoUPCA(t){const e=t.slice(1,7).split("").map((t=>t.charCodeAt(0))),r=new y;r.append(t.charAt(0));let n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()}}Dt.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),Dt.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,26])];class Mt extends wt{constructor(t){super();let r=null==t?null:t.get(C.POSSIBLE_FORMATS),n=[];e(r)?(n.push(new Tt),n.push(new Nt),n.push(new yt),n.push(new Dt)):(r.indexOf(U.EAN_13)>-1&&n.push(new Tt),r.indexOf(U.UPC_A)>-1&&n.push(new Nt),r.indexOf(U.EAN_8)>-1&&n.push(new yt),r.indexOf(U.UPC_E)>-1&&n.push(new Dt)),this.readers=n}decodeRow(t,e,r){for(let n of this.readers)try{const i=n.decodeRow(t,e,r),o=i.getBarcodeFormat()===U.EAN_13&&"0"===i.getText().charAt(0),s=null==r?null:r.get(C.POSSIBLE_FORMATS),a=null==s||s.includes(U.UPC_A);if(o&&a){const t=i.getRawBytes(),e=new x(i.getText().substring(1),t,t?t.length:null,i.getResultPoints(),U.UPC_A);return e.putAllMetadata(i.getResultMetadata()),e}return i}catch(t){}throw new D}reset(){for(let t of this.readers)t.reset()}}class Rt extends wt{constructor(){super(),this.decodeFinderCounters=new Int32Array(4),this.dataCharacterCounters=new Int32Array(8),this.oddRoundingErrors=new Array(4),this.evenRoundingErrors=new Array(4),this.oddCounts=new Array(this.dataCharacterCounters.length/2),this.evenCounts=new Array(this.dataCharacterCounters.length/2)}getDecodeFinderCounters(){return this.decodeFinderCounters}getDataCharacterCounters(){return this.dataCharacterCounters}getOddRoundingErrors(){return this.oddRoundingErrors}getEvenRoundingErrors(){return this.evenRoundingErrors}getOddCounts(){return this.oddCounts}getEvenCounts(){return this.evenCounts}parseFinderValue(t,e){for(let r=0;rn&&(n=e[i],r=i);t[r]++}static decrement(t,e){let r=0,n=e[0];for(let i=1;i=Rt.MIN_FINDER_PATTERN_RATIO&&r<=Rt.MAX_FINDER_PATTERN_RATIO){let e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;for(let n of t)n>r&&(r=n),n=s-a-1&&(t-=Bt.combins(n-l-(s-a),s-a-2)),s-a-1>1){let r=0;for(let t=n-l-(s-a-2);t>e;t--)r+=Bt.combins(n-l-t-1,s-a-3);t-=r*(s-1-a)}else n-l>e&&t--;i+=t}n-=l}return i}static combins(t,e){let r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);let i=1,o=1;for(let e=t;e>r;e--)i*=e,o<=n&&(i/=o,o++);for(;o<=n;)i/=o,o++;return i}}class Lt{static buildBitArray(t){let e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);let r=new p(12*e),n=0,i=t[0].getRightChar().getValue();for(let t=11;t>=0;--t)0!=(i&1<=0;--t)0!=(o&1<=0;--e)0!=(t&1<10||r<0||r>10)throw new E;this.firstDigit=e,this.secondDigit=r}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return 10*this.firstDigit+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===kt.FNC1}isSecondDigitFNC1(){return this.secondDigit===kt.FNC1}isAnyFNC1(){return this.firstDigit===kt.FNC1||this.secondDigit===kt.FNC1}}kt.FNC1=10;class Ut{constructor(){}static parseFieldsInGeneralPurpose(t){if(!t)return null;if(t.length<2)throw new D;let e=t.substring(0,2);for(let r of Ut.TWO_DIGIT_DATA_LENGTH)if(r[0]===e)return r[1]===Ut.VARIABLE_LENGTH?Ut.processVariableAI(2,r[2],t):Ut.processFixedAI(2,r[1],t);if(t.length<3)throw new D;let r=t.substring(0,3);for(let e of Ut.THREE_DIGIT_DATA_LENGTH)if(e[0]===r)return e[1]===Ut.VARIABLE_LENGTH?Ut.processVariableAI(3,e[2],t):Ut.processFixedAI(3,e[1],t);for(let e of Ut.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(e[0]===r)return e[1]===Ut.VARIABLE_LENGTH?Ut.processVariableAI(4,e[2],t):Ut.processFixedAI(4,e[1],t);if(t.length<4)throw new D;let n=t.substring(0,4);for(let e of Ut.FOUR_DIGIT_DATA_LENGTH)if(e[0]===n)return e[1]===Ut.VARIABLE_LENGTH?Ut.processVariableAI(4,e[2],t):Ut.processFixedAI(4,e[1],t);throw new D}static processFixedAI(t,e,r){if(r.lengththis.information.getSize())return t+4<=this.information.getSize();for(let e=t;ethis.information.getSize()){let e=this.extractNumericValueFromBitArray(t,4);return new kt(this.information.getSize(),0===e?kt.FNC1:e-1,kt.FNC1)}let e=this.extractNumericValueFromBitArray(t,7);return new kt(t+7,(e-8)/11,(e-8)%11)}extractNumericValueFromBitArray(t,e){return Ht.extractNumericValueFromBitArray(this.information,t,e)}static extractNumericValueFromBitArray(t,e,r){let n=0;for(let i=0;ithis.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253}decodeIsoIec646(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Ft(t+5,Ft.FNC1);if(e>=5&&e<15)return new Ft(t+5,"0"+(e-5));let r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Ft(t+7,""+(n+1));if(n>=90&&n<116)return new Ft(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new E}return new Ft(t+8,r)}isStillAlpha(t){if(t+5>this.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63}decodeAlphanumeric(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Ft(t+5,Ft.FNC1);if(e>=5&&e<15)return new Ft(t+5,"0"+(e-5));let r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Ft(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new $("Decoding invalid alphanumeric value: "+n)}return new Ft(t+6,r)}isAlphaTo646ToAlphaLatch(t){if(t+1>this.information.getSize())return!1;for(let e=0;e<5&&e+tthis.information.getSize())return!1;for(let e=t;ethis.information.getSize())return!1;for(let e=0;e<4&&e+t{e.forEach((e=>{t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r}}class ee extends Rt{constructor(t){super(...arguments),this.pairs=new Array(ee.MAX_PAIRS),this.rows=new Array,this.startEnd=[2],this.verbose=!0===t}decodeRow(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return ee.constructResult(this.decodeRow2pairs(t,e))}catch(t){this.verbose&&console.log(t)}return this.pairs.length=0,this.startFromEven=!0,ee.constructResult(this.decodeRow2pairs(t,e))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(t,e){let r,n=!1;for(;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof D){if(!this.pairs.length)throw new D;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){let t=this.checkRowsBoolean(!1);if(null!=t)return t;if(t=this.checkRowsBoolean(!0),null!=t)return t}throw new D}checkRowsBoolean(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());let e=null;try{e=this.checkRows(new Array,0)}catch(t){this.verbose&&console.log(t)}return t&&(this.rows=this.rows.reverse()),e}checkRows(t,e){for(let r=e;re.length)continue;let r=!0;for(let n=0;nt){i=e.isEquivalent(this.pairs);break}n=e.isEquivalent(this.pairs),r++}i||n||ee.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new te(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(t,e){for(let r of e)if(r.getPairs().length!==t.length)for(let e of r.getPairs())for(let r of t)if($t.equals(e,r))break}static isPartialRow(t,e){for(let r of e){let e=!0;for(let n of t){let t=!1;for(let e of r.getPairs())if(n.equals(e)){t=!0;break}if(!t){e=!1;break}}if(e)return!0}return!1}getRows(){return this.rows}static constructResult(t){let e=Jt(Lt.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),i=[r[0],r[1],n[0],n[1]];return new x(e,null,null,i,U.RSS_EXPANDED,null)}checkChecksum(){let t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;let n=r.getChecksumPortion(),i=2;for(let t=1;t=0?r:this.isEmptyPair(e)?0:e[e.length-1].getFinderPattern().getStartEnd()[1];let s=e.length%2!=0;this.startFromEven&&(s=!s);let a=!1;for(;i=0&&!t.get(e);)e--;e++,n=this.startEnd[0]-e,i=e,o=this.startEnd[1]}else i=this.startEnd[0],o=t.getNextUnset(this.startEnd[1]+1),n=o-this.startEnd[1];let s,a=this.getDecodeFinderCounters();d.arraycopy(a,0,a,1,a.length-1),a[0]=n;try{s=this.parseFinderValue(a,ee.FINDER_PATTERNS)}catch(t){return null}return new bt(s,[i,o],i,o,e)}decodeDataCharacter(t,e,r,n){let i=this.getDataCharacterCounters();for(let t=0;t.3)throw new D;let a=this.getOddCounts(),l=this.getEvenCounts(),c=this.getOddRoundingErrors(),h=this.getEvenRoundingErrors();for(let t=0;t8){if(e>8.7)throw new D;r=8}let n=t/2;0==(1&t)?(a[n]=r,c[n]=e-r):(l[n]=r,h[n]=e-r)}this.adjustOddEvenCounts(17);let u=4*e.getValue()+(r?0:2)+(n?0:1)-1,d=0,f=0;for(let t=a.length-1;t>=0;t--){if(ee.isNotA1left(e,r,n)){let e=ee.WEIGHTS[u][2*t];f+=a[t]*e}d+=a[t]}let g=0;for(let t=l.length-1;t>=0;t--)if(ee.isNotA1left(e,r,n)){let e=ee.WEIGHTS[u][2*t+1];g+=l[t]*e}let w=f+g;if(0!=(1&d)||d>13||d<4)throw new D;let m=(13-d)/2,p=ee.SYMBOL_WIDEST[m],A=9-p,C=Bt.getRSSvalue(a,p,!0),E=Bt.getRSSvalue(l,A,!1),I=ee.EVEN_TOTAL_SUBSET[m],S=ee.GSUM[m];return new Ot(C*I+E+S,w)}static isNotA1left(t,e,r){return!(0==t.getValue()&&e&&r)}adjustOddEvenCounts(t){let e=rt.sum(new Int32Array(this.getOddCounts())),r=rt.sum(new Int32Array(this.getEvenCounts())),n=!1,i=!1;e>13?i=!0:e<4&&(n=!0);let o=!1,s=!1;r>13?s=!0:r<4&&(o=!0);let a=e+r-t,l=1==(1&e),c=0==(1&r);if(1==a)if(l){if(c)throw new D;i=!0}else{if(!c)throw new D;s=!0}else if(-1==a)if(l){if(c)throw new D;n=!0}else{if(!c)throw new D;o=!0}else{if(0!=a)throw new D;if(l){if(!c)throw new D;e1)for(let e of this.possibleRightPairs)if(e.getCount()>1&&ne.checkChecksum(t,e))return ne.constructResult(t,e);throw new D}static addOrTally(t,e){if(null==e)return;let r=!1;for(let n of t)if(n.getValue()===e.getValue()){n.incrementCount(),r=!0;break}r||t.push(e)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(t,e){let r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),i=new y;for(let t=13-n.length;t>0;t--)i.append("0");i.append(n);let o=0;for(let t=0;t<13;t++){let e=i.charAt(t).charCodeAt(0)-"0".charCodeAt(0);o+=0==(1&t)?3*e:e}o=10-o%10,10===o&&(o=0),i.append(o.toString());let s=t.getFinderPattern().getResultPoints(),a=e.getFinderPattern().getResultPoints();return new x(i.toString(),null,0,[s[0],s[1],a[0],a[1]],U.RSS_14,(new Date).getTime())}static checkChecksum(t,e){let r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n}decodePair(t,e,r,n){try{let i=this.findFinderPattern(t,e),o=this.parseFoundFinderPattern(t,r,e,i),s=null==n?null:n.get(C.NEED_RESULT_POINT_CALLBACK);if(null!=s){let n=(i[0]+i[1])/2;e&&(n=t.getSize()-1-n),s.foundPossibleResultPoint(new it(n,r))}let a=this.decodeDataCharacter(t,o,!0),l=this.decodeDataCharacter(t,o,!1);return new re(1597*a.getValue()+l.getValue(),a.getChecksumPortion()+4*l.getChecksumPortion(),o)}catch(t){return null}}decodeDataCharacter(t,e,r){let n=this.getDataCharacterCounters();for(let t=0;t8&&(r=8);let i=Math.floor(t/2);0==(1&t)?(s[i]=r,l[i]=e-r):(a[i]=r,c[i]=e-r)}this.adjustOddEvenCounts(r,i);let h=0,u=0;for(let t=s.length-1;t>=0;t--)u*=9,u+=s[t],h+=s[t];let d=0,f=0;for(let t=a.length-1;t>=0;t--)d*=9,d+=a[t],f+=a[t];let g=u+3*d;if(r){if(0!=(1&h)||h>12||h<4)throw new D;let t=(12-h)/2,e=ne.OUTSIDE_ODD_WIDEST[t],r=9-e,n=Bt.getRSSvalue(s,e,!1),i=Bt.getRSSvalue(a,r,!0),o=ne.OUTSIDE_EVEN_TOTAL_SUBSET[t],l=ne.OUTSIDE_GSUM[t];return new Ot(n*o+i+l,g)}{if(0!=(1&f)||f>10||f<4)throw new D;let t=(10-f)/2,e=ne.INSIDE_ODD_WIDEST[t],r=9-e,n=Bt.getRSSvalue(s,e,!0),i=Bt.getRSSvalue(a,r,!1),o=ne.INSIDE_ODD_TOTAL_SUBSET[t],l=ne.INSIDE_GSUM[t];return new Ot(i*o+n+l,g)}}findFinderPattern(t,e){let r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;let n=t.getSize(),i=!1,o=0;for(;o=0&&i!==t.get(o);)o--;o++;const s=n[0]-o,a=this.getDecodeFinderCounters(),l=new Int32Array(a.length);d.arraycopy(a,0,l,1,a.length-1),l[0]=s;const c=this.parseFinderValue(l,ne.FINDER_PATTERNS);let h=o,u=n[1];return r&&(h=t.getSize()-1-h,u=t.getSize()-1-u),new bt(c,[o,n[1]],h,u,e)}adjustOddEvenCounts(t,e){let r=rt.sum(new Int32Array(this.getOddCounts())),n=rt.sum(new Int32Array(this.getEvenCounts())),i=!1,o=!1,s=!1,a=!1;t?(r>12?o=!0:r<4&&(i=!0),n>12?a=!0:n<4&&(s=!0)):(r>11?o=!0:r<5&&(i=!0),n>10?a=!0:n<4&&(s=!0));let l=r+n-e,c=(1&r)==(t?1:0),h=1==(1&n);if(1===l)if(c){if(h)throw new D;o=!0}else{if(!h)throw new D;a=!0}else if(-1===l)if(c){if(h)throw new D;i=!0}else{if(!h)throw new D;s=!0}else{if(0!==l)throw new D;if(c){if(!h)throw new D;rt.reset()))}}class oe{constructor(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class se{constructor(t,e){this.count=t,this.dataCodewords=e}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class ae{constructor(t,e,r,n,i,o){this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=i,this.ecBlocks=o;let s=0;const a=o.getECCodewords(),l=o.getECBlocks();for(let t of l)s+=t.getCount()*(t.getDataCodewords()+a);this.totalCodewords=s}getVersionNumber(){return this.versionNumber}getSymbolSizeRows(){return this.symbolSizeRows}getSymbolSizeColumns(){return this.symbolSizeColumns}getDataRegionSizeRows(){return this.dataRegionSizeRows}getDataRegionSizeColumns(){return this.dataRegionSizeColumns}getTotalCodewords(){return this.totalCodewords}getECBlocks(){return this.ecBlocks}static getVersionForDimensions(t,e){if(0!=(1&t)||0!=(1&e))throw new E;for(let r of ae.VERSIONS)if(r.symbolSizeRows===t&&r.symbolSizeColumns===e)return r;throw new E}toString(){return""+this.versionNumber}static buildVersions(){return[new ae(1,10,10,8,8,new oe(5,new se(1,3))),new ae(2,12,12,10,10,new oe(7,new se(1,5))),new ae(3,14,14,12,12,new oe(10,new se(1,8))),new ae(4,16,16,14,14,new oe(12,new se(1,12))),new ae(5,18,18,16,16,new oe(14,new se(1,18))),new ae(6,20,20,18,18,new oe(18,new se(1,22))),new ae(7,22,22,20,20,new oe(20,new se(1,30))),new ae(8,24,24,22,22,new oe(24,new se(1,36))),new ae(9,26,26,24,24,new oe(28,new se(1,44))),new ae(10,32,32,14,14,new oe(36,new se(1,62))),new ae(11,36,36,16,16,new oe(42,new se(1,86))),new ae(12,40,40,18,18,new oe(48,new se(1,114))),new ae(13,44,44,20,20,new oe(56,new se(1,144))),new ae(14,48,48,22,22,new oe(68,new se(1,174))),new ae(15,52,52,24,24,new oe(42,new se(2,102))),new ae(16,64,64,14,14,new oe(56,new se(2,140))),new ae(17,72,72,16,16,new oe(36,new se(4,92))),new ae(18,80,80,18,18,new oe(48,new se(4,114))),new ae(19,88,88,20,20,new oe(56,new se(4,144))),new ae(20,96,96,22,22,new oe(68,new se(4,174))),new ae(21,104,104,24,24,new oe(56,new se(6,136))),new ae(22,120,120,18,18,new oe(68,new se(6,175))),new ae(23,132,132,20,20,new oe(62,new se(8,163))),new ae(24,144,144,22,22,new oe(62,new se(8,156),new se(2,155))),new ae(25,8,18,6,16,new oe(7,new se(1,5))),new ae(26,8,32,6,14,new oe(11,new se(1,10))),new ae(27,12,26,10,24,new oe(14,new se(1,16))),new ae(28,12,36,10,16,new oe(18,new se(1,22))),new ae(29,16,36,14,16,new oe(24,new se(1,32))),new ae(30,16,48,14,22,new oe(28,new se(1,49)))]}}ae.VERSIONS=ae.buildVersions();class le{constructor(t){const e=t.getHeight();if(e<8||e>144||0!=(1&e))throw new E;this.version=le.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new N(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(t){const e=t.getHeight(),r=t.getWidth();return ae.getVersionForDimensions(e,r)}readCodewords(){const t=new Int8Array(this.version.getTotalCodewords());let e=0,r=4,n=0;const i=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth();let s=!1,a=!1,l=!1,c=!1;do{if(r!==i||0!==n||s)if(r!==i-2||0!==n||0==(3&o)||a)if(r!==i+4||2!==n||0!=(7&o)||l)if(r!==i-2||0!==n||4!=(7&o)||c){do{r=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,i,o)),r-=2,n+=2}while(r>=0&&n=0&&n=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(i,o),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(i,o),r-=2,n+=2,l=!0;else t[e++]=255&this.readCorner2(i,o),r-=2,n+=2,a=!0;else t[e++]=255&this.readCorner1(i,o),r-=2,n+=2,s=!0}while(r7?e-1:e;o[n].codewords[i]=t[h++]}if(h!==t.length)throw new l;return o}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class he{constructor(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(t){if(t<1||t>32||t>this.available())throw new l(""+t);let e=0,r=this.bitOffset,n=this.byteOffset;const i=this.bytes;if(r>0){const o=8-r,s=t>8-s<>a,t-=s,r+=s,8===r&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&i[n],n++,t-=8;if(t>0){const o=8-t,s=255>>o<>o,r+=t}}return this.bitOffset=r,this.byteOffset=n,e}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(V||(V={}));class ue{static decode(t){const e=new he(t),r=new y,n=new y,i=new Array;let o=V.ASCII_ENCODE;do{if(o===V.ASCII_ENCODE)o=this.decodeAsciiSegment(e,r,n);else{switch(o){case V.C40_ENCODE:this.decodeC40Segment(e,r);break;case V.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case V.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case V.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case V.BASE256_ENCODE:this.decodeBase256Segment(e,r,i);break;default:throw new E}o=V.ASCII_ENCODE}}while(o!==V.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new j(t,r.toString(),0===i.length?null:i,null)}static decodeAsciiSegment(t,e,r){let n=!1;do{let i=t.readBits(8);if(0===i)throw new E;if(i<=128)return n&&(i+=128),e.append(String.fromCharCode(i-1)),V.ASCII_ENCODE;if(129===i)return V.PAD_ENCODE;if(i<=229){const t=i-130;t<10&&e.append("0"),e.append(""+t)}else switch(i){case 230:return V.C40_ENCODE;case 231:return V.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return V.ANSIX12_ENCODE;case 239:return V.TEXT_ENCODE;case 240:return V.EDIFACT_ENCODE;default:if(254!==i||0!==t.available())throw new E}}while(t.available()>0);return V.ASCII_ENCODE}static decodeC40Segment(t,e){let r=!1;const n=[];let i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o0)}static decodeTextSegment(t,e){let r=!1,n=[],i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o0)}static decodeAnsiX12Segment(t,e){const r=[];do{if(8===t.available())return;const n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(let t=0;t<3;t++){const n=r[t];switch(n){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(n<14)e.append(String.fromCharCode(n+44));else{if(!(n<40))throw new E;e.append(String.fromCharCode(n+51))}}}}while(t.available()>0)}static parseTwoBytes(t,e,r){let n=(t<<8)+e-1,i=Math.floor(n/1600);r[0]=i,n-=1600*i,i=Math.floor(n/40),r[1]=i,r[2]=n-40*i}static decodeEdifactSegment(t,e){do{if(t.available()<=16)return;for(let r=0;r<4;r++){let r=t.readBits(6);if(31===r){const e=8-t.getBitOffset();return void(8!==e&&t.readBits(e))}0==(32&r)&&(r|=64),e.append(String.fromCharCode(r))}}while(t.available()>0)}static decodeBase256Segment(t,e,r){let n=1+t.getByteOffset();const i=this.unrandomize255State(t.readBits(8),n++);let o;if(o=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),n++),o<0)throw new E;const s=new Uint8Array(o);for(let e=0;e=0?r:r+256}}ue.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ue.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],ue.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],ue.TEXT_SHIFT2_SET_CHARS=ue.C40_SHIFT2_SET_CHARS,ue.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)];class de{constructor(){this.rsDecoder=new tt(q.DATA_MATRIX_FIELD_256)}decode(t){const e=new le(t),r=e.getVersion(),n=e.readCodewords(),i=ce.getDataBlocks(n,r);let o=0;for(let t of i)o+=t.getNumDataCodewords();const s=new Uint8Array(o),a=i.length;for(let t=0;ts&&(c=s,h[0]=e,h[1]=r,h[2]=n,h[3]=i),c>a&&(c=a,h[0]=r,h[1]=n,h[2]=i,h[3]=e),c>l&&(h[0]=n,h[1]=i,h[2]=e,h[3]=r),h}detectSolid2(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i),s=fe.shiftPoint(r,n,4*(o+1)),a=fe.shiftPoint(n,r,4*(o+1));return this.transitionsBetween(s,e)this.transitionsBetween(a,h)+this.transitionsBetween(l,h)?c:h:c:this.isValid(h)?h:null}shiftToModuleCenter(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i)+1,s=this.transitionsBetween(n,i)+1,a=fe.shiftPoint(e,r,4*s),l=fe.shiftPoint(n,r,4*o);o=this.transitionsBetween(a,i)+1,s=this.transitionsBetween(l,i)+1,1==(1&o)&&(o+=1),1==(1&s)&&(s+=1);let c,h,u=(e.getX()+r.getX()+n.getX()+i.getX())/4,d=(e.getY()+r.getY()+n.getY()+i.getY())/4;return e=fe.moveAway(e,u,d),r=fe.moveAway(r,u,d),n=fe.moveAway(n,u,d),i=fe.moveAway(i,u,d),a=fe.shiftPoint(e,r,4*s),a=fe.shiftPoint(a,i,4*o),c=fe.shiftPoint(r,e,4*s),c=fe.shiftPoint(c,n,4*o),l=fe.shiftPoint(n,i,4*s),l=fe.shiftPoint(l,r,4*o),h=fe.shiftPoint(i,n,4*s),h=fe.shiftPoint(h,e,4*o),[a,c,l,h]}isValid(t){return t.getX()>=0&&t.getX()0&&t.getY()Math.abs(i-r);if(s){let t=r;r=n,n=t,t=i,i=o,o=t}let a=Math.abs(i-r),l=Math.abs(o-n),c=-a/2,h=n0){if(e===o)break;e+=h,c-=a}}return d}}class ge{constructor(){this.decoder=new de}decode(t,e=null){let r,n;if(null!=e&&e.has(C.PURE_BARCODE)){const e=ge.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(e),n=ge.NO_POINTS}else{const e=new fe(t.getBlackMatrix()).detect();r=this.decoder.decode(e.getBits()),n=e.getPoints()}const i=r.getRawBytes(),o=new x(r.getText(),i,8*i.length,n,U.DATA_MATRIX,d.currentTimeMillis()),s=r.getByteSegments();null!=s&&o.putMetadata(W.BYTE_SEGMENTS,s);const a=r.getECLevel();return null!=a&&o.putMetadata(W.ERROR_CORRECTION_LEVEL,a),o}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new D;const n=this.moduleSize(e,t);let i=e[1];const o=r[1];let s=e[0];const a=(r[0]-s+1)/n,l=(o-i+1)/n;if(a<=0||l<=0)throw new D;const c=n/2;i+=c,s+=c;const h=new N(a,l);for(let e=0;e=we.FOR_BITS.size)throw new l;return we.FOR_BITS.get(t)}}we.FOR_BITS=new Map,we.FOR_VALUE=new Map,we.L=new we(z.L,"L",1),we.M=new we(z.M,"M",0),we.Q=new we(z.Q,"Q",3),we.H=new we(z.H,"H",2);class me{constructor(t){this.errorCorrectionLevel=we.forBits(t>>3&3),this.dataMask=7&t}static numBitsDiffering(t,e){return m.bitCount(t^e)}static decodeFormatInformation(t,e){const r=me.doDecodeFormatInformation(t,e);return null!==r?r:me.doDecodeFormatInformation(t^me.FORMAT_INFO_MASK_QR,e^me.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(t,e){let r=Number.MAX_SAFE_INTEGER,n=0;for(const i of me.FORMAT_INFO_DECODE_LOOKUP){const o=i[0];if(o===t||o===e)return new me(i[1]);let s=me.numBitsDiffering(t,o);s40)throw new l;return Ce.VERSIONS[t-1]}static decodeVersionInformation(t){let e=Number.MAX_SAFE_INTEGER,r=0;for(let n=0;n6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e}toString(){return""+this.versionNumber}}Ce.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),Ce.VERSIONS=[new Ce(1,new Int32Array(0),new pe(7,new Ae(1,19)),new pe(10,new Ae(1,16)),new pe(13,new Ae(1,13)),new pe(17,new Ae(1,9))),new Ce(2,Int32Array.from([6,18]),new pe(10,new Ae(1,34)),new pe(16,new Ae(1,28)),new pe(22,new Ae(1,22)),new pe(28,new Ae(1,16))),new Ce(3,Int32Array.from([6,22]),new pe(15,new Ae(1,55)),new pe(26,new Ae(1,44)),new pe(18,new Ae(2,17)),new pe(22,new Ae(2,13))),new Ce(4,Int32Array.from([6,26]),new pe(20,new Ae(1,80)),new pe(18,new Ae(2,32)),new pe(26,new Ae(2,24)),new pe(16,new Ae(4,9))),new Ce(5,Int32Array.from([6,30]),new pe(26,new Ae(1,108)),new pe(24,new Ae(2,43)),new pe(18,new Ae(2,15),new Ae(2,16)),new pe(22,new Ae(2,11),new Ae(2,12))),new Ce(6,Int32Array.from([6,34]),new pe(18,new Ae(2,68)),new pe(16,new Ae(4,27)),new pe(24,new Ae(4,19)),new pe(28,new Ae(4,15))),new Ce(7,Int32Array.from([6,22,38]),new pe(20,new Ae(2,78)),new pe(18,new Ae(4,31)),new pe(18,new Ae(2,14),new Ae(4,15)),new pe(26,new Ae(4,13),new Ae(1,14))),new Ce(8,Int32Array.from([6,24,42]),new pe(24,new Ae(2,97)),new pe(22,new Ae(2,38),new Ae(2,39)),new pe(22,new Ae(4,18),new Ae(2,19)),new pe(26,new Ae(4,14),new Ae(2,15))),new Ce(9,Int32Array.from([6,26,46]),new pe(30,new Ae(2,116)),new pe(22,new Ae(3,36),new Ae(2,37)),new pe(20,new Ae(4,16),new Ae(4,17)),new pe(24,new Ae(4,12),new Ae(4,13))),new Ce(10,Int32Array.from([6,28,50]),new pe(18,new Ae(2,68),new Ae(2,69)),new pe(26,new Ae(4,43),new Ae(1,44)),new pe(24,new Ae(6,19),new Ae(2,20)),new pe(28,new Ae(6,15),new Ae(2,16))),new Ce(11,Int32Array.from([6,30,54]),new pe(20,new Ae(4,81)),new pe(30,new Ae(1,50),new Ae(4,51)),new pe(28,new Ae(4,22),new Ae(4,23)),new pe(24,new Ae(3,12),new Ae(8,13))),new Ce(12,Int32Array.from([6,32,58]),new pe(24,new Ae(2,92),new Ae(2,93)),new pe(22,new Ae(6,36),new Ae(2,37)),new pe(26,new Ae(4,20),new Ae(6,21)),new pe(28,new Ae(7,14),new Ae(4,15))),new Ce(13,Int32Array.from([6,34,62]),new pe(26,new Ae(4,107)),new pe(22,new Ae(8,37),new Ae(1,38)),new pe(24,new Ae(8,20),new Ae(4,21)),new pe(22,new Ae(12,11),new Ae(4,12))),new Ce(14,Int32Array.from([6,26,46,66]),new pe(30,new Ae(3,115),new Ae(1,116)),new pe(24,new Ae(4,40),new Ae(5,41)),new pe(20,new Ae(11,16),new Ae(5,17)),new pe(24,new Ae(11,12),new Ae(5,13))),new Ce(15,Int32Array.from([6,26,48,70]),new pe(22,new Ae(5,87),new Ae(1,88)),new pe(24,new Ae(5,41),new Ae(5,42)),new pe(30,new Ae(5,24),new Ae(7,25)),new pe(24,new Ae(11,12),new Ae(7,13))),new Ce(16,Int32Array.from([6,26,50,74]),new pe(24,new Ae(5,98),new Ae(1,99)),new pe(28,new Ae(7,45),new Ae(3,46)),new pe(24,new Ae(15,19),new Ae(2,20)),new pe(30,new Ae(3,15),new Ae(13,16))),new Ce(17,Int32Array.from([6,30,54,78]),new pe(28,new Ae(1,107),new Ae(5,108)),new pe(28,new Ae(10,46),new Ae(1,47)),new pe(28,new Ae(1,22),new Ae(15,23)),new pe(28,new Ae(2,14),new Ae(17,15))),new Ce(18,Int32Array.from([6,30,56,82]),new pe(30,new Ae(5,120),new Ae(1,121)),new pe(26,new Ae(9,43),new Ae(4,44)),new pe(28,new Ae(17,22),new Ae(1,23)),new pe(28,new Ae(2,14),new Ae(19,15))),new Ce(19,Int32Array.from([6,30,58,86]),new pe(28,new Ae(3,113),new Ae(4,114)),new pe(26,new Ae(3,44),new Ae(11,45)),new pe(26,new Ae(17,21),new Ae(4,22)),new pe(26,new Ae(9,13),new Ae(16,14))),new Ce(20,Int32Array.from([6,34,62,90]),new pe(28,new Ae(3,107),new Ae(5,108)),new pe(26,new Ae(3,41),new Ae(13,42)),new pe(30,new Ae(15,24),new Ae(5,25)),new pe(28,new Ae(15,15),new Ae(10,16))),new Ce(21,Int32Array.from([6,28,50,72,94]),new pe(28,new Ae(4,116),new Ae(4,117)),new pe(26,new Ae(17,42)),new pe(28,new Ae(17,22),new Ae(6,23)),new pe(30,new Ae(19,16),new Ae(6,17))),new Ce(22,Int32Array.from([6,26,50,74,98]),new pe(28,new Ae(2,111),new Ae(7,112)),new pe(28,new Ae(17,46)),new pe(30,new Ae(7,24),new Ae(16,25)),new pe(24,new Ae(34,13))),new Ce(23,Int32Array.from([6,30,54,78,102]),new pe(30,new Ae(4,121),new Ae(5,122)),new pe(28,new Ae(4,47),new Ae(14,48)),new pe(30,new Ae(11,24),new Ae(14,25)),new pe(30,new Ae(16,15),new Ae(14,16))),new Ce(24,Int32Array.from([6,28,54,80,106]),new pe(30,new Ae(6,117),new Ae(4,118)),new pe(28,new Ae(6,45),new Ae(14,46)),new pe(30,new Ae(11,24),new Ae(16,25)),new pe(30,new Ae(30,16),new Ae(2,17))),new Ce(25,Int32Array.from([6,32,58,84,110]),new pe(26,new Ae(8,106),new Ae(4,107)),new pe(28,new Ae(8,47),new Ae(13,48)),new pe(30,new Ae(7,24),new Ae(22,25)),new pe(30,new Ae(22,15),new Ae(13,16))),new Ce(26,Int32Array.from([6,30,58,86,114]),new pe(28,new Ae(10,114),new Ae(2,115)),new pe(28,new Ae(19,46),new Ae(4,47)),new pe(28,new Ae(28,22),new Ae(6,23)),new pe(30,new Ae(33,16),new Ae(4,17))),new Ce(27,Int32Array.from([6,34,62,90,118]),new pe(30,new Ae(8,122),new Ae(4,123)),new pe(28,new Ae(22,45),new Ae(3,46)),new pe(30,new Ae(8,23),new Ae(26,24)),new pe(30,new Ae(12,15),new Ae(28,16))),new Ce(28,Int32Array.from([6,26,50,74,98,122]),new pe(30,new Ae(3,117),new Ae(10,118)),new pe(28,new Ae(3,45),new Ae(23,46)),new pe(30,new Ae(4,24),new Ae(31,25)),new pe(30,new Ae(11,15),new Ae(31,16))),new Ce(29,Int32Array.from([6,30,54,78,102,126]),new pe(30,new Ae(7,116),new Ae(7,117)),new pe(28,new Ae(21,45),new Ae(7,46)),new pe(30,new Ae(1,23),new Ae(37,24)),new pe(30,new Ae(19,15),new Ae(26,16))),new Ce(30,Int32Array.from([6,26,52,78,104,130]),new pe(30,new Ae(5,115),new Ae(10,116)),new pe(28,new Ae(19,47),new Ae(10,48)),new pe(30,new Ae(15,24),new Ae(25,25)),new pe(30,new Ae(23,15),new Ae(25,16))),new Ce(31,Int32Array.from([6,30,56,82,108,134]),new pe(30,new Ae(13,115),new Ae(3,116)),new pe(28,new Ae(2,46),new Ae(29,47)),new pe(30,new Ae(42,24),new Ae(1,25)),new pe(30,new Ae(23,15),new Ae(28,16))),new Ce(32,Int32Array.from([6,34,60,86,112,138]),new pe(30,new Ae(17,115)),new pe(28,new Ae(10,46),new Ae(23,47)),new pe(30,new Ae(10,24),new Ae(35,25)),new pe(30,new Ae(19,15),new Ae(35,16))),new Ce(33,Int32Array.from([6,30,58,86,114,142]),new pe(30,new Ae(17,115),new Ae(1,116)),new pe(28,new Ae(14,46),new Ae(21,47)),new pe(30,new Ae(29,24),new Ae(19,25)),new pe(30,new Ae(11,15),new Ae(46,16))),new Ce(34,Int32Array.from([6,34,62,90,118,146]),new pe(30,new Ae(13,115),new Ae(6,116)),new pe(28,new Ae(14,46),new Ae(23,47)),new pe(30,new Ae(44,24),new Ae(7,25)),new pe(30,new Ae(59,16),new Ae(1,17))),new Ce(35,Int32Array.from([6,30,54,78,102,126,150]),new pe(30,new Ae(12,121),new Ae(7,122)),new pe(28,new Ae(12,47),new Ae(26,48)),new pe(30,new Ae(39,24),new Ae(14,25)),new pe(30,new Ae(22,15),new Ae(41,16))),new Ce(36,Int32Array.from([6,24,50,76,102,128,154]),new pe(30,new Ae(6,121),new Ae(14,122)),new pe(28,new Ae(6,47),new Ae(34,48)),new pe(30,new Ae(46,24),new Ae(10,25)),new pe(30,new Ae(2,15),new Ae(64,16))),new Ce(37,Int32Array.from([6,28,54,80,106,132,158]),new pe(30,new Ae(17,122),new Ae(4,123)),new pe(28,new Ae(29,46),new Ae(14,47)),new pe(30,new Ae(49,24),new Ae(10,25)),new pe(30,new Ae(24,15),new Ae(46,16))),new Ce(38,Int32Array.from([6,32,58,84,110,136,162]),new pe(30,new Ae(4,122),new Ae(18,123)),new pe(28,new Ae(13,46),new Ae(32,47)),new pe(30,new Ae(48,24),new Ae(14,25)),new pe(30,new Ae(42,15),new Ae(32,16))),new Ce(39,Int32Array.from([6,26,54,82,110,138,166]),new pe(30,new Ae(20,117),new Ae(4,118)),new pe(28,new Ae(40,47),new Ae(7,48)),new pe(30,new Ae(43,24),new Ae(22,25)),new pe(30,new Ae(10,15),new Ae(67,16))),new Ce(40,Int32Array.from([6,30,58,86,114,142,170]),new pe(30,new Ae(19,118),new Ae(6,119)),new pe(28,new Ae(18,47),new Ae(31,48)),new pe(30,new Ae(34,24),new Ae(34,25)),new pe(30,new Ae(20,15),new Ae(61,16)))],function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(G||(G={}));class Ee{constructor(t,e){this.value=t,this.isMasked=e}unmaskBitMatrix(t,e){for(let r=0;r0==(t+e&1)))],[G.DATA_MASK_001,new Ee(G.DATA_MASK_001,((t,e)=>0==(1&t)))],[G.DATA_MASK_010,new Ee(G.DATA_MASK_010,((t,e)=>e%3==0))],[G.DATA_MASK_011,new Ee(G.DATA_MASK_011,((t,e)=>(t+e)%3==0))],[G.DATA_MASK_100,new Ee(G.DATA_MASK_100,((t,e)=>0==(Math.floor(t/2)+Math.floor(e/3)&1)))],[G.DATA_MASK_101,new Ee(G.DATA_MASK_101,((t,e)=>t*e%6==0))],[G.DATA_MASK_110,new Ee(G.DATA_MASK_110,((t,e)=>t*e%6<3))],[G.DATA_MASK_111,new Ee(G.DATA_MASK_111,((t,e)=>0==(t+e+t*e%3&1)))]]);class Ie{constructor(t){const e=t.getHeight();if(e<21||1!=(3&e))throw new E;this.bitMatrix=t}readFormatInformation(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;let t=0;for(let e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(let e=5;e>=0;e--)t=this.copyBit(8,e,t);const e=this.bitMatrix.getHeight();let r=0;const n=e-7;for(let t=e-1;t>=n;t--)r=this.copyBit(8,t,r);for(let t=e-8;t=0;e--)for(let i=t-9;i>=n;i--)r=this.copyBit(i,e,r);let i=Ce.decodeVersionInformation(r);if(null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;r=0;for(let e=5;e>=0;e--)for(let i=t-9;i>=n;i--)r=this.copyBit(e,i,r);if(i=Ce.decodeVersionInformation(r),null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;throw new E}copyBit(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1}readCodewords(){const t=this.readFormatInformation(),e=this.readVersion(),r=Ee.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);const i=e.buildFunctionPattern();let o=!0;const s=new Uint8Array(e.getTotalCodewords());let a=0,l=0,c=0;for(let t=n-1;t>0;t-=2){6===t&&t--;for(let e=0;e=0&&s[h].codewords.length!==c;)h--;h++;const u=c-n.getECCodewordsPerBlock();let d=0;for(let e=0;et.available())throw new E;const n=new Uint8Array(2*r);let i=0;for(;r>0;){const e=t.readBits(13);let o=e/96<<8&4294967295|e%96;o+=o<959?41377:42657,n[i]=o>>8&255,n[i+1]=255&o,i+=2,r--}try{e.append(_.decode(n,T.GB2312))}catch(t){throw new E(t)}}static decodeKanjiSegment(t,e,r){if(13*r>t.available())throw new E;const n=new Uint8Array(2*r);let i=0;for(;r>0;){const e=t.readBits(13);let o=e/192<<8&4294967295|e%192;o+=o<7936?33088:49472,n[i]=o>>8,n[i+1]=o,i+=2,r--}try{e.append(_.decode(n,T.SHIFT_JIS))}catch(t){throw new E(t)}}static decodeByteSegment(t,e,r,n,i,o){if(8*r>t.available())throw new E;const s=new Uint8Array(r);for(let e=0;e=Te.ALPHANUMERIC_CHARS.length)throw new E;return Te.ALPHANUMERIC_CHARS[t]}static decodeAlphanumericSegment(t,e,r,n){const i=e.length();for(;r>1;){if(t.available()<11)throw new E;const n=t.readBits(11);e.append(Te.toAlphaNumericChar(Math.floor(n/45))),e.append(Te.toAlphaNumericChar(n%45)),r-=2}if(1===r){if(t.available()<6)throw new E;e.append(Te.toAlphaNumericChar(t.readBits(6)))}if(n)for(let t=i;t=3;){if(t.available()<10)throw new E;const n=t.readBits(10);if(n>=1e3)throw new E;e.append(Te.toAlphaNumericChar(Math.floor(n/100))),e.append(Te.toAlphaNumericChar(Math.floor(n/10)%10)),e.append(Te.toAlphaNumericChar(n%10)),r-=3}if(2===r){if(t.available()<7)throw new E;const r=t.readBits(7);if(r>=100)throw new E;e.append(Te.toAlphaNumericChar(Math.floor(r/10))),e.append(Te.toAlphaNumericChar(r%10))}else if(1===r){if(t.available()<4)throw new E;const r=t.readBits(4);if(r>=10)throw new E;e.append(Te.toAlphaNumericChar(r))}}static parseECIValue(t){const e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new E}}Te.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Te.GB2312_SUBSET=1;class ye{constructor(t){this.mirrored=t}isMirrored(){return this.mirrored}applyMirroredCorrection(t){if(!this.mirrored||null===t||t.length<3)return;const e=t[0];t[0]=t[2],t[2]=e}}class Ne{constructor(){this.rsDecoder=new tt(q.QR_CODE_FIELD_256)}decodeBooleanArray(t,e){return this.decodeBitMatrix(N.parseFromBooleanArray(t),e)}decodeBitMatrix(t,e){const r=new Ie(t);let n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();const t=this.decodeBitMatrixParser(r,e);return t.setOther(new ye(!0)),t}catch(t){if(null!==n)throw n;throw t}}decodeBitMatrixParser(t,e){const r=t.readVersion(),n=t.readFormatInformation().getErrorCorrectionLevel(),i=t.readCodewords(),o=Se.getDataBlocks(i,r,n);let s=0;for(const t of o)s+=t.getNumDataCodewords();const a=new Uint8Array(s);let l=0;for(const t of o){const e=t.getCodewords(),r=t.getNumDataCodewords();this.correctErrors(e,r);for(let t=0;t=r)return!1;return!0}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;let a=t;for(;a>=0&&i.get(e,a)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&!i.get(e,a)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;ar)return NaN;for(;ar)return NaN;const l=s[0]+s[1]+s[2];return 5*Math.abs(l-n)>=2*n?NaN:this.foundPatternCross(s)?Me.centerFromEnd(s,a):NaN}handlePossibleCenter(t,e,r){const n=t[0]+t[1]+t[2],i=Me.centerFromEnd(t,r),o=this.crossCheckVertical(e,i,2*t[1],n);if(!isNaN(o)){const e=(t[0]+t[1]+t[2])/3;for(const t of this.possibleCenters)if(t.aboutEquals(e,o,i))return t.combineEstimate(o,i,e);const r=new De(i,o,e);this.possibleCenters.push(r),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(r)}return null}}class Re extends it{constructor(t,e,r,n){super(t,e),this.estimatedModuleSize=r,this.count=n,void 0===n&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){const e=Math.abs(t-this.estimatedModuleSize);return e<=1||e<=this.estimatedModuleSize}return!1}combineEstimate(t,e,r){const n=this.count+1,i=(this.count*this.getX()+e)/n,o=(this.count*this.getY()+t)/n,s=(this.count*this.estimatedModuleSize+r)/n;return new Re(i,o,s,n)}}class Oe{constructor(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}class be{constructor(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}find(t){const e=null!=t&&void 0!==t.get(C.TRY_HARDER),r=null!=t&&void 0!==t.get(C.PURE_BARCODE),n=this.image,i=n.getHeight(),o=n.getWidth();let s=Math.floor(3*i/(4*be.MAX_MODULES));(sl[2]&&(t+=e-l[2]-s,i=o-1)}e=0,l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0}else l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,e=3;else l[++e]++;else l[e]++;be.foundPatternCross(l)&&!0===this.handlePossibleCenter(l,t,o,r)&&(s=l[0],this.hasSkipped&&(a=this.haveMultiplyConfirmedCenters()))}const c=this.selectBestPatterns();return it.orderBestPatterns(c),new Oe(c)}static centerFromEnd(t,e){return e-t[4]-t[3]-t[2]/2}static foundPatternCross(t){let e=0;for(let r=0;r<5;r++){const n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;const r=e/7,n=r/2;return Math.abs(r-t[0])=o&&e>=o&&s.get(e-o,t-o);)i[2]++,o++;if(t=o&&e>=o&&!s.get(e-o,t-o)&&i[1]<=r;)i[1]++,o++;if(tr)return!1;for(;t>=o&&e>=o&&s.get(e-o,t-o)&&i[0]<=r;)i[0]++,o++;if(i[0]>r)return!1;const a=s.getHeight(),l=s.getWidth();for(o=1;t+o=a||e+o>=l)return!1;for(;t+o=a||e+o>=l||i[3]>=r)return!1;for(;t+o=r)return!1;const c=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(c-n)<2*n&&be.foundPatternCross(i)}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),s=this.getCrossCheckStateCount();let a=t;for(;a>=0&&i.get(e,a);)s[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(e,a)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&i.get(e,a)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;a=r)return NaN;for(;a=r)return NaN;const l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-n)>=2*n?NaN:be.foundPatternCross(s)?be.centerFromEnd(s,a):NaN}crossCheckHorizontal(t,e,r,n){const i=this.image,o=i.getWidth(),s=this.getCrossCheckStateCount();let a=t;for(;a>=0&&i.get(a,e);)s[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(a,e)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&i.get(a,e)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;a=r)return NaN;for(;a=r)return NaN;const l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-n)>=n?NaN:be.foundPatternCross(s)?be.centerFromEnd(s,a):NaN}handlePossibleCenter(t,e,r,n){const i=t[0]+t[1]+t[2]+t[3]+t[4];let o=be.centerFromEnd(t,r),s=this.crossCheckVertical(e,Math.floor(o),t[2],i);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),t[2],i),!isNaN(o)&&(!n||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),t[2],i)))){const t=i/7;let e=!1;const r=this.possibleCenters;for(let n=0,i=r.length;n=be.CENTER_QUORUM){if(null!=t)return this.hasSkipped=!0,Math.floor((Math.abs(t.getX()-e.getX())-Math.abs(t.getY()-e.getY()))/2);t=e}return 0}haveMultiplyConfirmedCenters(){let t=0,e=0;const r=this.possibleCenters.length;for(const r of this.possibleCenters)r.getCount()>=be.CENTER_QUORUM&&(t++,e+=r.getEstimatedModuleSize());if(t<3)return!1;const n=e/r;let i=0;for(const t of this.possibleCenters)i+=Math.abs(t.getEstimatedModuleSize()-n);return i<=.05*e}selectBestPatterns(){const t=this.possibleCenters.length;if(t<3)throw new D;const e=this.possibleCenters;let r;if(t>3){let n=0,i=0;for(const t of this.possibleCenters){const e=t.getEstimatedModuleSize();n+=e,i+=e*e}r=n/t;let o=Math.sqrt(i/t-r*r);e.sort(((t,e)=>{const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return ni?1:0}));const s=Math.max(.2*r,o);for(let t=0;t3;t++){const n=e[t];Math.abs(n.getEstimatedModuleSize()-r)>s&&(e.splice(t,1),t--)}}if(e.length>3){let t=0;for(const r of e)t+=r.getEstimatedModuleSize();r=t/e.length,e.sort(((t,e)=>{if(e.getCount()===t.getCount()){const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return ni?-1:0}return e.getCount()-t.getCount()})),e.splice(3)}return[e[0],e[1],e[2]]}}be.CENTER_QUORUM=2,be.MIN_SKIP=3,be.MAX_MODULES=57;class Be{constructor(t){this.image=t}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(t){this.resultPointCallback=null==t?null:t.get(C.NEED_RESULT_POINT_CALLBACK);const e=new be(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)}processFinderPatternInfo(t){const e=t.getTopLeft(),r=t.getTopRight(),n=t.getBottomLeft(),i=this.calculateModuleSize(e,r,n);if(i<1)throw new D("No pattern found in proccess finder.");const o=Be.computeDimension(e,r,n,i),s=Ce.getProvisionalVersionForDimension(o),a=s.getDimensionForVersion()-7;let l=null;if(s.getAlignmentPatternCenters().length>0){const t=r.getX()-e.getX()+n.getX(),o=r.getY()-e.getY()+n.getY(),s=1-3/a,c=Math.floor(e.getX()+s*(t-e.getX())),h=Math.floor(e.getY()+s*(o-e.getY()));for(let t=4;t<=16;t<<=1)try{l=this.findAlignmentInRegion(i,c,h,t);break}catch(t){if(!(t instanceof D))throw t}}const c=Be.createTransform(e,r,n,l,o),h=Be.sampleGrid(this.image,c,o);let u;return u=null===l?[n,e,r]:[n,e,r,l],new ot(h,u)}static createTransform(t,e,r,n,i){const o=i-3.5;let s,a,l,c;return null!==n?(s=n.getX(),a=n.getY(),l=o-3,c=l):(s=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),l=o,c=o),ct.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,l,c,3.5,o,t.getX(),t.getY(),e.getX(),e.getY(),s,a,r.getX(),r.getY())}static sampleGrid(t,e,r){return ut.getInstance().sampleGridWithTransform(t,r,r,e)}static computeDimension(t,e,r,n){const i=rt.round(it.distance(t,e)/n),o=rt.round(it.distance(t,r)/n);let s=Math.floor((i+o)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new D("Dimensions could be not found.")}return s}calculateModuleSize(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2}calculateModuleSizeOneWay(t,e){const r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14}sizeOfBlackWhiteBlackRunBothWays(t,e,r,n){let i=this.sizeOfBlackWhiteBlackRun(t,e,r,n),o=1,s=t-(r-t);s<0?(o=t/(t-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-t)/(s-t),s=this.image.getWidth()-1);let a=Math.floor(e-(n-e)*o);return o=1,a<0?(o=e/(e-a),a=0):a>=this.image.getHeight()&&(o=(this.image.getHeight()-1-e)/(a-e),a=this.image.getHeight()-1),s=Math.floor(t+(s-t)*o),i+=this.sizeOfBlackWhiteBlackRun(t,e,s,a),i-1}sizeOfBlackWhiteBlackRun(t,e,r,n){const i=Math.abs(n-e)>Math.abs(r-t);if(i){let i=t;t=e,e=i,i=r,r=n,n=i}const o=Math.abs(r-t),s=Math.abs(n-e);let a=-o/2;const l=t0){if(d===n)break;d+=c,a-=o}}return 2===h?rt.distance(r+l,n,t,e):NaN}findAlignmentInRegion(t,e,r,n){const i=Math.floor(n*t),o=Math.max(0,e-i),s=Math.min(this.image.getWidth()-1,e+i);if(s-o<3*t)throw new D("Alignment top exceeds estimated module size.");const a=Math.max(0,r-i),l=Math.min(this.image.getHeight()-1,r+i);if(l-a<3*t)throw new D("Alignment bottom exceeds estimated module size.");return new Me(this.image,o,a,s-o,l-a,t,this.resultPointCallback).find()}}class Le{constructor(){this.decoder=new Ne}getDecoder(){return this.decoder}decode(t,e){let r,n;if(null!=e&&void 0!==e.get(C.PURE_BARCODE)){const i=Le.extractPureBits(t.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,e),n=Le.NO_POINTS}else{const i=new Be(t.getBlackMatrix()).detect(e);r=this.decoder.decodeBitMatrix(i.getBits(),e),n=i.getPoints()}r.getOther()instanceof ye&&r.getOther().applyMirroredCorrection(n);const i=new x(r.getText(),r.getRawBytes(),void 0,n,U.QR_CODE,void 0),o=r.getByteSegments();null!==o&&i.putMetadata(W.BYTE_SEGMENTS,o);const s=r.getECLevel();return null!==s&&i.putMetadata(W.ERROR_CORRECTION_LEVEL,s),r.hasStructuredAppend()&&(i.putMetadata(W.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),i.putMetadata(W.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),i}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new D;const n=this.moduleSize(e,t);let i=e[1],o=r[1],s=e[0],a=r[0];if(s>=a||i>=o)throw new D;if(o-i!=a-s&&(a=s+(o-i),a>=t.getWidth()))throw new D;const l=Math.round((a-s+1)/n),c=Math.round((o-i+1)/n);if(l<=0||c<=0)throw new D;if(c!==l)throw new D;const h=Math.floor(n/2);i+=h,s+=h;const u=s+Math.floor((l-1)*n)-a;if(u>0){if(u>h)throw new D;s-=u}const d=i+Math.floor((c-1)*n)-o;if(d>0){if(d>h)throw new D;i-=d}const f=new N(l,c);for(let e=0;e0;){const s=Fe.findGuardPattern(t,i,--n,r,!1,o,l);if(null==s){n++;break}e=s}s[0]=new it(e[0],n),s[1]=new it(e[1],n),a=!0;break}}let c=n+1;if(a){let n=0,i=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);for(;cFe.SKIPPED_ROW_COUNT_MAX)break;n++}}c-=n+1,s[2]=new it(i[0],c),s[3]=new it(i[1],c)}return c-n0&&l++o?n-o:o-n;if(l>r)return 1/0;a+=l}return a/i}}Fe.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),Fe.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),Fe.MAX_AVG_VARIANCE=.42,Fe.MAX_INDIVIDUAL_VARIANCE=.8,Fe.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),Fe.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),Fe.MAX_PIXEL_DRIFT=3,Fe.MAX_PATTERN_DRIFT=5,Fe.SKIPPED_ROW_COUNT_MAX=25,Fe.ROW_STEP=5,Fe.BARCODE_MIN_HEIGHT=10;class xe{constructor(t,e){if(0===e.length)throw new l;this.field=t;let r=e.length;if(r>1&&0===e[0]){let t=1;for(;tr.length){let t=e;e=r,r=t}let n=new Int32Array(r.length),i=r.length-e.length;d.arraycopy(r,0,n,0,i);for(let t=i;t=0;e--){let r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()}}class ke{add(t,e){return(t+e)%this.modulus}subtract(t,e){return(this.modulus+t-e)%this.modulus}exp(t){return this.expTable[t]}log(t){if(0===t)throw new l;return this.logTable[t]}inverse(t){if(0===t)throw new K;return this.expTable[this.modulus-this.logTable[t]-1]}multiply(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]}getSize(){return this.modulus}equals(t){return t===this}}class Ue extends ke{constructor(t,e){super(),this.modulus=t,this.expTable=new Int32Array(t),this.logTable=new Int32Array(t);let r=1;for(let n=0;n0;t--){let r=n.evaluateAt(this.field.exp(t));i[e-t]=r,0!==r&&(o=!0)}if(!o)return 0;let s=this.field.getOne();if(null!=r)for(const e of r){let r=this.field.exp(t.length-1-e),n=new xe(this.field,new Int32Array([this.field.subtract(0,r),1]));s=s.multiply(n)}let a=new xe(this.field,i),l=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),a,e),c=l[0],u=l[1],d=this.findErrorLocations(c),f=this.findErrorMagnitudes(u,c,d);for(let e=0;e=Math.round(r/2);){let t=n,e=o;if(n=i,o=s,n.isZero())throw h.getChecksumInstance();i=t;let r=this.field.getZero(),a=n.getCoefficient(n.getDegree()),l=this.field.inverse(a);for(;i.getDegree()>=n.getDegree()&&!i.isZero();){let t=i.getDegree()-n.getDegree(),e=this.field.multiply(i.getCoefficient(i.getDegree()),l);r=r.add(this.field.buildMonomial(t,e)),i=i.subtract(n.multiplyByMonomial(t,e))}s=r.multiply(o).subtract(e).negative()}let a=s.getCoefficient(0);if(0===a)throw h.getChecksumInstance();let l=this.field.inverse(a);return[s.multiply(l),i.multiply(l)]}findErrorLocations(t){let e=t.getDegree(),r=new Int32Array(e),n=0;for(let i=1;i0){let e=r?this.topLeft:this.topRight,i=Math.trunc(e.getY()-t);i<0&&(i=0);let s=new it(e.getX(),i);r?n=s:o=s}if(e>0){let t=r?this.bottomLeft:this.bottomRight,n=Math.trunc(t.getY()+e);n>=this.image.getHeight()&&(n=this.image.getHeight()-1);let o=new it(t.getX(),n);r?i=o:s=o}return new Ve(this.image,n,i,o,s)}getMinX(){return this.minX}getMaxX(){return this.maxX}getMinY(){return this.minY}getMaxY(){return this.maxY}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}getBottomLeft(){return this.bottomLeft}getBottomRight(){return this.bottomRight}}class ze{constructor(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class Ge{constructor(){this.buffer=""}static form(t,e){let r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,i,o,s,a){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let l,c=s?parseInt(s.substr(1)):void 0;switch(a){case"s":l=e[r];break;case"c":l=e[r][0];break;case"f":l=parseFloat(e[r]).toFixed(t);break;case"p":l=parseFloat(e[r]).toPrecision(t);break;case"e":l=parseFloat(e[r]).toExponential(t);break;case"x":l=parseInt(e[r]).toString(c||16);break;case"d":l=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}l="object"==typeof l?JSON.stringify(l):(+l).toString(c);let h=parseInt(i),u=i&&i[0]+""=="0"?"0":" ";for(;l.length=0&&(e=this.codewords[n],null!=e))return e;if(n=this.imageRowToCodewordIndex(t)+r,nr,getValue:()=>n};i.getValue()>t?(t=i.getValue(),e=[],e.push(i.getKey())):i.getValue()===t&&e.push(i.getKey())}return Pe.toIntArray(e)}getConfidence(t){return this.values.get(t)}}class We extends Ye{constructor(t,e){super(t),this._isLeft=e}setRowNumbers(){for(let t of this.getCodewords())null!=t&&t.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(t){let e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);let r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),i=this._isLeft?r.getBottomLeft():r.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),a=-1,l=1,c=0;for(let r=o;r=t.getRowCount()||i>r)e[r]=null;else{let t;t=l>2?(l-2)*i:i;let o=t>=r;for(let n=1;n<=t&&!o;n++)o=null!=e[r-n];o?e[r]=null:(a=n.getRowNumber(),c=1)}}}getRowHeights(){let t=this.getBarcodeMetadata();if(null==t)return null;this.adjustIncompleteIndicatorColumnRowNumbers(t);let e=new Int32Array(t.getRowCount());for(let t of this.getCodewords())if(null!=t){let r=t.getRowNumber();if(r>=e.length)continue;e[r]++}return e}adjustIncompleteIndicatorColumnRowNumbers(t){let e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),s=this.getCodewords(),a=-1;for(let e=i;e=t.getRowCount()?s[e]=null:a=r.getRowNumber())}}getBarcodeMetadata(){let t=this.getCodewords(),e=new Xe,r=new Xe,n=new Xe,i=new Xe;for(let o of t){if(null==o)continue;o.setRowNumberAsRowIndicatorColumn();let t=o.getValue()%30,s=o.getRowNumber();switch(this._isLeft||(s+=2),s%3){case 0:r.setValue(3*t+1);break;case 1:i.setValue(t/3),n.setValue(t%3);break;case 2:e.setValue(t+1)}}if(0===e.getValue().length||0===r.getValue().length||0===n.getValue().length||0===i.getValue().length||e.getValue()[0]<1||r.getValue()[0]+n.getValue()[0]Pe.MAX_ROWS_IN_BARCODE)return null;let o=new ze(e.getValue()[0],r.getValue()[0],n.getValue()[0],i.getValue()[0]);return this.removeIncorrectCodewords(t,o),o}removeIncorrectCodewords(t,e){for(let r=0;re.getRowCount())t[r]=null;else switch(this._isLeft||(o+=2),o%3){case 0:3*i+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(i/3)===e.getErrorCorrectionLevel()&&i%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:i+1!==e.getColumnCount()&&(t[r]=null)}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+"\n"+super.toString()}}class je{constructor(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let t,e=Pe.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e0&&i0&&(s[0]=r[e-1],s[4]=i[e-1],s[5]=o[e-1]),e>1&&(s[8]=r[e-2],s[10]=i[e-2],s[11]=o[e-2]),e>=1;r=1&e,Qe.RATIOS_TABLE[t]||(Qe.RATIOS_TABLE[t]=new Array(Pe.BARS_IN_MODULE)),Qe.RATIOS_TABLE[t][Pe.BARS_IN_MODULE-n-1]=Math.fround(i/Pe.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(t){let e=Qe.getDecodedCodewordValue(Qe.sampleBitCounts(t));return-1!==e?e:Qe.getClosestDecodedValue(t)}static sampleBitCounts(t){let e=rt.sum(t),r=new Int32Array(Pe.BARS_IN_MODULE),n=0,i=0;for(let o=0;o1)for(let n=0;n=n)break}enew Array(Pe.BARS_IN_MODULE)));class Ke{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(t){this.segmentIndex=t}getFileId(){return this.fileId}setFileId(t){this.fileId=t}getOptionalData(){return this.optionalData}setOptionalData(t){this.optionalData=t}isLastSegment(){return this.lastSegment}setLastSegment(t){this.lastSegment=t}getSegmentCount(){return this.segmentCount}setSegmentCount(t){this.segmentCount=t}getSender(){return this.sender||null}setSender(t){this.sender=t}getAddressee(){return this.addressee||null}setAddressee(t){this.addressee=t}getFileName(){return this.fileName}setFileName(t){this.fileName=t}getFileSize(){return this.fileSize}setFileSize(t){this.fileSize=t}getChecksum(){return this.checksum}setChecksum(t){this.checksum=t}getTimestamp(){return this.timestamp}setTimestamp(t){this.timestamp=t}}class qe{static parseLong(t,e){return parseInt(t,e)}}class Je extends s{}Je.kind="NullPointerException";class $e{writeBytes(t){this.writeBytesOffset(t,0,t.length)}writeBytesOffset(t,e,r){if(null==t)throw new Je;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new f;if(0!==r)for(let n=0;n0&&this.grow(t)}grow(t){let e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new tr;e=m.MAX_VALUE}this.buf=w.copyOfUint8Array(this.buf,e)}write(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1}writeBytesOffset(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new f;this.ensureCapacity(this.count+r),d.arraycopy(t,e,this.buf,this.count,r),this.count+=r}writeTo(t){t.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return w.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(t){return new String(this.buf).toString()}toString_number(t){return new String(this.buf).toString()}close(){}}function rr(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==r.g)return r.g.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}let nr;function ir(t){if(void 0===nr&&(nr=rr()),null===nr)throw new Error("BigInt is not supported!");return nr(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(X||(X={}));class or{static decode(t,e){let r=new y(""),n=I.ISO8859_1;r.enableDecoding(n);let i=1,o=t[i++],s=new Ke;for(;it[0])throw E.getFormatInstance();let n=new Int32Array(or.NUMBER_OF_SEQUENCE_CODEWORDS);for(let r=0;r0){for(let t=0;t<6;++t)o.write(Number(ir(a)>>ir(8*(5-t))));a=0,s=0}}n===e[0]&&r0){for(let t=0;t<6;++t)o.write(Number(ir(a)>>ir(8*(5-t))));a=0,s=0}}}return i.append(_.decode(o.toByteArray(),r)),n}static numericCompaction(t,e,r){let n=0,i=!1,o=new Int32Array(or.MAX_NUMERIC_CODEWORDS);for(;e0&&(r.append(or.decodeBase900toBase10(o,n)),n=0)}return e}static decodeBase900toBase10(t,e){let r=ir(0);for(let n=0;n@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",or.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",or.EXP900=rr()?function(){let t=[];t[0]=ir(1);let e=ir(900);t[1]=e;for(let r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],or.NUMBER_OF_SEQUENCE_CODEWORDS=2;class sr{constructor(){}static decode(t,e,r,n,i,o,s){let a,l=new Ve(t,e,r,n,i),c=null,h=null;for(let r=!0;;r=!1){if(null!=e&&(c=sr.getRowIndicatorColumn(t,l,e,!0,o,s)),null!=n&&(h=sr.getRowIndicatorColumn(t,l,n,!1,o,s)),a=sr.merge(c,h),null==a)throw D.getNotFoundInstance();let i=a.getBoundingBox();if(!r||null==i||!(i.getMinY()l.getMaxY()))break;l=i}a.setBoundingBox(l);let u=a.getBarcodeColumnCount()+1;a.setDetectionResultColumn(0,c),a.setDetectionResultColumn(u,h);let d=null!=c;for(let e=1;e<=u;e++){let r,n=d?e:u-e;if(void 0!==a.getDetectionResultColumn(n))continue;r=0===n||n===u?new We(l,0===n):new Ye(l),a.setDetectionResultColumn(n,r);let i=-1,c=i;for(let e=l.getMinY();e<=l.getMaxY();e++){if(i=sr.getStartColumn(a,n,e,d),i<0||i>l.getMaxX()){if(-1===c)continue;i=c}let h=sr.detectCodeword(t,l.getMinX(),l.getMaxX(),d,i,e,o,s);null!=h&&(r.setCodeword(e,h),c=i,o=Math.min(o,h.getWidth()),s=Math.max(s,h.getWidth()))}}return sr.createDecoderResult(a)}static merge(t,e){if(null==t&&null==e)return null;let r=sr.getBarcodeMetadata(t,e);if(null==r)return null;let n=Ve.merge(sr.adjustBoundingBox(t),sr.adjustBoundingBox(e));return new je(r,n)}static adjustBoundingBox(t){if(null==t)return null;let e=t.getRowHeights();if(null==e)return null;let r=sr.getMax(e),n=0;for(let t of e)if(n+=r-t,t>0)break;let i=t.getCodewords();for(let t=0;n>0&&null==i[t];t++)n--;let o=0;for(let t=e.length-1;t>=0&&(o+=r-e[t],!(e[t]>0));t--);for(let t=i.length-1;o>0&&null==i[t];t--)o--;return t.getBoundingBox().addMissingRows(n,o,t.isLeft())}static getMax(t){let e=-1;for(let r of t)e=Math.max(e,r);return e}static getBarcodeMetadata(t,e){let r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r}static getRowIndicatorColumn(t,e,r,n,i,o){let s=new We(e,n);for(let a=0;a<2;a++){let l=0===a?1:-1,c=Math.trunc(Math.trunc(r.getX()));for(let a=Math.trunc(Math.trunc(r.getY()));a<=e.getMaxY()&&a>=e.getMinY();a+=l){let e=sr.detectCodeword(t,0,t.getWidth(),n,c,a,i,o);null!=e&&(s.setCodeword(a,e),c=n?e.getStartX():e.getEndX())}}return s}static adjustCodewordCount(t,e){let r=e[0][1],n=r.getValue(),i=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-sr.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(i<1||i>Pe.MAX_CODEWORDS_IN_BARCODE)throw D.getNotFoundInstance();r.setValue(i)}else n[0]!==i&&r.setValue(i)}static createDecoderResult(t){let e=sr.createBarcodeMatrix(t);sr.adjustCodewordCount(t,e);let r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),i=[],o=new Array;for(let s=0;s0;){for(let t=0;tnew Array(t.getBarcodeColumnCount()+2)));for(let t=0;t=0){if(n>=e.length)continue;e[n][r].setValue(t.getValue())}}r++}return e}static isValidBarcodeColumn(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1}static getStartColumn(t,e,r,n){let i=n?1:-1,o=null;if(sr.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodeword(r)),null!=o)return n?o.getEndX():o.getStartX();if(o=t.getDetectionResultColumn(e).getCodewordNearby(r),null!=o)return n?o.getStartX():o.getEndX();if(sr.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodewordNearby(r)),null!=o)return n?o.getEndX():o.getStartX();let s=0;for(;sr.isValidBarcodeColumn(t,e-i);){e-=i;for(let r of t.getDetectionResultColumn(e).getCodewords())if(null!=r)return(n?r.getEndX():r.getStartX())+i*s*(r.getEndX()-r.getStartX());s++}return n?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()}static detectCodeword(t,e,r,n,i,o,s,a){i=sr.adjustCodewordStartColumn(t,e,r,n,i,o);let l,c=sr.getModuleBitCount(t,e,r,n,i,o);if(null==c)return null;let h=rt.sum(c);if(n)l=i+h;else{for(let t=0;t=e)&&l=e:ssr.CODEWORD_SKEW_SIZE)return i;s+=a}a=-a,n=!n}return s}static checkCodewordSkew(t,e,r){return e-sr.CODEWORD_SKEW_SIZE<=t&&t<=r+sr.CODEWORD_SKEW_SIZE}static decodeCodewords(t,e,r){if(0===t.length)throw E.getFormatInstance();let n=1<r/2+sr.MAX_ERRORS||r<0||r>sr.MAX_EC_CODEWORDS)throw h.getChecksumInstance();return sr.errorCorrection.decode(t,r,e)}static verifyCodewordCount(t,e){if(t.length<4)throw E.getFormatInstance();let r=t[0];if(r>t.length)throw E.getFormatInstance();if(0===r){if(!(e>=1;return e}static getCodewordBucketNumber(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)}static getCodewordBucketNumber_number(t){return sr.getCodewordBucketNumber(sr.getBitCountForCodeword(t))}static getCodewordBucketNumber_Int32Array(t){return(t[0]-t[2]+t[4]-t[6]+9)%9}static toString(t){let e=new Ge;for(let r=0;rt))}static getMaxWidth(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMinWidth(t,e){return null==t||null==e?m.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMaxCodewordWidth(t){return Math.floor(Math.max(Math.max(ar.getMaxWidth(t[0],t[4]),ar.getMaxWidth(t[6],t[2])*Pe.MODULES_IN_CODEWORD/Pe.MODULES_IN_STOP_PATTERN),Math.max(ar.getMaxWidth(t[1],t[5]),ar.getMaxWidth(t[7],t[3])*Pe.MODULES_IN_CODEWORD/Pe.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(t){return Math.floor(Math.min(Math.min(ar.getMinWidth(t[0],t[4]),ar.getMinWidth(t[6],t[2])*Pe.MODULES_IN_CODEWORD/Pe.MODULES_IN_STOP_PATTERN),Math.min(ar.getMinWidth(t[1],t[5]),ar.getMinWidth(t[7],t[3])*Pe.MODULES_IN_CODEWORD/Pe.MODULES_IN_STOP_PATTERN)))}reset(){}}class lr extends s{}lr.kind="ReaderException";class cr{constructor(t,e){this.verbose=!0===t,e&&this.setHints(e)}decode(t,e){return e&&this.setHints(e),this.decodeInternal(t)}decodeWithState(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)}setHints(t){this.hints=t;const r=!e(t)&&!0===t.get(C.TRY_HARDER),n=e(t)?null:t.get(C.POSSIBLE_FORMATS),i=new Array;if(!e(n)){const e=n.some((t=>t===U.UPC_A||t===U.UPC_E||t===U.EAN_13||t===U.EAN_8||t===U.CODABAR||t===U.CODE_39||t===U.CODE_93||t===U.CODE_128||t===U.ITF||t===U.RSS_14||t===U.RSS_EXPANDED));e&&!r&&i.push(new ie(t,this.verbose)),n.includes(U.QR_CODE)&&i.push(new Le),n.includes(U.DATA_MATRIX)&&i.push(new ge),n.includes(U.AZTEC)&&i.push(new gt),n.includes(U.PDF_417)&&i.push(new ar),e&&r&&i.push(new ie(t,this.verbose))}0===i.length&&(r||i.push(new ie(t,this.verbose)),i.push(new Le),i.push(new ge),i.push(new gt),i.push(new ar),r&&i.push(new ie(t,this.verbose))),this.readers=i}reset(){if(null!==this.readers)for(const t of this.readers)t.reset()}decodeInternal(t){if(null===this.readers)throw new lr("No readers where selected, nothing can be read.");for(const e of this.readers)try{return e.decode(t,this.hints)}catch(t){if(t instanceof lr)continue}throw new D("No MultiFormat Readers were able to detect the code.")}}var hr;!function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"}(hr||(hr={}));var ur=hr;class dr{constructor(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new Q(t,Int32Array.from([1])))}buildGenerator(t){const e=this.cachedGenerators;if(t>=e.length){let r=e[e.length-1];const n=this.field;for(let i=e.length;i<=t;i++){const t=r.multiply(new Q(n,Int32Array.from([1,n.exp(i-1+n.getGeneratorBase())])));e.push(t),r=t}}return e[t]}encode(t,e){if(0===e)throw new l("No error correction bytes");const r=t.length-e;if(r<=0)throw new l("No data bytes provided");const n=this.buildGenerator(e),i=new Int32Array(r);d.arraycopy(t,0,i,0,r);let o=new Q(this.field,i);o=o.multiplyByMonomial(e,1);const s=o.divide(n)[1].getCoefficients(),a=e-s.length;for(let e=0;e=5&&(r+=fr.N1+(n-5)),n=1,s=i)}n>=5&&(r+=fr.N1+(n-5))}return r}}fr.N1=3,fr.N2=3,fr.N3=40,fr.N4=10;class gr{constructor(t,e){this.width=t,this.height=e;const r=new Array(e);for(let n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}getHeight(){return this.height}getWidth(){return this.width}get(t,e){return this.bytes[e][t]}getArray(){return this.bytes}setNumber(t,e,r){this.bytes[e][t]=r}setBoolean(t,e,r){this.bytes[e][t]=r?1:0}clear(t){for(const e of this.bytes)w.fill(e,t)}equals(t){if(!(t instanceof gr))return!1;const e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(let t=0,r=this.height;t>\n"),t.toString()}setMode(t){this.mode=t}setECLevel(t){this.ecLevel=t}setVersion(t){this.version=t}setMaskPattern(t){this.maskPattern=t}setMatrix(t){this.matrix=t}static isValidMaskPattern(t){return t>=0&&t0;){for(6===o&&(o-=1);s>=0&&s=r;)t^=e<=0)for(let t=0;t!==r;t++){const r=n[t];r>=0&&pr.isEmpty(e.get(r,i))&&pr.embedPositionAdjustmentPattern(r-2,i-2,e)}}}}pr.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),pr.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),pr.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),pr.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),pr.VERSION_INFO_POLY=7973,pr.TYPE_INFO_POLY=1335,pr.TYPE_INFO_MASK_PATTERN=21522;class Ar{constructor(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class Cr{constructor(){}static calculateMaskPenalty(t){return fr.applyMaskPenaltyRule1(t)+fr.applyMaskPenaltyRule2(t)+fr.applyMaskPenaltyRule3(t)+fr.applyMaskPenaltyRule4(t)}static encode(t,e,r=null){let n=Cr.DEFAULT_BYTE_MODE_ENCODING;const i=null!==r&&void 0!==r.get(ur.CHARACTER_SET);i&&(n=r.get(ur.CHARACTER_SET).toString());const o=this.chooseMode(t,n),s=new p;if(o===_e.BYTE&&(i||Cr.DEFAULT_BYTE_MODE_ENCODING!==n)){const t=I.getCharacterSetECIByName(n);void 0!==t&&this.appendECI(t,s)}this.appendModeInfo(o,s);const a=new p;let l;if(this.appendBytes(t,o,a,n),null!==r&&void 0!==r.get(ur.QR_VERSION)){const t=Number.parseInt(r.get(ur.QR_VERSION).toString(),10);l=Ce.getVersionForNumber(t);const n=this.calculateBitsNeeded(o,s,a,l);if(!this.willFit(n,l,e))throw new mr("Data too big for requested version")}else l=this.recommendVersion(e,o,s,a);const c=new p;c.appendBitArray(s);const h=o===_e.BYTE?a.getSizeInBytes():t.length;this.appendLengthInfo(h,l,o,c),c.appendBitArray(a);const u=l.getECBlocksForLevel(e),d=l.getTotalCodewords()-u.getTotalECCodewords();this.terminateBits(d,c);const f=this.interleaveWithECBytes(c,l.getTotalCodewords(),d,u.getNumBlocks()),g=new wr;g.setECLevel(e),g.setMode(o),g.setVersion(l);const w=l.getDimensionForVersion(),m=new gr(w,w),A=this.chooseMaskPattern(f,e,l,m);return g.setMaskPattern(A),pr.buildMatrix(f,e,l,A,m),g.setMatrix(m),g}static recommendVersion(t,e,r,n){const i=this.calculateBitsNeeded(e,r,n,Ce.getVersionForNumber(1)),o=this.chooseVersion(i,t),s=this.calculateBitsNeeded(e,r,n,o);return this.chooseVersion(s,t)}static calculateBitsNeeded(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()}static getAlphanumericCode(t){return t159)&&(r<224||r>235))return!1}return!0}static chooseMaskPattern(t,e,r,n){let i=Number.MAX_SAFE_INTEGER,o=-1;for(let s=0;s=(t+7)/8}static terminateBits(t,e){const r=8*t;if(e.getSize()>r)throw new mr("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(let t=0;t<4&&e.getSize()0)for(let t=n;t<8;t++)e.appendBit(!1);const i=t-e.getSizeInBytes();for(let t=0;t=r)throw new mr("Block ID too large");const s=t%r,a=r-s,l=Math.floor(t/r),c=l+1,h=Math.floor(e/r),u=h+1,d=l-h,f=c-u;if(d!==f)throw new mr("EC bytes mismatch");if(r!==a+s)throw new mr("RS blocks mismatch");if(t!==(h+d)*a+(u+f)*s)throw new mr("Total bytes mismatch");n=1<=0&&e<=9}static appendNumericBytes(t,e){const r=t.length;let n=0;for(;n=33088&&n<=40956?i=n-33088:n>=57408&&n<=60351&&(i=n-49472),-1===i)throw new mr("Invalid byte sequence");const o=192*(i>>8)+(255&i);e.appendBits(o,13)}}static appendECI(t,e){e.appendBits(_e.ECI.getBits(),4),e.appendBits(t.getValue(),8)}}Cr.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),Cr.DEFAULT_BYTE_MODE_ENCODING=I.UTF8.getName();class Er{write(t,e,r,n=null){if(0===t.length)throw new l("Found empty contents");if(e<0||r<0)throw new l("Requested dimensions are too small: "+e+"x"+r);let i=we.L,o=Er.QUIET_ZONE_SIZE;null!==n&&(void 0!==n.get(ur.ERROR_CORRECTION)&&(i=we.fromString(n.get(ur.ERROR_CORRECTION).toString())),void 0!==n.get(ur.MARGIN)&&(o=Number.parseInt(n.get(ur.MARGIN).toString(),10)));const s=Cr.encode(t,i,n);return this.renderResult(s,e,r,o)}writeToDom(t,e,r,n,i=null){"string"==typeof t&&(t=document.querySelector(t));const o=this.write(e,r,n,i);t&&t.appendChild(o)}renderResult(t,e,r,n){const i=t.getMatrix();if(null===i)throw new $;const o=i.getWidth(),s=i.getHeight(),a=o+2*n,l=s+2*n,c=Math.max(e,a),h=Math.max(r,l),u=Math.min(Math.floor(c/a),Math.floor(h/l)),d=Math.floor((c-o*u)/2),f=Math.floor((h-s*u)/2),g=this.createSVGElement(c,h);for(let t=0,e=f;te||i+s>r)throw new l("Crop rectangle does not fit within image data.");a&&this.reverseHorizontal(o,s)}getRow(t,e){if(t<0||t>=this.getHeight())throw new l("Requested row is outside the image: "+t);const r=this.getWidth();(null==e||e.length>16&255,o=r>>7&510,s=255&r;i[e]=(n+o+s)/4&255}this.luminances=i}else this.luminances=t;if(void 0===n&&(this.dataWidth=e),void 0===i&&(this.dataHeight=r),void 0===o&&(this.left=0),void 0===s&&(this.top=0),this.left+e>this.dataWidth||this.top+r>this.dataHeight)throw new l("Crop rectangle does not fit within image data.")}getRow(t,e){if(t<0||t>=this.getHeight())throw new l("Requested row is outside the image: "+t);const r=this.getWidth();(null==e||e.length"}}class Or extends Rr{constructor(t,e,r){super(t,0,0),this.binaryShiftStart=e,this.binaryShiftByteCount=r}appendTo(t,e){for(let r=0;r62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)}addBinaryShift(t,e){return new Or(this,t,e)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function br(t,e,r){return new Rr(t,e,r)}const Br=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Lr=new Rr(null,0,0),Pr=[Int32Array.from([0,327708,327710,327709,656318]),Int32Array.from([590318,0,327710,327709,656318]),Int32Array.from([262158,590300,0,590301,932798]),Int32Array.from([327709,327708,656318,0,327710]),Int32Array.from([327711,656380,656382,656381,0])];const vr=function(t){for(let e of t)w.fill(e,-1);return t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15,t}(w.createInt32Array(6,6));class Fr{constructor(t,e,r,n){this.token=t,this.mode=e,this.binaryShiftByteCount=r,this.bitCount=n}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(t,e){let r=this.bitCount,n=this.token;if(t!==this.mode){let e=Pr[this.mode][t];n=br(n,65535&e,e>>16),r+=e>>16}let i=2===t?4:5;return n=br(n,e,i),new Fr(n,t,0,r+i)}shiftAndAppend(t,e){let r=this.token,n=2===this.mode?4:5;return r=br(r,vr[this.mode][t],n),r=br(r,e,5),new Fr(r,this.mode,0,this.bitCount+n+5)}addBinaryShiftChar(t){let e=this.token,r=this.mode,n=this.bitCount;if(4===this.mode||2===this.mode){let t=Pr[r][0];e=br(e,65535&t,t>>16),n+=t>>16,r=0}let i=0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8,o=new Fr(e,r,this.binaryShiftByteCount+1,n+i);return 2078===o.binaryShiftByteCount&&(o=o.endBinaryShift(t+1)),o}endBinaryShift(t){if(0===this.binaryShiftByteCount)return this;let e=this.token;return e=function(t,e,r){return new Or(t,e,r)}(e,t-this.binaryShiftByteCount,this.binaryShiftByteCount),new Fr(e,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(t){let e=this.bitCount+(Pr[this.mode][t.mode]>>16);return this.binaryShiftByteCountt.binaryShiftByteCount&&t.binaryShiftByteCount>0&&(e+=10),e<=t.bitCount}toBitArray(t){let e=[];for(let r=this.endBinaryShift(t.length).token;null!==r;r=r.getPrevious())e.unshift(r);let r=new p;for(const n of e)n.appendTo(r,t);return r}toString(){return T.format("%s bits=%d bytes=%d",Br[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(t){return t.binaryShiftByteCount>62?21:t.binaryShiftByteCount>31?20:t.binaryShiftByteCount>0?10:0}}Fr.INITIAL_STATE=new Fr(Lr,0,0,0);const xr=function(t){const e=T.getCharCode(" "),r=T.getCharCode("."),n=T.getCharCode(",");t[0][e]=1;const i=T.getCharCode("Z"),o=T.getCharCode("A");for(let e=o;e<=i;e++)t[0][e]=e-o+2;t[1][e]=1;const s=T.getCharCode("z"),a=T.getCharCode("a");for(let e=a;e<=s;e++)t[1][e]=e-a+2;t[2][e]=1;const l=T.getCharCode("9"),c=T.getCharCode("0");for(let e=c;e<=l;e++)t[2][e]=e-c+2;t[2][n]=12,t[2][r]=13;const h=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""];for(let e=0;e","?","[","]","{","}"];for(let e=0;e0&&(t[4][T.getCharCode(u[e])]=e);return t}(w.createInt32Array(5,256));class kr{constructor(t){this.text=t}encode(){const t=T.getCharCode(" "),e=T.getCharCode("\n");let r=Dr.singletonList(Fr.INITIAL_STATE);for(let n=0;n0?(r=kr.updateStateListForPair(r,n,i),n++):r=this.updateStateListForChar(r,n)}return Dr.min(r,((t,e)=>t.getBitCount()-e.getBitCount())).toBitArray(this.text)}updateStateListForChar(t,e){const r=[];for(let n of t)this.updateStateForChar(n,e,r);return kr.simplifyStates(r)}updateStateForChar(t,e,r){let n=255&this.text[e],i=xr[t.getMode()][n]>0,o=null;for(let s=0;s<=4;s++){let a=xr[s][n];if(a>0){if(null==o&&(o=t.endBinaryShift(e)),!i||s===t.getMode()||2===s){const t=o.latchAndAppend(s,a);r.push(t)}if(!i&&vr[t.getMode()][s]>=0){const t=o.shiftAndAppend(s,a);r.push(t)}}}if(t.getBinaryShiftByteCount()>0||0===xr[t.getMode()][n]){let n=t.addBinaryShiftChar(e);r.push(n)}}static updateStateListForPair(t,e,r){const n=[];for(let i of t)this.updateStateForPair(i,e,r,n);return this.simplifyStates(n)}static updateStateForPair(t,e,r,n){let i=t.endBinaryShift(e);if(n.push(i.latchAndAppend(4,r)),4!==t.getMode()&&n.push(i.shiftAndAppend(4,r)),3===r||4===r){let t=i.latchAndAppend(2,16-r).latchAndAppend(2,1);n.push(t)}if(t.getBinaryShiftByteCount()>0){let r=t.addBinaryShiftChar(e).addBinaryShiftChar(e+1);n.push(r)}}static simplifyStates(t){let e=[];for(const r of t){let t=!0;for(const n of e){if(n.isBetterThanOrEqualTo(r)){t=!1;break}r.isBetterThanOrEqualTo(n)&&(e=e.filter((t=>t!==n)))}t&&e.push(r)}return e}}class Ur{constructor(){}static encodeBytes(t){return Ur.encode(t,Ur.DEFAULT_EC_PERCENT,Ur.DEFAULT_AZTEC_LAYERS)}static encode(t,e,r){let n,i,o,s,a,c=new kr(t).encode(),h=m.truncDivision(c.getSize()*e,100)+11,u=c.getSize()+h;if(r!==Ur.DEFAULT_AZTEC_LAYERS){if(n=r<0,i=Math.abs(r),i>(n?Ur.MAX_NB_BITS_COMPACT:Ur.MAX_NB_BITS))throw new l(T.format("Illegal value %s for layers",r));o=Ur.totalBitsInLayer(i,n),s=Ur.WORD_SIZE[i];let t=o-o%s;if(a=Ur.stuffBits(c,s),a.getSize()+h>t)throw new l("Data to large for user specified layer");if(n&&a.getSize()>64*s)throw new l("Data to large for user specified layer")}else{s=0,a=null;for(let t=0;;t++){if(t>Ur.MAX_NB_BITS)throw new l("Data too large for an Aztec code");if(n=t<=3,i=n?t+1:t,o=Ur.totalBitsInLayer(i,n),u>o)continue;null!=a&&s===Ur.WORD_SIZE[i]||(s=Ur.WORD_SIZE[i],a=Ur.stuffBits(c,s));let e=o-o%s;if(!(n&&a.getSize()>64*s)&&a.getSize()+h<=e)break}}let d,f=Ur.generateCheckWords(a,o,s),g=a.getSize()/s,w=Ur.generateModeMessage(n,i,g),p=(n?11:14)+4*i,A=new Int32Array(p);if(n){d=p;for(let t=0;t=n||t.get(o+r))&&(s|=1<{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";var t;r.r(n),r.d(n,{Html5Qrcode:()=>W,Html5QrcodeScanType:()=>i,Html5QrcodeScanner:()=>ht,Html5QrcodeScannerState:()=>w,Html5QrcodeSupportedFormats:()=>t}),function(t){t[t.QR_CODE=0]="QR_CODE",t[t.AZTEC=1]="AZTEC",t[t.CODABAR=2]="CODABAR",t[t.CODE_39=3]="CODE_39",t[t.CODE_93=4]="CODE_93",t[t.CODE_128=5]="CODE_128",t[t.DATA_MATRIX=6]="DATA_MATRIX",t[t.MAXICODE=7]="MAXICODE",t[t.ITF=8]="ITF",t[t.EAN_13=9]="EAN_13",t[t.EAN_8=10]="EAN_8",t[t.PDF_417=11]="PDF_417",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(t||(t={}));var e,i,o=new Map([[t.QR_CODE,"QR_CODE"],[t.AZTEC,"AZTEC"],[t.CODABAR,"CODABAR"],[t.CODE_39,"CODE_39"],[t.CODE_93,"CODE_93"],[t.CODE_128,"CODE_128"],[t.DATA_MATRIX,"DATA_MATRIX"],[t.MAXICODE,"MAXICODE"],[t.ITF,"ITF"],[t.EAN_13,"EAN_13"],[t.EAN_8,"EAN_8"],[t.PDF_417,"PDF_417"],[t.RSS_14,"RSS_14"],[t.RSS_EXPANDED,"RSS_EXPANDED"],[t.UPC_A,"UPC_A"],[t.UPC_E,"UPC_E"],[t.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]);function s(e){return Object.values(t).includes(e)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.URL=1]="URL"}(e||(e={})),function(t){t[t.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",t[t.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE"}(i||(i={}));var a,l=function(){function t(){}return t.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",t.SCAN_DEFAULT_FPS=2,t.DEFAULT_DISABLE_FLIP=!1,t.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,t.DEFAULT_SUPPORTED_SCAN_TYPE=[i.SCAN_TYPE_CAMERA,i.SCAN_TYPE_FILE],t}(),c=function(){function t(t,e){this.format=t,this.formatName=e}return t.prototype.toString=function(){return this.formatName},t.create=function(e){if(!o.has(e))throw e+" not in html5QrcodeSupportedFormatsTextMap";return new t(e,o.get(e))},t}(),h=function(){function t(){}return t.createFromText=function(t){return{decodedText:t,result:{text:t}}},t.createFromQrcodeResult=function(t){return{decodedText:t.text,result:t}},t}();!function(t){t[t.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",t[t.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",t[t.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR"}(a||(a={}));var u=function(){function t(){}return t.createFrom=function(t){return{errorMessage:t,type:a.UNKWOWN_ERROR}},t}(),d=function(){function t(t){this.verbose=t}return t.prototype.log=function(t){this.verbose&&console.log(t)},t.prototype.warn=function(t){this.verbose&&console.warn(t)},t.prototype.logError=function(t,e){(this.verbose||!0===e)&&console.error(t)},t.prototype.logErrors=function(t){if(0===t.length)throw"Logger#logError called without arguments";this.verbose&&console.error(t)},t}();function f(t){return null==t}var g,w,m=function(){function t(){}return t.codeParseError=function(t){return"QR code parse error, error = "+t},t.errorGettingUserMedia=function(t){return"Error getting userMedia, error = "+t},t.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},t.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},t.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},t.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},t}(),p=function(){function t(){}return t.scanningStatus=function(){return"Scanning"},t.idleStatus=function(){return"Idle"},t.errorStatus=function(){return"Error"},t.permissionStatus=function(){return"Permission"},t.noCameraFoundErrorStatus=function(){return"No Cameras"},t.lastMatch=function(t){return"Last Match: "+t},t.codeScannerTitle=function(){return"Code Scanner"},t.cameraPermissionTitle=function(){return"Request Camera Permissions"},t.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},t.noCameraFound=function(){return"No camera found"},t.scanButtonStopScanningText=function(){return"Stop Scanning"},t.scanButtonStartScanningText=function(){return"Start Scanning"},t.torchOnButton=function(){return"Switch On Torch"},t.torchOffButton=function(){return"Switch Off Torch"},t.torchOnFailedMessage=function(){return"Failed to turn on torch"},t.torchOffFailedMessage=function(){return"Failed to turn off torch"},t.scanButtonScanningStarting=function(){return"Launching Camera..."},t.textIfCameraScanSelected=function(){return"Scan an Image File"},t.textIfFileScanSelected=function(){return"Scan using camera directly"},t.selectCamera=function(){return"Select Camera"},t.fileSelectionChooseImage=function(){return"Choose Image"},t.fileSelectionChooseAnother=function(){return"Choose Another"},t.fileSelectionNoImageSelected=function(){return"No image choosen"},t.anonymousCameraPrefix=function(){return"Anonymous Camera"},t.dragAndDropMessage=function(){return"Or drop an image to scan"},t.dragAndDropMessageOnlyImages=function(){return"Or drop an image to scan (other files not supported)"},t.zoom=function(){return"zoom"},t.loadingImage=function(){return"Loading image..."},t.cameraScanAltText=function(){return"Camera based scan"},t.fileScanAltText=function(){return"Fule based scan"},t}(),A=function(){function t(){}return t.poweredBy=function(){return"Powered by "},t.reportIssues=function(){return"Report issues"},t}(),C=function(){function t(){}return t.isMediaStreamConstraintsValid=function(t,e){if("object"!=typeof t){var r=typeof t;return e.logError("videoConstraints should be of type object, the object passed is of type "+r+".",!0),!1}for(var n=new Set(["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"]),i=0,o=Object.keys(t);i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r&&(r=s,e=o)}if(!e)throw"No largest barcode found";return e},e.prototype.createBarcodeDetectorFormats=function(t){for(var e=[],r=0,n=t;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=n&&(t.isClosed=!0,t.parentElement.removeChild(t.surface),e())}))}))},t.prototype.getCapabilities=function(){return new B(this.getFirstTrackOrFail())},t}(),P=function(){function t(t){this.mediaStream=t}return t.prototype.render=function(t,e,r){return D(this,void 0,void 0,(function(){return M(this,(function(n){return[2,L.create(t,this.mediaStream,e,r)]}))}))},t.create=function(e){return D(this,void 0,void 0,(function(){var r;return M(this,(function(n){switch(n.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return r={audio:!1,video:e},[4,navigator.mediaDevices.getUserMedia(r)];case 1:return[2,new t(n.sent())]}}))}))},t}(),v=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))},F=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]t&&(this.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),i=t),i)},e.prototype.validateQrboxConfig=function(t){if("number"!=typeof t&&"function"!=typeof t&&(void 0===t.width||void 0===t.height))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},e.prototype.toQrdimensions=function(t,e,r){if("number"==typeof r)return{width:r,height:r};if("function"==typeof r)try{return r(t,e)}catch(t){throw new Error("qrbox config was passed as a function but it failed with unknown error"+t)}return r},e.prototype.setupUi=function(t,e,r){r.isShadedBoxEnabled()&&this.validateQrboxSize(t,e,r);var n=f(r.qrbox)?{width:t,height:e}:r.qrbox;this.validateQrboxConfig(n);var i=this.toQrdimensions(t,e,n);i.height>e&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var o=r.isShadedBoxEnabled()&&i.height<=e,s={x:0,y:0,width:t,height:e},a=o?this.getShadedRegionBounds(t,e,i):s,l=this.createCanvasElement(a.width,a.height),c=l.getContext("2d",{willReadFrequently:!0});c.canvas.width=a.width,c.canvas.height=a.height,this.element.append(l),o&&this.possiblyInsertShadingElement(this.element,t,e,i),this.createScannerPausedUiElement(this.element),this.qrRegion=a,this.context=c,this.canvasElement=l},e.prototype.createScannerPausedUiElement=function(t){var e=document.createElement("div");e.innerText="Scanner paused",e.style.display="none",e.style.position="absolute",e.style.top="0px",e.style.zIndex="1",e.style.background="yellow",e.style.textAlign="center",e.style.width="100%",t.appendChild(e),this.scannerPausedUiElement=e},e.prototype.scanContext=function(t,e){var r=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then((function(e){return t(e.text,h.createFromQrcodeResult(e)),r.possiblyUpdateShaders(!0),!0})).catch((function(t){r.possiblyUpdateShaders(!1);var n=m.codeParseError(t);return e(n,u.createFrom(n)),!1}))},e.prototype.foreverScan=function(t,e,r){var n=this;if(this.shouldScan&&this.renderedCamera){var i=this.renderedCamera.getSurface(),o=i.videoWidth/i.clientWidth,s=i.videoHeight/i.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var a=this.qrRegion.width*o,l=this.qrRegion.height*s,c=this.qrRegion.x*o,h=this.qrRegion.y*s;this.context.drawImage(i,c,h,a,l,0,0,this.qrRegion.width,this.qrRegion.height);var u=function(){n.foreverScanTimeout=setTimeout((function(){n.foreverScan(t,e,r)}),n.getTimeoutFps(t.fps))};this.scanContext(e,r).then((function(i){i||!0===t.disableFlip?u():(n.context.translate(n.context.canvas.width,0),n.context.scale(-1,1),n.scanContext(e,r).finally((function(){u()})))})).catch((function(t){n.logger.logError("Error happend while scanning context",t),u()}))}},e.prototype.createVideoConstraints=function(t){if("string"==typeof t)return{deviceId:{exact:t}};if("object"==typeof t){var e="facingMode",r={user:!0,environment:!0},n="exact",i=function(t){if(t in r)return!0;throw"config has invalid 'facingMode' value = '"+t+"'"},o=Object.keys(t);if(1!==o.length)throw"'cameraIdOrConfig' object should have exactly 1 key, if passed as an object, found "+o.length+" keys";var s=Object.keys(t)[0];if(s!==e&&"deviceId"!==s)throw"Only 'facingMode' and 'deviceId' are supported for 'cameraIdOrConfig'";if(s!==e){var a=t.deviceId;if("string"==typeof a)return{deviceId:a};if("object"==typeof a){if(n in a)return{deviceId:{exact:a.exact}};throw"'deviceId' should be string or object with exact as key."}throw"Invalid type of 'deviceId' = "+typeof a}var l=t.facingMode;if("string"==typeof l){if(i(l))return{facingMode:l}}else{if("object"!=typeof l)throw"Invalid type of 'facingMode' = "+typeof l;if(!(n in l))throw"'facingMode' should be string or object with exact as key.";if(i(l.exact))return{facingMode:{exact:l.exact}}}}throw"Invalid type of 'cameraIdOrConfig' = "+typeof t},e.prototype.computeCanvasDrawConfig=function(t,e,r,n){if(t<=r&&e<=n)return{x:(r-t)/2,y:(n-e)/2,width:t,height:e};var i=t,o=e;return t>r&&(e*=r/t,t=r),e>n&&(t*=n/e,e=n),this.logger.log("Image downsampled from "+i+"X"+o+" to "+t+"X"+e+"."),this.computeCanvasDrawConfig(t,e,r,n)},e.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},e.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach((function(e){e.style.backgroundColor=t?Y.BORDER_SHADER_MATCH_COLOR:Y.BORDER_SHADER_DEFAULT_COLOR})),this.qrMatch=t)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(t,e,r){var n=t,i=e,o=document.createElement("canvas");return o.style.width=n+"px",o.style.height=i+"px",o.style.display="none",o.id=f(r)?"qr-canvas":r,o},e.prototype.getShadedRegionBounds=function(t,e,r){if(r.width>t||r.height>e)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-r.width)/2,y:(e-r.height)/2,width:r.width,height:r.height}},e.prototype.possiblyInsertShadingElement=function(t,e,r,n){if(!(e-n.width<1||r-n.height<1)){var i=document.createElement("div");i.style.position="absolute";var o=(e-n.width)/2,s=(r-n.height)/2;if(i.style.borderLeft=o+"px solid rgba(0, 0, 0, 0.48)",i.style.borderRight=o+"px solid rgba(0, 0, 0, 0.48)",i.style.borderTop=s+"px solid rgba(0, 0, 0, 0.48)",i.style.borderBottom=s+"px solid rgba(0, 0, 0, 0.48)",i.style.boxSizing="border-box",i.style.top="0px",i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.id=""+Y.SHADED_REGION_ELEMENT_ID,e-n.width<11||r-n.height<11)this.hasBorderShaders=!1;else{this.insertShaderBorders(i,40,5,-5,null,0,!0),this.insertShaderBorders(i,40,5,-5,null,0,!1),this.insertShaderBorders(i,40,5,null,-5,0,!0),this.insertShaderBorders(i,40,5,null,-5,0,!1),this.insertShaderBorders(i,5,45,-5,null,-5,!0),this.insertShaderBorders(i,5,45,null,-5,-5,!0),this.insertShaderBorders(i,5,45,-5,null,-5,!1),this.insertShaderBorders(i,5,45,null,-5,-5,!1),this.hasBorderShaders=!0}t.append(i)}},e.prototype.insertShaderBorders=function(t,e,r,n,i,o,s){var a=document.createElement("div");a.style.position="absolute",a.style.backgroundColor=Y.BORDER_SHADER_DEFAULT_COLOR,a.style.width=e+"px",a.style.height=r+"px",null!==n&&(a.style.top=n+"px"),null!==i&&(a.style.bottom=i+"px"),s?a.style.left=o+"px":a.style.right=o+"px",this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(a),t.appendChild(a)},e.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},e.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},e.prototype.getTimeoutFps=function(t){return 1e3/t},e}(),j="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NjAgNDYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NjAgNDYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMjMwIDBDMTAyLjk3NSAwIDAgMTAyLjk3NSAwIDIzMHMxMDIuOTc1IDIzMCAyMzAgMjMwIDIzMC0xMDIuOTc0IDIzMC0yMzBTMzU3LjAyNSAwIDIzMCAwem0zOC4zMzMgMzc3LjM2YzAgOC42NzYtNy4wMzQgMTUuNzEtMTUuNzEgMTUuNzFoLTQzLjEwMWMtOC42NzYgMC0xNS43MS03LjAzNC0xNS43MS0xNS43MVYyMDIuNDc3YzAtOC42NzYgNy4wMzMtMTUuNzEgMTUuNzEtMTUuNzFoNDMuMTAxYzguNjc2IDAgMTUuNzEgNy4wMzMgMTUuNzEgMTUuNzFWMzc3LjM2ek0yMzAgMTU3Yy0yMS41MzkgMC0zOS0xNy40NjEtMzktMzlzMTcuNDYxLTM5IDM5LTM5IDM5IDE3LjQ2MSAzOSAzOS0xNy40NjEgMzktMzkgMzl6Ii8+PC9zdmc+",Z=function(){function t(){}return t.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},t}(),Q=function(){function t(){this.data=Z.createDefault();var e=localStorage.getItem(t.LOCAL_STORAGE_KEY);e?this.data=JSON.parse(e):this.reset()}return t.prototype.hasCameraPermissions=function(){return this.data.hasPermission},t.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},t.prototype.setHasPermission=function(t){this.data.hasPermission=t,this.flush()},t.prototype.setLastUsedCameraId=function(t){this.data.lastUsedCameraId=t,this.flush()},t.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},t.prototype.reset=function(){this.data=Z.createDefault(),this.flush()},t.prototype.flush=function(){localStorage.setItem(t.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},t.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",t}(),K=function(){function t(){this.infoDiv=document.createElement("div")}return t.prototype.renderInto=function(t){this.infoDiv.style.position="absolute",this.infoDiv.style.top="10px",this.infoDiv.style.right="10px",this.infoDiv.style.zIndex="2",this.infoDiv.style.display="none",this.infoDiv.style.padding="5pt",this.infoDiv.style.border="1px solid #171717",this.infoDiv.style.fontSize="10pt",this.infoDiv.style.background="rgb(0 0 0 / 69%)",this.infoDiv.style.borderRadius="5px",this.infoDiv.style.textAlign="center",this.infoDiv.style.fontWeight="400",this.infoDiv.style.color="white",this.infoDiv.innerText=A.poweredBy();var e=document.createElement("a");e.innerText="ScanApp",e.href="https://scanapp.org",e.target="new",e.style.color="white",this.infoDiv.appendChild(e);var r=document.createElement("br"),n=document.createElement("br");this.infoDiv.appendChild(r),this.infoDiv.appendChild(n);var i=document.createElement("a");i.innerText=A.reportIssues(),i.href="https://github.com/mebjas/html5-qrcode/issues",i.target="new",i.style.color="white",this.infoDiv.appendChild(i),t.appendChild(this.infoDiv)},t.prototype.show=function(){this.infoDiv.style.display="block"},t.prototype.hide=function(){this.infoDiv.style.display="none"},t}(),q=function(){function t(t,e){this.isShowingInfoIcon=!0,this.onTapIn=t,this.onTapOut=e,this.infoIcon=document.createElement("img")}return t.prototype.renderInto=function(t){var e=this;this.infoIcon.alt="Info icon",this.infoIcon.src=j,this.infoIcon.style.position="absolute",this.infoIcon.style.top="4px",this.infoIcon.style.right="4px",this.infoIcon.style.opacity="0.6",this.infoIcon.style.cursor="pointer",this.infoIcon.style.zIndex="2",this.infoIcon.style.width="16px",this.infoIcon.style.height="16px",this.infoIcon.onmouseover=function(t){return e.onHoverIn()},this.infoIcon.onmouseout=function(t){return e.onHoverOut()},this.infoIcon.onclick=function(t){return e.onClick()},t.appendChild(this.infoIcon)},t.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},t.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},t.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=j,this.infoIcon.style.opacity="0.6")},t}(),J=function(){function t(){var t=this;this.infoDiv=new K,this.infoIcon=new q((function(){t.infoDiv.show()}),(function(){t.infoDiv.hide()}))}return t.prototype.renderInto=function(t){this.infoDiv.renderInto(t),this.infoIcon.renderInto(t)},t}(),$=function(){function t(){}return t.hasPermissions=function(){return t=this,e=void 0,n=function(){var t,e,r,n;return function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1},t.prototype.isCameraScanRequired=function(){for(var e=0,r=this.supportedScanTypes;ee)throw"Max "+e+" values expected for supportedScanTypes";for(var r=0,n=t;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]20){var e=t.substring(0,8),r=t.length,n=t.substring(r-8,r);t=e+"...."+n}var i=p.fileSelectionChooseAnother()+" - "+t;this.fileSelectionButton.innerText=i},t.prototype.setInitialValueToButton=function(){var t=p.fileSelectionChooseImage()+" - "+p.fileSelectionNoImageSelected();this.fileSelectionButton.innerText=t},t.prototype.getFileScanInputId=function(){return"html5-qrcode-private-filescan-input"},t.create=function(e,r,n){return new t(e,r,n)},t}(),lt=function(){function t(t){this.selectElement=rt.createElement("select",et.CAMERA_SELECTION_SELECT_ID),this.cameras=t,this.options=[]}return t.prototype.render=function(t){var e=document.createElement("span");e.style.marginRight="10px";var r=this.cameras.length;if(0===r)throw new Error("No cameras found");if(1===r)e.style.display="none";else{var n=p.selectCamera();e.innerText=n+" ("+this.cameras.length+") "}for(var i=1,o=0,s=this.cameras;o0?(t.removeChild(e),n.renderCameraSelection(r)):(n.setHeaderMessage(p.noCameraFound(),U.STATUS_WARNING),i())})).catch((function(t){n.persistedDataManager.setHasPermission(!1),r?r.disabled=!1:i(),n.setHeaderMessage(t,U.STATUS_WARNING),n.showHideScanTypeSwapLink(!0)}))},t.prototype.createPermissionButton=function(t,e){var r=this,n=rt.createElement("button",this.getCameraPermissionButtonId());n.innerText=p.cameraPermissionTitle(),n.addEventListener("click",(function(){n.disabled=!0,r.createCameraListUi(t,e,n)})),e.appendChild(n)},t.prototype.createPermissionsUi=function(t,e){var r=this;tt.isCameraScanType(this.currentScanType)&&this.persistedDataManager.hasCameraPermissions()?$.hasPermissions().then((function(n){n?r.createCameraListUi(t,e):(r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e))})).catch((function(n){r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e)})):this.createPermissionButton(t,e)},t.prototype.createSectionControlPanel=function(){var t=document.getElementById(this.getDashboardSectionId()),e=document.createElement("div");t.appendChild(e);var r=document.createElement("div");r.id=this.getDashboardSectionCameraScanRegionId(),r.style.display=tt.isCameraScanType(this.currentScanType)?"block":"none",e.appendChild(r);var n=document.createElement("div");n.style.textAlign="center",r.appendChild(n),this.scanTypeSelector.isCameraScanRequired()&&this.createPermissionsUi(r,n),this.renderFileScanUi(e)},t.prototype.renderFileScanUi=function(t){var e=tt.isFileScanType(this.currentScanType),r=this;this.fileSelectionUi=at.create(t,e,(function(t){if(!r.html5Qrcode)throw"html5Qrcode not defined";tt.isFileScanType(r.currentScanType)&&(r.setHeaderMessage(p.loadingImage()),r.html5Qrcode.scanFileV2(t,!0).then((function(t){r.resetHeaderMessage(),r.qrCodeSuccessCallback(t.decodedText,t)})).catch((function(t){r.setHeaderMessage(t,U.STATUS_WARNING),r.qrCodeErrorCallback(t,u.createFrom(t))})))}))},t.prototype.renderCameraSelection=function(t){var e=this,r=this,n=document.getElementById(this.getDashboardSectionCameraScanRegionId());n.style.textAlign="center";var i=ct.create(n,!1),o=lt.create(n,t),s=document.createElement("span"),a=rt.createElement("button",et.CAMERA_START_BUTTON_ID);a.innerText=p.scanButtonStartScanningText(),s.appendChild(a);var l,c=rt.createElement("button",et.CAMERA_STOP_BUTTON_ID);c.innerText=p.scanButtonStopScanningText(),c.style.display="none",c.disabled=!0,s.appendChild(c),n.appendChild(s);var h=function(t){t||(a.style.display="none"),a.innerText=p.scanButtonStartScanningText(),a.style.opacity="1",a.disabled=!1,t&&(a.style.display="inline-block")};if(a.addEventListener("click",(function(t){a.innerText=p.scanButtonScanningStarting(),o.disable(),a.disabled=!0,a.style.opacity="0.5",e.scanTypeSelector.hasMoreThanOneScanType()&&r.showHideScanTypeSwapLink(!1),r.resetHeaderMessage();var n,u=o.getValue();r.persistedDataManager.setLastUsedCameraId(u),r.html5Qrcode.start(u,(n=r.config,{fps:n.fps,qrbox:n.qrbox,aspectRatio:n.aspectRatio,disableFlip:n.disableFlip,videoConstraints:n.videoConstraints}),r.qrCodeSuccessCallback,r.qrCodeErrorCallback).then((function(t){c.disabled=!1,c.style.display="inline-block",h(!1);var n=r.html5Qrcode.getRunningTrackCameraCapabilities();!0===e.config.showTorchButtonIfSupported&&function(t){t.torchFeature().isSupported()?(l?l.updateTorchCapability(t.torchFeature()):l=st.create(s,t.torchFeature(),{display:"none",marginLeft:"5px"},(function(t){r.setHeaderMessage(t,U.STATUS_WARNING)})),l.show()):l&&l.hide()}(n),!0===e.config.showZoomSliderIfSupported&&function(t){var r=t.zoomFeature();if(r.isSupported()){i.setOnCameraZoomValueChangeCallback((function(t){r.apply(t)}));var n,o,s,a=1;e.config.defaultZoomValueIfSupported&&(a=e.config.defaultZoomValueIfSupported),n=a,o=r.min(),a=n>(s=r.max())?s:n",e.appendChild(t.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.8",this.cameraScanImage.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzIDQuMDg0IDMwLjE4NyAxNC43NjggNDUuNTM3YTkuOTg4IDkuOTg4IDAgMCAwIDguMjE2IDQuMjg4IDkuOTU4IDkuOTU4IDAgMCAwIDUuNzA0LTEuNzkzYzQuNTMzLTMuMTU1IDUuNjUtOS4zODggMi40OTUtMTMuOTIxLTYuNzk4LTkuNzY3LTkuNjAyLTIyLjYwOC0xMC43Ni0zMS40aDgyLjY4NWMuMjcyLjQxNC41NDUuODE4LjgxNSAxLjIxIDMuMTQyIDQuNTQxIDkuMzcyIDUuNjc5IDEzLjkxMyAyLjUzNCA0LjU0Mi0zLjE0MiA1LjY3Ny05LjM3MSAyLjUzNS0xMy45MTMtMTEuOTE5LTE3LjIyOS04Ljc4Ny0zNS44ODQgOS41ODEtNTcuMDEyIDMuMDY3LTIuNjUyIDEyLjMwNy0xMS43MzIgMTEuMjE3LTI0LjAzMy0uODI4LTkuMzQzLTcuMTA5LTE3LjE5NC0xOC42NjktMjMuMzM3YTkuODU3IDkuODU3IDAgMCAwLTEuMDYxLS40ODZjLS40NjYtLjE4Mi0xMS40MDMtNC41NzktOS43NDEtMTUuNzA2IDEuMDA3LTYuNzM3IDE0Ljc2OC04LjI3MyAyMy43NjYtNy42NjYgMjMuMTU2IDEuNTY5IDM5LjY5OCA3LjgwMyA0Ny44MzYgMTguMDI2IDUuNzUyIDcuMjI1IDcuNjA3IDE2LjYyMyA1LjY3MyAyOC43MzMtLjQxMyAyLjU4NS0uODI0IDUuMjQxLTEuMjQ1IDcuOTU5LTUuNzU2IDM3LjE5NC0xMi45MTkgODMuNDgzLTQ5Ljg3IDExNC42NjEtNC4yMjEgMy41NjEtNC43NTYgOS44Ny0xLjE5NCAxNC4wOTJhOS45OCA5Ljk4IDAgMCAwIDcuNjQ4IDMuNTUxIDkuOTU1IDkuOTU1IDAgMCAwIDYuNDQ0LTIuMzU4YzQyLjY3Mi0zNi4wMDUgNTAuODAyLTg4LjUzMyA1Ni43MzctMTI2Ljg4OC40MTUtMi42ODQuODIxLTUuMzA5IDEuMjI5LTcuODYzIDIuODM0LTE3LjcyMS0uNDU1LTMyLjY0MS05Ljc3Mi00NC4zNDV6bS0yMzIuMzA4IDQyLjYyYy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM2MwLTUuNTE0IDQuNDg2LTEwIDEwLTEwaDE1djIxLjMzM2gtMTV6bS0yLjUtNTIuNjY2YzAtNS41MTQgNC40ODYtMTAgMTAtMTBoNy41djIxLjMzM2gtNy41Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM3ptMTcuNSA5My45OTloLTcuNWMtNS41MTQgMC0xMC00LjQ4Ni0xMC0xMHYtMS4zMzNjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGg3LjV2MjEuMzMzem0zMC43OTYgMjguODg3Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi04LjI3MWg5MS40NTdjLS44NTEgNi42NjgtLjQzNyAxMi43ODcuNzMxIDE4LjI3MWgtODIuMTg4em03OS40ODItMTEzLjY5OGMtMy4xMjQgMjAuOTA2IDEyLjQyNyAzMy4xODQgMjEuNjI1IDM3LjA0IDUuNDQxIDIuOTY4IDcuNTUxIDUuNjQ3IDcuNzAxIDcuMTg4LjIxIDIuMTUtMi41NTMgNS42ODQtNC40NzcgNy4yNTEtLjQ4Mi4zNzgtLjkyOS44LTEuMzM1IDEuMjYxLTYuOTg3IDcuOTM2LTExLjk4MiAxNS41Mi0xNS40MzIgMjIuNjg4aC05Ny41NjRWMzBjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGgxMjMuNzY5YzUuNTE0IDAgMTAgNC40ODYgMTAgMTB2MTM1LjU3OWMtMy4wMzItLjM4MS02LjE1LS42OTQtOS4zODktLjkxNC0yNS4xNTktMS42OTQtNDIuMzcgNy43NDgtNDQuODk4IDI0LjY2NnoiLz48cGF0aCBkPSJNMTc5LjEyOSA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXpNMTcyLjYyOSAxNDIuODZoLTEyLjU2VjEzMC44YTUgNSAwIDEgMC0xMCAwdjE3LjA2MWE1IDUgMCAwIDAgNSA1aDE3LjU2YTUgNSAwIDEgMCAwLTEwLjAwMXpNMjE2LjU2OCA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXptLTUgMjQuMDYxaC0xNC4wNlY5My4xNjdoMTQuMDZ2MTQuMDYxek0yMTEuNjY5IDEyNS45MzZIMTk3LjQxYTUgNSAwIDAgMC01IDV2MTQuMjU3YTUgNSAwIDAgMCA1IDVoMTQuMjU5YTUgNSAwIDAgMCA1LTV2LTE0LjI1N2E1IDUgMCAwIDAtNS01eiIvPjwvc3ZnPg==",this.cameraScanImage.alt=p.cameraScanAltText()},t.prototype.insertFileScanImageToScanRegion=function(){var t=this,e=document.getElementById(this.getScanRegionId());if(this.fileScanImage)return e.innerHTML="
",void e.appendChild(this.fileScanImage);this.fileScanImage=new Image,this.fileScanImage.onload=function(r){e.innerHTML="
",e.appendChild(t.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.8",this.fileScanImage.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1OS4wMTggNTkuMDE4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1OS4wMTggNTkuMDE4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJtNTguNzQxIDU0LjgwOS01Ljk2OS02LjI0NGExMC43NCAxMC43NCAwIDAgMCAyLjgyLTcuMjVjMC01Ljk1My00Ljg0My0xMC43OTYtMTAuNzk2LTEwLjc5NlMzNCAzNS4zNjEgMzQgNDEuMzE0IDM4Ljg0MyA1Mi4xMSA0NC43OTYgNTIuMTFjMi40NDEgMCA0LjY4OC0uODI0IDYuNDk5LTIuMTk2bDYuMDAxIDYuMjc3YS45OTguOTk4IDAgMCAwIDEuNDE0LjAzMiAxIDEgMCAwIDAgLjAzMS0xLjQxNHpNMzYgNDEuMzE0YzAtNC44NSAzLjk0Ni04Ljc5NiA4Ljc5Ni04Ljc5NnM4Ljc5NiAzLjk0NiA4Ljc5NiA4Ljc5Ni0zLjk0NiA4Ljc5Ni04Ljc5NiA4Ljc5NlMzNiA0Ni4xNjQgMzYgNDEuMzE0ek0xMC40MzEgMTYuMDg4YzAgMy4wNyAyLjQ5OCA1LjU2OCA1LjU2OSA1LjU2OHM1LjU2OS0yLjQ5OCA1LjU2OS01LjU2OGMwLTMuMDcxLTIuNDk4LTUuNTY5LTUuNTY5LTUuNTY5cy01LjU2OSAyLjQ5OC01LjU2OSA1LjU2OXptOS4xMzggMGMwIDEuOTY4LTEuNjAyIDMuNTY4LTMuNTY5IDMuNTY4cy0zLjU2OS0xLjYwMS0zLjU2OS0zLjU2OCAxLjYwMi0zLjU2OSAzLjU2OS0zLjU2OSAzLjU2OSAxLjYwMSAzLjU2OSAzLjU2OXoiLz48cGF0aCBkPSJtMzAuODgyIDI4Ljk4NyA5LjE4LTEwLjA1NCAxMS4yNjIgMTAuMzIzYTEgMSAwIDAgMCAxLjM1MS0xLjQ3NWwtMTItMTFhMSAxIDAgMCAwLTEuNDE0LjA2M2wtOS43OTQgMTAuNzI3LTQuNzQzLTQuNzQzYTEuMDAzIDEuMDAzIDAgMCAwLTEuMzY4LS4wNDRMNi4zMzkgMzcuNzY4YTEgMSAwIDEgMCAxLjMyMiAxLjUwMWwxNi4zMTMtMTQuMzYyIDcuMzE5IDcuMzE4YS45OTkuOTk5IDAgMSAwIDEuNDE0LTEuNDE0bC0xLjgyNS0xLjgyNHoiLz48cGF0aCBkPSJNMzAgNDYuNTE4SDJ2LTQyaDU0djI4YTEgMSAwIDEgMCAyIDB2LTI5YTEgMSAwIDAgMC0xLTFIMWExIDEgMCAwIDAtMSAxdjQ0YTEgMSAwIDAgMCAxIDFoMjlhMSAxIDAgMSAwIDAtMnoiLz48L3N2Zz4=",this.fileScanImage.alt=p.fileScanAltText()},t.prototype.clearScanRegion=function(){document.getElementById(this.getScanRegionId()).innerHTML=""},t.prototype.getDashboardSectionId=function(){return this.elementId+"__dashboard_section"},t.prototype.getDashboardSectionCameraScanRegionId=function(){return this.elementId+"__dashboard_section_csr"},t.prototype.getDashboardSectionSwapLinkId=function(){return et.SCAN_TYPE_CHANGE_ANCHOR_ID},t.prototype.getScanRegionId=function(){return this.elementId+"__scan_region"},t.prototype.getDashboardId=function(){return this.elementId+"__dashboard"},t.prototype.getHeaderMessageContainerId=function(){return this.elementId+"__header_message"},t.prototype.getCameraPermissionButtonId=function(){return et.CAMERA_PERMISSION_BUTTON_ID},t.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},t.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},t.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())},t}()})(),__Html5QrcodeLibrary__=n})();if (window) { if (!Html5QrcodeScanner) { var Html5QrcodeScanner = window.__Html5QrcodeLibrary__.Html5QrcodeScanner; } if (!Html5Qrcode) { var Html5Qrcode = window.__Html5QrcodeLibrary__.Html5Qrcode; } if (!Html5QrcodeSupportedFormats) { var Html5QrcodeSupportedFormats = window.__Html5QrcodeLibrary__.Html5QrcodeSupportedFormats } if (!Html5QrcodeScannerState) { var Html5QrcodeScannerState = window.__Html5QrcodeLibrary__.Html5QrcodeScannerState; } if (!Html5QrcodeScanType) { var Html5QrcodeScanType = window.__Html5QrcodeLibrary__.Html5QrcodeScanType; }} \ No newline at end of file diff --git a/www/PasseportTerre/index_fichiers/instascan.min.js b/www/PasseportTerre/index_fichiers/instascan.min.js deleted file mode 100644 index 08812187..00000000 --- a/www/PasseportTerre/index_fichiers/instascan.min.js +++ /dev/null @@ -1,48 +0,0 @@ -!function e(i,r,n){function t(f,a){if(!r[f]){if(!i[f]){var u="function"==typeof require&&require;if(!a&&u)return u(f,!0);if(o)return o(f,!0);var s=new Error("Cannot find module '"+f+"'");throw s.code="MODULE_NOT_FOUND",s}var l=r[f]={exports:{}};i[f][0].call(l.exports,function(e){var r=i[f][1][e];return t(r?r:e)},l,l.exports,e,i,r,n)}return r[f].exports}for(var o="function"==typeof require&&require,f=0;f2?arguments[2]:void 0,l=Math.min((void 0===s?f:t(s,f))-u,f-a),c=1;for(u0;)u in r?r[a]=r[u]:delete r[a],a+=c,u+=c;return r}},{"./_to-index":107,"./_to-length":110,"./_to-object":111}],11:[function(e,i,r){"use strict";var n=e("./_to-object"),t=e("./_to-index"),o=e("./_to-length");i.exports=function(e){for(var i=n(this),r=o(i.length),f=arguments.length,a=t(f>1?arguments[1]:void 0,r),u=f>2?arguments[2]:void 0,s=void 0===u?r:t(u,r);s>a;)i[a++]=e;return i}},{"./_to-index":107,"./_to-length":110,"./_to-object":111}],12:[function(e,i,r){var n=e("./_for-of");i.exports=function(e,i){var r=[];return n(e,!1,r.push,r,i),r}},{"./_for-of":39}],13:[function(e,i,r){var n=e("./_to-iobject"),t=e("./_to-length"),o=e("./_to-index");i.exports=function(e){return function(i,r,f){var a,u=n(i),s=t(u.length),l=o(f,s);if(e&&r!=r){for(;s>l;)if(a=u[l++],a!=a)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},{"./_to-index":107,"./_to-iobject":109,"./_to-length":110}],14:[function(e,i,r){var n=e("./_ctx"),t=e("./_iobject"),o=e("./_to-object"),f=e("./_to-length"),a=e("./_array-species-create");i.exports=function(e,i){var r=1==e,u=2==e,s=3==e,l=4==e,c=6==e,d=5==e||c,b=i||a;return function(i,a,h){for(var k,_,p=o(i),v=t(p),w=n(a,h,3),m=f(v.length),g=0,y=r?b(i,m):u?b(i,0):void 0;m>g;g++)if((d||g in v)&&(k=v[g],_=w(k,g,p),e))if(r)y[g]=_;else if(_)switch(e){case 3:return!0;case 5:return k;case 6:return g;case 2:y.push(k)}else if(l)return!1;return c?-1:s||l?l:y}}},{"./_array-species-create":17,"./_ctx":27,"./_iobject":47,"./_to-length":110,"./_to-object":111}],15:[function(e,i,r){var n=e("./_a-function"),t=e("./_to-object"),o=e("./_iobject"),f=e("./_to-length");i.exports=function(e,i,r,a,u){n(i);var s=t(e),l=o(s),c=f(s.length),d=u?c-1:0,b=u?-1:1;if(r<2)for(;;){if(d in l){a=l[d],d+=b;break}if(d+=b,u?d<0:c<=d)throw TypeError("Reduce of empty array with no initial value")}for(;u?d>=0:c>d;d+=b)d in l&&(a=i(a,l[d],d,s));return a}},{"./_a-function":5,"./_iobject":47,"./_to-length":110,"./_to-object":111}],16:[function(e,i,r){var n=e("./_is-object"),t=e("./_is-array"),o=e("./_wks")("species");i.exports=function(e){var i;return t(e)&&(i=e.constructor,"function"!=typeof i||i!==Array&&!t(i.prototype)||(i=void 0),n(i)&&(i=i[o],null===i&&(i=void 0))),void 0===i?Array:i}},{"./_is-array":49,"./_is-object":51,"./_wks":119}],17:[function(e,i,r){var n=e("./_array-species-constructor");i.exports=function(e,i){return new(n(e))(i)}},{"./_array-species-constructor":16}],18:[function(e,i,r){"use strict";var n=e("./_a-function"),t=e("./_is-object"),o=e("./_invoke"),f=[].slice,a={},u=function(e,i,r){if(!(i in a)){for(var n=[],t=0;t1?arguments[1]:void 0,3);i=i?i.n:this._f;)for(r(i.v,i.k,this);i&&i.r;)i=i.p},has:function(e){return!!_(this,e)}}),b&&n(c.prototype,"size",{get:function(){return u(this[k])}}),c},def:function(e,i,r){var n,t,o=_(e,i);return o?o.v=r:(e._l=o={i:t=h(i,!0),k:i,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=o),n&&(n.n=o),e[k]++,"F"!==t&&(e._i[t]=o)),e},getEntry:_,setStrong:function(e,i,r){l(e,i,function(e,i){this._t=e,this._k=i,this._l=void 0},function(){for(var e=this,i=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==i?c(0,r.k):"values"==i?c(0,r.v):c(0,[r.k,r.v]):(e._t=void 0,c(1))},r?"entries":"values",!r,!0),d(i)}}},{"./_an-instance":8,"./_ctx":27,"./_defined":29,"./_descriptors":30,"./_for-of":39,"./_iter-define":55,"./_iter-step":57,"./_meta":64,"./_object-create":68,"./_object-dp":69,"./_redefine-all":88,"./_set-species":93}],22:[function(e,i,r){var n=e("./_classof"),t=e("./_array-from-iterable");i.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return t(this)}}},{"./_array-from-iterable":12,"./_classof":19}],23:[function(e,i,r){"use strict";var n=e("./_redefine-all"),t=e("./_meta").getWeak,o=e("./_an-object"),f=e("./_is-object"),a=e("./_an-instance"),u=e("./_for-of"),s=e("./_array-methods"),l=e("./_has"),c=s(5),d=s(6),b=0,h=function(e){return e._l||(e._l=new k)},k=function(){this.a=[]},_=function(e,i){return c(e.a,function(e){return e[0]===i})};k.prototype={get:function(e){var i=_(this,e);if(i)return i[1]},has:function(e){return!!_(this,e)},set:function(e,i){var r=_(this,e);r?r[1]=i:this.a.push([e,i])},"delete":function(e){var i=d(this.a,function(i){return i[0]===e});return~i&&this.a.splice(i,1),!!~i}},i.exports={getConstructor:function(e,i,r,o){var s=e(function(e,n){a(e,s,i,"_i"),e._i=b++,e._l=void 0,void 0!=n&&u(n,r,e[o],e)});return n(s.prototype,{"delete":function(e){if(!f(e))return!1;var i=t(e);return i===!0?h(this)["delete"](e):i&&l(i,this._i)&&delete i[this._i]},has:function(e){if(!f(e))return!1;var i=t(e);return i===!0?h(this).has(e):i&&l(i,this._i)}}),s},def:function(e,i,r){var n=t(o(i),!0);return n===!0?h(e).set(i,r):n[e._i]=r,e},ufstore:h}},{"./_an-instance":8,"./_an-object":9,"./_array-methods":14,"./_for-of":39,"./_has":41,"./_is-object":51,"./_meta":64,"./_redefine-all":88}],24:[function(e,i,r){"use strict";var n=e("./_global"),t=e("./_export"),o=e("./_redefine"),f=e("./_redefine-all"),a=e("./_meta"),u=e("./_for-of"),s=e("./_an-instance"),l=e("./_is-object"),c=e("./_fails"),d=e("./_iter-detect"),b=e("./_set-to-string-tag"),h=e("./_inherit-if-required");i.exports=function(e,i,r,k,_,p){var v=n[e],w=v,m=_?"set":"add",g=w&&w.prototype,y={},E=function(e){var i=g[e];o(g,e,"delete"==e?function(e){return!(p&&!l(e))&&i.call(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!l(e))&&i.call(this,0===e?0:e)}:"get"==e?function(e){return p&&!l(e)?void 0:i.call(this,0===e?0:e)}:"add"==e?function(e){return i.call(this,0===e?0:e),this}:function(e,r){return i.call(this,0===e?0:e,r),this})};if("function"==typeof w&&(p||g.forEach&&!c(function(){(new w).entries().next()}))){var S=new w,O=S[m](p?{}:-0,1)!=S,C=c(function(){S.has(1)}),A=d(function(e){new w(e)}),x=!p&&c(function(){for(var e=new w,i=5;i--;)e[m](i,i);return!e.has(-0)});A||(w=i(function(i,r){s(i,w,e);var n=h(new v,i,w);return void 0!=r&&u(r,_,n[m],n),n}),w.prototype=g,g.constructor=w),(C||x)&&(E("delete"),E("has"),_&&E("get")),(x||O)&&E(m),p&&g.clear&&delete g.clear}else w=k.getConstructor(i,e,_,m),f(w.prototype,r),a.NEED=!0;return b(w,e),y[e]=w,t(t.G+t.W+t.F*(w!=v),y),p||k.setStrong(w,e,_),w}},{"./_an-instance":8,"./_export":34,"./_fails":36,"./_for-of":39,"./_global":40,"./_inherit-if-required":45,"./_is-object":51,"./_iter-detect":56,"./_meta":64,"./_redefine":89,"./_redefine-all":88,"./_set-to-string-tag":94}],25:[function(e,i,r){var n=i.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],26:[function(e,i,r){"use strict";var n=e("./_object-dp"),t=e("./_property-desc");i.exports=function(e,i,r){i in e?n.f(e,i,t(0,r)):e[i]=r}},{"./_object-dp":69,"./_property-desc":87}],27:[function(e,i,r){var n=e("./_a-function");i.exports=function(e,i,r){if(n(e),void 0===i)return e;switch(r){case 1:return function(r){return e.call(i,r)};case 2:return function(r,n){return e.call(i,r,n)};case 3:return function(r,n,t){return e.call(i,r,n,t)}}return function(){return e.apply(i,arguments)}}},{"./_a-function":5}],28:[function(e,i,r){"use strict";var n=e("./_an-object"),t=e("./_to-primitive"),o="number";i.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return t(n(this),e!=o)}},{"./_an-object":9,"./_to-primitive":112}],29:[function(e,i,r){i.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],30:[function(e,i,r){i.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":36}],31:[function(e,i,r){var n=e("./_is-object"),t=e("./_global").document,o=n(t)&&n(t.createElement);i.exports=function(e){return o?t.createElement(e):{}}},{"./_global":40,"./_is-object":51}],32:[function(e,i,r){i.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],33:[function(e,i,r){var n=e("./_object-keys"),t=e("./_object-gops"),o=e("./_object-pie");i.exports=function(e){var i=n(e),r=t.f;if(r)for(var f,a=r(e),u=o.f,s=0;a.length>s;)u.call(e,f=a[s++])&&i.push(f);return i}},{"./_object-gops":75,"./_object-keys":78,"./_object-pie":79}],34:[function(e,i,r){var n=e("./_global"),t=e("./_core"),o=e("./_hide"),f=e("./_redefine"),a=e("./_ctx"),u="prototype",s=function(e,i,r){var l,c,d,b,h=e&s.F,k=e&s.G,_=e&s.S,p=e&s.P,v=e&s.B,w=k?n:_?n[i]||(n[i]={}):(n[i]||{})[u],m=k?t:t[i]||(t[i]={}),g=m[u]||(m[u]={});k&&(r=i);for(l in r)c=!h&&w&&void 0!==w[l],d=(c?w:r)[l],b=v&&c?a(d,n):p&&"function"==typeof d?a(Function.call,d):d,w&&f(w,l,d,e&s.U),m[l]!=d&&o(m,l,b),p&&g[l]!=d&&(g[l]=d)};n.core=t,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,i.exports=s},{"./_core":25,"./_ctx":27,"./_global":40,"./_hide":42,"./_redefine":89}],35:[function(e,i,r){var n=e("./_wks")("match");i.exports=function(e){var i=/./;try{"/./"[e](i)}catch(r){try{return i[n]=!1,!"/./"[e](i)}catch(t){}}return!0}},{"./_wks":119}],36:[function(e,i,r){i.exports=function(e){try{return!!e()}catch(i){return!0}}},{}],37:[function(e,i,r){"use strict";var n=e("./_hide"),t=e("./_redefine"),o=e("./_fails"),f=e("./_defined"),a=e("./_wks");i.exports=function(e,i,r){var u=a(e),s=r(f,u,""[e]),l=s[0],c=s[1];o(function(){var i={};return i[u]=function(){return 7},7!=""[e](i)})&&(t(String.prototype,e,l),n(RegExp.prototype,u,2==i?function(e,i){return c.call(e,this,i)}:function(e){return c.call(e,this)}))}},{"./_defined":29,"./_fails":36,"./_hide":42,"./_redefine":89,"./_wks":119}],38:[function(e,i,r){"use strict";var n=e("./_an-object");i.exports=function(){var e=n(this),i="";return e.global&&(i+="g"),e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),e.sticky&&(i+="y"),i}},{"./_an-object":9}],39:[function(e,i,r){var n=e("./_ctx"),t=e("./_iter-call"),o=e("./_is-array-iter"),f=e("./_an-object"),a=e("./_to-length"),u=e("./core.get-iterator-method"),s={},l={},r=i.exports=function(e,i,r,c,d){var b,h,k,_,p=d?function(){return e}:u(e),v=n(r,c,i?2:1),w=0;if("function"!=typeof p)throw TypeError(e+" is not iterable!");if(o(p)){for(b=a(e.length);b>w;w++)if(_=i?v(f(h=e[w])[0],h[1]):v(e[w]),_===s||_===l)return _}else for(k=p.call(e);!(h=k.next()).done;)if(_=t(k,v,h.value,i),_===s||_===l)return _};r.BREAK=s,r.RETURN=l},{"./_an-object":9,"./_ctx":27,"./_is-array-iter":48,"./_iter-call":53,"./_to-length":110,"./core.get-iterator-method":120}],40:[function(e,i,r){var n=i.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],41:[function(e,i,r){var n={}.hasOwnProperty;i.exports=function(e,i){return n.call(e,i)}},{}],42:[function(e,i,r){var n=e("./_object-dp"),t=e("./_property-desc");i.exports=e("./_descriptors")?function(e,i,r){return n.f(e,i,t(1,r))}:function(e,i,r){return e[i]=r,e}},{"./_descriptors":30,"./_object-dp":69,"./_property-desc":87}],43:[function(e,i,r){i.exports=e("./_global").document&&document.documentElement},{"./_global":40}],44:[function(e,i,r){i.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":30,"./_dom-create":31,"./_fails":36}],45:[function(e,i,r){var n=e("./_is-object"),t=e("./_set-proto").set;i.exports=function(e,i,r){var o,f=i.constructor;return f!==r&&"function"==typeof f&&(o=f.prototype)!==r.prototype&&n(o)&&t&&t(e,o),e}},{"./_is-object":51,"./_set-proto":92}],46:[function(e,i,r){i.exports=function(e,i,r){var n=void 0===r;switch(i.length){case 0:return n?e():e.call(r);case 1:return n?e(i[0]):e.call(r,i[0]);case 2:return n?e(i[0],i[1]):e.call(r,i[0],i[1]);case 3:return n?e(i[0],i[1],i[2]):e.call(r,i[0],i[1],i[2]);case 4:return n?e(i[0],i[1],i[2],i[3]):e.call(r,i[0],i[1],i[2],i[3])}return e.apply(r,i)}},{}],47:[function(e,i,r){var n=e("./_cof");i.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":20}],48:[function(e,i,r){var n=e("./_iterators"),t=e("./_wks")("iterator"),o=Array.prototype;i.exports=function(e){return void 0!==e&&(n.Array===e||o[t]===e)}},{"./_iterators":58,"./_wks":119}],49:[function(e,i,r){var n=e("./_cof");i.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":20}],50:[function(e,i,r){var n=e("./_is-object"),t=Math.floor;i.exports=function(e){return!n(e)&&isFinite(e)&&t(e)===e}},{"./_is-object":51}],51:[function(e,i,r){i.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],52:[function(e,i,r){var n=e("./_is-object"),t=e("./_cof"),o=e("./_wks")("match");i.exports=function(e){var i;return n(e)&&(void 0!==(i=e[o])?!!i:"RegExp"==t(e))}},{"./_cof":20,"./_is-object":51,"./_wks":119}],53:[function(e,i,r){var n=e("./_an-object");i.exports=function(e,i,r,t){try{return t?i(n(r)[0],r[1]):i(r)}catch(o){var f=e["return"];throw void 0!==f&&n(f.call(e)),o}}},{"./_an-object":9}],54:[function(e,i,r){"use strict";var n=e("./_object-create"),t=e("./_property-desc"),o=e("./_set-to-string-tag"),f={};e("./_hide")(f,e("./_wks")("iterator"),function(){return this}),i.exports=function(e,i,r){e.prototype=n(f,{next:t(1,r)}),o(e,i+" Iterator")}},{"./_hide":42,"./_object-create":68,"./_property-desc":87,"./_set-to-string-tag":94,"./_wks":119}],55:[function(e,i,r){"use strict";var n=e("./_library"),t=e("./_export"),o=e("./_redefine"),f=e("./_hide"),a=e("./_has"),u=e("./_iterators"),s=e("./_iter-create"),l=e("./_set-to-string-tag"),c=e("./_object-gpo"),d=e("./_wks")("iterator"),b=!([].keys&&"next"in[].keys()),h="@@iterator",k="keys",_="values",p=function(){return this};i.exports=function(e,i,r,v,w,m,g){s(r,i,v);var y,E,S,O=function(e){if(!b&&e in R)return R[e];switch(e){case k:return function(){return new r(this,e)};case _:return function(){return new r(this,e)}}return function(){return new r(this,e)}},C=i+" Iterator",A=w==_,x=!1,R=e.prototype,F=R[d]||R[h]||w&&R[w],M=F||O(w),T=w?A?O("entries"):M:void 0,P="Array"==i?R.entries||F:F;if(P&&(S=c(P.call(new e)),S!==Object.prototype&&(l(S,C,!0),n||a(S,d)||f(S,d,p))),A&&F&&F.name!==_&&(x=!0,M=function(){return F.call(this)}),n&&!g||!b&&!x&&R[d]||f(R,d,M),u[i]=M,u[C]=p,w)if(y={values:A?M:O(_),keys:m?M:O(k),entries:T},g)for(E in y)E in R||o(R,E,y[E]);else t(t.P+t.F*(b||x),i,y);return y}},{"./_export":34,"./_has":41,"./_hide":42,"./_iter-create":54,"./_iterators":58,"./_library":60,"./_object-gpo":76,"./_redefine":89,"./_set-to-string-tag":94,"./_wks":119}],56:[function(e,i,r){var n=e("./_wks")("iterator"),t=!1;try{var o=[7][n]();o["return"]=function(){t=!0},Array.from(o,function(){throw 2})}catch(f){}i.exports=function(e,i){if(!i&&!t)return!1;var r=!1;try{var o=[7],f=o[n]();f.next=function(){return{done:r=!0}},o[n]=function(){return f},e(o)}catch(a){}return r}},{"./_wks":119}],57:[function(e,i,r){i.exports=function(e,i){return{value:i,done:!!e}}},{}],58:[function(e,i,r){i.exports={}},{}],59:[function(e,i,r){var n=e("./_object-keys"),t=e("./_to-iobject");i.exports=function(e,i){for(var r,o=t(e),f=n(o),a=f.length,u=0;a>u;)if(o[r=f[u++]]===i)return r}},{"./_object-keys":78,"./_to-iobject":109}],60:[function(e,i,r){i.exports=!1},{}],61:[function(e,i,r){var n=Math.expm1;i.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},{}],62:[function(e,i,r){i.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},{}],63:[function(e,i,r){i.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},{}],64:[function(e,i,r){var n=e("./_uid")("meta"),t=e("./_is-object"),o=e("./_has"),f=e("./_object-dp").f,a=0,u=Object.isExtensible||function(){return!0},s=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),l=function(e){f(e,n,{value:{i:"O"+ ++a,w:{}}})},c=function(e,i){if(!t(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!u(e))return"F";if(!i)return"E";l(e)}return e[n].i},d=function(e,i){if(!o(e,n)){if(!u(e))return!0;if(!i)return!1;l(e)}return e[n].w},b=function(e){return s&&h.NEED&&u(e)&&!o(e,n)&&l(e),e},h=i.exports={KEY:n,NEED:!1,fastKey:c,getWeak:d,onFreeze:b}},{"./_fails":36,"./_has":41,"./_is-object":51,"./_object-dp":69,"./_uid":116}],65:[function(e,i,r){var n=e("./es6.map"),t=e("./_export"),o=e("./_shared")("metadata"),f=o.store||(o.store=new(e("./es6.weak-map"))),a=function(e,i,r){var t=f.get(e);if(!t){if(!r)return;f.set(e,t=new n)}var o=t.get(i);if(!o){if(!r)return;t.set(i,o=new n)}return o},u=function(e,i,r){var n=a(i,r,!1);return void 0!==n&&n.has(e)},s=function(e,i,r){var n=a(i,r,!1);return void 0===n?void 0:n.get(e)},l=function(e,i,r,n){a(r,n,!0).set(e,i)},c=function(e,i){var r=a(e,i,!1),n=[];return r&&r.forEach(function(e,i){n.push(i)}),n},d=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},b=function(e){t(t.S,"Reflect",e)};i.exports={store:f,map:a,has:u,get:s,set:l,keys:c,key:d,exp:b}},{"./_export":34,"./_shared":96,"./es6.map":151,"./es6.weak-map":257}],66:[function(e,i,r){var n=e("./_global"),t=e("./_task").set,o=n.MutationObserver||n.WebKitMutationObserver,f=n.process,a=n.Promise,u="process"==e("./_cof")(f);i.exports=function(){var e,i,r,s=function(){var n,t;for(u&&(n=f.domain)&&n.exit();e;){t=e.fn,e=e.next;try{t()}catch(o){throw e?r():i=void 0,o}}i=void 0,n&&n.enter()};if(u)r=function(){f.nextTick(s)};else if(o){var l=!0,c=document.createTextNode("");new o(s).observe(c,{characterData:!0}),r=function(){c.data=l=!l}}else if(a&&a.resolve){var d=a.resolve();r=function(){d.then(s)}}else r=function(){t.call(n,s)};return function(n){var t={fn:n,next:void 0};i&&(i.next=t),e||(e=t,r()),i=t}}},{"./_cof":20,"./_global":40,"./_task":106}],67:[function(e,i,r){"use strict";var n=e("./_object-keys"),t=e("./_object-gops"),o=e("./_object-pie"),f=e("./_to-object"),a=e("./_iobject"),u=Object.assign;i.exports=!u||e("./_fails")(function(){var e={},i={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){i[e]=e}),7!=u({},e)[r]||Object.keys(u({},i)).join("")!=n})?function(e,i){for(var r=f(e),u=arguments.length,s=1,l=t.f,c=o.f;u>s;)for(var d,b=a(arguments[s++]),h=l?n(b).concat(l(b)):n(b),k=h.length,_=0;k>_;)c.call(b,d=h[_++])&&(r[d]=b[d]);return r}:u},{"./_fails":36,"./_iobject":47,"./_object-gops":75,"./_object-keys":78,"./_object-pie":79,"./_to-object":111}],68:[function(e,i,r){var n=e("./_an-object"),t=e("./_object-dps"),o=e("./_enum-bug-keys"),f=e("./_shared-key")("IE_PROTO"),a=function(){},u="prototype",s=function(){var i,r=e("./_dom-create")("iframe"),n=o.length,t="<",f=">";for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",i=r.contentWindow.document,i.open(),i.write(t+"script"+f+"document.F=Object"+t+"/script"+f),i.close(),s=i.F;n--;)delete s[u][o[n]];return s()};i.exports=Object.create||function(e,i){var r;return null!==e?(a[u]=n(e),r=new a,a[u]=null,r[f]=e):r=s(),void 0===i?r:t(r,i)}},{"./_an-object":9,"./_dom-create":31,"./_enum-bug-keys":32,"./_html":43,"./_object-dps":70,"./_shared-key":95}],69:[function(e,i,r){var n=e("./_an-object"),t=e("./_ie8-dom-define"),o=e("./_to-primitive"),f=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,i,r){if(n(e),i=o(i,!0),n(r),t)try{return f(e,i,r)}catch(a){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[i]=r.value),e}},{"./_an-object":9,"./_descriptors":30,"./_ie8-dom-define":44,"./_to-primitive":112}],70:[function(e,i,r){var n=e("./_object-dp"),t=e("./_an-object"),o=e("./_object-keys");i.exports=e("./_descriptors")?Object.defineProperties:function(e,i){t(e);for(var r,f=o(i),a=f.length,u=0;a>u;)n.f(e,r=f[u++],i[r]);return e}},{"./_an-object":9,"./_descriptors":30,"./_object-dp":69,"./_object-keys":78}],71:[function(e,i,r){i.exports=e("./_library")||!e("./_fails")(function(){var i=Math.random();__defineSetter__.call(null,i,function(){}),delete e("./_global")[i]})},{"./_fails":36,"./_global":40,"./_library":60}],72:[function(e,i,r){var n=e("./_object-pie"),t=e("./_property-desc"),o=e("./_to-iobject"),f=e("./_to-primitive"),a=e("./_has"),u=e("./_ie8-dom-define"),s=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?s:function(e,i){if(e=o(e),i=f(i,!0),u)try{return s(e,i)}catch(r){}if(a(e,i))return t(!n.f.call(e,i),e[i])}},{"./_descriptors":30,"./_has":41,"./_ie8-dom-define":44,"./_object-pie":79,"./_property-desc":87,"./_to-iobject":109,"./_to-primitive":112}],73:[function(e,i,r){var n=e("./_to-iobject"),t=e("./_object-gopn").f,o={}.toString,f="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return t(e)}catch(i){return f.slice()}};i.exports.f=function(e){return f&&"[object Window]"==o.call(e)?a(e):t(n(e))}},{"./_object-gopn":74,"./_to-iobject":109}],74:[function(e,i,r){var n=e("./_object-keys-internal"),t=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,t)}},{"./_enum-bug-keys":32,"./_object-keys-internal":77}],75:[function(e,i,r){r.f=Object.getOwnPropertySymbols},{}],76:[function(e,i,r){var n=e("./_has"),t=e("./_to-object"),o=e("./_shared-key")("IE_PROTO"),f=Object.prototype;i.exports=Object.getPrototypeOf||function(e){return e=t(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?f:null}},{"./_has":41,"./_shared-key":95,"./_to-object":111}],77:[function(e,i,r){var n=e("./_has"),t=e("./_to-iobject"),o=e("./_array-includes")(!1),f=e("./_shared-key")("IE_PROTO");i.exports=function(e,i){var r,a=t(e),u=0,s=[];for(r in a)r!=f&&n(a,r)&&s.push(r);for(;i.length>u;)n(a,r=i[u++])&&(~o(s,r)||s.push(r));return s}},{"./_array-includes":13,"./_has":41,"./_shared-key":95,"./_to-iobject":109}],78:[function(e,i,r){var n=e("./_object-keys-internal"),t=e("./_enum-bug-keys");i.exports=Object.keys||function(e){return n(e,t)}},{"./_enum-bug-keys":32,"./_object-keys-internal":77}],79:[function(e,i,r){r.f={}.propertyIsEnumerable},{}],80:[function(e,i,r){var n=e("./_export"),t=e("./_core"),o=e("./_fails");i.exports=function(e,i){var r=(t.Object||{})[e]||Object[e],f={};f[e]=i(r),n(n.S+n.F*o(function(){r(1)}),"Object",f)}},{"./_core":25,"./_export":34,"./_fails":36}],81:[function(e,i,r){var n=e("./_object-keys"),t=e("./_to-iobject"),o=e("./_object-pie").f;i.exports=function(e){return function(i){for(var r,f=t(i),a=n(f),u=a.length,s=0,l=[];u>s;)o.call(f,r=a[s++])&&l.push(e?[r,f[r]]:f[r]);return l}}},{"./_object-keys":78,"./_object-pie":79,"./_to-iobject":109}],82:[function(e,i,r){var n=e("./_object-gopn"),t=e("./_object-gops"),o=e("./_an-object"),f=e("./_global").Reflect;i.exports=f&&f.ownKeys||function(e){var i=n.f(o(e)),r=t.f;return r?i.concat(r(e)):i}},{"./_an-object":9,"./_global":40,"./_object-gopn":74,"./_object-gops":75}],83:[function(e,i,r){var n=e("./_global").parseFloat,t=e("./_string-trim").trim;i.exports=1/n(e("./_string-ws")+"-0")!==-(1/0)?function(e){var i=t(String(e),3),r=n(i);return 0===r&&"-"==i.charAt(0)?-0:r}:n},{"./_global":40,"./_string-trim":104,"./_string-ws":105}],84:[function(e,i,r){var n=e("./_global").parseInt,t=e("./_string-trim").trim,o=e("./_string-ws"),f=/^[\-+]?0[xX]/;i.exports=8!==n(o+"08")||22!==n(o+"0x16")?function(e,i){var r=t(String(e),3);return n(r,i>>>0||(f.test(r)?16:10))}:n},{"./_global":40,"./_string-trim":104,"./_string-ws":105}],85:[function(e,i,r){"use strict";var n=e("./_path"),t=e("./_invoke"),o=e("./_a-function");i.exports=function(){for(var e=o(this),i=arguments.length,r=Array(i),f=0,a=n._,u=!1;i>f;)(r[f]=arguments[f++])===a&&(u=!0);return function(){var n,o=this,f=arguments.length,s=0,l=0;if(!u&&!f)return t(e,r,o);if(n=r.slice(),u)for(;i>s;s++)n[s]===a&&(n[s]=arguments[l++]);for(;f>l;)n.push(arguments[l++]);return t(e,n,o)}}},{"./_a-function":5,"./_invoke":46,"./_path":86}],86:[function(e,i,r){i.exports=e("./_global")},{"./_global":40}],87:[function(e,i,r){i.exports=function(e,i){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:i}}},{}],88:[function(e,i,r){var n=e("./_redefine");i.exports=function(e,i,r){for(var t in i)n(e,t,i[t],r);return e}},{"./_redefine":89}],89:[function(e,i,r){var n=e("./_global"),t=e("./_hide"),o=e("./_has"),f=e("./_uid")("src"),a="toString",u=Function[a],s=(""+u).split(a);e("./_core").inspectSource=function(e){return u.call(e)},(i.exports=function(e,i,r,a){var u="function"==typeof r;u&&(o(r,"name")||t(r,"name",i)),e[i]!==r&&(u&&(o(r,f)||t(r,f,e[i]?""+e[i]:s.join(String(i)))),e===n?e[i]=r:a?e[i]?e[i]=r:t(e,i,r):(delete e[i],t(e,i,r)))})(Function.prototype,a,function(){return"function"==typeof this&&this[f]||u.call(this)})},{"./_core":25,"./_global":40,"./_has":41,"./_hide":42,"./_uid":116}],90:[function(e,i,r){i.exports=function(e,i){var r=i===Object(i)?function(e){return i[e]}:i;return function(i){return String(i).replace(e,r)}}},{}],91:[function(e,i,r){i.exports=Object.is||function(e,i){return e===i?0!==e||1/e===1/i:e!=e&&i!=i}},{}],92:[function(e,i,r){var n=e("./_is-object"),t=e("./_an-object"),o=function(e,i){if(t(e),!n(i)&&null!==i)throw TypeError(i+": can't set as prototype!")};i.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(i,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(i,[]),r=!(i instanceof Array)}catch(t){r=!0}return function(e,i){return o(e,i),r?e.__proto__=i:n(e,i),e}}({},!1):void 0),check:o}},{"./_an-object":9,"./_ctx":27,"./_is-object":51,"./_object-gopd":72}],93:[function(e,i,r){"use strict";var n=e("./_global"),t=e("./_object-dp"),o=e("./_descriptors"),f=e("./_wks")("species");i.exports=function(e){var i=n[e];o&&i&&!i[f]&&t.f(i,f,{configurable:!0,get:function(){return this}})}},{"./_descriptors":30,"./_global":40,"./_object-dp":69,"./_wks":119}],94:[function(e,i,r){var n=e("./_object-dp").f,t=e("./_has"),o=e("./_wks")("toStringTag");i.exports=function(e,i,r){e&&!t(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:i})}},{"./_has":41,"./_object-dp":69,"./_wks":119}],95:[function(e,i,r){var n=e("./_shared")("keys"),t=e("./_uid");i.exports=function(e){return n[e]||(n[e]=t(e))}},{"./_shared":96,"./_uid":116}],96:[function(e,i,r){var n=e("./_global"),t="__core-js_shared__",o=n[t]||(n[t]={});i.exports=function(e){return o[e]||(o[e]={})}},{"./_global":40}],97:[function(e,i,r){var n=e("./_an-object"),t=e("./_a-function"),o=e("./_wks")("species");i.exports=function(e,i){var r,f=n(e).constructor;return void 0===f||void 0==(r=n(f)[o])?i:t(r)}},{"./_a-function":5,"./_an-object":9,"./_wks":119}],98:[function(e,i,r){var n=e("./_fails");i.exports=function(e,i){return!!e&&n(function(){i?e.call(null,function(){},1):e.call(null)})}},{"./_fails":36}],99:[function(e,i,r){var n=e("./_to-integer"),t=e("./_defined");i.exports=function(e){return function(i,r){var o,f,a=String(t(i)),u=n(r),s=a.length;return u<0||u>=s?e?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===s||(f=a.charCodeAt(u+1))<56320||f>57343?e?a.charAt(u):o:e?a.slice(u,u+2):(o-55296<<10)+(f-56320)+65536)}}},{"./_defined":29,"./_to-integer":108}],100:[function(e,i,r){var n=e("./_is-regexp"),t=e("./_defined");i.exports=function(e,i,r){if(n(i))throw TypeError("String#"+r+" doesn't accept regex!");return String(t(e))}},{"./_defined":29,"./_is-regexp":52}],101:[function(e,i,r){var n=e("./_export"),t=e("./_fails"),o=e("./_defined"),f=/"/g,a=function(e,i,r,n){var t=String(o(e)),a="<"+i;return""!==r&&(a+=" "+r+'="'+String(n).replace(f,""")+'"'),a+">"+t+""};i.exports=function(e,i){var r={};r[e]=i(a),n(n.P+n.F*t(function(){ -var i=""[e]('"');return i!==i.toLowerCase()||i.split('"').length>3}),"String",r)}},{"./_defined":29,"./_export":34,"./_fails":36}],102:[function(e,i,r){var n=e("./_to-length"),t=e("./_string-repeat"),o=e("./_defined");i.exports=function(e,i,r,f){var a=String(o(e)),u=a.length,s=void 0===r?" ":String(r),l=n(i);if(l<=u||""==s)return a;var c=l-u,d=t.call(s,Math.ceil(c/s.length));return d.length>c&&(d=d.slice(0,c)),f?d+a:a+d}},{"./_defined":29,"./_string-repeat":103,"./_to-length":110}],103:[function(e,i,r){"use strict";var n=e("./_to-integer"),t=e("./_defined");i.exports=function(e){var i=String(t(this)),r="",o=n(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(i+=i))1&o&&(r+=i);return r}},{"./_defined":29,"./_to-integer":108}],104:[function(e,i,r){var n=e("./_export"),t=e("./_defined"),o=e("./_fails"),f=e("./_string-ws"),a="["+f+"]",u="​…",s=RegExp("^"+a+a+"*"),l=RegExp(a+a+"*$"),c=function(e,i,r){var t={},a=o(function(){return!!f[e]()||u[e]()!=u}),s=t[e]=a?i(d):f[e];r&&(t[r]=s),n(n.P+n.F*a,"String",t)},d=c.trim=function(e,i){return e=String(t(e)),1&i&&(e=e.replace(s,"")),2&i&&(e=e.replace(l,"")),e};i.exports=c},{"./_defined":29,"./_export":34,"./_fails":36,"./_string-ws":105}],105:[function(e,i,r){i.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},{}],106:[function(e,i,r){var n,t,o,f=e("./_ctx"),a=e("./_invoke"),u=e("./_html"),s=e("./_dom-create"),l=e("./_global"),c=l.process,d=l.setImmediate,b=l.clearImmediate,h=l.MessageChannel,k=0,_={},p="onreadystatechange",v=function(){var e=+this;if(_.hasOwnProperty(e)){var i=_[e];delete _[e],i()}},w=function(e){v.call(e.data)};d&&b||(d=function(e){for(var i=[],r=1;arguments.length>r;)i.push(arguments[r++]);return _[++k]=function(){a("function"==typeof e?e:Function(e),i)},n(k),k},b=function(e){delete _[e]},"process"==e("./_cof")(c)?n=function(e){c.nextTick(f(v,e,1))}:h?(t=new h,o=t.port2,t.port1.onmessage=w,n=f(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",w,!1)):n=p in s("script")?function(e){u.appendChild(s("script"))[p]=function(){u.removeChild(this),v.call(e)}}:function(e){setTimeout(f(v,e,1),0)}),i.exports={set:d,clear:b}},{"./_cof":20,"./_ctx":27,"./_dom-create":31,"./_global":40,"./_html":43,"./_invoke":46}],107:[function(e,i,r){var n=e("./_to-integer"),t=Math.max,o=Math.min;i.exports=function(e,i){return e=n(e),e<0?t(e+i,0):o(e,i)}},{"./_to-integer":108}],108:[function(e,i,r){var n=Math.ceil,t=Math.floor;i.exports=function(e){return isNaN(e=+e)?0:(e>0?t:n)(e)}},{}],109:[function(e,i,r){var n=e("./_iobject"),t=e("./_defined");i.exports=function(e){return n(t(e))}},{"./_defined":29,"./_iobject":47}],110:[function(e,i,r){var n=e("./_to-integer"),t=Math.min;i.exports=function(e){return e>0?t(n(e),9007199254740991):0}},{"./_to-integer":108}],111:[function(e,i,r){var n=e("./_defined");i.exports=function(e){return Object(n(e))}},{"./_defined":29}],112:[function(e,i,r){var n=e("./_is-object");i.exports=function(e,i){if(!n(e))return e;var r,t;if(i&&"function"==typeof(r=e.toString)&&!n(t=r.call(e)))return t;if("function"==typeof(r=e.valueOf)&&!n(t=r.call(e)))return t;if(!i&&"function"==typeof(r=e.toString)&&!n(t=r.call(e)))return t;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],113:[function(e,i,r){"use strict";if(e("./_descriptors")){var n=e("./_library"),t=e("./_global"),o=e("./_fails"),f=e("./_export"),a=e("./_typed"),u=e("./_typed-buffer"),s=e("./_ctx"),l=e("./_an-instance"),c=e("./_property-desc"),d=e("./_hide"),b=e("./_redefine-all"),h=e("./_to-integer"),k=e("./_to-length"),_=e("./_to-index"),p=e("./_to-primitive"),v=e("./_has"),w=e("./_same-value"),m=e("./_classof"),g=e("./_is-object"),y=e("./_to-object"),E=e("./_is-array-iter"),S=e("./_object-create"),O=e("./_object-gpo"),C=e("./_object-gopn").f,A=e("./core.get-iterator-method"),x=e("./_uid"),R=e("./_wks"),F=e("./_array-methods"),M=e("./_array-includes"),T=e("./_species-constructor"),P=e("./es6.array.iterator"),j=e("./_iterators"),L=e("./_iter-detect"),D=e("./_set-species"),N=e("./_array-fill"),I=e("./_array-copy-within"),B=e("./_object-dp"),U=e("./_object-gopd"),H=B.f,z=U.f,G=t.RangeError,V=t.TypeError,Y=t.Uint8Array,W="ArrayBuffer",q="Shared"+W,X="BYTES_PER_ELEMENT",K="prototype",J=Array[K],Z=u.ArrayBuffer,$=u.DataView,Q=F(0),ee=F(2),ie=F(3),re=F(4),ne=F(5),te=F(6),oe=M(!0),fe=M(!1),ae=P.values,ue=P.keys,se=P.entries,le=J.lastIndexOf,ce=J.reduce,de=J.reduceRight,be=J.join,he=J.sort,ke=J.slice,_e=J.toString,pe=J.toLocaleString,ve=R("iterator"),we=R("toStringTag"),me=x("typed_constructor"),ge=x("def_constructor"),ye=a.CONSTR,Ee=a.TYPED,Se=a.VIEW,Oe="Wrong length!",Ce=F(1,function(e,i){return Te(T(e,e[ge]),i)}),Ae=o(function(){return 1===new Y(new Uint16Array([1]).buffer)[0]}),xe=!!Y&&!!Y[K].set&&o(function(){new Y(1).set({})}),Re=function(e,i){if(void 0===e)throw V(Oe);var r=+e,n=k(e);if(i&&!w(r,n))throw G(Oe);return n},Fe=function(e,i){var r=h(e);if(r<0||r%i)throw G("Wrong offset!");return r},Me=function(e){if(g(e)&&Ee in e)return e;throw V(e+" is not a typed array!")},Te=function(e,i){if(!(g(e)&&me in e))throw V("It is not a typed array constructor!");return new e(i)},Pe=function(e,i){return je(T(e,e[ge]),i)},je=function(e,i){for(var r=0,n=i.length,t=Te(e,n);n>r;)t[r]=i[r++];return t},Le=function(e,i,r){H(e,i,{get:function(){return this._d[r]}})},De=function(e){var i,r,n,t,o,f,a=y(e),u=arguments.length,l=u>1?arguments[1]:void 0,c=void 0!==l,d=A(a);if(void 0!=d&&!E(d)){for(f=d.call(a),n=[],i=0;!(o=f.next()).done;i++)n.push(o.value);a=n}for(c&&u>2&&(l=s(l,arguments[2],2)),i=0,r=k(a.length),t=Te(this,r);r>i;i++)t[i]=c?l(a[i],i):a[i];return t},Ne=function(){for(var e=0,i=arguments.length,r=Te(this,i);i>e;)r[e]=arguments[e++];return r},Ie=!!Y&&o(function(){pe.call(new Y(1))}),Be=function(){return pe.apply(Ie?ke.call(Me(this)):Me(this),arguments)},Ue={copyWithin:function(e,i){return I.call(Me(this),e,i,arguments.length>2?arguments[2]:void 0)},every:function(e){return re(Me(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Me(this),arguments)},filter:function(e){return Pe(this,ee(Me(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ne(Me(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return te(Me(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Me(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return fe(Me(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Me(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return be.apply(Me(this),arguments)},lastIndexOf:function(e){return le.apply(Me(this),arguments)},map:function(e){return Ce(Me(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(Me(this),arguments)},reduceRight:function(e){return de.apply(Me(this),arguments)},reverse:function(){for(var e,i=this,r=Me(i).length,n=Math.floor(r/2),t=0;t1?arguments[1]:void 0)},sort:function(e){return he.call(Me(this),e)},subarray:function(e,i){var r=Me(this),n=r.length,t=_(e,n);return new(T(r,r[ge]))(r.buffer,r.byteOffset+t*r.BYTES_PER_ELEMENT,k((void 0===i?n:_(i,n))-t))}},He=function(e,i){return Pe(this,ke.call(Me(this),e,i))},ze=function(e){Me(this);var i=Fe(arguments[1],1),r=this.length,n=y(e),t=k(n.length),o=0;if(t+i>r)throw G(Oe);for(;o255?255:255&n),t.v[h](r*i+t.o,n,Ae)},R=function(e,i){H(e,i,{get:function(){return A(this,i)},set:function(e){return x(this,i,e)},enumerable:!0})};w?(_=r(function(e,r,n,t){l(e,_,s,"_d");var o,f,a,u,c=0,b=0;if(g(r)){if(!(r instanceof Z||(u=m(r))==W||u==q))return Ee in r?je(_,r):De.call(_,r);o=r,b=Fe(n,i);var h=r.byteLength;if(void 0===t){if(h%i)throw G(Oe);if(f=h-b,f<0)throw G(Oe)}else if(f=k(t)*i,f+b>h)throw G(Oe);a=f/i}else a=Re(r,!0),f=a*i,o=new Z(f);for(d(e,"_d",{b:o,o:b,l:f,e:a,v:new $(o)});c>1,l=23===i?R(2,-24)-R(2,-77):0,c=0,d=e<0||0===e&&1/e<0?1:0;for(e=x(e),e!=e||e===C?(t=e!=e?1:0,n=u):(n=F(M(e)/T),e*(o=R(2,-n))<1&&(n--,o*=2),e+=n+s>=1?l/o:l*R(2,1-s),e*o>=2&&(n++,o/=2),n+s>=u?(t=0,n=u):n+s>=1?(t=(e*o-1)*R(2,i),n+=s):(t=e*R(2,s-1)*R(2,i),n=0));i>=8;f[c++]=255&t,t/=256,i-=8);for(n=n<0;f[c++]=255&n,n/=256,a-=8);return f[--c]|=128*d,f},U=function(e,i,r){var n,t=8*r-i-1,o=(1<>1,a=t-7,u=r-1,s=e[u--],l=127&s;for(s>>=7;a>0;l=256*l+e[u],u--,a-=8);for(n=l&(1<<-a)-1,l>>=-a,a+=i;a>0;n=256*n+e[u],u--,a-=8);if(0===l)l=1-f;else{if(l===o)return n?NaN:s?-C:C;n+=R(2,i),l-=f}return(s?-1:1)*n*R(2,l-i)},H=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},z=function(e){return[255&e]},G=function(e){return[255&e,e>>8&255]},V=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Y=function(e){return B(e,52,8)},W=function(e){return B(e,23,4)},q=function(e,i,r){h(e[w],i,{get:function(){return this[r]}})},X=function(e,i,r,n){var t=+r,o=c(t);if(t!=o||o<0||o+i>e[N])throw O(g);var f=e[D]._b,a=o+e[I],u=f.slice(a,a+i);return n?u:u.reverse()},K=function(e,i,r,n,t,o){var f=+r,a=c(f);if(f!=a||a<0||a+i>e[N])throw O(g);for(var u=e[D]._b,s=a+e[I],l=n(+t),d=0;dee;)(Z=Q[ee++])in y||a(y,Z,A[Z]);o||($.constructor=y)}var ie=new E(new y(2)),re=E[w].setInt8;ie.setInt8(0,2147483648),ie.setInt8(1,2147483649),!ie.getInt8(0)&&ie.getInt8(1)||u(E[w],{setInt8:function(e,i){re.call(this,e,i<<24>>24)},setUint8:function(e,i){re.call(this,e,i<<24>>24)}},!0)}else y=function(e){var i=J(this,e);this._b=k.call(Array(i),0),this[N]=i},E=function(e,i,r){l(this,E,v),l(e,y,v);var n=e[N],t=c(i);if(t<0||t>n)throw O("Wrong offset!");if(r=void 0===r?n-t:d(r),t+r>n)throw O(m);this[D]=e,this[I]=t,this[N]=r},t&&(q(y,j,"_l"),q(E,P,"_b"),q(E,j,"_l"),q(E,L,"_o")),u(E[w],{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var i=X(this,2,e,arguments[1]);return(i[1]<<8|i[0])<<16>>16},getUint16:function(e){var i=X(this,2,e,arguments[1]);return i[1]<<8|i[0]},getInt32:function(e){return H(X(this,4,e,arguments[1]))},getUint32:function(e){return H(X(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return U(X(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return U(X(this,8,e,arguments[1]),52,8)},setInt8:function(e,i){K(this,1,e,z,i)},setUint8:function(e,i){K(this,1,e,z,i)},setInt16:function(e,i){K(this,2,e,G,i,arguments[2])},setUint16:function(e,i){K(this,2,e,G,i,arguments[2])},setInt32:function(e,i){K(this,4,e,V,i,arguments[2])},setUint32:function(e,i){K(this,4,e,V,i,arguments[2])},setFloat32:function(e,i){K(this,4,e,W,i,arguments[2])},setFloat64:function(e,i){K(this,8,e,Y,i,arguments[2])}});_(y,p),_(E,v),a(E[w],f.VIEW,!0),r[p]=y,r[v]=E},{"./_an-instance":8,"./_array-fill":11,"./_descriptors":30,"./_fails":36,"./_global":40,"./_hide":42,"./_library":60,"./_object-dp":69,"./_object-gopn":74,"./_redefine-all":88,"./_set-to-string-tag":94,"./_to-integer":108,"./_to-length":110,"./_typed":115}],115:[function(e,i,r){for(var n,t=e("./_global"),o=e("./_hide"),f=e("./_uid"),a=f("typed_array"),u=f("view"),s=!(!t.ArrayBuffer||!t.DataView),l=s,c=0,d=9,b="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");c1?arguments[1]:void 0)}}),e("./_add-to-unscopables")(o)},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":34}],127:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-methods")(5),o="find",f=!0;o in[]&&Array(1)[o](function(){f=!1}),n(n.P+n.F*f,"Array",{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),e("./_add-to-unscopables")(o)},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":34}],128:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-methods")(0),o=e("./_strict-method")([].forEach,!0);n(n.P+n.F*!o,"Array",{forEach:function(e){return t(this,e,arguments[1])}})},{"./_array-methods":14,"./_export":34,"./_strict-method":98}],129:[function(e,i,r){"use strict";var n=e("./_ctx"),t=e("./_export"),o=e("./_to-object"),f=e("./_iter-call"),a=e("./_is-array-iter"),u=e("./_to-length"),s=e("./_create-property"),l=e("./core.get-iterator-method");t(t.S+t.F*!e("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var i,r,t,c,d=o(e),b="function"==typeof this?this:Array,h=arguments.length,k=h>1?arguments[1]:void 0,_=void 0!==k,p=0,v=l(d);if(_&&(k=n(k,h>2?arguments[2]:void 0,2)),void 0==v||b==Array&&a(v))for(i=u(d.length),r=new b(i);i>p;p++)s(r,p,_?k(d[p],p):d[p]);else for(c=v.call(d),r=new b;!(t=c.next()).done;p++)s(r,p,_?f(c,k,[t.value,p],!0):t.value);return r.length=p,r}})},{"./_create-property":26,"./_ctx":27,"./_export":34,"./_is-array-iter":48,"./_iter-call":53,"./_iter-detect":56,"./_to-length":110,"./_to-object":111,"./core.get-iterator-method":120}],130:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-includes")(!1),o=[].indexOf,f=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(f||!e("./_strict-method")(o)),"Array",{indexOf:function(e){return f?o.apply(this,arguments)||0:t(this,e,arguments[1])}})},{"./_array-includes":13,"./_export":34,"./_strict-method":98}],131:[function(e,i,r){var n=e("./_export");n(n.S,"Array",{isArray:e("./_is-array")})},{"./_export":34,"./_is-array":49}],132:[function(e,i,r){"use strict";var n=e("./_add-to-unscopables"),t=e("./_iter-step"),o=e("./_iterators"),f=e("./_to-iobject");i.exports=e("./_iter-define")(Array,"Array",function(e,i){this._t=f(e),this._i=0,this._k=i},function(){var e=this._t,i=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,t(1)):"keys"==i?t(0,r):"values"==i?t(0,e[r]):t(0,[r,e[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":7,"./_iter-define":55,"./_iter-step":57,"./_iterators":58,"./_to-iobject":109}],133:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-iobject"),o=[].join;n(n.P+n.F*(e("./_iobject")!=Object||!e("./_strict-method")(o)),"Array",{join:function(e){return o.call(t(this),void 0===e?",":e)}})},{"./_export":34,"./_iobject":47,"./_strict-method":98,"./_to-iobject":109}],134:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-iobject"),o=e("./_to-integer"),f=e("./_to-length"),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(u||!e("./_strict-method")(a)),"Array",{lastIndexOf:function(e){if(u)return a.apply(this,arguments)||0;var i=t(this),r=f(i.length),n=r-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in i&&i[n]===e)return n||0;return-1}})},{"./_export":34,"./_strict-method":98,"./_to-integer":108,"./_to-iobject":109,"./_to-length":110}],135:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-methods")(1);n(n.P+n.F*!e("./_strict-method")([].map,!0),"Array",{map:function(e){return t(this,e,arguments[1])}})},{"./_array-methods":14,"./_export":34,"./_strict-method":98}],136:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_create-property");n(n.S+n.F*e("./_fails")(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,i=arguments.length,r=new("function"==typeof this?this:Array)(i);i>e;)t(r,e,arguments[e++]);return r.length=i,r}})},{"./_create-property":26,"./_export":34,"./_fails":36}],137:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-reduce");n(n.P+n.F*!e("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(e){return t(this,e,arguments.length,arguments[1],!0)}})},{"./_array-reduce":15,"./_export":34,"./_strict-method":98}],138:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-reduce");n(n.P+n.F*!e("./_strict-method")([].reduce,!0),"Array",{reduce:function(e){return t(this,e,arguments.length,arguments[1],!1)}})},{"./_array-reduce":15,"./_export":34,"./_strict-method":98}],139:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_html"),o=e("./_cof"),f=e("./_to-index"),a=e("./_to-length"),u=[].slice;n(n.P+n.F*e("./_fails")(function(){t&&u.call(t)}),"Array",{slice:function(e,i){var r=a(this.length),n=o(this);if(i=void 0===i?r:i,"Array"==n)return u.call(this,e,i);for(var t=f(e,r),s=f(i,r),l=a(s-t),c=Array(l),d=0;d9?e:"0"+e};n(n.P+n.F*(t(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!t(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,i=e.getUTCFullYear(),r=e.getUTCMilliseconds(),n=i<0?"-":i>9999?"+":"";return n+("00000"+Math.abs(i)).slice(n?-6:-4)+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"."+(r>99?r:"0"+f(r))+"Z"}})},{"./_export":34,"./_fails":36}],145:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-object"),o=e("./_to-primitive");n(n.P+n.F*e("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var i=t(this),r=o(i);return"number"!=typeof r||isFinite(r)?i.toISOString():null}})},{"./_export":34,"./_fails":36,"./_to-object":111,"./_to-primitive":112}],146:[function(e,i,r){var n=e("./_wks")("toPrimitive"),t=Date.prototype;n in t||e("./_hide")(t,n,e("./_date-to-primitive"))},{"./_date-to-primitive":28,"./_hide":42,"./_wks":119}],147:[function(e,i,r){var n=Date.prototype,t="Invalid Date",o="toString",f=n[o],a=n.getTime;new Date(NaN)+""!=t&&e("./_redefine")(n,o,function(){var e=a.call(this);return e===e?f.call(this):t})},{"./_redefine":89}],148:[function(e,i,r){var n=e("./_export");n(n.P,"Function",{bind:e("./_bind")})},{"./_bind":18,"./_export":34}],149:[function(e,i,r){"use strict";var n=e("./_is-object"),t=e("./_object-gpo"),o=e("./_wks")("hasInstance"),f=Function.prototype;o in f||e("./_object-dp").f(f,o,{value:function(e){if("function"!=typeof this||!n(e))return!1;if(!n(this.prototype))return e instanceof this;for(;e=t(e);)if(this.prototype===e)return!0;return!1}})},{"./_is-object":51,"./_object-dp":69,"./_object-gpo":76,"./_wks":119}],150:[function(e,i,r){var n=e("./_object-dp").f,t=e("./_property-desc"),o=e("./_has"),f=Function.prototype,a=/^\s*function ([^ (]*)/,u="name",s=Object.isExtensible||function(){return!0};u in f||e("./_descriptors")&&n(f,u,{configurable:!0,get:function(){try{var e=this,i=(""+e).match(a)[1];return o(e,u)||!s(e)||n(e,u,t(5,i)),i}catch(r){return""}}})},{"./_descriptors":30,"./_has":41,"./_object-dp":69,"./_property-desc":87}],151:[function(e,i,r){"use strict";var n=e("./_collection-strong");i.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var i=n.getEntry(this,e);return i&&i.v},set:function(e,i){return n.def(this,0===e?0:e,i)}},n,!0)},{"./_collection":24,"./_collection-strong":21}],152:[function(e,i,r){var n=e("./_export"),t=e("./_math-log1p"),o=Math.sqrt,f=Math.acosh;n(n.S+n.F*!(f&&710==Math.floor(f(Number.MAX_VALUE))&&f(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:t(e-1+o(e-1)*o(e+1))}})},{"./_export":34,"./_math-log1p":62}],153:[function(e,i,r){function n(e){return isFinite(e=+e)&&0!=e?e<0?-n(-e):Math.log(e+Math.sqrt(e*e+1)):e}var t=e("./_export"),o=Math.asinh;t(t.S+t.F*!(o&&1/o(0)>0),"Math",{asinh:n})},{"./_export":34}],154:[function(e,i,r){var n=e("./_export"),t=Math.atanh;n(n.S+n.F*!(t&&1/t(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},{"./_export":34}],155:[function(e,i,r){var n=e("./_export"),t=e("./_math-sign");n(n.S,"Math",{cbrt:function(e){return t(e=+e)*Math.pow(Math.abs(e),1/3)}})},{"./_export":34,"./_math-sign":63}],156:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},{"./_export":34}],157:[function(e,i,r){var n=e("./_export"),t=Math.exp;n(n.S,"Math",{cosh:function(e){return(t(e=+e)+t(-e))/2}})},{"./_export":34}],158:[function(e,i,r){var n=e("./_export"),t=e("./_math-expm1");n(n.S+n.F*(t!=Math.expm1),"Math",{expm1:t})},{"./_export":34,"./_math-expm1":61}],159:[function(e,i,r){var n=e("./_export"),t=e("./_math-sign"),o=Math.pow,f=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),s=o(2,-126),l=function(e){return e+1/f-1/f};n(n.S,"Math",{fround:function(e){var i,r,n=Math.abs(e),o=t(e);return nu||r!=r?o*(1/0):o*r)}})},{"./_export":34,"./_math-sign":63}],160:[function(e,i,r){var n=e("./_export"),t=Math.abs;n(n.S,"Math",{hypot:function(e,i){for(var r,n,o=0,f=0,a=arguments.length,u=0;f0?(n=r/u,o+=n*n):o+=r;return u===1/0?1/0:u*Math.sqrt(o)}})},{"./_export":34}],161:[function(e,i,r){var n=e("./_export"),t=Math.imul;n(n.S+n.F*e("./_fails")(function(){return t(4294967295,5)!=-5||2!=t.length}),"Math",{imul:function(e,i){var r=65535,n=+e,t=+i,o=r&n,f=r&t;return 0|o*f+((r&n>>>16)*f+o*(r&t>>>16)<<16>>>0)}})},{"./_export":34,"./_fails":36}],162:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},{"./_export":34}],163:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{log1p:e("./_math-log1p")})},{"./_export":34,"./_math-log1p":62}],164:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{"./_export":34}],165:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{sign:e("./_math-sign")})},{"./_export":34,"./_math-sign":63}],166:[function(e,i,r){var n=e("./_export"),t=e("./_math-expm1"),o=Math.exp;n(n.S+n.F*e("./_fails")(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(t(e)-t(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},{"./_export":34,"./_fails":36,"./_math-expm1":61}],167:[function(e,i,r){var n=e("./_export"),t=e("./_math-expm1"),o=Math.exp;n(n.S,"Math",{tanh:function(e){var i=t(e=+e),r=t(-e);return i==1/0?1:r==1/0?-1:(i-r)/(o(e)+o(-e))}})},{"./_export":34,"./_math-expm1":61}],168:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},{"./_export":34}],169:[function(e,i,r){"use strict";var n=e("./_global"),t=e("./_has"),o=e("./_cof"),f=e("./_inherit-if-required"),a=e("./_to-primitive"),u=e("./_fails"),s=e("./_object-gopn").f,l=e("./_object-gopd").f,c=e("./_object-dp").f,d=e("./_string-trim").trim,b="Number",h=n[b],k=h,_=h.prototype,p=o(e("./_object-create")(_))==b,v="trim"in String.prototype,w=function(e){var i=a(e,!1);if("string"==typeof i&&i.length>2){i=v?i.trim():d(i,3);var r,n,t,o=i.charCodeAt(0);if(43===o||45===o){if(r=i.charCodeAt(2),88===r||120===r)return NaN}else if(48===o){switch(i.charCodeAt(1)){case 66:case 98:n=2,t=49;break;case 79:case 111:n=8,t=55;break;default:return+i}for(var f,u=i.slice(2),s=0,l=u.length;st)return NaN;return parseInt(u,n)}}return+i};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var i=arguments.length<1?0:e,r=this;return r instanceof h&&(p?u(function(){_.valueOf.call(r)}):o(r)!=b)?f(new k(w(i)),r,h):w(i)};for(var m,g=e("./_descriptors")?s(k):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),y=0;g.length>y;y++)t(k,m=g[y])&&!t(h,m)&&c(h,m,l(k,m));h.prototype=_,_.constructor=h,e("./_redefine")(n,b,h)}},{"./_cof":20,"./_descriptors":30,"./_fails":36,"./_global":40,"./_has":41,"./_inherit-if-required":45,"./_object-create":68,"./_object-dp":69,"./_object-gopd":72,"./_object-gopn":74,"./_redefine":89,"./_string-trim":104,"./_to-primitive":112}],170:[function(e,i,r){var n=e("./_export");n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":34}],171:[function(e,i,r){var n=e("./_export"),t=e("./_global").isFinite;n(n.S,"Number",{isFinite:function(e){return"number"==typeof e&&t(e)}})},{"./_export":34,"./_global":40}],172:[function(e,i,r){var n=e("./_export");n(n.S,"Number",{isInteger:e("./_is-integer")})},{"./_export":34,"./_is-integer":50}],173:[function(e,i,r){var n=e("./_export");n(n.S,"Number",{isNaN:function(e){return e!=e}})},{"./_export":34}],174:[function(e,i,r){var n=e("./_export"),t=e("./_is-integer"),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(e){return t(e)&&o(e)<=9007199254740991}})},{"./_export":34,"./_is-integer":50}],175:[function(e,i,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":34}],176:[function(e,i,r){var n=e("./_export");n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":34}],177:[function(e,i,r){ -var n=e("./_export"),t=e("./_parse-float");n(n.S+n.F*(Number.parseFloat!=t),"Number",{parseFloat:t})},{"./_export":34,"./_parse-float":83}],178:[function(e,i,r){var n=e("./_export"),t=e("./_parse-int");n(n.S+n.F*(Number.parseInt!=t),"Number",{parseInt:t})},{"./_export":34,"./_parse-int":84}],179:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-integer"),o=e("./_a-number-value"),f=e("./_string-repeat"),a=1..toFixed,u=Math.floor,s=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",c="0",d=function(e,i){for(var r=-1,n=i;++r<6;)n+=e*s[r],s[r]=n%1e7,n=u(n/1e7)},b=function(e){for(var i=6,r=0;--i>=0;)r+=s[i],s[i]=u(r/e),r=r%e*1e7},h=function(){for(var e=6,i="";--e>=0;)if(""!==i||0===e||0!==s[e]){var r=String(s[e]);i=""===i?r:i+f.call(c,7-r.length)+r}return i},k=function(e,i,r){return 0===i?r:i%2===1?k(e,i-1,r*e):k(e*e,i/2,r)},_=function(e){for(var i=0,r=e;r>=4096;)i+=12,r/=4096;for(;r>=2;)i+=1,r/=2;return i};n(n.P+n.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e("./_fails")(function(){a.call({})})),"Number",{toFixed:function(e){var i,r,n,a,u=o(this,l),s=t(e),p="",v=c;if(s<0||s>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(p="-",u=-u),u>1e-21)if(i=_(u*k(2,69,1))-69,r=i<0?u*k(2,-i,1):u/k(2,i,1),r*=4503599627370496,i=52-i,i>0){for(d(0,r),n=s;n>=7;)d(1e7,0),n-=7;for(d(k(10,n,1),0),n=i-1;n>=23;)b(1<<23),n-=23;b(1<0?(a=v.length,v=p+(a<=s?"0."+f.call(c,s-a)+v:v.slice(0,a-s)+"."+v.slice(a-s))):v=p+v,v}})},{"./_a-number-value":6,"./_export":34,"./_fails":36,"./_string-repeat":103,"./_to-integer":108}],180:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_fails"),o=e("./_a-number-value"),f=1..toPrecision;n(n.P+n.F*(t(function(){return"1"!==f.call(1,void 0)})||!t(function(){f.call({})})),"Number",{toPrecision:function(e){var i=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?f.call(i):f.call(i,e)}})},{"./_a-number-value":6,"./_export":34,"./_fails":36}],181:[function(e,i,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":34,"./_object-assign":67}],182:[function(e,i,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":34,"./_object-create":68}],183:[function(e,i,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperties:e("./_object-dps")})},{"./_descriptors":30,"./_export":34,"./_object-dps":70}],184:[function(e,i,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":30,"./_export":34,"./_object-dp":69}],185:[function(e,i,r){var n=e("./_is-object"),t=e("./_meta").onFreeze;e("./_object-sap")("freeze",function(e){return function(i){return e&&n(i)?e(t(i)):i}})},{"./_is-object":51,"./_meta":64,"./_object-sap":80}],186:[function(e,i,r){var n=e("./_to-iobject"),t=e("./_object-gopd").f;e("./_object-sap")("getOwnPropertyDescriptor",function(){return function(e,i){return t(n(e),i)}})},{"./_object-gopd":72,"./_object-sap":80,"./_to-iobject":109}],187:[function(e,i,r){e("./_object-sap")("getOwnPropertyNames",function(){return e("./_object-gopn-ext").f})},{"./_object-gopn-ext":73,"./_object-sap":80}],188:[function(e,i,r){var n=e("./_to-object"),t=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",function(){return function(e){return t(n(e))}})},{"./_object-gpo":76,"./_object-sap":80,"./_to-object":111}],189:[function(e,i,r){var n=e("./_is-object");e("./_object-sap")("isExtensible",function(e){return function(i){return!!n(i)&&(!e||e(i))}})},{"./_is-object":51,"./_object-sap":80}],190:[function(e,i,r){var n=e("./_is-object");e("./_object-sap")("isFrozen",function(e){return function(i){return!n(i)||!!e&&e(i)}})},{"./_is-object":51,"./_object-sap":80}],191:[function(e,i,r){var n=e("./_is-object");e("./_object-sap")("isSealed",function(e){return function(i){return!n(i)||!!e&&e(i)}})},{"./_is-object":51,"./_object-sap":80}],192:[function(e,i,r){var n=e("./_export");n(n.S,"Object",{is:e("./_same-value")})},{"./_export":34,"./_same-value":91}],193:[function(e,i,r){var n=e("./_to-object"),t=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return t(n(e))}})},{"./_object-keys":78,"./_object-sap":80,"./_to-object":111}],194:[function(e,i,r){var n=e("./_is-object"),t=e("./_meta").onFreeze;e("./_object-sap")("preventExtensions",function(e){return function(i){return e&&n(i)?e(t(i)):i}})},{"./_is-object":51,"./_meta":64,"./_object-sap":80}],195:[function(e,i,r){var n=e("./_is-object"),t=e("./_meta").onFreeze;e("./_object-sap")("seal",function(e){return function(i){return e&&n(i)?e(t(i)):i}})},{"./_is-object":51,"./_meta":64,"./_object-sap":80}],196:[function(e,i,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":34,"./_set-proto":92}],197:[function(e,i,r){"use strict";var n=e("./_classof"),t={};t[e("./_wks")("toStringTag")]="z",t+""!="[object z]"&&e("./_redefine")(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},{"./_classof":19,"./_redefine":89,"./_wks":119}],198:[function(e,i,r){var n=e("./_export"),t=e("./_parse-float");n(n.G+n.F*(parseFloat!=t),{parseFloat:t})},{"./_export":34,"./_parse-float":83}],199:[function(e,i,r){var n=e("./_export"),t=e("./_parse-int");n(n.G+n.F*(parseInt!=t),{parseInt:t})},{"./_export":34,"./_parse-int":84}],200:[function(e,i,r){"use strict";var n,t,o,f=e("./_library"),a=e("./_global"),u=e("./_ctx"),s=e("./_classof"),l=e("./_export"),c=e("./_is-object"),d=e("./_a-function"),b=e("./_an-instance"),h=e("./_for-of"),k=e("./_species-constructor"),_=e("./_task").set,p=e("./_microtask")(),v="Promise",w=a.TypeError,m=a.process,g=a[v],m=a.process,y="process"==s(m),E=function(){},S=!!function(){try{var i=g.resolve(1),r=(i.constructor={})[e("./_wks")("species")]=function(e){e(E,E)};return(y||"function"==typeof PromiseRejectionEvent)&&i.then(E)instanceof r}catch(n){}}(),O=function(e,i){return e===i||e===g&&i===o},C=function(e){var i;return!(!c(e)||"function"!=typeof(i=e.then))&&i},A=function(e){return O(g,e)?new x(e):new t(e)},x=t=function(e){var i,r;this.promise=new e(function(e,n){if(void 0!==i||void 0!==r)throw w("Bad Promise constructor");i=e,r=n}),this.resolve=d(i),this.reject=d(r)},R=function(e){try{e()}catch(i){return{error:i}}},F=function(e,i){if(!e._n){e._n=!0;var r=e._c;p(function(){for(var n=e._v,t=1==e._s,o=0,f=function(i){var r,o,f=t?i.ok:i.fail,a=i.resolve,u=i.reject,s=i.domain;try{f?(t||(2==e._h&&P(e),e._h=1),f===!0?r=n:(s&&s.enter(),r=f(n),s&&s.exit()),r===i.promise?u(w("Promise-chain cycle")):(o=C(r))?o.call(r,a,u):a(r)):u(n)}catch(l){u(l)}};r.length>o;)f(r[o++]);e._c=[],e._n=!1,i&&!e._h&&M(e)})}},M=function(e){_.call(a,function(){var i,r,n,t=e._v;if(T(e)&&(i=R(function(){y?m.emit("unhandledRejection",t,e):(r=a.onunhandledrejection)?r({promise:e,reason:t}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",t)}),e._h=y||T(e)?2:1),e._a=void 0,i)throw i.error})},T=function(e){if(1==e._h)return!1;for(var i,r=e._a||e._c,n=0;r.length>n;)if(i=r[n++],i.fail||!T(i.promise))return!1;return!0},P=function(e){_.call(a,function(){var i;y?m.emit("rejectionHandled",e):(i=a.onrejectionhandled)&&i({promise:e,reason:e._v})})},j=function(e){var i=this;i._d||(i._d=!0,i=i._w||i,i._v=e,i._s=2,i._a||(i._a=i._c.slice()),F(i,!0))},L=function(e){var i,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw w("Promise can't be resolved itself");(i=C(e))?p(function(){var n={_w:r,_d:!1};try{i.call(e,u(L,n,1),u(j,n,1))}catch(t){j.call(n,t)}}):(r._v=e,r._s=1,F(r,!1))}catch(n){j.call({_w:r,_d:!1},n)}}};S||(g=function(e){b(this,g,v,"_h"),d(e),n.call(this);try{e(u(L,this,1),u(j,this,1))}catch(i){j.call(this,i)}},n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=e("./_redefine-all")(g.prototype,{then:function(e,i){var r=A(k(this,g));return r.ok="function"!=typeof e||e,r.fail="function"==typeof i&&i,r.domain=y?m.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&F(this,!1),r.promise},"catch":function(e){return this.then(void 0,e)}}),x=function(){var e=new n;this.promise=e,this.resolve=u(L,e,1),this.reject=u(j,e,1)}),l(l.G+l.W+l.F*!S,{Promise:g}),e("./_set-to-string-tag")(g,v),e("./_set-species")(v),o=e("./_core")[v],l(l.S+l.F*!S,v,{reject:function(e){var i=A(this),r=i.reject;return r(e),i.promise}}),l(l.S+l.F*(f||!S),v,{resolve:function(e){if(e instanceof g&&O(e.constructor,this))return e;var i=A(this),r=i.resolve;return r(e),i.promise}}),l(l.S+l.F*!(S&&e("./_iter-detect")(function(e){g.all(e)["catch"](E)})),v,{all:function(e){var i=this,r=A(i),n=r.resolve,t=r.reject,o=R(function(){var r=[],o=0,f=1;h(e,!1,function(e){var a=o++,u=!1;r.push(void 0),f++,i.resolve(e).then(function(e){u||(u=!0,r[a]=e,--f||n(r))},t)}),--f||n(r)});return o&&t(o.error),r.promise},race:function(e){var i=this,r=A(i),n=r.reject,t=R(function(){h(e,!1,function(e){i.resolve(e).then(r.resolve,n)})});return t&&n(t.error),r.promise}})},{"./_a-function":5,"./_an-instance":8,"./_classof":19,"./_core":25,"./_ctx":27,"./_export":34,"./_for-of":39,"./_global":40,"./_is-object":51,"./_iter-detect":56,"./_library":60,"./_microtask":66,"./_redefine-all":88,"./_set-species":93,"./_set-to-string-tag":94,"./_species-constructor":97,"./_task":106,"./_wks":119}],201:[function(e,i,r){var n=e("./_export"),t=e("./_a-function"),o=e("./_an-object"),f=(e("./_global").Reflect||{}).apply,a=Function.apply;n(n.S+n.F*!e("./_fails")(function(){f(function(){})}),"Reflect",{apply:function(e,i,r){var n=t(e),u=o(r);return f?f(n,i,u):a.call(n,i,u)}})},{"./_a-function":5,"./_an-object":9,"./_export":34,"./_fails":36,"./_global":40}],202:[function(e,i,r){var n=e("./_export"),t=e("./_object-create"),o=e("./_a-function"),f=e("./_an-object"),a=e("./_is-object"),u=e("./_fails"),s=e("./_bind"),l=(e("./_global").Reflect||{}).construct,c=u(function(){function e(){}return!(l(function(){},[],e)instanceof e)}),d=!u(function(){l(function(){})});n(n.S+n.F*(c||d),"Reflect",{construct:function(e,i){o(e),f(i);var r=arguments.length<3?e:o(arguments[2]);if(d&&!c)return l(e,i,r);if(e==r){switch(i.length){case 0:return new e;case 1:return new e(i[0]);case 2:return new e(i[0],i[1]);case 3:return new e(i[0],i[1],i[2]);case 4:return new e(i[0],i[1],i[2],i[3])}var n=[null];return n.push.apply(n,i),new(s.apply(e,n))}var u=r.prototype,b=t(a(u)?u:Object.prototype),h=Function.apply.call(e,b,i);return a(h)?h:b}})},{"./_a-function":5,"./_an-object":9,"./_bind":18,"./_export":34,"./_fails":36,"./_global":40,"./_is-object":51,"./_object-create":68}],203:[function(e,i,r){var n=e("./_object-dp"),t=e("./_export"),o=e("./_an-object"),f=e("./_to-primitive");t(t.S+t.F*e("./_fails")(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,i,r){o(e),i=f(i,!0),o(r);try{return n.f(e,i,r),!0}catch(t){return!1}}})},{"./_an-object":9,"./_export":34,"./_fails":36,"./_object-dp":69,"./_to-primitive":112}],204:[function(e,i,r){var n=e("./_export"),t=e("./_object-gopd").f,o=e("./_an-object");n(n.S,"Reflect",{deleteProperty:function(e,i){var r=t(o(e),i);return!(r&&!r.configurable)&&delete e[i]}})},{"./_an-object":9,"./_export":34,"./_object-gopd":72}],205:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_an-object"),o=function(e){this._t=t(e),this._i=0;var i,r=this._k=[];for(i in e)r.push(i)};e("./_iter-create")(o,"Object",function(){var e,i=this,r=i._k;do if(i._i>=r.length)return{value:void 0,done:!0};while(!((e=r[i._i++])in i._t));return{value:e,done:!1}}),n(n.S,"Reflect",{enumerate:function(e){return new o(e)}})},{"./_an-object":9,"./_export":34,"./_iter-create":54}],206:[function(e,i,r){var n=e("./_object-gopd"),t=e("./_export"),o=e("./_an-object");t(t.S,"Reflect",{getOwnPropertyDescriptor:function(e,i){return n.f(o(e),i)}})},{"./_an-object":9,"./_export":34,"./_object-gopd":72}],207:[function(e,i,r){var n=e("./_export"),t=e("./_object-gpo"),o=e("./_an-object");n(n.S,"Reflect",{getPrototypeOf:function(e){return t(o(e))}})},{"./_an-object":9,"./_export":34,"./_object-gpo":76}],208:[function(e,i,r){function n(e,i){var r,a,l=arguments.length<3?e:arguments[2];return s(e)===l?e[i]:(r=t.f(e,i))?f(r,"value")?r.value:void 0!==r.get?r.get.call(l):void 0:u(a=o(e))?n(a,i,l):void 0}var t=e("./_object-gopd"),o=e("./_object-gpo"),f=e("./_has"),a=e("./_export"),u=e("./_is-object"),s=e("./_an-object");a(a.S,"Reflect",{get:n})},{"./_an-object":9,"./_export":34,"./_has":41,"./_is-object":51,"./_object-gopd":72,"./_object-gpo":76}],209:[function(e,i,r){var n=e("./_export");n(n.S,"Reflect",{has:function(e,i){return i in e}})},{"./_export":34}],210:[function(e,i,r){var n=e("./_export"),t=e("./_an-object"),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(e){return t(e),!o||o(e)}})},{"./_an-object":9,"./_export":34}],211:[function(e,i,r){var n=e("./_export");n(n.S,"Reflect",{ownKeys:e("./_own-keys")})},{"./_export":34,"./_own-keys":82}],212:[function(e,i,r){var n=e("./_export"),t=e("./_an-object"),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(e){t(e);try{return o&&o(e),!0}catch(i){return!1}}})},{"./_an-object":9,"./_export":34}],213:[function(e,i,r){var n=e("./_export"),t=e("./_set-proto");t&&n(n.S,"Reflect",{setPrototypeOf:function(e,i){t.check(e,i);try{return t.set(e,i),!0}catch(r){return!1}}})},{"./_export":34,"./_set-proto":92}],214:[function(e,i,r){function n(e,i,r){var u,d,b=arguments.length<4?e:arguments[3],h=o.f(l(e),i);if(!h){if(c(d=f(e)))return n(d,i,r,b);h=s(0)}return a(h,"value")?!(h.writable===!1||!c(b))&&(u=o.f(b,i)||s(0),u.value=r,t.f(b,i,u),!0):void 0!==h.set&&(h.set.call(b,r),!0)}var t=e("./_object-dp"),o=e("./_object-gopd"),f=e("./_object-gpo"),a=e("./_has"),u=e("./_export"),s=e("./_property-desc"),l=e("./_an-object"),c=e("./_is-object");u(u.S,"Reflect",{set:n})},{"./_an-object":9,"./_export":34,"./_has":41,"./_is-object":51,"./_object-dp":69,"./_object-gopd":72,"./_object-gpo":76,"./_property-desc":87}],215:[function(e,i,r){var n=e("./_global"),t=e("./_inherit-if-required"),o=e("./_object-dp").f,f=e("./_object-gopn").f,a=e("./_is-regexp"),u=e("./_flags"),s=n.RegExp,l=s,c=s.prototype,d=/a/g,b=/a/g,h=new s(d)!==d;if(e("./_descriptors")&&(!h||e("./_fails")(function(){return b[e("./_wks")("match")]=!1,s(d)!=d||s(b)==b||"/a/i"!=s(d,"i")}))){s=function(e,i){var r=this instanceof s,n=a(e),o=void 0===i;return!r&&n&&e.constructor===s&&o?e:t(h?new l(n&&!o?e.source:e,i):l((n=e instanceof s)?e.source:e,n&&o?u.call(e):i),r?this:c,s)};for(var k=(function(e){e in s||o(s,e,{configurable:!0,get:function(){return l[e]},set:function(i){l[e]=i}})}),_=f(l),p=0;_.length>p;)k(_[p++]);c.constructor=s,s.prototype=c,e("./_redefine")(n,"RegExp",s)}e("./_set-species")("RegExp")},{"./_descriptors":30,"./_fails":36,"./_flags":38,"./_global":40,"./_inherit-if-required":45,"./_is-regexp":52,"./_object-dp":69,"./_object-gopn":74,"./_redefine":89,"./_set-species":93,"./_wks":119}],216:[function(e,i,r){e("./_descriptors")&&"g"!=/./g.flags&&e("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:e("./_flags")})},{"./_descriptors":30,"./_flags":38,"./_object-dp":69}],217:[function(e,i,r){e("./_fix-re-wks")("match",1,function(e,i,r){return[function(r){"use strict";var n=e(this),t=void 0==r?void 0:r[i];return void 0!==t?t.call(r,n):new RegExp(r)[i](String(n))},r]})},{"./_fix-re-wks":37}],218:[function(e,i,r){e("./_fix-re-wks")("replace",2,function(e,i,r){return[function(n,t){"use strict";var o=e(this),f=void 0==n?void 0:n[i];return void 0!==f?f.call(n,o,t):r.call(String(o),n,t)},r]})},{"./_fix-re-wks":37}],219:[function(e,i,r){e("./_fix-re-wks")("search",1,function(e,i,r){return[function(r){"use strict";var n=e(this),t=void 0==r?void 0:r[i];return void 0!==t?t.call(r,n):new RegExp(r)[i](String(n))},r]})},{"./_fix-re-wks":37}],220:[function(e,i,r){e("./_fix-re-wks")("split",2,function(i,r,n){"use strict";var t=e("./_is-regexp"),o=n,f=[].push,a="split",u="length",s="lastIndex";if("c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[u]||2!="ab"[a](/(?:ab)*/)[u]||4!="."[a](/(.?)(.?)/)[u]||"."[a](/()()/)[u]>1||""[a](/.?/)[u]){var l=void 0===/()??/.exec("")[1];n=function(e,i){var r=String(this);if(void 0===e&&0===i)return[];if(!t(e))return o.call(r,e,i);var n,a,c,d,b,h=[],k=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),_=0,p=void 0===i?4294967295:i>>>0,v=new RegExp(e.source,k+"g");for(l||(n=new RegExp("^"+v.source+"$(?!\\s)",k));(a=v.exec(r))&&(c=a.index+a[0][u],!(c>_&&(h.push(r.slice(_,a.index)),!l&&a[u]>1&&a[0].replace(n,function(){for(b=1;b1&&a.index=p)));)v[s]===a.index&&v[s]++;return _===r[u]?!d&&v.test("")||h.push(""):h.push(r.slice(_)),h[u]>p?h.slice(0,p):h}}else"0"[a](void 0,0)[u]&&(n=function(e,i){return void 0===e&&0===i?[]:o.call(this,e,i)});return[function(e,t){var o=i(this),f=void 0==e?void 0:e[r];return void 0!==f?f.call(e,o,t):n.call(String(o),e,t)},n]})},{"./_fix-re-wks":37,"./_is-regexp":52}],221:[function(e,i,r){"use strict";e("./es6.regexp.flags");var n=e("./_an-object"),t=e("./_flags"),o=e("./_descriptors"),f="toString",a=/./[f],u=function(i){e("./_redefine")(RegExp.prototype,f,i,!0)};e("./_fails")(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?t.call(e):void 0)}):a.name!=f&&u(function(){return a.call(this)})},{"./_an-object":9,"./_descriptors":30,"./_fails":36,"./_flags":38,"./_redefine":89,"./es6.regexp.flags":216}],222:[function(e,i,r){"use strict";var n=e("./_collection-strong");i.exports=e("./_collection")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e=0===e?0:e,e)}},n)},{"./_collection":24,"./_collection-strong":21}],223:[function(e,i,r){"use strict";e("./_string-html")("anchor",function(e){return function(i){return e(this,"a","name",i)}})},{"./_string-html":101}],224:[function(e,i,r){"use strict";e("./_string-html")("big",function(e){return function(){return e(this,"big","","")}})},{"./_string-html":101}],225:[function(e,i,r){"use strict";e("./_string-html")("blink",function(e){return function(){return e(this,"blink","","")}})},{"./_string-html":101}],226:[function(e,i,r){"use strict";e("./_string-html")("bold",function(e){return function(){return e(this,"b","","")}})},{"./_string-html":101}],227:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_string-at")(!1);n(n.P,"String",{codePointAt:function(e){return t(this,e)}})},{"./_export":34,"./_string-at":99}],228:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-length"),o=e("./_string-context"),f="endsWith",a=""[f];n(n.P+n.F*e("./_fails-is-regexp")(f),"String",{endsWith:function(e){var i=o(this,e,f),r=arguments.length>1?arguments[1]:void 0,n=t(i.length),u=void 0===r?n:Math.min(t(r),n),s=String(e);return a?a.call(i,s,u):i.slice(u-s.length,u)===s}})},{"./_export":34,"./_fails-is-regexp":35,"./_string-context":100,"./_to-length":110}],229:[function(e,i,r){"use strict";e("./_string-html")("fixed",function(e){return function(){return e(this,"tt","","")}})},{"./_string-html":101}],230:[function(e,i,r){"use strict";e("./_string-html")("fontcolor",function(e){return function(i){return e(this,"font","color",i)}})},{"./_string-html":101}],231:[function(e,i,r){"use strict";e("./_string-html")("fontsize",function(e){return function(i){return e(this,"font","size",i)}})},{"./_string-html":101}],232:[function(e,i,r){var n=e("./_export"),t=e("./_to-index"),o=String.fromCharCode,f=String.fromCodePoint;n(n.S+n.F*(!!f&&1!=f.length),"String",{fromCodePoint:function(e){for(var i,r=[],n=arguments.length,f=0;n>f;){if(i=+arguments[f++],t(i,1114111)!==i)throw RangeError(i+" is not a valid code point");r.push(i<65536?o(i):o(((i-=65536)>>10)+55296,i%1024+56320))}return r.join("")}})},{"./_export":34,"./_to-index":107}],233:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_string-context"),o="includes";n(n.P+n.F*e("./_fails-is-regexp")(o),"String",{includes:function(e){return!!~t(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},{"./_export":34,"./_fails-is-regexp":35,"./_string-context":100}],234:[function(e,i,r){"use strict";e("./_string-html")("italics",function(e){return function(){return e(this,"i","","")}})},{"./_string-html":101}],235:[function(e,i,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,i=this._t,r=this._i;return r>=i.length?{value:void 0,done:!0}:(e=n(i,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":55,"./_string-at":99}],236:[function(e,i,r){"use strict";e("./_string-html")("link",function(e){return function(i){return e(this,"a","href",i)}})},{"./_string-html":101}],237:[function(e,i,r){var n=e("./_export"),t=e("./_to-iobject"),o=e("./_to-length");n(n.S,"String",{raw:function(e){for(var i=t(e.raw),r=o(i.length),n=arguments.length,f=[],a=0;r>a;)f.push(String(i[a++])),a1?arguments[1]:void 0,i.length)),n=String(e);return a?a.call(i,n,r):i.slice(r,r+n.length)===n}})},{"./_export":34,"./_fails-is-regexp":35,"./_string-context":100,"./_to-length":110}],241:[function(e,i,r){"use strict";e("./_string-html")("strike",function(e){return function(){return e(this,"strike","","")}})},{"./_string-html":101}],242:[function(e,i,r){"use strict";e("./_string-html")("sub",function(e){return function(){return e(this,"sub","","")}})},{"./_string-html":101}],243:[function(e,i,r){"use strict";e("./_string-html")("sup",function(e){return function(){return e(this,"sup","","")}})},{"./_string-html":101}],244:[function(e,i,r){"use strict";e("./_string-trim")("trim",function(e){return function(){return e(this,3)}})},{"./_string-trim":104}],245:[function(e,i,r){"use strict";var n=e("./_global"),t=e("./_has"),o=e("./_descriptors"),f=e("./_export"),a=e("./_redefine"),u=e("./_meta").KEY,s=e("./_fails"),l=e("./_shared"),c=e("./_set-to-string-tag"),d=e("./_uid"),b=e("./_wks"),h=e("./_wks-ext"),k=e("./_wks-define"),_=e("./_keyof"),p=e("./_enum-keys"),v=e("./_is-array"),w=e("./_an-object"),m=e("./_to-iobject"),g=e("./_to-primitive"),y=e("./_property-desc"),E=e("./_object-create"),S=e("./_object-gopn-ext"),O=e("./_object-gopd"),C=e("./_object-dp"),A=e("./_object-keys"),x=O.f,R=C.f,F=S.f,M=n.Symbol,T=n.JSON,P=T&&T.stringify,j="prototype",L=b("_hidden"),D=b("toPrimitive"),N={}.propertyIsEnumerable,I=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),H=Object[j],z="function"==typeof M,G=n.QObject,V=!G||!G[j]||!G[j].findChild,Y=o&&s(function(){return 7!=E(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,i,r){var n=x(H,i);n&&delete H[i],R(e,i,r),n&&e!==H&&R(H,i,n)}:R,W=function(e){var i=B[e]=E(M[j]);return i._k=e,i},q=z&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},X=function(e,i,r){return e===H&&X(U,i,r),w(e),i=g(i,!0),w(r),t(B,i)?(r.enumerable?(t(e,L)&&e[L][i]&&(e[L][i]=!1),r=E(r,{enumerable:y(0,!1)})):(t(e,L)||R(e,L,y(1,{})),e[L][i]=!0),Y(e,i,r)):R(e,i,r)},K=function(e,i){w(e);for(var r,n=p(i=m(i)),t=0,o=n.length;o>t;)X(e,r=n[t++],i[r]);return e},J=function(e,i){return void 0===i?E(e):K(E(e),i)},Z=function(e){var i=N.call(this,e=g(e,!0));return!(this===H&&t(B,e)&&!t(U,e))&&(!(i||!t(this,e)||!t(B,e)||t(this,L)&&this[L][e])||i)},$=function(e,i){if(e=m(e),i=g(i,!0),e!==H||!t(B,i)||t(U,i)){var r=x(e,i);return!r||!t(B,i)||t(e,L)&&e[L][i]||(r.enumerable=!0),r}},Q=function(e){for(var i,r=F(m(e)),n=[],o=0;r.length>o;)t(B,i=r[o++])||i==L||i==u||n.push(i);return n},ee=function(e){for(var i,r=e===H,n=F(r?U:m(e)),o=[],f=0;n.length>f;)!t(B,i=n[f++])||r&&!t(H,i)||o.push(B[i]);return o};z||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),i=function(r){this===H&&i.call(U,r),t(this,L)&&t(this[L],e)&&(this[L][e]=!1),Y(this,e,y(1,r))};return o&&V&&Y(H,e,{configurable:!0,set:i}),W(e)},a(M[j],"toString",function(){return this._k}),O.f=$,C.f=X,e("./_object-gopn").f=S.f=Q,e("./_object-pie").f=Z,e("./_object-gops").f=ee,o&&!e("./_library")&&a(H,"propertyIsEnumerable",Z,!0),h.f=function(e){return W(b(e))}),f(f.G+f.W+f.F*!z,{Symbol:M});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ie.length>re;)b(ie[re++]);for(var ie=A(b.store),re=0;ie.length>re;)k(ie[re++]);f(f.S+f.F*!z,"Symbol",{"for":function(e){return t(I,e+="")?I[e]:I[e]=M(e)},keyFor:function(e){if(q(e))return _(I,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),f(f.S+f.F*!z,"Object",{create:J,defineProperty:X,defineProperties:K,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ee}),T&&f(f.S+f.F*(!z||s(function(){var e=M();return"[null]"!=P([e])||"{}"!=P({a:e})||"{}"!=P(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!q(e)){for(var i,r,n=[e],t=1;arguments.length>t;)n.push(arguments[t++]);return i=n[1],"function"==typeof i&&(r=i),!r&&v(i)||(i=function(e,i){if(r&&(i=r.call(this,e,i)),!q(i))return i}),n[1]=i,P.apply(T,n)}}}),M[j][D]||e("./_hide")(M[j],D,M[j].valueOf),c(M,"Symbol"),c(Math,"Math",!0),c(n.JSON,"JSON",!0)},{"./_an-object":9,"./_descriptors":30,"./_enum-keys":33,"./_export":34,"./_fails":36,"./_global":40,"./_has":41,"./_hide":42,"./_is-array":49,"./_keyof":59,"./_library":60,"./_meta":64,"./_object-create":68,"./_object-dp":69,"./_object-gopd":72,"./_object-gopn":74,"./_object-gopn-ext":73,"./_object-gops":75,"./_object-keys":78,"./_object-pie":79,"./_property-desc":87,"./_redefine":89,"./_set-to-string-tag":94,"./_shared":96,"./_to-iobject":109,"./_to-primitive":112,"./_uid":116,"./_wks":119,"./_wks-define":117,"./_wks-ext":118}],246:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_typed"),o=e("./_typed-buffer"),f=e("./_an-object"),a=e("./_to-index"),u=e("./_to-length"),s=e("./_is-object"),l=e("./_global").ArrayBuffer,c=e("./_species-constructor"),d=o.ArrayBuffer,b=o.DataView,h=t.ABV&&l.isView,k=d.prototype.slice,_=t.VIEW,p="ArrayBuffer";n(n.G+n.W+n.F*(l!==d),{ArrayBuffer:d}),n(n.S+n.F*!t.CONSTR,p,{isView:function(e){return h&&h(e)||s(e)&&_ in e}}),n(n.P+n.U+n.F*e("./_fails")(function(){return!new d(2).slice(1,void 0).byteLength}),p,{slice:function(e,i){if(void 0!==k&&void 0===i)return k.call(f(this),e);for(var r=f(this).byteLength,n=a(e,r),t=a(void 0===i?r:i,r),o=new(c(this,d))(u(t-n)),s=new b(this),l=new b(o),h=0;n0?arguments[0]:void 0)}},k={get:function(e){if(s(e)){var i=l(e);return i===!0?d(this).get(e):i?i[this._i]:void 0}},set:function(e,i){return u.def(this,e,i)}},_=i.exports=e("./_collection")("WeakMap",h,k,u,!0,!0);7!=(new _).set((Object.freeze||Object)(b),7).get(b)&&(n=u.getConstructor(h),a(n.prototype,k),f.NEED=!0,t(["delete","has","get","set"],function(e){var i=_.prototype,r=i[e];o(i,e,function(i,t){if(s(i)&&!c(i)){this._f||(this._f=new n);var o=this._f[e](i,t);return"set"==e?this:o}return r.call(this,i,t)})}))},{"./_array-methods":14,"./_collection":24,"./_collection-weak":23,"./_is-object":51,"./_meta":64,"./_object-assign":67,"./_redefine":89}],258:[function(e,i,r){"use strict";var n=e("./_collection-weak");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{"./_collection":24,"./_collection-weak":23}],259:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_array-includes")(!0);n(n.P,"Array",{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),e("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":7,"./_array-includes":13,"./_export":34}],260:[function(e,i,r){var n=e("./_export"),t=e("./_microtask")(),o=e("./_global").process,f="process"==e("./_cof")(o);n(n.G,{asap:function(e){var i=f&&o.domain;t(i?i.bind(e):e)}})},{"./_cof":20,"./_export":34,"./_global":40,"./_microtask":66}],261:[function(e,i,r){var n=e("./_export"),t=e("./_cof");n(n.S,"Error",{isError:function(e){return"Error"===t(e)}})},{"./_cof":20,"./_export":34}],262:[function(e,i,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":22,"./_export":34}],263:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{iaddh:function(e,i,r,n){var t=e>>>0,o=i>>>0,f=r>>>0;return o+(n>>>0)+((t&f|(t|f)&~(t+f>>>0))>>>31)|0}})},{"./_export":34}],264:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{imulh:function(e,i){var r=65535,n=+e,t=+i,o=n&r,f=t&r,a=n>>16,u=t>>16,s=(a*f>>>0)+(o*f>>>16);return a*u+(s>>16)+((o*u>>>0)+(s&r)>>16)}})},{"./_export":34}],265:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{isubh:function(e,i,r,n){var t=e>>>0,o=i>>>0,f=r>>>0;return o-(n>>>0)-((~t&f|~(t^f)&t-f>>>0)>>>31)|0}})},{"./_export":34}],266:[function(e,i,r){var n=e("./_export");n(n.S,"Math",{umulh:function(e,i){var r=65535,n=+e,t=+i,o=n&r,f=t&r,a=n>>>16,u=t>>>16,s=(a*f>>>0)+(o*f>>>16);return a*u+(s>>>16)+((o*u>>>0)+(s&r)>>>16)}})},{"./_export":34}],267:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-object"),o=e("./_a-function"),f=e("./_object-dp");e("./_descriptors")&&n(n.P+e("./_object-forced-pam"),"Object",{ -__defineGetter__:function(e,i){f.f(t(this),e,{get:o(i),enumerable:!0,configurable:!0})}})},{"./_a-function":5,"./_descriptors":30,"./_export":34,"./_object-dp":69,"./_object-forced-pam":71,"./_to-object":111}],268:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-object"),o=e("./_a-function"),f=e("./_object-dp");e("./_descriptors")&&n(n.P+e("./_object-forced-pam"),"Object",{__defineSetter__:function(e,i){f.f(t(this),e,{set:o(i),enumerable:!0,configurable:!0})}})},{"./_a-function":5,"./_descriptors":30,"./_export":34,"./_object-dp":69,"./_object-forced-pam":71,"./_to-object":111}],269:[function(e,i,r){var n=e("./_export"),t=e("./_object-to-array")(!0);n(n.S,"Object",{entries:function(e){return t(e)}})},{"./_export":34,"./_object-to-array":81}],270:[function(e,i,r){var n=e("./_export"),t=e("./_own-keys"),o=e("./_to-iobject"),f=e("./_object-gopd"),a=e("./_create-property");n(n.S,"Object",{getOwnPropertyDescriptors:function(e){for(var i,r=o(e),n=f.f,u=t(r),s={},l=0;u.length>l;)a(s,i=u[l++],n(r,i));return s}})},{"./_create-property":26,"./_export":34,"./_object-gopd":72,"./_own-keys":82,"./_to-iobject":109}],271:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-object"),o=e("./_to-primitive"),f=e("./_object-gpo"),a=e("./_object-gopd").f;e("./_descriptors")&&n(n.P+e("./_object-forced-pam"),"Object",{__lookupGetter__:function(e){var i,r=t(this),n=o(e,!0);do if(i=a(r,n))return i.get;while(r=f(r))}})},{"./_descriptors":30,"./_export":34,"./_object-forced-pam":71,"./_object-gopd":72,"./_object-gpo":76,"./_to-object":111,"./_to-primitive":112}],272:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_to-object"),o=e("./_to-primitive"),f=e("./_object-gpo"),a=e("./_object-gopd").f;e("./_descriptors")&&n(n.P+e("./_object-forced-pam"),"Object",{__lookupSetter__:function(e){var i,r=t(this),n=o(e,!0);do if(i=a(r,n))return i.set;while(r=f(r))}})},{"./_descriptors":30,"./_export":34,"./_object-forced-pam":71,"./_object-gopd":72,"./_object-gpo":76,"./_to-object":111,"./_to-primitive":112}],273:[function(e,i,r){var n=e("./_export"),t=e("./_object-to-array")(!1);n(n.S,"Object",{values:function(e){return t(e)}})},{"./_export":34,"./_object-to-array":81}],274:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_global"),o=e("./_core"),f=e("./_microtask")(),a=e("./_wks")("observable"),u=e("./_a-function"),s=e("./_an-object"),l=e("./_an-instance"),c=e("./_redefine-all"),d=e("./_hide"),b=e("./_for-of"),h=b.RETURN,k=function(e){return null==e?void 0:u(e)},_=function(e){var i=e._c;i&&(e._c=void 0,i())},p=function(e){return void 0===e._o},v=function(e){p(e)||(e._o=void 0,_(e))},w=function(e,i){s(e),this._c=void 0,this._o=e,e=new m(this);try{var r=i(e),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:u(r),this._c=r)}catch(t){return void e.error(t)}p(this)&&_(this)};w.prototype=c({},{unsubscribe:function(){v(this)}});var m=function(e){this._s=e};m.prototype=c({},{next:function(e){var i=this._s;if(!p(i)){var r=i._o;try{var n=k(r.next);if(n)return n.call(r,e)}catch(t){try{v(i)}finally{throw t}}}},error:function(e){var i=this._s;if(p(i))throw e;var r=i._o;i._o=void 0;try{var n=k(r.error);if(!n)throw e;e=n.call(r,e)}catch(t){try{_(i)}finally{throw t}}return _(i),e},complete:function(e){var i=this._s;if(!p(i)){var r=i._o;i._o=void 0;try{var n=k(r.complete);e=n?n.call(r,e):void 0}catch(t){try{_(i)}finally{throw t}}return _(i),e}}});var g=function(e){l(this,g,"Observable","_f")._f=u(e)};c(g.prototype,{subscribe:function(e){return new w(e,this._f)},forEach:function(e){var i=this;return new(o.Promise||t.Promise)(function(r,n){u(e);var t=i.subscribe({next:function(i){try{return e(i)}catch(r){n(r),t.unsubscribe()}},error:n,complete:r})})}}),c(g,{from:function(e){var i="function"==typeof this?this:g,r=k(s(e)[a]);if(r){var n=s(r.call(e));return n.constructor===i?n:new i(function(e){return n.subscribe(e)})}return new i(function(i){var r=!1;return f(function(){if(!r){try{if(b(e,!1,function(e){if(i.next(e),r)return h})===h)return}catch(n){if(r)throw n;return void i.error(n)}i.complete()}}),function(){r=!0}})},of:function(){for(var e=0,i=arguments.length,r=Array(i);e1?arguments[1]:void 0,!1)}})},{"./_export":34,"./_string-pad":102}],288:[function(e,i,r){"use strict";var n=e("./_export"),t=e("./_string-pad");n(n.P,"String",{padStart:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":34,"./_string-pad":102}],289:[function(e,i,r){"use strict";e("./_string-trim")("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},{"./_string-trim":104}],290:[function(e,i,r){"use strict";e("./_string-trim")("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},{"./_string-trim":104}],291:[function(e,i,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":117}],292:[function(e,i,r){e("./_wks-define")("observable")},{"./_wks-define":117}],293:[function(e,i,r){var n=e("./_export");n(n.S,"System",{global:e("./_global")})},{"./_export":34,"./_global":40}],294:[function(e,i,r){for(var n=e("./es6.array.iterator"),t=e("./_redefine"),o=e("./_global"),f=e("./_hide"),a=e("./_iterators"),u=e("./_wks"),s=u("iterator"),l=u("toStringTag"),c=a.Array,d=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],b=0;b<5;b++){var h,k=d[b],_=o[k],p=_&&_.prototype;if(p){p[s]||f(p,s,c),p[l]||f(p,l,k),a[k]=c;for(h in n)p[h]||t(p,h,n[h],!0)}}},{"./_global":40,"./_hide":42,"./_iterators":58,"./_redefine":89,"./_wks":119,"./es6.array.iterator":132}],295:[function(e,i,r){var n=e("./_export"),t=e("./_task");n(n.G+n.B,{setImmediate:t.set,clearImmediate:t.clear})},{"./_export":34,"./_task":106}],296:[function(e,i,r){var n=e("./_global"),t=e("./_export"),o=e("./_invoke"),f=e("./_partial"),a=n.navigator,u=!!a&&/MSIE .\./.test(a.userAgent),s=function(e){return u?function(i,r){return e(o(f,[].slice.call(arguments,2),"function"==typeof i?i:Function(i)),r)}:e};t(t.G+t.B+t.F*u,{setTimeout:s(n.setTimeout),setInterval:s(n.setInterval)})},{"./_export":34,"./_global":40,"./_invoke":46,"./_partial":85}],297:[function(e,i,r){e("./modules/es6.symbol"),e("./modules/es6.object.create"),e("./modules/es6.object.define-property"),e("./modules/es6.object.define-properties"),e("./modules/es6.object.get-own-property-descriptor"),e("./modules/es6.object.get-prototype-of"),e("./modules/es6.object.keys"),e("./modules/es6.object.get-own-property-names"),e("./modules/es6.object.freeze"),e("./modules/es6.object.seal"),e("./modules/es6.object.prevent-extensions"),e("./modules/es6.object.is-frozen"),e("./modules/es6.object.is-sealed"),e("./modules/es6.object.is-extensible"),e("./modules/es6.object.assign"),e("./modules/es6.object.is"),e("./modules/es6.object.set-prototype-of"),e("./modules/es6.object.to-string"),e("./modules/es6.function.bind"),e("./modules/es6.function.name"),e("./modules/es6.function.has-instance"),e("./modules/es6.parse-int"),e("./modules/es6.parse-float"),e("./modules/es6.number.constructor"),e("./modules/es6.number.to-fixed"),e("./modules/es6.number.to-precision"),e("./modules/es6.number.epsilon"),e("./modules/es6.number.is-finite"),e("./modules/es6.number.is-integer"),e("./modules/es6.number.is-nan"),e("./modules/es6.number.is-safe-integer"),e("./modules/es6.number.max-safe-integer"),e("./modules/es6.number.min-safe-integer"),e("./modules/es6.number.parse-float"),e("./modules/es6.number.parse-int"),e("./modules/es6.math.acosh"),e("./modules/es6.math.asinh"),e("./modules/es6.math.atanh"),e("./modules/es6.math.cbrt"),e("./modules/es6.math.clz32"),e("./modules/es6.math.cosh"),e("./modules/es6.math.expm1"),e("./modules/es6.math.fround"),e("./modules/es6.math.hypot"),e("./modules/es6.math.imul"),e("./modules/es6.math.log10"),e("./modules/es6.math.log1p"),e("./modules/es6.math.log2"),e("./modules/es6.math.sign"),e("./modules/es6.math.sinh"),e("./modules/es6.math.tanh"),e("./modules/es6.math.trunc"),e("./modules/es6.string.from-code-point"),e("./modules/es6.string.raw"),e("./modules/es6.string.trim"),e("./modules/es6.string.iterator"),e("./modules/es6.string.code-point-at"),e("./modules/es6.string.ends-with"),e("./modules/es6.string.includes"),e("./modules/es6.string.repeat"),e("./modules/es6.string.starts-with"),e("./modules/es6.string.anchor"),e("./modules/es6.string.big"),e("./modules/es6.string.blink"),e("./modules/es6.string.bold"),e("./modules/es6.string.fixed"),e("./modules/es6.string.fontcolor"),e("./modules/es6.string.fontsize"),e("./modules/es6.string.italics"),e("./modules/es6.string.link"),e("./modules/es6.string.small"),e("./modules/es6.string.strike"),e("./modules/es6.string.sub"),e("./modules/es6.string.sup"),e("./modules/es6.date.now"),e("./modules/es6.date.to-json"),e("./modules/es6.date.to-iso-string"),e("./modules/es6.date.to-string"),e("./modules/es6.date.to-primitive"),e("./modules/es6.array.is-array"),e("./modules/es6.array.from"),e("./modules/es6.array.of"),e("./modules/es6.array.join"),e("./modules/es6.array.slice"),e("./modules/es6.array.sort"),e("./modules/es6.array.for-each"),e("./modules/es6.array.map"),e("./modules/es6.array.filter"),e("./modules/es6.array.some"),e("./modules/es6.array.every"),e("./modules/es6.array.reduce"),e("./modules/es6.array.reduce-right"),e("./modules/es6.array.index-of"),e("./modules/es6.array.last-index-of"),e("./modules/es6.array.copy-within"),e("./modules/es6.array.fill"),e("./modules/es6.array.find"),e("./modules/es6.array.find-index"),e("./modules/es6.array.species"),e("./modules/es6.array.iterator"),e("./modules/es6.regexp.constructor"),e("./modules/es6.regexp.to-string"),e("./modules/es6.regexp.flags"),e("./modules/es6.regexp.match"),e("./modules/es6.regexp.replace"),e("./modules/es6.regexp.search"),e("./modules/es6.regexp.split"),e("./modules/es6.promise"),e("./modules/es6.map"),e("./modules/es6.set"),e("./modules/es6.weak-map"),e("./modules/es6.weak-set"),e("./modules/es6.typed.array-buffer"),e("./modules/es6.typed.data-view"),e("./modules/es6.typed.int8-array"),e("./modules/es6.typed.uint8-array"),e("./modules/es6.typed.uint8-clamped-array"),e("./modules/es6.typed.int16-array"),e("./modules/es6.typed.uint16-array"),e("./modules/es6.typed.int32-array"),e("./modules/es6.typed.uint32-array"),e("./modules/es6.typed.float32-array"),e("./modules/es6.typed.float64-array"),e("./modules/es6.reflect.apply"),e("./modules/es6.reflect.construct"),e("./modules/es6.reflect.define-property"),e("./modules/es6.reflect.delete-property"),e("./modules/es6.reflect.enumerate"),e("./modules/es6.reflect.get"),e("./modules/es6.reflect.get-own-property-descriptor"),e("./modules/es6.reflect.get-prototype-of"),e("./modules/es6.reflect.has"),e("./modules/es6.reflect.is-extensible"),e("./modules/es6.reflect.own-keys"),e("./modules/es6.reflect.prevent-extensions"),e("./modules/es6.reflect.set"),e("./modules/es6.reflect.set-prototype-of"),e("./modules/es7.array.includes"),e("./modules/es7.string.at"),e("./modules/es7.string.pad-start"),e("./modules/es7.string.pad-end"),e("./modules/es7.string.trim-left"),e("./modules/es7.string.trim-right"),e("./modules/es7.string.match-all"),e("./modules/es7.symbol.async-iterator"),e("./modules/es7.symbol.observable"),e("./modules/es7.object.get-own-property-descriptors"),e("./modules/es7.object.values"),e("./modules/es7.object.entries"),e("./modules/es7.object.define-getter"),e("./modules/es7.object.define-setter"),e("./modules/es7.object.lookup-getter"),e("./modules/es7.object.lookup-setter"),e("./modules/es7.map.to-json"),e("./modules/es7.set.to-json"),e("./modules/es7.system.global"),e("./modules/es7.error.is-error"),e("./modules/es7.math.iaddh"),e("./modules/es7.math.isubh"),e("./modules/es7.math.imulh"),e("./modules/es7.math.umulh"),e("./modules/es7.reflect.define-metadata"),e("./modules/es7.reflect.delete-metadata"),e("./modules/es7.reflect.get-metadata"),e("./modules/es7.reflect.get-metadata-keys"),e("./modules/es7.reflect.get-own-metadata"),e("./modules/es7.reflect.get-own-metadata-keys"),e("./modules/es7.reflect.has-metadata"),e("./modules/es7.reflect.has-own-metadata"),e("./modules/es7.reflect.metadata"),e("./modules/es7.asap"),e("./modules/es7.observable"),e("./modules/web.timers"),e("./modules/web.immediate"),e("./modules/web.dom.iterable"),i.exports=e("./modules/_core")},{"./modules/_core":25,"./modules/es6.array.copy-within":122,"./modules/es6.array.every":123,"./modules/es6.array.fill":124,"./modules/es6.array.filter":125,"./modules/es6.array.find":127,"./modules/es6.array.find-index":126,"./modules/es6.array.for-each":128,"./modules/es6.array.from":129,"./modules/es6.array.index-of":130,"./modules/es6.array.is-array":131,"./modules/es6.array.iterator":132,"./modules/es6.array.join":133,"./modules/es6.array.last-index-of":134,"./modules/es6.array.map":135,"./modules/es6.array.of":136,"./modules/es6.array.reduce":138,"./modules/es6.array.reduce-right":137,"./modules/es6.array.slice":139,"./modules/es6.array.some":140,"./modules/es6.array.sort":141,"./modules/es6.array.species":142,"./modules/es6.date.now":143,"./modules/es6.date.to-iso-string":144,"./modules/es6.date.to-json":145,"./modules/es6.date.to-primitive":146,"./modules/es6.date.to-string":147,"./modules/es6.function.bind":148,"./modules/es6.function.has-instance":149,"./modules/es6.function.name":150,"./modules/es6.map":151,"./modules/es6.math.acosh":152,"./modules/es6.math.asinh":153,"./modules/es6.math.atanh":154,"./modules/es6.math.cbrt":155,"./modules/es6.math.clz32":156,"./modules/es6.math.cosh":157,"./modules/es6.math.expm1":158,"./modules/es6.math.fround":159,"./modules/es6.math.hypot":160,"./modules/es6.math.imul":161,"./modules/es6.math.log10":162,"./modules/es6.math.log1p":163,"./modules/es6.math.log2":164,"./modules/es6.math.sign":165,"./modules/es6.math.sinh":166,"./modules/es6.math.tanh":167,"./modules/es6.math.trunc":168,"./modules/es6.number.constructor":169,"./modules/es6.number.epsilon":170,"./modules/es6.number.is-finite":171,"./modules/es6.number.is-integer":172,"./modules/es6.number.is-nan":173,"./modules/es6.number.is-safe-integer":174,"./modules/es6.number.max-safe-integer":175,"./modules/es6.number.min-safe-integer":176,"./modules/es6.number.parse-float":177,"./modules/es6.number.parse-int":178,"./modules/es6.number.to-fixed":179,"./modules/es6.number.to-precision":180,"./modules/es6.object.assign":181,"./modules/es6.object.create":182,"./modules/es6.object.define-properties":183,"./modules/es6.object.define-property":184,"./modules/es6.object.freeze":185,"./modules/es6.object.get-own-property-descriptor":186,"./modules/es6.object.get-own-property-names":187,"./modules/es6.object.get-prototype-of":188,"./modules/es6.object.is":192,"./modules/es6.object.is-extensible":189,"./modules/es6.object.is-frozen":190,"./modules/es6.object.is-sealed":191,"./modules/es6.object.keys":193,"./modules/es6.object.prevent-extensions":194,"./modules/es6.object.seal":195,"./modules/es6.object.set-prototype-of":196,"./modules/es6.object.to-string":197,"./modules/es6.parse-float":198,"./modules/es6.parse-int":199,"./modules/es6.promise":200,"./modules/es6.reflect.apply":201,"./modules/es6.reflect.construct":202,"./modules/es6.reflect.define-property":203,"./modules/es6.reflect.delete-property":204,"./modules/es6.reflect.enumerate":205,"./modules/es6.reflect.get":208,"./modules/es6.reflect.get-own-property-descriptor":206,"./modules/es6.reflect.get-prototype-of":207,"./modules/es6.reflect.has":209,"./modules/es6.reflect.is-extensible":210,"./modules/es6.reflect.own-keys":211,"./modules/es6.reflect.prevent-extensions":212,"./modules/es6.reflect.set":214,"./modules/es6.reflect.set-prototype-of":213,"./modules/es6.regexp.constructor":215,"./modules/es6.regexp.flags":216,"./modules/es6.regexp.match":217,"./modules/es6.regexp.replace":218,"./modules/es6.regexp.search":219,"./modules/es6.regexp.split":220,"./modules/es6.regexp.to-string":221,"./modules/es6.set":222,"./modules/es6.string.anchor":223,"./modules/es6.string.big":224,"./modules/es6.string.blink":225,"./modules/es6.string.bold":226,"./modules/es6.string.code-point-at":227,"./modules/es6.string.ends-with":228,"./modules/es6.string.fixed":229,"./modules/es6.string.fontcolor":230,"./modules/es6.string.fontsize":231,"./modules/es6.string.from-code-point":232,"./modules/es6.string.includes":233,"./modules/es6.string.italics":234,"./modules/es6.string.iterator":235,"./modules/es6.string.link":236,"./modules/es6.string.raw":237,"./modules/es6.string.repeat":238,"./modules/es6.string.small":239,"./modules/es6.string.starts-with":240,"./modules/es6.string.strike":241,"./modules/es6.string.sub":242,"./modules/es6.string.sup":243,"./modules/es6.string.trim":244,"./modules/es6.symbol":245,"./modules/es6.typed.array-buffer":246,"./modules/es6.typed.data-view":247,"./modules/es6.typed.float32-array":248,"./modules/es6.typed.float64-array":249,"./modules/es6.typed.int16-array":250,"./modules/es6.typed.int32-array":251,"./modules/es6.typed.int8-array":252,"./modules/es6.typed.uint16-array":253,"./modules/es6.typed.uint32-array":254,"./modules/es6.typed.uint8-array":255,"./modules/es6.typed.uint8-clamped-array":256,"./modules/es6.weak-map":257,"./modules/es6.weak-set":258,"./modules/es7.array.includes":259,"./modules/es7.asap":260,"./modules/es7.error.is-error":261,"./modules/es7.map.to-json":262,"./modules/es7.math.iaddh":263,"./modules/es7.math.imulh":264,"./modules/es7.math.isubh":265,"./modules/es7.math.umulh":266,"./modules/es7.object.define-getter":267,"./modules/es7.object.define-setter":268,"./modules/es7.object.entries":269,"./modules/es7.object.get-own-property-descriptors":270,"./modules/es7.object.lookup-getter":271,"./modules/es7.object.lookup-setter":272,"./modules/es7.object.values":273,"./modules/es7.observable":274,"./modules/es7.reflect.define-metadata":275,"./modules/es7.reflect.delete-metadata":276,"./modules/es7.reflect.get-metadata":278,"./modules/es7.reflect.get-metadata-keys":277,"./modules/es7.reflect.get-own-metadata":280,"./modules/es7.reflect.get-own-metadata-keys":279,"./modules/es7.reflect.has-metadata":281,"./modules/es7.reflect.has-own-metadata":282,"./modules/es7.reflect.metadata":283,"./modules/es7.set.to-json":284,"./modules/es7.string.at":285,"./modules/es7.string.match-all":286,"./modules/es7.string.pad-end":287,"./modules/es7.string.pad-start":288,"./modules/es7.string.trim-left":289,"./modules/es7.string.trim-right":290,"./modules/es7.symbol.async-iterator":291,"./modules/es7.symbol.observable":292,"./modules/es7.system.global":293,"./modules/web.dom.iterable":294,"./modules/web.immediate":295,"./modules/web.timers":296}],298:[function(e,i,r){(function(e){!function(e){"use strict";function r(e,i,r,n){var o=i&&i.prototype instanceof t?i:t,f=Object.create(o.prototype),a=new b(n||[]);return f._invoke=s(e,r,a),f}function n(e,i,r){try{return{type:"normal",arg:e.call(i,r)}}catch(n){return{type:"throw",arg:n}}}function t(){}function o(){}function f(){}function a(e){["next","throw","return"].forEach(function(i){e[i]=function(e){return this._invoke(i,e)}})}function u(i){function r(e,t,o,f){var a=n(i[e],i,t);if("throw"!==a.type){var u=a.arg,s=u.value;return s&&"object"==typeof s&&v.call(s,"__await")?Promise.resolve(s.__await).then(function(e){r("next",e,o,f)},function(e){r("throw",e,o,f)}):Promise.resolve(s).then(function(e){u.value=e,o(u)},f)}f(a.arg)}function t(e,i){function n(){return new Promise(function(n,t){r(e,i,n,t)})}return o=o?o.then(n,n):n()}"object"==typeof e.process&&e.process.domain&&(r=e.process.domain.bind(r));var o;this._invoke=t}function s(e,i,r){var t=O;return function(o,f){if(t===A)throw new Error("Generator is already running");if(t===x){if("throw"===o)throw f;return k()}for(r.method=o,r.arg=f;;){var a=r.delegate;if(a){var u=l(a,r);if(u){if(u===R)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(t===O)throw t=x,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);t=A;var s=n(e,i,r);if("normal"===s.type){if(t=r.done?x:C,s.arg===R)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(t=x,r.method="throw",r.arg=s.arg)}}}function l(e,i){var r=e.iterator[i.method];if(r===_){if(i.delegate=null,"throw"===i.method){if(e.iterator["return"]&&(i.method="return",i.arg=_,l(e,i),"throw"===i.method))return R;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return R}var t=n(r,e.iterator,i.arg);if("throw"===t.type)return i.method="throw",i.arg=t.arg,i.delegate=null,R;var o=t.arg;return o?o.done?(i[e.resultName]=o.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=_),i.delegate=null,R):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,R)}function c(e){var i={tryLoc:e[0]};1 in e&&(i.catchLoc=e[1]),2 in e&&(i.finallyLoc=e[2],i.afterLoc=e[3]),this.tryEntries.push(i)}function d(e){var i=e.completion||{};i.type="normal",delete i.arg,e.completion=i}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(c,this),this.reset(!0)}function h(e){if(e){var i=e[m];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var t=this.tryEntries[n],o=t.completion;if("root"===t.tryLoc)return i("end");if(t.tryLoc<=this.prev){var f=v.call(t,"catchLoc"),a=v.call(t,"finallyLoc");if(f&&a){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&v.call(n,"finallyLoc")&&this.prev=0;--i){var r=this.tryEntries[i];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),d(r),R}},"catch":function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var t=n.arg;d(r)}return t}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,r){return this.delegate={iterator:h(e),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=_),R}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],299:[function(e,i,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function t(e){return"function"==typeof e}function o(e){return"number"==typeof e}function f(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}i.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var i,r,n,o,u,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(i=arguments[1],i instanceof Error)throw i;var l=new Error('Uncaught, unspecified "error" event. ('+i+")");throw l.context=i,l}if(r=this._events[e],a(r))return!1;if(t(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(f(r))for(o=Array.prototype.slice.call(arguments,1),s=r.slice(),n=s.length,u=0;u0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,i){function r(){this.removeListener(e,r),n||(n=!0,i.apply(this,arguments))}if(!t(i))throw TypeError("listener must be a function");var n=!1;return r.listener=i,this.on(e,r),this},n.prototype.removeListener=function(e,i){var r,n,o,a;if(!t(i))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===i||t(r.listener)&&r.listener===i)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,i);else if(f(r)){for(a=o;a-- >0;)if(r[a]===i||r[a].listener&&r[a].listener===i){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,i)}return this},n.prototype.removeAllListeners=function(e){ -var i,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(i in this._events)"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],t(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var i;return i=this._events&&this._events[e]?t(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var i=this._events[e];if(t(i))return 1;if(i)return i.length}return 0},n.listenerCount=function(e,i){return e.listenerCount(i)}},{}],300:[function(e,i,r){function n(){throw new Error("setTimeout has not been defined")}function t(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(i){try{return c.call(null,e,0)}catch(i){return c.call(this,e,0)}}}function f(e){if(d===clearTimeout)return clearTimeout(e);if((d===t||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(i){try{return d.call(null,e)}catch(i){return d.call(this,e)}}}function a(){_&&h&&(_=!1,h.length?k=h.concat(k):p=-1,k.length&&u())}function u(){if(!_){var e=o(a);_=!0;for(var i=k.length;i;){for(h=k,k=[];++p1)for(var r=1;r0||this.inTransition)throw new i.FsmError("Previous transition pending",e)}return e},can:function(e){return Boolean(this.events[e][this.current])},cannot:function(e){return!this.can(e)},hasState:function(e){return Boolean(this.states[e])},is:function(e){return e==this.current},isFinal:function(e){return e=e||this.current,o.isArray(this["final"])?o.includes(this["final"],e):this["final"]===e},isValidEvent:function(e){if(this.cannot(e.name))throw new this.factory.FsmError("Invalid event in current state",e);return e},addEvents:function(e){o.forEach(e,function(e){this.addEvent(e)}.bind(this))},addEvent:function(e){return this.events[e.name]=this.events[e.name]||{},this.factory.isConditional(e)?this.addConditionalEvent(e):void this.addBasicEvent(e)},addBasicEvent:function(e){if(o.isArray(e.to))throw new this.factory.FsmError("Ambigous transition",e);e.from=[].concat(e.from||[]),o.forEach(e.from,function(i){this.events[e.name][i]=e.to||i}.bind(this))},addConditionalEvent:function(e){var i,r=this.factory,n=r.callbackPrefix,t=r.noChoiceFound,f=r.pseudoEvent,a=r.Promise;return o.isArray(e.from)?o.forEach(e.from,function(i){this.addConditionalEvent({name:e.name,from:i,to:e.to,condition:e.condition})}.bind(this)):(i=e.from+"__"+e.name,this.pseudoStates[i]=e.from,this.addState(i),this.addEvent({name:e.name,from:e.from,to:i}),this.addEvent({name:f(i,t),from:i,to:e.from}),this.pseudoEvents[f(i,t)]=e.name,o.forEach(e.to,function(r){this.addEvent({name:f(i,r),from:i,to:r}),this.pseudoEvents[f(i,r)]=e.name}.bind(this)),void(this.callbacks[n+"entered"+i]=function(n){var u=this.target;return o.defaults(n,{args:[]}),new a(function(i){i(e.condition(n))}).then(function(a){var s;return o.isNumber(a)?s=e.to[a]:o.includes(e.to,a)&&(s=a),o.isUndefined(s)?u[f(i,t)]().then(function(){throw new r.FsmError("Choice index out of range",e)}):u[f(i,s)].apply(u,n.args)}.bind(this))}.bind(this)))},addState:function(e){var i=this.states;e=[].concat(e||[]),e.forEach(function(e){i[e]=i[e]||{noopTransition:0}})},preprocessPseudoState:function(e,i){var r=this.responses;return Object.defineProperty(i,"res",{get:function(){return r[e]},set:function(i){r[e]=i}}),delete r[e],i},preprocessPseudoEvent:function(e,i){var r=this.pseudoEvents[e],n=this.responses,t=this.pseudoStates,o={name:r,from:t[this.current],to:i.to,args:i.args};return Object.defineProperties(o,{res:{get:function(){return n[r]},set:function(e){n[r]=e}}}),o},buildEvent:function(e){var i=this.callbacks,r=this.pseudoEvents,n=this.pseudoStates,t=this.events,f=this.factory.Type,a=this.factory.callbackPrefix;return function(){function u(e){return e.res||e}function s(e){switch(this.factory.type(e)){case f.NOOP:this.states[this.current].noopTransition+=1;break;default:this.inTransition=!0}return e}function l(e){switch(this.factory.type(e)){case f.NOOP:this.states[this.current].noopTransition-=1;break;default:this.inTransition=!1,this.current=e.to,this.emit("state",this.current)}return e}function c(e){switch(this.factory.type(_)){case f.INTER:this.inTransition=!1;break;case f.NOOP:this.states[this.current].noopTransition>0&&(this.states[this.current].noopTransition-=1)}throw e}var d,b=o.toArray(arguments),h=this.current,k=this.target,_={name:e,from:h,to:t[e][h],args:b},p=r[e];return n[_.to]&&(_=this.preprocessPseudoState(e,_)),p&&(d=this.preprocessPseudoEvent(e,_)),new this.factory.Promise(function(e){e(_)}).then(this.isValidEvent.bind(this)).then(this.canTransition.bind(this)).then(i[a+"leave"+h]?i[a+"leave"+h].bind(k,_):o.identity).then(i.onleave?i.onleave.bind(k,_):o.identity).then(s.bind(this,_)).then(i[a+e]?i[a+e].bind(k,_):o.identity).then(i[a+"enter"+t[e][h]]?i[a+"enter"+t[e][h]].bind(k,p?d:_):o.identity).then(i.onenter?i.onenter.bind(k,p?d:_):o.identity).then(l.bind(this,_)).then(i[a+"entered"+t[e][h]]?i[a+"entered"+t[e][h]].bind(k,p?d:_):o.identity).then(i.onentered?i.onentered.bind(k,p?d:_):o.identity).then(u.bind(this,_))["catch"](c.bind(this))}.bind(this)},initTarget:function(e){var i;return o.isObject(e)||(e=new f),o.isFunction(e.emit)&&(this.emit=function(){return e.emit.apply(e,arguments)}),i=o.mapValues(this.events,function(e,i){return this.buildEvent(i)}.bind(this)),o.assign(e,i,{can:this.can.bind(this),cannot:this.cannot.bind(this),is:this.is.bind(this),hasState:this.hasState.bind(this),isFinal:this.isFinal.bind(this)}),Object.defineProperty(e,"current",{get:function(){return this.current}.bind(this)}),this.target=e,e}},init:function(e,i){this.factory=i.stamp;var r=this.events;return this.events={},o.forEach(r,function(e,i){o.isString(i)&&(e.name=i),this.addEvent(e),this.addState(e.from),this.addState(e.to)}.bind(this)),this.current=this.initial,this.initTarget(i.args[1])}});u=a.compose(u),i.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./fsm-error":301,"es6-promise":303,events:299,lodash:304,stampit:305}],303:[function(e,i,r){(function(n,t){!function(e,n){"object"==typeof r&&"undefined"!=typeof i?i.exports=n():"function"==typeof define&&define.amd?define(n):e.ES6Promise=n()}(this,function(){"use strict";function i(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function o(e){K=e}function f(e){J=e}function a(){return function(){return n.nextTick(d)}}function u(){return"undefined"!=typeof X?function(){X(d)}:c()}function s(){var e=0,i=new Q(d),r=document.createTextNode("");return i.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=d,function(){return e.port2.postMessage(0)}}function c(){var e=setTimeout;return function(){return e(d,1)}}function d(){for(var e=0;e-1}function d(e,i,r){for(var n=-1,t=null==e?0:e.length;++n-1;);return r}function N(e,i){for(var r=e.length;r--&&y(i,e[r],0)>-1;);return r}function I(e,i){for(var r=e.length,n=0;r--;)e[r]===i&&++n;return n}function B(e){return"\\"+Qr[e]}function U(e,i){return null==e?re:e[i]}function H(e){return Vr.test(e)}function z(e){return Yr.test(e)}function G(e){for(var i,r=[];!(i=e.next()).done;)r.push(i.value);return r}function V(e){var i=-1,r=Array(e.size);return e.forEach(function(e,n){r[++i]=[n,e]}),r}function Y(e,i){return function(r){return e(i(r))}}function W(e,i){for(var r=-1,n=e.length,t=0,o=[];++r>>1,Be=[["ary",ye],["bind",ke],["bindKey",_e],["curry",ve],["curryRight",we],["flip",Se],["partial",me],["partialRight",ge],["rearg",Ee]],Ue="[object Arguments]",He="[object Array]",ze="[object AsyncFunction]",Ge="[object Boolean]",Ve="[object Date]",Ye="[object DOMException]",We="[object Error]",qe="[object Function]",Xe="[object GeneratorFunction]",Ke="[object Map]",Je="[object Number]",Ze="[object Null]",$e="[object Object]",Qe="[object Promise]",ei="[object Proxy]",ii="[object RegExp]",ri="[object Set]",ni="[object String]",ti="[object Symbol]",oi="[object Undefined]",fi="[object WeakMap]",ai="[object WeakSet]",ui="[object ArrayBuffer]",si="[object DataView]",li="[object Float32Array]",ci="[object Float64Array]",di="[object Int8Array]",bi="[object Int16Array]",hi="[object Int32Array]",ki="[object Uint8Array]",_i="[object Uint8ClampedArray]",pi="[object Uint16Array]",vi="[object Uint32Array]",wi=/\b__p \+= '';/g,mi=/\b(__p \+=) '' \+/g,gi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yi=/&(?:amp|lt|gt|quot|#39);/g,Ei=/[&<>"']/g,Si=RegExp(yi.source),Oi=RegExp(Ei.source),Ci=/<%-([\s\S]+?)%>/g,Ai=/<%([\s\S]+?)%>/g,xi=/<%=([\s\S]+?)%>/g,Ri=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fi=/^\w*$/,Mi=/^\./,Ti=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pi=/[\\^$.*+?()[\]{}|]/g,ji=RegExp(Pi.source),Li=/^\s+|\s+$/g,Di=/^\s+/,Ni=/\s+$/,Ii=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bi=/\{\n\/\* \[wrapped with (.+)\] \*/,Ui=/,? & /,Hi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zi=/\\(\\)?/g,Gi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vi=/\w*$/,Yi=/^[-+]0x[0-9a-f]+$/i,Wi=/^0b[01]+$/i,qi=/^\[object .+?Constructor\]$/,Xi=/^0o[0-7]+$/i,Ki=/^(?:0|[1-9]\d*)$/,Ji=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zi=/($^)/,$i=/['\n\r\u2028\u2029\\]/g,Qi="\\ud800-\\udfff",er="\\u0300-\\u036f",ir="\\ufe20-\\ufe2f",rr="\\u20d0-\\u20ff",nr=er+ir+rr,tr="\\u2700-\\u27bf",or="a-z\\xdf-\\xf6\\xf8-\\xff",fr="\\xac\\xb1\\xd7\\xf7",ar="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ur="\\u2000-\\u206f",sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lr="A-Z\\xc0-\\xd6\\xd8-\\xde",cr="\\ufe0e\\ufe0f",dr=fr+ar+ur+sr,br="['’]",hr="["+Qi+"]",kr="["+dr+"]",_r="["+nr+"]",pr="\\d+",vr="["+tr+"]",wr="["+or+"]",mr="[^"+Qi+dr+pr+tr+or+lr+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+_r+"|"+gr+")",Er="[^"+Qi+"]",Sr="(?:\\ud83c[\\udde6-\\uddff]){2}",Or="[\\ud800-\\udbff][\\udc00-\\udfff]",Cr="["+lr+"]",Ar="\\u200d",xr="(?:"+wr+"|"+mr+")",Rr="(?:"+Cr+"|"+mr+")",Fr="(?:"+br+"(?:d|ll|m|re|s|t|ve))?",Mr="(?:"+br+"(?:D|LL|M|RE|S|T|VE))?",Tr=yr+"?",Pr="["+cr+"]?",jr="(?:"+Ar+"(?:"+[Er,Sr,Or].join("|")+")"+Pr+Tr+")*",Lr="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Dr="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Nr=Pr+Tr+jr,Ir="(?:"+[vr,Sr,Or].join("|")+")"+Nr,Br="(?:"+[Er+_r+"?",_r,Sr,Or,hr].join("|")+")",Ur=RegExp(br,"g"),Hr=RegExp(_r,"g"),zr=RegExp(gr+"(?="+gr+")|"+Br+Nr,"g"),Gr=RegExp([Cr+"?"+wr+"+"+Fr+"(?="+[kr,Cr,"$"].join("|")+")",Rr+"+"+Mr+"(?="+[kr,Cr+xr,"$"].join("|")+")",Cr+"?"+xr+"+"+Fr,Cr+"+"+Mr,Dr,Lr,pr,Ir].join("|"),"g"),Vr=RegExp("["+Ar+Qi+nr+cr+"]"),Yr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qr=-1,Xr={};Xr[li]=Xr[ci]=Xr[di]=Xr[bi]=Xr[hi]=Xr[ki]=Xr[_i]=Xr[pi]=Xr[vi]=!0,Xr[Ue]=Xr[He]=Xr[ui]=Xr[Ge]=Xr[si]=Xr[Ve]=Xr[We]=Xr[qe]=Xr[Ke]=Xr[Je]=Xr[$e]=Xr[ii]=Xr[ri]=Xr[ni]=Xr[fi]=!1;var Kr={};Kr[Ue]=Kr[He]=Kr[ui]=Kr[si]=Kr[Ge]=Kr[Ve]=Kr[li]=Kr[ci]=Kr[di]=Kr[bi]=Kr[hi]=Kr[Ke]=Kr[Je]=Kr[$e]=Kr[ii]=Kr[ri]=Kr[ni]=Kr[ti]=Kr[ki]=Kr[_i]=Kr[pi]=Kr[vi]=!0,Kr[We]=Kr[qe]=Kr[fi]=!1;var Jr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Zr={"&":"&","<":"<",">":">",'"':""","'":"'"},$r={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},en=parseFloat,rn=parseInt,nn="object"==typeof e&&e&&e.Object===Object&&e,tn="object"==typeof self&&self&&self.Object===Object&&self,on=nn||tn||Function("return this")(),fn="object"==typeof r&&r&&!r.nodeType&&r,an=fn&&"object"==typeof i&&i&&!i.nodeType&&i,un=an&&an.exports===fn,sn=un&&nn.process,ln=function(){try{return sn&&sn.binding&&sn.binding("util")}catch(e){}}(),cn=ln&&ln.isArrayBuffer,dn=ln&&ln.isDate,bn=ln&&ln.isMap,hn=ln&&ln.isRegExp,kn=ln&&ln.isSet,_n=ln&&ln.isTypedArray,pn=C("length"),vn=A(Jr),wn=A(Zr),mn=A($r),gn=function En(e){function i(e){if(lu(e)&&!gd(e)&&!(e instanceof A)){if(e instanceof v)return e;if(gl.call(e,"__wrapped__"))return af(e)}return new v(e)}function r(){}function v(e,i){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=re}function A(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=De,this.__views__=[]}function K(){var e=new A(this.__wrapped__);return e.__actions__=Ut(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ut(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ut(this.__views__),e}function Q(){if(this.__filtered__){var e=new A(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ee(){var e=this.__wrapped__.value(),i=this.__dir__,r=gd(e),n=i<0,t=r?e.length:0,o=Fo(0,t,this.__views__),f=o.start,a=o.end,u=a-f,s=n?a:f-1,l=this.__iteratees__,c=l.length,d=0,b=Zl(u,this.__takeCount__);if(!r||!n&&t==u&&b==u)return gt(e,this.__actions__);var h=[];e:for(;u--&&d-1}function sr(e,i){var r=this.__data__,n=Mr(r,e);return n<0?(++this.size,r.push([e,i])):r[n][1]=i,this}function lr(e){var i=-1,r=null==e?0:e.length;for(this.clear();++i=i?e:i)),e}function Ir(e,i,r,n,t,o){var f,u=i&le,s=i&ce,l=i&de;if(r&&(f=t?r(e,n,t,o):r(e)),f!==re)return f;if(!su(e))return e;var c=gd(e);if(c){if(f=Po(e),!u)return Ut(e,f)}else{var d=Mc(e),b=d==qe||d==Xe;if(Ed(e))return xt(e,u);if(d==$e||d==Ue||b&&!t){if(f=s||b?{}:jo(e),!u)return s?Gt(e,jr(f,e)):zt(e,Pr(f,e))}else{if(!Kr[d])return t?e:{};f=Lo(e,d,Ir,u)}}o||(o=new wr);var h=o.get(e);if(h)return h;o.set(e,f);var k=l?s?yo:go:s?Wu:Yu,_=c?re:k(e);return a(_||e,function(n,t){_&&(t=n,n=e[t]),Fr(f,t,Ir(n,i,r,t,e,o))}),f}function Br(e){var i=Yu(e);return function(r){return zr(r,e,i)}}function zr(e,i,r){var n=r.length;if(null==e)return!n;for(e=dl(e);n--;){var t=r[n],o=i[t],f=e[t];if(f===re&&!(t in e)||!o(f))return!1}return!0}function Gr(e,i,r){if("function"!=typeof e)throw new kl(fe);return jc(function(){e.apply(re,r)},i)}function Vr(e,i,r,n){var t=-1,o=c,f=!0,a=e.length,u=[],s=i.length;if(!a)return u;r&&(i=b(i,P(r))),n?(o=d,f=!1):i.length>=te&&(o=L,f=!1,i=new _r(i));e:for(;++tt?0:t+r),n=n===re||n>t?t:Au(n),n<0&&(n+=t),n=r>n?0:xu(n);r0&&r(a)?i>1?Qr(a,i-1,r,n,t):h(t,a):n||(t[t.length]=a)}return t}function nn(e,i){return e&&gc(e,i,Yu)}function tn(e,i){return e&&yc(e,i,Yu)}function fn(e,i){return l(i,function(i){return fu(e[i])})}function an(e,i){i=Ct(i,e);for(var r=0,n=i.length;null!=e&&ri}function gn(e,i){return null!=e&&gl.call(e,i)}function Sn(e,i){return null!=e&&i in dl(e)}function On(e,i,r){ -return e>=Zl(i,r)&&e=120&&l.length>=120)?new _r(f&&l):re}l=e[0];var h=-1,k=a[0];e:for(;++h-1;)a!==e&&Ll.call(a,u,1),Ll.call(e,u,1);return e}function it(e,i){for(var r=e?i.length:0,n=r-1;r--;){var t=i[r];if(r==n||t!==o){var o=t;Io(t)?Ll.call(e,t,1):vt(e,t)}}return e}function rt(e,i){return e+Vl(ec()*(i-e+1))}function nt(e,i,r,n){for(var t=-1,o=Jl(Gl((i-e)/(r||1)),0),f=al(o);o--;)f[n?o:++t]=e,e+=r;return f}function tt(e,i){var r="";if(!e||i<1||i>Pe)return r;do i%2&&(r+=e),i=Vl(i/2),i&&(e+=e);while(i);return r}function ot(e,i){return Lc(Zo(e,i,Ls),e+"")}function ft(e){return Cr(ts(e))}function at(e,i){var r=ts(e);return nf(r,Nr(i,0,r.length))}function ut(e,i,r,n){if(!su(e))return e;i=Ct(i,e);for(var t=-1,o=i.length,f=o-1,a=e;null!=a&&++tt?0:t+i),r=r>t?t:r,r<0&&(r+=t),t=i>r?0:r-i>>>0,i>>>=0;for(var o=al(t);++n>>1,f=e[o];null!==f&&!gu(f)&&(r?f<=i:f=te){var s=i?null:Ac(e);if(s)return q(s);f=!1,t=L,u=new _r}else u=i?[]:a;e:for(;++n=n?e:lt(e,i,r)}function xt(e,i){if(i)return e.slice();var r=e.length,n=Ml?Ml(r):new e.constructor(r);return e.copy(n),n}function Rt(e){var i=new e.constructor(e.byteLength);return new Fl(i).set(new Fl(e)),i}function Ft(e,i){var r=i?Rt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Mt(e,i,r){var t=i?r(V(e),le):V(e);return k(t,n,new e.constructor)}function Tt(e){var i=new e.constructor(e.source,Vi.exec(e));return i.lastIndex=e.lastIndex,i}function Pt(e,i,r){var n=i?r(q(e),le):q(e);return k(n,t,new e.constructor)}function jt(e){return _c?dl(_c.call(e)):{}}function Lt(e,i){var r=i?Rt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Dt(e,i){if(e!==i){var r=e!==re,n=null===e,t=e===e,o=gu(e),f=i!==re,a=null===i,u=i===i,s=gu(i);if(!a&&!s&&!o&&e>i||o&&f&&u&&!a&&!s||n&&f&&u||!r&&u||!t)return 1;if(!n&&!o&&!s&&e=a)return u;var s=r[n];return u*("desc"==s?-1:1)}}return e.index-i.index}function It(e,i,r,n){for(var t=-1,o=e.length,f=r.length,a=-1,u=i.length,s=Jl(o-f,0),l=al(u+s),c=!n;++a1?r[t-1]:re,f=t>2?r[2]:re;for(o=e.length>3&&"function"==typeof o?(t--,o):re,f&&Bo(r[0],r[1],f)&&(o=t<3?re:o,t=1),i=dl(i);++n-1?t[o?i[f]:f]:re}}function eo(e){return mo(function(i){var r=i.length,n=r,t=v.prototype.thru;for(e&&i.reverse();n--;){var o=i[n];if("function"!=typeof o)throw new kl(fe);if(t&&!f&&"wrapper"==Eo(o))var f=new v([],(!0))}for(n=f?n:r;++n1&&v.reverse(),c&&ua))return!1;var s=o.get(e);if(s&&o.get(i))return s==i;var l=-1,c=!0,d=r&he?new _r:re;for(o.set(e,i),o.set(i,e);++l1?"& ":"")+i[n],i=i.join(r>2?", ":" "),e.replace(Ii,"{\n/* [wrapped with "+i+"] */\n")}function No(e){return gd(e)||md(e)||!!(Dl&&e&&e[Dl])}function Io(e,i){return i=null==i?Pe:i,!!i&&("number"==typeof e||Ki.test(e))&&e>-1&&e%1==0&&e0){if(++i>=Ae)return arguments[0]}else i=0;return e.apply(re,arguments)}}function nf(e,i){var r=-1,n=e.length,t=n-1;for(i=i===re?n:i;++r=this.__values__.length,i=e?re:this.__values__[this.__index__++];return{done:e,value:i}}function aa(){return this}function ua(e){for(var i,n=this;n instanceof r;){var t=af(n);t.__index__=0,t.__values__=re,i?o.__wrapped__=t:i=t;var o=t;n=n.__wrapped__}return o.__wrapped__=e,i}function sa(){var e=this.__wrapped__;if(e instanceof A){var i=e;return this.__actions__.length&&(i=new A(this)),i=i.reverse(),i.__actions__.push({func:na,args:[Pf],thisArg:re}),new v(i,this.__chain__)}return this.thru(Pf)}function la(){return gt(this.__wrapped__,this.__actions__)}function ca(e,i,r){var n=gd(e)?s:Yr;return r&&Bo(e,i,r)&&(i=re),n(e,Oo(i,3))}function da(e,i){var r=gd(e)?l:$r;return r(e,Oo(i,3))}function ba(e,i){return Qr(wa(e,i),1)}function ha(e,i){return Qr(wa(e,i),Te)}function ka(e,i,r){return r=r===re?1:Au(r),Qr(wa(e,i),r)}function _a(e,i){var r=gd(e)?a:wc;return r(e,Oo(i,3))}function pa(e,i){var r=gd(e)?u:mc;return r(e,Oo(i,3))}function va(e,i,r,n){e=Za(e)?e:ts(e),r=r&&!n?Au(r):0;var t=e.length;return r<0&&(r=Jl(t+r,0)),mu(e)?r<=t&&e.indexOf(i,r)>-1:!!t&&y(e,i,r)>-1}function wa(e,i){var r=gd(e)?b:Vn;return r(e,Oo(i,3))}function ma(e,i,r,n){return null==e?[]:(gd(i)||(i=null==i?[]:[i]),r=n?re:r,gd(r)||(r=null==r?[]:[r]),Jn(e,i,r))}function ga(e,i,r){var n=gd(e)?k:x,t=arguments.length<3;return n(e,Oo(i,4),r,t,wc)}function ya(e,i,r){var n=gd(e)?_:x,t=arguments.length<3;return n(e,Oo(i,4),r,t,mc)}function Ea(e,i){var r=gd(e)?l:$r;return r(e,Na(Oo(i,3)))}function Sa(e){var i=gd(e)?Cr:ft;return i(e)}function Oa(e,i,r){i=(r?Bo(e,i,r):i===re)?1:Au(i);var n=gd(e)?Ar:at;return n(e,i)}function Ca(e){var i=gd(e)?xr:st;return i(e)}function Aa(e){if(null==e)return 0;if(Za(e))return mu(e)?Z(e):e.length;var i=Mc(e);return i==Ke||i==ri?e.size:Hn(e).length}function xa(e,i,r){var n=gd(e)?p:ct;return r&&Bo(e,i,r)&&(i=re),n(e,Oo(i,3))}function Ra(e,i){if("function"!=typeof i)throw new kl(fe);return e=Au(e),function(){if(--e<1)return i.apply(this,arguments)}}function Fa(e,i,r){return i=r?re:i,i=e&&null==i?e.length:i,bo(e,ye,re,re,re,re,i)}function Ma(e,i){var r;if("function"!=typeof i)throw new kl(fe);return e=Au(e),function(){return--e>0&&(r=i.apply(this,arguments)),e<=1&&(i=re),r}}function Ta(e,i,r){i=r?re:i;var n=bo(e,ve,re,re,re,re,re,i);return n.placeholder=Ta.placeholder,n}function Pa(e,i,r){i=r?re:i;var n=bo(e,we,re,re,re,re,re,i);return n.placeholder=Pa.placeholder,n}function ja(e,i,r){function n(i){var r=d,n=b;return d=b=re,v=i,k=e.apply(n,r)}function t(e){return v=e,_=jc(a,i),w?n(e):k}function o(e){var r=e-p,n=e-v,t=i-r;return m?Zl(t,h-n):t}function f(e){var r=e-p,n=e-v;return p===re||r>=i||r<0||m&&n>=h}function a(){var e=sd();return f(e)?u(e):void(_=jc(a,o(e)))}function u(e){return _=re,g&&d?n(e):(d=b=re,k)}function s(){_!==re&&Cc(_),v=0,d=p=b=_=re}function l(){return _===re?k:u(sd())}function c(){var e=sd(),r=f(e);if(d=arguments,b=this,p=e,r){if(_===re)return t(p);if(m)return _=jc(a,i),n(p)}return _===re&&(_=jc(a,i)),k}var d,b,h,k,_,p,v=0,w=!1,m=!1,g=!0;if("function"!=typeof e)throw new kl(fe);return i=Ru(i)||0,su(r)&&(w=!!r.leading,m="maxWait"in r,h=m?Jl(Ru(r.maxWait)||0,i):h,g="trailing"in r?!!r.trailing:g),c.cancel=s,c.flush=l,c}function La(e){return bo(e,Se)}function Da(e,i){if("function"!=typeof e||null!=i&&"function"!=typeof i)throw new kl(fe);var r=function(){var n=arguments,t=i?i.apply(this,n):n[0],o=r.cache;if(o.has(t))return o.get(t);var f=e.apply(this,n);return r.cache=o.set(t,f)||o,f};return r.cache=new(Da.Cache||lr),r}function Na(e){if("function"!=typeof e)throw new kl(fe);return function(){var i=arguments;switch(i.length){case 0:return!e.call(this);case 1:return!e.call(this,i[0]);case 2:return!e.call(this,i[0],i[1]);case 3:return!e.call(this,i[0],i[1],i[2])}return!e.apply(this,i)}}function Ia(e){return Ma(2,e)}function Ba(e,i){if("function"!=typeof e)throw new kl(fe);return i=i===re?i:Au(i),ot(e,i)}function Ua(e,i){if("function"!=typeof e)throw new kl(fe);return i=null==i?0:Jl(Au(i),0),ot(function(r){var n=r[i],t=At(r,0,i);return n&&h(t,n),o(e,this,t)})}function Ha(e,i,r){var n=!0,t=!0;if("function"!=typeof e)throw new kl(fe);return su(r)&&(n="leading"in r?!!r.leading:n,t="trailing"in r?!!r.trailing:t),ja(e,i,{leading:n,maxWait:i,trailing:t})}function za(e){return Fa(e,1)}function Ga(e,i){return kd(Ot(i),e)}function Va(){if(!arguments.length)return[];var e=arguments[0];return gd(e)?e:[e]}function Ya(e){return Ir(e,de)}function Wa(e,i){return i="function"==typeof i?i:re,Ir(e,de,i)}function qa(e){return Ir(e,le|de)}function Xa(e,i){return i="function"==typeof i?i:re,Ir(e,le|de,i)}function Ka(e,i){return null==i||zr(e,i,Yu(i))}function Ja(e,i){return e===i||e!==e&&i!==i}function Za(e){return null!=e&&uu(e.length)&&!fu(e)}function $a(e){return lu(e)&&Za(e)}function Qa(e){return e===!0||e===!1||lu(e)&&ln(e)==Ge}function eu(e){return lu(e)&&1===e.nodeType&&!vu(e)}function iu(e){if(null==e)return!0;if(Za(e)&&(gd(e)||"string"==typeof e||"function"==typeof e.splice||Ed(e)||xd(e)||md(e)))return!e.length;var i=Mc(e);if(i==Ke||i==ri)return!e.size;if(Vo(e))return!Hn(e).length;for(var r in e)if(gl.call(e,r))return!1;return!0}function ru(e,i){return Tn(e,i)}function nu(e,i,r){r="function"==typeof r?r:re;var n=r?r(e,i):re;return n===re?Tn(e,i,re,r):!!n}function tu(e){if(!lu(e))return!1;var i=ln(e);return i==We||i==Ye||"string"==typeof e.message&&"string"==typeof e.name&&!vu(e)}function ou(e){return"number"==typeof e&&ql(e)}function fu(e){if(!su(e))return!1;var i=ln(e);return i==qe||i==Xe||i==ze||i==ei}function au(e){return"number"==typeof e&&e==Au(e)}function uu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pe}function su(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}function lu(e){return null!=e&&"object"==typeof e}function cu(e,i){return e===i||Ln(e,i,Ao(i))}function du(e,i,r){return r="function"==typeof r?r:re,Ln(e,i,Ao(i),r)}function bu(e){return pu(e)&&e!=+e}function hu(e){if(Tc(e))throw new sl(oe);return Dn(e)}function ku(e){return null===e}function _u(e){return null==e}function pu(e){return"number"==typeof e||lu(e)&&ln(e)==Je}function vu(e){if(!lu(e)||ln(e)!=$e)return!1;var i=Tl(e);if(null===i)return!0;var r=gl.call(i,"constructor")&&i.constructor;return"function"==typeof r&&r instanceof r&&ml.call(r)==Ol}function wu(e){return au(e)&&e>=-Pe&&e<=Pe}function mu(e){return"string"==typeof e||!gd(e)&&lu(e)&&ln(e)==ni}function gu(e){return"symbol"==typeof e||lu(e)&&ln(e)==ti}function yu(e){return e===re}function Eu(e){return lu(e)&&Mc(e)==fi}function Su(e){return lu(e)&&ln(e)==ai}function Ou(e){if(!e)return[];if(Za(e))return mu(e)?$(e):Ut(e);if(Nl&&e[Nl])return G(e[Nl]());var i=Mc(e),r=i==Ke?V:i==ri?q:ts;return r(e)}function Cu(e){if(!e)return 0===e?e:0;if(e=Ru(e),e===Te||e===-Te){var i=e<0?-1:1;return i*je}return e===e?e:0}function Au(e){var i=Cu(e),r=i%1;return i===i?r?i-r:i:0}function xu(e){return e?Nr(Au(e),0,De):0}function Ru(e){if("number"==typeof e)return e;if(gu(e))return Le;if(su(e)){var i="function"==typeof e.valueOf?e.valueOf():e;e=su(i)?i+"":i}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Li,"");var r=Wi.test(e);return r||Xi.test(e)?rn(e.slice(2),r?2:8):Yi.test(e)?Le:+e}function Fu(e){return Ht(e,Wu(e))}function Mu(e){return e?Nr(Au(e),-Pe,Pe):0===e?e:0}function Tu(e){return null==e?"":_t(e)}function Pu(e,i){var r=vc(e);return null==i?r:Pr(r,i)}function ju(e,i){return m(e,Oo(i,3),nn)}function Lu(e,i){return m(e,Oo(i,3),tn)}function Du(e,i){return null==e?e:gc(e,Oo(i,3),Wu)}function Nu(e,i){return null==e?e:yc(e,Oo(i,3),Wu)}function Iu(e,i){return e&&nn(e,Oo(i,3))}function Bu(e,i){return e&&tn(e,Oo(i,3))}function Uu(e){return null==e?[]:fn(e,Yu(e))}function Hu(e){return null==e?[]:fn(e,Wu(e))}function zu(e,i,r){var n=null==e?re:an(e,i);return n===re?r:n}function Gu(e,i){return null!=e&&To(e,i,gn)}function Vu(e,i){return null!=e&&To(e,i,Sn)}function Yu(e){return Za(e)?Or(e):Hn(e)}function Wu(e){return Za(e)?Or(e,!0):zn(e)}function qu(e,i){ -var r={};return i=Oo(i,3),nn(e,function(e,n,t){Lr(r,i(e,n,t),e)}),r}function Xu(e,i){var r={};return i=Oo(i,3),nn(e,function(e,n,t){Lr(r,n,i(e,n,t))}),r}function Ku(e,i){return Ju(e,Na(Oo(i)))}function Ju(e,i){if(null==e)return{};var r=b(yo(e),function(e){return[e]});return i=Oo(i),$n(e,r,function(e,r){return i(e,r[0])})}function Zu(e,i,r){i=Ct(i,e);var n=-1,t=i.length;for(t||(t=1,e=re);++ni){var n=e;e=i,i=n}if(r||e%1||i%1){var t=ec();return Zl(e+t*(i-e+en("1e-"+((t+"").length-1))),i)}return rt(e,i)}function ss(e){return eb(Tu(e).toLowerCase())}function ls(e){return e=Tu(e),e&&e.replace(Ji,vn).replace(Hr,"")}function cs(e,i,r){e=Tu(e),i=_t(i);var n=e.length;r=r===re?n:Nr(Au(r),0,n);var t=r;return r-=i.length,r>=0&&e.slice(r,t)==i}function ds(e){return e=Tu(e),e&&Oi.test(e)?e.replace(Ei,wn):e}function bs(e){return e=Tu(e),e&&ji.test(e)?e.replace(Pi,"\\$&"):e}function hs(e,i,r){e=Tu(e),i=Au(i);var n=i?Z(e):0;if(!i||n>=i)return e;var t=(i-n)/2;return oo(Vl(t),r)+e+oo(Gl(t),r)}function ks(e,i,r){e=Tu(e),i=Au(i);var n=i?Z(e):0;return i&&n>>0)?(e=Tu(e),e&&("string"==typeof i||null!=i&&!Cd(i))&&(i=_t(i),!i&&H(e))?At($(e),0,r):e.split(i,r)):[]}function gs(e,i,r){return e=Tu(e),r=null==r?0:Nr(Au(r),0,e.length),i=_t(i),e.slice(r,r+i.length)==i}function ys(e,r,n){var t=i.templateSettings;n&&Bo(e,r,n)&&(r=re),e=Tu(e),r=Pd({},r,t,ho);var o,f,a=Pd({},r.imports,t.imports,ho),u=Yu(a),s=j(a,u),l=0,c=r.interpolate||Zi,d="__p += '",b=bl((r.escape||Zi).source+"|"+c.source+"|"+(c===xi?Gi:Zi).source+"|"+(r.evaluate||Zi).source+"|$","g"),h="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++qr+"]")+"\n";e.replace(b,function(i,r,n,t,a,u){return n||(n=t),d+=e.slice(l,u).replace($i,B),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(f=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+i.length,i}),d+="';\n";var k=r.variable;k||(d="with (obj) {\n"+d+"\n}\n"),d=(f?d.replace(wi,""):d).replace(mi,"$1").replace(gi,"$1;"),d="function("+(k||"obj")+") {\n"+(k?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var _=ib(function(){return ll(u,h+"return "+d).apply(re,s)});if(_.source=d,tu(_))throw _;return _}function Es(e){return Tu(e).toLowerCase()}function Ss(e){return Tu(e).toUpperCase()}function Os(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Li,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=$(i),o=D(n,t),f=N(n,t)+1;return At(n,o,f).join("")}function Cs(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Ni,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=N(n,$(i))+1;return At(n,0,t).join("")}function As(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Di,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=D(n,$(i));return At(n,t).join("")}function xs(e,i){var r=Oe,n=Ce;if(su(i)){var t="separator"in i?i.separator:t;r="length"in i?Au(i.length):r,n="omission"in i?_t(i.omission):n}e=Tu(e);var o=e.length;if(H(e)){var f=$(e);o=f.length}if(r>=o)return e;var a=r-Z(n);if(a<1)return n;var u=f?At(f,0,a).join(""):e.slice(0,a);if(t===re)return u+n;if(f&&(a+=u.length-a),Cd(t)){if(e.slice(a).search(t)){var s,l=u;for(t.global||(t=bl(t.source,Tu(Vi.exec(t))+"g")),t.lastIndex=0;s=t.exec(l);)var c=s.index;u=u.slice(0,c===re?a:c)}}else if(e.indexOf(_t(t),a)!=a){var d=u.lastIndexOf(t);d>-1&&(u=u.slice(0,d))}return u+n}function Rs(e){return e=Tu(e),e&&Si.test(e)?e.replace(yi,mn):e}function Fs(e,i,r){return e=Tu(e),i=r?re:i,i===re?z(e)?ie(e):w(e):e.match(i)||[]}function Ms(e){var i=null==e?0:e.length,r=Oo();return e=i?b(e,function(e){if("function"!=typeof e[1])throw new kl(fe);return[r(e[0]),e[1]]}):[],ot(function(r){for(var n=-1;++nPe)return[];var r=De,n=Zl(e,De);i=Oo(i),e-=De;for(var t=M(n,i);++r1?e[i-1]:re;return r="function"==typeof r?(e.pop(),r):re,$f(e,r)}),ed=mo(function(e){var i=e.length,r=i?e[0]:0,n=this.__wrapped__,t=function(i){return Dr(i,e)};return!(i>1||this.__actions__.length)&&n instanceof A&&Io(r)?(n=n.slice(r,+r+(i?1:0)),n.__actions__.push({func:na,args:[t],thisArg:re}),new v(n,this.__chain__).thru(function(e){return i&&!e.length&&e.push(re),e})):this.thru(t)}),id=Vt(function(e,i,r){gl.call(e,r)?++e[r]:Lr(e,r,1)}),rd=Qt(_f),nd=Qt(pf),td=Vt(function(e,i,r){gl.call(e,r)?e[r].push(i):Lr(e,r,[i])}),od=ot(function(e,i,r){var n=-1,t="function"==typeof i,f=Za(e)?al(e.length):[];return wc(e,function(e){f[++n]=t?o(i,e,r):xn(e,i,r)}),f}),fd=Vt(function(e,i,r){Lr(e,r,i)}),ad=Vt(function(e,i,r){e[r?0:1].push(i)},function(){return[[],[]]}),ud=ot(function(e,i){if(null==e)return[];var r=i.length;return r>1&&Bo(e,i[0],i[1])?i=[]:r>2&&Bo(i[0],i[1],i[2])&&(i=[i[0]]),Jn(e,Qr(i,1),[])}),sd=Hl||function(){return on.Date.now()},ld=ot(function(e,i,r){var n=ke;if(r.length){var t=W(r,So(ld));n|=me}return bo(e,n,i,r,t)}),cd=ot(function(e,i,r){var n=ke|_e;if(r.length){var t=W(r,So(cd));n|=me}return bo(i,n,e,r,t)}),dd=ot(function(e,i){return Gr(e,1,i)}),bd=ot(function(e,i,r){return Gr(e,Ru(i)||0,r)});Da.Cache=lr;var hd=Oc(function(e,i){i=1==i.length&&gd(i[0])?b(i[0],P(Oo())):b(Qr(i,1),P(Oo()));var r=i.length;return ot(function(n){for(var t=-1,f=Zl(n.length,r);++t=i}),md=Rn(function(){return arguments}())?Rn:function(e){return lu(e)&&gl.call(e,"callee")&&!jl.call(e,"callee")},gd=al.isArray,yd=cn?P(cn):Fn,Ed=Wl||Ws,Sd=dn?P(dn):Mn,Od=bn?P(bn):jn,Cd=hn?P(hn):Nn,Ad=kn?P(kn):In,xd=_n?P(_n):Bn,Rd=uo(Gn),Fd=uo(function(e,i){return e<=i}),Md=Yt(function(e,i){if(Vo(i)||Za(i))return void Ht(i,Yu(i),e);for(var r in i)gl.call(i,r)&&Fr(e,r,i[r])}),Td=Yt(function(e,i){Ht(i,Wu(i),e)}),Pd=Yt(function(e,i,r,n){Ht(i,Wu(i),e,n)}),jd=Yt(function(e,i,r,n){Ht(i,Yu(i),e,n)}),Ld=mo(Dr),Dd=ot(function(e){return e.push(re,ho),o(Pd,re,e)}),Nd=ot(function(e){return e.push(re,ko),o(zd,re,e)}),Id=ro(function(e,i,r){e[i]=r},Ps(Ls)),Bd=ro(function(e,i,r){gl.call(e,i)?e[i].push(r):e[i]=[r]},Oo),Ud=ot(xn),Hd=Yt(function(e,i,r){qn(e,i,r)}),zd=Yt(function(e,i,r,n){qn(e,i,r,n)}),Gd=mo(function(e,i){var r={};if(null==e)return r;var n=!1;i=b(i,function(i){return i=Ct(i,e),n||(n=i.length>1),i}),Ht(e,yo(e),r),n&&(r=Ir(r,le|ce|de,_o));for(var t=i.length;t--;)vt(r,i[t]);return r}),Vd=mo(function(e,i){return null==e?{}:Zn(e,i)}),Yd=co(Yu),Wd=co(Wu),qd=Jt(function(e,i,r){return i=i.toLowerCase(),e+(r?ss(i):i)}),Xd=Jt(function(e,i,r){return e+(r?"-":"")+i.toLowerCase()}),Kd=Jt(function(e,i,r){return e+(r?" ":"")+i.toLowerCase()}),Jd=Kt("toLowerCase"),Zd=Jt(function(e,i,r){return e+(r?"_":"")+i.toLowerCase()}),$d=Jt(function(e,i,r){return e+(r?" ":"")+eb(i)}),Qd=Jt(function(e,i,r){return e+(r?" ":"")+i.toUpperCase()}),eb=Kt("toUpperCase"),ib=ot(function(e,i){try{return o(e,re,i)}catch(r){return tu(r)?r:new sl(r)}}),rb=mo(function(e,i){return a(i,function(i){i=tf(i),Lr(e,i,ld(e[i],e))}),e}),nb=eo(),tb=eo(!0),ob=ot(function(e,i){return function(r){return xn(r,e,i)}}),fb=ot(function(e,i){return function(r){return xn(e,r,i)}}),ab=to(b),ub=to(s),sb=to(p),lb=ao(),cb=ao(!0),db=no(function(e,i){return e+i},0),bb=lo("ceil"),hb=no(function(e,i){return e/i},1),kb=lo("floor"),_b=no(function(e,i){return e*i},1),pb=lo("round"),vb=no(function(e,i){return e-i},0);return i.after=Ra,i.ary=Fa,i.assign=Md,i.assignIn=Td,i.assignInWith=Pd,i.assignWith=jd,i.at=Ld,i.before=Ma,i.bind=ld,i.bindAll=rb,i.bindKey=cd,i.castArray=Va,i.chain=ia,i.chunk=uf,i.compact=sf,i.concat=lf,i.cond=Ms,i.conforms=Ts,i.constant=Ps,i.countBy=id,i.create=Pu,i.curry=Ta,i.curryRight=Pa,i.debounce=ja,i.defaults=Dd,i.defaultsDeep=Nd,i.defer=dd,i.delay=bd,i.difference=Nc,i.differenceBy=Ic,i.differenceWith=Bc,i.drop=cf,i.dropRight=df,i.dropRightWhile=bf,i.dropWhile=hf,i.fill=kf,i.filter=da,i.flatMap=ba,i.flatMapDeep=ha,i.flatMapDepth=ka,i.flatten=vf,i.flattenDeep=wf,i.flattenDepth=mf,i.flip=La,i.flow=nb,i.flowRight=tb,i.fromPairs=gf,i.functions=Uu,i.functionsIn=Hu,i.groupBy=td,i.initial=Sf,i.intersection=Uc,i.intersectionBy=Hc,i.intersectionWith=zc,i.invert=Id,i.invertBy=Bd,i.invokeMap=od,i.iteratee=Ds,i.keyBy=fd,i.keys=Yu,i.keysIn=Wu,i.map=wa,i.mapKeys=qu,i.mapValues=Xu,i.matches=Ns,i.matchesProperty=Is,i.memoize=Da,i.merge=Hd,i.mergeWith=zd,i.method=ob,i.methodOf=fb,i.mixin=Bs,i.negate=Na,i.nthArg=zs,i.omit=Gd,i.omitBy=Ku,i.once=Ia,i.orderBy=ma,i.over=ab,i.overArgs=hd,i.overEvery=ub,i.overSome=sb,i.partial=kd,i.partialRight=_d,i.partition=ad,i.pick=Vd,i.pickBy=Ju,i.property=Gs,i.propertyOf=Vs,i.pull=Gc,i.pullAll=Rf,i.pullAllBy=Ff,i.pullAllWith=Mf,i.pullAt=Vc,i.range=lb,i.rangeRight=cb,i.rearg=pd,i.reject=Ea,i.remove=Tf,i.rest=Ba,i.reverse=Pf,i.sampleSize=Oa,i.set=$u,i.setWith=Qu,i.shuffle=Ca,i.slice=jf,i.sortBy=ud,i.sortedUniq=Hf,i.sortedUniqBy=zf,i.split=ms,i.spread=Ua,i.tail=Gf,i.take=Vf,i.takeRight=Yf,i.takeRightWhile=Wf,i.takeWhile=qf,i.tap=ra,i.throttle=Ha,i.thru=na,i.toArray=Ou,i.toPairs=Yd,i.toPairsIn=Wd,i.toPath=Zs,i.toPlainObject=Fu,i.transform=es,i.unary=za,i.union=Yc,i.unionBy=Wc,i.unionWith=qc,i.uniq=Xf,i.uniqBy=Kf,i.uniqWith=Jf,i.unset=is,i.unzip=Zf,i.unzipWith=$f,i.update=rs,i.updateWith=ns,i.values=ts,i.valuesIn=os,i.without=Xc,i.words=Fs,i.wrap=Ga,i.xor=Kc,i.xorBy=Jc,i.xorWith=Zc,i.zip=$c,i.zipObject=Qf,i.zipObjectDeep=ea,i.zipWith=Qc,i.entries=Yd,i.entriesIn=Wd,i.extend=Td,i.extendWith=Pd,Bs(i,i),i.add=db,i.attempt=ib,i.camelCase=qd,i.capitalize=ss,i.ceil=bb,i.clamp=fs,i.clone=Ya,i.cloneDeep=qa,i.cloneDeepWith=Xa,i.cloneWith=Wa,i.conformsTo=Ka,i.deburr=ls,i.defaultTo=js,i.divide=hb,i.endsWith=cs,i.eq=Ja,i.escape=ds,i.escapeRegExp=bs,i.every=ca,i.find=rd,i.findIndex=_f,i.findKey=ju,i.findLast=nd,i.findLastIndex=pf,i.findLastKey=Lu,i.floor=kb,i.forEach=_a,i.forEachRight=pa,i.forIn=Du,i.forInRight=Nu,i.forOwn=Iu,i.forOwnRight=Bu,i.get=zu,i.gt=vd,i.gte=wd,i.has=Gu,i.hasIn=Vu,i.head=yf,i.identity=Ls,i.includes=va,i.indexOf=Ef,i.inRange=as,i.invoke=Ud,i.isArguments=md,i.isArray=gd,i.isArrayBuffer=yd,i.isArrayLike=Za,i.isArrayLikeObject=$a,i.isBoolean=Qa,i.isBuffer=Ed,i.isDate=Sd,i.isElement=eu,i.isEmpty=iu,i.isEqual=ru,i.isEqualWith=nu,i.isError=tu,i.isFinite=ou,i.isFunction=fu,i.isInteger=au,i.isLength=uu,i.isMap=Od,i.isMatch=cu,i.isMatchWith=du,i.isNaN=bu,i.isNative=hu,i.isNil=_u,i.isNull=ku,i.isNumber=pu,i.isObject=su,i.isObjectLike=lu,i.isPlainObject=vu,i.isRegExp=Cd,i.isSafeInteger=wu,i.isSet=Ad,i.isString=mu,i.isSymbol=gu,i.isTypedArray=xd,i.isUndefined=yu,i.isWeakMap=Eu,i.isWeakSet=Su,i.join=Of,i.kebabCase=Xd,i.last=Cf,i.lastIndexOf=Af,i.lowerCase=Kd,i.lowerFirst=Jd,i.lt=Rd,i.lte=Fd,i.max=Qs,i.maxBy=el,i.mean=il,i.meanBy=rl,i.min=nl,i.minBy=tl,i.stubArray=Ys,i.stubFalse=Ws,i.stubObject=qs,i.stubString=Xs,i.stubTrue=Ks,i.multiply=_b,i.nth=xf,i.noConflict=Us,i.noop=Hs,i.now=sd,i.pad=hs,i.padEnd=ks,i.padStart=_s,i.parseInt=ps,i.random=us,i.reduce=ga,i.reduceRight=ya,i.repeat=vs,i.replace=ws,i.result=Zu,i.round=pb,i.runInContext=En,i.sample=Sa,i.size=Aa,i.snakeCase=Zd,i.some=xa,i.sortedIndex=Lf,i.sortedIndexBy=Df,i.sortedIndexOf=Nf,i.sortedLastIndex=If,i.sortedLastIndexBy=Bf,i.sortedLastIndexOf=Uf,i.startCase=$d,i.startsWith=gs,i.subtract=vb,i.sum=ol,i.sumBy=fl,i.template=ys,i.times=Js,i.toFinite=Cu,i.toInteger=Au,i.toLength=xu,i.toLower=Es,i.toNumber=Ru,i.toSafeInteger=Mu,i.toString=Tu,i.toUpper=Ss,i.trim=Os,i.trimEnd=Cs,i.trimStart=As,i.truncate=xs,i.unescape=Rs,i.uniqueId=$s,i.upperCase=Qd,i.upperFirst=eb,i.each=_a,i.eachRight=pa,i.first=yf,Bs(i,function(){var e={};return nn(i,function(r,n){gl.call(i.prototype,n)||(e[n]=r)}),e}(),{chain:!1}),i.VERSION=ne,a(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){i[e].placeholder=i}),a(["drop","take"],function(e,i){A.prototype[e]=function(r){r=r===re?1:Jl(Au(r),0);var n=this.__filtered__&&!i?new A(this):this.clone();return n.__filtered__?n.__takeCount__=Zl(r,n.__takeCount__):n.__views__.push({size:Zl(r,De),type:e+(n.__dir__<0?"Right":"")}),n},A.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),a(["filter","map","takeWhile"],function(e,i){var r=i+1,n=r==Re||r==Me;A.prototype[e]=function(e){var i=this.clone();return i.__iteratees__.push({iteratee:Oo(e,3),type:r}),i.__filtered__=i.__filtered__||n,i}}),a(["head","last"],function(e,i){var r="take"+(i?"Right":"");A.prototype[e]=function(){return this[r](1).value()[0]}}),a(["initial","tail"],function(e,i){var r="drop"+(i?"":"Right");A.prototype[e]=function(){return this.__filtered__?new A(this):this[r](1)}}),A.prototype.compact=function(){return this.filter(Ls)},A.prototype.find=function(e){return this.filter(e).head()},A.prototype.findLast=function(e){return this.reverse().find(e)},A.prototype.invokeMap=ot(function(e,i){return"function"==typeof e?new A(this):this.map(function(r){return xn(r,e,i)})}),A.prototype.reject=function(e){return this.filter(Na(Oo(e)))},A.prototype.slice=function(e,i){e=Au(e);var r=this;return r.__filtered__&&(e>0||i<0)?new A(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),i!==re&&(i=Au(i),r=i<0?r.dropRight(-i):r.take(i-e)),r)},A.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},A.prototype.toArray=function(){return this.take(De)},nn(A.prototype,function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),t=/^(?:head|last)$/.test(r),o=i[t?"take"+("last"==r?"Right":""):r],f=t||/^find/.test(r);o&&(i.prototype[r]=function(){var r=this.__wrapped__,a=t?[1]:arguments,u=r instanceof A,s=a[0],l=u||gd(r),c=function(e){var r=o.apply(i,h([e],a));return t&&d?r[0]:r};l&&n&&"function"==typeof s&&1!=s.length&&(u=l=!1);var d=this.__chain__,b=!!this.__actions__.length,k=f&&!d,_=u&&!b;if(!f&&l){r=_?r:new A(this);var p=e.apply(r,a);return p.__actions__.push({func:na,args:[c],thisArg:re}),new v(p,d)}return k&&_?e.apply(this,a):(p=this.thru(c),k?t?p.value()[0]:p.value():p)})}),a(["pop","push","shift","sort","splice","unshift"],function(e){var r=_l[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",t=/^(?:pop|shift)$/.test(e);i.prototype[e]=function(){var e=arguments;if(t&&!this.__chain__){var i=this.value();return r.apply(gd(i)?i:[],e)}return this[n](function(i){return r.apply(gd(i)?i:[],e)})}}),nn(A.prototype,function(e,r){var n=i[r];if(n){var t=n.name+"",o=sc[t]||(sc[t]=[]);o.push({name:r,func:n})}}),sc[io(re,_e).name]=[{name:"wrapper",func:re}],A.prototype.clone=K,A.prototype.reverse=Q,A.prototype.value=ee,i.prototype.at=ed,i.prototype.chain=ta,i.prototype.commit=oa,i.prototype.next=fa,i.prototype.plant=ua,i.prototype.reverse=sa,i.prototype.toJSON=i.prototype.valueOf=i.prototype.value=la,i.prototype.first=i.prototype.head,Nl&&(i.prototype[Nl]=aa),i},yn=gn();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(on._=yn,define(function(){return yn})):an?((an.exports=yn)._=yn,fn._=yn):on._=yn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],305:[function(e,i,r){"use strict";function n(e,i){if(void 0===i)return e;if(E(i))return(E(e)?e:[]).concat(i);if(!f(i))return i;for(var r=o(e)?e:{},t=Object.keys(i),a=0;a0;)n[o]=arguments[o+1];var f=Object.create(e.methods||null);if(g(f,e.deepProperties),y(f,e.properties),Object.defineProperties(f,e.propertyDescriptors||{}),!e.initializers||0===e.initializers.length)return f;void 0===r&&(r={});for(var a=e.initializers,u=a.length,s=0;s0){for(var a=[],u=0;u0;)i[r]=arguments[r+1];return i.reduce(n,e)},y=Object.assign,E=Array.isArray,S=Array.prototype.concat,O=function(e){void 0===e&&(e={});var i=e.methods,r=e.properties,n=e.props,t=e.refs,f=e.initializers,s=e.init,l=e.composers,c=e.deepProperties,d=e.deepProps,b=e.propertyDescriptors,h=e.staticProperties,k=e.statics,_=e.staticDeepProperties,p=e.deepStatics,v=e.staticPropertyDescriptors,w=e.configuration,m=e.conf,E=e.deepConfiguration,S=e.deepConf,O=o(n)||o(t)||o(r)?y({},n,t,r):void 0,C=o(d)?g({},d):void 0;C=o(c)?g(C,c):C;var A=o(k)||o(h)?y({},k,h):void 0,x=o(p)?g({},p):void 0;x=o(_)?g(x,_):x;var R=o(m)||o(w)?y({},m,w):void 0,F=o(S)?g({},S):void 0;F=o(E)?g(F,E):F;var M=a(s,f),T=a(l);T&&(F=F||{},u(F,T,"composers"));var P={};return i&&(P.methods=i),O&&(P.properties=O),M&&(P.initializers=M),C&&(P.deepProperties=C),A&&(P.staticProperties=A),i&&(P.methods=i),x&&(P.staticDeepProperties=x),b&&(P.propertyDescriptors=b),v&&(P.staticPropertyDescriptors=v),R&&(P.configuration=R),F&&(P.deepConfiguration=F),P},C=p("methods",y),A=p("properties",y),x=p("deepProperties",g),R=p("staticProperties",y),F=p("staticDeepProperties",g),M=p("configuration",y),T=p("deepConfiguration",g),P=p("propertyDescriptors",y),j=p("staticPropertyDescriptors",y),L={methods:C,properties:A,refs:A,props:A,initializers:v,init:v,composers:w,deepProperties:x,deepProps:x,staticProperties:R,statics:R,staticDeepProperties:F,deepStatics:F,configuration:M,conf:M,deepConfiguration:T,deepConf:T,propertyDescriptors:P,staticPropertyDescriptors:j},D=k({staticProperties:L},{staticProperties:{create:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];return this.apply(void 0,e)},compose:m}}),N=m.bind();m.compose=N;var I=y(m,L);r.methods=C,r.properties=A,r.refs=A,r.props=A,r.initializers=v,r.init=v,r.composers=w,r.deepProperties=x,r.deepProps=x,r.staticProperties=R,r.statics=R,r.staticDeepProperties=F,r.deepStatics=F,r.configuration=M,r.conf=M,r.deepConfiguration=T,r.deepConf=T,r.propertyDescriptors=P,r.staticPropertyDescriptors=j,r.compose=N,r["default"]=I,i.exports=r["default"]},{}],306:[function(e,i,r){i.exports=e("./lib/visibility.timers.js")},{"./lib/visibility.timers.js":308}],307:[function(e,i,r){!function(e){"use strict";var r=-1,n={onVisible:function(e){var i=n.isSupported();if(!i||!n.hidden())return e(),i;var r=n.change(function(i,t){n.hidden()||(n.unbind(r),e())});return r},change:function(e){if(!n.isSupported())return!1;r+=1;var i=r;return n._callbacks[i]=e,n._listen(),i},unbind:function(e){delete n._callbacks[e]},afterPrerendering:function(e){var i=n.isSupported(),r="prerender";if(!i||r!=n.state())return e(),i;var t=n.change(function(i,o){r!=o&&(n.unbind(t),e())});return t},hidden:function(){return!(!n._doc.hidden&&!n._doc.webkitHidden)},state:function(){return n._doc.visibilityState||n._doc.webkitVisibilityState||"visible"},isSupported:function(){return!(!n._doc.visibilityState&&!n._doc.webkitVisibilityState)},_doc:document||{},_callbacks:{},_change:function(e){var i=n.state();for(var r in n._callbacks)n._callbacks[r].call(n._doc,e,i)},_listen:function(){if(!n._init){var e="visibilitychange";n._doc.webkitVisibilityState&&(e="webkit"+e);var i=function(){n._change.apply(n,arguments)};n._doc.addEventListener?n._doc.addEventListener(e,i):n._doc.attachEvent(e,i),n._init=!0}}};"undefined"!=typeof i&&i.exports?i.exports=n:e.Visibility=n}(this)},{}],308:[function(e,i,r){!function(r){"use strict";var n=-1,t=function(e){return e.every=function(i,r,t){e._time(),t||(t=r,r=null),n+=1;var o=n;return e._timers[o]={visible:i,hidden:r,callback:t},e._run(o,!1),e.isSupported()&&e._listen(),o},e.stop=function(i){return!!e._timers[i]&&(e._stop(i),delete e._timers[i],!0)},e._timers={},e._time=function(){e._timed||(e._timed=!0,e._wasHidden=e.hidden(),e.change(function(){e._stopRun(),e._wasHidden=e.hidden()}))},e._run=function(i,n){var t,o=e._timers[i];if(e.hidden()){if(null===o.hidden)return;t=o.hidden}else t=o.visible;var f=function(){o.last=new Date,o.callback.call(r)};if(n){var a=new Date,u=a-o.last;t>u?o.delay=setTimeout(function(){o.id=setInterval(f,t),f()},t-u):(o.id=setInterval(f,t),f())}else o.id=setInterval(f,t)},e._stop=function(i){var r=e._timers[i];clearInterval(r.id),clearTimeout(r.delay),delete r.id,delete r.delay},e._stopRun=function(i){var r=e.hidden(),n=e._wasHidden;if(r&&!n||!r&&n)for(var t in e._timers)e._stop(t),e._run(t,!r)},e};"undefined"!=typeof i&&i.exports?i.exports=t(e("./visibility.core")):t(r.Visibility)}(window)},{"./visibility.core":307}],309:[function(e,i,r){"use strict";var n={};n.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},n.splitSections=function(e){var i=e.split("\nm=");return i.map(function(e,i){return(i>0?"m="+e:e).trim()+"\r\n"})},n.matchPrefix=function(e,i){return n.splitLines(e).filter(function(e){return 0===e.indexOf(i)})},n.parseCandidate=function(e){var i;i=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var r={foundation:i[0],component:i[1],protocol:i[2].toLowerCase(),priority:parseInt(i[3],10),ip:i[4],port:parseInt(i[5],10),type:i[7]},n=8;n-1?(r.attribute=e.substr(i+1,n-i-1),r.value=e.substr(n+1)):r.attribute=e.substr(i+1),r},n.getMid=function(e){var i=n.matchPrefix(e,"a=mid:")[0];if(i)return i.substr(6)},n.getDtlsParameters=function(e,i){var r=n.splitLines(e);r=r.concat(n.splitLines(i));var t=r.filter(function(e){return 0===e.indexOf("a=fingerprint:")})[0].substr(14),o={role:"auto",fingerprints:[{algorithm:t.split(" ")[0].toLowerCase(),value:t.split(" ")[1]}]};return o},n.writeDtlsParameters=function(e,i){var r="a=setup:"+i+"\r\n";return e.fingerprints.forEach(function(e){r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),r},n.getIceParameters=function(e,i){var r=n.splitLines(e);r=r.concat(n.splitLines(i));var t={usernameFragment:r.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:r.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)};return t},n.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},n.parseRtpParameters=function(e){for(var i={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e),t=r[0].split(" "),o=3;o0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=i.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",i.codecs.forEach(function(e){r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});var t=0;return i.codecs.forEach(function(e){e.maxptime>t&&(t=e.maxptime)}),t>0&&(r+="a=maxptime:"+t+"\r\n"),r+="a=rtcp-mux\r\n",i.headerExtensions.forEach(function(e){r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){var i,r=[],t=n.parseRtpParameters(e),o=t.fecMechanisms.indexOf("RED")!==-1,f=t.fecMechanisms.indexOf("ULPFEC")!==-1,a=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),u=a.length>0&&a[0].ssrc,s=n.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var i=e.split(" ");return i.shift(),i.map(function(e){return parseInt(e,10)})});s.length>0&&s[0].length>1&&s[0][0]===u&&(i=s[0][1]),t.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:u,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:i}};r.push(n),o&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:i,mechanism:f?"red+ulpfec":"red"},r.push(n))}}),0===r.length&&u&&r.push({ssrc:u});var l=n.matchPrefix(e,"b=");return l.length&&(0===l[0].indexOf("b=TIAS:")?l=parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")&&(l=parseInt(l[0].substr(5),10)),r.forEach(function(e){e.maxBitrate=l})),r},n.parseRtcpParameters=function(e){var i={},r=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];r&&(i.cname=r.value,i.ssrc=r.ssrc);var t=n.matchPrefix(e,"a=rtcp-rsize");i.reducedSize=t.length>0,i.compound=0===t.length;var o=n.matchPrefix(e,"a=rtcp-mux");return i.mux=o.length>0,i},n.parseMsid=function(e){var i,r=n.matchPrefix(e,"a=msid:");if(1===r.length)return i=r[0].substr(7).split(" "),{stream:i[0],track:i[1]};var t=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return t.length>0?(i=t[0].value.split(" "),{stream:i[0],track:i[1]}):void 0},n.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(e,i,r,t){var o=n.writeRtpDescription(e.kind,i);if(o+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",o+=e.rtpSender&&e.rtpReceiver?"a=sendrecv\r\n":e.rtpSender?"a=sendonly\r\n":e.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",e.rtpSender){var f="msid:"+t.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+f,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+f,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+f,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),o},n.getDirection=function(e,i){for(var r=n.splitLines(e),t=0;t0&&"function"==typeof e)return t(e,i);var f=function(e){var i={},r=e.result();return r.forEach(function(e){var r={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(i){r[i]=e.stat(i)}),i[r.id]=r}),i},a=function(e,i){var r=new Map(Object.keys(e).map(function(i){return[i,e[i]]}));return i=i||e,Object.keys(i).forEach(function(e){r[e]=i[e]}),r};if(arguments.length>=2){var u=function(e){o[1](a(f(e)))};return t.apply(this,[u,arguments[0]])}return new Promise(function(i,r){1===o.length&&"object"==typeof e?t.apply(n,[function(e){i(a(f(e)))},r]):t.apply(n,[function(e){i(a(f(e),e.result()))},r])}).then(i,r)},r},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var r=1===arguments.length?arguments[0]:void 0;return new Promise(function(n,t){i.apply(e,[n,t,r])})}return i.apply(this,arguments)}}),t.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,r=this,n=new Promise(function(n,t){i.apply(r,[e[0],n,t])});return e.length<2?n:n.then(function(){e[1].apply(null,[])},function(i){e.length>=3&&e[2].apply(null,[i])})}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return null===arguments[0]?Promise.resolve():e.apply(this,arguments)},["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}})},attachMediaStream:function(e,i){n("DEPRECATED, attachMediaStream will soon be removed."),t.version>=43?e.srcObject=i:"undefined"!=typeof e.src?e.src=URL.createObjectURL(i):n("Error attaching stream to element.")},reattachMediaStream:function(e,i){n("DEPRECATED, reattachMediaStream will soon be removed."),t.version>=43?e.srcObject=i.srcObject:e.src=i.src}};i.exports={shimMediaStream:o.shimMediaStream,shimOnTrack:o.shimOnTrack,shimSourceObject:o.shimSourceObject,shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia"),attachMediaStream:o.attachMediaStream,reattachMediaStream:o.reattachMediaStream}},{"../utils.js":318,"./getusermedia":312}],312:[function(e,i,r){"use strict";var n=e("../utils.js").log;i.exports=function(){var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var i={};return Object.keys(e).forEach(function(r){if("require"!==r&&"advanced"!==r&&"mediaSource"!==r){var n="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);var t=function(e,i){return e?e+i.charAt(0).toUpperCase()+i.slice(1):"deviceId"===i?"sourceId":i};if(void 0!==n.ideal){i.optional=i.optional||[];var o={};"number"==typeof n.ideal?(o[t("min",r)]=n.ideal,i.optional.push(o),o={},o[t("max",r)]=n.ideal,i.optional.push(o)):(o[t("",r)]=n.ideal,i.optional.push(o))}void 0!==n.exact&&"number"!=typeof n.exact?(i.mandatory=i.mandatory||{},i.mandatory[t("",r)]=n.exact):["min","max"].forEach(function(e){void 0!==n[e]&&(i.mandatory=i.mandatory||{},i.mandatory[t(e,r)]=n[e])})}}),e.advanced&&(i.optional=(i.optional||[]).concat(e.advanced)),i},i=function(i,r){if(i=JSON.parse(JSON.stringify(i)),i&&i.audio&&(i.audio=e(i.audio)),i&&"object"==typeof i.video){var t=i.video.facingMode;if(t=t&&("object"==typeof t?t:{ideal:t}),t&&("user"===t.exact||"environment"===t.exact||"user"===t.ideal||"environment"===t.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode)&&(delete i.video.facingMode,"environment"===t.exact||"environment"===t.ideal))return navigator.mediaDevices.enumerateDevices().then(function(o){o=o.filter(function(e){return"videoinput"===e.kind});var f=o.find(function(e){return e.label.toLowerCase().indexOf("back")!==-1})||o.length&&o[o.length-1];return f&&(i.video.deviceId=t.exact?{exact:f.deviceId}:{ideal:f.deviceId}),i.video=e(i.video),n("chrome: "+JSON.stringify(i)),r(i)});i.video=e(i.video)}return n("chrome: "+JSON.stringify(i)),r(i)},r=function(e){return{name:{PermissionDeniedError:"NotAllowedError",ConstraintNotSatisfiedError:"OverconstrainedError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},t=function(e,n,t){i(e,function(e){navigator.webkitGetUserMedia(e,n,function(e){t(r(e))})})};navigator.getUserMedia=t;var o=function(e){return new Promise(function(i,r){navigator.getUserMedia(e,i,r)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:o,enumerateDevices:function(){return new Promise(function(e){var i={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(r){e(r.map(function(e){return{label:e.label,kind:i[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var f=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return i(e,function(e){return f(e)["catch"](function(e){return Promise.reject(r(e))})})}}else navigator.mediaDevices.getUserMedia=function(e){return o(e)};"undefined"==typeof navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){n("Dummy mediaDevices.addEventListener called.")}),"undefined"==typeof navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){n("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":318}],313:[function(e,i,r){"use strict";var n=e("sdp"),t=e("../utils").log,o={shimPeerConnection:function(){window.RTCIceGatherer&&(window.RTCIceCandidate||(window.RTCIceCandidate=function(e){return e}),window.RTCSessionDescription||(window.RTCSessionDescription=function(e){return e})),window.RTCPeerConnection=function(e){var i=this,r=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){i[e]=r[e].bind(r)}),this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return i.localStreams},this.getRemoteStreams=function(){return i.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},e&&e.iceTransportPolicy)switch(e.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=e.iceTransportPolicy;break;case"none":throw new TypeError('iceTransportPolicy "none" not supported')}if(this.usingBundle=e&&"max-bundle"===e.bundlePolicy,e&&e.iceServers){var n=JSON.parse(JSON.stringify(e.iceServers));this.iceOptions.iceServers=n.filter(function(e){if(e&&e.urls){var i=e.urls;return"string"==typeof i&&(i=[i]),i=i.filter(function(e){return 0===e.indexOf("turn:")&&e.indexOf("transport=udp")!==-1})[0],!!i}return!1})}this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var e=this,i=n.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(r){var n=!r.candidate||0===Object.keys(r.candidate).length;if(n)for(var t=1;t-1&&(this.localStreams.splice(i,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,i){var r={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var n=0;n0;i.forEach(function(e,i){var f=t.transceivers[i],a=f.iceGatherer,u=f.iceTransport,s=f.dtlsTransport,l=f.localCapabilities,c=f.remoteCapabilities,d="0"===e.split("\n",1)[0].split(" ",2)[1];if(!d){var b=n.getIceParameters(e,r);if(o){var h=n.matchPrefix(e,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});h.length&&u.setRemoteCandidates(h)}var k=n.getDtlsParameters(e,r);o&&(k.role="server"),t.usingBundle&&0!==i||(u.start(a,b,o?"controlling":"controlled"),s.start(k));var _=t._getCommonCapabilities(l,c);t._transceive(f,_.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var f=arguments.length>1&&"function"==typeof arguments[1];if(f){var a=arguments[1];window.setTimeout(function(){a(),"new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),t._emitBufferedCandidates()},0)}var u=Promise.resolve();return u.then(function(){f||("new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),window.setTimeout(t._emitBufferedCandidates.bind(t),500))}),u},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var i=this,r=new MediaStream,t=[],o=n.splitSections(e.sdp),f=o.shift(),a=n.matchPrefix(f,"a=ice-lite").length>0;switch(this.usingBundle=n.matchPrefix(f,"a=group:BUNDLE ").length>0,o.forEach(function(o,u){var s,l,c,d,b,h,k,_,p,v,w,m,g=n.splitLines(o),y=g[0].substr(2).split(" "),E=y[0],S="0"===y[1],O=n.getDirection(o,f),C=n.parseRtpParameters(o);S||(w=n.getIceParameters(o,f),m=n.getDtlsParameters(o,f),m.role="client"),_=n.parseRtpEncodingParameters(o);var A=n.matchPrefix(o,"a=mid:");A=A.length?A[0].substr(6):n.generateIdentifier();var x,R=n.matchPrefix(o,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];R&&(x=R.value);var F=n.matchPrefix(o,"a=end-of-candidates").length>0,M=n.matchPrefix(o,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});if("offer"!==e.type||S)"answer"!==e.type||S||(s=i.transceivers[u],l=s.iceGatherer,c=s.iceTransport,d=s.dtlsTransport,b=s.rtpSender,h=s.rtpReceiver,k=s.sendEncodingParameters,p=s.localCapabilities,i.transceivers[u].recvEncodingParameters=_,i.transceivers[u].remoteCapabilities=C,i.transceivers[u].cname=x,(a||F)&&M.length&&c.setRemoteCandidates(M),i.usingBundle&&0!==u||(c.start(l,w,"controlling"),d.start(m)),i._transceive(s,"sendrecv"===O||"recvonly"===O,"sendrecv"===O||"sendonly"===O),!h||"sendrecv"!==O&&"sendonly"!==O?delete s.rtpReceiver:(v=h.track,t.push([v,h]),r.addTrack(v)));else{var T=i.usingBundle&&u>0?{iceGatherer:i.transceivers[0].iceGatherer,iceTransport:i.transceivers[0].iceTransport,dtlsTransport:i.transceivers[0].dtlsTransport}:i._createIceAndDtlsTransports(A,u);if(F&&T.iceTransport.setRemoteCandidates(M),p=RTCRtpReceiver.getCapabilities(E),k=[{ssrc:1001*(2*u+2)}],h=new RTCRtpReceiver(T.dtlsTransport,E),v=h.track,t.push([v,h]),r.addTrack(v),i.localStreams.length>0&&i.localStreams[0].getTracks().length>=u){var P=i.localStreams[0].getTracks()[u];b=new RTCRtpSender(P,T.dtlsTransport)}i.transceivers[u]={iceGatherer:T.iceGatherer,iceTransport:T.iceTransport,dtlsTransport:T.dtlsTransport,localCapabilities:p,remoteCapabilities:C,rtpSender:b,rtpReceiver:h,kind:E,mid:A,cname:x,sendEncodingParameters:k,recvEncodingParameters:_},i._transceive(i.transceivers[u],!1,"sendrecv"===O||"sendonly"===O)}}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return r.getTracks().length&&(i.remoteStreams.push(r),window.setTimeout(function(){var e=new Event("addstream");e.stream=r,i.dispatchEvent(e),null!==i.onaddstream&&window.setTimeout(function(){i.onaddstream(e)},0),t.forEach(function(n){var t=n[0],o=n[1],f=new Event("track");f.track=t,f.receiver=o,f.streams=[r],i.dispatchEvent(e),null!==i.ontrack&&window.setTimeout(function(){i.ontrack(f)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var i=new Event("signalingstatechange");this.dispatchEvent(i),null!==this.onsignalingstatechange&&this.onsignalingstatechange(i)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,i=this,r={"new":0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){r[e.iceTransport.state]++,r[e.dtlsTransport.state]++}),r.connected+=r.completed,e="new",r.failed>0?e="failed":r.connecting>0||r.checking>0?e="connecting":r.disconnected>0?e="disconnected":r["new"]>0?e="new":(r.connected>0||r.completed>0)&&(e="connected"),e!==i.iceConnectionState){i.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},window.RTCPeerConnection.prototype.createOffer=function(){var e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var i;1===arguments.length&&"function"!=typeof arguments[0]?i=arguments[0]:3===arguments.length&&(i=arguments[2]);var r=[],t=0,o=0;if(this.localStreams.length&&(t=this.localStreams[0].getAudioTracks().length,o=this.localStreams[0].getVideoTracks().length),i){if(i.mandatory||i.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==i.offerToReceiveAudio&&(t=i.offerToReceiveAudio),void 0!==i.offerToReceiveVideo&&(o=i.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){r.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?t>0:o>0}),"audio"===e.kind?t--:"video"===e.kind&&o--});t>0||o>0;)t>0&&(r.push({kind:"audio",wantReceive:!0}),t--),o>0&&(r.push({kind:"video",wantReceive:!0}),o--);var f=n.writeSessionBoilerplate(),a=[];r.forEach(function(i,r){var t,o,f=i.track,u=i.kind,s=n.generateIdentifier(),l=e.usingBundle&&r>0?{iceGatherer:a[0].iceGatherer,iceTransport:a[0].iceTransport,dtlsTransport:a[0].dtlsTransport}:e._createIceAndDtlsTransports(s,r),c=RTCRtpSender.getCapabilities(u),d=[{ssrc:1001*(2*r+1)}];f&&(t=new RTCRtpSender(f,l.dtlsTransport)),i.wantReceive&&(o=new RTCRtpReceiver(l.dtlsTransport,u)),a[r]={iceGatherer:l.iceGatherer,iceTransport:l.iceTransport,dtlsTransport:l.dtlsTransport,localCapabilities:c,remoteCapabilities:null,rtpSender:t,rtpReceiver:o,kind:u,mid:s,sendEncodingParameters:d,recvEncodingParameters:null}}),this.usingBundle&&(f+="a=group:BUNDLE "+a.map(function(e){return e.mid}).join(" ")+"\r\n"),r.forEach(function(i,r){var t=a[r];f+=n.writeMediaSection(t,t.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=a;var u=new RTCSessionDescription({type:"offer",sdp:f});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,u),Promise.resolve(u)},window.RTCPeerConnection.prototype.createAnswer=function(){var e=this,i=n.writeSessionBoilerplate();this.usingBundle&&(i+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(r){var t=e._getCommonCapabilities(r.localCapabilities,r.remoteCapabilities);i+=n.writeMediaSection(r,t,"answer",e.localStreams[0])});var r=new RTCSessionDescription({type:"answer",sdp:i});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,r),Promise.resolve(r)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){if(null===e)this.transceivers.forEach(function(e){e.iceTransport.addRemoteCandidate({})});else{var i=e.sdpMLineIndex;if(e.sdpMid)for(var r=0;r0?n.parseCandidate(e.candidate):{};if("tcp"===o.protocol&&0===o.port)return;if("1"!==o.component)return;"endOfCandidates"===o.type&&(o={}),t.iceTransport.addRemoteCandidate(o);var f=n.splitSections(this.remoteDescription.sdp);f[i+1]+=(o.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=f.join("")}}return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(i){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(r){i[r]&&e.push(i[r].getStats())})});var i=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(r){var n=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(i){n.set(i,e[i]),n[i]=e[i]})}),i&&window.setTimeout(i,0,n),r(n)})})}},attachMediaStream:function(e,i){t("DEPRECATED, attachMediaStream will soon be removed."),e.srcObject=i},reattachMediaStream:function(e,i){t("DEPRECATED, reattachMediaStream will soon be removed."),e.srcObject=i.srcObject}};i.exports={shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia"),attachMediaStream:o.attachMediaStream,reattachMediaStream:o.reattachMediaStream}},{"../utils":318,"./getusermedia":314,sdp:309}],314:[function(e,i,r){"use strict";i.exports=function(){var e=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint, -toString:function(){return this.name}}},i=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(r){return i(r)["catch"](function(i){return Promise.reject(e(i))})}}},{}],315:[function(e,i,r){"use strict";var n=e("../utils").log,t=e("../utils").browserDetails,o={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(i){var r=new Event("track");r.track=i,r.receiver={track:i},r.streams=[e.stream],this.dispatchEvent(r)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,i){if(t.version<38&&e&&e.iceServers){for(var r=[],n=0;n=r&&parseInt(n[r],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,e.minVersion=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1),e.minVersion=31;else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2),e.minVersion=38;else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1),e.minVersion=602}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2),e.minVersion=10547}return e.version0&&void 0!==arguments[0]?arguments[0]:null;return regeneratorRuntime.async(function(i){for(;;)switch(i.prev=i.next){case 0:if(!this._fsm.can("start")){i.next=5;break}return i.next=3,regeneratorRuntime.awrap(this._fsm.start(e));case 3:i.next=9;break;case 5:return i.next=7,regeneratorRuntime.awrap(this._fsm.stop());case 7:return i.next=9,regeneratorRuntime.awrap(this._fsm.start(e));case 9:case"end":return i.stop()}},null,this)}},{key:"stop",value:function(){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._fsm.can("stop")){e.next=3;break}return e.next=3,regeneratorRuntime.awrap(this._fsm.stop());case 3:case"end":return e.stop()}},null,this)}},{key:"_enableScan",value:function(e){var i;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(this._camera=e||this._camera,this._camera){r.next=3;break}throw new Error("Camera is not defined.");case 3:return r.next=5,regeneratorRuntime.awrap(this._camera.start());case 5:i=r.sent,this.video.srcObject=i,this._continuous&&this._scanner.start();case 8:case"end":return r.stop()}},null,this)}},{key:"_disableScan",value:function(){this.video.src="",this._scanner&&this._scanner.stop(),this._camera&&this._camera.stop()}},{key:"_configureVideo",value:function(e){if(e.video&&"VIDEO"!==e.video.tagName)throw new Error("Video must be a