添加了Stock-Prediction-Models项目的多个文件,包括数据集、模型代码、README文档和CSS样式文件。这些文件用于股票预测模型的训练和展示,涵盖了LSTM、GRU等深度学习模型的应用。
3 lines
172 KiB
JavaScript
3 lines
172 KiB
JavaScript
/*! numjs */
|
||
|
||
!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).nj=r()}}(function(){return function r(n,t,e){function i(o,u){if(!t[o]){if(!n[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var f=t[o]={exports:{}};n[o][0].call(f.exports,function(r){var t=n[o][1][r];return i(t||r)},f,f.exports,r,n,t,e)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o<e.length;o++)i(e[o]);return i}({1:[function(r,n,t){"use strict";function e(r){var n=r.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===r[n-2]?2:"="===r[n-1]?1:0}function i(r){return o[r>>18&63]+o[r>>12&63]+o[r>>6&63]+o[63&r]}function a(r,n,t){for(var e,a=[],o=n;o<t;o+=3)e=(r[o]<<16)+(r[o+1]<<8)+r[o+2],a.push(i(e));return a.join("")}t.byteLength=function(r){return 3*r.length/4-e(r)},t.toByteArray=function(r){var n,t,i,a,o,l=r.length;a=e(r),o=new s(3*l/4-a),t=a>0?l-4:l;var f=0;for(n=0;n<t;n+=4)i=u[r.charCodeAt(n)]<<18|u[r.charCodeAt(n+1)]<<12|u[r.charCodeAt(n+2)]<<6|u[r.charCodeAt(n+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=255&i;return 2===a?(i=u[r.charCodeAt(n)]<<2|u[r.charCodeAt(n+1)]>>4,o[f++]=255&i):1===a&&(i=u[r.charCodeAt(n)]<<10|u[r.charCodeAt(n+1)]<<4|u[r.charCodeAt(n+2)]>>2,o[f++]=i>>8&255,o[f++]=255&i),o},t.fromByteArray=function(r){for(var n,t=r.length,e=t%3,i="",u=[],s=0,l=t-e;s<l;s+=16383)u.push(a(r,s,s+16383>l?l:s+16383));return 1===e?(n=r[t-1],i+=o[n>>2],i+=o[n<<4&63],i+="=="):2===e&&(n=(r[t-2]<<8)+r[t-1],i+=o[n>>10],i+=o[n>>4&63],i+=o[n<<2&63],i+="="),u.push(i),u.join("")};for(var o=[],u=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=l.length;f<c;++f)o[f]=l[f],u[l.charCodeAt(f)]=f;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],2:[function(r,n,t){"use strict";"use restrict";function e(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(r){return(r>0)-(r<0)},t.abs=function(r){var n=r>>31;return(r^n)-n},t.min=function(r,n){return n^(r^n)&-(r<n)},t.max=function(r,n){return r^(r^n)&-(r<n)},t.isPow2=function(r){return!(r&r-1||!r)},t.log2=function(r){var n,t;return n=(r>65535)<<4,r>>>=n,t=(r>255)<<3,r>>>=t,n|=t,t=(r>15)<<2,r>>>=t,n|=t,t=(r>3)<<1,r>>>=t,(n|=t)|r>>1},t.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},t.popCount=function(r){return r-=r>>>1&1431655765,16843009*((r=(858993459&r)+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},t.countTrailingZeros=e,t.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)+1},t.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},t.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var n=0;n<256;++n){var t=n,e=n,i=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=1&t,--i;r[n]=e<<i&255}}(i),t.reverse=function(r){return i[255&r]<<24|i[r>>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},t.interleave2=function(r,n){return r&=65535,r=16711935&(r|r<<8),r=252645135&(r|r<<4),r=858993459&(r|r<<2),r=1431655765&(r|r<<1),n&=65535,n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),r|n<<1},t.deinterleave2=function(r,n){return r=r>>>n&1431655765,r=858993459&(r|r>>>1),r=252645135&(r|r>>>2),r=16711935&(r|r>>>4),(r=65535&(r|r>>>16))<<16>>16},t.interleave3=function(r,n,t){return r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),r|=n<<1,t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),r|t<<2},t.deinterleave3=function(r,n){return r=r>>>n&1227133513,r=3272356035&(r|r>>>2),r=251719695&(r|r>>>4),r=4278190335&(r|r>>>8),(r=1023&(r|r>>>16))<<22>>22},t.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>e(r)+1}},{}],3:[function(r,n,t){"use strict";function e(r){if(r>M)throw new RangeError("Invalid typed array length");var n=new Uint8Array(r);return n.__proto__=i.prototype,n}function i(r,n,t){if("number"==typeof r){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return u(r)}return a(r,n,t)}function a(r,n,t){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return T(r)?function(r,n,t){if(n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(t||0))throw new RangeError("'length' is out of bounds");var e;e=void 0===n&&void 0===t?new Uint8Array(r):void 0===t?new Uint8Array(r,n):new Uint8Array(r,n,t);return e.__proto__=i.prototype,e}(r,n,t):"string"==typeof r?function(r,n){"string"==typeof n&&""!==n||(n="utf8");if(!i.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var t=0|f(r,n),a=e(t),o=a.write(r,n);o!==t&&(a=a.slice(0,o));return a}(r,n):function(r){if(i.isBuffer(r)){var n=0|l(r.length),t=e(n);return 0===t.length?t:(r.copy(t,0,0,n),t)}if(r){if(B(r)||"length"in r)return"number"!=typeof r.length||N(r.length)?e(0):s(r);if("Buffer"===r.type&&Array.isArray(r.data))return s(r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(r)}function o(r){if("number"!=typeof r)throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function u(r){return o(r),e(r<0?0:0|l(r))}function s(r){for(var n=r.length<0?0:0|l(r.length),t=e(n),i=0;i<n;i+=1)t[i]=255&r[i];return t}function l(r){if(r>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|r}function f(r,n){if(i.isBuffer(r))return r.length;if(B(r)||T(r))return r.byteLength;"string"!=typeof r&&(r=""+r);var t=r.length;if(0===t)return 0;for(var e=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return k(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return I(r).length;default:if(e)return k(r).length;n=(""+n).toLowerCase(),e=!0}}function c(r,n,t){var e=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if(t>>>=0,n>>>=0,t<=n)return"";for(r||(r="utf8");;)switch(r){case"hex":return function(r,n,t){var e=r.length;(!n||n<0)&&(n=0);(!t||t<0||t>e)&&(t=e);for(var i="",a=n;a<t;++a)i+=function(r){return r<16?"0"+r.toString(16):r.toString(16)}(r[a]);return i}(this,n,t);case"utf8":case"utf-8":return m(this,n,t);case"ascii":return function(r,n,t){var e="";t=Math.min(r.length,t);for(var i=n;i<t;++i)e+=String.fromCharCode(127&r[i]);return e}(this,n,t);case"latin1":case"binary":return function(r,n,t){var e="";t=Math.min(r.length,t);for(var i=n;i<t;++i)e+=String.fromCharCode(r[i]);return e}(this,n,t);case"base64":return function(r,n,t){return 0===n&&t===r.length?U.fromByteArray(r):U.fromByteArray(r.slice(n,t))}(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(r,n,t){for(var e=r.slice(n,t),i="",a=0;a<e.length;a+=2)i+=String.fromCharCode(e[a]+256*e[a+1]);return i}(this,n,t);default:if(e)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),e=!0}}function h(r,n,t){var e=r[n];r[n]=r[t],r[t]=e}function _(r,n,t,e,a){if(0===r.length)return-1;if("string"==typeof t?(e=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,N(t)&&(t=a?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(a)return-1;t=r.length-1}else if(t<0){if(!a)return-1;t=0}if("string"==typeof n&&(n=i.from(n,e)),i.isBuffer(n))return 0===n.length?-1:p(r,n,t,e,a);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,n,t):Uint8Array.prototype.lastIndexOf.call(r,n,t):p(r,[n],t,e,a);throw new TypeError("val must be string, number or Buffer")}function p(r,n,t,e,i){function a(r,n){return 1===o?r[n]:r.readUInt16BE(n*o)}var o=1,u=r.length,s=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;o=2,u/=2,s/=2,t/=2}var l;if(i){var f=-1;for(l=t;l<u;l++)if(a(r,l)===a(n,-1===f?0:l-f)){if(-1===f&&(f=l),l-f+1===s)return f*o}else-1!==f&&(l-=l-f),f=-1}else for(t+s>u&&(t=u-s),l=t;l>=0;l--){for(var c=!0,h=0;h<s;h++)if(a(r,l+h)!==a(n,h)){c=!1;break}if(c)return l}return-1}function g(r,n,t,e){t=Number(t)||0;var i=r.length-t;e?(e=Number(e))>i&&(e=i):e=i;var a=n.length;if(a%2!=0)throw new TypeError("Invalid hex string");e>a/2&&(e=a/2);for(var o=0;o<e;++o){var u=parseInt(n.substr(2*o,2),16);if(N(u))return o;r[t+o]=u}return o}function v(r,n,t,e){return S(k(n,r.length-t),r,t,e)}function y(r,n,t,e){return S(function(r){for(var n=[],t=0;t<r.length;++t)n.push(255&r.charCodeAt(t));return n}(n),r,t,e)}function d(r,n,t,e){return y(r,n,t,e)}function b(r,n,t,e){return S(I(n),r,t,e)}function w(r,n,t,e){return S(function(r,n){for(var t,e,i,a=[],o=0;o<r.length&&!((n-=2)<0);++o)t=r.charCodeAt(o),e=t>>8,i=t%256,a.push(i),a.push(e);return a}(n,r.length-t),r,t,e)}function m(r,n,t){t=Math.min(r.length,t);for(var e=[],i=n;i<t;){var a=r[i],o=null,u=a>239?4:a>223?3:a>191?2:1;if(i+u<=t){var s,l,f,c;switch(u){case 1:a<128&&(o=a);break;case 2:128==(192&(s=r[i+1]))&&(c=(31&a)<<6|63&s)>127&&(o=c);break;case 3:s=r[i+1],l=r[i+2],128==(192&s)&&128==(192&l)&&(c=(15&a)<<12|(63&s)<<6|63&l)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=r[i+1],l=r[i+2],f=r[i+3],128==(192&s)&&128==(192&l)&&128==(192&f)&&(c=(15&a)<<18|(63&s)<<12|(63&l)<<6|63&f)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,e.push(o>>>10&1023|55296),o=56320|1023&o),e.push(o),i+=u}return function(r){var n=r.length;if(n<=C)return String.fromCharCode.apply(String,r);var t="",e=0;for(;e<n;)t+=String.fromCharCode.apply(String,r.slice(e,e+=C));return t}(e)}function A(r,n,t){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+n>t)throw new RangeError("Trying to access beyond buffer length")}function j(r,n,t,e,a,o){if(!i.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>a||n<o)throw new RangeError('"value" argument is out of bounds');if(t+e>r.length)throw new RangeError("Index out of range")}function x(r,n,t,e,i,a){if(t+e>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function V(r,n,t,e,i){return n=+n,t>>>=0,i||x(r,0,t,4),z.write(r,n,t,e,23,4),t+4}function E(r,n,t,e,i){return n=+n,t>>>=0,i||x(r,0,t,8),z.write(r,n,t,e,52,8),t+8}function k(r,n){n=n||1/0;for(var t,e=r.length,i=null,a=[],o=0;o<e;++o){if((t=r.charCodeAt(o))>55295&&t<57344){if(!i){if(t>56319){(n-=3)>-1&&a.push(239,191,189);continue}if(o+1===e){(n-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(n-=3)>-1&&a.push(239,191,189),i=t;continue}t=65536+(i-55296<<10|t-56320)}else i&&(n-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((n-=1)<0)break;a.push(t)}else if(t<2048){if((n-=2)<0)break;a.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;a.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return a}function I(r){return U.toByteArray(function(r){if((r=r.trim().replace(O,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function S(r,n,t,e){for(var i=0;i<e&&!(i+t>=n.length||i>=r.length);++i)n[i+t]=r[i];return i}function T(r){return r instanceof ArrayBuffer||null!=r&&null!=r.constructor&&"ArrayBuffer"===r.constructor.name&&"number"==typeof r.byteLength}function B(r){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(r)}function N(r){return r!=r}var U=r("base64-js"),z=r("ieee754");t.Buffer=i,t.SlowBuffer=function(r){return+r!=r&&(r=0),i.alloc(+r)},t.INSPECT_MAX_BYTES=50;var M=2147483647;t.kMaxLength=M,(i.TYPED_ARRAY_SUPPORT=function(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===r.foo()}catch(r){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(r,n,t){return a(r,n,t)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(r,n,t){return function(r,n,t){return o(r),r<=0?e(r):void 0!==n?"string"==typeof t?e(r).fill(n,t):e(r).fill(n):e(r)}(r,n,t)},i.allocUnsafe=function(r){return u(r)},i.allocUnsafeSlow=function(r){return u(r)},i.isBuffer=function(r){return null!=r&&!0===r._isBuffer},i.compare=function(r,n){if(!i.isBuffer(r)||!i.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(r===n)return 0;for(var t=r.length,e=n.length,a=0,o=Math.min(t,e);a<o;++a)if(r[a]!==n[a]){t=r[a],e=n[a];break}return t<e?-1:e<t?1:0},i.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(r,n){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return i.alloc(0);var t;if(void 0===n)for(n=0,t=0;t<r.length;++t)n+=r[t].length;var e=i.allocUnsafe(n),a=0;for(t=0;t<r.length;++t){var o=r[t];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(e,a),a+=o.length}return e},i.byteLength=f,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<r;n+=2)h(this,n,n+1);return this},i.prototype.swap32=function(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<r;n+=4)h(this,n,n+3),h(this,n+1,n+2);return this},i.prototype.swap64=function(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<r;n+=8)h(this,n,n+7),h(this,n+1,n+6),h(this,n+2,n+5),h(this,n+3,n+4);return this},i.prototype.toString=function(){var r=this.length;return 0===r?"":0===arguments.length?m(this,0,r):c.apply(this,arguments)},i.prototype.equals=function(r){if(!i.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===i.compare(this,r)},i.prototype.inspect=function(){var r="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(r=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(r+=" ... ")),"<Buffer "+r+">"},i.prototype.compare=function(r,n,t,e,a){if(!i.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=r?r.length:0),void 0===e&&(e=0),void 0===a&&(a=this.length),n<0||t>r.length||e<0||a>this.length)throw new RangeError("out of range index");if(e>=a&&n>=t)return 0;if(e>=a)return-1;if(n>=t)return 1;if(n>>>=0,t>>>=0,e>>>=0,a>>>=0,this===r)return 0;for(var o=a-e,u=t-n,s=Math.min(o,u),l=this.slice(e,a),f=r.slice(n,t),c=0;c<s;++c)if(l[c]!==f[c]){o=l[c],u=f[c];break}return o<u?-1:u<o?1:0},i.prototype.includes=function(r,n,t){return-1!==this.indexOf(r,n,t)},i.prototype.indexOf=function(r,n,t){return _(this,r,n,t,!0)},i.prototype.lastIndexOf=function(r,n,t){return _(this,r,n,t,!1)},i.prototype.write=function(r,n,t,e){if(void 0===n)e="utf8",t=this.length,n=0;else if(void 0===t&&"string"==typeof n)e=n,t=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(t)?(t>>>=0,void 0===e&&(e="utf8")):(e=t,t=void 0)}var i=this.length-n;if((void 0===t||t>i)&&(t=i),r.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var a=!1;;)switch(e){case"hex":return g(this,r,n,t);case"utf8":case"utf-8":return v(this,r,n,t);case"ascii":return y(this,r,n,t);case"latin1":case"binary":return d(this,r,n,t);case"base64":return b(this,r,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,r,n,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;i.prototype.slice=function(r,n){var t=this.length;r=~~r,n=void 0===n?t:~~n,r<0?(r+=t)<0&&(r=0):r>t&&(r=t),n<0?(n+=t)<0&&(n=0):n>t&&(n=t),n<r&&(n=r);var e=this.subarray(r,n);return e.__proto__=i.prototype,e},i.prototype.readUIntLE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r],i=1,a=0;++a<n&&(i*=256);)e+=this[r+a]*i;return e},i.prototype.readUIntBE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r+--n],i=1;n>0&&(i*=256);)e+=this[r+--n]*i;return e},i.prototype.readUInt8=function(r,n){return r>>>=0,n||A(r,1,this.length),this[r]},i.prototype.readUInt16LE=function(r,n){return r>>>=0,n||A(r,2,this.length),this[r]|this[r+1]<<8},i.prototype.readUInt16BE=function(r,n){return r>>>=0,n||A(r,2,this.length),this[r]<<8|this[r+1]},i.prototype.readUInt32LE=function(r,n){return r>>>=0,n||A(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},i.prototype.readUInt32BE=function(r,n){return r>>>=0,n||A(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},i.prototype.readIntLE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r],i=1,a=0;++a<n&&(i*=256);)e+=this[r+a]*i;return i*=128,e>=i&&(e-=Math.pow(2,8*n)),e},i.prototype.readIntBE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=n,i=1,a=this[r+--e];e>0&&(i*=256);)a+=this[r+--e]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*n)),a},i.prototype.readInt8=function(r,n){return r>>>=0,n||A(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},i.prototype.readInt16LE=function(r,n){r>>>=0,n||A(r,2,this.length);var t=this[r]|this[r+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(r,n){r>>>=0,n||A(r,2,this.length);var t=this[r+1]|this[r]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(r,n){return r>>>=0,n||A(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},i.prototype.readInt32BE=function(r,n){return r>>>=0,n||A(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},i.prototype.readFloatLE=function(r,n){return r>>>=0,n||A(r,4,this.length),z.read(this,r,!0,23,4)},i.prototype.readFloatBE=function(r,n){return r>>>=0,n||A(r,4,this.length),z.read(this,r,!1,23,4)},i.prototype.readDoubleLE=function(r,n){return r>>>=0,n||A(r,8,this.length),z.read(this,r,!0,52,8)},i.prototype.readDoubleBE=function(r,n){return r>>>=0,n||A(r,8,this.length),z.read(this,r,!1,52,8)},i.prototype.writeUIntLE=function(r,n,t,e){if(r=+r,n>>>=0,t>>>=0,!e){j(this,r,n,t,Math.pow(2,8*t)-1,0)}var i=1,a=0;for(this[n]=255&r;++a<t&&(i*=256);)this[n+a]=r/i&255;return n+t},i.prototype.writeUIntBE=function(r,n,t,e){if(r=+r,n>>>=0,t>>>=0,!e){j(this,r,n,t,Math.pow(2,8*t)-1,0)}var i=t-1,a=1;for(this[n+i]=255&r;--i>=0&&(a*=256);)this[n+i]=r/a&255;return n+t},i.prototype.writeUInt8=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,1,255,0),this[n]=255&r,n+1},i.prototype.writeUInt16LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,65535,0),this[n]=255&r,this[n+1]=r>>>8,n+2},i.prototype.writeUInt16BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=255&r,n+2},i.prototype.writeUInt32LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=255&r,n+4},i.prototype.writeUInt32BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},i.prototype.writeIntLE=function(r,n,t,e){if(r=+r,n>>>=0,!e){var i=Math.pow(2,8*t-1);j(this,r,n,t,i-1,-i)}var a=0,o=1,u=0;for(this[n]=255&r;++a<t&&(o*=256);)r<0&&0===u&&0!==this[n+a-1]&&(u=1),this[n+a]=(r/o>>0)-u&255;return n+t},i.prototype.writeIntBE=function(r,n,t,e){if(r=+r,n>>>=0,!e){var i=Math.pow(2,8*t-1);j(this,r,n,t,i-1,-i)}var a=t-1,o=1,u=0;for(this[n+a]=255&r;--a>=0&&(o*=256);)r<0&&0===u&&0!==this[n+a+1]&&(u=1),this[n+a]=(r/o>>0)-u&255;return n+t},i.prototype.writeInt8=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=255&r,n+1},i.prototype.writeInt16LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,32767,-32768),this[n]=255&r,this[n+1]=r>>>8,n+2},i.prototype.writeInt16BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=255&r,n+2},i.prototype.writeInt32LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,2147483647,-2147483648),this[n]=255&r,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},i.prototype.writeInt32BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},i.prototype.writeFloatLE=function(r,n,t){return V(this,r,n,!0,t)},i.prototype.writeFloatBE=function(r,n,t){return V(this,r,n,!1,t)},i.prototype.writeDoubleLE=function(r,n,t){return E(this,r,n,!0,t)},i.prototype.writeDoubleBE=function(r,n,t){return E(this,r,n,!1,t)},i.prototype.copy=function(r,n,t,e){if(t||(t=0),e||0===e||(e=this.length),n>=r.length&&(n=r.length),n||(n=0),e>0&&e<t&&(e=t),e===t)return 0;if(0===r.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),r.length-n<e-t&&(e=r.length-n+t);var i,a=e-t;if(this===r&&t<n&&n<e)for(i=a-1;i>=0;--i)r[i+n]=this[i+t];else if(a<1e3)for(i=0;i<a;++i)r[i+n]=this[i+t];else Uint8Array.prototype.set.call(r,this.subarray(t,t+a),n);return a},i.prototype.fill=function(r,n,t,e){if("string"==typeof r){if("string"==typeof n?(e=n,n=0,t=this.length):"string"==typeof t&&(e=t,t=this.length),1===r.length){var a=r.charCodeAt(0);a<256&&(r=a)}if(void 0!==e&&"string"!=typeof e)throw new TypeError("encoding must be a string");if("string"==typeof e&&!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e)}else"number"==typeof r&&(r&=255);if(n<0||this.length<n||this.length<t)throw new RangeError("Out of range index");if(t<=n)return this;n>>>=0,t=void 0===t?this.length:t>>>0,r||(r=0);var o;if("number"==typeof r)for(o=n;o<t;++o)this[o]=r;else{var u=i.isBuffer(r)?r:new i(r,e),s=u.length;for(o=0;o<t-n;++o)this[o+n]=u[o%s]}return this};var O=/[^+/0-9A-Za-z-_]/g},{"base64-js":1,ieee754:9}],4:[function(r,n,t){"use strict";var e=r("./lib/thunk.js");n.exports=function(r){var n=new function(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1};n.pre=r.pre,n.body=r.body,n.post=r.post;var t=r.args.slice(0);n.argTypes=t;for(var i=0;i<t.length;++i){var a=t[i];if("array"===a||"object"==typeof a&&a.blockIndices){if(n.argTypes[i]="array",n.arrayArgs.push(i),n.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),n.shimArgs.push("array"+i),i<n.pre.args.length&&n.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array args");if(i<n.post.args.length&&n.post.args[i].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)n.scalarArgs.push(i),n.shimArgs.push("scalar"+i);else if("index"===a){if(n.indexArgs.push(i),i<n.pre.args.length&&n.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array index");if(i<n.body.args.length&&n.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array index");if(i<n.post.args.length&&n.post.args[i].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(n.shapeArgs.push(i),i<n.pre.args.length&&n.pre.args[i].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(i<n.body.args.length&&n.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array shape");if(i<n.post.args.length&&n.post.args[i].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof a||!a.offset)throw new Error("cwise: Unknown argument type "+t[i]);n.argTypes[i]="offset",n.offsetArgs.push({array:a.array,offset:a.offset}),n.offsetArgIndex.push(i)}}if(n.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(n.pre.args.length>t.length)throw new Error("cwise: Too many arguments in pre() block");if(n.body.args.length>t.length)throw new Error("cwise: Too many arguments in body() block");if(n.post.args.length>t.length)throw new Error("cwise: Too many arguments in post() block");return n.debug=!!r.printCode||!!r.debug,n.funcName=r.funcName||"cwise",n.blockSize=r.blockSize||64,e(n)}},{"./lib/thunk.js":6}],5:[function(r,n,t){"use strict";function e(r,n,t){var e,i,a=r.length,o=n.arrayArgs.length,u=n.indexArgs.length>0,s=[],l=[],f=0,c=0;for(e=0;e<a;++e)l.push(["i",e,"=0"].join(""));for(i=0;i<o;++i)for(e=0;e<a;++e)c=f,f=r[e],0===e?l.push(["d",i,"s",e,"=t",i,"p",f].join("")):l.push(["d",i,"s",e,"=(t",i,"p",f,"-s",c,"*t",i,"p",c,")"].join(""));for(l.length>0&&s.push("var "+l.join(",")),e=a-1;e>=0;--e)f=r[e],s.push(["for(i",e,"=0;i",e,"<s",f,";++i",e,"){"].join(""));for(s.push(t),e=0;e<a;++e){for(c=f,f=r[e],i=0;i<o;++i)s.push(["p",i,"+=d",i,"s",e].join(""));u&&(e>0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",f,"]"].join(""))),s.push("}")}return s.join("\n")}function i(r,n,t){for(var e=r.body,i=[],a=[],o=0;o<r.args.length;++o){var u=r.args[o];if(!(u.count<=0)){var s=new RegExp(u.name,"g"),l="",f=n.arrayArgs.indexOf(o);switch(n.argTypes[o]){case"offset":var c=n.offsetArgIndex.indexOf(o);f=n.offsetArgs[c].array,l="+q"+c;case"array":l="p"+f+l;var h="l"+o,_="a"+f;if(0===n.arrayBlockIndices[f])1===u.count?"generic"===t[f]?u.lvalue?(i.push(["var ",h,"=",_,".get(",l,")"].join("")),e=e.replace(s,h),a.push([_,".set(",l,",",h,")"].join(""))):e=e.replace(s,[_,".get(",l,")"].join("")):e=e.replace(s,[_,"[",l,"]"].join("")):"generic"===t[f]?(i.push(["var ",h,"=",_,".get(",l,")"].join("")),e=e.replace(s,h),u.lvalue&&a.push([_,".set(",l,",",h,")"].join(""))):(i.push(["var ",h,"=",_,"[",l,"]"].join("")),e=e.replace(s,h),u.lvalue&&a.push([_,"[",l,"]=",h].join("")));else{for(var p=[u.name],g=[l],v=0;v<Math.abs(n.arrayBlockIndices[f]);v++)p.push("\\s*\\[([^\\]]+)\\]"),g.push("$"+(v+1)+"*t"+f+"b"+v);if(s=new RegExp(p.join(""),"g"),l=g.join("+"),"generic"===t[f])throw new Error("cwise: Generic arrays not supported in combination with blocks!");e=e.replace(s,[_,"[",l,"]"].join(""))}break;case"scalar":e=e.replace(s,"Y"+n.scalarArgs.indexOf(o));break;case"index":e=e.replace(s,"index");break;case"shape":e=e.replace(s,"shape")}}}return[i.join("\n"),e,a.join("\n")].join("\n").trim()}var a=r("uniq");n.exports=function(r,n){for(var t=n[1].length-Math.abs(r.arrayBlockIndices[0])|0,o=new Array(r.arrayArgs.length),u=new Array(r.arrayArgs.length),s=0;s<r.arrayArgs.length;++s)u[s]=n[2*s],o[s]=n[2*s+1];for(var l=[],f=[],c=[],h=[],_=[],s=0;s<r.arrayArgs.length;++s){r.arrayBlockIndices[s]<0?(c.push(0),h.push(t),l.push(t),f.push(t+r.arrayBlockIndices[s])):(c.push(r.arrayBlockIndices[s]),h.push(r.arrayBlockIndices[s]+t),l.push(0),f.push(r.arrayBlockIndices[s]));for(var p=[],g=0;g<o[s].length;g++)c[s]<=o[s][g]&&o[s][g]<h[s]&&p.push(o[s][g]-c[s]);_.push(p)}for(var v=["SS"],y=["'use strict'"],d=[],g=0;g<t;++g)d.push(["s",g,"=SS[",g,"]"].join(""));for(s=0;s<r.arrayArgs.length;++s){for(v.push("a"+s),v.push("t"+s),v.push("p"+s),g=0;g<t;++g)d.push(["t",s,"p",g,"=t",s,"[",c[s]+g,"]"].join(""));for(g=0;g<Math.abs(r.arrayBlockIndices[s]);++g)d.push(["t",s,"b",g,"=t",s,"[",l[s]+g,"]"].join(""))}for(s=0;s<r.scalarArgs.length;++s)v.push("Y"+s);if(r.shapeArgs.length>0&&d.push("shape=SS.slice(0)"),r.indexArgs.length>0){for(var b=new Array(t),s=0;s<t;++s)b[s]="0";d.push(["index=[",b.join(","),"]"].join(""))}for(s=0;s<r.offsetArgs.length;++s){for(var w=r.offsetArgs[s],m=[],g=0;g<w.offset.length;++g)0!==w.offset[g]&&(1===w.offset[g]?m.push(["t",w.array,"p",g].join("")):m.push([w.offset[g],"*t",w.array,"p",g].join("")));0===m.length?d.push("q"+s+"=0"):d.push(["q",s,"=",m.join("+")].join(""))}var A=a([].concat(r.pre.thisVars).concat(r.body.thisVars).concat(r.post.thisVars));for((d=d.concat(A)).length>0&&y.push("var "+d.join(",")),s=0;s<r.arrayArgs.length;++s)y.push("p"+s+"|=0");r.pre.body.length>3&&y.push(i(r.pre,r,u));var j=i(r.body,r,u),x=function(r){for(var n=0,t=r[0].length;n<t;){for(var e=1;e<r.length;++e)if(r[e][n]!==r[0][n])return n;++n}return n}(_);x<t?y.push(function(r,n,t,i){for(var a=n.length,o=t.arrayArgs.length,u=t.blockSize,s=t.indexArgs.length>0,l=[],f=0;f<o;++f)l.push(["var offset",f,"=p",f].join(""));for(f=r;f<a;++f)l.push(["for(var j"+f+"=SS[",n[f],"]|0;j",f,">0;){"].join("")),l.push(["if(j",f,"<",u,"){"].join("")),l.push(["s",n[f],"=j",f].join("")),l.push(["j",f,"=0"].join("")),l.push(["}else{s",n[f],"=",u].join("")),l.push(["j",f,"-=",u,"}"].join("")),s&&l.push(["index[",n[f],"]=j",f].join(""));for(f=0;f<o;++f){for(var c=["offset"+f],h=r;h<a;++h)c.push(["j",h,"*t",f,"p",n[h]].join(""));l.push(["p",f,"=(",c.join("+"),")"].join(""))}for(l.push(e(n,t,i)),f=r;f<a;++f)l.push("}");return l.join("\n")}(x,_[0],r,j)):y.push(e(_[0],r,j)),r.post.body.length>3&&y.push(i(r.post,r,u)),r.debug&&console.log("-----Generated cwise routine for ",n,":\n"+y.join("\n")+"\n----------");var V=[r.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",x,function(r){for(var n=new Array(r.length),t=!0,e=0;e<r.length;++e){var i=r[e],a=i.match(/\d+/);a=a?a[0]:"",0===i.charAt(0)?n[e]="u"+i.charAt(1)+a:n[e]=i.charAt(0)+a,e>0&&(t=t&&n[e]===n[e-1])}return t?n[0]:n.join("")}(u)].join("");return new Function(["function ",V,"(",v.join(","),"){",y.join("\n"),"} return ",V].join(""))()}},{uniq:22}],6:[function(r,n,t){"use strict";var e=r("./compile.js");n.exports=function(r){var n=["'use strict'","var CACHED={}"],t=[],i=r.funcName+"_cwise_thunk";n.push(["return function ",i,"(",r.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],u=[["array",r.arrayArgs[0],".shape.slice(",Math.max(0,r.arrayBlockIndices[0]),r.arrayBlockIndices[0]<0?","+r.arrayBlockIndices[0]+")":")"].join("")],s=[],l=[],f=0;f<r.arrayArgs.length;++f){var c=r.arrayArgs[f];t.push(["t",c,"=array",c,".dtype,","r",c,"=array",c,".order"].join("")),a.push("t"+c),a.push("r"+c),o.push("t"+c),o.push("r"+c+".join()"),u.push("array"+c+".data"),u.push("array"+c+".stride"),u.push("array"+c+".offset|0"),f>0&&(s.push("array"+r.arrayArgs[0]+".shape.length===array"+c+".shape.length+"+(Math.abs(r.arrayBlockIndices[0])-Math.abs(r.arrayBlockIndices[f]))),l.push("array"+r.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,r.arrayBlockIndices[0])+"]===array"+c+".shape[shapeIndex+"+Math.max(0,r.arrayBlockIndices[f])+"]"))}for(r.arrayArgs.length>1&&(n.push("if (!("+s.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),n.push("for(var shapeIndex=array"+r.arrayArgs[0]+".shape.length-"+Math.abs(r.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),n.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),n.push("}")),f=0;f<r.scalarArgs.length;++f)u.push("scalar"+r.scalarArgs[f]);return t.push(["type=[",o.join(","),"].join()"].join("")),t.push("proc=CACHED[type]"),n.push("var "+t.join(",")),n.push(["if(!proc){","CACHED[type]=proc=compile([",a.join(","),"])}","return proc(",u.join(","),")}"].join("")),r.debug&&console.log("-----Generated thunk:\n"+n.join("\n")+"\n----------"),new Function("compile",n.join("\n"))(e.bind(void 0,r))}},{"./compile.js":5}],7:[function(r,n,t){n.exports=r("cwise-compiler")},{"cwise-compiler":4}],8:[function(r,n,t){"use strict";function e(r,n,t){var i=0|r[t];if(i<=0)return[];var a,o=new Array(i);if(t===r.length-1)for(a=0;a<i;++a)o[a]=n;else for(a=0;a<i;++a)o[a]=e(r,n,t+1);return o}n.exports=function(r,n){switch(void 0===n&&(n=0),typeof r){case"number":if(r>0)return function(r,n){var t,e;for(t=new Array(r),e=0;e<r;++e)t[e]=n;return t}(0|r,n);break;case"object":if("number"==typeof r.length)return e(r,n,0)}return[]}},{}],9:[function(r,n,t){t.read=function(r,n,t,e,i){var a,o,u=8*i-e-1,s=(1<<u)-1,l=s>>1,f=-7,c=t?i-1:0,h=t?-1:1,_=r[n+c];for(c+=h,a=_&(1<<-f)-1,_>>=-f,f+=u;f>0;a=256*a+r[n+c],c+=h,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=e;f>0;o=256*o+r[n+c],c+=h,f-=8);if(0===a)a=1-l;else{if(a===s)return o?NaN:1/0*(_?-1:1);o+=Math.pow(2,e),a-=l}return(_?-1:1)*o*Math.pow(2,a-e)},t.write=function(r,n,t,e,i,a){var o,u,s,l=8*a-i-1,f=(1<<l)-1,c=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,_=e?0:a-1,p=e?1:-1,g=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,o=f):(o=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-o))<1&&(o--,s*=2),(n+=o+c>=1?h/s:h*Math.pow(2,1-c))*s>=2&&(o++,s/=2),o+c>=f?(u=0,o=f):o+c>=1?(u=(n*s-1)*Math.pow(2,i),o+=c):(u=n*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;r[t+_]=255&u,_+=p,u/=256,i-=8);for(o=o<<i|u,l+=i;l>0;r[t+_]=255&o,_+=p,o/=256,l-=8);r[t+_-p]|=128*g}},{}],10:[function(r,n,t){"use strict";n.exports=function(r){for(var n=new Array(r),t=0;t<r;++t)n[t]=t;return n}},{}],11:[function(r,n,t){function e(r){return!!r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}n.exports=function(r){return null!=r&&(e(r)||function(r){return"function"==typeof r.readFloatLE&&"function"==typeof r.slice&&e(r.slice(0,0))}(r)||!!r._isBuffer)}},{}],12:[function(r,n,t){(function(r){(function(){function e(r,n){return r.set(n[0],n[1]),r}function i(r,n){return r.add(n),r}function a(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}function o(r,n){for(var t=-1,e=null==r?0:r.length;++t<e&&!1!==n(r[t],t,r););return r}function u(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(!n(r[t],t,r))return!1;return!0}function s(r,n){for(var t=-1,e=null==r?0:r.length,i=0,a=[];++t<e;){var o=r[t];n(o,t,r)&&(a[i++]=o)}return a}function l(r,n){return!!(null==r?0:r.length)&&y(r,n,0)>-1}function f(r,n,t){for(var e=-1,i=null==r?0:r.length;++e<i;)if(t(n,r[e]))return!0;return!1}function c(r,n){for(var t=-1,e=null==r?0:r.length,i=Array(e);++t<e;)i[t]=n(r[t],t,r);return i}function h(r,n){for(var t=-1,e=n.length,i=r.length;++t<e;)r[i+t]=n[t];return r}function _(r,n,t,e){var i=-1,a=null==r?0:r.length;for(e&&a&&(t=r[++i]);++i<a;)t=n(t,r[i],i,r);return t}function p(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function g(r,n,t){var e;return t(r,function(r,t,i){if(n(r,t,i))return e=t,!1}),e}function v(r,n,t,e){for(var i=r.length,a=t+(e?1:-1);e?a--:++a<i;)if(n(r[a],a,r))return a;return-1}function y(r,n,t){return n==n?function(r,n,t){var e=t-1,i=r.length;for(;++e<i;)if(r[e]===n)return e;return-1}(r,n,t):v(r,d,t)}function d(r){return r!=r}function b(r,n){var t=null==r?0:r.length;return t?j(r,n)/t:gr}function w(r){return function(n){return null==n?q:n[r]}}function m(r){return function(n){return null==r?q:r[n]}}function A(r,n,t,e,i){return i(r,function(r,i,a){t=e?(e=!1,r):n(t,r,i,a)}),t}function j(r,n){for(var t,e=-1,i=r.length;++e<i;){var a=n(r[e]);a!==q&&(t=t===q?a:t+a)}return t}function x(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}function V(r){return function(n){return r(n)}}function E(r,n){return c(n,function(n){return r[n]})}function k(r,n){return r.has(n)}function I(r,n){for(var t=-1,e=r.length;++t<e&&y(n,r[t],0)>-1;);return t}function S(r,n){for(var t=r.length;t--&&y(n,r[t],0)>-1;);return t}function T(r){return"\\"+vt[r]}function B(r){return ft.test(r)}function N(r){var n=-1,t=Array(r.size);return r.forEach(function(r,e){t[++n]=[e,r]}),t}function U(r,n){return function(t){return r(n(t))}}function z(r,n){for(var t=-1,e=r.length,i=0,a=[];++t<e;){var o=r[t];o!==n&&o!==W||(r[t]=W,a[i++]=t)}return a}function M(r){var n=-1,t=Array(r.size);return r.forEach(function(r){t[++n]=r}),t}function C(r){return B(r)?function(r){var n=st.lastIndex=0;for(;st.test(r);)++n;return n}(r):Ut(r)}function O(r){return B(r)?function(r){return r.match(st)||[]}(r):function(r){return r.split("")}(r)}var q,R=200,L="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",F="Expected a function",D="__lodash_hash_undefined__",P=500,W="__lodash_placeholder__",$=1,Y=2,H=4,Z=1,G=2,J=1,K=2,X=4,Q=8,rr=16,nr=32,tr=64,er=128,ir=256,ar=512,or=30,ur="...",sr=800,lr=16,fr=1,cr=2,hr=1/0,_r=9007199254740991,pr=1.7976931348623157e308,gr=NaN,vr=4294967295,yr=vr-1,dr=vr>>>1,br=[["ary",er],["bind",J],["bindKey",K],["curry",Q],["curryRight",rr],["flip",ar],["partial",nr],["partialRight",tr],["rearg",ir]],wr="[object Arguments]",mr="[object Array]",Ar="[object AsyncFunction]",jr="[object Boolean]",xr="[object Date]",Vr="[object DOMException]",Er="[object Error]",kr="[object Function]",Ir="[object GeneratorFunction]",Sr="[object Map]",Tr="[object Number]",Br="[object Null]",Nr="[object Object]",Ur="[object Promise]",zr="[object Proxy]",Mr="[object RegExp]",Cr="[object Set]",Or="[object String]",qr="[object Symbol]",Rr="[object Undefined]",Lr="[object WeakMap]",Fr="[object WeakSet]",Dr="[object ArrayBuffer]",Pr="[object DataView]",Wr="[object Float32Array]",$r="[object Float64Array]",Yr="[object Int8Array]",Hr="[object Int16Array]",Zr="[object Int32Array]",Gr="[object Uint8Array]",Jr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",Xr="[object Uint32Array]",Qr=/\b__p \+= '';/g,rn=/\b(__p \+=) '' \+/g,nn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tn=/&(?:amp|lt|gt|quot|#39);/g,en=/[&<>"']/g,an=RegExp(tn.source),on=RegExp(en.source),un=/<%-([\s\S]+?)%>/g,sn=/<%([\s\S]+?)%>/g,ln=/<%=([\s\S]+?)%>/g,fn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cn=/^\w*$/,hn=/^\./,_n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pn=/[\\^$.*+?()[\]{}|]/g,gn=RegExp(pn.source),vn=/^\s+|\s+$/g,yn=/^\s+/,dn=/\s+$/,bn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wn=/\{\n\/\* \[wrapped with (.+)\] \*/,mn=/,? & /,An=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jn=/\\(\\)?/g,xn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vn=/\w*$/,En=/^[-+]0x[0-9a-f]+$/i,kn=/^0b[01]+$/i,In=/^\[object .+?Constructor\]$/,Sn=/^0o[0-7]+$/i,Tn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nn=/($^)/,Un=/['\n\r\u2028\u2029\\]/g,zn="\\ud800-\\udfff",Mn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",On="A-Z\\xc0-\\xd6\\xd8-\\xde",qn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Rn="["+zn+"]",Ln="["+qn+"]",Fn="["+Mn+"]",Dn="\\d+",Pn="[\\u2700-\\u27bf]",Wn="["+Cn+"]",$n="[^"+zn+qn+Dn+"\\u2700-\\u27bf"+Cn+On+"]",Yn="\\ud83c[\\udffb-\\udfff]",Hn="[^"+zn+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Gn="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="["+On+"]",Kn="(?:"+Wn+"|"+$n+")",Xn="(?:"+Jn+"|"+$n+")",Qn="(?:['’](?:d|ll|m|re|s|t|ve))?",rt="(?:['’](?:D|LL|M|RE|S|T|VE))?",nt="(?:"+Fn+"|"+Yn+")"+"?",tt="[\\ufe0e\\ufe0f]?",et=tt+nt+("(?:\\u200d(?:"+[Hn,Zn,Gn].join("|")+")"+tt+nt+")*"),it="(?:"+[Pn,Zn,Gn].join("|")+")"+et,at="(?:"+[Hn+Fn+"?",Fn,Zn,Gn,Rn].join("|")+")",ot=RegExp("['’]","g"),ut=RegExp(Fn,"g"),st=RegExp(Yn+"(?="+Yn+")|"+at+et,"g"),lt=RegExp([Jn+"?"+Wn+"+"+Qn+"(?="+[Ln,Jn,"$"].join("|")+")",Xn+"+"+rt+"(?="+[Ln,Jn+Kn,"$"].join("|")+")",Jn+"?"+Kn+"+"+Qn,Jn+"+"+rt,"\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Dn,it].join("|"),"g"),ft=RegExp("[\\u200d"+zn+Mn+"\\ufe0e\\ufe0f]"),ct=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ht=["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"],_t=-1,pt={};pt[Wr]=pt[$r]=pt[Yr]=pt[Hr]=pt[Zr]=pt[Gr]=pt[Jr]=pt[Kr]=pt[Xr]=!0,pt[wr]=pt[mr]=pt[Dr]=pt[jr]=pt[Pr]=pt[xr]=pt[Er]=pt[kr]=pt[Sr]=pt[Tr]=pt[Nr]=pt[Mr]=pt[Cr]=pt[Or]=pt[Lr]=!1;var gt={};gt[wr]=gt[mr]=gt[Dr]=gt[Pr]=gt[jr]=gt[xr]=gt[Wr]=gt[$r]=gt[Yr]=gt[Hr]=gt[Zr]=gt[Sr]=gt[Tr]=gt[Nr]=gt[Mr]=gt[Cr]=gt[Or]=gt[qr]=gt[Gr]=gt[Jr]=gt[Kr]=gt[Xr]=!0,gt[Er]=gt[kr]=gt[Lr]=!1;var vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yt=parseFloat,dt=parseInt,bt="object"==typeof r&&r&&r.Object===Object&&r,wt="object"==typeof self&&self&&self.Object===Object&&self,mt=bt||wt||Function("return this")(),At="object"==typeof t&&t&&!t.nodeType&&t,jt=At&&"object"==typeof n&&n&&!n.nodeType&&n,xt=jt&&jt.exports===At,Vt=xt&&bt.process,Et=function(){try{return Vt&&Vt.binding&&Vt.binding("util")}catch(r){}}(),kt=Et&&Et.isArrayBuffer,It=Et&&Et.isDate,St=Et&&Et.isMap,Tt=Et&&Et.isRegExp,Bt=Et&&Et.isSet,Nt=Et&&Et.isTypedArray,Ut=w("length"),zt=m({"À":"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"}),Mt=m({"&":"&","<":"<",">":">",'"':""","'":"'"}),Ct=m({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Ot=function r(n){function t(r){if(ra(r)&&!Wu(r)&&!(r instanceof Mn)){if(r instanceof zn)return r;if(Pa.call(r,"__wrapped__"))return xi(r)}return new zn(r)}function m(){}function zn(r,n){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=q}function Mn(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=vr,this.__views__=[]}function Cn(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function On(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function qn(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Rn(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new qn;++n<t;)this.add(r[n])}function Ln(r){var n=this.__data__=new On(r);this.size=n.size}function Fn(r,n){var t=Wu(r),e=!t&&Pu(r),i=!t&&!e&&Yu(r),a=!t&&!e&&!i&&Ku(r),o=t||e||i||a,u=o?x(r.length,Ca):[],s=u.length;for(var l in r)!n&&!Pa.call(r,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||fi(l,s))||u.push(l);return u}function Dn(r){var n=r.length;return n?r[Qt(0,n-1)]:q}function Pn(r,n,t){(t===q||Yi(r[n],t))&&(t!==q||n in r)||Hn(r,n,t)}function Wn(r,n,t){var e=r[n];Pa.call(r,n)&&Yi(e,t)&&(t!==q||n in r)||Hn(r,n,t)}function $n(r,n){for(var t=r.length;t--;)if(Yi(r[t][0],n))return t;return-1}function Yn(r,n){return r&&ke(n,pa(n),r)}function Hn(r,n,t){"__proto__"==n&&uo?uo(r,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[n]=t}function Zn(r,n){for(var t=-1,e=n.length,i=Sa(e),a=null==r;++t<e;)i[t]=a?q:ha(r,n[t]);return i}function Gn(r,n,t){return r==r&&(t!==q&&(r=r<=t?r:t),n!==q&&(r=r>=n?r:n)),r}function Jn(r,n,t,a,u,s){var l,f=n&$,c=n&Y,h=n&H;if(t&&(l=u?t(r,a,u,s):t(r)),l!==q)return l;if(!Qi(r))return r;var p=Wu(r);if(p){if(l=function(r){var n=r.length,t=r.constructor(n);return n&&"string"==typeof r[0]&&Pa.call(r,"index")&&(t.index=r.index,t.input=r.input),t}(r),!f)return Ee(r,l)}else{var g=ru(r),v=g==kr||g==Ir;if(Yu(r))return we(r,f);if(g==Nr||g==wr||v&&!u){if(l=c||v?{}:si(r),!f)return c?function(r,n){return ke(r,Qo(r),n)}(r,function(n,t){return n&&ke(r,ga(r),n)}(l)):function(r,n){return ke(r,Xo(r),n)}(r,Yn(l,r))}else{if(!gt[g])return u?r:{};l=function(r,n,t,a){var o=r.constructor;switch(n){case Dr:return me(r);case jr:case xr:return new o(+r);case Pr:return function(r,n){var t=a?me(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}(r);case Wr:case $r:case Yr:case Hr:case Zr:case Gr:case Jr:case Kr:case Xr:return Ae(r,a);case Sr:return function(r,n,i){return _(a?t(N(r),$):N(r),e,new r.constructor)}(r);case Tr:case Or:return new o(r);case Mr:return function(r){var n=new r.constructor(r.source,Vn.exec(r));return n.lastIndex=r.lastIndex,n}(r);case Cr:return function(r,n,e){return _(a?t(M(r),$):M(r),i,new r.constructor)}(r);case qr:return function(r){return Ro?za(Ro.call(r)):{}}(r)}}(r,g,Jn,f)}}s||(s=new Ln);var y=s.get(r);if(y)return y;s.set(r,l);var d=p?q:(h?c?ri:Qe:c?ga:pa)(r);return o(d||r,function(e,i){d&&(e=r[i=e]),Wn(l,i,Jn(e,n,t,i,r,s))}),l}function Kn(r,n,t){var e=t.length;if(null==r)return!e;for(r=za(r);e--;){var i=t[e],a=n[i],o=r[i];if(o===q&&!(i in r)||!a(o))return!1}return!0}function Xn(r,n,t){if("function"!=typeof r)throw new Oa(F);return eu(function(){r.apply(q,t)},n)}function Qn(r,n,t,e){var i=-1,a=l,o=!0,u=r.length,s=[],h=n.length;if(!u)return s;t&&(n=c(n,V(t))),e?(a=f,o=!1):n.length>=R&&(a=k,o=!1,n=new Rn(n));r:for(;++i<u;){var _=r[i],p=null==t?_:t(_);if(_=e||0!==_?_:0,o&&p==p){for(var g=h;g--;)if(n[g]===p)continue r;s.push(_)}else a(n,p,e)||s.push(_)}return s}function rt(r,n,t){for(var e=-1,i=r.length;++e<i;){var a=r[e],o=n(a);if(null!=o&&(u===q?o==o&&!ia(o):t(o,u)))var u=o,s=a}return s}function nt(r,n){var t=[];return Do(r,function(r,e,i){n(r,e,i)&&t.push(r)}),t}function tt(r,n,t,e,i){var a=-1,o=r.length;for(t||(t=li),i||(i=[]);++a<o;){var u=r[a];n>0&&t(u)?n>1?tt(u,n-1,t,e,i):h(i,u):e||(i[i.length]=u)}return i}function et(r,n){return r&&Wo(r,n,pa)}function it(r,n){return r&&$o(r,n,pa)}function at(r,n){return s(n,function(n){return Ji(r[n])})}function st(r,n){for(var t=0,e=(n=de(n,r)).length;null!=r&&t<e;)r=r[Ai(n[t++])];return t&&t==e?r:q}function ft(r,n,t){var e=n(r);return Wu(r)?e:h(e,t(r))}function vt(r){return null==r?r===q?Rr:Br:oo&&oo in za(r)?function(r){var n=Pa.call(r,oo),t=r[oo];try{r[oo]=q;var e=!0}catch(r){}var i=Ya.call(r);return e&&(n?r[oo]=t:delete r[oo]),i}(r):function(r){return Ya.call(r)}(r)}function bt(r,n){return r>n}function wt(r,n){return null!=r&&Pa.call(r,n)}function At(r,n){return null!=r&&n in za(r)}function jt(r,n,t){for(var e=t?f:l,i=r[0].length,a=r.length,o=a,u=Sa(a),s=1/0,h=[];o--;){var _=r[o];o&&n&&(_=c(_,V(n))),s=wo(_.length,s),u[o]=!t&&(n||i>=120&&_.length>=120)?new Rn(o&&_):q}_=r[0];var p=-1,g=u[0];r:for(;++p<i&&h.length<s;){var v=_[p],y=n?n(v):v;if(v=t||0!==v?v:0,!(g?k(g,y):e(h,y,t))){for(o=a;--o;){var d=u[o];if(!(d?k(d,y):e(r[o],y,t)))continue r}g&&g.push(y),h.push(v)}}return h}function Vt(r,n,t){var e=null==(r=di(r,n=de(n,r)))?r:r[Ai(Si(n))];return null==e?q:a(e,r,t)}function Et(r){return ra(r)&&vt(r)==wr}function Ut(r,n,t,e,i){return r===n||(null==r||null==n||!ra(r)&&!ra(n)?r!=r&&n!=n:function(r,n,t,e,i,a){var o=Wu(r),u=Wu(n),s=o?mr:ru(r),l=u?mr:ru(n),f=(s=s==wr?Nr:s)==Nr,c=(l=l==wr?Nr:l)==Nr,h=s==l;if(h&&Yu(r)){if(!Yu(n))return!1;o=!0,f=!1}if(h&&!f)return a||(a=new Ln),o||Ku(r)?Ke(r,n,t,e,i,a):function(r,n,t,e,i,a,o){switch(s){case Pr:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case Dr:return!(r.byteLength!=n.byteLength||!a(new Xa(r),new Xa(n)));case jr:case xr:case Tr:return Yi(+r,+n);case Er:return r.name==n.name&&r.message==n.message;case Mr:case Or:return r==n+"";case Sr:var u=N;case Cr:var l=e&Z;if(u||(u=M),r.size!=n.size&&!l)return!1;var f=o.get(r);if(f)return f==n;e|=G,o.set(r,n);var c=Ke(u(r),u(n),e,i,a,o);return o.delete(r),c;case qr:if(Ro)return Ro.call(r)==Ro.call(n)}return!1}(r,n,0,t,e,i,a);if(!(t&Z)){var _=f&&Pa.call(r,"__wrapped__"),p=c&&Pa.call(n,"__wrapped__");if(_||p){var g=_?r.value():r,v=p?n.value():n;return a||(a=new Ln),i(g,v,t,e,a)}}return!!h&&(a||(a=new Ln),function(r,n,t,e,i,a){var o=t&Z,u=Qe(r),s=u.length,l=Qe(n).length;if(s!=l&&!o)return!1;for(var f=s;f--;){var c=u[f];if(!(o?c in n:Pa.call(n,c)))return!1}var h=a.get(r);if(h&&a.get(n))return h==n;var _=!0;a.set(r,n),a.set(n,r);for(var p=o;++f<s;){c=u[f];var g=r[c],v=n[c];if(e)var y=o?e(v,g,c,n,r,a):e(g,v,c,r,n,a);if(!(y===q?g===v||i(g,v,t,e,a):y)){_=!1;break}p||(p="constructor"==c)}if(_&&!p){var d=r.constructor,b=n.constructor;d!=b&&"constructor"in r&&"constructor"in n&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(_=!1)}return a.delete(r),a.delete(n),_}(r,n,t,e,i,a))}(r,n,t,e,Ut,i))}function qt(r,n,t,e){var i=t.length,a=i,o=!e;if(null==r)return!a;for(r=za(r);i--;){var u=t[i];if(o&&u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++i<a;){var s=(u=t[i])[0],l=r[s],f=u[1];if(o&&u[2]){if(l===q&&!(s in r))return!1}else{var c=new Ln;if(e)var h=e(l,f,s,r,n,c);if(!(h===q?Ut(f,l,Z|G,e,c):h))return!1}}return!0}function Rt(r){return!(!Qi(r)||!!$a&&$a in r)&&(Ji(r)?Ga:In).test(ji(r))}function Lt(r){return"function"==typeof r?r:null==r?Aa:"object"==typeof r?Wu(r)?Yt(r[0],r[1]):$t(r):Ea(r)}function Ft(r){if(!pi(r))return yo(r);var n=[];for(var t in za(r))Pa.call(r,t)&&"constructor"!=t&&n.push(t);return n}function Dt(r){if(!Qi(r))return function(r){var n=[];if(null!=r)for(var t in za(r))n.push(t);return n}(r);var n=pi(r),t=[];for(var e in r)("constructor"!=e||!n&&Pa.call(r,e))&&t.push(e);return t}function Pt(r,n){return r<n}function Wt(r,n){var t=-1,e=Hi(r)?Sa(r.length):[];return Do(r,function(r,i,a){e[++t]=n(r,i,a)}),e}function $t(r){var n=ai(r);return 1==n.length&&n[0][2]?vi(n[0][0],n[0][1]):function(t){return t===r||qt(t,r,n)}}function Yt(r,n){return hi(r)&&gi(n)?vi(Ai(r),n):function(t){var e=ha(t,r);return e===q&&e===n?_a(t,r):Ut(n,e,Z|G)}}function Ht(r,n,t,e,i){r!==n&&Wo(n,function(a,o){if(Qi(a))i||(i=new Ln),function(r,n,t,e,i,a,o){var u=r[t],s=n[t],l=o.get(s);if(l)Pn(r,t,l);else{var f=a?a(u,s,t+"",r,n,o):q,c=f===q;if(c){var h=Wu(s),_=!h&&Yu(s),p=!h&&!_&&Ku(s);f=s,h||_||p?Wu(u)?f=u:Zi(u)?f=Ee(u):_?(c=!1,f=we(s,!0)):p?(c=!1,f=Ae(s,!0)):f=[]:ta(s)||Pu(s)?(f=u,Pu(u)?f=fa(u):(!Qi(u)||e&&Ji(u))&&(f=si(s))):c=!1}c&&(o.set(s,f),i(f,s,e,a,o),o.delete(s)),Pn(r,t,f)}}(r,n,o,t,Ht,e,i);else{var u=e?e(r[o],a,o+"",r,n,i):q;u===q&&(u=a),Pn(r,o,u)}},ga)}function Zt(r,n){var t=r.length;if(t)return n+=n<0?t:0,fi(n,t)?r[n]:q}function Gt(r,n,t){var e=-1;return n=c(n.length?n:[Aa],V(ei())),function(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}(Wt(r,function(r,t,i){return{criteria:c(n,function(n){return n(r)}),index:++e,value:r}}),function(r,n){return function(r,n,t){for(var e=-1,i=r.criteria,a=n.criteria,o=i.length,u=t.length;++e<o;){var s=je(i[e],a[e]);if(s){if(e>=u)return s;var l=t[e];return s*("desc"==l?-1:1)}}return r.index-n.index}(r,n,t)})}function Jt(r,n,t){for(var e=-1,i=n.length,a={};++e<i;){var o=n[e],u=st(r,o);t(u,o)&&te(a,de(o,r),u)}return a}function Kt(r,n,t,e){var i=e?function(r,n,t,e){for(var i=t-1,a=r.length;++i<a;)if(e(r[i],n))return i;return-1}:y,a=-1,o=n.length,u=r;for(r===n&&(n=Ee(n)),t&&(u=c(r,V(t)));++a<o;)for(var s=0,l=n[a],f=t?t(l):l;(s=i(u,f,s,e))>-1;)u!==r&&eo.call(u,s,1),eo.call(r,s,1);return r}function Xt(r,n){for(var t=r?n.length:0,e=t-1;t--;){var i=n[t];if(t==e||i!==a){var a=i;fi(i)?eo.call(r,i,1):fe(r,i)}}return r}function Qt(r,n){return r+ho(jo()*(n-r+1))}function re(r,n){var t="";if(!r||n<1||n>_r)return t;do{n%2&&(t+=r),(n=ho(n/2))&&(r+=r)}while(n);return t}function ne(r,n){return iu(yi(r,n,Aa),r+"")}function te(r,n,t,e){if(!Qi(r))return r;for(var i=-1,a=(n=de(n,r)).length,o=a-1,u=r;null!=u&&++i<a;){var s=Ai(n[i]),l=t;if(i!=o){var f=u[s];(l=e?e(f,s,u):q)===q&&(l=Qi(f)?f:fi(n[i+1])?[]:{})}Wn(u,s,l),u=u[s]}return r}function ee(r,n,t){var e=-1,i=r.length;n<0&&(n=-n>i?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var a=Sa(i);++e<i;)a[e]=r[e+n];return a}function ie(r,n,t){var e=0,i=null==r?e:r.length;if("number"==typeof n&&n==n&&i<=dr){for(;e<i;){var a=e+i>>>1,o=r[a];null!==o&&!ia(o)&&(t?o<=n:o<n)?e=a+1:i=a}return i}return ae(r,n,Aa,t)}function ae(r,n,t,e){n=t(n);for(var i=0,a=null==r?0:r.length,o=n!=n,u=null===n,s=ia(n),l=n===q;i<a;){var f=ho((i+a)/2),c=t(r[f]),h=c!==q,_=null===c,p=c==c,g=ia(c);if(o)var v=e||p;else v=l?p&&(e||h):u?p&&h&&(e||!_):s?p&&h&&!_&&(e||!g):!_&&!g&&(e?c<=n:c<n);v?i=f+1:a=f}return wo(a,yr)}function oe(r,n){for(var t=-1,e=r.length,i=0,a=[];++t<e;){var o=r[t],u=n?n(o):o;if(!t||!Yi(u,s)){var s=u;a[i++]=0===o?0:o}}return a}function ue(r){return"number"==typeof r?r:ia(r)?gr:+r}function se(r){if("string"==typeof r)return r;if(Wu(r))return c(r,se)+"";if(ia(r))return Lo?Lo.call(r):"";var n=r+"";return"0"==n&&1/r==-hr?"-0":n}function le(r,n,t){var e=-1,i=l,a=r.length,o=!0,u=[],s=u;if(t)o=!1,i=f;else if(a>=R){var c=n?null:Jo(r);if(c)return M(c);o=!1,i=k,s=new Rn}else s=n?[]:u;r:for(;++e<a;){var h=r[e],_=n?n(h):h;if(h=t||0!==h?h:0,o&&_==_){for(var p=s.length;p--;)if(s[p]===_)continue r;n&&s.push(_),u.push(h)}else i(s,_,t)||(s!==u&&s.push(_),u.push(h))}return u}function fe(r,n){return n=de(n,r),null==(r=di(r,n))||delete r[Ai(Si(n))]}function ce(r,n,t,e){return te(r,n,t(st(r,n)),e)}function he(r,n,t,e){for(var i=r.length,a=e?i:-1;(e?a--:++a<i)&&n(r[a],a,r););return t?ee(r,e?0:a,e?a+1:i):ee(r,e?a+1:0,e?i:a)}function _e(r,n){var t=r;return t instanceof Mn&&(t=t.value()),_(n,function(r,n){return n.func.apply(n.thisArg,h([r],n.args))},t)}function pe(r,n,t){var e=r.length;if(e<2)return e?le(r[0]):[];for(var i=-1,a=Sa(e);++i<e;)for(var o=r[i],u=-1;++u<e;)u!=i&&(a[i]=Qn(a[i]||o,r[u],n,t));return le(tt(a,1),n,t)}function ge(r,n,t){for(var e=-1,i=r.length,a=n.length,o={};++e<i;){var u=e<a?n[e]:q;t(o,r[e],u)}return o}function ve(r){return Zi(r)?r:[]}function ye(r){return"function"==typeof r?r:Aa}function de(r,n){return Wu(r)?r:hi(r,n)?[r]:au(ca(r))}function be(r,n,t){var e=r.length;return t=t===q?e:t,!n&&t>=e?r:ee(r,n,t)}function we(r,n){if(n)return r.slice();var t=r.length,e=Qa?Qa(t):new r.constructor(t);return r.copy(e),e}function me(r){var n=new r.constructor(r.byteLength);return new Xa(n).set(new Xa(r)),n}function Ae(r,n){var t=n?me(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function je(r,n){if(r!==n){var t=r!==q,e=null===r,i=r==r,a=ia(r),o=n!==q,u=null===n,s=n==n,l=ia(n);if(!u&&!l&&!a&&r>n||a&&o&&s&&!u&&!l||e&&o&&s||!t&&s||!i)return 1;if(!e&&!a&&!l&&r<n||l&&t&&i&&!e&&!a||u&&t&&i||!o&&i||!s)return-1}return 0}function xe(r,n,t,e){for(var i=-1,a=r.length,o=t.length,u=-1,s=n.length,l=bo(a-o,0),f=Sa(s+l),c=!e;++u<s;)f[u]=n[u];for(;++i<o;)(c||i<a)&&(f[t[i]]=r[i]);for(;l--;)f[u++]=r[i++];return f}function Ve(r,n,t,e){for(var i=-1,a=r.length,o=-1,u=t.length,s=-1,l=n.length,f=bo(a-u,0),c=Sa(f+l),h=!e;++i<f;)c[i]=r[i];for(var _=i;++s<l;)c[_+s]=n[s];for(;++o<u;)(h||i<a)&&(c[_+t[o]]=r[i++]);return c}function Ee(r,n){var t=-1,e=r.length;for(n||(n=Sa(e));++t<e;)n[t]=r[t];return n}function ke(r,n,t,e){var i=!t;t||(t={});for(var a=-1,o=n.length;++a<o;){var u=n[a],s=e?e(t[u],r[u],u,t,r):q;s===q&&(s=r[u]),i?Hn(t,u,s):Wn(t,u,s)}return t}function Ie(r,n){return function(t,e){var i=Wu(t)?function(r,n,t,e){for(var i=-1,a=null==r?0:r.length;++i<a;){var o=r[i];n(e,o,t(o),r)}return e}:function(r,n,t,e){return Do(r,function(r,i,a){n(e,r,t(r),a)}),e},a=n?n():{};return i(t,r,ei(e,2),a)}}function Se(r){return ne(function(n,t){var e=-1,i=t.length,a=i>1?t[i-1]:q,o=i>2?t[2]:q;for(a=r.length>3&&"function"==typeof a?(i--,a):q,o&&ci(t[0],t[1],o)&&(a=i<3?q:a,i=1),n=za(n);++e<i;){var u=t[e];u&&r(n,u,e,a)}return n})}function Te(r,n){return function(t,e){if(null==t)return t;if(!Hi(t))return r(t,e);for(var i=t.length,a=n?i:-1,o=za(t);(n?a--:++a<i)&&!1!==e(o[a],a,o););return t}}function Be(r){return function(n,t,e){for(var i=-1,a=za(n),o=e(n),u=o.length;u--;){var s=o[r?u:++i];if(!1===t(a[s],s,a))break}return n}}function Ne(r){return function(n){var t=B(n=ca(n))?O(n):q,e=t?t[0]:n.charAt(0),i=t?be(t,1).join(""):n.slice(1);return e[r]()+i}}function Ue(r){return function(n){return _(wa(ba(n).replace(ot,"")),r,"")}}function ze(r){return function(){var n=arguments;switch(n.length){case 0:return new r;case 1:return new r(n[0]);case 2:return new r(n[0],n[1]);case 3:return new r(n[0],n[1],n[2]);case 4:return new r(n[0],n[1],n[2],n[3]);case 5:return new r(n[0],n[1],n[2],n[3],n[4]);case 6:return new r(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var t=Fo(r.prototype),e=r.apply(t,n);return Qi(e)?e:t}}function Me(r){return function(n,t,e){var i=za(n);if(!Hi(n)){var a=ei(t,3);n=pa(n),t=function(r){return a(i[r],r,i)}}var o=r(n,t,e);return o>-1?i[a?n[o]:o]:q}}function Ce(r){return Xe(function(n){var t=n.length,e=t,i=zn.prototype.thru;for(r&&n.reverse();e--;){var a=n[e];if("function"!=typeof a)throw new Oa(F);if(i&&!o&&"wrapper"==ni(a))var o=new zn([],!0)}for(e=o?e:t;++e<t;){var u=ni(a=n[e]),s="wrapper"==u?Ko(a):q;o=s&&_i(s[0])&&s[1]==(er|Q|nr|ir)&&!s[4].length&&1==s[9]?o[ni(s[0])].apply(o,s[3]):1==a.length&&_i(a)?o[u]():o.thru(a)}return function(){var r=arguments,e=r[0];if(o&&1==r.length&&Wu(e))return o.plant(e).value();for(var i=0,a=t?n[i].apply(this,r):e;++i<t;)a=n[i].call(this,a);return a}})}function Oe(r,n,t,e,i,a,o,u,s,l){function f(){for(var y=arguments.length,d=Sa(y),b=y;b--;)d[b]=arguments[b];if(p)var w=ti(f),m=function(r,n){for(var t=r.length,e=0;t--;)r[t]===n&&++e;return e}(d,w);if(e&&(d=xe(d,e,i,p)),a&&(d=Ve(d,a,o,p)),y-=m,p&&y<l){var A=z(d,w);return We(r,n,Oe,f.placeholder,t,d,A,u,s,l-y)}var j=h?t:this,x=_?j[r]:r;return y=d.length,u?d=function(r,n){for(var t=r.length,e=wo(n.length,t),i=Ee(r);e--;){var a=n[e];r[e]=fi(a,t)?i[a]:q}return r}(d,u):g&&y>1&&d.reverse(),c&&s<y&&(d.length=s),this&&this!==mt&&this instanceof f&&(x=v||ze(x)),x.apply(j,d)}var c=n&er,h=n&J,_=n&K,p=n&(Q|rr),g=n&ar,v=_?q:ze(r);return f}function qe(r,n){return function(t,e){return function(r,n,t,e){return et(r,function(r,i,a){n(e,t(r),i,a)}),e}(t,r,n(e),{})}}function Re(r,n){return function(t,e){var i;if(t===q&&e===q)return n;if(t!==q&&(i=t),e!==q){if(i===q)return e;"string"==typeof t||"string"==typeof e?(t=se(t),e=se(e)):(t=ue(t),e=ue(e)),i=r(t,e)}return i}}function Le(r){return Xe(function(n){return n=c(n,V(ei())),ne(function(t){var e=this;return r(n,function(r){return a(r,e,t)})})})}function Fe(r,n){var t=(n=n===q?" ":se(n)).length;if(t<2)return t?re(n,r):n;var e=re(n,co(r/C(n)));return B(n)?be(O(e),0,r).join(""):e.slice(0,r)}function De(r){return function(n,t,e){return e&&"number"!=typeof e&&ci(n,t,e)&&(t=e=q),n=oa(n),t===q?(t=n,n=0):t=oa(t),e=e===q?n<t?1:-1:oa(e),function(r,n,e,i){for(var a=-1,o=bo(co((t-r)/(e||1)),0),u=Sa(o);o--;)u[i?o:++a]=r,r+=e;return u}(n,0,e,r)}}function Pe(r){return function(n,t){return"string"==typeof n&&"string"==typeof t||(n=la(n),t=la(t)),r(n,t)}}function We(r,n,t,e,i,a,o,u,s,l){var f=n&Q;n|=f?nr:tr,(n&=~(f?tr:nr))&X||(n&=~(J|K));var c=[r,n,i,f?a:q,f?o:q,f?q:a,f?q:o,u,s,l],h=t.apply(q,c);return _i(r)&&tu(h,c),h.placeholder=e,bi(h,r,n)}function $e(r){var n=Ua[r];return function(r,t){if(r=la(r),t=null==t?0:wo(ua(t),292)){var e=(ca(r)+"e").split("e");return+((e=(ca(n(e[0]+"e"+(+e[1]+t)))+"e").split("e"))[0]+"e"+(+e[1]-t))}return n(r)}}function Ye(r){return function(n){var t=ru(n);return t==Sr?N(n):t==Cr?function(r){var n=-1,t=Array(r.size);return r.forEach(function(r){t[++n]=[r,r]}),t}(n):function(t,e){return c(r(n),function(r){return[r,t[r]]})}(n)}}function He(r,n,t,e,i,o,u,s){var l=n&K;if(!l&&"function"!=typeof r)throw new Oa(F);var f=e?e.length:0;if(f||(n&=~(nr|tr),e=i=q),u=u===q?u:bo(ua(u),0),s=s===q?s:ua(s),f-=i?i.length:0,n&tr){var c=e,h=i;e=i=q}var _=l?q:Ko(r),p=[r,n,t,e,i,c,h,o,u,s];if(_&&function(r,n){var t=r[1],e=n[1],i=t|e,a=i<(J|K|er),o=e==er&&t==Q||e==er&&t==ir&&r[7].length<=n[8]||e==(er|ir)&&n[7].length<=n[8]&&t==Q;if(!a&&!o)return r;e&J&&(r[2]=n[2],i|=t&J?0:X);var u=n[3];if(u){var s=r[3];r[3]=s?xe(s,u,n[4]):u,r[4]=s?z(r[3],W):n[4]}(u=n[5])&&(s=r[5],r[5]=s?Ve(s,u,n[6]):u,r[6]=s?z(r[5],W):n[6]),(u=n[7])&&(r[7]=u),e&er&&(r[8]=null==r[8]?n[8]:wo(r[8],n[8])),null==r[9]&&(r[9]=n[9]),r[0]=n[0],r[1]=i}(p,_),r=p[0],n=p[1],t=p[2],e=p[3],i=p[4],!(s=p[9]=p[9]===q?l?0:r.length:bo(p[9]-f,0))&&n&(Q|rr)&&(n&=~(Q|rr)),n&&n!=J)g=n==Q||n==rr?function(r,n,t){function e(){for(var o=arguments.length,u=Sa(o),s=o,l=ti(e);s--;)u[s]=arguments[s];var f=o<3&&u[0]!==l&&u[o-1]!==l?[]:z(u,l);return(o-=f.length)<t?We(r,n,Oe,e.placeholder,q,u,f,q,q,t-o):a(this&&this!==mt&&this instanceof e?i:r,this,u)}var i=ze(r);return e}(r,n,s):n!=nr&&n!=(J|nr)||i.length?Oe.apply(q,p):function(r,t,e,i){function o(){for(var n=-1,t=arguments.length,l=-1,f=i.length,c=Sa(f+t),h=this&&this!==mt&&this instanceof o?s:r;++l<f;)c[l]=i[l];for(;t--;)c[l++]=arguments[++n];return a(h,u?e:this,c)}var u=n&J,s=ze(r);return o}(r,0,t,e);else var g=function(r,t,e){function i(){return(this&&this!==mt&&this instanceof i?o:r).apply(a?e:this,arguments)}var a=n&J,o=ze(r);return i}(r,0,t);return bi((_?Yo:tu)(g,p),r,n)}function Ze(r,n,t,e){return r===q||Yi(r,La[t])&&!Pa.call(e,t)?n:r}function Ge(r,n,t,e,i,a){return Qi(r)&&Qi(n)&&(a.set(n,r),Ht(r,n,q,Ge,a),a.delete(n)),r}function Je(r){return ta(r)?q:r}function Ke(r,n,t,e,i,a){var o=t&Z,u=r.length,s=n.length;if(u!=s&&!(o&&s>u))return!1;var l=a.get(r);if(l&&a.get(n))return l==n;var f=-1,c=!0,h=t&G?new Rn:q;for(a.set(r,n),a.set(n,r);++f<u;){var _=r[f],g=n[f];if(e)var v=o?e(g,_,f,n,r,a):e(_,g,f,r,n,a);if(v!==q){if(v)continue;c=!1;break}if(h){if(!p(n,function(r,n){if(!k(h,n)&&(_===r||i(_,r,t,e,a)))return h.push(n)})){c=!1;break}}else if(_!==g&&!i(_,g,t,e,a)){c=!1;break}}return a.delete(r),a.delete(n),c}function Xe(r){return iu(yi(r,q,ki),r+"")}function Qe(r){return ft(r,pa,Xo)}function ri(r){return ft(r,ga,Qo)}function ni(r){for(var n=r.name+"",t=No[n],e=Pa.call(No,n)?t.length:0;e--;){var i=t[e],a=i.func;if(null==a||a==r)return i.name}return n}function ti(r){return(Pa.call(t,"placeholder")?t:r).placeholder}function ei(){var r=t.iteratee||ja;return r=r===ja?Lt:r,arguments.length?r(arguments[0],arguments[1]):r}function ii(r,n){var t=r.__data__;return function(r){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}()?t["string"==typeof n?"string":"hash"]:t.map}function ai(r){for(var n=pa(r),t=n.length;t--;){var e=n[t],i=r[e];n[t]=[e,i,gi(i)]}return n}function oi(r,n){var t=null==r?q:r[n];return Rt(t)?t:q}function ui(r,n,t){for(var e=-1,i=(n=de(n,r)).length,a=!1;++e<i;){var o=Ai(n[e]);if(!(a=null!=r&&t(r,o)))break;r=r[o]}return a||++e!=i?a:!!(i=null==r?0:r.length)&&Xi(i)&&fi(o,i)&&(Wu(r)||Pu(r))}function si(r){return"function"!=typeof r.constructor||pi(r)?{}:Fo(ro(r))}function li(r){return Wu(r)||Pu(r)||!!(io&&r&&r[io])}function fi(r,n){return!!(n=null==n?_r:n)&&("number"==typeof r||Tn.test(r))&&r>-1&&r%1==0&&r<n}function ci(r,n,t){if(!Qi(t))return!1;var e=typeof n;return!!("number"==e?Hi(t)&&fi(n,t.length):"string"==e&&n in t)&&Yi(t[n],r)}function hi(r,n){if(Wu(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!ia(r))||cn.test(r)||!fn.test(r)||null!=n&&r in za(n)}function _i(r){var n=ni(r),e=t[n];if("function"!=typeof e||!(n in Mn.prototype))return!1;if(r===e)return!0;var i=Ko(e);return!!i&&r===i[0]}function pi(r){var n=r&&r.constructor;return r===("function"==typeof n&&n.prototype||La)}function gi(r){return r==r&&!Qi(r)}function vi(r,n){return function(t){return null!=t&&t[r]===n&&(n!==q||r in za(t))}}function yi(r,n,t){return n=bo(n===q?r.length-1:n,0),function(){for(var e=arguments,i=-1,o=bo(e.length-n,0),u=Sa(o);++i<o;)u[i]=e[n+i];i=-1;for(var s=Sa(n+1);++i<n;)s[i]=e[i];return s[n]=t(u),a(r,this,s)}}function di(r,n){return n.length<2?r:st(r,ee(n,0,-1))}function bi(r,n,t){var e=n+"";return iu(r,function(r,n){var t=n.length;if(!t)return r;var e=t-1;return n[e]=(t>1?"& ":"")+n[e],n=n.join(t>2?", ":" "),r.replace(bn,"{\n/* [wrapped with "+n+"] */\n")}(e,function(r,n){return o(br,function(t){var e="_."+t[0];n&t[1]&&!l(r,e)&&r.push(e)}),r.sort()}(function(r){var n=e.match(wn);return n?n[1].split(mn):[]}(),t)))}function wi(r){var n=0,t=0;return function(){var e=mo(),i=lr-(e-t);if(t=e,i>0){if(++n>=sr)return arguments[0]}else n=0;return r.apply(q,arguments)}}function mi(r,n){var t=-1,e=r.length,i=e-1;for(n=n===q?e:n;++t<n;){var a=Qt(t,i),o=r[a];r[a]=r[t],r[t]=o}return r.length=n,r}function Ai(r){if("string"==typeof r||ia(r))return r;var n=r+"";return"0"==n&&1/r==-hr?"-0":n}function ji(r){if(null!=r){try{return Da.call(r)}catch(r){}try{return r+""}catch(r){}}return""}function xi(r){if(r instanceof Mn)return r.clone();var n=new zn(r.__wrapped__,r.__chain__);return n.__actions__=Ee(r.__actions__),n.__index__=r.__index__,n.__values__=r.__values__,n}function Vi(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=null==t?0:ua(t);return i<0&&(i=bo(e+i,0)),v(r,ei(n,3),i)}function Ei(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=e-1;return t!==q&&(i=ua(t),i=t<0?bo(e+i,0):wo(i,e-1)),v(r,ei(n,3),i,!0)}function ki(r){return(null==r?0:r.length)?tt(r,1):[]}function Ii(r){return r&&r.length?r[0]:q}function Si(r){var n=null==r?0:r.length;return n?r[n-1]:q}function Ti(r,n){return r&&r.length&&n&&n.length?Kt(r,n):r}function Bi(r){return null==r?r:xo.call(r)}function Ni(r){if(!r||!r.length)return[];var n=0;return r=s(r,function(r){if(Zi(r))return n=bo(r.length,n),!0}),x(n,function(n){return c(r,w(n))})}function Ui(r,n){if(!r||!r.length)return[];var t=Ni(r);return null==n?t:c(t,function(r){return a(n,q,r)})}function zi(r){var n=t(r);return n.__chain__=!0,n}function Mi(r,n){return n(r)}function Ci(r,n){return(Wu(r)?o:Do)(r,ei(n,3))}function Oi(r,n){return(Wu(r)?function(r,n){for(var t=null==r?0:r.length;t--&&!1!==n(r[t],t,r););return r}:Po)(r,ei(n,3))}function qi(r,n){return(Wu(r)?c:Wt)(r,ei(n,3))}function Ri(r,n,t){return n=t?q:n,n=r&&null==n?r.length:n,He(r,er,q,q,q,q,n)}function Li(r,n){var t;if("function"!=typeof n)throw new Oa(F);return r=ua(r),function(){return--r>0&&(t=n.apply(this,arguments)),r<=1&&(n=q),t}}function Fi(r,n,t){var e=He(r,Q,q,q,q,q,q,n=t?q:n);return e.placeholder=Fi.placeholder,e}function Di(r,n,t){var e=He(r,rr,q,q,q,q,q,n=t?q:n);return e.placeholder=Di.placeholder,e}function Pi(r,n,t){function e(n){var t=s,e=l;return s=l=q,p=n,c=r.apply(e,t)}function i(r){var t=r-_;return _===q||t>=n||t<0||v&&r-p>=f}function a(){var r=Nu();if(i(r))return o(r);h=eu(a,function(t){var e=n-(r-_);return v?wo(e,f-(r-p)):e}())}function o(r){return h=q,y&&s?e(r):(s=l=q,c)}function u(){var r=Nu(),t=i(r);if(s=arguments,l=this,_=r,t){if(h===q)return function(r){return p=r,h=eu(a,n),g?e(r):c}(_);if(v)return h=eu(a,n),e(_)}return h===q&&(h=eu(a,n)),c}var s,l,f,c,h,_,p=0,g=!1,v=!1,y=!0;if("function"!=typeof r)throw new Oa(F);return n=la(n)||0,Qi(t)&&(g=!!t.leading,f=(v="maxWait"in t)?bo(la(t.maxWait)||0,n):f,y="trailing"in t?!!t.trailing:y),u.cancel=function(){h!==q&&Go(h),p=0,s=_=l=h=q},u.flush=function(){return h===q?c:o(Nu())},u}function Wi(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new Oa(F);var t=function(){var e=arguments,i=n?n.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,e);return t.cache=a.set(i,o)||a,o};return t.cache=new(Wi.Cache||qn),t}function $i(r){if("function"!=typeof r)throw new Oa(F);return function(){var n=arguments;switch(n.length){case 0:return!r.call(this);case 1:return!r.call(this,n[0]);case 2:return!r.call(this,n[0],n[1]);case 3:return!r.call(this,n[0],n[1],n[2])}return!r.apply(this,n)}}function Yi(r,n){return r===n||r!=r&&n!=n}function Hi(r){return null!=r&&Xi(r.length)&&!Ji(r)}function Zi(r){return ra(r)&&Hi(r)}function Gi(r){if(!ra(r))return!1;var n=vt(r);return n==Er||n==Vr||"string"==typeof r.message&&"string"==typeof r.name&&!ta(r)}function Ji(r){if(!Qi(r))return!1;var n=vt(r);return n==kr||n==Ir||n==Ar||n==zr}function Ki(r){return"number"==typeof r&&r==ua(r)}function Xi(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=_r}function Qi(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function ra(r){return null!=r&&"object"==typeof r}function na(r){return"number"==typeof r||ra(r)&&vt(r)==Tr}function ta(r){if(!ra(r)||vt(r)!=Nr)return!1;var n=ro(r);if(null===n)return!0;var t=Pa.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&Da.call(t)==Ha}function ea(r){return"string"==typeof r||!Wu(r)&&ra(r)&&vt(r)==Or}function ia(r){return"symbol"==typeof r||ra(r)&&vt(r)==qr}function aa(r){if(!r)return[];if(Hi(r))return ea(r)?O(r):Ee(r);if(ao&&r[ao])return function(r){for(var n,t=[];!(n=r.next()).done;)t.push(n.value);return t}(r[ao]());var n=ru(r);return(n==Sr?N:n==Cr?M:ya)(r)}function oa(r){return r?(r=la(r))===hr||r===-hr?(r<0?-1:1)*pr:r==r?r:0:0===r?r:0}function ua(r){var n=oa(r),t=n%1;return n==n?t?n-t:n:0}function sa(r){return r?Gn(ua(r),0,vr):0}function la(r){if("number"==typeof r)return r;if(ia(r))return gr;if(Qi(r)){var n="function"==typeof r.valueOf?r.valueOf():r;r=Qi(n)?n+"":n}if("string"!=typeof r)return 0===r?r:+r;r=r.replace(vn,"");var t=kn.test(r);return t||Sn.test(r)?dt(r.slice(2),t?2:8):En.test(r)?gr:+r}function fa(r){return ke(r,ga(r))}function ca(r){return null==r?"":se(r)}function ha(r,n,t){var e=null==r?q:st(r,n);return e===q?t:e}function _a(r,n){return null!=r&&ui(r,n,At)}function pa(r){return Hi(r)?Fn(r):Ft(r)}function ga(r){return Hi(r)?Fn(r,!0):Dt(r)}function va(r,n){if(null==r)return{};var t=c(ri(r),function(r){return[r]});return n=ei(n),Jt(r,t,function(r,t){return n(r,t[0])})}function ya(r){return null==r?[]:E(r,pa(r))}function da(r){return js(ca(r).toLowerCase())}function ba(r){return(r=ca(r))&&r.replace(Bn,zt).replace(ut,"")}function wa(r,n,t){return r=ca(r),(n=t?q:n)===q?function(r){return ct.test(r)}(r)?r.match(lt)||[]:r.match(An)||[]:r.match(n)||[]}function ma(r){return function(){return r}}function Aa(r){return r}function ja(r){return Lt("function"==typeof r?r:Jn(r,$))}function xa(r,n,t){var e=pa(n),i=at(n,e);null!=t||Qi(n)&&(i.length||!e.length)||(t=n,n=r,r=this,i=at(n,pa(n)));var a=!(Qi(t)&&"chain"in t&&!t.chain),u=Ji(r);return o(i,function(t){var e=n[t];r[t]=e,u&&(r.prototype[t]=function(){var n=this.__chain__;if(a||n){var t=r(this.__wrapped__);return(t.__actions__=Ee(this.__actions__)).push({func:e,args:arguments,thisArg:r}),t.__chain__=n,t}return e.apply(r,h([this.value()],arguments))})}),r}function Va(){}function Ea(r){return hi(r)?w(Ai(r)):function(r){return function(n){return st(n,r)}}(r)}function ka(){return[]}function Ia(){return!1}var Sa=(n=null==n?mt:Ot.defaults(mt.Object(),n,Ot.pick(mt,ht))).Array,Ta=n.Date,Ba=n.Error,Na=n.Function,Ua=n.Math,za=n.Object,Ma=n.RegExp,Ca=n.String,Oa=n.TypeError,qa=Sa.prototype,Ra=Na.prototype,La=za.prototype,Fa=n["__core-js_shared__"],Da=Ra.toString,Pa=La.hasOwnProperty,Wa=0,$a=function(){var r=/[^.]+$/.exec(Fa&&Fa.keys&&Fa.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Ya=La.toString,Ha=Da.call(za),Za=mt._,Ga=Ma("^"+Da.call(Pa).replace(pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=xt?n.Buffer:q,Ka=n.Symbol,Xa=n.Uint8Array,Qa=Ja?Ja.allocUnsafe:q,ro=U(za.getPrototypeOf,za),no=za.create,to=La.propertyIsEnumerable,eo=qa.splice,io=Ka?Ka.isConcatSpreadable:q,ao=Ka?Ka.iterator:q,oo=Ka?Ka.toStringTag:q,uo=function(){try{var r=oi(za,"defineProperty");return r({},"",{}),r}catch(r){}}(),so=n.clearTimeout!==mt.clearTimeout&&n.clearTimeout,lo=Ta&&Ta.now!==mt.Date.now&&Ta.now,fo=n.setTimeout!==mt.setTimeout&&n.setTimeout,co=Ua.ceil,ho=Ua.floor,_o=za.getOwnPropertySymbols,po=Ja?Ja.isBuffer:q,go=n.isFinite,vo=qa.join,yo=U(za.keys,za),bo=Ua.max,wo=Ua.min,mo=Ta.now,Ao=n.parseInt,jo=Ua.random,xo=qa.reverse,Vo=oi(n,"DataView"),Eo=oi(n,"Map"),ko=oi(n,"Promise"),Io=oi(n,"Set"),So=oi(n,"WeakMap"),To=oi(za,"create"),Bo=So&&new So,No={},Uo=ji(Vo),zo=ji(Eo),Mo=ji(ko),Co=ji(Io),Oo=ji(So),qo=Ka?Ka.prototype:q,Ro=qo?qo.valueOf:q,Lo=qo?qo.toString:q,Fo=function(){function r(){}return function(n){if(!Qi(n))return{};if(no)return no(n);r.prototype=n;var t=new r;return r.prototype=q,t}}();t.templateSettings={escape:un,evaluate:sn,interpolate:ln,variable:"",imports:{_:t}},(t.prototype=m.prototype).constructor=t,(zn.prototype=Fo(m.prototype)).constructor=zn,(Mn.prototype=Fo(m.prototype)).constructor=Mn,Cn.prototype.clear=function(){this.__data__=To?To(null):{},this.size=0},Cn.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},Cn.prototype.get=function(r){var n=this.__data__;if(To){var t=n[r];return t===D?q:t}return Pa.call(n,r)?n[r]:q},Cn.prototype.has=function(r){var n=this.__data__;return To?n[r]!==q:Pa.call(n,r)},Cn.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=To&&n===q?D:n,this},On.prototype.clear=function(){this.__data__=[],this.size=0},On.prototype.delete=function(r){var n=this.__data__,t=$n(n,r);return!(t<0||(t==n.length-1?n.pop():eo.call(n,t,1),--this.size,0))},On.prototype.get=function(r){var n=this.__data__,t=$n(n,r);return t<0?q:n[t][1]},On.prototype.has=function(r){return $n(this.__data__,r)>-1},On.prototype.set=function(r,n){var t=this.__data__,e=$n(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new(Eo||On),string:new Cn}},qn.prototype.delete=function(r){var n=ii(this,r).delete(r);return this.size-=n?1:0,n},qn.prototype.get=function(r){return ii(this,r).get(r)},qn.prototype.has=function(r){return ii(this,r).has(r)},qn.prototype.set=function(r,n){var t=ii(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Rn.prototype.add=Rn.prototype.push=function(r){return this.__data__.set(r,D),this},Rn.prototype.has=function(r){return this.__data__.has(r)},Ln.prototype.clear=function(){this.__data__=new On,this.size=0},Ln.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},Ln.prototype.get=function(r){return this.__data__.get(r)},Ln.prototype.has=function(r){return this.__data__.has(r)},Ln.prototype.set=function(r,n){var t=this.__data__;if(t instanceof On){var e=t.__data__;if(!Eo||e.length<R-1)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new qn(e)}return t.set(r,n),this.size=t.size,this};var Do=Te(et),Po=Te(it,!0),Wo=Be(),$o=Be(!0),Yo=Bo?function(r,n){return Bo.set(r,n),r}:Aa,Ho=uo?function(r,n){return uo(r,"toString",{configurable:!0,enumerable:!1,value:ma(n),writable:!0})}:Aa,Zo=ne,Go=so||function(r){return mt.clearTimeout(r)},Jo=Io&&1/M(new Io([,-0]))[1]==hr?function(r){return new Io(r)}:Va,Ko=Bo?function(r){return Bo.get(r)}:Va,Xo=_o?function(r){return null==r?[]:(r=za(r),s(_o(r),function(n){return to.call(r,n)}))}:ka,Qo=_o?function(r){for(var n=[];r;)h(n,Xo(r)),r=ro(r);return n}:ka,ru=vt;(Vo&&ru(new Vo(new ArrayBuffer(1)))!=Pr||Eo&&ru(new Eo)!=Sr||ko&&ru(ko.resolve())!=Ur||Io&&ru(new Io)!=Cr||So&&ru(new So)!=Lr)&&(ru=function(r){var n=vt(r),t=n==Nr?r.constructor:q,e=t?ji(t):"";if(e)switch(e){case Uo:return Pr;case zo:return Sr;case Mo:return Ur;case Co:return Cr;case Oo:return Lr}return n});var nu=Fa?Ji:Ia,tu=wi(Yo),eu=fo||function(r,n){return mt.setTimeout(r,n)},iu=wi(Ho),au=function(r){var n=Wi(function(r){var n=[];return hn.test(r)&&n.push(""),r.replace(_n,function(r,t,e,i){n.push(e?i.replace(jn,"$1"):t||r)}),n},function(r){return t.size===P&&t.clear(),r}),t=n.cache;return n}(),ou=ne(function(r,n){return Zi(r)?Qn(r,tt(n,1,Zi,!0)):[]}),uu=ne(function(r,n){var t=Si(n);return Zi(t)&&(t=q),Zi(r)?Qn(r,tt(n,1,Zi,!0),ei(t,2)):[]}),su=ne(function(r,n){var t=Si(n);return Zi(t)&&(t=q),Zi(r)?Qn(r,tt(n,1,Zi,!0),q,t):[]}),lu=ne(function(r){var n=c(r,ve);return n.length&&n[0]===r[0]?jt(n):[]}),fu=ne(function(r){var n=Si(r),t=c(r,ve);return n===Si(t)?n=q:t.pop(),t.length&&t[0]===r[0]?jt(t,ei(n,2)):[]}),cu=ne(function(r){var n=Si(r),t=c(r,ve);return(n="function"==typeof n?n:q)&&t.pop(),t.length&&t[0]===r[0]?jt(t,q,n):[]}),hu=ne(Ti),_u=Xe(function(r,n){var t=null==r?0:r.length,e=Zn(r,n);return Xt(r,c(n,function(r){return fi(r,t)?+r:r}).sort(je)),e}),pu=ne(function(r){return le(tt(r,1,Zi,!0))}),gu=ne(function(r){var n=Si(r);return Zi(n)&&(n=q),le(tt(r,1,Zi,!0),ei(n,2))}),vu=ne(function(r){var n=Si(r);return n="function"==typeof n?n:q,le(tt(r,1,Zi,!0),q,n)}),yu=ne(function(r,n){return Zi(r)?Qn(r,n):[]}),du=ne(function(r){return pe(s(r,Zi))}),bu=ne(function(r){var n=Si(r);return Zi(n)&&(n=q),pe(s(r,Zi),ei(n,2))}),wu=ne(function(r){var n=Si(r);return n="function"==typeof n?n:q,pe(s(r,Zi),q,n)}),mu=ne(Ni),Au=ne(function(r){var n=r.length,t=n>1?r[n-1]:q;return t="function"==typeof t?(r.pop(),t):q,Ui(r,t)}),ju=Xe(function(r){var n=r.length,t=n?r[0]:0,e=this.__wrapped__,i=function(n){return Zn(n,r)};return!(n>1||this.__actions__.length)&&e instanceof Mn&&fi(t)?((e=e.slice(t,+t+(n?1:0))).__actions__.push({func:Mi,args:[i],thisArg:q}),new zn(e,this.__chain__).thru(function(r){return n&&!r.length&&r.push(q),r})):this.thru(i)}),xu=Ie(function(r,n,t){Pa.call(r,t)?++r[t]:Hn(r,t,1)}),Vu=Me(Vi),Eu=Me(Ei),ku=Ie(function(r,n,t){Pa.call(r,t)?r[t].push(n):Hn(r,t,[n])}),Iu=ne(function(r,n,t){var e=-1,i="function"==typeof n,o=Hi(r)?Sa(r.length):[];return Do(r,function(r){o[++e]=i?a(n,r,t):Vt(r,n,t)}),o}),Su=Ie(function(r,n,t){Hn(r,t,n)}),Tu=Ie(function(r,n,t){r[t?0:1].push(n)},function(){return[[],[]]}),Bu=ne(function(r,n){if(null==r)return[];var t=n.length;return t>1&&ci(r,n[0],n[1])?n=[]:t>2&&ci(n[0],n[1],n[2])&&(n=[n[0]]),Gt(r,tt(n,1),[])}),Nu=lo||function(){return mt.Date.now()},Uu=ne(function(r,n,t){var e=J;if(t.length){var i=z(t,ti(Uu));e|=nr}return He(r,e,n,t,i)}),zu=ne(function(r,n,t){var e=J|K;if(t.length){var i=z(t,ti(zu));e|=nr}return He(n,e,r,t,i)}),Mu=ne(function(r,n){return Xn(r,1,n)}),Cu=ne(function(r,n,t){return Xn(r,la(n)||0,t)});Wi.Cache=qn;var Ou=Zo(function(r,n){var t=(n=1==n.length&&Wu(n[0])?c(n[0],V(ei())):c(tt(n,1),V(ei()))).length;return ne(function(e){for(var i=-1,o=wo(e.length,t);++i<o;)e[i]=n[i].call(this,e[i]);return a(r,this,e)})}),qu=ne(function(r,n){var t=z(n,ti(qu));return He(r,nr,q,n,t)}),Ru=ne(function(r,n){var t=z(n,ti(Ru));return He(r,tr,q,n,t)}),Lu=Xe(function(r,n){return He(r,ir,q,q,q,n)}),Fu=Pe(bt),Du=Pe(function(r,n){return r>=n}),Pu=Et(function(){return arguments}())?Et:function(r){return ra(r)&&Pa.call(r,"callee")&&!to.call(r,"callee")},Wu=Sa.isArray,$u=kt?V(kt):function(r){return ra(r)&&vt(r)==Dr},Yu=po||Ia,Hu=It?V(It):function(r){return ra(r)&&vt(r)==xr},Zu=St?V(St):function(r){return ra(r)&&ru(r)==Sr},Gu=Tt?V(Tt):function(r){return ra(r)&&vt(r)==Mr},Ju=Bt?V(Bt):function(r){return ra(r)&&ru(r)==Cr},Ku=Nt?V(Nt):function(r){return ra(r)&&Xi(r.length)&&!!pt[vt(r)]},Xu=Pe(Pt),Qu=Pe(function(r,n){return r<=n}),rs=Se(function(r,n){if(pi(n)||Hi(n))ke(n,pa(n),r);else for(var t in n)Pa.call(n,t)&&Wn(r,t,n[t])}),ns=Se(function(r,n){ke(n,ga(n),r)}),ts=Se(function(r,n,t,e){ke(n,ga(n),r,e)}),es=Se(function(r,n,t,e){ke(n,pa(n),r,e)}),is=Xe(Zn),as=ne(function(r){return r.push(q,Ze),a(ts,q,r)}),os=ne(function(r){return r.push(q,Ge),a(cs,q,r)}),us=qe(function(r,n,t){r[n]=t},ma(Aa)),ss=qe(function(r,n,t){Pa.call(r,n)?r[n].push(t):r[n]=[t]},ei),ls=ne(Vt),fs=Se(function(r,n,t){Ht(r,n,t)}),cs=Se(function(r,n,t,e){Ht(r,n,t,e)}),hs=Xe(function(r,n){var t={};if(null==r)return t;var e=!1;n=c(n,function(n){return n=de(n,r),e||(e=n.length>1),n}),ke(r,ri(r),t),e&&(t=Jn(t,$|Y|H,Je));for(var i=n.length;i--;)fe(t,n[i]);return t}),_s=Xe(function(r,n){return null==r?{}:function(r,t){return Jt(r,n,function(n,t){return _a(r,t)})}(r)}),ps=Ye(pa),gs=Ye(ga),vs=Ue(function(r,n,t){return n=n.toLowerCase(),r+(t?da(n):n)}),ys=Ue(function(r,n,t){return r+(t?"-":"")+n.toLowerCase()}),ds=Ue(function(r,n,t){return r+(t?" ":"")+n.toLowerCase()}),bs=Ne("toLowerCase"),ws=Ue(function(r,n,t){return r+(t?"_":"")+n.toLowerCase()}),ms=Ue(function(r,n,t){return r+(t?" ":"")+js(n)}),As=Ue(function(r,n,t){return r+(t?" ":"")+n.toUpperCase()}),js=Ne("toUpperCase"),xs=ne(function(r,n){try{return a(r,q,n)}catch(r){return Gi(r)?r:new Ba(r)}}),Vs=Xe(function(r,n){return o(n,function(n){n=Ai(n),Hn(r,n,Uu(r[n],r))}),r}),Es=Ce(),ks=Ce(!0),Is=ne(function(r,n){return function(t){return Vt(t,r,n)}}),Ss=ne(function(r,n){return function(t){return Vt(r,t,n)}}),Ts=Le(c),Bs=Le(u),Ns=Le(p),Us=De(),zs=De(!0),Ms=Re(function(r,n){return r+n},0),Cs=$e("ceil"),Os=Re(function(r,n){return r/n},1),qs=$e("floor"),Rs=Re(function(r,n){return r*n},1),Ls=$e("round"),Fs=Re(function(r,n){return r-n},0);return t.after=function(r,n){if("function"!=typeof n)throw new Oa(F);return r=ua(r),function(){if(--r<1)return n.apply(this,arguments)}},t.ary=Ri,t.assign=rs,t.assignIn=ns,t.assignInWith=ts,t.assignWith=es,t.at=is,t.before=Li,t.bind=Uu,t.bindAll=Vs,t.bindKey=zu,t.castArray=function(){if(!arguments.length)return[];var r=arguments[0];return Wu(r)?r:[r]},t.chain=zi,t.chunk=function(r,n,t){n=(t?ci(r,n,t):n===q)?1:bo(ua(n),0);var e=null==r?0:r.length;if(!e||n<1)return[];for(var i=0,a=0,o=Sa(co(e/n));i<e;)o[a++]=ee(r,i,i+=n);return o},t.compact=function(r){for(var n=-1,t=null==r?0:r.length,e=0,i=[];++n<t;){var a=r[n];a&&(i[e++]=a)}return i},t.concat=function(){var r=arguments.length;if(!r)return[];for(var n=Sa(r-1),t=arguments[0],e=r;e--;)n[e-1]=arguments[e];return h(Wu(t)?Ee(t):[t],tt(n,1))},t.cond=function(r){var n=null==r?0:r.length,t=ei();return r=n?c(r,function(r){if("function"!=typeof r[1])throw new Oa(F);return[t(r[0]),r[1]]}):[],ne(function(t){for(var e=-1;++e<n;){var i=r[e];if(a(i[0],this,t))return a(i[1],this,t)}})},t.conforms=function(r){return function(r){var n=pa(r);return function(t){return Kn(t,r,n)}}(Jn(r,$))},t.constant=ma,t.countBy=xu,t.create=function(r,n){var t=Fo(r);return null==n?t:Yn(t,n)},t.curry=Fi,t.curryRight=Di,t.debounce=Pi,t.defaults=as,t.defaultsDeep=os,t.defer=Mu,t.delay=Cu,t.difference=ou,t.differenceBy=uu,t.differenceWith=su,t.drop=function(r,n,t){var e=null==r?0:r.length;return e?(n=t||n===q?1:ua(n),ee(r,n<0?0:n,e)):[]},t.dropRight=function(r,n,t){var e=null==r?0:r.length;return e?(n=t||n===q?1:ua(n),n=e-n,ee(r,0,n<0?0:n)):[]},t.dropRightWhile=function(r,n){return r&&r.length?he(r,ei(n,3),!0,!0):[]},t.dropWhile=function(r,n){return r&&r.length?he(r,ei(n,3),!0):[]},t.fill=function(r,n,t,e){var i=null==r?0:r.length;return i?(t&&"number"!=typeof t&&ci(r,n,t)&&(t=0,e=i),function(r,n,t,e){var i=r.length;for((t=ua(t))<0&&(t=-t>i?0:i+t),(e=e===q||e>i?i:ua(e))<0&&(e+=i),e=t>e?0:sa(e);t<e;)r[t++]=n;return r}(r,n,t,e)):[]},t.filter=function(r,n){return(Wu(r)?s:nt)(r,ei(n,3))},t.flatMap=function(r,n){return tt(qi(r,n),1)},t.flatMapDeep=function(r,n){return tt(qi(r,n),hr)},t.flatMapDepth=function(r,n,t){return t=t===q?1:ua(t),tt(qi(r,n),t)},t.flatten=ki,t.flattenDeep=function(r){return(null==r?0:r.length)?tt(r,hr):[]},t.flattenDepth=function(r,n){return(null==r?0:r.length)?(n=n===q?1:ua(n),tt(r,n)):[]},t.flip=function(r){return He(r,ar)},t.flow=Es,t.flowRight=ks,t.fromPairs=function(r){for(var n=-1,t=null==r?0:r.length,e={};++n<t;){var i=r[n];e[i[0]]=i[1]}return e},t.functions=function(r){return null==r?[]:at(r,pa(r))},t.functionsIn=function(r){return null==r?[]:at(r,ga(r))},t.groupBy=ku,t.initial=function(r){return(null==r?0:r.length)?ee(r,0,-1):[]},t.intersection=lu,t.intersectionBy=fu,t.intersectionWith=cu,t.invert=us,t.invertBy=ss,t.invokeMap=Iu,t.iteratee=ja,t.keyBy=Su,t.keys=pa,t.keysIn=ga,t.map=qi,t.mapKeys=function(r,n){var t={};return n=ei(n,3),et(r,function(r,e,i){Hn(t,n(r,e,i),r)}),t},t.mapValues=function(r,n){var t={};return n=ei(n,3),et(r,function(r,e,i){Hn(t,e,n(r,e,i))}),t},t.matches=function(r){return $t(Jn(r,$))},t.matchesProperty=function(r,n){return Yt(r,Jn(n,$))},t.memoize=Wi,t.merge=fs,t.mergeWith=cs,t.method=Is,t.methodOf=Ss,t.mixin=xa,t.negate=$i,t.nthArg=function(r){return r=ua(r),ne(function(n){return Zt(n,r)})},t.omit=hs,t.omitBy=function(r,n){return va(r,$i(ei(n)))},t.once=function(r){return Li(2,r)},t.orderBy=function(r,n,t,e){return null==r?[]:(Wu(n)||(n=null==n?[]:[n]),t=e?q:t,Wu(t)||(t=null==t?[]:[t]),Gt(r,n,t))},t.over=Ts,t.overArgs=Ou,t.overEvery=Bs,t.overSome=Ns,t.partial=qu,t.partialRight=Ru,t.partition=Tu,t.pick=_s,t.pickBy=va,t.property=Ea,t.propertyOf=function(r){return function(n){return null==r?q:st(r,n)}},t.pull=hu,t.pullAll=Ti,t.pullAllBy=function(r,n,t){return r&&r.length&&n&&n.length?Kt(r,n,ei(t,2)):r},t.pullAllWith=function(r,n,t){return r&&r.length&&n&&n.length?Kt(r,n,q,t):r},t.pullAt=_u,t.range=Us,t.rangeRight=zs,t.rearg=Lu,t.reject=function(r,n){return(Wu(r)?s:nt)(r,$i(ei(n,3)))},t.remove=function(r,n){var t=[];if(!r||!r.length)return t;var e=-1,i=[],a=r.length;for(n=ei(n,3);++e<a;){var o=r[e];n(o,e,r)&&(t.push(o),i.push(e))}return Xt(r,i),t},t.rest=function(r,n){if("function"!=typeof r)throw new Oa(F);return n=n===q?n:ua(n),ne(r,n)},t.reverse=Bi,t.sampleSize=function(r,n,t){return n=(t?ci(r,n,t):n===q)?1:ua(n),(Wu(r)?function(r,n){return mi(Ee(r),Gn(n,0,r.length))}:function(r,n){var t=ya(r);return mi(t,Gn(n,0,t.length))})(r,n)},t.set=function(r,n,t){return null==r?r:te(r,n,t)},t.setWith=function(r,n,t,e){return e="function"==typeof e?e:q,null==r?r:te(r,n,t,e)},t.shuffle=function(r){return(Wu(r)?function(r){return mi(Ee(r))}:function(r){return mi(ya(r))})(r)},t.slice=function(r,n,t){var e=null==r?0:r.length;return e?(t&&"number"!=typeof t&&ci(r,n,t)?(n=0,t=e):(n=null==n?0:ua(n),t=t===q?e:ua(t)),ee(r,n,t)):[]},t.sortBy=Bu,t.sortedUniq=function(r){return r&&r.length?oe(r):[]},t.sortedUniqBy=function(r,n){return r&&r.length?oe(r,ei(n,2)):[]},t.split=function(r,n,t){return t&&"number"!=typeof t&&ci(r,n,t)&&(n=t=q),(t=t===q?vr:t>>>0)?(r=ca(r))&&("string"==typeof n||null!=n&&!Gu(n))&&!(n=se(n))&&B(r)?be(O(r),0,t):r.split(n,t):[]},t.spread=function(r,n){if("function"!=typeof r)throw new Oa(F);return n=null==n?0:bo(ua(n),0),ne(function(t){var e=t[n],i=be(t,0,n);return e&&h(i,e),a(r,this,i)})},t.tail=function(r){var n=null==r?0:r.length;return n?ee(r,1,n):[]},t.take=function(r,n,t){return r&&r.length?(n=t||n===q?1:ua(n),ee(r,0,n<0?0:n)):[]},t.takeRight=function(r,n,t){var e=null==r?0:r.length;return e?(n=t||n===q?1:ua(n),n=e-n,ee(r,n<0?0:n,e)):[]},t.takeRightWhile=function(r,n){return r&&r.length?he(r,ei(n,3),!1,!0):[]},t.takeWhile=function(r,n){return r&&r.length?he(r,ei(n,3)):[]},t.tap=function(r,n){return n(r),r},t.throttle=function(r,n,t){var e=!0,i=!0;if("function"!=typeof r)throw new Oa(F);return Qi(t)&&(e="leading"in t?!!t.leading:e,i="trailing"in t?!!t.trailing:i),Pi(r,n,{leading:e,maxWait:n,trailing:i})},t.thru=Mi,t.toArray=aa,t.toPairs=ps,t.toPairsIn=gs,t.toPath=function(r){return Wu(r)?c(r,Ai):ia(r)?[r]:Ee(au(ca(r)))},t.toPlainObject=fa,t.transform=function(r,n,t){var e=Wu(r),i=e||Yu(r)||Ku(r);if(n=ei(n,4),null==t){var a=r&&r.constructor;t=i?e?new a:[]:Qi(r)&&Ji(a)?Fo(ro(r)):{}}return(i?o:et)(r,function(r,e,i){return n(t,r,e,i)}),t},t.unary=function(r){return Ri(r,1)},t.union=pu,t.unionBy=gu,t.unionWith=vu,t.uniq=function(r){return r&&r.length?le(r):[]},t.uniqBy=function(r,n){return r&&r.length?le(r,ei(n,2)):[]},t.uniqWith=function(r,n){return n="function"==typeof n?n:q,r&&r.length?le(r,q,n):[]},t.unset=function(r,n){return null==r||fe(r,n)},t.unzip=Ni,t.unzipWith=Ui,t.update=function(r,n,t){return null==r?r:ce(r,n,ye(t))},t.updateWith=function(r,n,t,e){return e="function"==typeof e?e:q,null==r?r:ce(r,n,ye(t),e)},t.values=ya,t.valuesIn=function(r){return null==r?[]:E(r,ga(r))},t.without=yu,t.words=wa,t.wrap=function(r,n){return qu(ye(n),r)},t.xor=du,t.xorBy=bu,t.xorWith=wu,t.zip=mu,t.zipObject=function(r,n){return ge(r||[],n||[],Wn)},t.zipObjectDeep=function(r,n){return ge(r||[],n||[],te)},t.zipWith=Au,t.entries=ps,t.entriesIn=gs,t.extend=ns,t.extendWith=ts,xa(t,t),t.add=Ms,t.attempt=xs,t.camelCase=vs,t.capitalize=da,t.ceil=Cs,t.clamp=function(r,n,t){return t===q&&(t=n,n=q),t!==q&&(t=(t=la(t))==t?t:0),n!==q&&(n=(n=la(n))==n?n:0),Gn(la(r),n,t)},t.clone=function(r){return Jn(r,H)},t.cloneDeep=function(r){return Jn(r,$|H)},t.cloneDeepWith=function(r,n){return n="function"==typeof n?n:q,Jn(r,$|H,n)},t.cloneWith=function(r,n){return n="function"==typeof n?n:q,Jn(r,H,n)},t.conformsTo=function(r,n){return null==n||Kn(r,n,pa(n))},t.deburr=ba,t.defaultTo=function(r,n){return null==r||r!=r?n:r},t.divide=Os,t.endsWith=function(r,n,t){r=ca(r),n=se(n);var e=r.length,i=t=t===q?e:Gn(ua(t),0,e);return(t-=n.length)>=0&&r.slice(t,i)==n},t.eq=Yi,t.escape=function(r){return(r=ca(r))&&on.test(r)?r.replace(en,Mt):r},t.escapeRegExp=function(r){return(r=ca(r))&&gn.test(r)?r.replace(pn,"\\$&"):r},t.every=function(r,n,t){var e=Wu(r)?u:function(r,n){var t=!0;return Do(r,function(r,e,i){return t=!!n(r,e,i)}),t};return t&&ci(r,n,t)&&(n=q),e(r,ei(n,3))},t.find=Vu,t.findIndex=Vi,t.findKey=function(r,n){return g(r,ei(n,3),et)},t.findLast=Eu,t.findLastIndex=Ei,t.findLastKey=function(r,n){return g(r,ei(n,3),it)},t.floor=qs,t.forEach=Ci,t.forEachRight=Oi,t.forIn=function(r,n){return null==r?r:Wo(r,ei(n,3),ga)},t.forInRight=function(r,n){return null==r?r:$o(r,ei(n,3),ga)},t.forOwn=function(r,n){return r&&et(r,ei(n,3))},t.forOwnRight=function(r,n){return r&&it(r,ei(n,3))},t.get=ha,t.gt=Fu,t.gte=Du,t.has=function(r,n){return null!=r&&ui(r,n,wt)},t.hasIn=_a,t.head=Ii,t.identity=Aa,t.includes=function(r,n,t,e){r=Hi(r)?r:ya(r),t=t&&!e?ua(t):0;var i=r.length;return t<0&&(t=bo(i+t,0)),ea(r)?t<=i&&r.indexOf(n,t)>-1:!!i&&y(r,n,t)>-1},t.indexOf=function(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=null==t?0:ua(t);return i<0&&(i=bo(e+i,0)),y(r,n,i)},t.inRange=function(r,n,t){return n=oa(n),t===q?(t=n,n=0):t=oa(t),r=la(r),function(r,n,t){return r>=wo(n,t)&&r<bo(n,t)}(r,n,t)},t.invoke=ls,t.isArguments=Pu,t.isArray=Wu,t.isArrayBuffer=$u,t.isArrayLike=Hi,t.isArrayLikeObject=Zi,t.isBoolean=function(r){return!0===r||!1===r||ra(r)&&vt(r)==jr},t.isBuffer=Yu,t.isDate=Hu,t.isElement=function(r){return ra(r)&&1===r.nodeType&&!ta(r)},t.isEmpty=function(r){if(null==r)return!0;if(Hi(r)&&(Wu(r)||"string"==typeof r||"function"==typeof r.splice||Yu(r)||Ku(r)||Pu(r)))return!r.length;var n=ru(r);if(n==Sr||n==Cr)return!r.size;if(pi(r))return!Ft(r).length;for(var t in r)if(Pa.call(r,t))return!1;return!0},t.isEqual=function(r,n){return Ut(r,n)},t.isEqualWith=function(r,n,t){var e=(t="function"==typeof t?t:q)?t(r,n):q;return e===q?Ut(r,n,q,t):!!e},t.isError=Gi,t.isFinite=function(r){return"number"==typeof r&&go(r)},t.isFunction=Ji,t.isInteger=Ki,t.isLength=Xi,t.isMap=Zu,t.isMatch=function(r,n){return r===n||qt(r,n,ai(n))},t.isMatchWith=function(r,n,t){return t="function"==typeof t?t:q,qt(r,n,ai(n),t)},t.isNaN=function(r){return na(r)&&r!=+r},t.isNative=function(r){if(nu(r))throw new Ba(L);return Rt(r)},t.isNil=function(r){return null==r},t.isNull=function(r){return null===r},t.isNumber=na,t.isObject=Qi,t.isObjectLike=ra,t.isPlainObject=ta,t.isRegExp=Gu,t.isSafeInteger=function(r){return Ki(r)&&r>=-_r&&r<=_r},t.isSet=Ju,t.isString=ea,t.isSymbol=ia,t.isTypedArray=Ku,t.isUndefined=function(r){return r===q},t.isWeakMap=function(r){return ra(r)&&ru(r)==Lr},t.isWeakSet=function(r){return ra(r)&&vt(r)==Fr},t.join=function(r,n){return null==r?"":vo.call(r,n)},t.kebabCase=ys,t.last=Si,t.lastIndexOf=function(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=e;return t!==q&&(i=(i=ua(t))<0?bo(e+i,0):wo(i,e-1)),n==n?function(r,n,t){for(var e=i+1;e--;)if(r[e]===n)return e;return e}(r,n):v(r,d,i,!0)},t.lowerCase=ds,t.lowerFirst=bs,t.lt=Xu,t.lte=Qu,t.max=function(r){return r&&r.length?rt(r,Aa,bt):q},t.maxBy=function(r,n){return r&&r.length?rt(r,ei(n,2),bt):q},t.mean=function(r){return b(r,Aa)},t.meanBy=function(r,n){return b(r,ei(n,2))},t.min=function(r){return r&&r.length?rt(r,Aa,Pt):q},t.minBy=function(r,n){return r&&r.length?rt(r,ei(n,2),Pt):q},t.stubArray=ka,t.stubFalse=Ia,t.stubObject=function(){return{}},t.stubString=function(){return""},t.stubTrue=function(){return!0},t.multiply=Rs,t.nth=function(r,n){return r&&r.length?Zt(r,ua(n)):q},t.noConflict=function(){return mt._===this&&(mt._=Za),this},t.noop=Va,t.now=Nu,t.pad=function(r,n,t){r=ca(r);var e=(n=ua(n))?C(r):0;if(!n||e>=n)return r;var i=(n-e)/2;return Fe(ho(i),t)+r+Fe(co(i),t)},t.padEnd=function(r,n,t){r=ca(r);var e=(n=ua(n))?C(r):0;return n&&e<n?r+Fe(n-e,t):r},t.padStart=function(r,n,t){r=ca(r);var e=(n=ua(n))?C(r):0;return n&&e<n?Fe(n-e,t)+r:r},t.parseInt=function(r,n,t){return t||null==n?n=0:n&&(n=+n),Ao(ca(r).replace(yn,""),n||0)},t.random=function(r,n,t){if(t&&"boolean"!=typeof t&&ci(r,n,t)&&(n=t=q),t===q&&("boolean"==typeof n?(t=n,n=q):"boolean"==typeof r&&(t=r,r=q)),r===q&&n===q?(r=0,n=1):(r=oa(r),n===q?(n=r,r=0):n=oa(n)),r>n){var e=r;r=n,n=e}if(t||r%1||n%1){var i=jo();return wo(r+i*(n-r+yt("1e-"+((i+"").length-1))),n)}return Qt(r,n)},t.reduce=function(r,n,t){var e=Wu(r)?_:A,i=arguments.length<3;return e(r,ei(n,4),t,i,Do)},t.reduceRight=function(r,n,t){var e=Wu(r)?function(r,n,t,e){var i=null==r?0:r.length;for(e&&i&&(t=r[--i]);i--;)t=n(t,r[i],i,r);return t}:A,i=arguments.length<3;return e(r,ei(n,4),t,i,Po)},t.repeat=function(r,n,t){return n=(t?ci(r,n,t):n===q)?1:ua(n),re(ca(r),n)},t.replace=function(){var r=arguments,n=ca(r[0]);return r.length<3?n:n.replace(r[1],r[2])},t.result=function(r,n,t){var e=-1,i=(n=de(n,r)).length;for(i||(i=1,r=q);++e<i;){var a=null==r?q:r[Ai(n[e])];a===q&&(e=i,a=t),r=Ji(a)?a.call(r):a}return r},t.round=Ls,t.runInContext=r,t.sample=function(r){return(Wu(r)?Dn:function(r){return Dn(ya(r))})(r)},t.size=function(r){if(null==r)return 0;if(Hi(r))return ea(r)?C(r):r.length;var n=ru(r);return n==Sr||n==Cr?r.size:Ft(r).length},t.snakeCase=ws,t.some=function(r,n,t){var e=Wu(r)?p:function(r,n){var t;return Do(r,function(r,e,i){return!(t=n(r,e,i))}),!!t};return t&&ci(r,n,t)&&(n=q),e(r,ei(n,3))},t.sortedIndex=function(r,n){return ie(r,n)},t.sortedIndexBy=function(r,n,t){return ae(r,n,ei(t,2))},t.sortedIndexOf=function(r,n){var t=null==r?0:r.length;if(t){var e=ie(r,n);if(e<t&&Yi(r[e],n))return e}return-1},t.sortedLastIndex=function(r,n){return ie(r,n,!0)},t.sortedLastIndexBy=function(r,n,t){return ae(r,n,ei(t,2),!0)},t.sortedLastIndexOf=function(r,n){if(null==r?0:r.length){var t=ie(r,n,!0)-1;if(Yi(r[t],n))return t}return-1},t.startCase=ms,t.startsWith=function(r,n,t){return r=ca(r),t=null==t?0:Gn(ua(t),0,r.length),n=se(n),r.slice(t,t+n.length)==n},t.subtract=Fs,t.sum=function(r){return r&&r.length?j(r,Aa):0},t.sumBy=function(r,n){return r&&r.length?j(r,ei(n,2)):0},t.template=function(r,n,e){var i=t.templateSettings;e&&ci(r,n,e)&&(n=q),r=ca(r),n=ts({},n,i,Ze);var a,o,u=ts({},n.imports,i.imports,Ze),s=pa(u),l=E(u,s),f=0,c=n.interpolate||Nn,h="__p += '",_=Ma((n.escape||Nn).source+"|"+c.source+"|"+(c===ln?xn:Nn).source+"|"+(n.evaluate||Nn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++_t+"]")+"\n";r.replace(_,function(n,t,e,i,u,s){return e||(e=i),h+=r.slice(f,s).replace(Un,T),t&&(a=!0,h+="' +\n__e("+t+") +\n'"),u&&(o=!0,h+="';\n"+u+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),f=s+n.length,n}),h+="';\n";var g=n.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(Qr,""):h).replace(rn,"$1").replace(nn,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=xs(function(){return Na(s,p+"return "+h).apply(q,l)});if(v.source=h,Gi(v))throw v;return v},t.times=function(r,n){if((r=ua(r))<1||r>_r)return[];var t=vr,e=wo(r,vr);n=ei(n),r-=vr;for(var i=x(e,n);++t<r;)n(t);return i},t.toFinite=oa,t.toInteger=ua,t.toLength=sa,t.toLower=function(r){return ca(r).toLowerCase()},t.toNumber=la,t.toSafeInteger=function(r){return r?Gn(ua(r),-_r,_r):0===r?r:0},t.toString=ca,t.toUpper=function(r){return ca(r).toUpperCase()},t.trim=function(r,n,t){if((r=ca(r))&&(t||n===q))return r.replace(vn,"");if(!r||!(n=se(n)))return r;var e=O(r),i=O(n);return be(e,I(e,i),S(e,i)+1).join("")},t.trimEnd=function(r,n,t){if((r=ca(r))&&(t||n===q))return r.replace(dn,"");if(!r||!(n=se(n)))return r;var e=O(r);return be(e,0,S(e,O(n))+1).join("")},t.trimStart=function(r,n,t){if((r=ca(r))&&(t||n===q))return r.replace(yn,"");if(!r||!(n=se(n)))return r;var e=O(r);return be(e,I(e,O(n))).join("")},t.truncate=function(r,n){var t=or,e=ur;if(Qi(n)){var i="separator"in n?n.separator:i;t="length"in n?ua(n.length):t,e="omission"in n?se(n.omission):e}var a=(r=ca(r)).length;if(B(r)){var o=O(r);a=o.length}if(t>=a)return r;var u=t-C(e);if(u<1)return e;var s=o?be(o,0,u).join(""):r.slice(0,u);if(i===q)return s+e;if(o&&(u+=s.length-u),Gu(i)){if(r.slice(u).search(i)){var l,f=s;for(i.global||(i=Ma(i.source,ca(Vn.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var c=l.index;s=s.slice(0,c===q?u:c)}}else if(r.indexOf(se(i),u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+e},t.unescape=function(r){return(r=ca(r))&&an.test(r)?r.replace(tn,Ct):r},t.uniqueId=function(r){var n=++Wa;return ca(r)+n},t.upperCase=As,t.upperFirst=js,t.each=Ci,t.eachRight=Oi,t.first=Ii,xa(t,function(){var r={};return et(t,function(n,e){Pa.call(t.prototype,e)||(r[e]=n)}),r}(),{chain:!1}),t.VERSION="4.17.4",o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){t[r].placeholder=t}),o(["drop","take"],function(r,n){Mn.prototype[r]=function(t){t=t===q?1:bo(ua(t),0);var e=this.__filtered__&&!n?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=wo(t,e.__takeCount__):e.__views__.push({size:wo(t,vr),type:r+(e.__dir__<0?"Right":"")}),e},Mn.prototype[r+"Right"]=function(n){return this.reverse()[r](n).reverse()}}),o(["filter","map","takeWhile"],function(r,n){var t=n+1,e=t==fr||3==t;Mn.prototype[r]=function(r){var n=this.clone();return n.__iteratees__.push({iteratee:ei(r,3),type:t}),n.__filtered__=n.__filtered__||e,n}}),o(["head","last"],function(r,n){var t="take"+(n?"Right":"");Mn.prototype[r]=function(){return this[t](1).value()[0]}}),o(["initial","tail"],function(r,n){var t="drop"+(n?"":"Right");Mn.prototype[r]=function(){return this.__filtered__?new Mn(this):this[t](1)}}),Mn.prototype.compact=function(){return this.filter(Aa)},Mn.prototype.find=function(r){return this.filter(r).head()},Mn.prototype.findLast=function(r){return this.reverse().find(r)},Mn.prototype.invokeMap=ne(function(r,n){return"function"==typeof r?new Mn(this):this.map(function(t){return Vt(t,r,n)})}),Mn.prototype.reject=function(r){return this.filter($i(ei(r)))},Mn.prototype.slice=function(r,n){r=ua(r);var t=this;return t.__filtered__&&(r>0||n<0)?new Mn(t):(r<0?t=t.takeRight(-r):r&&(t=t.drop(r)),n!==q&&(t=(n=ua(n))<0?t.dropRight(-n):t.take(n-r)),t)},Mn.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Mn.prototype.toArray=function(){return this.take(vr)},et(Mn.prototype,function(r,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),a=t[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);a&&(t.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,s=n instanceof Mn,l=u[0],f=s||Wu(n),c=function(r){var n=a.apply(t,h([r],u));return i&&_?n[0]:n};f&&e&&"function"==typeof l&&1!=l.length&&(s=f=!1);var _=this.__chain__,p=!!this.__actions__.length,g=o&&!_,v=s&&!p;if(!o&&f){n=v?n:new Mn(this);var y=r.apply(n,u);return y.__actions__.push({func:Mi,args:[c],thisArg:q}),new zn(y,_)}return g&&v?r.apply(this,u):(y=this.thru(c),g?i?y.value()[0]:y.value():y)})}),o(["pop","push","shift","sort","splice","unshift"],function(r){var n=qa[r],e=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",i=/^(?:pop|shift)$/.test(r);t.prototype[r]=function(){var r=arguments;if(i&&!this.__chain__){var t=this.value();return n.apply(Wu(t)?t:[],r)}return this[e](function(t){return n.apply(Wu(t)?t:[],r)})}}),et(Mn.prototype,function(r,n){var e=t[n];if(e){var i=e.name+"";(No[i]||(No[i]=[])).push({name:n,func:e})}}),No[Oe(q,K).name]=[{name:"wrapper",func:q}],Mn.prototype.clone=function(){var r=new Mn(this.__wrapped__);return r.__actions__=Ee(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Ee(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Ee(this.__views__),r},Mn.prototype.reverse=function(){if(this.__filtered__){var r=new Mn(this);r.__dir__=-1,r.__filtered__=!0}else(r=this.clone()).__dir__*=-1;return r},Mn.prototype.value=function(){var r=this.__wrapped__.value(),n=this.__dir__,t=Wu(r),e=n<0,i=t?r.length:0,a=function(r,n,t){for(var e=-1,i=t.length;++e<i;){var a=t[e],o=a.size;switch(a.type){case"drop":r+=o;break;case"dropRight":n-=o;break;case"take":n=wo(n,r+o);break;case"takeRight":r=bo(r,n-o)}}return{start:r,end:n}}(0,i,this.__views__),o=a.start,u=a.end,s=u-o,l=e?u:o-1,f=this.__iteratees__,c=f.length,h=0,_=wo(s,this.__takeCount__);if(!t||!e&&i==s&&_==s)return _e(r,this.__actions__);var p=[];r:for(;s--&&h<_;){for(var g=-1,v=r[l+=n];++g<c;){var y=f[g],d=y.iteratee,b=y.type,w=d(v);if(b==cr)v=w;else if(!w){if(b==fr)continue r;break r}}p[h++]=v}return p},t.prototype.at=ju,t.prototype.chain=function(){return zi(this)},t.prototype.commit=function(){return new zn(this.value(),this.__chain__)},t.prototype.next=function(){this.__values__===q&&(this.__values__=aa(this.value()));var r=this.__index__>=this.__values__.length;return{done:r,value:r?q:this.__values__[this.__index__++]}},t.prototype.plant=function(r){for(var n,t=this;t instanceof m;){var e=xi(t);e.__index__=0,e.__values__=q,n?i.__wrapped__=e:n=e;var i=e;t=t.__wrapped__}return i.__wrapped__=r,n},t.prototype.reverse=function(){var r=this.__wrapped__;if(r instanceof Mn){var n=r;return this.__actions__.length&&(n=new Mn(this)),(n=n.reverse()).__actions__.push({func:Mi,args:[Bi],thisArg:q}),new zn(n,this.__chain__)}return this.thru(Bi)},t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=function(){return _e(this.__wrapped__,this.__actions__)},t.prototype.first=t.prototype.head,ao&&(t.prototype[ao]=function(){return this}),t}();jt?((jt.exports=Ot)._=Ot,At._=Ot):mt._=Ot}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("ndarray"),a=r("typedarray-pool"),o=r("./lib/fft-matrix.js");n.exports=function(r,n,t){var u,s,l=n.shape,f=l.length,c=1,h=new Array(f),_=0;for(u=f-1;u>=0;--u)if(h[u]=c,c*=l[u],_=Math.max(_,o.scratchMemory(l[u])),n.shape[u]!==t.shape[u])throw new Error("Shape mismatch, real and imaginary arrays must have same size");var p,g=4*c+_;p="array"===n.dtype||"float64"===n.dtype||"custom"===n.dtype?a.mallocDouble(g):a.mallocFloat(g);var v,y,d,b,w=i(p,l.slice(0),h,0),m=i(p,l.slice(0),h.slice(0),c),A=i(p,l.slice(0),h.slice(0),2*c),j=i(p,l.slice(0),h.slice(0),3*c),x=4*c;for(e.assign(w,n),e.assign(m,t),u=f-1;u>=0&&(o(r,c/l[u],l[u],p,w.offset,m.offset,x),0!==u);--u){for(y=1,d=A.stride,b=j.stride,s=u-1;s<f;++s)b[s]=d[s]=y,y*=l[s];for(s=u-2;s>=0;--s)b[s]=d[s]=y,y*=l[s];e.assign(A,w),e.assign(j,m),v=w,w=A,A=v,v=m,m=j,j=v}e.assign(n,w),e.assign(t,m),a.free(p)}},{"./lib/fft-matrix.js":14,ndarray:18,"ndarray-ops":17,"typedarray-pool":21}],14:[function(r,n,t){function e(r,n,t,e,a,o){r|=0,n|=0,a|=0,o|=0;var u,s,l,f,c,h,_,p,g,v,y,d,b,w,m,A,j,x,V,E,k,I,S,T;for(u=t|=0,s=i.log2(u),x=0;x<n;++x){for(_=u>>1,c=0,l=0;l<u-1;l++){for(l<c&&(b=e[a+l],e[a+l]=e[a+c],e[a+c]=b,b=e[o+l],e[o+l]=e[o+c],e[o+c]=b),h=_;h<=c;)c-=h,h>>=1;c+=h}for(y=-1,d=0,v=1,p=0;p<s;p++){for(g=v,v<<=1,A=1,j=0,c=0;c<g;c++){for(l=c;l<u;l+=v)V=e[a+(f=l+g)],E=e[o+f],k=e[a+l],I=e[o+l],w=(S=A*(V+E))-E*(A+j),m=S+(T=V*(j-A)),e[a+f]=k-w,e[o+f]=I-m,e[a+l]+=w,e[o+l]+=m;T=A*(d-y),A=(S=y*(A+j))-j*(y+d),j=S+T}d=Math.sqrt((1-y)/2),r<0&&(d=-d),y=Math.sqrt((1+y)/2)}if(r<0){var B=1/u;for(l=0;l<u;l++)e[a+l]*=B,e[o+l]*=B}a+=t,o+=t}}var i=r("bit-twiddle");n.exports=function(r,n,t,a,o,u,s){r|=0,n|=0,t|=0,o|=0,u|=0,i.isPow2(t)?e(r,n,t,a,o,u):function(r,n,t,a,o,u,s){r|=0,n|=0,t|=0,o|=0,u|=0,s|=0;var l,f,c,h,_,p,g,v,y,d=i.nextPow2(2*t+1),b=s,w=b+t,m=w+t,A=m+d,j=A+d,x=j+d,V=-r*Math.PI/t;for(y=0;y<t;++y)f=V*(y*y%(2*t)),h=Math.cos(f),_=Math.sin(f),a[j+(d-y)]=a[j+y]=a[b+y]=h,a[x+(d-y)]=a[x+y]=a[w+y]=_;for(y=t;y<=d-t;++y)a[j+y]=0;for(y=t;y<=d-t;++y)a[x+y]=0;for(e(1,1,d,a,j,x),V=r<0?1/t:1,l=0;l<n;++l){for(y=0;y<t;++y)f=a[o+y],c=a[u+y],h=a[b+y],_=-a[w+y],p=h*(f+c),g=f*(_-h),v=c*(h+_),a[m+y]=p-v,a[A+y]=p+g;for(y=t;y<d;++y)a[m+y]=0;for(y=t;y<d;++y)a[A+y]=0;for(e(1,1,d,a,m,A),y=0;y<d;++y)f=a[m+y],c=a[A+y],h=a[j+y],_=a[x+y],p=h*(f+c),g=f*(_-h),v=c*(h+_),a[m+y]=p-v,a[A+y]=p+g;for(e(-1,1,d,a,m,A),y=0;y<t;++y)f=a[m+y],c=a[A+y],h=a[b+y],_=-a[w+y],p=h*(f+c),g=f*(_-h),v=c*(h+_),a[o+y]=V*(p-v),a[u+y]=V*(p+g);o+=t,u+=t}}(r,n,t,a,o,u,s)},n.exports.scratchMemory=function(r){return i.isPow2(r)?0:2*r+4*i.nextPow2(2*r+1)}},{"bit-twiddle":2}],15:[function(r,n,t){"use strict";function e(r){return Array.isArray(r)?[r.length,r[0].length]:r.shape}function i(r){if(Array.isArray(r)){if(Array.isArray(r))return["r","native"]}else if(r.shape&&2===r.shape.length)return r.order[0]?["r",r.dtype]:["c",r.dtype];throw new Error("Unrecognized data type")}n.exports=function(r,n,t,u,s){void 0===u&&(u=1),void 0===s&&(s=0);var l=1!==u,f=0!==s,c=i(r),h=i(n),_=i(t);!function(n,t,i){var a=e(r),o=e(t),u=e(i);if(a[0]!==o[0]||a[1]!==u[1]||o[1]!==u[0])throw new Error("Mismatched array shapes for matrix product")}(0,n,t);var p=[c,h,_,l,f].join(":"),g=o[p];return g||(g=o[p]=a(c,h,_,l,f)),g(r,n,t,u,s)};var a=r("./lib/planner.js"),o={}},{"./lib/planner.js":16}],16:[function(r,n,t){"use strict";function e(r,n){return"native"===n[1]?[r,"d0=",r,".length,",r,"d1=",r,"[0].length,"].join(""):[r,"d0=",r,".shape[0],",r,"d1=",r,".shape[1],",r,"s0=",r,".stride[0],",r,"s1=",r,".stride[1],",r,"o=",r,".offset,",r,"d=",r,".data,"].join("")}function i(r,n,t,e,i,a){var o=[];return"native"===t[1]?r[0]&&(e?o.push("var ",n,"p=",n,"[",e,"];"):o.push("var ",n,"p=",n,"[0];")):e&&i?a?o.push("var ",n,"t0=",n,"s",r[0],",",n,"t1=",n,"s",r[1],"-",n,"s",r[0],"*",a,",",n,"p=",n,"o+",e,"*",n,"s0+",i,"*",n,"s1;"):o.push("var ",n,"t0=",n,"s",r[0],",",n,"p=",n,"o+",e,"*",n,"s0+",i,"*",n,"s1;"):e?o.push("var ",n,"t0=",n,"s",r[0],",",n,"p=",n,"o+",e,"*",n,"s0;"):i?o.push("var ",n,"t0=",n,"s",r[0],",",n,"p=",n,"o+",i,"*",n,"s1;"):o.push("var ",n,"t0=",n,"s",r[0],",",n,"t1=",n,"s",r[1],"-",n,"s",r[0],"*",n,"d",r[0],",",n,"p=",n,"o;"),o}function a(r,n,t,e,i){var a=[];return"native"===t[1]?r[0]&&1===e&&a.push(n,"p=",n,"[",i,"+1]"):a.push(n,"p+=",n,"t",e,";"),a}function o(r,n,t,e,i,a){var o=[];return"native"===t[1]?r[0]?o.push(n,"p[",i,"]=",a,";"):o.push(n,"[",e,"][",i,"]=",a,";"):"generic"===t[1]?o.push(n,"d.set(",n,"p,",a,");"):o.push(n,"d[",n,"p]=",a,";"),o}function u(r,n,t,e,i){var a=[];return"native"===t[1]?r[0]?a.push(n,"p[",i,"]"):a.push(n,"[",e,"][",i,"]"):"generic"===t[1]?a.push(n,"d.get(",n,"p)"):a.push(n,"d[",n,"p]"),a.join("")}function s(r,n,t,e,s){var f=[],c=["od0","od1","ad1"],h=[1,0],_=[1,0],p=[0,1];f.push.apply(f,function(r,n){var t,e=[],s="r"===r[0]?[1,0]:[0,1];return n&&e.push("if(B!==1.0){"),e.push.apply(e,i(s,"o",r)),s[0]?(e.push("for(i=0;i<od0;++i){for(j=0;j<od1;++j){"),t=["i","j"]):(e.push("for(j=0;j<od1;++j){for(i=0;i<od0;++i){"),t=["j","i"]),n?e.push.apply(e,o(s,"o",r,"i","j","B*"+u(s,"o",r,"i","j"))):e.push.apply(e,o(s,"o",r,"i","j","0")),e.push.apply(e,a(s,"o",r,0,t[1])),e.push("}"),e.push.apply(e,a(s,"o",r,1,t[0])),e.push("}"),n&&e.push("}"),e}(r,s));for(var g=0;g<3;++g)f.push("for(var i",g,"=",c[g],";i",g,">0;){","var w",g,"=",l,";","if(i",g,"<",l,"){","w",g,"=i",g,";","i",g,"=0;","}else{","i",g,"-=",l,";","}");f.push.apply(f,i(h,"o",r,"i0","i1","w1")),f.push("for(i=0;i<w0;++i){for(j=0;j<w1;++j){var r=0.0;"),f.push.apply(f,i(_,"a",n,"(i0+i)","i2")),f.push.apply(f,i(p,"b",t,"i2","(i1+j)")),f.push("for(k=0;k<w2;++k){"),f.push("r+=",u(_,"a",n,"(i0+i)","(i2+k)"),"*",u(p,"b",t,"(i2+k)","(i1+j)"),";"),f.push.apply(f,a(_,"a",n,0,"(i2+k)")),f.push.apply(f,a(p,"b",t,0,"(i2+k)")),f.push("}");var v="r";return e&&(v="A*r"),f.push.apply(f,o(h,"o",r,"(i0+i)","(i1+j)",v+"+"+u(h,"o",r,"(i0+i)","(i1+j)"))),f.push.apply(f,a(h,"o",r,0,"(i1+j)")),f.push("}"),f.push.apply(f,a(h,"o",r,1,"(i0+i)")),f.push("}}}}"),f}n.exports=function(r,n,t,l,f){var c=["gemm",r[0],r[1],"a",n[0],n[1],"b",t[0],t[1],l?"alpha":"",f?"beta":""].join(""),h=["function ",c,"(o,a,b,A,B){","var ",e("o",r),e("a",n),e("b",t),"i,j,k;"];return"r"===n[0]&&"c"===t[0]?h.push.apply(h,function(r,n,t,e,s){var l=[],f="r"===r[0]?[1,0]:[0,1],c=[1,0],h=[0,1],_=["i","j"];return l.push.apply(l,i(f,"o",r)),f[1]?(l.push("for(j=0;j<od1;++j){"),l.push("for(i=0;i<od0;++i){")):(l.push("for(i=0;i<od0;++i){"),l.push("for(j=0;j<od1;++j){")),l.push.apply(l,i(c,"a",n,"i")),l.push.apply(l,i(h,"b",t,void 0,"j")),l.push("var r=0.0;","for(k=0;k<ad1;++k){","r+=",u(c,"a",n,"i","k"),"*",u(h,"b",t,"k","j"),";"),l.push.apply(l,a(c,"a",n,0,"k")),l.push.apply(l,a(h,"b",t,0,"k")),l.push("}"),e&&l.push("r*=A;"),s&&l.push("r+=B*",u(f,"o",r,"i","j"),";"),l.push.apply(l,o(f,"o",r,"i","j","r")),l.push.apply(l,a(f,"o",r,0,_[1])),l.push("}"),l.push.apply(l,a(f,"o",r,1,_[0])),l.push("}"),l}(r,n,t,l,f)):h.push.apply(h,s(r,n,t,l,f)),h.push("}return ",c),new Function(h.join(""))()};var l=32},{}],17:[function(r,n,t){"use strict";function e(r){if(!r)return o;for(var n=0;n<r.args.length;++n){var t=r.args[n];r.args[n]=0===n?{name:t,lvalue:!0,rvalue:!!r.rvalue,count:r.count||1}:{name:t,lvalue:!1,rvalue:!0,count:1}}return r.thisVars||(r.thisVars=[]),r.localVars||(r.localVars=[]),r}function i(r){for(var n=[],t=0;t<r.args.length;++t)n.push("a"+t);return new Function("P",["return function ",r.funcName,"_ndarrayops(",n.join(","),") {P(",n.join(","),");return a0}"].join(""))(function(r){return a({args:r.args,pre:e(r.pre),body:e(r.body),post:e(r.proc),funcName:r.funcName})}(r))}var a=r("cwise-compiler"),o={body:"",args:[],thisVars:[],localVars:[]},u={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var r in u){var n=u[r];t[r]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+n+"c"},funcName:r}),t[r+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a"+n+"=b"},rvalue:!0,funcName:r+"eq"}),t[r+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+n+"s"},funcName:r+"s"}),t[r+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a"+n+"=s"},rvalue:!0,funcName:r+"seq"})}}();var s={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var r in s){var n=s[r];t[r]=i({args:["array","array"],body:{args:["a","b"],body:"a="+n+"b"},funcName:r}),t[r+"eq"]=i({args:["array"],body:{args:["a"],body:"a="+n+"a"},rvalue:!0,count:2,funcName:r+"eq"})}}();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var r in l){var n=l[r];t[r]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+n+"c"},funcName:r}),t[r+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+n+"s"},funcName:r+"s"}),t[r+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a=a"+n+"b"},rvalue:!0,count:2,funcName:r+"eq"}),t[r+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+n+"s"},rvalue:!0,count:2,funcName:r+"seq"})}}();var f=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var r=0;r<f.length;++r){var n=f[r];t[n]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:n}),t[n+"eq"]=i({args:["array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:n+"eq"})}}();var c=["max","min","atan2","pow"];!function(){for(var r=0;r<c.length;++r){var n=c[r];t[n]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:n}),t[n+"s"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:n+"s"}),t[n+"eq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:n+"eq"}),t[n+"seq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:n+"seq"})}}();var h=["atan2","pow"];!function(){for(var r=0;r<h.length;++r){var n=h[r];t[n+"op"]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:n+"op"}),t[n+"ops"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:n+"ops"}),t[n+"opeq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:n+"opeq"}),t[n+"opseq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+n,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:n+"opseq"})}}(),t.any=a({args:["array"],pre:o,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),t.all=a({args:["array"],pre:o,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),t.sum=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),t.prod=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),t.norm2squared=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),t.norm2=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),t.norminf=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=a({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=a({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.argmin=a({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.argmax=a({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=i({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=i({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=i({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=a({args:["array","array"],pre:o,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":4}],18:[function(r,n,t){function e(r,n){return r[0]-n[0]}function i(){var r,n=this.stride,t=new Array(n.length);for(r=0;r<t.length;++r)t[r]=[Math.abs(n[r]),r];t.sort(e);var i=new Array(t.length);for(r=0;r<i.length;++r)i[r]=t[r][1];return i}function a(r,n){var t=["View",n,"d",r].join("");n<0&&(t="View_Nil"+r);var e="generic"===r;if(-1===n){a="function "+t+"(a){this.data=a;};var proto="+t+".prototype;proto.dtype='"+r+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+t+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+t+"(a){return new "+t+"(a);}";return(d=new Function(a))()}if(0===n){a="function "+t+"(a,d) {this.data = a;this.offset = d};var proto="+t+".prototype;proto.dtype='"+r+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+t+"_copy() {return new "+t+"(this.data,this.offset)};proto.pick=function "+t+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+t+"_get(){return "+(e?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+t+"_set(v){return "+(e?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+t+"(a,b,c,d){return new "+t+"(a,d)}";return(d=new Function("TrivialArray",a))(l[r][0])}var a=["'use strict'"],u=o(n),s=u.map(function(r){return"i"+r}),f="this.offset+"+u.map(function(r){return"this.stride["+r+"]*i"+r}).join("+"),c=u.map(function(r){return"b"+r}).join(","),h=u.map(function(r){return"c"+r}).join(",");a.push("function "+t+"(a,"+c+","+h+",d){this.data=a","this.shape=["+c+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+t+".prototype","proto.dtype='"+r+"'","proto.dimension="+n),a.push("Object.defineProperty(proto,'size',{get:function "+t+"_size(){return "+u.map(function(r){return"this.shape["+r+"]"}).join("*"),"}})"),1===n?a.push("proto.order=[0]"):(a.push("Object.defineProperty(proto,'order',{get:"),n<4?(a.push("function "+t+"_order(){"),2===n?a.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===n&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+t+"_set("+s.join(",")+",v){"),e?a.push("return this.data.set("+f+",v)}"):a.push("return this.data["+f+"]=v}"),a.push("proto.get=function "+t+"_get("+s.join(",")+"){"),e?a.push("return this.data.get("+f+")}"):a.push("return this.data["+f+"]}"),a.push("proto.index=function "+t+"_index(",s.join(),"){return "+f+"}"),a.push("proto.hi=function "+t+"_hi("+s.join(",")+"){return new "+t+"(this.data,"+u.map(function(r){return["(typeof i",r,"!=='number'||i",r,"<0)?this.shape[",r,"]:i",r,"|0"].join("")}).join(",")+","+u.map(function(r){return"this.stride["+r+"]"}).join(",")+",this.offset)}");var _=u.map(function(r){return"a"+r+"=this.shape["+r+"]"}),p=u.map(function(r){return"c"+r+"=this.stride["+r+"]"});a.push("proto.lo=function "+t+"_lo("+s.join(",")+"){var b=this.offset,d=0,"+_.join(",")+","+p.join(","));for(y=0;y<n;++y)a.push("if(typeof i"+y+"==='number'&&i"+y+">=0){d=i"+y+"|0;b+=c"+y+"*d;a"+y+"-=d}");a.push("return new "+t+"(this.data,"+u.map(function(r){return"a"+r}).join(",")+","+u.map(function(r){return"c"+r}).join(",")+",b)}"),a.push("proto.step=function "+t+"_step("+s.join(",")+"){var "+u.map(function(r){return"a"+r+"=this.shape["+r+"]"}).join(",")+","+u.map(function(r){return"b"+r+"=this.stride["+r+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(y=0;y<n;++y)a.push("if(typeof i"+y+"==='number'){d=i"+y+"|0;if(d<0){c+=b"+y+"*(a"+y+"-1);a"+y+"=ceil(-a"+y+"/d)}else{a"+y+"=ceil(a"+y+"/d)}b"+y+"*=d}");a.push("return new "+t+"(this.data,"+u.map(function(r){return"a"+r}).join(",")+","+u.map(function(r){return"b"+r}).join(",")+",c)}");for(var g=new Array(n),v=new Array(n),y=0;y<n;++y)g[y]="a[i"+y+"]",v[y]="b[i"+y+"]";a.push("proto.transpose=function "+t+"_transpose("+s+"){"+s.map(function(r,n){return r+"=("+r+"===undefined?"+n+":"+r+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+t+"(this.data,"+g.join(",")+","+v.join(",")+",this.offset)}"),a.push("proto.pick=function "+t+"_pick("+s+"){var a=[],b=[],c=this.offset");for(y=0;y<n;++y)a.push("if(typeof i"+y+"==='number'&&i"+y+">=0){c=(c+this.stride["+y+"]*i"+y+")|0}else{a.push(this.shape["+y+"]);b.push(this.stride["+y+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+t+"(data,shape,stride,offset){return new "+t+"(data,"+u.map(function(r){return"shape["+r+"]"}).join(",")+","+u.map(function(r){return"stride["+r+"]"}).join(",")+",offset)}");var d=new Function("CTOR_LIST","ORDER",a.join("\n"));return d(l[r],i)}var o=r("iota-array"),u=r("is-buffer"),s="undefined"!=typeof Float64Array,l={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};n.exports=function(r,n,t,e){if(void 0===r)return(_=l.array[0])([]);"number"==typeof r&&(r=[r]),void 0===n&&(n=[r.length]);var i=n.length;if(void 0===t){t=new Array(i);for(var o=i-1,f=1;o>=0;--o)t[o]=f,f*=n[o]}if(void 0===e)for(e=0,o=0;o<i;++o)t[o]<0&&(e-=(n[o]-1)*t[o]);for(var c=function(r){if(u(r))return"buffer";if(s)switch(Object.prototype.toString.call(r)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(r)?"array":"generic"}(r),h=l[c];h.length<=i+1;)h.push(a(c,h.length-1));var _=h[i+1];return _(r,n,t,e)}},{"iota-array":10,"is-buffer":11}],19:[function(r,n,t){(function(r){function n(r,n){for(var t=0,e=r.length-1;e>=0;e--){var i=r[e];"."===i?r.splice(e,1):".."===i?(r.splice(e,1),t++):t&&(r.splice(e,1),t--)}if(n)for(;t--;t)r.unshift("..");return r}function e(r,n){if(r.filter)return r.filter(n);for(var t=[],e=0;e<r.length;e++)n(r[e],e,r)&&t.push(r[e]);return t}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(r){return i.exec(r).slice(1)};t.resolve=function(){for(var t="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:r.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(e(t.split("/"),function(r){return!!r}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(r){var i=t.isAbsolute(r),a="/"===o(r,-1);return(r=n(e(r.split("/"),function(r){return!!r}),!i).join("/"))||i||(r="."),r&&a&&(r+="/"),(i?"/":"")+r},t.isAbsolute=function(r){return"/"===r.charAt(0)},t.join=function(){var r=Array.prototype.slice.call(arguments,0);return t.normalize(e(r,function(r,n){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r}).join("/"))},t.relative=function(r,n){function e(r){for(var n=0;n<r.length&&""===r[n];n++);for(var t=r.length-1;t>=0&&""===r[t];t--);return n>t?[]:r.slice(n,t-n+1)}r=t.resolve(r).substr(1),n=t.resolve(n).substr(1);for(var i=e(r.split("/")),a=e(n.split("/")),o=Math.min(i.length,a.length),u=o,s=0;s<o;s++)if(i[s]!==a[s]){u=s;break}for(var l=[],s=u;s<i.length;s++)l.push("..");return(l=l.concat(a.slice(u))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(r){var n=a(r),t=n[0],e=n[1];return t||e?(e&&(e=e.substr(0,e.length-1)),t+e):"."},t.basename=function(r,n){var t=a(r)[2];return n&&t.substr(-1*n.length)===n&&(t=t.substr(0,t.length-n.length)),t},t.extname=function(r){return a(r)[3]};var o="b"==="ab".substr(-1)?function(r,n,t){return r.substr(n,t)}:function(r,n,t){return n<0&&(n=r.length+n),r.substr(n,t)}}).call(this,r("_process"))},{_process:20}],20:[function(r,n,t){function e(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(r){if(f===setTimeout)return setTimeout(r,0);if((f===e||!f)&&setTimeout)return f=setTimeout,setTimeout(r,0);try{return f(r,0)}catch(n){try{return f.call(null,r,0)}catch(n){return f.call(this,r,0)}}}function o(){g&&_&&(g=!1,_.length?p=_.concat(p):v=-1,p.length&&u())}function u(){if(!g){var r=a(o);g=!0;for(var n=p.length;n;){for(_=p,p=[];++v<n;)_&&_[v].run();v=-1,n=p.length}_=null,g=!1,function(r){if(c===clearTimeout)return clearTimeout(r);if((c===i||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(r);try{c(r)}catch(n){try{return c.call(null,r)}catch(n){return c.call(this,r)}}}(r)}}function s(r,n){this.fun=r,this.array=n}function l(){}var f,c,h=n.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:e}catch(r){f=e}try{c="function"==typeof clearTimeout?clearTimeout:i}catch(r){c=i}}();var _,p=[],g=!1,v=-1;h.nextTick=function(r){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];p.push(new s(r,n)),1!==p.length||g||a(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(r){return[]},h.binding=function(r){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(r){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],21:[function(r,n,t){(function(n,e){"use strict";function i(r){if(r){var n=r.length||r.byteLength,t=y.log2(n);m[t].push(r)}}function a(r){var r=y.nextPow2(r),n=y.log2(r),t=m[n];return t.length>0?t.pop():new ArrayBuffer(r)}function o(r){return new Uint8Array(a(r),0,r)}function u(r){return new Uint16Array(a(2*r),0,r)}function s(r){return new Uint32Array(a(4*r),0,r)}function l(r){return new Int8Array(a(r),0,r)}function f(r){return new Int16Array(a(2*r),0,r)}function c(r){return new Int32Array(a(4*r),0,r)}function h(r){return new Float32Array(a(4*r),0,r)}function _(r){return new Float64Array(a(8*r),0,r)}function p(r){return b?new Uint8ClampedArray(a(r),0,r):o(r)}function g(r){return new DataView(a(r),0,r)}function v(r){r=y.nextPow2(r);var n=y.log2(r),t=A[n];return t.length>0?t.pop():new e(r)}var y=r("bit-twiddle"),d=r("dup");n.__TYPEDARRAY_POOL||(n.__TYPEDARRAY_POOL={UINT8:d([32,0]),UINT16:d([32,0]),UINT32:d([32,0]),INT8:d([32,0]),INT16:d([32,0]),INT32:d([32,0]),FLOAT:d([32,0]),DOUBLE:d([32,0]),DATA:d([32,0]),UINT8C:d([32,0]),BUFFER:d([32,0])});var b="undefined"!=typeof Uint8ClampedArray,w=n.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=d([32,0])),w.BUFFER||(w.BUFFER=d([32,0]));var m=w.DATA,A=w.BUFFER;t.free=function(r){if(e.isBuffer(r))A[y.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var n=r.length||r.byteLength,t=0|y.log2(n);m[t].push(r)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeInt8=t.freeInt16=t.freeInt32=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(r){i(r.buffer)},t.freeArrayBuffer=i,t.freeBuffer=function(r){A[y.log2(r.length)].push(r)},t.malloc=function(r,n){if(void 0===n||"arraybuffer"===n)return a(r);switch(n){case"uint8":return o(r);case"uint16":return u(r);case"uint32":return s(r);case"int8":return l(r);case"int16":return f(r);case"int32":return c(r);case"float":case"float32":return h(r);case"double":case"float64":return _(r);case"uint8_clamped":return p(r);case"buffer":return v(r);case"data":case"dataview":return g(r);default:return null}return null},t.mallocArrayBuffer=a,t.mallocUint8=o,t.mallocUint16=u,t.mallocUint32=s,t.mallocInt8=l,t.mallocInt16=f,t.mallocInt32=c,t.mallocFloat32=t.mallocFloat=h,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=p,t.mallocDataView=g,t.mallocBuffer=v,t.clearCache=function(){for(var r=0;r<32;++r)w.UINT8[r].length=0,w.UINT16[r].length=0,w.UINT32[r].length=0,w.INT8[r].length=0,w.INT16[r].length=0,w.INT32[r].length=0,w.FLOAT[r].length=0,w.DOUBLE[r].length=0,w.UINT8C[r].length=0,m[r].length=0,A[r].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r("buffer").Buffer)},{"bit-twiddle":2,buffer:3,dup:8}],22:[function(r,n,t){"use strict";n.exports=function(r,n,t){return 0===r.length?r:n?(t||r.sort(n),function(r,n){for(var t=1,e=r.length,i=r[0],a=r[0],o=1;o<e;++o)if(a=i,i=r[o],n(i,a)){if(o===t){t++;continue}r[t++]=i}return r.length=t,r}(r,n)):(t||r.sort(),function(r){for(var n=1,t=r.length,e=r[0],i=r[0],a=1;a<t;++a,i=e)if(i=e,(e=r[a])!==i){if(a===n){n++;continue}r[n++]=e}return r.length=n,r}(r))}},{}],23:[function(r,n,t){"use strict";n.exports={printThreshold:7,nFloatingValues:5}},{}],24:[function(r,n,t){"use strict";n.exports={int8:Int8Array,int16:Int16Array,int32:Int32Array,uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,float32:Float32Array,float64:Float64Array,array:Array}},{}],25:[function(r,n,t){"use strict";n.exports={ValueError:function(){var r=Error.apply(this,arguments);return r.name=this.constructor.name,r},ConfigError:function(){var r=Error.apply(this,arguments);return r.name=this.constructor.name,r},NotImplementedError:function(){var r=Error.apply(this,arguments);return r.name=this.constructor.name,r}}},{}],26:[function(r,n,t){"use strict";n.exports=function(r,n,t,e,i){var a=n-1,o=n+e-1,u=r-1,s=r+t-1;return 0!==n&&0!==r?i.selection.get(u,a)-i.selection.get(s,a)-i.selection.get(u,o)+i.selection.get(s,o):0===n&&0===r?i.selection.get(r+t-1,n+e-1):0===n?-i.selection.get(u,n+e-1)+i.selection.get(r+t-1,n+e-1):-i.selection.get(s,a)+i.selection.get(s,o)}},{}],27:[function(r,n,t){"use strict";var e=r("./area-sum");n.exports=function(r,n,t,i,a){return e(r,n,t,i,a)/(t*i)}},{"./area-sum":26}],28:[function(r,n,t){(function(t){"use strict";function e(r){return a(i.join(o,r))}var i=r("path"),a=r("./read"),o=i.join(i.resolve(t),"../../data"),u={};Object.defineProperty(u,"digit",{get:function(){return e("five.png")}}),Object.defineProperty(u,"five",{get:function(){return e("five.png")}}),Object.defineProperty(u,"node",{get:function(){return e("nodejs.png")}}),Object.defineProperty(u,"lena",{get:function(){return e("lenna.png")}}),Object.defineProperty(u,"lenna",{get:function(){return e("lenna.png")}}),Object.defineProperty(u,"moon",{get:function(){return e("moon.jpg")}}),n.exports=u}).call(this,"/src/images")},{"./read":32,path:19}],29:[function(r,n,t){"use strict";var e=r("../ndarray");n.exports=function(r){return new e(r.selection.step(null,-1))}},{"../ndarray":42}],30:[function(r,n,t){"use strict";n.exports={data:r("./data"),read:r("./read"),save:r("./save"),resize:r("./resize"),sat:r("./sat"),ssat:r("./ssat"),sobel:r("./sobel"),scharr:r("./scharr"),areaSum:r("./area-sum"),areaValue:r("./area-value"),rgb2gray:r("./rgb2gray"),flip:r("./flip")}},{"./area-sum":26,"./area-value":27,"./data":28,"./flip":29,"./read":32,"./resize":33,"./rgb2gray":34,"./sat":35,"./save":36,"./scharr":37,"./sobel":38,"./ssat":39}],31:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("cwise/lib/wrapper")({args:["array","array","array"],pre:{body:"{this_isgray=!0}",args:[],thisVars:["this_isgray"],localVars:[]},body:{body:"{_inline_82_arg0_===_inline_82_arg1_&&_inline_82_arg1_===_inline_82_arg2_||(this_isgray=!1)}",args:[{name:"_inline_82_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_82_arg1_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_82_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_isgray"],localVars:[]},post:{body:"{return this_isgray}",args:[],thisVars:["this_isgray"],localVars:[]},debug:!1,funcName:"doCheckIsGrayscaleCwise",blockSize:64});n.exports=function(r){r instanceof e&&(r=r.selection);var n=r.shape;return 1!==n.length&&(2===n.length||3===n.length&&1===n[2]||3===n.length&&(3===n[2]||4===n[2])&&i(r.pick(null,null,0),r.pick(null,null,1),r.pick(null,null,2)))}},{"../ndarray":42,"cwise/lib/wrapper":7}],32:[function(r,n,t){"use strict";var e=r("ndarray"),i=r("../ndarray"),a=r("../errors"),o=r("./is-grayscale");n.exports=function(r){if(r instanceof HTMLCanvasElement)return function(r){var n=r.getContext("2d").getImageData(0,0,r.width,r.height),t=[r.width,r.height,4],a=[4,4*r.width,1],u=e(new Uint8Array(n.data),t,a,0).transpose(1,0);return o(u)&&(u=u.pick(null,null,0)),new i(u)}(r);if(r instanceof HTMLImageElement)return function(r){var n=document.createElement("canvas");n.width=r.width,n.height=r.height;var t=n.getContext("2d");t.drawImage(r,0,0);var a=t.getImageData(0,0,r.width,r.height),u=[r.width,r.height,4],s=[4,4*r.width,1],l=e(new Uint8Array(a.data),u,s,0).transpose(1,0);return o(l)&&(l=l.pick(null,null,0)),new i(l)}(r);throw new a.ValueError("expect input to be either an HTML Canvas or a (loaded) Image")}},{"../errors":25,"../ndarray":42,"./is-grayscale":31,ndarray:18}],33:[function(r,n,t){"use strict";var e=r("./utils"),i=r("ndarray"),a=r("../ndarray");n.exports=function(r,n,t){var o=r.shape,u=o[0],s=o[1],l=o[2]||1,f=document.createElement("canvas");f.height=u,f.width=s;var c=f.getContext("2d"),h=c.createImageData(s,u),_=e.setRawData(r.selection,h.data);if(_)throw _;var p=u/n,g=s/t,v=Math.min(p,g),y=n*v,d=t*v,b=(u-v*n)/2,w=(s-v*t)/2;c.putImageData(h,0,0),c.drawImage(f,w,b,d,y,0,0,t,n);var m=c.getImageData(0,0,t,n),A=[0|t,0|n,4],j=[4,4*t|0,1],x=i(new Uint8Array(m.data),A,j,0).transpose(1,0);return 2===o.length?x=x.pick(null,null,0):3===o.length&&1===l&&(x=x.pick(null,null,0)),new a(x)}},{"../ndarray":42,"./utils":40,ndarray:18}],34:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("../utils"),a=r("cwise/lib/wrapper")({args:["array","array","array","array"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_79_arg0_=4899*_inline_79_arg1_+9617*_inline_79_arg2_+1868*_inline_79_arg3_+8192>>14}",args:[{name:"_inline_79_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_79_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_79_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_79_arg3_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"rgb2grayCwise",blockSize:64});n.exports=function(r){r instanceof e||(r=new e(r));var n=r.shape,t=n[0],o=n[1];if(1===(n[2]||1))return r;var u=[t,o],s=new e(new Uint8Array(i.shapeSize(u)),u),l=r.selection.pick(null,null,0),f=r.selection.pick(null,null,1),c=r.selection.pick(null,null,2);return a(s.selection,l,f,c),s}},{"../ndarray":42,"../utils":43,"cwise/lib/wrapper":7}],35:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("./rgb2gray"),a=r("cwise/lib/wrapper")({args:["array","array","index",{offset:[-1,-1],array:0},{offset:[-1,0],array:0},{offset:[0,-1],array:0}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_70_arg0_=0!==_inline_70_arg2_[0]&&0!==_inline_70_arg2_[1]?_inline_70_arg1_+_inline_70_arg4_+_inline_70_arg5_-_inline_70_arg3_:0===_inline_70_arg2_[0]&&0===_inline_70_arg2_[1]?_inline_70_arg1_:0===_inline_70_arg2_[0]?_inline_70_arg1_+_inline_70_arg5_:_inline_70_arg1_+_inline_70_arg4_}",args:[{name:"_inline_70_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_70_arg1_",lvalue:!1,rvalue:!0,count:4},{name:"_inline_70_arg2_",lvalue:!1,rvalue:!0,count:5},{name:"_inline_70_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_70_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_70_arg5_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doIntegrateBody",blockSize:64});n.exports=function(r){var n=i(r),t=n.shape,o=t[0],u=t[1],s=new e(new Uint32Array(o*u),[o,u]);return a(s.selection,n.selection),s}},{"../ndarray":42,"./rgb2gray":34,"cwise/lib/wrapper":7}],36:[function(r,n,t){"use strict";var e=r("./utils"),i=r("../errors");n.exports=function(r,n){var t=r.shape,a=t[0],o=t[1];if(!(n instanceof HTMLCanvasElement))throw new i.ValueError("expect input to be either an HTML Canvas or a (loaded) Image");var u=document.createElement("canvas");u.height=a,u.width=o;var s=u.getContext("2d"),l=s.createImageData(o,a),f=e.setRawData(r.selection,l.data);if(f)throw f;s.putImageData(l,0,0),s.drawImage(u,o,a),n.getContext("2d").drawImage(u,0,0,o,a,0,0,n.width,n.height)}},{"../errors":25,"./utils":40}],37:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("../ndarray"),a=r("../utils"),o=r("./rgb2gray"),u=r("cwise/lib/wrapper")({args:["array","array",{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_76_q=3*_inline_76_arg2_+10*_inline_76_arg3_+3*_inline_76_arg4_-3*_inline_76_arg7_-10*_inline_76_arg8_-3*_inline_76_arg9_,_inline_76_s=3*_inline_76_arg2_-3*_inline_76_arg4_+10*_inline_76_arg5_-10*_inline_76_arg6_+3*_inline_76_arg7_-3*_inline_76_arg9_;_inline_76_arg0_=Math.sqrt(_inline_76_s*_inline_76_s+_inline_76_q*_inline_76_q)}",args:[{name:"_inline_76_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_76_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_76_arg2_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg7_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg9_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:["_inline_76_q","_inline_76_s"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doSobelBody",blockSize:64});n.exports=function(r){var n=o(r),t=n.shape,s=t[0],l=t[1],f=new i(new Float32Array(a.shapeSize(t)),t);return u(f.selection,n.selection),e.assigns(f.selection.pick(0,null),0),e.assigns(f.selection.pick(null,0),0),e.assigns(f.selection.pick(s-1,null),0),e.assigns(f.selection.pick(null,l-1),0),f.divide(16*Math.sqrt(2),!1)}},{"../ndarray":42,"../utils":43,"./rgb2gray":34,"cwise/lib/wrapper":7,"ndarray-ops":17}],38:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("../ndarray"),a=r("../utils"),o=r("./rgb2gray"),u=r("cwise/lib/wrapper")({args:["array","array",{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_73_q=_inline_73_arg2_+2*_inline_73_arg3_+_inline_73_arg4_-_inline_73_arg7_-2*_inline_73_arg8_-_inline_73_arg9_,_inline_73_s=_inline_73_arg2_-_inline_73_arg4_+2*_inline_73_arg5_-2*_inline_73_arg6_+_inline_73_arg7_-_inline_73_arg9_;_inline_73_arg0_=Math.sqrt(_inline_73_s*_inline_73_s+_inline_73_q*_inline_73_q)}",args:[{name:"_inline_73_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_73_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_73_arg2_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg7_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg9_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:["_inline_73_q","_inline_73_s"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doSobelBody",blockSize:64});n.exports=function(r){var n=o(r),t=n.shape,s=t[0],l=t[1],f=new i(new Float32Array(a.shapeSize(t)),t);return u(f.selection,n.selection),e.assigns(f.selection.pick(0,null),0),e.assigns(f.selection.pick(null,0),0),e.assigns(f.selection.pick(s-1,null),0),e.assigns(f.selection.pick(null,l-1),0),f.divide(4*Math.sqrt(2),!1)}},{"../ndarray":42,"../utils":43,"./rgb2gray":34,"cwise/lib/wrapper":7,"ndarray-ops":17}],39:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("./rgb2gray"),a=r("cwise/lib/wrapper")({args:["array","array","index",{offset:[-1,-1],array:0},{offset:[-1,0],array:0},{offset:[0,-1],array:0}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_67_arg0_=0!==_inline_67_arg2_[0]&&0!==_inline_67_arg2_[1]?_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg4_+_inline_67_arg5_-_inline_67_arg3_:0===_inline_67_arg2_[0]&&0===_inline_67_arg2_[1]?_inline_67_arg1_*_inline_67_arg1_:0===_inline_67_arg2_[0]?_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg5_:_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg4_}",args:[{name:"_inline_67_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_67_arg1_",lvalue:!1,rvalue:!0,count:8},{name:"_inline_67_arg2_",lvalue:!1,rvalue:!0,count:5},{name:"_inline_67_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_67_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_67_arg5_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doIntegrateBody",blockSize:64});n.exports=function(r){var n=i(r),t=n.shape,o=t[0],u=t[1],s=new e(new Uint32Array(o*u),[o,u]);return a(s.selection,n.selection),s}},{"../ndarray":42,"./rgb2gray":34,"cwise/lib/wrapper":7}],40:[function(r,n,t){"use strict";var e=r("../ndarray");n.exports.getRawData=function(r){r instanceof e&&(r=r.selection);var n,t,i=0,a=r.shape,o=a[0],u=a[1],s=a[2]||1,l=new Uint8Array(o*u*s);if(3===r.shape.length)if(3===s)for(n=0;n<o;++n)for(t=0;t<u;++t)l[i++]=r.get(n,t,0),l[i++]=r.get(n,t,1),l[i++]=r.get(n,t,2);else if(4===s)for(n=0;n<o;++n)for(t=0;t<u;++t)l[i++]=r.get(n,t,0),l[i++]=r.get(n,t,1),l[i++]=r.get(n,t,2),l[i++]=r.get(n,t,3);else{if(1!==s)return new Error("Incompatible array shape");for(n=0;n<o;++n)for(t=0;t<u;++t)l[i++]=r.get(n,t,0)}else{if(2!==r.shape.length)return new Error("Invalid image");for(n=0;n<o;++n)for(t=0;t<u;++t)l[i++]=r.get(n,t)}return l},n.exports.setRawData=function(r,n){var t,e,i,a=0,o=r.shape[0],u=r.shape[1],s=r.shape[2]||1;if(3===r.shape.length)if(3===s)for(t=0;t<o;++t)for(e=0;e<u;++e)n[a++]=r.get(t,e,0),n[a++]=r.get(t,e,1),n[a++]=r.get(t,e,2),n[a++]=255;else if(4===s)for(t=0;t<o;++t)for(e=0;e<u;++e)n[a++]=r.get(t,e,0),n[a++]=r.get(t,e,1),n[a++]=r.get(t,e,2),n[a++]=r.get(t,e,3);else{if(1!==s)return new Error("Incompatible array shape");for(t=0;t<o;++t)for(e=0;e<u;++e)i=r.get(t,e,0),n[a++]=i,n[a++]=i,n[a++]=i,n[a++]=255}else{if(2!==r.shape.length)return new Error("Invalid image");for(t=0;t<o;++t)for(e=0;e<u;++e)i=r.get(t,e),n[a++]=i,n[a++]=i,n[a++]=i,n[a++]=255}}},{"../ndarray":42}],41:[function(r,n,t){"use strict";function e(r,n){return g.new(r).transpose(n)}function i(r,n,t,e){if(1===arguments.length)return i(0,r,1,void 0);if(2===arguments.length&&v.isNumber(n))return i(r,n,1,void 0);if(2===arguments.length)return i(0,r,1,n);if(3===arguments.length&&!v.isNumber(t))return i(r,n,1,t);for(var a=[],o=0;r<n;)a[o++]=r,r+=t;return g.new(a,e)}function a(r,n){v.isNumber(r)&&r>=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n),i=new g(new e(t),r);return"array"===i.dtype&&c.assigns(i.selection,0),i}function o(r,n){v.isNumber(r)&&r>=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n),i=new g(new e(t),r);return c.assigns(i.selection,1),i}function u(r){var n=r instanceof g?r.clone():g.new(r);return c.abseq(n.selection),n}function s(r){arguments.length>1&&(r=[].slice.call(arguments));var n,t;for(n=0;n<r.length;n++)t=r[n],r[n]=t instanceof g?t.tolist():v.isNumber(t)?[t]:t;var e=r[0];for(n=1;n<r.length;n++){t=r[n];var i=v.getShape(e),a=v.getShape(t);if(i.length!==a.length)throw new y.ValueError("all the input arrays must have same number of dimensions");if(1===i.length&&1===a.length)e=e.concat(t);else if(2===i.length&&2===a.length&&i[0]===a[0]||1===i.length&&2===a.length&&i[0]===a[0]||2===i.length&&1===a.length&&i[0]===a[0])for(var o=0;o<i[0];o++)e[o]=e[o].concat(t[o]);else{if(!(3===i.length&&3===a.length&&i[0]===a[0]&&i[1]===a[1]||2===i.length&&3===a.length&&i[0]===a[0]&&i[1]===a[1]||3===i.length&&2===a.length&&i[0]===a[0]&&i[1]===a[1]))throw new y.ValueError('cannot concatenate "'+i+'" with "'+a+'"');for(var u=0;u<i[0];u++){for(var s=new Array(i[1]),l=0;l<i[1];l++)s[l]=e[u][l].concat(t[u][l]);e[u]=s}}}return g.new(e,r[0].dtype)}function l(r,n){for(var t=o((r=g.new(r)).ndim).tolist(),e=n;e<0;)e+=r.ndim;if(void 0===t[e])throw new y.ValueError("axis="+n+"invalid for the "+r.ndim+"-dimensional input array");return t[e]=-1,r.step.apply(r,t)}var f=r("ndarray"),c=r("ndarray-ops"),h=r("ndarray-fft"),_=r("./config"),p=r("./dtypes"),g=r("./ndarray"),v=r("./utils"),y=r("./errors"),d=r("cwise/lib/wrapper")({args:["array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_43_arg0_=_inline_43_arg0_<-30?0:_inline_43_arg0_>30?1:1/(1+Math.exp(-1*_inline_43_arg1_*_inline_43_arg0_))}",args:[{name:"_inline_43_arg0_",lvalue:!0,rvalue:!0,count:4},{name:"_inline_43_arg1_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"sigmoidCwise",blockSize:64}),b=r("cwise/lib/wrapper")({args:["array","scalar","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_46_arg0_=Math.min(Math.max(_inline_46_arg1_,_inline_46_arg0_),_inline_46_arg2_)}",args:[{name:"_inline_46_arg0_",lvalue:!0,rvalue:!0,count:2},{name:"_inline_46_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_46_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"clipCwise",blockSize:64}),w=r("cwise/lib/wrapper")({args:["array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_49_arg0_=Math.max(_inline_49_arg1_*_inline_49_arg0_,_inline_49_arg0_)}",args:[{name:"_inline_49_arg0_",lvalue:!0,rvalue:!0,count:3},{name:"_inline_49_arg1_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"leakyReluCwise",blockSize:64}),m=r("cwise/lib/wrapper")({args:["array"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_52_arg0_=(Math.exp(2*_inline_52_arg0_)-1)/(Math.exp(2*_inline_52_arg0_)+1)}",args:[{name:"_inline_52_arg0_",lvalue:!0,rvalue:!0,count:3}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"tanhCwise",blockSize:64});n.exports={config:_,dtypes:p,NdArray:g,ndarray:f,array:g.new,arange:i,reshape:function(r,n){return g.new(r).reshape(n)},zeros:a,ones:o,empty:function(r,n){v.isNumber(r)&&r>=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n);return new g(new e(t),r)},flatten:function(r){return g.new(r).flatten()},flip:l,random:function(r){if(0===arguments.length)return g.new(Math.random());r=1===arguments.length?v.isNumber(r)?[0|r]:r:[].slice.call(arguments);var n=v.shapeSize(r),t=new g(new Float64Array(n),r);return c.random(t.selection),t},softmax:function(r){var n=g.new(r).exp(),t=n.sum();return c.divseq(n.selection,t),n},sigmoid:function(r,n){return r=g.new(r).clone(),n=n||1,d(r.selection,n),r},leakyRelu:function(r,n){n=n||.001;var t=r instanceof g?r.clone():g.new(r);return w(t.selection,n),t},abs:u,arccos:function(r){var n=r instanceof g?r.clone():g.new(r);return c.acoseq(n.selection),n},arcsin:function(r){var n=r instanceof g?r.clone():g.new(r);return c.asineq(n.selection),n},arctan:function(r){var n=r instanceof g?r.clone():g.new(r);return c.ataneq(n.selection),n},cos:function(r){var n=r instanceof g?r.clone():g.new(r);return c.coseq(n.selection),n},sin:function(r){var n=r instanceof g?r.clone():g.new(r);return c.sineq(n.selection),n},tan:function(r){var n=r instanceof g?r.clone():g.new(r);return c.taneq(n.selection),n},tanh:function(r){var n=r instanceof g?r.clone():g.new(r);return m(n.selection),n},clip:function(r,n,t){1===arguments.length?(n=0,t=1):2===arguments.length&&(t=1);var e=r instanceof g?r.clone():g.new(r);return b(e.selection,n,t),e},exp:function(r){return g.new(r).exp()},log:function(r){return g.new(r).log()},sqrt:function(r){return g.new(r).sqrt()},power:function(r,n){return g.new(r).pow(n)},sum:function(r){return g.new(r).sum()},mean:function(r){return g.new(r).mean()},std:function(r,n){return g.new(r).std(n)},dot:function(r,n){return g.new(r).dot(n)},add:function(r,n){return g.new(r).add(n)},subtract:function(r,n){return g.new(r).subtract(n)},multiply:function(r,n){return g.new(r).multiply(n)},divide:function(r,n){return g.new(r).divide(n)},negative:function(r){return g.new(r).negative()},equal:function(r,n){return g.new(r).equal(n)},max:function(r){return g.new(r).max()},min:function(r){return g.new(r).min()},concatenate:s,transpose:e,errors:y,broadcast:function(r,n){if(0!==r.length&&0!==n.length){for(var t=r.slice().reverse(),e=n.slice().reverse(),i=Math.max(r.length,n.length),a=new Array(i),o=0;o<i;o++)if(t[o]&&1!==t[o])if(e[o]&&1!==e[o]){if(t[o]!==e[o])return;a[o]=t[o]}else a[o]=t[o];else a[o]=e[o];return a.reverse()}},round:function(r){return g.new(r).round()},convolve:function(r,n){return g.new(r).convolve(n)},fftconvolve:function(r,n){return g.new(r).fftconvolve(n)},fft:function(r){var n=(r=r instanceof g?r.clone():g.new(r)).shape,t=n.length;if(2!==n[t-1])throw new y.ValueError("expect last dimension of the array to have 2 values (for both real and imaginary part)");var e=new Array(t),i=new Array(t);return e[t-1]=0,i[t-1]=1,h(1,r.selection.pick.apply(r.selection,e),r.selection.pick.apply(r.selection,i)),r},ifft:function(r){var n=(r=r instanceof g?r.clone():g.new(r)).shape,t=n.length;if(2!==n[t-1])throw new y.ValueError("expect last dimension of the array to have 2 values (for both real and imaginary part)");var e=new Array(t),i=new Array(t);return e[t-1]=0,i[t-1]=1,h(-1,r.selection.pick.apply(r.selection,e),r.selection.pick.apply(r.selection,i)),r},diag:function(r){return g.new(r).diag()},identity:function(r,n){for(var t=a([r,r],n),e=0;e<r;e++)t.set(e,e,1);return t},stack:function(r,n){if(n=n||0,!r||0===r.length)throw new y.ValueError("need at least one array to stack");for(var t=(r=r.map(function(r){return v.isNumber(r)?r:g.new(r)}))[0].shape||[],e=1;e<r.length;e++)for(var i=r[e].shape||[],o=Math.max(t.length,i.length),u=0;u<o;u++)if(t[u]!==i[u])throw new y.ValueError("all input arrays must have the same shape");var l;if(0===t.length)l=s(r);else for(l=a([r.length].concat(t)),e=0;e<r.length;e++)l.pick(e).assign(r[e],!1);if(n){n<0&&(n=l.ndim+n);for(var f=l.ndim,c=new Array(f),e=0;e<f;e++)c[e]=e<n?e+1:e===n?0:e;return l.transpose(c)}return l},rot90:function(r,n,t){for(n=n||1;n<0;)n+=4;if(n%=4,r=g.new(r),1!==(t=g.new(t||[0,1])).shape.length||2!==t.shape[0])throw new y.ValueError("len(axes) must be 2");if((t=t.tolist())[0]===t[1]||u(t[0]-t[1])===r.ndim)throw new y.ValueError("Axes must be different.");if(0===n)return r;if(2===n)return l(l(r,t[0]),t[1]);var a=i(r.ndim).tolist(),o=a[t[0]];return a[t[0]]=a[t[1]],a[t[1]]=o,1===n?e(l(r,t[1]),a):l(e(r,a),t[1])},int8:function(r){return g.new(r,"int8")},uint8:function(r){return g.new(r,"uint8")},int16:function(r){return g.new(r,"int16")},uint16:function(r){return g.new(r,"uint16")},int32:function(r){return g.new(r,"int32")},uint32:function(r){return g.new(r,"uint32")},float32:function(r){return g.new(r,"float32")},float64:function(r){return g.new(r,"float64")},images:r("./images")}},{"./config":23,"./dtypes":24,"./errors":25,"./images":30,"./ndarray":42,"./utils":43,"cwise/lib/wrapper":7,ndarray:18,"ndarray-fft":13,"ndarray-ops":17}],42:[function(r,n,t){"use strict";function e(r,n){if(r instanceof g)return r;var t=p.getType(n);if(p.isNumber(r))return t!==Array?new g(new t([r]),[1]):new g([r],[1]);var e=p.getShape(r);return e.length>1&&(r=p.flatten(r,!0)),r instanceof t||(r=new t(r)),new g(r,e)}function i(r,n){var t=0|r[n=n||0];if(t<=0)return[];var e,a=new Array(t);if(n===r.length-1)for(e=0;e<t;++e)a[e]=0;else for(e=0;e<t;++e)a[e]=i(r,n+1);return a}function a(r){var n=i(r.shape,0);return b(r,n),n}function o(r){return String(Number((r||0).toFixed(h.nFloatingValues)))}var u=r("ndarray"),s=r("ndarray-ops"),l=r("ndarray-gemm"),f=r("ndarray-fft"),c=r("typedarray-pool"),h=r("./config"),_=r("./errors"),p=r("./utils"),g=function(){if(1===arguments.length)this.selection=arguments[0];else{if(0===arguments.length)throw new _.ValueError("Required argument 'data' not found");this.selection=u.apply(null,arguments)}Object.defineProperty(this,"size",{get:function(){return this.selection.size}.bind(this)}),Object.defineProperty(this,"shape",{get:function(){return this.selection.shape}.bind(this)}),Object.defineProperty(this,"ndim",{get:function(){return this.selection.shape.length}.bind(this)}),Object.defineProperty(this,"dtype",{get:function(){return this.selection.dtype}.bind(this),set:function(r){var n=p.getType(r);n!==p.getType(this.dtype)&&(this.selection=u(new n(this.selection.data),this.selection.shape,this.selection.stride,this.selection.offset))}.bind(this)}),Object.defineProperty(this,"T",{get:function(){return this.transpose()}.bind(this)})};g.prototype.get=function(){for(var r=arguments.length,n=0;n<r;n++)arguments[n]<0&&(arguments[n]+=this.shape[n]);return this.selection.get.apply(this.selection,arguments)},g.prototype.set=function(){return this.selection.set.apply(this.selection,arguments)},g.prototype.slice=function(){for(var r=this.ndim,n=new Array(r),t=new Array(r),e=new Array(r),i=this.shape,a=0;a<r;a++){var o=arguments[a];if(void 0===o)break;if(null!==o)if(p.isNumber(o))t[a]=o<0?o+i[a]:o,n[a]=null,e[a]=1;else if(4===o.length&&null===o[1]&&null===o[2]){var u=o[0]<0?o[0]+i[a]:o[0];t[a]=u,n[a]=null,e[a]=o[3]||1}else{var s=o[0]<0?o[0]+i[a]:o[0],l=o[1]<0?o[1]+i[a]:o[1];t[a]=l?s:0,n[a]=l?l-s:s,e[a]=o[2]||1}}var f=this.selection.lo.apply(this.selection,t),c=f.hi.apply(f,n),h=c.step.apply(c,e);return new g(h)},g.prototype.pick=function(r){return new g(this.selection.pick.apply(this.selection,arguments))},g.prototype.lo=function(){return new g(this.selection.lo.apply(this.selection,arguments))},g.prototype.hi=function(){return new g(this.selection.hi.apply(this.selection,arguments))},g.prototype.step=function(){return new g(this.selection.step.apply(this.selection,arguments))},g.prototype.flatten=function(){if(1===this.ndim)return new g(this.selection);var r=p.getType(this.dtype),n=p.flatten(this.tolist(),!0);return n instanceof r||(n=new r(n)),new g(n,[this.size])},g.prototype.reshape=function(r){if(0===arguments.length)throw new _.ValueError("function takes at least one argument (0 given)");if(1===arguments.length&&p.isNumber(r)&&-1===r&&(r=[p.shapeSize(this.shape)]),1===arguments.length&&p.isNumber(r)&&(r=[r]),arguments.length>1&&(r=[].slice.call(arguments)),r.filter(function(r){return-1===r}).length>1)throw new _.ValueError("can only specify one unknown dimension");var n=p.shapeSize(r);if(r=r.map(function(r){return-1===r?-1*this.size/n:r}.bind(this)),this.size!==p.shapeSize(r))throw new _.ValueError("total size of new array must be unchanged");var t,e,i,a,o=this.selection.shape,u=this.selection.offset,s=this.selection.stride,l=o.length,f=r.length;if(l===f){var c=!0;for(i=0;i<f;++i)if(o[i]!==r[i]){c=!1;break}if(c)return new g(this.selection.data,o,s,u)}else if(1===l){for(t=new Array(f),i=f-1,a=1;i>=0;--i)t[i]=a,a*=r[i];for(e=u,i=0;i<f;++i)t[i]<0&&(e-=(r[i]-1)*t[i]);return new g(this.selection.data,r,t,e)}var h=Math.min(l,f),v=!0;for(i=0;i<h;i++)if(o[i]!==r[i]){v=!1;break}if(v){for(t=new Array(f),i=0;i<f;i++)t[i]=s[i]||1;return e=u,new g(this.selection.data,r,t,e)}return this.flatten().reshape(r)},g.prototype.transpose=function(r){if(0===arguments.length){var n=this.ndim;r=new Array(n);for(var t=0;t<n;t++)r[t]=n-t-1}else arguments.length>1&&(r=arguments);return new g(this.selection.transpose.apply(this.selection,r))},g.prototype.dot=function(r){r=r instanceof g?r:e(r,this.dtype);var n=this.shape,t=r.shape;if(2===n.length&&2===t.length&&n[1]===t[0]){var i=p.getType(this.dtype),a=new g(new i(n[0]*t[1]),[n[0],t[1]]);return l(a.selection,this.selection,r.selection),a}if(1===n.length&&2===t.length&&n[0]===t[0])return this.reshape([n[0],1]).T.dot(r).reshape(t[1]);if(2===n.length&&1===t.length&&n[1]===t[0])return this.dot(r.reshape([t[0],1])).reshape(n[0]);if(1===n.length&&1===t.length&&n[0]===t[0])return this.reshape([n[0],1]).T.dot(r.reshape([t[0],1])).reshape([1]);throw new _.ValueError("cannot compute the matrix product of given arrays")},g.prototype.assign=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.assigns(t.selection,r),t):(r=e(r,this.dtype),s.assign(t.selection,r.selection),t)},g.prototype.add=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.addseq(t.selection,r),t):(r=e(r,this.dtype),s.addeq(t.selection,r.selection),t)},g.prototype.subtract=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.subseq(t.selection,r),t):(r=e(r,this.dtype),s.subeq(t.selection,r.selection),t)},g.prototype.multiply=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.mulseq(t.selection,r),t):(r=e(r,this.dtype),s.muleq(t.selection,r.selection),t)},g.prototype.divide=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.divseq(t.selection,r),t):(r=e(r,this.dtype),s.diveq(t.selection,r.selection),t)},g.prototype.pow=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.powseq(t.selection,r),t):(r=e(r,this.dtype),s.poweq(t.selection,r.selection),t)},g.prototype.exp=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.expeq(n.selection),n},g.prototype.log=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.logeq(n.selection),n},g.prototype.sqrt=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.sqrteq(n.selection),n},g.prototype.max=function(){return 0===this.selection.size?null:s.sup(this.selection)},g.prototype.min=function(){return 0===this.selection.size?null:s.inf(this.selection)},g.prototype.sum=function(){return s.sum(this.selection)},g.prototype.std=function(r){r=p.defaults(r,{ddof:0});var n=this.clone();s.powseq(n.selection,2);var t=this.mean(),e=p.shapeSize(this.shape),i=s.sum(n.selection)/(e-r.ddof)-t*t*e/(e-r.ddof);return i>0?Math.sqrt(Math.abs(i)):0},g.prototype.mean=function(){return s.sum(this.selection)/p.shapeSize(this.shape)},g.prototype.tolist=function(){return a(this.selection)},g.prototype.valueOf=function(){return this.tolist()},g.prototype.toString=function(){function r(t,e){if(p.isString(e))return e;if(p.isNumber(e)){var i=o(e);return new Array(Math.max(0,n-i.length+2)).join(" ")+i}t=t||0;var a,u=h.printThreshold,s=u/2|0;return a=e.length>u?[].concat(e.slice(0,s),[" ..."],e.slice(e.length-s)):e,new Array(t+1).join(" ")+"["+a.map(function(n,e){return r(0===e&&0===t?1:t+1,n)}).join(",")+"]"}var n=o(this.max()).length,t=/\[\s+\[/g,e=JSON.stringify(this.tolist(),r).replace(/\]\,(\s*)\[/g,"],\n$1 [").replace(t,"[[").replace(t,"[[").replace(/\]\,(\s+)...\,(\s+)\[/g,"],\n$2 ...\n$2 [").slice(2,-1);switch(this.dtype){case"array":return"array(["+e+")";default:return"array(["+e+", dtype="+this.dtype+")"}},g.prototype.inspect=g.prototype.toString,g.prototype.toJSON=function(){return JSON.stringify(this.tolist())},g.prototype.clone=function(){var r=this.selection;return new g(void 0===r.data.slice?u([].slice.apply(r.data),r.shape,r.stride,r.offset):u(r.data.slice(),r.shape,r.stride,r.offset))},g.prototype.equal=function(r){if(r=e(r),this.size!==r.size||this.ndim!==r.ndim)return!1;for(var n=this.ndim,t=0;t<n;t++)if(this.shape[t]!==r.shape[t])return!1;return s.all(s.eqeq(this.selection,r.selection))},g.prototype.round=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.roundeq(n.selection),n},g.prototype.negative=function(){var r=this.clone();return s.neg(r.selection,this.selection),r},g.prototype.diag=function(){var r=this.ndim;if(1===r){var n=p.getType(this.dtype),t=[this.shape[0],this.shape[0]],e=new g(new n(p.shapeSize(t)),t);"array"===e.dtype&&s.assigns(e.selection,0);for(l=0;l<this.shape[0];l++)e.set(l,l,this.get(l));return e}for(var i=this.shape,a=this.selection.stride,o=1<<30,u=0,l=0;l<r;++l)o=0|Math.min(o,i[l]),u+=a[l];return new g(this.selection.data,[o],[u],this.selection.offset)},g.prototype.iteraxis=function(r,n){var t=this.shape;if(-1===r&&(r=t.length-1),r<0||r>t.length-1)throw new _.ValueError("invalid axis");for(var i=0;i<t[r];i++){for(var o=new Array(r+1),u=0;u<r+1;u++)o[u]=u===r?i:null;n(e(a(this.selection.pick.apply(this.selection,o)),this.dtype),i)}};var v=r("cwise/lib/wrapper")({args:["array","array","array","array"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_55_c=_inline_55_arg2_,_inline_55_f=_inline_55_arg3_,_inline_55_i=_inline_55_arg0_,_inline_55_o=_inline_55_arg1_,_inline_55_t=_inline_55_i*(_inline_55_c+_inline_55_f);_inline_55_arg0_=_inline_55_t-_inline_55_f*(_inline_55_i+_inline_55_o),_inline_55_arg1_=_inline_55_t+_inline_55_c*(_inline_55_o-_inline_55_i)}",args:[{name:"_inline_55_arg0_",lvalue:!0,rvalue:!0,count:2},{name:"_inline_55_arg1_",lvalue:!0,rvalue:!0,count:2},{name:"_inline_55_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_55_arg3_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_55_c","_inline_55_f","_inline_55_i","_inline_55_o","_inline_55_t"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64}),y=r("cwise/lib/wrapper")({args:["array","array","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar",{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_58_arg0_=_inline_58_arg11_*_inline_58_arg10_+_inline_58_arg12_*_inline_58_arg9_+_inline_58_arg13_*_inline_58_arg8_+_inline_58_arg14_*_inline_58_arg7_+_inline_58_arg1_*_inline_58_arg6_+_inline_58_arg15_*_inline_58_arg5_+_inline_58_arg16_*_inline_58_arg4_+_inline_58_arg17_*_inline_58_arg3_+_inline_58_arg18_*_inline_58_arg2_}",args:[{name:"_inline_58_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_58_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg4_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg7_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg9_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg10_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg11_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg12_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg13_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg14_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg15_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg16_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg17_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_58_arg18_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64}),d=r("cwise/lib/wrapper")({args:["index","array","array","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar","scalar",{offset:[-2,-2],array:1},{offset:[-2,-1],array:1},{offset:[-2,0],array:1},{offset:[-2,1],array:1},{offset:[-2,2],array:1},{offset:[-1,-2],array:1},{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[-1,2],array:1},{offset:[0,-2],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[0,2],array:1},{offset:[1,-2],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1},{offset:[1,2],array:1},{offset:[2,-2],array:1},{offset:[2,-1],array:1},{offset:[2,0],array:1},{offset:[2,1],array:1},{offset:[2,2],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_61_arg1_=_inline_61_arg0_[0]<2||_inline_61_arg0_[1]<2?0:_inline_61_arg28_*_inline_61_arg27_+_inline_61_arg29_*_inline_61_arg26_+_inline_61_arg30_*_inline_61_arg25_+_inline_61_arg31_*_inline_61_arg24_+_inline_61_arg32_*_inline_61_arg23_+_inline_61_arg33_*_inline_61_arg22_+_inline_61_arg34_*_inline_61_arg21_+_inline_61_arg35_*_inline_61_arg20_+_inline_61_arg36_*_inline_61_arg19_+_inline_61_arg37_*_inline_61_arg18_+_inline_61_arg38_*_inline_61_arg17_+_inline_61_arg39_*_inline_61_arg16_+_inline_61_arg2_*_inline_61_arg15_+_inline_61_arg40_*_inline_61_arg14_+_inline_61_arg41_*_inline_61_arg13_+_inline_61_arg42_*_inline_61_arg12_+_inline_61_arg43_*_inline_61_arg11_+_inline_61_arg44_*_inline_61_arg10_+_inline_61_arg45_*_inline_61_arg9_+_inline_61_arg46_*_inline_61_arg8_+_inline_61_arg47_*_inline_61_arg7_+_inline_61_arg48_*_inline_61_arg6_+_inline_61_arg49_*_inline_61_arg5_+_inline_61_arg50_*_inline_61_arg4_+_inline_61_arg51_*_inline_61_arg3_}",args:[{name:"_inline_61_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_61_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_61_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg4_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg7_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg9_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg10_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg11_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg12_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg13_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg14_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg15_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg16_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg17_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg18_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg19_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg20_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg21_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg22_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg23_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg24_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg25_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg26_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg27_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg28_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg29_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg30_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg31_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg32_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg33_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg34_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg35_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg36_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg37_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg38_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg39_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg40_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg41_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg42_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg43_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg44_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg45_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg46_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg47_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg48_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg49_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg50_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_61_arg51_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});g.prototype.convolve=function(r){r=g.new(r);var n=this.ndim;if(n!==r.ndim)throw new _.ValueError("arrays must have the same dimensions");for(var t=new Array(n),e=new Array(n),i=this.selection,a=this.shape,o=r.selection,u=r.shape,s=0;s<n;s++){var l=a[s]-u[s]+1;if(l<0)throw new _.ValueError("filter cannot be greater than the array");t[s]=l,e[s]=-1}if(2===n&&3===u[0]&&3===u[1]){var f=new g(new Float32Array(p.shapeSize(a)),a);return y(f.selection,i,o.get(0,0),o.get(0,1),o.get(0,2),o.get(1,0),o.get(1,1),o.get(1,2),o.get(2,0),o.get(2,1),o.get(2,2)),f.lo(1,1).hi(t[0],t[1])}if(3===n&&1===u[2]&&1===a[2]&&3===u[0]&&3===u[1]){var c=new g(new Float32Array(p.shapeSize(a)),a);return y(c.selection.pick(null,null,0),i.pick(null,null,0),o.get(0,0,0),o.get(0,1,0),o.get(0,2,0),o.get(1,0,0),o.get(1,1,0),o.get(1,2,0),o.get(2,0,0),o.get(2,1,0),o.get(2,2,0)),c.lo(1,1).hi(t[0],t[1])}if(2===n&&5===u[0]&&5===u[1]){var h=new g(new Float32Array(p.shapeSize(a)),a);return d(h.selection,i,o.get(0,0),o.get(0,1),o.get(0,2),o.get(0,3),o.get(0,4),o.get(1,0),o.get(1,1),o.get(1,2),o.get(1,3),o.get(1,4),o.get(2,0),o.get(2,1),o.get(2,2),o.get(2,3),o.get(2,4),o.get(3,0),o.get(3,1),o.get(3,2),o.get(3,3),o.get(3,4),o.get(4,0),o.get(4,1),o.get(4,2),o.get(4,3),o.get(4,4)),h.lo(2,2).hi(t[0],t[1])}if(3===n&&1===u[2]&&1===a[2]&&5===u[0]&&5===u[1]){var v=new g(new Float32Array(p.shapeSize(a)),a);return d(v.selection,i,o.get(0,0,0),o.get(0,1,0),o.get(0,2,0),o.get(0,3,0),o.get(0,4,0),o.get(1,0,0),o.get(1,1,0),o.get(1,2,0),o.get(1,3,0),o.get(1,4,0),o.get(2,0,0),o.get(2,1,0),o.get(2,2,0),o.get(2,3,0),o.get(2,4,0),o.get(3,0,0),o.get(3,1,0),o.get(3,2,0),o.get(3,3,0),o.get(3,4,0),o.get(4,0,0),o.get(4,1,0),o.get(4,2,0),o.get(4,3,0),o.get(4,4,0)),v.lo(2,2).hi(t[0],t[1])}return this.fftconvolve(r)},g.prototype.fftconvolve=function(r){if(r=g.new(r),this.ndim!==r.ndim)throw new _.ValueError("arrays must have the same dimensions");var n,t=this.selection,e=r.selection,i=this.ndim,a=1,o=new Array(i),l=new Array(i),h=new Array(i);for(n=i-1;n>=0;--n)l[n]=t.shape[n],o[n]=a,a*=l[n],h[n]=t.shape[n]-e.shape[n]+1;var y=p.getType(t.dtype),d=new g(new y(p.shapeSize(h)),h),b=d.selection,w=c.mallocDouble(a),m=u(w,l,o,0);s.assigns(m,0),s.assign(m.hi.apply(m,t.shape),t);var A=c.mallocDouble(a),j=u(A,l,o,0);s.assigns(j,0),f(1,m,j);var x=c.mallocDouble(a),V=u(x,l,o,0);s.assigns(V,0),s.assign(V.hi.apply(V,e.shape),e);var E=c.mallocDouble(a),k=u(E,l,o,0);s.assigns(k,0),f(1,V,k),v(m,j,V,k),f(-1,m,j);var I=new Array(i),S=new Array(i),T=!1;for(n=0;n<i;++n)b.shape[n]>l[n]&&(T=!0),S[n]=e.shape[n]-1,I[n]=Math.min(b.shape[n],l[n]-S[n]);var B;return T&&s.assign(b,0),B=m.lo.apply(m,S),B=B.hi.apply(B,I),s.assign(b.hi.apply(b,I),B),c.freeDouble(w),c.freeDouble(A),c.freeDouble(x),c.freeDouble(E),d},g.new=e,n.exports=g;var b=r("cwise/lib/wrapper")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_64_a,_inline_64_e=_inline_64_arg1_;for(_inline_64_a=0;_inline_64_a<_inline_64_arg2_.length-1;++_inline_64_a)_inline_64_e=_inline_64_e[_inline_64_arg2_[_inline_64_a]];_inline_64_e[_inline_64_arg2_[_inline_64_arg2_.length-1]]=_inline_64_arg0_}",args:[{name:"_inline_64_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_64_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_64_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_64_a","_inline_64_e"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"unpackCwise",blockSize:64})},{"./config":23,"./errors":25,"./utils":43,"cwise/lib/wrapper":7,ndarray:18,"ndarray-fft":13,"ndarray-gemm":15,"ndarray-ops":17,"typedarray-pool":21}],43:[function(r,n,t){"use strict";function e(r){return"number"==typeof r}function i(r){return"function"==typeof r}function a(r,n,t){t=t||[];for(var i=-1,o=r.length;++i<o;){var u=r[i];e(u)?t[t.length]=u:n?a(u,n,t):t.push(u)}return t}var o=r("./dtypes"),u=r("lodash");n.exports={isNumber:e,isString:function(r){return"string"==typeof r},isFunction:i,flatten:a,shapeSize:function(r){for(var n=1,t=0;t<r.length;t++)n*=r[t];return n},getType:function(r){return i(r)?r:o[r]||Array},getShape:function(r){var n;return"object"==typeof r?"object"==typeof(n=r[0])?"object"==typeof n[0]?function(r){for(var n=[];"object"==typeof r;)n.push(r.length),r=r[0];return n}(r):[r.length,n.length]:[r.length]:[]},defaults:u.defaults}},{"./dtypes":24,lodash:12}]},{},[41])(41)}); |