-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.js
4 lines (4 loc) · 328 KB
/
mod.js
1
2
3
4
// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./mod.d.ts" />
var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var t=Object.defineProperty;function e(r){return"number"==typeof r}function n(r){var t,e="";for(t=0;t<r;t++)e+="0";return e}function i(r,t,e){var i=!1,o=t-r.length;return o<0||(function(r){return"-"===r[0]}(r)&&(i=!0,r=r.substr(1)),r=e?r+n(o):n(o)+r,i&&(r="-"+r)),r}var o=String.prototype.toLowerCase,a=String.prototype.toUpperCase;function u(r){var t,n,u;switch(r.specifier){case"b":t=2;break;case"o":t=8;break;case"x":case"X":t=16;break;default:t=10}if(n=r.arg,u=parseInt(n,10),!isFinite(u)){if(!e(n))throw new Error("invalid integer. Value: "+n);u=0}return u<0&&("u"===r.specifier||10!==t)&&(u=4294967295+u+1),u<0?(n=(-u).toString(t),r.precision&&(n=i(n,r.precision,r.padRight)),n="-"+n):(n=u.toString(t),u||r.precision?r.precision&&(n=i(n,r.precision,r.padRight)):n="",r.sign&&(n=r.sign+n)),16===t&&(r.alternate&&(n="0x"+n),n=r.specifier===a.call(r.specifier)?a.call(n):o.call(n)),8===t&&r.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}var f=Math.abs,l=String.prototype.toLowerCase,s=String.prototype.toUpperCase,c=String.prototype.replace,h=/e\+(\d)$/,p=/e-(\d)$/,g=/^(\d+)$/,y=/^(\d+)e/,m=/\.0$/,d=/\.0*e/,v=/(\..*[^0])0*e/;function w(r){var t,n,i=parseFloat(r.arg);if(!isFinite(i)){if(!e(r.arg))throw new Error("invalid floating-point number. Value: "+n);i=r.arg}switch(r.specifier){case"e":case"E":n=i.toExponential(r.precision);break;case"f":case"F":n=i.toFixed(r.precision);break;case"g":case"G":f(i)<1e-4?((t=r.precision)>0&&(t-=1),n=i.toExponential(t)):n=i.toPrecision(r.precision),r.alternate||(n=c.call(n,v,"$1e"),n=c.call(n,d,"e"),n=c.call(n,m,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=c.call(n,h,"e+0$1"),n=c.call(n,p,"e-0$1"),r.alternate&&(n=c.call(n,g,"$1."),n=c.call(n,y,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function b(r){var t,e="";for(t=0;t<r;t++)e+=" ";return e}var E=String.fromCharCode,_=Array.isArray;function T(r){return r!=r}function x(r){var t={};return t.specifier=r.specifier,t.precision=void 0===r.precision?1:r.precision,t.width=r.width,t.flags=r.flags||"",t.mapping=r.mapping,t}function V(r){var t,e,n,o,a,f,l,s,c,h,p,g,y;if(!_(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(f="",l=1,s=0;s<r.length;s++)if(n=r[s],"string"==typeof n)f+=n;else{if(t=void 0!==n.precision,!(n=x(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(l=n.mapping),e=n.flags,c=0;c<e.length;c++)switch(o=e.charAt(c)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=e.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+o)}if("*"===n.width){if(n.width=parseInt(arguments[l],10),l+=1,T(n.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(t&&"*"===n.precision){if(n.precision=parseInt(arguments[l],10),l+=1,T(n.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,t=!1)}switch(n.arg=arguments[l],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":t&&(n.padZeros=!1),n.arg=u(n);break;case"s":n.maxWidth=t?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!T(n.arg)){if((a=parseInt(n.arg,10))<0||a>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(n.precision=6),n.arg=w(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(h=n.arg,p=n.width,g=n.padRight,y=void 0,(y=p-h.length)<0?h:h=g?h+b(y):b(y)+h)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function F(r){var t,e,n,i;for(e=[],i=0,n=A.exec(r);n;)(t=r.slice(i,A.lastIndex-n[0].length)).length&&e.push(t),e.push(S(n)),i=A.lastIndex,n=A.exec(r);return(t=r.slice(i)).length&&e.push(t),e}function j(r){var t,e;if("string"!=typeof r)throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[F(r)],e=1;e<arguments.length;e++)t.push(arguments[e]);return V.apply(null,t)}var R,k=Object.prototype,I=k.toString,B=k.__defineGetter__,O=k.__defineSetter__,L=k.__lookupGetter__,P=k.__lookupSetter__;R=function(){try{return r({},"x",{}),!0}catch(r){return!1}}()?t:function(r,t,e){var n,i,o,a;if("object"!=typeof r||null===r||"[object Array]"===I.call(r))throw new TypeError(j("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof e||null===e||"[object Array]"===I.call(e))throw new TypeError(j("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(L.call(r,t)||P.call(r,t)?(n=r.__proto__,r.__proto__=k,delete r[t],r[t]=e.value,r.__proto__=n):r[t]=e.value),o="get"in e,a="set"in e,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&B&&B.call(r,t,e.get),a&&O&&O.call(r,t,e.set),r};var M=R;function C(r,t,e){M(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function U(r,t,e){M(r,t,{configurable:!1,enumerable:!1,writable:!1,value:e})}var N="function";function D(r){return typeof r.get===N&&typeof r.set===N}var Y={float64:function(r,t){return r[t]},float32:function(r,t){return r[t]},int32:function(r,t){return r[t]},int16:function(r,t){return r[t]},int8:function(r,t){return r[t]},uint32:function(r,t){return r[t]},uint16:function(r,t){return r[t]},uint8:function(r,t){return r[t]},uint8c:function(r,t){return r[t]},generic:function(r,t){return r[t]},default:function(r,t){return r[t]}};function z(r){var t=Y[r];return"function"==typeof t?t:Y.default}var W={float64:function(r,t,e){r[t]=e},float32:function(r,t,e){r[t]=e},int32:function(r,t,e){r[t]=e},int16:function(r,t,e){r[t]=e},int8:function(r,t,e){r[t]=e},uint32:function(r,t,e){r[t]=e},uint16:function(r,t,e){r[t]=e},uint8:function(r,t,e){r[t]=e},uint8c:function(r,t,e){r[t]=e},generic:function(r,t,e){r[t]=e},default:function(r,t,e){r[t]=e}};function q(r){var t=W[r];return"function"==typeof t?t:W.default}var G={complex128:function(r,t){return r.get(t)},complex64:function(r,t){return r.get(t)},default:function(r,t){return r.get(t)}};function $(r){var t=G[r];return"function"==typeof t?t:G.default}var H={complex128:function(r,t,e){r.set(e,t)},complex64:function(r,t,e){r.set(e,t)},default:function(r,t,e){r.set(e,t)}};function J(r){var t=H[r];return"function"==typeof t?t:H.default}var X="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function Q(){return X&&"symbol"==typeof Symbol.toStringTag}var Z=Object.prototype.toString;var K=Object.prototype.hasOwnProperty;function rr(r,t){return null!=r&&K.call(r,t)}var tr="function"==typeof Symbol?Symbol:void 0,er="function"==typeof tr?tr.toStringTag:"";var nr=Q()?function(r){var t,e,n;if(null==r)return Z.call(r);e=r[er],t=rr(r,er);try{r[er]=void 0}catch(t){return Z.call(r)}return n=Z.call(r),t?r[er]=e:delete r[er],n}:function(r){return Z.call(r)};var ir=Array.isArray?Array.isArray:function(r){return"[object Array]"===nr(r)};function or(r){if("function"!=typeof r)throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!ir(t))return!1;if(0===(e=t.length))return!1;for(n=0;n<e;n++)if(!1===r(t[n]))return!1;return!0}}function ar(r){return null!==r&&"object"==typeof r}function ur(r){return ar(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function fr(){return/^\s*function\s*([^(]*)/i}U(ar,"isObjectLikeArray",or(ar));var lr=/^\s*function\s*([^(]*)/i;function sr(r){var t,e,n;if(("Object"===(e=nr(r).slice(8,-1))||"Error"===e)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(t=lr.exec(n.toString()))return t[1]}return ur(r)?"Buffer":e}U(fr,"REGEXP",lr);var cr={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"},hr="function"==typeof Float64Array;var pr="function"==typeof Float64Array?Float64Array:null;function gr(){var r,t,e;if("function"!=typeof pr)return!1;try{t=new pr([1,3.14,-3.14,NaN]),e=t,r=(hr&&e instanceof Float64Array||"[object Float64Array]"===nr(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}var yr="function"==typeof Float64Array?Float64Array:void 0;var mr=gr()?yr:function(){throw new Error("not implemented")},dr="function"==typeof Float32Array;var vr=Number.POSITIVE_INFINITY,wr="function"==typeof Float32Array?Float32Array:null;function br(){var r,t,e;if("function"!=typeof wr)return!1;try{t=new wr([1,3.14,-3.14,5e40]),e=t,r=(dr&&e instanceof Float32Array||"[object Float32Array]"===nr(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===vr}catch(t){r=!1}return r}var Er="function"==typeof Float32Array?Float32Array:void 0;var _r=br()?Er:function(){throw new Error("not implemented")},Tr="function"==typeof Uint32Array;var xr=4294967295,Vr="function"==typeof Uint32Array?Uint32Array:null;function Ar(){var r,t,e;if("function"!=typeof Vr)return!1;try{t=new Vr(t=[1,3.14,-3.14,xr+1,xr+2]),e=t,r=(Tr&&e instanceof Uint32Array||"[object Uint32Array]"===nr(e))&&1===t[0]&&3===t[1]&&t[2]===xr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var Sr="function"==typeof Uint32Array?Uint32Array:void 0;var Fr=Ar()?Sr:function(){throw new Error("not implemented")},jr="function"==typeof Int32Array;var Rr=2147483647,kr=-2147483648,Ir="function"==typeof Int32Array?Int32Array:null;function Br(){var r,t,e;if("function"!=typeof Ir)return!1;try{t=new Ir([1,3.14,-3.14,Rr+1]),e=t,r=(jr&&e instanceof Int32Array||"[object Int32Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===kr}catch(t){r=!1}return r}var Or="function"==typeof Int32Array?Int32Array:void 0;var Lr=Br()?Or:function(){throw new Error("not implemented")},Pr="function"==typeof Uint16Array;var Mr=65535,Cr="function"==typeof Uint16Array?Uint16Array:null;function Ur(){var r,t,e;if("function"!=typeof Cr)return!1;try{t=new Cr(t=[1,3.14,-3.14,Mr+1,Mr+2]),e=t,r=(Pr&&e instanceof Uint16Array||"[object Uint16Array]"===nr(e))&&1===t[0]&&3===t[1]&&t[2]===Mr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var Nr="function"==typeof Uint16Array?Uint16Array:void 0;var Dr=Ur()?Nr:function(){throw new Error("not implemented")},Yr="function"==typeof Int16Array;var zr=32767,Wr=-32768,qr="function"==typeof Int16Array?Int16Array:null;function Gr(){var r,t,e;if("function"!=typeof qr)return!1;try{t=new qr([1,3.14,-3.14,zr+1]),e=t,r=(Yr&&e instanceof Int16Array||"[object Int16Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===Wr}catch(t){r=!1}return r}var $r="function"==typeof Int16Array?Int16Array:void 0;var Hr=Gr()?$r:function(){throw new Error("not implemented")},Jr="function"==typeof Uint8Array;function Xr(r){return Jr&&r instanceof Uint8Array||"[object Uint8Array]"===nr(r)}var Qr=255,Zr="function"==typeof Uint8Array?Uint8Array:null;function Kr(){var r,t;if("function"!=typeof Zr)return!1;try{r=Xr(t=new Zr(t=[1,3.14,-3.14,Qr+1,Qr+2]))&&1===t[0]&&3===t[1]&&t[2]===Qr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var rt="function"==typeof Uint8Array?Uint8Array:void 0;var tt=Kr()?rt:function(){throw new Error("not implemented")},et="function"==typeof Uint8ClampedArray;var nt="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;function it(){var r,t,e;if("function"!=typeof nt)return!1;try{t=new nt([-1,0,1,3.14,4.99,255,256]),e=t,r=(et&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===nr(e))&&0===t[0]&&0===t[1]&&1===t[2]&&3===t[3]&&5===t[4]&&255===t[5]&&255===t[6]}catch(t){r=!1}return r}var ot="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var at=it()?ot:function(){throw new Error("not implemented")},ut="function"==typeof Int8Array;var ft=127,lt=-128,st="function"==typeof Int8Array?Int8Array:null;function ct(){var r,t,e;if("function"!=typeof st)return!1;try{t=new st([1,3.14,-3.14,ft+1]),e=t,r=(ut&&e instanceof Int8Array||"[object Int8Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===lt}catch(t){r=!1}return r}var ht="function"==typeof Int8Array?Int8Array:void 0;var pt=ct()?ht:function(){throw new Error("not implemented")};function gt(r){return"number"==typeof r}var yt=Number,mt=yt.prototype.toString;var dt=Q();function vt(r){return"object"==typeof r&&(r instanceof yt||(dt?function(r){try{return mt.call(r),!0}catch(r){return!1}}(r):"[object Number]"===nr(r)))}function wt(r){return gt(r)||vt(r)}U(wt,"isPrimitive",gt),U(wt,"isObject",vt);var bt=yt.NEGATIVE_INFINITY,Et=Math.floor;function _t(r){return Et(r)===r}function Tt(r){return r<vr&&r>bt&&_t(r)}function xt(r){return gt(r)&&Tt(r)}function Vt(r){return vt(r)&&Tt(r.valueOf())}function At(r){return xt(r)||Vt(r)}function St(r){return xt(r)&&r>=0}function Ft(r){return Vt(r)&&r.valueOf()>=0}function jt(r){return St(r)||Ft(r)}U(At,"isPrimitive",xt),U(At,"isObject",Vt),U(jt,"isPrimitive",St),U(jt,"isObject",Ft);var Rt=4294967295;function kt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&_t(r.length)&&r.length>=0&&r.length<=Rt}var It=9007199254740991;function Bt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&_t(r.length)&&r.length>=0&&r.length<=It}var Ot="function"==typeof ArrayBuffer;function Lt(r){return Ot&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===nr(r)}function Pt(r){return"object"==typeof r&&null!==r&&!ir(r)}function Mt(r){return"string"==typeof r}var Ct=String.prototype.valueOf;var Ut=Q();function Nt(r){return"object"==typeof r&&(r instanceof String||(Ut?function(r){try{return Ct.call(r),!0}catch(r){return!1}}(r):"[object String]"===nr(r)))}function Dt(r){return Mt(r)||Nt(r)}U(Dt,"isPrimitive",Mt),U(Dt,"isObject",Nt);var Yt=or(Dt.isPrimitive),zt=or(Dt.isObject),Wt=or(Dt);U(Wt,"primitives",Yt),U(Wt,"objects",zt);var qt=/./;function Gt(r){return"boolean"==typeof r}var $t=Boolean,Ht=Boolean.prototype.toString;var Jt=Q();function Xt(r){return"object"==typeof r&&(r instanceof $t||(Jt?function(r){try{return Ht.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===nr(r)))}function Qt(r){return Gt(r)||Xt(r)}U(Qt,"isPrimitive",Gt),U(Qt,"isObject",Xt);var Zt="object"==typeof self?self:null,Kt="object"==typeof window?window:null,re="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},te="object"==typeof re?re:null,ee="object"==typeof globalThis?globalThis:null;var ne=function(r){if(arguments.length){if(!Gt(r))throw new TypeError(j("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(ee)return ee;if(Zt)return Zt;if(Kt)return Kt;if(te)return te;throw new Error("unexpected error. Unable to resolve global object.")}(),ie=ne.document&&ne.document.childNodes,oe=Int8Array;var ae="function"==typeof qt||"object"==typeof oe||"function"==typeof ie?function(r){return sr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"===(t=typeof r)?sr(r).toLowerCase():t};function ue(r){return"function"===ae(r)}function fe(r,t){if(!(this instanceof fe))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!gt(r))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",r));if(!gt(t))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return M(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),M(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}U(fe,"BYTES_PER_ELEMENT",8),U(fe.prototype,"BYTES_PER_ELEMENT",8),U(fe.prototype,"byteLength",16),U(fe.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(fe.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var le="function"==typeof Math.fround?Math.fround:null,se="function"==typeof Float32Array?Float32Array:void 0;var ce=br()?se:function(){throw new Error("not implemented")},he=new ce(1);var pe="function"==typeof le?le:function(r){return he[0]=r,he[0]};function ge(r,t){if(!(this instanceof ge))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!gt(r))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",r));if(!gt(t))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return M(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:pe(r)}),M(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:pe(t)}),this}function ye(r){return r instanceof fe||r instanceof ge||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function me(r){return _t(r/2)}U(ge,"BYTES_PER_ELEMENT",4),U(ge.prototype,"BYTES_PER_ELEMENT",4),U(ge.prototype,"byteLength",8),U(ge.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(ge.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var de=8;function ve(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===de}var we=16;function be(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===we}function Ee(){return"function"==typeof tr&&"symbol"==typeof tr("foo")&&rr(tr,"iterator")&&"symbol"==typeof tr.iterator}var _e=Ee()?Symbol.iterator:null;function Te(r,t,e){M(r,t,{configurable:!1,enumerable:!1,get:e})}function xe(r){return r.re}function Ve(r){return r.im}function Ae(r,t){return new ce(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}var Se="function"==typeof Float64Array?Float64Array:void 0;var Fe=gr()?Se:function(){throw new Error("not implemented")};function je(r,t){return new Fe(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function Re(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!ye(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(xe(n),Ve(n))}return t}var ke=2*_r.BYTES_PER_ELEMENT,Ie=Ee();function Be(r){return r instanceof Pe||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Oe(r){return r===Pe||"Complex128Array"===r.name}function Le(r,t){return new ge(r[t*=2],r[t+1])}function Pe(){var r,t,e,n;if(t=arguments.length,!(this instanceof Pe))return 0===t?new Pe:1===t?new Pe(arguments[0]):2===t?new Pe(arguments[0],arguments[1]):new Pe(arguments[0],arguments[1],arguments[2]);if(0===t)e=new _r(0);else if(1===t)if(St(arguments[0]))e=new _r(2*arguments[0]);else if(Bt(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&ye(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!ye(n=t[i]))return null;r[o]=xe(n),r[o+1]=Ve(n),o+=2}return r}(new _r(2*n),e),null===e){if(!me(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new _r(arguments[0])}}else{if(ve(e))e=Ae(e,0);else if(be(e))e=je(e,0);else if(!me(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new _r(e)}else if(Lt(arguments[0])){if(!_t((e=arguments[0]).byteLength/ke))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",ke,e.byteLength));e=new _r(e)}else{if(!Pt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Ie)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ue(e[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ue((e=e[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Re(e))instanceof Error)throw e;e=new _r(e)}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!_t(r/ke))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",ke,r));if(2===t){if(!_t((n=e.byteLength-r)/ke))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",ke,n));e=new _r(e,r)}else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*ke>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ke));e=new _r(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Me(r){return r.re}function Ce(r){return r.im}function Ue(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!ye(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(Me(n),Ce(n))}return t}U(Pe,"BYTES_PER_ELEMENT",ke),U(Pe,"name","Complex64Array"),U(Pe,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Oe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Be(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,r.get(c),c)))o[h]=xe(s),o[h+1]=Ve(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):z("default"),c=0;c<f;c++)if(!ye(u(r,c))){l=!0;break}if(l){if(!me(f))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,u(r,c),c)))o[h]=xe(s),o[h+1]=Ve(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Pt(r)&&Ie&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ye(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(xe(o),Ve(o))}return n}(o,n,t):Re(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(Pe,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Oe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(Pe.prototype,"at",(function(r){if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Le(this._buffer,r)})),Te(Pe.prototype,"buffer",(function(){return this._buffer.buffer})),Te(Pe.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(Pe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(Pe.prototype,"BYTES_PER_ELEMENT",Pe.BYTES_PER_ELEMENT),U(Pe.prototype,"copyWithin",(function(r,t){if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(Pe.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Le(n,o)],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.entries()})),t})),U(Pe.prototype,"every",(function(r,t){var e,n;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Le(e,n),n,this))return!1;return!0})),U(Pe.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!_t(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=xe(r),u=Ve(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(Pe.prototype,"filter",(function(r,t){var e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Le(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(Pe.prototype,"find",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Le(e,n),r.call(t,i,n,this))return i})),U(Pe.prototype,"findIndex",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Le(e,n),r.call(t,i,n,this))return n;return-1})),U(Pe.prototype,"findLast",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Le(e,n),r.call(t,i,n,this))return i})),U(Pe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Le(e,n),r.call(t,i,n,this))return n;return-1})),U(Pe.prototype,"forEach",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Le(e,n),r.call(t,i,n,this)})),U(Pe.prototype,"get",(function(r){if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Le(this._buffer,r)})),U(Pe.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(Pe.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Pe.prototype,"join",(function(r){var t,e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Mt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(Le(e,i).toString());return t.join(n)})),U(Pe.prototype,"keys",(function(){var r,t,e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(Pe.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Te(Pe.prototype,"length",(function(){return this._length})),U(Pe.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ye(a=r.call(t,Le(n,o),o,this)))e[2*o]=xe(a),e[2*o+1]=Ve(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),U(Pe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Le(e,0),o=1}for(;o<i;o++)n=r(n,Le(e,o),o,this);return n})),U(Pe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Le(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Le(e,o),o,this);return n})),U(Pe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),U(Pe.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(ye(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=xe(r),void(n[e+1]=Ve(r))}if(Be(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,l=n.byteOffset+e*ke,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new _r(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!ye(r[f])){o=!0;break}if(o){if(!me(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,l=n.byteOffset+e*ke,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new _r(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=xe(u),n[e+1]=Ve(u),e+=2}})),U(Pe.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),U(Pe.prototype,"some",(function(r,t){var e,n;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Le(e,n),n,this))return!0;return!1})),U(Pe.prototype,"sort",(function(r){var t,e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Le(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=xe(t[i]),e[o+1]=Ve(t[i]);return this})),U(Pe.prototype,"subarray",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*ke):(i=t-r,e=n.byteOffset+r*ke),new this.constructor(n.buffer,e,i<0?0:i)})),U(Pe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Le(o,a).toLocaleString(n,e));return i.join(",")})),U(Pe.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),U(Pe.prototype,"toSorted",(function(r){var t,e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Le(e,i));return t.sort(r),new Pe(t)})),U(Pe.prototype,"toString",(function(){var r,t,e;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(Le(t,e).toString());return r.join(",")})),U(Pe.prototype,"values",(function(){var r,t,e,n,i,o;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Le(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(Pe.prototype,"with",(function(r,t){var e,n,i;if(!Be(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=xe(t),e[2*r+1]=Ve(t),n}));var Ne=2*mr.BYTES_PER_ELEMENT,De=Ee();function Ye(r){return r instanceof qe||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ze(r){return r===qe||"Complex64Array"===r.name}function We(r,t){return new fe(r[t*=2],r[t+1])}function qe(){var r,t,e,n;if(t=arguments.length,!(this instanceof qe))return 0===t?new qe:1===t?new qe(arguments[0]):2===t?new qe(arguments[0],arguments[1]):new qe(arguments[0],arguments[1],arguments[2]);if(0===t)e=new mr(0);else if(1===t)if(St(arguments[0]))e=new mr(2*arguments[0]);else if(Bt(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&ye(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!ye(n=t[i]))return null;r[o]=Me(n),r[o+1]=Ce(n),o+=2}return r}(new mr(2*n),e),null===e){if(!me(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new mr(arguments[0])}}else{if(ve(e))e=Ae(e,0);else if(be(e))e=je(e,0);else if(!me(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new mr(e)}else if(Lt(arguments[0])){if(!_t((e=arguments[0]).byteLength/Ne))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Ne,e.byteLength));e=new mr(e)}else{if(!Pt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===De)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ue(e[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ue((e=e[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Ue(e))instanceof Error)throw e;e=new mr(e)}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!_t(r/Ne))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Ne,r));if(2===t){if(!_t((n=e.byteLength-r)/Ne))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Ne,n));e=new mr(e,r)}else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ne>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ne));e=new mr(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Ge(r){var t,e;for(t=[];!(e=r.next()).done;)t.push($t(e.value));return t}U(qe,"BYTES_PER_ELEMENT",Ne),U(qe,"name","Complex128Array"),U(qe,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ze(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Ye(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,r.get(c),c)))o[h]=Me(s),o[h+1]=Ce(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):z("default"),c=0;c<f;c++)if(!ye(u(r,c))){l=!0;break}if(l){if(!me(f))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,u(r,c),c)))o[h]=Me(s),o[h+1]=Ce(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Pt(r)&&De&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ye(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Me(o),Ce(o))}return n}(o,n,t):Ue(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(qe,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ze(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(qe.prototype,"at",(function(r){if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return We(this._buffer,r)})),Te(qe.prototype,"buffer",(function(){return this._buffer.buffer})),Te(qe.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(qe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(qe.prototype,"BYTES_PER_ELEMENT",qe.BYTES_PER_ELEMENT),U(qe.prototype,"copyWithin",(function(r,t){if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(qe.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,a=-2,U(e={},"next",(function(){var t;if(o+=1,i||o>=n)return{done:!0};return t=new fe(r[a+=2],r[a+1]),{value:[o,t],done:!1}})),U(e,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){return t.entries()})),e})),U(qe.prototype,"every",(function(r,t){var e,n;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,We(e,n),n,this))return!1;return!0})),U(qe.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!_t(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=Me(r),u=Ce(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(qe.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=We(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(qe.prototype,"find",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=We(e,n),r.call(t,i,n,this))return i})),U(qe.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=We(e,n),r.call(t,i,n,this))return n;return-1})),U(qe.prototype,"findLast",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=We(e,n),r.call(t,i,n,this))return i})),U(qe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=We(e,n),r.call(t,i,n,this))return n;return-1})),U(qe.prototype,"forEach",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=We(e,n),r.call(t,i,n,this)})),U(qe.prototype,"get",(function(r){if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return We(this._buffer,r)})),Te(qe.prototype,"length",(function(){return this._length})),U(qe.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(qe.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(qe.prototype,"join",(function(r){var t,e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Dt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(We(e,i).toString());return t.join(n)})),U(qe.prototype,"keys",(function(){var r,t,e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(qe.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(qe.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ye(a=r.call(t,We(n,o),o,this)))e[2*o]=Me(a),e[2*o+1]=Ce(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),U(qe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=We(e,0),o=1}for(;o<i;o++)n=r(n,We(e,o),o,this);return n})),U(qe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=We(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,We(e,o),o,this);return n})),U(qe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),U(qe.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(ye(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Me(r),void(n[e+1]=Ce(r))}if(Ye(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,l=n.byteOffset+e*Ne,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new mr(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!ye(r[f])){o=!0;break}if(o){if(!me(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,l=n.byteOffset+e*Ne,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new mr(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=Me(u),n[e+1]=Ce(u),e+=2}})),U(qe.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),U(qe.prototype,"some",(function(r,t){var e,n;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,We(e,n),n,this))return!0;return!1})),U(qe.prototype,"sort",(function(r){var t,e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(We(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Me(t[i]),e[o+1]=Ce(t[i]);return this})),U(qe.prototype,"subarray",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Ne):(i=t-r,e=n.byteOffset+r*Ne),new this.constructor(n.buffer,e,i<0?0:i)})),U(qe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Dt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(We(o,a).toLocaleString(n,e));return i.join(",")})),U(qe.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),U(qe.prototype,"toSorted",(function(r){var t,e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(We(e,i));return t.sort(r),new qe(t)})),U(qe.prototype,"toString",(function(){var r,t,e;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(We(t,e).toString());return r.join(",")})),U(qe.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:We(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(qe.prototype,"with",(function(r,t){var e,n,i;if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Me(t),e[2*r+1]=Ce(t),n}));var $e=tt.BYTES_PER_ELEMENT,He=Ee();function Je(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===$e}function Xe(r){return r===Qe}function Qe(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof Qe))return 0===t?new Qe:1===t?new Qe(arguments[0]):2===t?new Qe(arguments[0],arguments[1]):new Qe(arguments[0],arguments[1],arguments[2]);if(0===t)e=new tt(0);else if(1===t)if(St(i=arguments[0]))e=new tt(i);else if(Bt(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=$t(t[n]);return r}(new tt(i.length),i);else if(Lt(i))e=new tt(i);else{if(!Pt(i))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===He)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!ue(i[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!ue((e=i[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new tt(Ge(e))}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new tt(e,r);else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*$e>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*$e));e=new tt(e,r,n)}}return U(this,"_buffer",e),U(this,"_length",e.length),this}U(Qe,"BYTES_PER_ELEMENT",$e),U(Qe,"name","BooleanArray"),U(Qe,"from",(function(r){var t,e,n,i,o,a,u,f,l;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Xe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):z("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=$t(n.call(t,u(r,l),l));return i}return new this(r)}if(Pt(r)&&He&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));for(a=n?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push($t(t.call(e,i.value,o)));return n}(o,n,t):Ge(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(Qe,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Xe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(Qe.prototype,"at",(function(r){var t,e;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!xt(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(e=this._length,t=this._buffer,r<0&&(r+=e),!(r<0||r>=e))return $t(t[r])})),Te(Qe.prototype,"buffer",(function(){return this._buffer.buffer})),Te(Qe.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(Qe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(Qe.prototype,"BYTES_PER_ELEMENT",Qe.BYTES_PER_ELEMENT),U(Qe.prototype,"copyWithin",(function(r,t){if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this})),U(Qe.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,$t(n[o])],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.entries()})),t})),U(Qe.prototype,"every",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,$t(e[n]),n,this))return!1;return!0})),U(Qe.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!xt(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(o=r?1:0,a=t;a<e;a++)n[a]=o;return this})),U(Qe.prototype,"filter",(function(r,t){var e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=$t(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(Qe.prototype,"find",(function(r,t){var e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=$t(e[i]),r.call(t,n,i,this))return n})),U(Qe.prototype,"findIndex",(function(r,t){var e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=$t(e[i]),r.call(t,n,i,this))return i;return-1})),U(Qe.prototype,"findLast",(function(r,t){var e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=$t(e[i]),r.call(t,n,i,this))return n})),U(Qe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=$t(e[i]),r.call(t,n,i,this))return i;return-1})),U(Qe.prototype,"forEach",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,$t(e[n]),n,this)})),U(Qe.prototype,"get",(function(r){if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return $t(this._buffer[r])})),U(Qe.prototype,"includes",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===$t(e[n]))return!0;return!1})),U(Qe.prototype,"indexOf",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===$t(e[n]))return n;return-1})),U(Qe.prototype,"join",(function(r){var t,e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Mt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r))}else r=",";for(t=this._buffer,e=[],n=0;n<this._length;n++)t[n]?e.push("true"):e.push("false");return e.join(r)})),U(Qe.prototype,"keys",(function(){var r,t,e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(Qe.prototype,"lastIndexOf",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(e=this._buffer,n=t;n>=0;n--)if(r===$t(e[n]))return n;return-1})),Te(Qe.prototype,"length",(function(){return this._length})),U(Qe.prototype,"map",(function(r,t){var e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(i=this._buffer,e=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)e[o]=$t(r.call(t,$t(i[o]),o,this));return n})),U(Qe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=0;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=$t(e[0]),o=1}for(;o<n;o++)i=r(i,$t(e[o]),o,this);return i})),U(Qe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=n-1;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=$t(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,$t(e[o]),o,this);return i})),U(Qe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),U(Qe.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Bt(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Je(r)?r._buffer:r,u=n.byteOffset+e*$e,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new tt(t.length),a=0;a<t.length;a++)i[a]=t[a];t=i}for(a=0;a<o;e++,a++)n[e]=t[a]?1:0}else{if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),U(Qe.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)r=0,t=a;else{if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=a)<0&&(r=0),1===arguments.length)t=a;else{if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=a)<0&&(t=0):t>a&&(t=a)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)n[u]=o[u+r];return i})),U(Qe.prototype,"some",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,$t(e[n]),n,this))return!0;return!1})),U(Qe.prototype,"sort",(function(r){var t;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r($t(t),$t(e))})),this})),U(Qe.prototype,"subarray",(function(r,t){var e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*$e):(i=t-r,e=n.byteOffset+r*$e),new this.constructor(n.buffer,e,i<0?0:i)})),U(Qe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push($t(o[a]).toLocaleString(n,e));return i.join(",")})),U(Qe.prototype,"toReversed",(function(){var r,t,e,n,i;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)r[i]=n[e-i-1];return t})),U(Qe.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),i=this._buffer,t=e._buffer,o=0;o<n;o++)t[o]=i[o];if(0===arguments.length)return t.sort(),e;if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r($t(t),$t(e))})),e})),U(Qe.prototype,"toString",(function(){var r,t,e;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)t[e]?r.push("true"):r.push("false");return r.join(",")})),U(Qe.prototype,"values",(function(){var r,t,e,n,i,o;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:$t(i[o]),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(Qe.prototype,"with",(function(r,t){var e,n;if(!Je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(n=this._length,r<0&&(r+=n),r<0||r>=n)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Gt(t))throw new TypeError(j("invalid argument. Second argument must be a boolean. Value: `%s`.",t));return(e=new this.constructor(this._buffer))._buffer[r]=t?1:0,e}));var Ze=[mr,_r,Lr,Fr,Hr,Dr,pt,tt,at,Pe,qe,Qe],Ke=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],rn=Ke.length;function tn(r){var t;if(ir(r))return"generic";if(ur(r))return null;for(t=0;t<rn;t++)if(r instanceof Ze[t])return Ke[t];return cr[sr(r)]||null}function en(r){var t=tn(r);return D(r)?{accessorProtocol:!0,accessors:[$(t),J(t)]}:{accessorProtocol:!1,accessors:[z(t),q(t)]}}function nn(r){var t;if(!(this instanceof nn))return new nn(r);if(!Bt(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return t=en(r),this._buffer=r,this._getter=t.accessors[0],this._setter=t.accessors[1],this}U(nn,"name","AccessorArray"),function(r,t,e,n){M(r,t,{configurable:!1,enumerable:!1,get:e,set:n})}(nn.prototype,"length",(function(){return this._buffer.length}),(function(r){this._buffer.length=r})),U(nn.prototype,"get",(function(r){return this._getter(this._buffer,r)})),U(nn.prototype,"set",(function(r,t){arguments.length<2?this._setter(this._buffer,0,r):this._setter(this._buffer,t,r)}));var on=1;function an(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===on}function un(r){var t=tn(r);return D(r)?{data:r,dtype:t,accessorProtocol:!0,accessors:[$(t),J(t)]}:{data:r,dtype:t,accessorProtocol:!1,accessors:[z(t),q(t)]}}var fn="function"==typeof Uint8Array?Uint8Array:void 0;var ln=Kr()?fn:function(){throw new Error("not implemented")};function sn(r,t){return new ln(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,r.length-t)}function cn(r){var t;for(t=0;t<r.length;t++)if(r[t])return!0;return!1}function hn(r,t){var e,n,i,o;for(i=tn(r),n=D(r)?$(i):z(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}function pn(r){var t,e,n;if(!Bt(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=tn(r),D(r)&&(t=$(n)),e=r.length,void 0===t?function(t){var n;for(n=0;n<e;n++)if(r[n]===t)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(t(r,i)===n)return!0;return!1}}function gn(r,t){var e;for(e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function yn(r,t){var e,n,i,o,a;for(e=r.data,n=t.data,i=r.accessors[0],o=t.accessors[0],a=0;a<e.length;a++)if(i(e,a)!==o(n,a))return!1;return!0}function mn(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t}function dn(r){var t=new Fe(2);return t[0]=r.re,t[1]=r.im,t}function vn(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t||!(!ye(r)||!ye(t))&&(e=t,n=dn(r),i=dn(e),mn(n[0],i[0])&&mn(n[1],i[1]));var e,n,i}function wn(r,t){var e;for(e=0;e<r.length;e++)if(!vn(r[e],t[e]))return!1;return!0}function bn(r,t){var e,n,i,o,a;for(e=r.data,n=t.data,i=r.accessors[0],o=t.accessors[0],a=0;a<e.length;a++)if(!vn(i(e,a),o(n,a)))return!1;return!0}function En(r,t,e){return r.replace(t,e)}U(hn,"factory",pn);var _n={all:["bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},Tn=/_and_generic$/;function xn(){var r,t,e;return 0===arguments.length?_n.all.slice():(e=!1,r=arguments[0],Tn.test(r)&&"all"!==(r=En(r,Tn,""))&&(e=!0),t=(t=_n[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}var Vn=pn(xn("boolean")),An=["little-endian","big-endian"];function Sn(){return An.slice()}var Fn=pn(Sn()),jn=pn(xn("complex_floating_point")),Rn=8,kn=16;function In(r){return"object"==typeof r&&null!==r&&("Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===kn||"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Rn)}var Bn=pn(xn()),On=pn(xn("floating_point")),Ln=pn(xn("integer"));function Pn(r){return Object.keys(Object(r))}var Mn=void 0!==Object.keys;function Cn(r){return"[object Arguments]"===nr(r)}var Un=function(){return Cn(arguments)}();function Nn(r){return r!=r}function Dn(r){return gt(r)&&Nn(r)}function Yn(r){return vt(r)&&Nn(r.valueOf())}function zn(r){return Dn(r)||Yn(r)}U(zn,"isPrimitive",Dn),U(zn,"isObject",Yn);var Wn=Object.prototype.propertyIsEnumerable;var qn=!Wn.call("beep","0");function Gn(r,t){var e;return null!=r&&(!(e=Wn.call(r,t))&&qn&&Dt(r)?!Dn(t=+t)&&xt(t)&&t>=0&&t<r.length:e)}var $n=Un?Cn:function(r){return null!==r&&"object"==typeof r&&!ir(r)&&"number"==typeof r.length&&_t(r.length)&&r.length>=0&&r.length<=xr&&rr(r,"callee")&&!Gn(r,"callee")},Hn=Array.prototype.slice;var Jn=Gn((function(){}),"prototype"),Xn=!Gn({toString:null},"toString");function Qn(r,t,e){var n,i;if(!Bt(r)&&!Mt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!xt(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;i=e}else(i=n+e)<0&&(i=0)}else i=0;if(zn(t)){for(;i<n;i++)if(zn(r[i]))return i}else for(;i<n;i++)if(r[i]===t)return i;return-1}function Zn(r){return r.constructor&&r.constructor.prototype===r}var Kn=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],ri="undefined"==typeof window?void 0:window;var ti=function(){var r;if("undefined"===ae(ri))return!1;for(r in ri)try{-1===Qn(Kn,r)&&rr(ri,r)&&null!==ri[r]&&"object"===ae(ri[r])&&Zn(ri[r])}catch(r){return!0}return!1}(),ei="undefined"!=typeof window;var ni,ii=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];ni=Mn?function(){return 2!==(Pn(arguments)||"").length}(1,2)?function(r){return $n(r)?Pn(Hn.call(r)):Pn(r)}:Pn:function(r){var t,e,n,i,o,a,u;if(i=[],$n(r)){for(u=0;u<r.length;u++)i.push(u.toString());return i}if("string"==typeof r){if(r.length>0&&!rr(r,"0"))for(u=0;u<r.length;u++)i.push(u.toString())}else{if(!1==(n="function"==typeof r)&&!ar(r))return i;e=Jn&&n}for(o in r)e&&"prototype"===o||!rr(r,o)||i.push(String(o));if(Xn)for(t=function(r){if(!1===ei&&!ti)return Zn(r);try{return Zn(r)}catch(r){return!1}}(r),u=0;u<ii.length;u++)a=ii[u],t&&"constructor"===a||!rr(r,a)||i.push(String(a));return i};var oi,ai=ni,ui=Object,fi=Object.getPrototypeOf;oi=ue(Object.getPrototypeOf)?fi:function(r){var t=function(r){return r.__proto__}(r);return t||null===t?t:"[object Function]"===nr(r.constructor)?r.constructor.prototype:r instanceof Object?Object.prototype:null};var li=oi;function si(r){return null==r?null:(r=ui(r),li(r))}var ci=Object.prototype;function hi(r){var t;return!!Pt(r)&&(!(t=si(r))||!rr(r,"constructor")&&rr(t,"constructor")&&ue(t.constructor)&&"[object Function]"===nr(t.constructor)&&rr(t,"isPrototypeOf")&&ue(t.isPrototypeOf)&&(t===ci||function(r){var t;for(t in r)if(!rr(r,t))return!1;return!0}(r)))}var pi=["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"];function gi(){return pi.slice()}var yi={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},mi=/_and_generic$/;function di(){var r,t,e;return 0===arguments.length?yi.all.slice():(e=!1,r=arguments[0],mi.test(r)&&"all"!==(r=En(r,mi,""))&&(e=!0),t=(t=yi[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}function vi(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}U(di,"enum",vi),function(r,t){var e,n,i;for(e=ai(t),i=0;i<e.length;i++)C(r,n=e[i],t[n])}(di,{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256});var wi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256};function bi(){return{bool:wi.bool,int8:wi.int8,uint8:wi.uint8,uint8c:wi.uint8c,int16:wi.int16,uint16:wi.uint16,int32:wi.int32,uint32:wi.uint32,int64:wi.int64,uint64:wi.uint64,float32:wi.float32,float64:wi.float64,complex64:wi.complex64,complex128:wi.complex128,binary:wi.binary,generic:wi.generic,notype:wi.notype,userdefined_type:wi.userdefined_type}}U(gi,"enum",bi),function(r,t){var e,n,i;for(e=ai(t),i=0;i<e.length;i++)C(r,n=e[i],t[n])}(gi,bi());var Ei=function(r,t){var e,n,i,o,a,u,f,l=!0;if(!ar(r))throw new TypeError(j("invalid argument. First argument must be an object (except null). Value: `%s`.",r));if(arguments.length>1){if(!hi(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));if(rr(t,"duplicates")&&!Gt(l=t.duplicates))throw new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",l))}if(n=(e=ai(r)).length,a={},l)for(f=0;f<n;f++)rr(a,o=r[i=e[f]])?(u=a[o],ir(u)?a[o].push(i):a[o]=[u,i]):a[o]=i;else for(f=0;f<n;f++)a[r[i=e[f]]]=i;return a}(bi(),{duplicates:!1});var _i=bi();function Ti(r){var t=typeof r;return"string"===t?null===function(r){var t=_i[r];return"number"==typeof t?t:null}(r)?null:r:"number"===t?function(r){var t=Ei[r];return"string"==typeof t?t:null}(r):null}var xi,Vi={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function Ai(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Vi)).length,f=0;f<t;f++){for(i=r[f],a=Vi[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===xi&&(xi=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Vi)).length,f=0;f<t;f++){for(i=r[f],a=Vi[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ti(r),rr(xi,r)?xi[r].slice():null)}var Si=Ai();function Fi(r,t){return r===t||Si[r][t]>0}var ji,Ri=pn(xn("numeric")),ki=pn(xn("real")),Ii=pn(xn("real_floating_point")),Bi={float64:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function Oi(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Bi)).length,f=0;f<t;f++){for(i=r[f],a=Bi[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===ji&&(ji=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Bi)).length,f=0;f<t;f++){for(i=r[f],a=Bi[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ti(r),rr(ji,r)?ji[r].slice():null)}var Li=Oi();function Pi(r,t){return r===t||Li[r][t]>0}var Mi,Ci={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:0},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:0},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function Ui(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Ci)).length,f=0;f<t;f++){for(i=r[f],a=Ci[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===Mi&&(Mi=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(Ci)).length,f=0;f<t;f++){for(i=r[f],a=Ci[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ti(r),rr(Mi,r)?Mi[r].slice():null)}var Ni=Ui();var Di=pn(xn("signed_integer")),Yi=pn(xn("unsigned_integer")),zi={};function Wi(r){var t=tn(r);return D(r)?$(t):z(t)}function qi(r,t,e,n,i,o,a){var u,f,l;if(u=i[o],(f=o+1)!==n)for(l=0;l<u;l++)qi(r[l],t[l],e[l],n,i,f,a);else for(l=0;l<u;l++)e[l]=a(r[l],t[l])}function Gi(r){var t,e,n;for(e=r.length,t=[],n=0;n<e;n++)t.push(r[n]);return t}function $i(r,t){var e,n;for(e=[],n=0;n<t;n++)e.push(r);return e}function Hi(r){return $i(0,r)}function Ji(r,t,e){var n,i,o,a,u,f,l,s;if((a=e.length)<(u=t.length))throw new Error("invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.");for(n=r,l=u;l<a;l++)n=[n];for(o=Hi(a),l=a-1;l>=0;l--)if(!((s=u-a+l)<0)){if(f=t[s],0!==(i=e[l])&&i<f)throw new Error(j("invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.",Gi(t).join(", "),Gi(e).join(", "),l));if(f===i)o[l]=1;else{if(1!==f)throw new Error(j("invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.",Gi(t).join(", "),Gi(e).join(", "),l));o[l]=0}}return{ref:r,data:n,shape:Gi(e),strides:o}}function Xi(r){return me(r>0?r-1:r+1)}function Qi(r){return r===vr||r===bt}C(zi,"contains",hn),C(zi,"hasEqualValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=un(r),i=un(t),n.accessorProtocol||i.accessorProtocol?(e=2,an(r)?an(t)?gn(sn(r,0),sn(t,0)):yn(n,i):(be(r)?(o=je(r,0),e-=1):ve(r)&&(o=Ae(r,0),e-=1),be(t)?(a=je(t,0),e-=1):ve(t)&&(a=Ae(t,0),e-=1),0===e?gn(o,a):yn(n,i))):gn(r,t))})),C(zi,"hasEqualValuesIndexed",(function(r,t){var e;if(r.length!==t.length)return!1;for(e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0})),C(zi,"hasSameValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=un(r),i=un(t),n.accessorProtocol||i.accessorProtocol?(e=2,an(r)?an(t)?wn(sn(r,0),sn(t,0)):bn(n,i):(be(r)?(o=je(r,0),e-=1):ve(r)&&(o=Ae(r,0),e-=1),be(t)?(a=je(t,0),e-=1):ve(t)&&(a=Ae(t,0),e-=1),0===e?wn(o,a):bn(n,i))):wn(r,t))})),C(zi,"isAccessorArray",D),C(zi,"isBooleanDataType",Vn),C(zi,"isBooleanArray",an),C(zi,"isByteOrder",Fn),C(zi,"isComplexFloatingPointDataType",jn),C(zi,"isComplexTypedArray",In),C(zi,"isComplex64Array",ve),C(zi,"isComplex128Array",be),C(zi,"isDataType",Bn),C(zi,"isFloatingPointDataType",On),C(zi,"isIntegerDataType",Ln),C(zi,"isMostlySafeDataTypeCast",Fi),C(zi,"isNumericDataType",Ri),C(zi,"isRealDataType",ki),C(zi,"isRealFloatingPointDataType",Ii),C(zi,"isSafeDataTypeCast",Pi),C(zi,"isSameKindDataTypeCast",(function(r,t){return r===t||Ni[r][t]>0})),C(zi,"isSignedIntegerDataType",Di),C(zi,"isUnsignedIntegerDataType",Yi);var Zi=Math.sqrt;function Ki(r){return Math.abs(r)}var ro="function"==typeof Uint32Array?Uint32Array:void 0;var to=Ar()?ro:function(){throw new Error("not implemented")},eo="function"==typeof Uint16Array?Uint16Array:void 0;var no,io=Ur()?eo:function(){throw new Error("not implemented")},oo={uint16:io,uint8:ln};(no=new oo.uint16(1))[0]=4660;var ao,uo,fo=52===new oo.uint8(no.buffer)[0];!0===fo?(ao=1,uo=0):(ao=0,uo=1);var lo={HIGH:ao,LOW:uo},so=new Fe(1),co=new to(so.buffer),ho=lo.HIGH,po=lo.LOW;function go(r,t,e,n){return so[0]=r,t[n]=co[ho],t[n+e]=co[po],t}function yo(r){return go(r,[0,0],1,0)}U(yo,"assign",go);var mo=!0===fo?0:1,vo=new Fe(1),wo=new to(vo.buffer);function bo(r,t){return vo[0]=r,wo[mo]=t>>>0,vo[0]}function Eo(r){return 0|r}var _o,To,xo=2147483647,Vo=2147483648,Ao=!0===fo?1:0,So=new Fe(1),Fo=new to(So.buffer);function jo(r){return So[0]=r,Fo[Ao]}!0===fo?(_o=1,To=0):(_o=0,To=1);var Ro={HIGH:_o,LOW:To},ko=new Fe(1),Io=new to(ko.buffer),Bo=Ro.HIGH,Oo=Ro.LOW;function Lo(r,t){return Io[Bo]=r,Io[Oo]=t,ko[0]}var Po=[0,0];function Mo(r,t){var e,n;return yo.assign(r,Po,1,0),e=Po[0],e&=xo,n=jo(t),Lo(e|=n&=Vo,Po[1])}var Co=1072693247,Uo=1e300,No=1e-300;var Do=!0===fo?1:0,Yo=new Fe(1),zo=new to(Yo.buffer);function Wo(r,t){return Yo[0]=r,zo[Do]=t>>>0,Yo[0]}var qo=1023;var Go=1048575,$o=1048576,Ho=1072693248,Jo=536870912,Xo=524288,Qo=20,Zo=9007199254740992,Ko=.9617966939259756,ra=.9617967009544373,ta=-7.028461650952758e-9,ea=[1,1.5],na=[0,.5849624872207642],ia=[0,1.350039202129749e-8];var oa=1.4426950408889634,aa=1.4426950216293335,ua=1.9259629911266175e-8;var fa=1023,la=-1023,sa=-1074,ca=22250738585072014e-324,ha=4503599627370496;function pa(r,t,e,n){return Nn(r)||Qi(r)?(t[n]=r,t[n+e]=0,t):0!==r&&Ki(r)<ca?(t[n]=r*ha,t[n+e]=-52,t):(t[n]=r,t[n+e]=0,t)}U((function(r){return pa(r,[0,0],1,0)}),"assign",pa);var ga=2146435072;var ya=2220446049250313e-31,ma=2148532223,da=[0,0],va=[0,0];function wa(r,t){var e,n;return 0===t||0===r||Nn(r)||Qi(r)?r:(pa(r,da,1,0),r=da[0],t+=da[1],t+=function(r){var t=jo(r);return(t=(t&ga)>>>20)-qo|0}(r),t<sa?Mo(0,r):t>fa?r<0?bt:vr:(t<=la?(t+=52,n=ya):n=1,yo.assign(r,va,1,0),e=va[0],e&=ma,n*Lo(e|=t+qo<<20,va[1])))}var ba=.6931471805599453,Ea=1048575;var _a=1048576,Ta=1071644672,xa=20,Va=.6931471824645996,Aa=-1.904654299957768e-9;var Sa=1072693247,Fa=1105199104,ja=1139802112,Ra=1083179008,ka=1072693248,Ia=1083231232,Ba=3230714880,Oa=31,La=1e300,Pa=1e-300,Ma=8008566259537294e-32,Ca=[0,0],Ua=[0,0];function Na(r,t){var e,n,i,o,a,u,f,l,s,c,h,p,g,y;if(Nn(r)||Nn(t))return NaN;if(yo.assign(t,Ca,1,0),a=Ca[0],0===Ca[1]){if(0===t)return 1;if(1===t)return r;if(-1===t)return 1/r;if(.5===t)return Zi(r);if(-.5===t)return 1/Zi(r);if(2===t)return r*r;if(3===t)return r*r*r;if(4===t)return(r*=r)*r;if(Qi(t))return function(r,t){return-1===r?(r-r)/(r-r):1===r?1:Ki(r)<1==(t===vr)?0:vr}(r,t)}if(yo.assign(r,Ca,1,0),o=Ca[0],0===Ca[1]){if(0===o)return function(r,t){return t===bt?vr:t===vr?0:t>0?Xi(t)?r:0:Xi(t)?Mo(vr,r):vr}(r,t);if(1===r)return 1;if(-1===r&&Xi(t))return-1;if(Qi(r))return r===bt?Na(-0,-t):t<0?0:vr}if(r<0&&!1===_t(t))return(r-r)/(r-r);if(i=Ki(r),e=o&xo|0,n=a&xo|0,f=a>>>Oa|0,u=(u=o>>>Oa|0)&&Xi(t)?-1:1,n>Fa){if(n>ja)return function(r,t){return(jo(r)&xo)<=Co?t<0?Uo*Uo:No*No:t>0?Uo*Uo:No*No}(r,t);if(e<Sa)return 1===f?u*La*La:u*Pa*Pa;if(e>ka)return 0===f?u*La*La:u*Pa*Pa;h=function(r,t){var e,n,i,o,a,u,f;return o=(i=t-1)*i*(0===(f=i)?.5:.5+f*(.25*f-.3333333333333333)),e=(u=i*ua-o*oa)-((n=bo(n=(a=aa*i)+u,0))-a),r[0]=n,r[1]=e,r}(Ua,i)}else h=function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;return b=0,e<$o&&(b-=53,e=jo(t*=Zo)),b+=(e>>Qo)-qo|0,e=(E=e&Go|0)|Ho|0,E<=235662?_=0:E<767610?_=1:(_=0,b+=1,e-=$o),a=bo(i=(v=(t=Wo(t,e))-(l=ea[_]))*(w=1/(t+l)),0),n=(e>>1|Jo)+Xo,f=Wo(0,n+=_<<18),d=(o=i*i)*o*(0===(T=o)?.5999999999999946:.5999999999999946+T*(.4285714285785502+T*(.33333332981837743+T*(.272728123808534+T*(.23066074577556175+.20697501780033842*T))))),f=bo(f=3+(o=a*a)+(d+=(u=w*(v-a*f-a*(t-(f-l))))*(a+i)),0),c=bo(c=(v=a*f)+(w=u*f+(d-(f-3-o))*i),0),h=ra*c,y=(p=ta*c+(w-(c-v))*Ko+ia[_])-((g=bo(g=h+p+(s=na[_])+(m=b),0))-m-s-h),r[0]=g,r[1]=y,r}(Ua,i,e);if(p=(c=(t-(l=bo(t,0)))*h[0]+t*h[1])+(s=l*h[0]),yo.assign(p,Ca,1,0),g=Eo(Ca[0]),y=Eo(Ca[1]),g>=Ra){if(0!=(g-Ra|y))return u*La*La;if(c+Ma>p-s)return u*La*La}else if((g&xo)>=Ia){if(0!=(g-Ba|y))return u*Pa*Pa;if(c<=p-s)return u*Pa*Pa}return p=function(r,t,e){var n,i,o,a,u,f,l,s,c,h;return c=((s=r&xo|0)>>xa)-qo|0,l=0,s>Ta&&(i=Wo(0,((l=r+(_a>>c+1)>>>0)&~(Ea>>(c=((l&xo)>>xa)-qo|0)))>>>0),l=(l&Ea|_a)>>xa-c>>>0,r<0&&(l=-l),t-=i),r=Eo(r=jo(f=1-((f=(o=(i=bo(i=e+t,0))*Va)+(a=(e-(i-t))*ba+i*Aa))*(n=f-(i=f*f)*(0===(h=i)?.16666666666666602:.16666666666666602+h*(h*(6613756321437934e-20+h*(4.1381367970572385e-8*h-16533902205465252e-22))-.0027777777777015593)))/(n-2)-((u=a-(f-o))+f*u)-f))),(r+=l<<xa>>>0)>>xa<=0?wa(f,l):Wo(f,r)}(g,s,c),u*p}function Da(r,t){var e,n,i,o,a,u,f,l,s,c;if((u=r.length)<=0||t<=0)return[];for(e=Wi(r),a=Na(u,t),o=[],l=0;l<t;l++)o.push(0);for(n=[],l=0;l<a;l++){for(c=l,s=t-1;s>=0;s--)c-=f=c%u,c/=u,o[s]=f;for(i=[],s=0;s<t;s++)i.push(e(r,o[s]));n.push(i)}return n}function Ya(r,t){var e,n,i,o,a,u,f,l;for(e=Wi(r),n=Wi(t),o=r.length,a=t.length,i=[],f=0;f<o;f++)for(u=e(r,f),l=0;l<a;l++)i.push([u,n(t,l)]);return i}function za(r){var t,e,n,i,o,a;for(t=Wi(r),n=r.length,e=[],o=0;o<n;o++)for(i=t(r,o),a=0;a<n;a++)e.push([i,t(r,a)]);return e}function Wa(r){var t,e,n,i;for(n=Wi(r),e=r.length,t=[],i=0;i<e;i++)t.push(n(r,i));return t}var qa=16;function Ga(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===qa}var $a=8;function Ha(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===$a}function Ja(r,t){if(Ga(r))return je(r,t);if(Ha(r))return Ae(r,t);throw new TypeError(j("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",r))}function Xa(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]||(t+=1);return t}function Qa(r){return D(r)?an(r)?Xa(sn(r,0)):In(r)?function(r){var t,e,n;for(t=Ja(r,0),e=0,n=0;n<t.length;n+=2)0===t[n]&&0===t[n+1]&&(e+=1);return e}(r):function(r){var t,e,n;for(t=Wi(r),e=0,n=0;n<r.length;n++)t(r,n)||(e+=1);return e}(r):Xa(r)}function Za(r,t){return r===t||r!=r&&t!=t}function Ka(r,t){return r===t||r!=r&&t!=t||!(!ye(r)||!ye(t))&&(e=t,n=dn(r),i=dn(e),Za(n[0],i[0])&&Za(n[1],i[1]));var e,n,i}function ru(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]&&(t+=1);return t}function tu(r){return D(r)?an(r)?ru(sn(r,0)):In(r)?function(r){var t,e,n;for(t=Ja(r,0),e=0,n=0;n<t.length;n+=2)(t[n]||t[n+1])&&(e+=1);return e}(r):function(r){var t,e,n;for(t=Wi(r),e=0,n=0;n<r.length;n++)t(r,n)&&(e+=1);return e}(r):ru(r)}function eu(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!1,u=n,f=0;f<r.length;f+=2)!1===a&&(r[f]||r[f+1])&&(a=!0),o(i,u,a),u+=e;return i}function nu(r,t,e,n){var i=un(r),o=un(t);return i.accessorProtocol||o.accessorProtocol?(be(r)?eu(je(r,0),o,e,n):ve(r)?eu(Ae(r,0),o,e,n):an(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!1,u=n,f=0;f<r.length;f++)!1===a&&r[f]&&(a=!0),o(i,u,a),u+=e}(sn(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!1,l=n,s=0;s<i.length;s++)!1===f&&a(i,s)&&(f=!0),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!1,o=n,a=0;a<r.length;a++)!1===i&&r[a]&&(i=!0),t[o]=i,o+=e}(r,t,e,n),t)}function iu(r){return nu(r,$i(!1,r.length),1,0)}function ou(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f+=2)!0!==a||r[f]||r[f+1]||(a=!1),o(i,u,a),u+=e;return i}function au(r,t,e,n){var i=un(r),o=un(t);return i.accessorProtocol||o.accessorProtocol?(be(r)?ou(je(r,0),o,e,n):ve(r)?ou(Ae(r,0),o,e,n):an(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f++)!0!==a||r[f]||(a=!1),o(i,u,a),u+=e}(sn(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!0,l=n,s=0;s<i.length;s++)!0!==f||a(i,s)||(f=!1),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!0,o=n,a=0;a<r.length;a++)!0!==i||r[a]||(i=!1),t[o]=i,o+=e}(r,t,e,n),t)}function uu(r){return au(r,$i(!0,r.length),1,0)}function fu(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f+=2)!0===a&&(r[f]||r[f+1])&&(a=!1),o(i,u,a),u+=e;return i}function lu(r,t,e,n){var i=un(r),o=un(t);return i.accessorProtocol||o.accessorProtocol?(be(r)?fu(je(r,0),o,e,n):ve(r)?fu(Ae(r,0),o,e,n):an(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f++)!0===a&&r[f]&&(a=!1),o(i,u,a),u+=e}(sn(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!0,l=n,s=0;s<i.length;s++)!0===f&&a(i,s)&&(f=!1),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!0,o=n,a=0;a<r.length;a++)!0===i&&r[a]&&(i=!1),t[o]=i,o+=e}(r,t,e,n),t)}function su(r){return lu(r,$i(!0,r.length),1,0)}function cu(r){var t;for(t=0;t<r.length;t++)if(!r[t])return!1;return!0}function hu(r){var t;for(t=0;t<r.length;t+=2)if(!r[t]&&!r[t+1])return!1;return!0}function pu(r){return xt(r)||function(r){return null===r}(r)||function(r){return void 0===r}(r)}function gu(){var r,t,e,n;if(0===(r=arguments.length)?(t=null,e=null,n=null):1===r?(t=null,e=arguments[0],n=null):2===r?(t=arguments[0],e=arguments[1],n=null):(t=arguments[0],e=arguments[1],n=arguments[2]),!(this instanceof gu))return new gu(t,e,n);if(!pu(t))throw new TypeError(j("invalid argument. First argument must be an integer, null, or undefined. Value: `%s`.",t));if(!pu(e))throw new TypeError(j("invalid argument. Second argument must be an integer, null, or undefined. Value: `%s`.",e));if(!pu(n))throw new TypeError(j("invalid argument. Third argument must be an integer, null, or undefined. Value: `%s`.",n));if(0===n)throw new RangeError(j("invalid argument. Third argument cannot be zero. Value: `%s`.",n));return this._start=void 0===t?null:t,this._stop=void 0===e?null:e,this._step=void 0===n?null:n,this}function yu(r,t,e){var n,i,o;if(n=r.start,i=r.stop,null===(o=r.step)&&(o=1),null===n)n=o>0?0:t-1;else if(n<0){if((n=t+n)<0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};n=0}}else if(n>=t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};n=o<0?t-1:t}if(null===i)i=o>0?t:null;else if(i<0){if((i=t+i)<0)if(o>0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=0}else{if(e&&i<-1)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=null}}else if(i>t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=t}return new gu(n,i,o)}U(iu,"assign",nu),U(uu,"assign",au),U(su,"assign",lu),U(gu,"name","Slice"),Te(gu.prototype,"start",(function(){return this._start})),Te(gu.prototype,"stop",(function(){return this._stop})),Te(gu.prototype,"step",(function(){return this._step})),U(gu.prototype,"toString",(function(){return"Slice("+this._start+","+this._stop+","+this.step+")"})),U(gu.prototype,"toJSON",(function(){return{type:"Slice",data:[this._start,this._stop,this._step]}}));var mu=Math.ceil;function du(r){var t,e,n;return e=r.start,null===(n=r.stop)&&(n=-1),(t=r.step)>0&&e>=n||t<0&&e<=n?0:mu((n-e)/t)}var vu="function";function wu(r){return typeof r.get===vu&&typeof r.set===vu}var bu={float64:function(r,t){return r[t]},float32:function(r,t){return r[t]},int32:function(r,t){return r[t]},int16:function(r,t){return r[t]},int8:function(r,t){return r[t]},uint32:function(r,t){return r[t]},uint16:function(r,t){return r[t]},uint8:function(r,t){return r[t]},uint8c:function(r,t){return r[t]},generic:function(r,t){return r[t]},default:function(r,t){return r[t]}};function Eu(r){var t=bu[r];return"function"==typeof t?t:bu.default}var _u={float64:function(r,t,e){r[t]=e},float32:function(r,t,e){r[t]=e},int32:function(r,t,e){r[t]=e},int16:function(r,t,e){r[t]=e},int8:function(r,t,e){r[t]=e},uint32:function(r,t,e){r[t]=e},uint16:function(r,t,e){r[t]=e},uint8:function(r,t,e){r[t]=e},uint8c:function(r,t,e){r[t]=e},generic:function(r,t,e){r[t]=e},default:function(r,t,e){r[t]=e}};function Tu(r){var t=_u[r];return"function"==typeof t?t:_u.default}var xu={complex128:function(r,t){return r.get(t)},complex64:function(r,t){return r.get(t)},default:function(r,t){return r.get(t)}};function Vu(r){var t=xu[r];return"function"==typeof t?t:xu.default}var Au={complex128:function(r,t,e){r.set(e,t)},complex64:function(r,t,e){r.set(e,t)},default:function(r,t,e){r.set(e,t)}};function Su(r){var t=Au[r];return"function"==typeof t?t:Au.default}var Fu={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"},ju="function"==typeof Int32Array?Int32Array:void 0;var Ru=Br()?ju:function(){throw new Error("not implemented")},ku="function"==typeof Int16Array?Int16Array:void 0;var Iu=Gr()?ku:function(){throw new Error("not implemented")},Bu="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Ou=it()?Bu:function(){throw new Error("not implemented")},Lu="function"==typeof Int8Array?Int8Array:void 0;var Pu=ct()?Lu:function(){throw new Error("not implemented")};function Mu(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!ye(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(xe(n),Ve(n))}return t}var Cu=2*ce.BYTES_PER_ELEMENT,Uu=Ee();function Nu(r){return r instanceof zu||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Du(r){return r===zu||"Complex128Array"===r.name}function Yu(r,t){return new ge(r[t*=2],r[t+1])}function zu(){var r,t,e,n;if(t=arguments.length,!(this instanceof zu))return 0===t?new zu:1===t?new zu(arguments[0]):2===t?new zu(arguments[0],arguments[1]):new zu(arguments[0],arguments[1],arguments[2]);if(0===t)e=new ce(0);else if(1===t)if(St(arguments[0]))e=new ce(2*arguments[0]);else if(Bt(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&ye(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!ye(n=t[i]))return null;r[o]=xe(n),r[o+1]=Ve(n),o+=2}return r}(new ce(2*n),e),null===e){if(!me(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new ce(arguments[0])}}else{if(Ha(e))e=Ae(e,0);else if(Ga(e))e=je(e,0);else if(!me(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new ce(e)}else if(Lt(arguments[0])){if(!_t((e=arguments[0]).byteLength/Cu))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Cu,e.byteLength));e=new ce(e)}else{if(!Pt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Uu)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ue(e[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ue((e=e[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Mu(e))instanceof Error)throw e;e=new ce(e)}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!_t(r/Cu))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Cu,r));if(2===t){if(!_t((n=e.byteLength-r)/Cu))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Cu,n));e=new ce(e,r)}else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Cu>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Cu));e=new ce(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Wu(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!ye(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(Me(n),Ce(n))}return t}U(zu,"BYTES_PER_ELEMENT",Cu),U(zu,"name","Complex64Array"),U(zu,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Du(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Nu(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,r.get(c),c)))o[h]=xe(s),o[h+1]=Ve(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?Vu("default"):Eu("default"),c=0;c<f;c++)if(!ye(u(r,c))){l=!0;break}if(l){if(!me(f))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,u(r,c),c)))o[h]=xe(s),o[h+1]=Ve(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Pt(r)&&Uu&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ye(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(xe(o),Ve(o))}return n}(o,n,t):Mu(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(zu,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Du(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(zu.prototype,"at",(function(r){if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Yu(this._buffer,r)})),Te(zu.prototype,"buffer",(function(){return this._buffer.buffer})),Te(zu.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(zu.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(zu.prototype,"BYTES_PER_ELEMENT",zu.BYTES_PER_ELEMENT),U(zu.prototype,"copyWithin",(function(r,t){if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(zu.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Yu(n,o)],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.entries()})),t})),U(zu.prototype,"every",(function(r,t){var e,n;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Yu(e,n),n,this))return!1;return!0})),U(zu.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!_t(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=xe(r),u=Ve(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(zu.prototype,"filter",(function(r,t){var e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Yu(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(zu.prototype,"find",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Yu(e,n),r.call(t,i,n,this))return i})),U(zu.prototype,"findIndex",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Yu(e,n),r.call(t,i,n,this))return n;return-1})),U(zu.prototype,"findLast",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Yu(e,n),r.call(t,i,n,this))return i})),U(zu.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Yu(e,n),r.call(t,i,n,this))return n;return-1})),U(zu.prototype,"forEach",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Yu(e,n),r.call(t,i,n,this)})),U(zu.prototype,"get",(function(r){if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Yu(this._buffer,r)})),U(zu.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(zu.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(zu.prototype,"join",(function(r){var t,e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Mt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(Yu(e,i).toString());return t.join(n)})),U(zu.prototype,"keys",(function(){var r,t,e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(zu.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=xe(r),o=Ve(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Te(zu.prototype,"length",(function(){return this._length})),U(zu.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ye(a=r.call(t,Yu(n,o),o,this)))e[2*o]=xe(a),e[2*o+1]=Ve(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),U(zu.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Yu(e,0),o=1}for(;o<i;o++)n=r(n,Yu(e,o),o,this);return n})),U(zu.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Yu(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Yu(e,o),o,this);return n})),U(zu.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),U(zu.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(ye(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=xe(r),void(n[e+1]=Ve(r))}if(Nu(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,l=n.byteOffset+e*Cu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new ce(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!ye(r[f])){o=!0;break}if(o){if(!me(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,l=n.byteOffset+e*Cu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new ce(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=xe(u),n[e+1]=Ve(u),e+=2}})),U(zu.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),U(zu.prototype,"some",(function(r,t){var e,n;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Yu(e,n),n,this))return!0;return!1})),U(zu.prototype,"sort",(function(r){var t,e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Yu(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=xe(t[i]),e[o+1]=Ve(t[i]);return this})),U(zu.prototype,"subarray",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Cu):(i=t-r,e=n.byteOffset+r*Cu),new this.constructor(n.buffer,e,i<0?0:i)})),U(zu.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Yu(o,a).toLocaleString(n,e));return i.join(",")})),U(zu.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),U(zu.prototype,"toSorted",(function(r){var t,e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Yu(e,i));return t.sort(r),new zu(t)})),U(zu.prototype,"toString",(function(){var r,t,e;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(Yu(t,e).toString());return r.join(",")})),U(zu.prototype,"values",(function(){var r,t,e,n,i,o;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Yu(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(zu.prototype,"with",(function(r,t){var e,n,i;if(!Nu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=xe(t),e[2*r+1]=Ve(t),n}));var qu=2*Fe.BYTES_PER_ELEMENT,Gu=Ee();function $u(r){return r instanceof Xu||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Hu(r){return r===Xu||"Complex64Array"===r.name}function Ju(r,t){return new fe(r[t*=2],r[t+1])}function Xu(){var r,t,e,n;if(t=arguments.length,!(this instanceof Xu))return 0===t?new Xu:1===t?new Xu(arguments[0]):2===t?new Xu(arguments[0],arguments[1]):new Xu(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Fe(0);else if(1===t)if(St(arguments[0]))e=new Fe(2*arguments[0]);else if(Bt(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&ye(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!ye(n=t[i]))return null;r[o]=Me(n),r[o+1]=Ce(n),o+=2}return r}(new Fe(2*n),e),null===e){if(!me(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Fe(arguments[0])}}else{if(Ha(e))e=Ae(e,0);else if(Ga(e))e=je(e,0);else if(!me(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Fe(e)}else if(Lt(arguments[0])){if(!_t((e=arguments[0]).byteLength/qu))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",qu,e.byteLength));e=new Fe(e)}else{if(!Pt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Gu)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ue(e[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ue((e=e[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Wu(e))instanceof Error)throw e;e=new Fe(e)}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!_t(r/qu))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",qu,r));if(2===t){if(!_t((n=e.byteLength-r)/qu))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",qu,n));e=new Fe(e,r)}else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*qu>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*qu));e=new Fe(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Qu(r){var t,e;for(t=[];!(e=r.next()).done;)t.push($t(e.value));return t}U(Xu,"BYTES_PER_ELEMENT",qu),U(Xu,"name","Complex128Array"),U(Xu,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Hu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if($u(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,r.get(c),c)))o[h]=Me(s),o[h+1]=Ce(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?Vu("default"):Eu("default"),c=0;c<f;c++)if(!ye(u(r,c))){l=!0;break}if(l){if(!me(f))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(ye(s=n.call(t,u(r,c),c)))o[h]=Me(s),o[h+1]=Ce(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Pt(r)&&Gu&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ye(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Me(o),Ce(o))}return n}(o,n,t):Wu(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(Xu,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Hu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(Xu.prototype,"at",(function(r){if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Ju(this._buffer,r)})),Te(Xu.prototype,"buffer",(function(){return this._buffer.buffer})),Te(Xu.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(Xu.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(Xu.prototype,"BYTES_PER_ELEMENT",Xu.BYTES_PER_ELEMENT),U(Xu.prototype,"copyWithin",(function(r,t){if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),U(Xu.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,a=-2,U(e={},"next",(function(){var t;if(o+=1,i||o>=n)return{done:!0};return t=new fe(r[a+=2],r[a+1]),{value:[o,t],done:!1}})),U(e,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){return t.entries()})),e})),U(Xu.prototype,"every",(function(r,t){var e,n;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Ju(e,n),n,this))return!1;return!0})),U(Xu.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!_t(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=Me(r),u=Ce(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(Xu.prototype,"filter",(function(r,t){var e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Ju(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(Xu.prototype,"find",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ju(e,n),r.call(t,i,n,this))return i})),U(Xu.prototype,"findIndex",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ju(e,n),r.call(t,i,n,this))return n;return-1})),U(Xu.prototype,"findLast",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ju(e,n),r.call(t,i,n,this))return i})),U(Xu.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ju(e,n),r.call(t,i,n,this))return n;return-1})),U(Xu.prototype,"forEach",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Ju(e,n),r.call(t,i,n,this)})),U(Xu.prototype,"get",(function(r){if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Ju(this._buffer,r)})),Te(Xu.prototype,"length",(function(){return this._length})),U(Xu.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(Xu.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Xu.prototype,"join",(function(r){var t,e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Dt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(Ju(e,i).toString());return t.join(n)})),U(Xu.prototype,"keys",(function(){var r,t,e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(Xu.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ye(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=Me(r),o=Ce(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Xu.prototype,"map",(function(r,t){var e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ye(a=r.call(t,Ju(n,o),o,this)))e[2*o]=Me(a),e[2*o+1]=Ce(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),U(Xu.prototype,"reduce",(function(r,t){var e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ju(e,0),o=1}for(;o<i;o++)n=r(n,Ju(e,o),o,this);return n})),U(Xu.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ju(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Ju(e,o),o,this);return n})),U(Xu.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),U(Xu.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(ye(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Me(r),void(n[e+1]=Ce(r))}if($u(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,l=n.byteOffset+e*qu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Fe(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!ye(r[f])){o=!0;break}if(o){if(!me(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,l=n.byteOffset+e*qu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Fe(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=Me(u),n[e+1]=Ce(u),e+=2}})),U(Xu.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),U(Xu.prototype,"some",(function(r,t){var e,n;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Ju(e,n),n,this))return!0;return!1})),U(Xu.prototype,"sort",(function(r){var t,e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ju(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Me(t[i]),e[o+1]=Ce(t[i]);return this})),U(Xu.prototype,"subarray",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!_t(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*qu):(i=t-r,e=n.byteOffset+r*qu),new this.constructor(n.buffer,e,i<0?0:i)})),U(Xu.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Dt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Ju(o,a).toLocaleString(n,e));return i.join(",")})),U(Xu.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),U(Xu.prototype,"toSorted",(function(r){var t,e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ju(e,i));return t.sort(r),new Xu(t)})),U(Xu.prototype,"toString",(function(){var r,t,e;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(Ju(t,e).toString());return r.join(",")})),U(Xu.prototype,"values",(function(){var r,t,e,n,i,o;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Ju(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(Xu.prototype,"with",(function(r,t){var e,n,i;if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Me(t),e[2*r+1]=Ce(t),n}));var Zu=ln.BYTES_PER_ELEMENT,Ku=Ee();function rf(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Zu}function tf(r){return r===ef}function ef(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof ef))return 0===t?new ef:1===t?new ef(arguments[0]):2===t?new ef(arguments[0],arguments[1]):new ef(arguments[0],arguments[1],arguments[2]);if(0===t)e=new ln(0);else if(1===t)if(St(i=arguments[0]))e=new ln(i);else if(Bt(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=$t(t[n]);return r}(new ln(i.length),i);else if(Lt(i))e=new ln(i);else{if(!Pt(i))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Ku)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!ue(i[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!ue((e=i[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new ln(Qu(e))}else{if(!Lt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!St(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new ln(e,r);else{if(!St(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Zu>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Zu));e=new ln(e,r,n)}}return U(this,"_buffer",e),U(this,"_length",e.length),this}U(ef,"BYTES_PER_ELEMENT",Zu),U(ef,"name","BooleanArray"),U(ef,"from",(function(r){var t,e,n,i,o,a,u,f,l;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!tf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!ue(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Bt(r)){if(n){for(f=r.length,u=r.get&&r.set?Vu("default"):Eu("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=$t(n.call(t,u(r,l),l));return i}return new this(r)}if(Pt(r)&&Ku&&ue(r[_e])){if(!ue((o=r[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));for(a=n?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push($t(t.call(e,i.value,o)));return n}(o,n,t):Qu(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(ef,"of",(function(){var r,t;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!tf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),U(ef.prototype,"at",(function(r){var t,e;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!xt(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(e=this._length,t=this._buffer,r<0&&(r+=e),!(r<0||r>=e))return $t(t[r])})),Te(ef.prototype,"buffer",(function(){return this._buffer.buffer})),Te(ef.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(ef.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(ef.prototype,"BYTES_PER_ELEMENT",ef.BYTES_PER_ELEMENT),U(ef.prototype,"copyWithin",(function(r,t){if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this})),U(ef.prototype,"entries",(function(){var r,t,e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,$t(n[o])],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.entries()})),t})),U(ef.prototype,"every",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,$t(e[n]),n,this))return!1;return!0})),U(ef.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!xt(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(o=r?1:0,a=t;a<e;a++)n[a]=o;return this})),U(ef.prototype,"filter",(function(r,t){var e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=$t(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(ef.prototype,"find",(function(r,t){var e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=$t(e[i]),r.call(t,n,i,this))return n})),U(ef.prototype,"findIndex",(function(r,t){var e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=$t(e[i]),r.call(t,n,i,this))return i;return-1})),U(ef.prototype,"findLast",(function(r,t){var e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=$t(e[i]),r.call(t,n,i,this))return n})),U(ef.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=$t(e[i]),r.call(t,n,i,this))return i;return-1})),U(ef.prototype,"forEach",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,$t(e[n]),n,this)})),U(ef.prototype,"get",(function(r){if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!St(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return $t(this._buffer[r])})),U(ef.prototype,"includes",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===$t(e[n]))return!0;return!1})),U(ef.prototype,"indexOf",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===$t(e[n]))return n;return-1})),U(ef.prototype,"join",(function(r){var t,e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Mt(r))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",r))}else r=",";for(t=this._buffer,e=[],n=0;n<this._length;n++)t[n]?e.push("true"):e.push("false");return e.join(r)})),U(ef.prototype,"keys",(function(){var r,t,e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return r.keys()})),t})),U(ef.prototype,"lastIndexOf",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Gt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(e=this._buffer,n=t;n>=0;n--)if(r===$t(e[n]))return n;return-1})),Te(ef.prototype,"length",(function(){return this._length})),U(ef.prototype,"map",(function(r,t){var e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(i=this._buffer,e=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)e[o]=$t(r.call(t,$t(i[o]),o,this));return n})),U(ef.prototype,"reduce",(function(r,t){var e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=0;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=$t(e[0]),o=1}for(;o<n;o++)i=r(i,$t(e[o]),o,this);return i})),U(ef.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=n-1;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=$t(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,$t(e[o]),o,this);return i})),U(ef.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=Et(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),U(ef.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!St(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Bt(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=rf(r)?r._buffer:r,u=n.byteOffset+e*Zu,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new ln(t.length),a=0;a<t.length;a++)i[a]=t[a];t=i}for(a=0;a<o;e++,a++)n[e]=t[a]?1:0}else{if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),U(ef.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)r=0,t=a;else{if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=a)<0&&(r=0),1===arguments.length)t=a;else{if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=a)<0&&(t=0):t>a&&(t=a)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)n[u]=o[u+r];return i})),U(ef.prototype,"some",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,$t(e[n]),n,this))return!0;return!1})),U(ef.prototype,"sort",(function(r){var t;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r($t(t),$t(e))})),this})),U(ef.prototype,"subarray",(function(r,t){var e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!xt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Zu):(i=t-r,e=n.byteOffset+r*Zu),new this.constructor(n.buffer,e,i<0?0:i)})),U(ef.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Yt(r))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!Pt(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push($t(o[a]).toLocaleString(n,e));return i.join(",")})),U(ef.prototype,"toReversed",(function(){var r,t,e,n,i;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)r[i]=n[e-i-1];return t})),U(ef.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),i=this._buffer,t=e._buffer,o=0;o<n;o++)t[o]=i[o];if(0===arguments.length)return t.sort(),e;if(!ue(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r($t(t),$t(e))})),e})),U(ef.prototype,"toString",(function(){var r,t,e;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)t[e]?r.push("true"):r.push("false");return r.join(",")})),U(ef.prototype,"values",(function(){var r,t,e,n,i,o;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:$t(i[o]),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(r,_e,(function(){return t.values()})),r})),U(ef.prototype,"with",(function(r,t){var e,n;if(!rf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!xt(r))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",r));if(n=this._length,r<0&&(r+=n),r<0||r>=n)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Gt(t))throw new TypeError(j("invalid argument. Second argument must be a boolean. Value: `%s`.",t));return(e=new this.constructor(this._buffer))._buffer[r]=t?1:0,e}));var nf=[Fe,ce,Ru,to,Iu,io,Pu,ln,Ou,zu,Xu,ef],of=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],af=of.length;function uf(r){var t;if(ir(r))return"generic";if(ur(r))return null;for(t=0;t<af;t++)if(r instanceof nf[t])return of[t];return Fu[sr(r)]||null}function ff(r){var t=uf(r);return wu(r)?{data:r,dtype:t,accessorProtocol:!0,accessors:[Vu(t),Su(t)]}:{data:r,dtype:t,accessorProtocol:!1,accessors:[Eu(t),Tu(t)]}}function lf(r,t,e,n,i,o,a){var u,f,l,s,c,h,p;for(u=t.data,f=i.data,s=t.accessors[0],l=i.accessors[1],c=n,h=a,p=0;p<r;p++)l(f,h,s(u,c)),c+=e,h+=o;return t}var sf=8;function cf(r,t,e,n,i){var o,a,u,f,l,s;if(r<=0)return n;if(u=ff(t),f=ff(n),u.accessorProtocol||f.accessorProtocol)return lf(r,u,e,o=e<0?(1-r)*e:0,f,i,a=i<0?(1-r)*i:0),f.data;if(1===e&&1===i){if((l=r%sf)>0)for(s=0;s<l;s++)n[s]=t[s];if(r<sf)return n;for(s=l;s<r;s+=sf)n[s]=t[s],n[s+1]=t[s+1],n[s+2]=t[s+2],n[s+3]=t[s+3],n[s+4]=t[s+4],n[s+5]=t[s+5],n[s+6]=t[s+6],n[s+7]=t[s+7];return n}for(o=e<0?(1-r)*e:0,a=i<0?(1-r)*i:0,s=0;s<r;s++)n[a]=t[o],o+=e,a+=i;return n}var hf=8;function pf(r,t,e,n,i,o,a){var u,f,l,s,c,h;if(r<=0)return i;if(l=ff(t),s=ff(i),l.accessorProtocol||s.accessorProtocol)return lf(r,l,e,n,s,o,a),s.data;if(u=n,f=a,1===e&&1===o){if((c=r%hf)>0)for(h=0;h<c;h++)i[f]=t[u],u+=e,f+=o;if(r<hf)return i;for(h=c;h<r;h+=hf)i[f]=t[u],i[f+1]=t[u+1],i[f+2]=t[u+2],i[f+3]=t[u+3],i[f+4]=t[u+4],i[f+5]=t[u+5],i[f+6]=t[u+6],i[f+7]=t[u+7],u+=hf,f+=hf;return i}for(h=0;h<r;h++)i[f]=t[u],u+=e,f+=o;return i}function gf(r,t,e){var n,i,o,a,u;if((o=yu(t,i=r.length,!0)).code){if(e)throw new RangeError(j("invalid argument. Slice exceeds array bounds. Array length: %d.",i));o=yu(t,i,!1)}return u=du(o),n="generic"===(a=tn(r))||null===a?Hi(u):new r.constructor(u),pf(u,r,o.step,o.start,n,1,0),n}U(cf,"ndarray",pf);var yf={float64:mr,float32:_r,generic:Array,int16:Hr,int32:Lr,int8:pt,uint16:Dr,uint32:Fr,uint8:tt,uint8c:at,complex64:Pe,complex128:qe,bool:Qe};function mf(r){return yf[r]||null}function df(r){return"complex64"===r}function vf(r){return"complex128"===r}function wf(r){return"bool"===r}function bf(r,t){var e,n,i,o,a,u,f,l,s;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===t)return Wa(r);if(null===(n=mf(t)))throw new TypeError(j("invalid argument. Second argument must be a recognized array data type. Value: `%s`.",t));if(f=r.length,e=df(l=tn(r)),u=new n(f),e||vf(l)){if(i=e?Ae(r,0):je(r,0),df(t))return cf(2*f,i,1,o=Ae(u,0),1),u;if(vf(t))return cf(2*f,i,1,o=je(u,0),1),u;if(wf(t)){for(o=sn(u,0),s=0;s<f;s++)i[2*s]||i[2*s+1]?o[s]=1:o[s]=0;return u}return cf(f,i,2,u,1),u}if(wf(l))return i=sn(r,0),wf(t)?(cf(f,i,1,o=sn(u,0),1),u):df(t)?(cf(f,i,1,o=Ae(u,0),2),u):vf(t)?(cf(f,i,1,o=je(u,0),2),u):(cf(f,i,1,u,1),u);if((e=df(t))||vf(t))return cf(f,r,1,o=e?Ae(u,0):je(u,0),2),u;if(wf(t)){for(o=sn(u,0),a=Wi(r),s=0;s<f;s++)a(r,s)?o[s]=1:o[s]=0;return u}return cf(f,r,1,u,1),u}function Ef(r,t,e,n){var i,o,a,u,f,l,s;if(a=tn(r)||"generic",u=tn(t)||"generic",i=r.length,o=t.length,!Fi(a,u))throw new TypeError(j("invalid argument. Input array values cannot be safely cast to the output array data type. Data types: [%s, %s].",a,u));if(jn(u)&&ki(a)&&(r=bf(r,u)),(f=yu(e,o,!0)).code){if(n)throw new RangeError(j("invalid argument. Slice exceeds array bounds. Array length: %d.",o));f=yu(e,o,!1)}if(s=du(f),1===i)l=0;else{if(i!==s)throw new Error(j("invalid argument. Input array and the output array slice are broadcast incompatible. Array length: %u. Desired length: %u.",i,s));l=1}return pf(s,r,l,0,t,f.step,f.start),t}function _f(r,t,e){var n,i;for(n=[],i=0;i<r;i++)n.push(t.call(e,i));return n}function Tf(r,t){var e,n,i,o;for(n=t[1],i=t[0],e=[],o=0;o<i;o++)e.push($i(r,n));return e}function xf(r,t){var e,n,i,o,a,u,f;for(i=t[2],o=t[1],a=t[0],e=[],u=0;u<a;u++){for(n=[],f=0;f<o;f++)n.push($i(r,i));e.push(n)}return e}function Vf(r,t){var e,n,i,o,a,u,f,l,s,c;for(o=t[3],a=t[2],u=t[1],f=t[0],e=[],c=0;c<f;c++){for(i=[],s=0;s<u;s++){for(n=[],l=0;l<a;l++)n.push($i(r,o));i.push(n)}e.push(i)}return e}function Af(r,t){var e,n,i,o,a,u,f,l,s,c,h,p,g;for(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],e=[],g=0;g<s;g++){for(o=[],p=0;p<l;p++){for(i=[],h=0;h<f;h++){for(n=[],c=0;c<u;c++)n.push($i(r,a));i.push(n)}o.push(i)}e.push(o)}return e}function Sf(r,t,e,n,i){var o,a,u;if(o=e[n],(a=n+1)===t)return $i(r,o);for(u=0;u<o;u++)i.push(Sf(r,t,e,a,[]));return i}function Ff(r,t){return Sf(r,t.length,t,0,[])}function jf(r,t,e,n,i,o,a){var u,f,l,s,c;for(f=(s=e+1)===r,l=t[e],c=0;c<l;c++)(u=n.slice()).push(c),f?i.push(o.call(a,u)):i.push(jf(r,t,s,u,[],o,a));return i}function Rf(r){var t,e,n;if(0===(t=r.length))return 0;for(e=1,n=0;n<t;n++)e*=r[n];return e}function kf(r,t){return"column-major"===t?function(r){var t,e,n;for(t=[],e=1,n=0;n<r.length;n++)t.push(e),e*=r[n];return t}(r):function(r){var t,e,n,i;for(t=r.length,e=[],i=0;i<t;i++)e.push(0);for(n=1,i=t-1;i>=0;i--)e[i]=n,n*=r[i];return e}(r)}function If(r,t,e,n,i,o){var a,u,f,l,s;for(a=r.length,u=1,s=0;s<a;s++)u*=r[s];if("clamp"===o)i<0?i=0:i>=u&&(i=u-1);else if("wrap"===o)i<0?(i+=u)<0&&0!==(i%=u)&&(i+=u):i>=u&&(i-=u)>=u&&(i%=u);else if("normalize"===o&&i<0&&(i+=u),i<0||i>=u)throw new RangeError(j("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(f=e,"column-major"===n){for(s=0;s<a;s++)i-=l=i%r[s],i/=r[s],f+=l*t[s];return f}for(s=a-1;s>=0;s--)i-=l=i%r[s],i/=r[s],f+=l*t[s];return f}function Bf(r,t,e,n){var i,o,a,u,f,l,s,c;for(i=t.data,a=t.accessors[0],o=t.accessors[1],s=Et(r/2),l=(f=n)+(r-1)*e,c=0;c<s;c++)u=a(i,f),o(i,f,a(i,l)),o(i,l,u),f+=e,l-=e;return t}U(kf,"assign",(function(r,t,e){return"column-major"===t?function(r,t){var e,n;for(e=1,n=0;n<r.length;n++)t[n]=e,e*=r[n];return t}(r,e):function(r,t){var e,n;for(e=1,n=r.length-1;n>=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var Of=3;function Lf(r,t,e){var n,i,o,a,u,f,l;if(r<=0)return t;if((a=ff(t)).accessorProtocol)return Bf(r,a,e,i=e<0?(1-r)*e:0),a.data;if(f=Et(r/2),1===e){if(o=r-1,(u=f%Of)>0)for(i=0;i<u;i++)n=t[i],t[i]=t[o],t[o]=n,o-=1;if(f<Of)return t;for(i=u;i<f;i+=Of)n=t[i],t[i]=t[o],t[o]=n,n=t[i+1],t[i+1]=t[o-1],t[o-1]=n,n=t[i+2],t[i+2]=t[o-2],t[o-2]=n,o-=Of;return t}for(o=(i=e<0?(1-r)*e:0)+(r-1)*e,l=0;l<f;l++)n=t[i],t[i]=t[o],t[o]=n,i+=e,o-=e;return t}U(Lf,"ndarray",(function(r,t,e,n){var i,o,a,u,f,l,s;if(r<=0)return t;if((u=ff(t)).accessorProtocol)return Bf(r,u,e,n),u.data;if(l=Et(r/2),o=n,1===e){if(a=o+r-1,(f=l%3)>0)for(s=0;s<f;s++)i=t[o],t[o]=t[a],t[a]=i,o+=e,a-=e;if(l<3)return t;for(s=f;s<l;s+=3)i=t[o],t[o]=t[a],t[a]=i,i=t[o+1],t[o+1]=t[a-1],t[a-1]=i,i=t[o+2],t[o+2]=t[a-2],t[a-2]=i,o+=3,a-=3;return t}for(a=o+(r-1)*e,s=0;s<l;s++)i=t[o],t[o]=t[a],t[a]=i,o+=e,a-=e;return t}));var Pf="throw";function Mf(r,t,e,n,i){var o;for(o=0;o<t;o++)e[i]=r[o],i+=n}function Cf(r,t,e,n,i,o,a){var u,f,l,s;for(u=(l=n+1)===t,f=e[n],s=0;s<f;s++)u?(i[a]=r[s],a+=o):a=Cf(r[s],t,e,l,i,o,a);return a}function Uf(r,t,e,n,i,o){var a=t.length;return 0===a?n:1===a?(Mf(r,t[0],n,i,o),n):e?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h;for(Cf(r,t,e,0,u=Hi(a=Rf(e)),1,0),s=kf(e,f="row-major"),Mf(e,t,l=Hi(t),1,0),Lf(t,l,1),Lf(t,s,1),h=0;h<a;h++)c=If(l,s,0,f,h,Pf),n[o]=u[c],o+=i}(r,a,t,n,i,o),n):(Cf(r,a,t,0,n,i,o),n)}function Nf(r,t,e){return Uf(r,t,e,Hi(Rf(t)),1,0)}U(Nf,"assign",Uf);var Df="throw";function Yf(r,t,e,n,i,o,a,u,f,l,s){var c,h,p,g,y;for(c=(g=i+1)===e,p=n[i],y=0;y<p;y++)(h=o.slice()).push(y),c?(a[f]=l.call(s,t[y],h,r),f+=u):f=Yf(r,t[y],e,n,g,h,a,u,f,l,s);return f}function zf(r,t,e,n,i,o,a,u){var f=t.length;return 0===f?n:1===f?(function(r,t,e,n,i,o,a){var u;for(u=0;u<t;u++)e[i]=o.call(a,r[u],[u],r),i+=n}(r,t[0],n,i,o,a,u),n):e?(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g;for(Yf(r,r,t,e,0,[],l=Hi(f=Rf(e)),1,0,a,u),h=kf(e,s="row-major"),Lf(t,c=Gi(e),1),Lf(t,h,1),g=0;g<f;g++)p=If(c,h,0,s,g,Df),n[o]=l[p],o+=i}(r,f,t,n,i,o,a,u),n):(Yf(r,r,f,t,0,[],n,i,o,a,u),n)}function Wf(r,t,e,n,i){return zf(r,t,e,Hi(Rf(t)),1,0,n,i)}function qf(r,t,e){var n,i,o,a,u,f;if(i=t[1],o=t[0],n=[],e){for(a=0;a<i;a++)for(u=0;u<o;u++)n.push(r[u][a]);return n}for(u=0;u<o;u++)for(f=r[u],a=0;a<i;a++)n.push(f[a]);return n}function Gf(r,t,e,n,i){var o,a,u,f,l,s;if(a=t[1],u=t[0],o=[],e){for(f=0;f<a;f++)for(l=0;l<u;l++)o.push(n.call(i,r[l][f],[l,f],r));return o}for(l=0;l<u;l++)for(s=r[l],f=0;f<a;f++)o.push(n.call(i,s[f],[l,f],r));return o}function $f(r,t,e){var n,i,o,a,u,f,l,s,c;if(i=t[2],o=t[1],a=t[0],n=[],e){for(u=0;u<i;u++)for(f=0;f<o;f++)for(l=0;l<a;l++)n.push(r[l][f][u]);return n}for(l=0;l<a;l++)for(c=r[l],f=0;f<o;f++)for(s=c[f],u=0;u<i;u++)n.push(s[u]);return n}function Hf(r,t,e,n,i){var o,a,u,f,l,s,c,h,p;if(a=t[2],u=t[1],f=t[0],o=[],e){for(l=0;l<a;l++)for(s=0;s<u;s++)for(c=0;c<f;c++)o.push(n.call(i,r[c][s][l],[c,s,l],r));return o}for(c=0;c<f;c++)for(p=r[c],s=0;s<u;s++)for(h=p[s],l=0;l<a;l++)o.push(n.call(i,h[l],[c,s,l],r));return o}function Jf(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(i=t[3],o=t[2],a=t[1],u=t[0],n=[],e){for(f=0;f<i;f++)for(l=0;l<o;l++)for(s=0;s<a;s++)for(c=0;c<u;c++)n.push(r[c][s][l][f]);return n}for(c=0;c<u;c++)for(g=r[c],s=0;s<a;s++)for(p=g[s],l=0;l<o;l++)for(h=p[l],f=0;f<i;f++)n.push(h[f]);return n}function Xf(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m;if(a=t[3],u=t[2],f=t[1],l=t[0],o=[],e){for(s=0;s<a;s++)for(c=0;c<u;c++)for(h=0;h<f;h++)for(p=0;p<l;p++)o.push(n.call(i,r[p][h][c][s],[p,h,c,s],r));return o}for(p=0;p<l;p++)for(m=r[p],h=0;h<f;h++)for(y=m[h],c=0;c<u;c++)for(g=y[c],s=0;s<a;s++)o.push(n.call(i,g[s],[p,h,c,s],r));return o}function Qf(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(i=t[4],o=t[3],a=t[2],u=t[1],f=t[0],n=[],e){for(l=0;l<i;l++)for(s=0;s<o;s++)for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)n.push(r[p][h][c][s][l]);return n}for(p=0;p<f;p++)for(d=r[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)for(y=m[c],s=0;s<o;s++)for(g=y[s],l=0;l<i;l++)n.push(g[l]);return n}function Zf(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v,w;if(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],o=[],e){for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)o.push(n.call(i,r[y][g][p][h][c],[y,g,p,h,c],r));return o}for(y=0;y<s;y++)for(w=r[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)for(d=v[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)o.push(n.call(i,m[c],[y,g,p,h,c],r));return o}function Kf(r){var t,e,n,i,o;for(t=[],i=0;i<r.length;i++){for(n=[],o=(e=r[i]).length-1;o>=0;o--)n.push(e[o]);t.push(n)}return t}function rl(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(Kf(r[e]));return t}function tl(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(rl(r[e]));return t}function el(r){var t,e;for(t=[],e=r.length-1;e>=0;e--)t.push(r[e]);return t}function nl(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(el(r[e]));return t}function il(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(nl(r[e]));return t}function ol(r,t,e){var n,i,o;if((i=mu((t-r)/e))<=1)return[r];for(n=[r],o=1;o<i;o++)n.push(r+e*o);return n}function al(r){return null==r}function ul(r,t,e){var n,i,o,a;if(0===e)return[];for(o=(t-r)/(i=e-1),n=[Na(10,r)],a=1;a<i;a++)n.push(Na(10,r+o*a));return n.push(Na(10,t)),n}function fl(r,t,e,n){var i,o,a,u,f,l,s;for(i=t[1],o=t[0],s=[],u=0;u<o;u++){for(f=r[u],l=[],a=0;a<i;a++)l.push(e.call(n,f[a],[u,a],r));s.push(l)}return s}function ll(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g;for(i=t[2],o=t[1],a=t[0],g=[],l=0;l<a;l++){for(h=r[l],p=[],f=0;f<o;f++){for(s=h[f],c=[],u=0;u<i;u++)c.push(e.call(n,s[u],[l,f,u],r));p.push(c)}g.push(p)}return g}function sl(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;for(i=t[3],o=t[2],a=t[1],u=t[0],v=[],c=0;c<u;c++){for(m=r[c],d=[],s=0;s<a;s++){for(g=m[s],y=[],l=0;l<o;l++){for(h=g[l],p=[],f=0;f<i;f++)p.push(e.call(n,h[f],[c,s,l,f],r));y.push(p)}d.push(y)}v.push(d)}return v}function cl(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;for(i=t[4],o=t[3],a=t[2],u=t[1],f=t[0],_=[],p=0;p<f;p++){for(b=r[p],E=[],h=0;h<u;h++){for(v=b[h],w=[],c=0;c<a;c++){for(m=v[c],d=[],s=0;s<o;s++){for(g=m[s],y=[],l=0;l<i;l++)y.push(e.call(n,g[l],[p,h,c,s,l],r));d.push(y)}w.push(d)}E.push(w)}_.push(E)}return _}function hl(r){return r<0?r>=lt?"int8":r>=Wr?"int16":r>=kr?"int32":"float64":r<=ft?"int8":r<=zr?"int16":r<=Rr?"int32":"float64"}function pl(r,t){var e,n,i,o;for(e=Wi(r),n=Wi(t),i=[],o=0;o<r.length;o++)n(t,o)&&i.push(e(r,o));return i}function gl(r,t,e,n){var i,o,a,u;if(u=e.length,"strict"===n){if(Qa(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of falsy values in the mask array.")}else if("broadcast"===n){if(1!==u&&Qa(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==u&&Qa(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of falsy values in the mask array.")}else if("non_strict"===n&&Qa(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=un(r),o=un(t),a=un(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?jn(i.dtype)&&jn(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u+=2)i(n,u/2)||(r[u]=e[o],r[u+1]=e[o+1],o=(o+2)%a)}(Ja(r,0),o,Ja(e,0)),r):Vn(i.dtype)&&Vn(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u++)i(n,u)||(r[u]=e[o],o=(u+1)%a)}(sn(r,0),o,sn(e,0)),r):(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],u=t.accessors[0],f=e.accessors[0],s=o.length,l=0,c=0;c<n.length;c++)u(i,c)||(a(n,c,f(o,l)),l=(l+1)%s)}(i,o,a),r):(function(r,t,e){var n,i,o;for(i=e.length,n=0,o=0;o<r.length;o++)t[o]||(r[o]=e[n],n=(n+1)%i)}(r,t,e),r)}function yl(r,t){var e,n,i,o;for(e=Wi(r),n=Wi(t),i=[],o=0;o<r.length;o++)n(t,o)||i.push(e(r,o));return i}function ml(r){var t;for(t=0;t<r.length;t++)if(r[t])return!1;return!0}function dl(r){var t,e;if(t=[],r<=0)return t;for(e=1;e<r+1;e++)t.push(e);return t}function vl(r,t,e,n){var i,o,a;for(o=2*e,a=2*n,i=1;a>=0&&a<t.length;)t[a]=i,t[a+1]=0,a+=o,i+=1;return r}function wl(r,t,e,n){var i,o,a,u;if(u=e.length,"strict"===n){if(tu(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of truthy values in the mask array.")}else if("broadcast"===n){if(1!==u&&tu(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==u&&tu(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of truthy values in the mask array.")}else if("non_strict"===n&&tu(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=un(r),o=un(t),a=un(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?jn(i.dtype)&&jn(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u+=2)i(n,u/2)&&(r[u]=e[o],r[u+1]=e[o+1],o=(o+2)%a)}(Ja(r,0),o,Ja(e,0)),r):Vn(i.dtype)&&Vn(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u++)i(n,u)&&(r[u]=e[o],o=(u+1)%a)}(sn(r,0),o,sn(e,0)),r):(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],u=t.accessors[0],f=e.accessors[0],s=o.length,l=0,c=0;c<n.length;c++)u(i,c)&&(a(n,c,f(o,l)),l=(l+1)%s)}(i,o,a),r):(function(r,t,e){var n,i,o;for(i=e.length,n=0,o=0;o<r.length;o++)t[o]&&(r[o]=e[n],n=(n+1)%i)}(r,t,e),r)}function bl(r,t){return r<0?0:r>t?t:r}function El(r,t){var e=t+1;return r<0?((r+=e)<0&&0!==(r%=e)&&(r+=e),r):r>t?((r-=e)>t&&(r%=e),r):r}function _l(r,t){return r<0?(r+=t+1)<0?-1:r:r>t?-1:r}function Tl(r){var t,e,n;if(!Bt(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=uf(r),wu(r)&&(t=Vu(n)),e=r.length,void 0===t?function(t){var n;for(n=0;n<e;n++)if(r[n]===t)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(t(r,i)===n)return!0;return!1}}U(Wf,"assign",zf),U(qf,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c;if(a=t[1],u=t[0],c=o,e){for(f=0;f<a;f++)for(l=0;l<u;l++)n[c]=r[l][f],c+=i;return n}for(l=0;l<u;l++)for(s=r[l],f=0;f<a;f++)n[c]=s[f],c+=i;return n})),U(Gf,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p;if(f=t[1],l=t[0],p=o,e){for(s=0;s<f;s++)for(c=0;c<l;c++)n[p]=a.call(u,r[c][s],[c,s],r),p+=i;return n}for(c=0;c<l;c++)for(h=r[c],s=0;s<f;s++)n[p]=a.call(u,h[s],[c,s],r),p+=i;return n})),U($f,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g;if(a=t[2],u=t[1],f=t[0],g=o,e){for(l=0;l<a;l++)for(s=0;s<u;s++)for(c=0;c<f;c++)n[g]=r[c][s][l],g+=i;return n}for(c=0;c<f;c++)for(p=r[c],s=0;s<u;s++)for(h=p[s],l=0;l<a;l++)n[g]=h[l],g+=i;return n})),U(Hf,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m;if(f=t[2],l=t[1],s=t[0],m=o,e){for(c=0;c<f;c++)for(h=0;h<l;h++)for(p=0;p<s;p++)n[m]=a.call(u,r[p][h][c],[p,h,c],r),m+=i;return n}for(p=0;p<s;p++)for(y=r[p],h=0;h<l;h++)for(g=y[h],c=0;c<f;c++)n[m]=a.call(u,g[c],[p,h,c],r),m+=i;return n})),U(Jf,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d;if(a=t[3],u=t[2],f=t[1],l=t[0],d=o,e){for(s=0;s<a;s++)for(c=0;c<u;c++)for(h=0;h<f;h++)for(p=0;p<l;p++)n[d]=r[p][h][c][s],d+=i;return n}for(p=0;p<l;p++)for(m=r[p],h=0;h<f;h++)for(y=m[h],c=0;c<u;c++)for(g=y[c],s=0;s<a;s++)n[d]=g[s],d+=i;return n})),U(Xf,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m,d,v,w;if(f=t[3],l=t[2],s=t[1],c=t[0],w=o,e){for(h=0;h<f;h++)for(p=0;p<l;p++)for(g=0;g<s;g++)for(y=0;y<c;y++)n[w]=a.call(u,r[y][g][p][h],[y,g,p,h],r),w+=i;return n}for(y=0;y<c;y++)for(v=r[y],g=0;g<s;g++)for(d=v[g],p=0;p<l;p++)for(m=d[p],h=0;h<f;h++)n[w]=a.call(u,m[h],[y,g,p,h],r),w+=i;return n})),U(Qf,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d,v,w,b;if(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],b=o,e){for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)n[b]=r[y][g][p][h][c],b+=i;return n}for(y=0;y<s;y++)for(w=r[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)for(d=v[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)n[b]=m[c],b+=i;return n})),U(Zf,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(f=t[4],l=t[3],s=t[2],c=t[1],h=t[0],_=o,e){for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)for(m=0;m<c;m++)for(d=0;d<h;d++)n[_]=a.call(u,r[d][m][y][g][p],[d,m,y,g,p],r),_+=i;return n}for(d=0;d<h;d++)for(E=r[d],m=0;m<c;m++)for(b=E[m],y=0;y<s;y++)for(w=b[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)n[_]=a.call(u,v[p],[d,m,y,g,p],r),_+=i;return n})),U(fl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s;if(o=e[1],a=e[0],o<=0||a<=0)return t;for(f=0;f<a;f++)for(l=r[f],s=t[f],u=0;u<o;u++)s[u]=n.call(i,l[u],[f,u],r);return t})),U(ll,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g;if(o=e[2],a=e[1],u=e[0],o<=0||a<=0||u<=0)return t;for(s=0;s<u;s++)for(p=r[s],g=t[s],l=0;l<a;l++)for(c=p[l],h=g[l],f=0;f<o;f++)h[f]=n.call(i,c[f],[s,l,f],r);return t})),U(sl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(o=e[3],a=e[2],u=e[1],f=e[0],o<=0||a<=0||u<=0||f<=0)return t;for(h=0;h<f;h++)for(d=r[h],v=t[h],c=0;c<u;c++)for(y=d[c],m=v[c],s=0;s<a;s++)for(p=y[s],g=m[s],l=0;l<o;l++)g[l]=n.call(i,p[l],[h,c,s,l],r);return t})),U(cl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(o=e[4],a=e[3],u=e[2],f=e[1],l=e[0],o<=0||a<=0||u<=0||f<=0||l<=0)return t;for(g=0;g<l;g++)for(E=r[g],_=t[g],p=0;p<f;p++)for(w=E[p],b=_[p],h=0;h<u;h++)for(d=w[h],v=b[h],c=0;c<a;c++)for(y=d[c],m=v[c],s=0;s<o;s++)m[s]=n.call(i,y[s],[g,p,h,c,s],r);return t})),U(pl,"assign",(function(r,t,e,n,i){var o,a,u;return o=un(r),a=un(t),u=un(e),o.accessorProtocol||a.accessorProtocol||u.accessorProtocol?jn(o.dtype)&&jn(u.dtype)?(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=t.data,a=t.accessors[0],f=2*n,u=2*i,l=0;l<o.length;l++)a(o,l)&&(s=2*l,e[u]=r[s],e[u+1]=r[s+1],u+=f)}(Ja(r,0),a,Ja(e,0),n,i),e):Vn(o.dtype)&&Vn(u.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=t.data,a=t.accessors[0],u=i,f=0;f<o.length;f++)a(o,f)&&(e[u]=r[f],u+=n)}(sn(r,0),a,sn(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s,c,h;for(o=r.data,a=t.data,u=e.data,f=r.accessors[0],l=t.accessors[0],s=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)&&(s(u,c,f(o,h)),c+=n)}(o,a,u,n,i),e):(function(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)t[a]&&(e[o]=r[a],o+=n)}(r,t,e,n,i),e)})),U(yl,"assign",(function(r,t,e,n,i){var o,a,u;return o=un(r),a=un(t),u=un(e),o.accessorProtocol||a.accessorProtocol||u.accessorProtocol?jn(o.dtype)&&jn(u.dtype)?(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=t.data,a=t.accessors[0],f=2*n,u=2*i,l=0;l<o.length;l++)a(o,l)||(s=2*l,e[u]=r[s],e[u+1]=r[s+1],u+=f)}(Ja(r,0),a,Ja(e,0),n,i),e):Vn(o.dtype)&&Vn(u.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=t.data,a=t.accessors[0],u=i,f=0;f<o.length;f++)a(o,f)||(e[u]=r[f],u+=n)}(sn(r,0),a,sn(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s,c,h;for(o=r.data,a=t.data,u=e.data,f=r.accessors[0],l=t.accessors[0],s=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)||(s(u,c,f(o,h)),c+=n)}(o,a,u,n,i),e):(function(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)t[a]||(e[o]=r[a],o+=n)}(r,t,e,n,i),e)})),U(dl,"assign",(function(r,t,e){var n=un(r);return n.accessorProtocol?be(r)?vl(r,je(r,0),t,e):ve(r)?vl(r,Ae(r,0),t,e):function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[1],a=e,o=1;a>=0&&a<n.length;)i(n,a,o),a+=t,o+=1;return n}(n,t,e):function(r,t,e){var n,i;for(i=e,n=1;i>=0&&i<r.length;)r[i]=n,i+=t,n+=1;return r}(r,t,e)})),U((function(r,t){var e,n,i,o;for(i=uf(r),n=wu(r)?Vu(i):Eu(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}),"factory",Tl);var xl=["throw","normalize","clamp","wrap"];function Vl(){return xl.slice()}U(Vl,"enum",(function(){return{throw:1,clamp:2,wrap:3,normalize:4}}));var Al=Tl(Vl()),Sl={wrap:El,clamp:bl,normalize:function(r,t){var e=_l(r,t);if(e<0||e>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return e},throw:function(r,t){if(r<0||r>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return r}};function Fl(r){if(!Al(r))throw new TypeError(j("invalid argument. First argument must be a recognized index mode. Value: `%s`.",r));return Sl[r]}function jl(r,t,e,n){var i,o,a,u,f,l;if(t.length>0)if(e.length===t.length)o=1;else{if(1!==e.length)throw new Error(j("invalid argument. The third argument must be broadcast compatible with the second argument. Array shape: (%d). Desired shape: (%d).",e.length,t.length));o=0}return i=Fl(n),a=r.length-1,u=un(r),f=un(t),l=un(e),u.accessorProtocol||f.accessorProtocol||l.accessorProtocol?jn(u.dtype)&&jn(l.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c;for(a=t.data,u=t.accessors[0],l=2*n,f=0,s=0;s<a.length;s++)r[c=2*i(u(a,s),o)]=e[f],r[c+1]=e[f+1],f+=l}(Ja(r,0),f,Ja(e,0),o,i,a),r):Vn(u.dtype)&&Vn(l.dtype)?(function(r,t,e,n,i,o){var a,u,f,l;for(a=t.data,u=t.accessors[0],f=0,l=0;l<a.length;l++)r[i(u(a,l),o)]=e[f],f+=n}(sn(r,0),f,sn(e,0),o,i,a),r):(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p;for(a=r.data,u=t.data,f=e.data,l=r.accessors[1],s=t.accessors[0],c=e.accessors[0],h=0,p=0;p<u.length;p++)l(a,i(s(u,p),o),c(f,h)),h+=n}(u,f,l,o,i,a),r):(function(r,t,e,n,i,o){var a,u;for(a=0,u=0;u<t.length;u++)r[i(t[u],o)]=e[a],a+=n}(r,t,e,o,i,a),r)}function Rl(r){var t=tn(r);return D(r)?J(t):q(t)}U((function(r,t,e){var n;if("clamp"===e)return bl(r,t);if("wrap"===e)return El(r,t);if(n=r,"normalize"===e&&(n=_l(n,t)),n<0||n>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return n}),"factory",Fl);var kl=Array.prototype.slice;function Il(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"slice")?r.slice(t,e):(n=un(r)).accessorProtocol?function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[0],o=[],a=t;a<e;a++)o.push(i(n,a));return o}(n,t,e):function(r,t,e){return kl.call(r,t,e)}(r,t,e)}function Bl(r,t,e){var n,i,o,a,u,f,l;for(i=Wi(r),o=Wi(t),n=Fl(e),u=r.length-1,a=[],f=0;f<t.length;f++)l=n(o(t,f),u),a.push(i(r,l));return a}U(Bl,"assign",(function(r,t,e,n,i,o){var a,u,f;return a=un(r),u=un(t),f=un(n),a.accessorProtocol||u.accessorProtocol||f.accessorProtocol?jn(a.dtype)&&jn(f.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p;for(u=t.data,f=t.accessors[0],a=Fl(e),l=r.length/2-1,c=2*i,s=2*o,h=0;h<u.length;h++)p=2*a(f(u,h),l),n[s]=r[p],n[s+1]=r[p+1],s+=c}(Ja(r,0),u,e,Ja(n,0),i,o),n):Vn(a.dtype)&&Vn(f.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h;for(u=t.data,f=t.accessors[0],a=Fl(e),l=r.length-1,s=o,c=0;c<u.length;c++)h=a(f(u,c),l),n[s]=r[h],s+=i}(sn(r,0),u,e,sn(n,0),i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y;for(u=r.data,f=t.data,l=n.data,s=r.accessors[0],c=t.accessors[0],h=n.accessors[1],a=Fl(e),p=u.length-1,g=o,y=0;y<f.length;y++)h(l,g,s(u,a(c(f,y),p))),g+=i}(a,u,e,f,i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s;for(a=Fl(e),u=r.length-1,f=o,l=0;l<t.length;l++)s=a(t[l],u),n[f]=r[s],f+=i}(r,t,e,n,i,o),n)}));var Ol=2;function Ll(r,t,e,n){var i,o,a,u,f,l,s,c,h;if(-1===(a=_l(e,Ol-1)))throw new RangeError(j("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",Ol,e));if(u=Fl(n),o=[],0===a){for(i=r.length-1,s=0;s<t.length;s++)f=u(t[s],i),o.push(r[f]);return o}for(s=0;s<r.length;s++){for(h=[],i=(c=r[s]).length-1,l=0;l<t.length;l++)f=u(t[l],i),h.push(c[f]);o.push(h)}return o}function Pl(r,t,e,n,i,o){var a,u,f;if(a=n[i],(u=i+1)!==e)for(f=0;f<a;f++)Pl(r[f],t[f],e,n,u,o);else for(f=0;f<a;f++)t[f]=o(r[f])}function Ml(r){return 0===r&&1/r===vr}function Cl(r,t){if(1===r)return 0;if(r===t)return 1;throw new Error("invalid arguments. Input arguments are not broadcast compatible.")}function Ul(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m;if(0===(a=[r.length,t.length,e.length])[0])return[];for(g=function(r,t){var e,n,i,o;if(2===(e=arguments.length))return Nn(r)||Nn(t)?NaN:r===vr||t===vr?vr:r===t&&0===r?Ml(r)?r:t:r>t?r:t;for(n=bt,o=0;o<e;o++){if(Nn(i=arguments[o])||i===vr)return i;(i>n||i===n&&0===i&&Ml(i))&&(n=i)}return n}(a[0],a[1],a[2]),s=Cl(a[0],g),f=Cl(a[1],g),l=Cl(a[2],g),o=Wi(r),n=Wi(t),i=Wi(e),p=0,c=0,h=0,u=[],m=0;m<g;m++)y=o(r,p)?n(t,c):i(e,h),u.push(y),p+=s,c+=f,h+=l;return u}function Nl(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g;for(l=Cl(t.length,r),u=Cl(e.length,r),f=Cl(n.length,r),h=0,s=0,c=0,p=a,g=0;g<r;g++)i[p]=t[h]?e[s]:n[c],h+=l,s+=u,c+=f,p+=o;return i}function Dl(r,t,e,n,i,o){var a,u,f,l,s;return 0===r.length?n:(s=function(r,t,e){return mu(t<0?(e+1)/-t:(r-e)/t)}(n.length,i,o),a=un(r),Vn(a.dtype)&&(a=un(r=sn(r,0))),u=un(t),f=un(e),l=un(n),a.accessorProtocol||u.accessorProtocol||f.accessorProtocol||l.accessorProtocol?!1===a.accessorProtocol&&Vn(u.dtype)&&Vn(f.dtype)&&Vn(l.dtype)?(Nl(s,r,sn(t,0),sn(e,0),sn(n,0),i,o),n):jn(u.dtype)&&jn(f.dtype)&&jn(l.dtype)?(function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d;for(u=t.data,f=t.accessors[0],c=Cl(u.length,r),l=2*Cl(e.length/2,r),s=2*Cl(n.length/2,r),h=2*o,y=0,p=0,g=0,m=2*a,d=0;d<r;d++)f(u,y)?(i[m]=e[p],i[m+1]=e[p+1]):(i[m]=n[g],i[m+1]=n[g+1]),y+=c,p+=l,g+=s,m+=h}(s,a,Ja(t,0),Ja(e,0),Ja(n,0),i,o),n):(function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;for(l=t.data,u=e.data,f=n.data,s=i.data,p=t.accessors[0],c=e.accessors[0],h=n.accessors[0],g=i.accessors[1],d=Cl(l.length,r),y=Cl(u.length,r),m=Cl(f.length,r),b=0,v=0,w=0,E=a,_=0;_<r;_++)g(s,E,p(l,b)?c(u,v):h(f,w)),b+=d,v+=y,w+=m,E+=o}(s,a,u,f,l,i,o),n):(Nl(s,r,t,e,n,i,o),n))}function Yl(r,t,e){var n;if(function(r,t){return"function"==typeof r[t]}(r,"with"))return r.with(t,e);if((t=_l(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return Rl(n=Il(r,0,r.length))(n,t,e),n}function zl(r,t,e,n,i,o){var a,u;for(a=o,u=0;u<r.length;u++)n[a]=r[u],a+=i;return n[o+t*i]=e,n}function Wl(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}}}U(Ul,"assign",Dl),U(Yl,"assign",(function(r,t,e,n,i,o){var a,u;if((t=_l(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return a=un(r),u=un(n),a.accessorProtocol||u.accessorProtocol?jn(a.dtype)&&jn(u.dtype)&&ye(e)?(function(r,t,e,n,i,o){var a,u,f,l;for(a=2*i,u=2*o,f=0;f<r.length/2;f++)l=2*f,n[u]=r[l],n[u+1]=r[l+1],u+=a;n[u=2*(o+t*i)]=Me(e),n[u+1]=Ce(e)}(Ja(r,0),t,e,Ja(n,0),i,o),n):Vn(a.dtype)&&Vn(u.dtype)?(zl(sn(r,0),t,$t(e),sn(n,0),i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s,c;for(a=r.data,u=n.data,f=r.accessors[0],l=n.accessors[1],s=o,c=0;c<a.length;c++)l(u,s,f(a,c)),s+=i;l(u,o+t*i,e)}(a,t,e,u,i,o),n):(zl(r,t,e,n,i,o),n)}));var ql={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",boolean:"bool",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32"}},Gl={"dtypes.default":ql.dtypes.default,"dtypes.numeric":ql.dtypes.numeric,"dtypes.real":ql.dtypes.real,"dtypes.floating_point":ql.dtypes.floating_point,"dtypes.real_floating_point":ql.dtypes.real_floating_point,"dtypes.complex_floating_point":ql.dtypes.complex_floating_point,"dtypes.boolean":ql.dtypes.boolean,"dtypes.integer":ql.dtypes.integer,"dtypes.signed_integer":ql.dtypes.signed_integer,"dtypes.unsigned_integer":ql.dtypes.unsigned_integer};U(Wl,"get",(function(r){var t=Gl[r];return void 0===t?null:t}));var $l=Wl.get("dtypes.default");function Hl(r){var t,e;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(t=arguments.length>1?arguments[1]:$l))return Hi(r);if(null===(e=mf(t)))throw new TypeError(j("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}function Jl(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)a!==t&&(e[o]=r[a],o+=n);return e}function Xl(r,t,e,n,i){var o,a;if((t=_l(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return o=un(r),a=un(e),o.accessorProtocol||a.accessorProtocol?jn(o.dtype)&&jn(a.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=2*n,a=2*i,u=0;u<r.length/2;u++)u!==t&&(f=2*u,e[a]=r[f],e[a+1]=r[f+1],a+=o)}(Ja(r,0),t,Ja(e,0),n,i),e):Vn(o.dtype)&&Vn(a.dtype)?(Jl(sn(r,0),t,sn(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=r.data,a=e.data,u=r.accessors[0],f=e.accessors[1],l=i,s=0;s<o.length;s++)s!==t&&(f(a,l,u(o,s)),l+=n)}(o,t,a,n,i),e):(Jl(r,t,e,n,i),e)}function Ql(r,t){var e;if((t=_l(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return Xl(r,t,e=Hl(r.length-1,tn(r)||"generic"),1,0),e}function Zl(r){var t,e;if(t=[],r<=0)return t;for(e=0;e<r;e++)t.push(e);return t}function Kl(r,t,e,n){var i,o,a;for(o=2*e,a=2*n,i=0;a>=0&&a<t.length;)t[a]=i,t[a+1]=0,a+=o,i+=1;return r}U(Ql,"assign",Xl),U(Zl,"assign",(function(r,t,e){var n=un(r);return n.accessorProtocol?"complex128"===n.dtype?Kl(r,je(r,0),t,e):"complex64"===n.dtype?Kl(r,Ae(r,0),t,e):function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[1],a=e,o=0;a>=0&&a<n.length;)i(n,a,o),a+=t,o+=1;return n}(n,t,e):function(r,t,e){var n,i;for(i=e,n=0;i>=0&&i<r.length;)r[i]=n,i+=t,n+=1;return r}(r,t,e)}));var rs={};C(rs,"AccessorArray",nn),C(rs,"accessorGetter",$),C(rs,"accessorSetter",J),C(rs,"accessors",en),C(rs,"any",(function(r){var t=un(r);return t.accessorProtocol?be(r)?cn(je(r,0)):ve(r)?cn(Ae(r,0)):an(r)?cn(sn(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(e(t,n))return!0;return!1}(t):cn(r)})),C(rs,"anyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"some")?r.some(t,e):(n=un(r)).accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(t.call(e,i(n,o),o,n))return!0;return!1}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(t.call(e,r[n],n,r))return!0;return!1}(r,t,e)})),C(rs,"anyByRight",(function(r,t,e){var n=un(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(t.call(e,i(n,o),o,n))return!0;return!1}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(t.call(e,r[n],n,r))return!0;return!1}(r,t,e)})),C(rs,"arraylike2object",un),C(rs,"assert",zi),C(rs,"at",(function(r,t){if(function(r,t){return"function"==typeof r[t]}(r,"at"))return r.at(t);if(t<0){if((t+=r.length)<0)return}else if(t>=r.length)return;return Wi(r)(r,t)})),C(rs,"at2d",(function(r,t,e){var n,i;if(i=r.length,t<0&&(t+=i),!(t<0||t>=i||(i=(n=r[t]).length,e<0&&(e+=i),e<0||e>=i)))return n[e]})),C(rs,"at3d",(function(r,t,e,n){var i,o,a;if(a=r.length,t<0&&(t+=a),!(t<0||t>=a||(a=(i=r[t]).length,e<0&&(e+=a),e<0||e>=a||(a=(o=i[e]).length,n<0&&(n+=a),n<0||n>=a))))return o[n]})),C(rs,"at4d",(function(r,t,e,n,i){var o,a,u,f,l;for(a=[t,e,n,i],o=r,f=0;f<a.length;f++){if(l=a[f],u=o.length,l<0&&(l+=u),l<0||l>=u)return;o=o[l]}return o})),C(rs,"at5d",(function(r,t,e,n,i,o){var a,u,f,l,s;for(u=[t,e,n,i,o],a=r,l=0;l<u.length;l++){if(s=u[l],f=a.length,s<0&&(s+=f),s<0||s>=f)return;a=a[s]}return a})),C(rs,"atnd",(function(r,t){var e,n,i,o,a;for(n=[t],o=2;o<arguments.length;o++)n.push(arguments[o]);for(e=r,o=0;o<n.length;o++){if(a=n[o],i=e.length,a<0&&(a+=i),a<0||a>=i)return;e=e[a]}return e})),C(rs,"bifurcateEntries",(function(r,t){var e,n,i,o,a,u;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===i)return[];for(e=Wi(r),n=Wi(t),o=[[],[]],u=0;u<i;u++)a=e(r,u),n(t,u)?o[0].push([u,a]):o[1].push([u,a]);return o})),C(rs,"bifurcateEntriesBy",(function(r,t,e){var n,i,o,a,u;if(0===(i=r.length))return[];for(n=Wi(r),o=[[],[]],u=0;u<i;u++)a=n(r,u),t.call(e,a,u,r)?o[0].push([u,a]):o[1].push([u,a]);return o})),C(rs,"bifurcateIndices",(function(r,t){var e,n,i,o;if(n=r.length,t.length!==n)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===n)return[];for(e=Wi(t),i=[[],[]],o=0;o<n;o++)e(t,o)?i[0].push(o):i[1].push(o);return i})),C(rs,"bifurcateIndicesBy",(function(r,t,e){var n,i,o,a;if(0===(i=r.length))return[];for(n=Wi(r),o=[[],[]],a=0;a<i;a++)t.call(e,n(r,a),a,r)?o[0].push(a):o[1].push(a);return o})),C(rs,"bifurcateValues",(function(r,t){var e,n,i,o,a,u;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===i)return[];for(e=Wi(r),n=Wi(t),o=[[],[]],u=0;u<i;u++)a=e(r,u),n(t,u)?o[0].push(a):o[1].push(a);return o})),C(rs,"bifurcateValuesBy",(function(r,t,e){var n,i,o,a,u;if(0===(i=r.length))return[];for(n=Wi(r),o=[[],[]],u=0;u<i;u++)a=n(r,u),t.call(e,a,u,r)?o[0].push(a):o[1].push(a);return o})),C(rs,"binary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(s=r[0],c=r[1],h=r[2],a=0;a<i;a++)for(u=s[a],f=c[a],l=h[a],o=0;o<n;o++)l[o]=e(u[o],f[o])})),C(rs,"binary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(y=r[0],m=r[1],d=r[2],f=0;f<o;f++)for(s=y[f],h=m[f],g=d[f],u=0;u<i;u++)for(l=s[u],c=h[u],p=g[u],a=0;a<n;a++)p[a]=e(l[a],c[a])})),C(rs,"binary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(b=r[0],E=r[1],_=r[2],s=0;s<a;s++)for(p=b[s],m=E[s],w=_[s],l=0;l<o;l++)for(h=p[l],y=m[l],v=w[l],f=0;f<i;f++)for(c=h[f],g=y[f],d=v[f],u=0;u<n;u++)d[u]=e(c[u],g[u])})),C(rs,"binary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(V=r[0],A=r[1],S=r[2],h=0;h<u;h++)for(m=V[h],b=A[h],x=S[h],c=0;c<a;c++)for(y=m[c],w=b[c],T=x[c],s=0;s<o;s++)for(g=y[s],v=w[s],_=T[s],l=0;l<i;l++)for(p=g[l],d=v[l],E=_[l],f=0;f<n;f++)E[f]=e(p[f],d[f])})),C(rs,"binarynd",(function(r,t,e){return qi(r[0],r[1],r[2],t.length,t,0,e)})),C(rs,"broadcastArray",Ji),C(rs,"bbinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(u=(v=t[2])[1],f=v[0],!(u<=0||f<=0))for(E=(b=Ji(r[0],t[0],v)).data,n=(w=b.strides)[1],i=w[0],_=(b=Ji(r[1],t[1],v)).data,o=(w=b.strides)[1],a=w[0],T=r[2],h=0,g=0,s=0;s<f;s++){for(c=0,p=0,y=E[h],m=_[g],d=T[s],l=0;l<u;l++)d[l]=e(y[c],m[p]),c+=n,p+=o;h+=i,g+=a}})),C(rs,"bbinary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I;if(l=(S=t[2])[2],s=S[1],c=S[0],!(l<=0||s<=0||c<=0))for(R=(j=Ji(r[0],t[0],S)).data,n=(F=j.strides)[2],i=F[1],o=F[0],k=(j=Ji(r[1],t[1],S)).data,a=(F=j.strides)[2],u=F[1],f=F[0],I=r[2],d=0,b=0,g=0;g<c;g++){for(m=0,w=0,_=R[d],x=k[b],A=I[g],p=0;p<s;p++){for(y=0,v=0,E=_[m],T=x[w],V=A[p],h=0;h<l;h++)V[h]=e(E[y],T[v]),y+=n,v+=a;m+=i,w+=u}d+=o,b+=f}})),C(rs,"bbinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L,P,M,C,U,N,D;if(c=(P=t[2])[3],h=P[2],p=P[1],g=P[0],!(c<=0||h<=0||p<=0||g<=0))for(U=(C=Ji(r[0],t[0],P)).data,n=(M=C.strides)[3],i=M[2],o=M[1],a=M[0],N=(C=Ji(r[1],t[1],P)).data,u=(M=C.strides)[3],f=M[2],l=M[1],s=M[0],D=r[2],_=0,A=0,v=0;v<g;v++){for(E=0,V=0,j=U[_],I=N[A],L=D[v],d=0;d<p;d++){for(b=0,x=0,F=j[E],k=I[V],O=L[d],m=0;m<h;m++){for(w=0,T=0,S=F[b],R=k[x],B=O[m],y=0;y<c;y++)B[y]=e(S[w],R[T]),w+=n,T+=u;b+=i,x+=f}E+=o,V+=l}_+=a,A+=s}})),C(rs,"bbinary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L,P,M,C,U,N,D,Y,z,W,q,G,$,H,J,X;if(p=(q=t[2])[4],g=q[3],y=q[2],m=q[1],d=q[0],!(p<=0||g<=0||y<=0||m<=0||d<=0))for(H=($=Ji(r[0],t[0],q)).data,n=(G=$.strides)[4],i=G[3],o=G[2],a=G[1],u=G[0],J=($=Ji(r[1],t[1],q)).data,f=(G=$.strides)[4],l=G[3],s=G[2],c=G[1],h=G[0],X=r[2],S=0,I=0,_=0;_<d;_++){for(A=0,k=0,P=H[S],N=J[I],W=X[_],E=0;E<m;E++){for(V=0,R=0,L=P[A],U=N[k],z=W[E],b=0;b<y;b++){for(x=0,j=0,O=L[V],C=U[R],Y=z[b],w=0;w<g;w++){for(T=0,F=0,B=O[x],M=C[j],D=Y[w],v=0;v<p;v++)D[v]=e(B[T],M[F]),T+=n,F+=f;x+=i,j+=l}V+=o,R+=s}A+=a,k+=c}S+=u,I+=h}})),C(rs,"bquaternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L;if(c=(F=t[4])[1],h=F[0],!(c<=0||h<=0))for(k=(R=Ji(r[0],t[0],F)).data,n=(j=R.strides)[1],i=j[0],I=(R=Ji(r[1],t[1],F)).data,o=(j=R.strides)[1],a=j[0],B=(R=Ji(r[2],t[2],F)).data,u=(j=R.strides)[1],f=j[0],O=(R=Ji(r[3],t[3],F)).data,l=(j=R.strides)[1],s=j[0],L=r[4],m=0,v=0,b=0,_=0,g=0;g<h;g++){for(y=0,d=0,w=0,E=0,T=k[m],x=I[v],V=B[b],A=O[_],S=L[g],p=0;p<c;p++)S[p]=e(T[y],x[d],V[w],A[E]),y+=n,d+=o,w+=u,E+=l;m+=i,v+=a,b+=f,_+=s}})),C(rs,"bquinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L,P,M,C,U,N,D;if(p=(B=t[5])[1],g=B[0],!(p<=0||g<=0))for(P=(L=Ji(r[0],t[0],B)).data,n=(O=L.strides)[1],i=O[0],M=(L=Ji(r[1],t[1],B)).data,o=(O=L.strides)[1],a=O[0],C=(L=Ji(r[2],t[2],B)).data,u=(O=L.strides)[1],f=O[0],U=(L=Ji(r[3],t[3],B)).data,l=(O=L.strides)[1],s=O[0],N=(L=Ji(r[4],t[4],B)).data,c=(O=L.strides)[1],h=O[0],D=r[5],v=0,b=0,_=0,x=0,A=0,m=0;m<g;m++){for(d=0,w=0,E=0,T=0,V=0,S=P[v],F=M[b],j=C[_],R=U[x],k=N[A],I=D[m],y=0;y<p;y++)I[y]=e(S[d],F[w],j[E],R[T],k[V]),d+=n,w+=o,E+=u,T+=l,V+=c;v+=i,b+=a,_+=f,x+=s,A+=h}})),C(rs,"bternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j;if(l=(T=t[3])[1],s=T[0],!(l<=0||s<=0))for(A=(V=Ji(r[0],t[0],T)).data,n=(x=V.strides)[1],i=x[0],S=(V=Ji(r[1],t[1],T)).data,o=(x=V.strides)[1],a=x[0],F=(V=Ji(r[2],t[2],T)).data,u=(x=V.strides)[1],f=x[0],j=r[3],g=0,m=0,v=0,h=0;h<s;h++){for(p=0,y=0,d=0,w=A[g],b=S[m],E=F[v],_=j[h],c=0;c<l;c++)_[c]=e(w[p],b[y],E[d]),p+=n,y+=o,d+=u;g+=i,m+=a,v+=f}})),C(rs,"bunary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(o=(p=t[1])[1],a=p[0],!(o<=0||a<=0))for(m=(y=Ji(r[0],t[0],p)).data,n=(g=y.strides)[1],i=g[0],d=r[1],s=0,f=0;f<a;f++){for(l=0,c=m[s],h=d[f],u=0;u<o;u++)h[u]=e(c[l]),l+=n;s+=i}})),C(rs,"bunary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(a=(w=t[1])[2],u=w[1],f=w[0],!(a<=0||u<=0||f<=0))for(_=(E=Ji(r[0],t[0],w)).data,n=(b=E.strides)[2],i=b[1],o=b[0],T=r[1],g=0,c=0;c<f;c++){for(p=0,m=_[g],v=T[c],s=0;s<u;s++){for(h=0,y=m[p],d=v[s],l=0;l<a;l++)d[l]=e(y[h]),h+=n;p+=i}g+=o}})),C(rs,"bunary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j;if(u=(V=t[1])[3],f=V[2],l=V[1],s=V[0],!(u<=0||f<=0||l<=0||s<=0))for(F=(S=Ji(r[0],t[0],V)).data,n=(A=S.strides)[3],i=A[2],o=A[1],a=A[0],j=r[1],v=0,g=0;g<s;g++){for(d=0,E=F[v],x=j[g],p=0;p<l;p++){for(m=0,b=E[d],T=x[p],h=0;h<f;h++){for(y=0,w=b[m],_=T[h],c=0;c<u;c++)_[c]=e(w[y]),y+=n;m+=i}d+=o}v+=a}})),C(rs,"bunary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L;if(f=(k=t[1])[4],l=k[3],s=k[2],c=k[1],h=k[0],!(f<=0||l<=0||s<=0||c<=0||h<=0))for(O=(B=Ji(r[0],t[0],k)).data,n=(I=B.strides)[4],i=I[3],o=I[2],a=I[1],u=I[0],L=r[1],_=0,d=0;d<h;d++){for(E=0,A=O[_],R=L[d],m=0;m<c;m++){for(b=0,V=A[E],j=R[m],y=0;y<s;y++){for(w=0,x=V[b],F=j[y],g=0;g<l;g++){for(v=0,T=x[w],S=F[g],p=0;p<f;p++)S[p]=e(T[v]),v+=n;w+=i}b+=o}E+=a}_+=u}})),C(rs,"cartesianPower",Da),C(rs,"cartesianProduct",Ya),C(rs,"cartesianSquare",za),C(rs,"copy",Wa),C(rs,"copyIndexed",Gi),C(rs,"countFalsy",Qa),C(rs,"countIf",(function(r,t,e){return D(r)?function(r,t,e){var n,i,o;for(n=Wi(r),i=0,o=0;o<r.length;o++)t.call(e,n(r,o),o,r)&&(i+=1);return i}(r,t,e):function(r,t,e){var n,i;for(n=0,i=0;i<r.length;i++)t.call(e,r[i],i,r)&&(n+=1);return n}(r,t,e)})),C(rs,"countSameValue",(function(r,t){return D(r)?In(r)?function(r,t){var e,n,i,o,a;if(!ye(t))return 0;for(n=Me(t),i=Ce(t),e=Ja(r,0),o=0,a=0;a<e.length;a+=2)vn(e[a],n)&&vn(e[a+1],i)&&(o+=1);return o}(r,t):an(r)?function(r,t){var e,n,i,o;if(!Gt(t))return 0;for(e=sn(r,0),i=t?1:0,n=0,o=0;o<e.length;o++)e[o]===i&&(n+=1);return n}(r,t):function(r,t){var e,n,i;for(e=Wi(r),n=0,i=0;i<r.length;i++)vn(e(r,i),t)&&(n+=1);return n}(r,t):function(r,t){var e,n;for(e=0,n=0;n<r.length;n++)vn(r[n],t)&&(e+=1);return e}(r,t)})),C(rs,"countSameValueZero",(function(r,t){return D(r)?In(r)?function(r,t){var e,n,i,o,a;if(!ye(t))return 0;for(n=Me(t),i=Ce(t),e=Ja(r,0),o=0,a=0;a<e.length;a+=2)Ka(e[a],n)&&Ka(e[a+1],i)&&(o+=1);return o}(r,t):an(r)?function(r,t){var e,n,i,o;if(!Gt(t))return 0;for(e=sn(r,0),i=t?1:0,n=0,o=0;o<e.length;o++)e[o]===i&&(n+=1);return n}(r,t):function(r,t){var e,n,i;for(e=Wi(r),n=0,i=0;i<r.length;i++)Ka(e(r,i),t)&&(n+=1);return n}(r,t):function(r,t){var e,n;for(e=0,n=0;n<r.length;n++)Ka(r[n],t)&&(e+=1);return e}(r,t)})),C(rs,"countTruthy",tu),C(rs,"cuany",iu),C(rs,"cuevery",uu),C(rs,"cunone",su),C(rs,"dedupe",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,u,f;if(0===(i=r.length))return r;for(a=!1,Nn(n=r[0])&&(a=!0),e=1,o=1,f=1;f<i;f++)(u=r[f])===n||a&&Nn(u)?(e+=1)<=t&&(r[o]=n,o+=1):(n=u,e=1,r[o]=n,o+=1,a=!1,Nn(n)&&(a=!0));return r.length=o,r}(r,t):function(r,t){var e,n,i,o,a,u;if(0===(i=r.length))return r;for(n=r[0],e=1,o=1,u=1;u<i;u++)(a=r[u])===n?(e+=1)<=t&&(r[o]=n,o+=1):(n=a,e=1,r[o]=n,o+=1);return r.length=o,r}(r,t)})),C(rs,"every",(function(r){var t=un(r);return t.accessorProtocol?be(r)?hu(je(r,0)):ve(r)?hu(Ae(r,0)):an(r)?cu(sn(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(!e(t,n))return!1;return!0}(t):cu(r)})),C(rs,"everyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"every")?r.every(t,e):(n=un(r)).accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(!t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(!t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(rs,"everyByRight",(function(r,t,e){var n=un(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(!t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(!t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(rs,"fancySlice",gf),C(rs,"fancySliceAssign",Ef),C(rs,"filled",$i),C(rs,"filledBy",_f),C(rs,"filled2d",Tf),C(rs,"filled2dBy",(function(r,t,e){var n,i,o,a,u,f;for(o=r[1],a=r[0],n=[],u=0;u<a;u++){for(i=[],f=0;f<o;f++)i.push(t.call(e,[u,f]));n.push(i)}return n})),C(rs,"filled3d",xf),C(rs,"filled3dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(a=r[2],u=r[1],f=r[0],n=[],c=0;c<f;c++){for(o=[],s=0;s<u;s++){for(i=[],l=0;l<a;l++)i.push(t.call(e,[c,s,l]));o.push(i)}n.push(o)}return n})),C(rs,"filled4d",Vf),C(rs,"filled4dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;for(u=r[3],f=r[2],l=r[1],s=r[0],n=[],g=0;g<s;g++){for(a=[],p=0;p<l;p++){for(o=[],h=0;h<f;h++){for(i=[],c=0;c<u;c++)i.push(t.call(e,[g,p,h,c]));o.push(i)}a.push(o)}n.push(a)}return n})),C(rs,"filled5d",Af),C(rs,"filled5dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;for(f=r[4],l=r[3],s=r[2],c=r[1],h=r[0],n=[],d=0;d<h;d++){for(u=[],m=0;m<c;m++){for(a=[],y=0;y<s;y++){for(o=[],g=0;g<l;g++){for(i=[],p=0;p<f;p++)i.push(t.call(e,[d,m,y,g,p]));o.push(i)}a.push(o)}u.push(a)}n.push(u)}return n})),C(rs,"fillednd",Ff),C(rs,"filledndBy",(function(r,t,e){return jf(r.length,r,0,[],[],t,e)})),C(rs,"filter",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"filter")?r.filter(t,e):(n=un(r)).accessorProtocol?function(r,t,e){var n,i,o,a,u;for(n=r.data,i=r.accessors[0],o=[],u=0;u<n.length;u++)a=i(n,u),t.call(e,a,u,n)&&o.push(a);return o}(n,t,e):function(r,t,e){var n,i,o;for(n=[],o=0;o<r.length;o++)i=r[o],t.call(e,i,o,r)&&n.push(i);return n}(r,t,e)})),C(rs,"first",(function(r){if(0!==r.length)return Wi(r)(r,0)})),C(rs,"flatten",Nf),C(rs,"flattenBy",Wf),C(rs,"flatten2d",qf),C(rs,"flatten2dBy",Gf),C(rs,"flatten3d",$f),C(rs,"flatten3dBy",Hf),C(rs,"flatten4d",Jf),C(rs,"flatten4dBy",Xf),C(rs,"flatten5d",Qf),C(rs,"flatten5dBy",Zf),C(rs,"fliplr2d",Kf),C(rs,"fliplr3d",rl),C(rs,"fliplr4d",tl),C(rs,"fliplr5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(tl(r[e]));return t})),C(rs,"flipud2d",el),C(rs,"flipud3d",nl),C(rs,"flipud4d",il),C(rs,"flipud5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(il(r[e]));return t})),C(rs,"strided2array",(function(r,t,e,n){var i,o,a,u;for(o=Wi(t),a=n,i=[],u=0;u<r;u++)i.push(o(t,a)),a+=e;return i})),C(rs,"getter",z),C(rs,"groupEntries",(function(r,t){var e,n,i,o,a,u,f,l;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Wi(r),n=Wi(t),o={},l=0;l<i;l++)f=e(r,l),u=o[a=n(t,l).toString()],ir(u)?u.push([l,f]):o[a]=[[l,f]];return o})),C(rs,"groupEntriesBy",(function(r,t,e){var n,i,o,a,u,f,l;for(i=r.length,n=Wi(r),o={},l=0;l<i;l++)f=n(r,l),u=o[a=t.call(e,f,l,r)],ir(u)?u.push([l,f]):o[a]=[[l,f]];return o})),C(rs,"groupIndices",(function(r,t){var e,n,i,o,a,u;if(n=r.length,t.length!==n)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Wi(t),i={},u=0;u<n;u++)a=i[o=e(t,u).toString()],ir(a)?a.push(u):i[o]=[u];return i})),C(rs,"groupIndicesBy",(function(r,t,e){var n,i,o,a,u,f;for(i=r.length,n=Wi(r),o={},f=0;f<i;f++)u=o[a=t.call(e,n(r,f),f,r)],ir(u)?u.push(f):o[a]=[f];return o})),C(rs,"groupValues",(function(r,t){var e,n,i,o,a,u,f,l;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Wi(r),n=Wi(t),o={},l=0;l<i;l++)f=e(r,l),u=o[a=n(t,l).toString()],ir(u)?u.push(f):o[a]=[f];return o})),C(rs,"groupValuesBy",(function(r,t,e){var n,i,o,a,u,f,l;for(i=r.length,n=Wi(r),o={},l=0;l<i;l++)f=n(r,l),u=o[a=t.call(e,f,l,r)],ir(u)?u.push(f):o[a]=[f];return o})),C(rs,"incrspace",ol),C(rs,"indexOf",(function(r,t,e,n){var i;return function(r,t){return"function"==typeof r[t]}(r,"indexOf")&&!1===n?r.indexOf(t,e):(e<0&&(e+=r.length)<0&&(e=0),(i=un(r)).accessorProtocol?function(r,t,e,n){var i,o,a;if(i=r.data,o=r.accessors[0],n&&Nn(t)){for(a=e;a<i.length;a++)if(Nn(o(i,a)))return a;return-1}for(a=e;a<i.length;a++)if(t===o(i,a))return a;return-1}(i,t,e,n):function(r,t,e,n){var i;if(n&&Nn(t)){for(i=e;i<r.length;i++)if(Nn(r[i]))return i;return-1}for(i=e;i<r.length;i++)if(t===r[i])return i;return-1}(r,t,e,n))})),C(rs,"join",(function(r,t){var e;return function(r,t){return"function"==typeof r[t]}(r,"join")?r.join(t):(e=un(r)).accessorProtocol?function(r,t){var e,n,i,o,a,u;for(e=r.data,i=r.accessors[0],o=e.length-1,n="",u=0;u<=o;u++)al(a=i(e,u))||(n+=String(a)),u<o&&(n+=t);return n}(e,t):function(r,t){var e,n,i,o;for(n=r.length-1,e="",o=0;o<=n;o++)al(i=r[o])||(e+=String(i)),o<n&&(e+=t);return e}(r,t)})),C(rs,"last",(function(r){var t,e;if(t=Wi(r),!((e=r.length-1)<0))return t(r,e)})),C(rs,"lastIndexOf",(function(r,t,e,n){var i;if(function(r,t){return"function"==typeof r[t]}(r,"lastIndexOf")&&!1===n)return r.lastIndexOf(t,e);if(e<0){if((e+=r.length)<0)return-1}else e>r.length&&(e=r.length-1);return(i=un(r)).accessorProtocol?function(r,t,e,n){var i,o,a;if(i=r.data,o=r.accessors[0],n&&Nn(t)){for(a=e;a>=0;a--)if(Nn(o(i,a)))return a;return-1}for(a=e;a>=0;a--)if(t===o(i,a))return a;return-1}(i,t,e,n):function(r,t,e,n){var i;if(n&&Nn(t)){for(i=e;i>=0;i--)if(Nn(r[i]))return i;return-1}for(i=e;i>=0;i--)if(t===r[i])return i;return-1}(r,t,e,n)})),C(rs,"linspace",(function(r,t,e){var n,i,o,a;if(0===e)return[];for(o=(t-r)/(i=e-1),n=[r],a=1;a<i;a++)n.push(r+o*a);return n.push(t),n})),C(rs,"logspace",ul),C(rs,"map2d",fl),C(rs,"map3d",ll),C(rs,"map4d",sl),C(rs,"map5d",cl),C(rs,"minSignedIntegerDataType",hl),C(rs,"minUnsignedIntegerDataType",(function(r){return r<=Qr?"uint8":r<=Mr?"uint16":r<=xr?"uint32":"float64"})),C(rs,"mskbinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],p=r[3],g=r[2],a=0;a<i;a++)for(u=c[a],f=h[a],l=p[a],s=g[a],o=0;o<n;o++)0===s[o]&&(l[o]=e(u[o],f[o]))})),C(rs,"mskfilter",pl),C(rs,"mskput",gl),C(rs,"mskreject",yl),C(rs,"mskunary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(s=r[0],c=r[2],h=r[1],a=0;a<i;a++)for(u=s[a],f=c[a],l=h[a],o=0;o<n;o++)0===l[o]&&(f[o]=e(u[o]))})),C(rs,"mskunary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(y=r[0],m=r[2],d=r[1],f=0;f<o;f++)for(s=y[f],h=m[f],g=d[f],u=0;u<i;u++)for(l=s[u],c=h[u],p=g[u],a=0;a<n;a++)0===p[a]&&(c[a]=e(l[a]))})),C(rs,"nCartesianProduct",(function(r,t){var e,n,i,o,a,u,f,l,s,c,h,p;for(e=arguments.length,i=[r,t],f=[0,0],l=(n=[r.length,t.length])[0]*n[1],c=2;c<e;c++)u=arguments[c],i.push(u),n.push(u.length),f.push(0),l*=n[c];for(o=[],c=0;c<l;c++){for(p=c,h=e-1;h>=0;h--)p-=s=p%n[h],p/=n[h],f[h]=s;for(a=[],h=0;h<e;h++)a.push(i[h][f[h]]);o.push(a)}return o})),C(rs,"none",(function(r){var t=un(r);return t.accessorProtocol?be(r)?ml(je(r,0)):ve(r)?ml(Ae(r,0)):an(r)?ml(sn(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(e(t,n))return!1;return!0}(t):ml(r)})),C(rs,"noneBy",(function(r,t,e){var n=un(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(rs,"noneByRight",(function(r,t,e){var n=un(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(rs,"nulls",(function(r){return $i(null,r)})),C(rs,"oneTo",dl),C(rs,"ones",(function(r){return $i(1,r)})),C(rs,"ones2d",(function(r){return Tf(1,r)})),C(rs,"ones3d",(function(r){return xf(1,r)})),C(rs,"ones4d",(function(r){return Vf(1,r)})),C(rs,"ones5d",(function(r){return Af(1,r)})),C(rs,"onesnd",(function(r){return Ff(1,r)})),C(rs,"place",wl),C(rs,"put",jl),C(rs,"quaternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m;if(n=t[1],i=t[0],!(n<=0||i<=0))for(h=r[0],p=r[1],g=r[2],y=r[3],m=r[4],a=0;a<i;a++)for(u=h[a],f=p[a],l=g[a],s=y[a],c=m[a],o=0;o<n;o++)c[o]=e(u[o],f[o],l[o],s[o])})),C(rs,"quaternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(w=r[0],b=r[1],E=r[2],_=r[3],T=r[4],f=0;f<o;f++)for(g=w[f],y=b[f],m=E[f],d=_[f],v=T[f],u=0;u<i;u++)for(l=g[u],s=y[u],c=m[u],h=d[u],p=v[u],a=0;a<n;a++)p[a]=e(l[a],s[a],c[a],h[a])})),C(rs,"quaternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(A=r[0],S=r[1],F=r[2],j=r[3],R=r[4],s=0;s<a;s++)for(E=A[s],_=S[s],T=F[s],x=j[s],V=R[s],l=0;l<o;l++)for(m=E[l],d=_[l],v=T[l],w=x[l],b=V[l],f=0;f<i;f++)for(c=m[f],h=d[f],p=v[f],g=w[f],y=b[f],u=0;u<n;u++)y[u]=e(c[u],h[u],p[u],g[u])})),C(rs,"quaternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L,P,M;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(B=r[0],O=r[1],L=r[2],P=r[3],M=r[4],h=0;h<u;h++)for(F=B[h],j=O[h],R=L[h],k=P[h],I=M[h],c=0;c<a;c++)for(T=F[c],x=j[c],V=R[c],A=k[c],S=I[c],s=0;s<o;s++)for(v=T[s],w=x[s],b=V[s],E=A[s],_=S[s],l=0;l<i;l++)for(p=v[l],g=w[l],y=b[l],m=E[l],d=_[l],f=0;f<n;f++)d[f]=e(p[f],g[f],y[f],m[f])})),C(rs,"quinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(n=t[1],i=t[0],!(n<=0||i<=0))for(p=r[0],g=r[1],y=r[2],m=r[3],d=r[4],v=r[5],a=0;a<i;a++)for(u=p[a],f=g[a],l=y[a],s=m[a],c=d[a],h=v[a],o=0;o<n;o++)h[o]=e(u[o],f[o],l[o],s[o],c[o])})),C(rs,"quinary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(E=r[0],_=r[1],T=r[2],x=r[3],V=r[4],A=r[5],f=0;f<o;f++)for(y=E[f],m=_[f],d=T[f],v=x[f],w=V[f],b=A[f],u=0;u<i;u++)for(l=y[u],s=m[u],c=d[u],h=v[u],p=w[u],g=b[u],a=0;a<n;a++)g[a]=e(l[a],s[a],c[a],h[a],p[a])})),C(rs,"quinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(j=r[0],R=r[1],k=r[2],I=r[3],B=r[4],O=r[5],s=0;s<a;s++)for(T=j[s],x=R[s],V=k[s],A=I[s],S=B[s],F=O[s],l=0;l<o;l++)for(d=T[l],v=x[l],w=V[l],b=A[l],E=S[l],_=F[l],f=0;f<i;f++)for(c=d[f],h=v[f],p=w[f],g=b[f],y=E[f],m=_[f],u=0;u<n;u++)m[u]=e(c[u],h[u],p[u],g[u],y[u])})),C(rs,"quinary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I,B,O,L,P,M,C,U,N,D,Y;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(M=r[0],C=r[1],U=r[2],N=r[3],D=r[4],Y=r[5],h=0;h<u;h++)for(k=M[h],I=C[h],B=U[h],O=N[h],L=D[h],P=Y[h],c=0;c<a;c++)for(V=k[c],A=I[c],S=B[c],F=O[c],j=L[c],R=P[c],s=0;s<o;s++)for(w=V[s],b=A[s],E=S[s],_=F[s],T=j[s],x=R[s],l=0;l<i;l++)for(p=w[l],g=b[l],y=E[l],m=_[l],d=T[l],v=x[l],f=0;f<n;f++)v[f]=e(p[f],g[f],y[f],m[f],d[f])})),C(rs,"reject",(function(r,t,e){var n=un(r);return n.accessorProtocol?function(r,t,e){var n,i,o,a,u;for(n=r.data,i=r.accessors[0],o=[],u=0;u<n.length;u++)a=i(n,u),t.call(e,a,u,n)||o.push(a);return o}(n,t,e):function(r,t,e){var n,i,o;for(n=[],o=0;o<r.length;o++)i=r[o],t.call(e,i,o,r)||n.push(i);return n}(r,t,e)})),C(rs,"removeAt",(function(r,t){var e,n,i;if(e=r.length,t<0){if((t+=e)<0)return r}else if(t>=e)return r;for(i=t,n=t+1;n<e;n++)r[i]=r[n],i+=1;return r.length=i,r})),C(rs,"resolveGetter",Wi),C(rs,"resolveSetter",Rl),C(rs,"reverse",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"reverse")?r.reverse():(t=un(r)).accessorProtocol?function(r){var t,e,n,i,o,a,u,f;for(t=r.data,e=r.accessors[0],n=r.accessors[1],o=Et(t.length/2),a=t.length-1,u=0;u<o;u++)f=a-u,i=e(t,u),n(t,u,e(t,f)),n(t,f,i);return t}(t):function(r){var t,e,n,i,o;for(e=Et(r.length/2),n=r.length-1,i=0;i<e;i++)o=n-i,t=r[i],r[i]=r[o],r[o]=t;return r}(r)})),C(rs,"setter",q),C(rs,"slice",Il),C(rs,"strided2array2d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p;for(i=Wi(r),s=t[0],l=t[1],f=e[0],u=e[1],o=[],h=0;h<s;h++){for(a=[],p=n+f*h,c=0;c<l;c++)a.push(i(r,p)),p+=u;o.push(a)}return o})),C(rs,"strided2array3d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;for(i=Wi(r),p=t[0],h=t[1],c=t[2],f=e[0],u=e[1],a=e[2],o=[],m=0;m<p;m++){for(d=[],l=n+f*m,y=0;y<h;y++){for(v=[],s=l+u*y,g=0;g<c;g++)v.push(i(r,s)),s+=a;d.push(v)}o.push(d)}return o})),C(rs,"strided2array4d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;for(i=Wi(r),m=t[0],y=t[1],g=t[2],p=t[3],l=e[0],f=e[1],u=e[2],a=e[3],o=[],b=0;b<m;b++){for(E=[],s=n+l*b,w=0;w<y;w++){for(_=[],c=s+f*w,v=0;v<g;v++){for(T=[],h=c+u*v,d=0;d<p;d++)T.push(i(r,h)),h+=a;_.push(T)}E.push(_)}o.push(E)}return o})),C(rs,"strided2array5d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F;for(i=Wi(r),w=t[0],v=t[1],d=t[2],m=t[3],y=t[4],s=e[0],l=e[1],f=e[2],u=e[3],a=e[4],o=[],x=0;x<w;x++){for(V=[],c=n+s*x,T=0;T<v;T++){for(A=[],h=c+l*T,_=0;_<d;_++){for(S=[],p=h+f*_,E=0;E<m;E++){for(F=[],g=p+u*E,b=0;b<y;b++)F.push(i(r,g)),g+=a;S.push(F)}A.push(S)}V.push(A)}o.push(V)}return o})),C(rs,"take",Bl),C(rs,"takeIndexed",(function(r,t){var e,n;for(e=[],n=0;n<t.length;n++)e.push(r[t[n]]);return e})),C(rs,"take2d",Ll),C(rs,"take3d",(function(r,t,e,n){var i,o,a,u,f,l;if(-1===(a=_l(e,2)))throw new RangeError(j("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",3,e));if(o=[],0===a){for(u=Fl(n),i=r.length-1,l=0;l<t.length;l++)f=u(t[l],i),o.push(r[f]);return o}for(a=e-1,l=0;l<r.length;l++)o.push(Ll(r[l],t,a,n));return o})),C(rs,"ternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],p=r[2],g=r[3],a=0;a<i;a++)for(u=c[a],f=h[a],l=p[a],s=g[a],o=0;o<n;o++)s[o]=e(u[o],f[o],l[o])})),C(rs,"ternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(d=r[0],v=r[1],w=r[2],b=r[3],f=0;f<o;f++)for(p=d[f],g=v[f],y=w[f],m=b[f],u=0;u<i;u++)for(l=p[u],s=g[u],c=y[u],h=m[u],a=0;a<n;a++)h[a]=e(l[a],s[a],c[a])})),C(rs,"ternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(T=r[0],x=r[1],V=r[2],A=r[3],s=0;s<a;s++)for(w=T[s],b=x[s],E=V[s],_=A[s],l=0;l<o;l++)for(y=w[l],m=b[l],d=E[l],v=_[l],f=0;f<i;f++)for(c=y[f],h=m[f],p=d[f],g=v[f],u=0;u<n;u++)g[u]=e(c[u],h[u],p[u])})),C(rs,"ternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,R,k,I;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0))for(j=r[0],R=r[1],k=r[2],I=r[3],h=0;h<u;h++)for(V=j[h],A=R[h],S=k[h],F=I[h],c=0;c<a;c++)for(E=V[c],_=A[c],T=S[c],x=F[c],s=0;s<o;s++)for(d=E[s],v=_[s],w=T[s],b=x[s],l=0;l<i;l++)for(p=d[l],g=v[l],y=w[l],m=b[l],f=0;f<n;f++)m[f]=e(p[f],g[f],y[f])})),C(rs,"toAccessorArray",(function(r){return r&&"object"==typeof r&&D(r)?r:new nn(r)})),C(rs,"toDeduped",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,u,f;if(o=[],0===(i=r.length))return o;for(a=!1,n=NaN,e=0,f=0;f<i;f++)(u=r[f])===n||a&&Nn(u)?(e+=1)<=t&&o.push(n):(n=u,e=1,o.push(n),a=!1,Nn(n)&&(a=!0));return o}(r,t):function(r,t){var e,n,i,o,a,u;if(o=[],0===(i=r.length))return o;for(n=NaN,e=0,u=0;u<i;u++)(a=r[u])===n?(e+=1)<=t&&o.push(n):(n=a,e=1,o.push(n));return o}(r,t)})),C(rs,"toReversed",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"toReversed")?r.toReversed():(t=un(r)).accessorProtocol?function(r){var t,e,n,i;for(t=r.data,e=r.accessors[0],n=[],i=t.length-1;i>=0;i--)n.push(e(t,i));return n}(t):function(r){var t,e;for(t=[],e=r.length-1;e>=0;e--)t.push(r[e]);return t}(r)})),C(rs,"unary2d",(function(r,t,e){var n,i,o,a,u,f,l,s;if(n=t[1],i=t[0],!(n<=0||i<=0))for(l=r[0],s=r[1],a=0;a<i;a++)for(u=l[a],f=s[a],o=0;o<n;o++)f[o]=e(u[o])})),C(rs,"unary2dBy",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p;if(o=t[1],a=t[0],!(o<=0||a<=0))for(arguments.length>4&&(i=arguments[4]),c=r[0],h=r[1],f=0;f<a;f++)for(l=c[f],s=h[f],u=0;u<o;u++)void 0!==(p=n.call(i,l[u],[f,u],[c,h]))&&(s[u]=e(p))})),C(rs,"unary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(p=r[0],g=r[1],f=0;f<o;f++)for(s=p[f],h=g[f],u=0;u<i;u++)for(l=s[u],c=h[u],a=0;a<n;a++)c[a]=e(l[a])})),C(rs,"unary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(d=r[0],v=r[1],s=0;s<a;s++)for(p=d[s],m=v[s],l=0;l<o;l++)for(h=p[l],y=m[l],f=0;f<i;f++)for(c=h[f],g=y[f],u=0;u<n;u++)g[u]=e(c[u])})),C(rs,"unary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(E=r[0],_=r[1],h=0;h<u;h++)for(m=E[h],b=_[h],c=0;c<a;c++)for(y=m[c],w=b[c],s=0;s<o;s++)for(g=y[s],v=w[s],l=0;l<i;l++)for(p=g[l],d=v[l],f=0;f<n;f++)d[f]=e(p[f])})),C(rs,"unarynd",(function(r,t,e){return Pl(r[0],r[1],t.length,t,0,e)})),C(rs,"unitspace",(function(r,t){var e,n,i;if((n=t-r)<=1)return[r];for(e=[r],i=1;i<n;i++)e.push(r+i);return e})),C(rs,"where",Ul),C(rs,"arrayWith",Yl),C(rs,"without",Ql),C(rs,"zeroTo",Zl),C(rs,"zeros",Hi),C(rs,"zeros2d",(function(r){return Tf(0,r)})),C(rs,"zeros3d",(function(r){return xf(0,r)})),C(rs,"zeros4d",(function(r){return Vf(0,r)})),C(rs,"zeros5d",(function(r){return Af(0,r)})),C(rs,"zerosnd",(function(r){return Ff(0,r)}));var ts="function"==typeof ArrayBuffer?ArrayBuffer:null;function es(){var r,t,e;if("function"!=typeof ts)return!1;try{(r=Lt(e=new ts(16))&&"function"==typeof ts.isView)&&((t=new Fe(e))[0]=-3.14,t[1]=NaN,r=r&&ts.isView(t)&&16===e.byteLength&&-3.14===t[0]&&t[1]!=t[1])}catch(t){r=!1}return r}var ns="function"==typeof ArrayBuffer?ArrayBuffer:void 0;var is=es()?ns:function(){throw new Error("not implemented")};function os(r,t){if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!St(t))throw new TypeError(j("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",t));return Da(r,t)}function as(r,t){if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));return Ya(r,t)}function us(r){if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));return za(r)}function fs(r,t){var e=tn(t);if(null===e)throw new TypeError(j("invalid argument. Second argument must have a recognized/supported data type. Type: `%s`. Value: `%s`.",e,t));return bf(r,e)}var ls="function"==typeof DataView;var ss="function"==typeof ArrayBuffer?ArrayBuffer:void 0;var cs=es()?ss:function(){throw new Error("not implemented")},hs="function"==typeof DataView?DataView:null;var ps,gs="function"==typeof DataView?DataView:void 0;ps=function(){var r,t,e,n;if("function"!=typeof hs)return!1;try{e=new cs(24),t=new hs(e,8),n=t,(r=(ls&&n instanceof DataView||"[object DataView]"===nr(n))&&"function"==typeof t.getFloat64&&"function"==typeof t.setFloat64)&&(t.setFloat64(0,-3.14),t.setFloat64(8,NaN),r=r&&t.buffer===e&&16===t.byteLength&&8===t.byteOffset&&-3.14===t.getFloat64(0)&&t.getFloat64(8)!=t.getFloat64(8))}catch(t){r=!1}return r}()?gs:function(){throw new Error("not implemented")};var ys=ps,ms=Math.round,ds=/^\d{10}$|^\d{13}$/,vs=["floor","ceil","round"];function ws(r,t){var e;if("string"===(e=typeof r)){if((r=Date.parse(r))!=r)throw new Error(j("invalid argument. Unable to parse %s date.",t.toLowerCase()));r=new Date(r)}if("number"===e){if(!ds.test(r))throw new Error(j("invalid argument. Numeric %s date must be either a Unix or JavaScript timestamp.",t.toLowerCase()));10===r.toString().length&&(r*=1e3),r=new Date(r)}if(!(r instanceof Date))throw new TypeError(j("invalid argument. %s date must either be a date string, Date object, Unix timestamp, or JavaScript timestamp.",t));return r}function bs(r,t,e,n){var i,o,a,u,f,l,s,c,h;if(o=100,a=!0,i={round:"floor"},r=ws(r,"Start"),t=ws(t,"Stop"),arguments.length>2){if(3===arguments.length?Pt(e)?i=e:(o=e,a=!1):(i=n,o=e),0===o)return[];if(!At(o)||o<0)throw new TypeError(j("invalid argument. Length must be a positive integer. Value: `%s`.",o));if(a){if(!Pt(i))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",i));if(rr(i,"round")){if(!Mt(i.round))throw new TypeError(j("invalid option. `%s` option must be a string. Option: `%s`.","round",i.round));if(-1===vs.indexOf(i.round))throw new Error(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"round",vs.join('", "'),i.round))}}}switch(i.round){case"round":l=ms;break;case"ceil":l=mu;break;default:l=Et}for(f=o-1,c=(t.getTime()-r.getTime())/f,s=r,(u=new Array(o))[0]=s,s=s.getTime(),h=1;h<f;h++)s+=c,u[h]=new Date(l(s));return u[f]=t,u}var Es=[],_s=[],Ts="undefined"!=typeof Uint8Array?Uint8Array:Array,xs=!1;function Vs(){xs=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)Es[t]=r[t],_s[r.charCodeAt(t)]=t;_s["-".charCodeAt(0)]=62,_s["_".charCodeAt(0)]=63}function As(r,t,e){for(var n,i,o=[],a=t;a<e;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],o.push(Es[(i=n)>>18&63]+Es[i>>12&63]+Es[i>>6&63]+Es[63&i]);return o.join("")}function Ss(r){var t;xs||Vs();for(var e=r.length,n=e%3,i="",o=[],a=16383,u=0,f=e-n;u<f;u+=a)o.push(As(r,u,u+a>f?f:u+a));return 1===n?(t=r[e-1],i+=Es[t>>2],i+=Es[t<<4&63],i+="=="):2===n&&(t=(r[e-2]<<8)+r[e-1],i+=Es[t>>10],i+=Es[t>>4&63],i+=Es[t<<2&63],i+="="),o.push(i),o.join("")}function Fs(r,t,e,n,i){var o,a,u=8*i-n-1,f=(1<<u)-1,l=f>>1,s=-7,c=e?i-1:0,h=e?-1:1,p=r[t+c];for(c+=h,o=p&(1<<-s)-1,p>>=-s,s+=u;s>0;o=256*o+r[t+c],c+=h,s-=8);for(a=o&(1<<-s)-1,o>>=-s,s+=n;s>0;a=256*a+r[t+c],c+=h,s-=8);if(0===o)o=1-l;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=l}return(p?-1:1)*a*Math.pow(2,o-n)}function js(r,t,e,n,i,o){var a,u,f,l=8*o-i-1,s=(1<<l)-1,c=s>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=s):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=s?(u=0,a=s):a+c>=1?(u=(t*f-1)*Math.pow(2,i),a+=c):(u=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;r[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<<i|u,l+=i;l>0;r[e+p]=255&a,p+=g,a/=256,l-=8);r[e+p-g]|=128*y}var Rs={}.toString,ks=Array.isArray||function(r){return"[object Array]"==Rs.call(r)};Ls.TYPED_ARRAY_SUPPORT=void 0===re.TYPED_ARRAY_SUPPORT||re.TYPED_ARRAY_SUPPORT;var Is=Bs();function Bs(){return Ls.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Os(r,t){if(Bs()<t)throw new RangeError("Invalid typed array length");return Ls.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t)).__proto__=Ls.prototype:(null===r&&(r=new Ls(t)),r.length=t),r}function Ls(r,t,e){if(!(Ls.TYPED_ARRAY_SUPPORT||this instanceof Ls))return new Ls(r,t,e);if("number"==typeof r){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Cs(this,r)}return Ps(this,r,t,e)}function Ps(r,t,e,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n);Ls.TYPED_ARRAY_SUPPORT?(r=t).__proto__=Ls.prototype:r=Us(r,t);return r}(r,t,e,n):"string"==typeof t?function(r,t,e){"string"==typeof e&&""!==e||(e="utf8");if(!Ls.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ys(t,e);r=Os(r,n);var i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(r,t,e):function(r,t){if(Ds(t)){var e=0|Ns(t.length);return 0===(r=Os(r,e)).length||t.copy(r,0,0,e),r}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?Os(r,0):Us(r,t);if("Buffer"===t.type&&ks(t.data))return Us(r,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(r,t)}function Ms(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 Cs(r,t){if(Ms(t),r=Os(r,t<0?0:0|Ns(t)),!Ls.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Us(r,t){var e=t.length<0?0:0|Ns(t.length);r=Os(r,e);for(var n=0;n<e;n+=1)r[n]=255&t[n];return r}function Ns(r){if(r>=Bs())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Bs().toString(16)+" bytes");return 0|r}function Ds(r){return!(null==r||!r._isBuffer)}function Ys(r,t){if(Ds(r))return r.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;"string"!=typeof r&&(r=""+r);var e=r.length;if(0===e)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return yc(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return mc(r).length;default:if(n)return yc(r).length;t=(""+t).toLowerCase(),n=!0}}function zs(r,t,e){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return ic(this,t,e);case"utf8":case"utf-8":return rc(this,t,e);case"ascii":return ec(this,t,e);case"latin1":case"binary":return nc(this,t,e);case"base64":return Ks(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oc(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function Ws(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function qs(r,t,e,n,i){if(0===r.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof t&&(t=Ls.from(t,n)),Ds(t))return 0===t.length?-1:Gs(r,t,e,n,i);if("number"==typeof t)return t&=255,Ls.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Gs(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Gs(r,t,e,n,i){var o,a=1,u=r.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(r.length<2||t.length<2)return-1;a=2,u/=2,f/=2,e/=2}function l(r,t){return 1===a?r[t]:r.readUInt16BE(t*a)}if(i){var s=-1;for(o=e;o<u;o++)if(l(r,o)===l(t,-1===s?0:o-s)){if(-1===s&&(s=o),o-s+1===f)return s*a}else-1!==s&&(o-=o-s),s=-1}else for(e+f>u&&(e=u-f),o=e;o>=0;o--){for(var c=!0,h=0;h<f;h++)if(l(r,o+h)!==l(t,h)){c=!1;break}if(c)return o}return-1}function $s(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;r[e+a]=u}return a}function Hs(r,t,e,n){return dc(yc(t,r.length-e),r,e,n)}function Js(r,t,e,n){return dc(function(r){for(var t=[],e=0;e<r.length;++e)t.push(255&r.charCodeAt(e));return t}(t),r,e,n)}function Xs(r,t,e,n){return Js(r,t,e,n)}function Qs(r,t,e,n){return dc(mc(t),r,e,n)}function Zs(r,t,e,n){return dc(function(r,t){for(var e,n,i,o=[],a=0;a<r.length&&!((t-=2)<0);++a)n=(e=r.charCodeAt(a))>>8,i=e%256,o.push(i),o.push(n);return o}(t,r.length-e),r,e,n)}function Ks(r,t,e){return 0===t&&e===r.length?Ss(r):Ss(r.slice(t,e))}function rc(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o,a,u,f,l=r[i],s=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c<=e)switch(c){case 1:l<128&&(s=l);break;case 2:128==(192&(o=r[i+1]))&&(f=(31&l)<<6|63&o)>127&&(s=f);break;case 3:o=r[i+1],a=r[i+2],128==(192&o)&&128==(192&a)&&(f=(15&l)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(s=f);break;case 4:o=r[i+1],a=r[i+2],u=r[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(f=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(s=f)}null===s?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=c}return function(r){var t=r.length;if(t<=tc)return String.fromCharCode.apply(String,r);var e="",n=0;for(;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=tc));return e}(n)}Ls.poolSize=8192,Ls._augment=function(r){return r.__proto__=Ls.prototype,r},Ls.from=function(r,t,e){return Ps(null,r,t,e)},Ls.TYPED_ARRAY_SUPPORT&&(Ls.prototype.__proto__=Uint8Array.prototype,Ls.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Ls[Symbol.species]),Ls.alloc=function(r,t,e){return function(r,t,e,n){return Ms(t),t<=0?Os(r,t):void 0!==e?"string"==typeof n?Os(r,t).fill(e,n):Os(r,t).fill(e):Os(r,t)}(null,r,t,e)},Ls.allocUnsafe=function(r){return Cs(null,r)},Ls.allocUnsafeSlow=function(r){return Cs(null,r)},Ls.isBuffer=vc,Ls.compare=function(r,t){if(!Ds(r)||!Ds(t))throw new TypeError("Arguments must be Buffers");if(r===t)return 0;for(var e=r.length,n=t.length,i=0,o=Math.min(e,n);i<o;++i)if(r[i]!==t[i]){e=r[i],n=t[i];break}return e<n?-1:n<e?1:0},Ls.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}},Ls.concat=function(r,t){if(!ks(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return Ls.alloc(0);var e;if(void 0===t)for(t=0,e=0;e<r.length;++e)t+=r[e].length;var n=Ls.allocUnsafe(t),i=0;for(e=0;e<r.length;++e){var o=r[e];if(!Ds(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Ls.byteLength=Ys,Ls.prototype._isBuffer=!0,Ls.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 t=0;t<r;t+=2)Ws(this,t,t+1);return this},Ls.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 t=0;t<r;t+=4)Ws(this,t,t+3),Ws(this,t+1,t+2);return this},Ls.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 t=0;t<r;t+=8)Ws(this,t,t+7),Ws(this,t+1,t+6),Ws(this,t+2,t+5),Ws(this,t+3,t+4);return this},Ls.prototype.toString=function(){var r=0|this.length;return 0===r?"":0===arguments.length?rc(this,0,r):zs.apply(this,arguments)},Ls.prototype.equals=function(r){if(!Ds(r))throw new TypeError("Argument must be a Buffer");return this===r||0===Ls.compare(this,r)},Ls.prototype.inspect=function(){var r="";return this.length>0&&(r=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(r+=" ... ")),"<Buffer "+r+">"},Ls.prototype.compare=function(r,t,e,n,i){if(!Ds(r))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=r?r.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||e>r.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=e)return 0;if(n>=i)return-1;if(t>=e)return 1;if(this===r)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(e>>>=0)-(t>>>=0),u=Math.min(o,a),f=this.slice(n,i),l=r.slice(t,e),s=0;s<u;++s)if(f[s]!==l[s]){o=f[s],a=l[s];break}return o<a?-1:a<o?1:0},Ls.prototype.includes=function(r,t,e){return-1!==this.indexOf(r,t,e)},Ls.prototype.indexOf=function(r,t,e){return qs(this,r,t,e,!0)},Ls.prototype.lastIndexOf=function(r,t,e){return qs(this,r,t,e,!1)},Ls.prototype.write=function(r,t,e,n){if(void 0===t)n="utf8",e=this.length,t=0;else if(void 0===e&&"string"==typeof t)n=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-t;if((void 0===e||e>i)&&(e=i),r.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return $s(this,r,t,e);case"utf8":case"utf-8":return Hs(this,r,t,e);case"ascii":return Js(this,r,t,e);case"latin1":case"binary":return Xs(this,r,t,e);case"base64":return Qs(this,r,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zs(this,r,t,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Ls.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tc=4096;function ec(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(127&r[i]);return n}function nc(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ic(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=gc(r[o]);return i}function oc(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function ac(r,t,e){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function uc(r,t,e,n,i,o){if(!Ds(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function fc(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function lc(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>8*(n?i:3-i)&255}function sc(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function cc(r,t,e,n,i){return i||sc(r,0,e,4),js(r,t,e,n,23,4),e+4}function hc(r,t,e,n,i){return i||sc(r,0,e,8),js(r,t,e,n,52,8),e+8}Ls.prototype.slice=function(r,t){var e,n=this.length;if((r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<r&&(t=r),Ls.TYPED_ARRAY_SUPPORT)(e=this.subarray(r,t)).__proto__=Ls.prototype;else{var i=t-r;e=new Ls(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+r]}return e},Ls.prototype.readUIntLE=function(r,t,e){r|=0,t|=0,e||ac(r,t,this.length);for(var n=this[r],i=1,o=0;++o<t&&(i*=256);)n+=this[r+o]*i;return n},Ls.prototype.readUIntBE=function(r,t,e){r|=0,t|=0,e||ac(r,t,this.length);for(var n=this[r+--t],i=1;t>0&&(i*=256);)n+=this[r+--t]*i;return n},Ls.prototype.readUInt8=function(r,t){return t||ac(r,1,this.length),this[r]},Ls.prototype.readUInt16LE=function(r,t){return t||ac(r,2,this.length),this[r]|this[r+1]<<8},Ls.prototype.readUInt16BE=function(r,t){return t||ac(r,2,this.length),this[r]<<8|this[r+1]},Ls.prototype.readUInt32LE=function(r,t){return t||ac(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},Ls.prototype.readUInt32BE=function(r,t){return t||ac(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},Ls.prototype.readIntLE=function(r,t,e){r|=0,t|=0,e||ac(r,t,this.length);for(var n=this[r],i=1,o=0;++o<t&&(i*=256);)n+=this[r+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},Ls.prototype.readIntBE=function(r,t,e){r|=0,t|=0,e||ac(r,t,this.length);for(var n=t,i=1,o=this[r+--n];n>0&&(i*=256);)o+=this[r+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Ls.prototype.readInt8=function(r,t){return t||ac(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},Ls.prototype.readInt16LE=function(r,t){t||ac(r,2,this.length);var e=this[r]|this[r+1]<<8;return 32768&e?4294901760|e:e},Ls.prototype.readInt16BE=function(r,t){t||ac(r,2,this.length);var e=this[r+1]|this[r]<<8;return 32768&e?4294901760|e:e},Ls.prototype.readInt32LE=function(r,t){return t||ac(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},Ls.prototype.readInt32BE=function(r,t){return t||ac(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},Ls.prototype.readFloatLE=function(r,t){return t||ac(r,4,this.length),Fs(this,r,!0,23,4)},Ls.prototype.readFloatBE=function(r,t){return t||ac(r,4,this.length),Fs(this,r,!1,23,4)},Ls.prototype.readDoubleLE=function(r,t){return t||ac(r,8,this.length),Fs(this,r,!0,52,8)},Ls.prototype.readDoubleBE=function(r,t){return t||ac(r,8,this.length),Fs(this,r,!1,52,8)},Ls.prototype.writeUIntLE=function(r,t,e,n){(r=+r,t|=0,e|=0,n)||uc(this,r,t,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[t]=255&r;++o<e&&(i*=256);)this[t+o]=r/i&255;return t+e},Ls.prototype.writeUIntBE=function(r,t,e,n){(r=+r,t|=0,e|=0,n)||uc(this,r,t,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[t+i]=255&r;--i>=0&&(o*=256);)this[t+i]=r/o&255;return t+e},Ls.prototype.writeUInt8=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,1,255,0),Ls.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[t]=255&r,t+1},Ls.prototype.writeUInt16LE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,2,65535,0),Ls.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):fc(this,r,t,!0),t+2},Ls.prototype.writeUInt16BE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,2,65535,0),Ls.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):fc(this,r,t,!1),t+2},Ls.prototype.writeUInt32LE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,4,4294967295,0),Ls.TYPED_ARRAY_SUPPORT?(this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=255&r):lc(this,r,t,!0),t+4},Ls.prototype.writeUInt32BE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,4,4294967295,0),Ls.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):lc(this,r,t,!1),t+4},Ls.prototype.writeIntLE=function(r,t,e,n){if(r=+r,t|=0,!n){var i=Math.pow(2,8*e-1);uc(this,r,t,e,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&r;++o<e&&(a*=256);)r<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(r/a>>0)-u&255;return t+e},Ls.prototype.writeIntBE=function(r,t,e,n){if(r=+r,t|=0,!n){var i=Math.pow(2,8*e-1);uc(this,r,t,e,i-1,-i)}var o=e-1,a=1,u=0;for(this[t+o]=255&r;--o>=0&&(a*=256);)r<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(r/a>>0)-u&255;return t+e},Ls.prototype.writeInt8=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,1,127,-128),Ls.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[t]=255&r,t+1},Ls.prototype.writeInt16LE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,2,32767,-32768),Ls.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8):fc(this,r,t,!0),t+2},Ls.prototype.writeInt16BE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,2,32767,-32768),Ls.TYPED_ARRAY_SUPPORT?(this[t]=r>>>8,this[t+1]=255&r):fc(this,r,t,!1),t+2},Ls.prototype.writeInt32LE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,4,2147483647,-2147483648),Ls.TYPED_ARRAY_SUPPORT?(this[t]=255&r,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24):lc(this,r,t,!0),t+4},Ls.prototype.writeInt32BE=function(r,t,e){return r=+r,t|=0,e||uc(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),Ls.TYPED_ARRAY_SUPPORT?(this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=255&r):lc(this,r,t,!1),t+4},Ls.prototype.writeFloatLE=function(r,t,e){return cc(this,r,t,!0,e)},Ls.prototype.writeFloatBE=function(r,t,e){return cc(this,r,t,!1,e)},Ls.prototype.writeDoubleLE=function(r,t,e){return hc(this,r,t,!0,e)},Ls.prototype.writeDoubleBE=function(r,t,e){return hc(this,r,t,!1,e)},Ls.prototype.copy=function(r,t,e,n){if(e||(e=0),n||0===n||(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===r.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-e&&(n=r.length-t+e);var i,o=n-e;if(this===r&&e<t&&t<n)for(i=o-1;i>=0;--i)r[i+t]=this[i+e];else if(o<1e3||!Ls.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)r[i+t]=this[i+e];else Uint8Array.prototype.set.call(r,this.subarray(e,e+o),t);return o},Ls.prototype.fill=function(r,t,e,n){if("string"==typeof r){if("string"==typeof t?(n=t,t=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===r.length){var i=r.charCodeAt(0);i<256&&(r=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Ls.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof r&&(r&=255);if(t<0||this.length<t||this.length<e)throw new RangeError("Out of range index");if(e<=t)return this;var o;if(t>>>=0,e=void 0===e?this.length:e>>>0,r||(r=0),"number"==typeof r)for(o=t;o<e;++o)this[o]=r;else{var a=Ds(r)?r:yc(new Ls(r,n).toString()),u=a.length;for(o=0;o<e-t;++o)this[o+t]=a[o%u]}return this};var pc=/[^+\/0-9A-Za-z-_]/g;function gc(r){return r<16?"0"+r.toString(16):r.toString(16)}function yc(r,t){var e;t=t||1/0;for(var n=r.length,i=null,o=[],a=0;a<n;++a){if((e=r.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function mc(r){return function(r){var t,e,n,i,o,a;xs||Vs();var u=r.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===r[u-2]?2:"="===r[u-1]?1:0,a=new Ts(3*u/4-o),n=o>0?u-4:u;var f=0;for(t=0,e=0;t<n;t+=4,e+=3)i=_s[r.charCodeAt(t)]<<18|_s[r.charCodeAt(t+1)]<<12|_s[r.charCodeAt(t+2)]<<6|_s[r.charCodeAt(t+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=_s[r.charCodeAt(t)]<<2|_s[r.charCodeAt(t+1)]>>4,a[f++]=255&i):1===o&&(i=_s[r.charCodeAt(t)]<<10|_s[r.charCodeAt(t+1)]<<4|_s[r.charCodeAt(t+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(r){if((r=function(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}(r).replace(pc,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function dc(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function vc(r){return null!=r&&(!!r._isBuffer||wc(r)||function(r){return"function"==typeof r.readFloatLE&&"function"==typeof r.slice&&wc(r.slice(0,0))}(r))}function wc(r){return!!r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}var bc=Object.freeze({__proto__:null,Buffer:Ls,INSPECT_MAX_BYTES:50,SlowBuffer:function(r){return+r!=r&&(r=0),Ls.alloc(+r)},isBuffer:vc,kMaxLength:Is}),Ec=Ls;function _c(r){if(r.__esModule)return r;var t=r.default;if("function"==typeof t){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach((function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})})),e}var Tc,xc=_c(bc).Buffer;Tc=function(){var r,t;if("function"!=typeof Ec)return!1;try{r=ur(t="function"==typeof Ec.from?Ec.from([1,2,3,4]):new Ec([1,2,3,4]))&&1===t[0]&&2===t[1]&&3===t[2]&&4===t[3]}catch(t){r=!1}return r}()?xc:function(){throw new Error("not implemented")};var Vc=Tc;var Ac=ue(Vc.allocUnsafe)?function(r){if(!jt(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return Vc.allocUnsafe(r)}:function(r){if(!jt(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return new Vc(r)};var Sc={float64:mr,float32:_r,int16:Hr,int32:Lr,int8:pt,uint16:Dr,uint32:Fr,uint8:tt,uint8c:at,complex64:Pe,complex128:qe,bool:Qe};function Fc(r){return Sc[r]||null}var jc={binary:1,bool:1,complex64:8,complex128:16,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32};function Rc(r){return jc[r]||null}var kc,Ic=Wl.get("dtypes.default");kc=Xr(Ac(1))?function(r){var t,e,n,i,o,a;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(n=arguments.length>1?arguments[1]:Ic))return Hi(r);if(null===(t=Rc(n)))throw new TypeError(j("invalid argument. Second argument must be a supported data type. Value: `%s`.",n));return i=Fc(n),a=t*r,"complex128"===n&&(a+=8),e=(o=Ac(a)).byteOffset,"complex128"===n&&(St(e/t)||(e+=8)),new i(o.buffer,e,r)}:function(r){return arguments.length>1?Hl(r,arguments[1]):Hl(r)};var Bc=kc;function Oc(r){var t=tn(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),Bc(r.length,t)}function Lc(r,t,e,n,i){var o,a,u,f;for(o=e.data,a=e.accessors[1],u=i,f=0;f<r;f++)a(o,u,t),u+=n;return e}var Pc=8;function Mc(r,t,e,n){var i,o,a,u;if(r<=0)return e;if((u=ff(e)).accessorProtocol)return Lc(r,t,u,n,i=n<0?(1-r)*n:0),u.data;if(1===n){if((a=r%Pc)>0)for(o=0;o<a;o++)e[o]=t;if(r<Pc)return e;for(o=a;o<r;o+=Pc)e[o]=t,e[o+1]=t,e[o+2]=t,e[o+3]=t,e[o+4]=t,e[o+5]=t,e[o+6]=t,e[o+7]=t;return e}for(i=n<0?(1-r)*n:0,o=0;o<r;o++)e[i]=t,i+=n;return e}function Cc(r){var t=typeof r;return null!==r&&("object"===t||"function"===t)&&ue(r.next)}function Uc(r){var t;if(!Cc(r))throw new TypeError(j("invalid argument. Must provide an iterator. Value: `%s`.",r));for(t=0;;){if(r.next().done)return t;t+=1}}U(Mc,"ndarray",(function(r,t,e,n,i){var o,a,u,f;if(r<=0)return e;if((u=ff(e)).accessorProtocol)return Lc(r,t,u,n,i),u.data;if(o=i,1===n){if((a=r%8)>0)for(f=0;f<a;f++)e[o]=t,o+=n;if(r<8)return e;for(f=a;f<r;f+=8)e[o]=t,e[o+1]=t,e[o+2]=t,e[o+3]=t,e[o+4]=t,e[o+5]=t,e[o+6]=t,e[o+7]=t,o+=8;return e}for(f=0;f<r;f++)e[o]=t,o+=n;return e}));var Nc=Ee(),Dc=Wl.get("dtypes.default");function Yc(){var r,t,e,n,i,o,a;if(t=arguments.length,(t-=1)>=0&&Mt(arguments[t])?(e=arguments[t],t-=1):e=Dc,null===(n=mf(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));if("generic"===e){if(t<=0)return[];if(r=arguments[0],a=arguments[1],1===t){if(St(a)?o=a:Bt(a)&&(o=a.length),void 0!==o)return $i(r,o);if(Lt(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Pt(a)){if(!1===Nc)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!ue(a[_e]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!ue((a=a[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));return function(r,t){var e;for(e=[];!r.next().done;)e.push(t);return e}(a,r)}throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a))}if(Lt(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a))}if(t<=0)return new n(0);if(1===t)if(Bt(a=arguments[1]))i=new n(a.length);else if(Lt(a))i=new n(a);else if(St(a))i=new n(a);else{if(!Pt(a))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!1===Nc)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!ue(a[_e]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!ue((a=a[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));i=new n(Uc(a))}else i=2===t?new n(arguments[1],arguments[2]):new n(arguments[1],arguments[2],arguments[3]);return i.length>0&&(r=arguments[0],jn(e)?function(r,t){var e;for(e=0;e<r.length;e++)r.set(t,e)}(i,r):Vn(e)?Mc(i.length,r?1:0,sn(i,0),1):Mc(i.length,r,i,1)),i}function zc(r,t,e,n,i,o){var a,u,f,l,s;for(a=t.data,f=t.accessors[0],u=t.accessors[1],l=n,s=0;s<r;s++)u(a,l,i.call(o,f(a,l),s,l,t)),l+=e;return t}function Wc(r,t,e,n,i){var o,a,u;if(r<=0)return t;if(o=e<0?(1-r)*e:0,(a=ff(t)).accessorProtocol)return zc(r,a,e,o,n,i),a.data;for(u=0;u<r;u++)t[o]=n.call(i,t[o],u,o,t),o+=e;return t}U(Wc,"ndarray",(function(r,t,e,n,i,o){var a,u,f;if(r<=0)return t;if((u=ff(t)).accessorProtocol)return zc(r,u,e,n,i,o),u.data;for(a=n,f=0;f<r;f++)t[a]=i.call(o,t[a],f,a,t),a+=e;return t}));var qc=Ee(),Gc=Wl.get("dtypes.default");function $c(){var r,t,e,n,i,o,a,u;if(0===(t=arguments.length))return new(i=mf(Gc))(0);if(Mt(e=arguments[0])){if(t>1)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(null===(i=mf(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));return new i(0)}if(t<2)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(ue(arguments[t-=1]))if(ue(arguments[t-1])){if(r=arguments[t],n=arguments[t-=1],0===t)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.")}else n=arguments[t];else{if(!(t>=2))throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(r=arguments[t],!ue(n=arguments[t-=1]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",n))}if((t-=1)>=0&&Mt(arguments[t])?(e=arguments[t],t-=1):e=Gc,null===(i=mf(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));if("generic"===e){if(u=arguments[0],0===t){if(St(u)?a=u:Bt(u)&&(a=u.length),void 0!==a)return _f(a,n,r);if(Lt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Pt(u)){if(!1===qc)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!ue(u[_e]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!ue((u=u[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));return function(r,t,e){var n,i;for(n=[],i=-1;!r.next().done;)i+=1,n.push(t.call(e,i));return n}(u,n,r)}throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(Lt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(0===t)if(Bt(u=arguments[0]))o=new i(u.length);else if(Lt(u))o=new i(u);else if(St(u))o=new i(u);else{if(!Pt(u))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!1===qc)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!ue(u[_e]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!ue((u=u[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));o=new i(Uc(u))}else o=1===t?new i(arguments[0],arguments[1]):new i(arguments[0],arguments[1],arguments[2]);return o.length>0&&(jn(e)||Vn(e)?function(r,t,e){var n;for(n=0;n<r.length;n++)r.set(t.call(e,n),n)}(o,n,r):Wc(o.length,o,1,(function(t,e){return n.call(r,e)}))),o}var Hc=Object.prototype.isPrototypeOf;function Jc(r){return""===r?"":r.charAt(0).toUpperCase()+r.slice(1)}function Xc(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}var Qc=Ee(),Zc={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},Kc={float64:"getFloat64",float32:"getFloat32",int32:"getInt32",int16:"getInt16",uint32:"getUint32",uint16:"getUint16"},rh={c:"a",f:"a",i:"an",u:"a",b:"a"},th=pn(["float64","float32","int32","int16","uint32","uint16"]);function eh(r){return Mt(r)?r.toLowerCase():null}function nh(r){return"little-endian"===r}function ih(r){var t,e,n,i;if(!th(r))throw new TypeError(j("invalid argument. First argument must be a supported data type. Value: `%s`.",r));function o(){var r,e,n,i,a,u,l,s;if(n=arguments.length,!(this instanceof o))return n<2?new o(arguments[0]):2===n?new o(arguments[0],arguments[1]):3===n?new o(arguments[0],arguments[1],arguments[2]):new o(arguments[0],arguments[1],arguments[2],arguments[3]);if(null===(e=eh(arguments[0]))||!Fn(e))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",arguments[0]));if(i=nh(e),0===(n-=1))a=new ys(new is(0));else if(1===n)if(St(l=arguments[n]))a=new ys(new is(l*t));else if(Bt(l))a=f(new ys(new is(l.length*t)),l,i);else if(Lt(l))a=new ys(l);else{if(!Pt(l))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));if(!1===Qc)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",l));if(!ue(l[_e]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));if(!ue((a=l[_e]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));s=Xc(a),a=f(new ys(new is(s.length*t)),s,i)}else{if(!Lt(a=arguments[1]))throw new TypeError(j("invalid argument. Must provide an ArrayBuffer. Value: `%s`.",a));if(!St(r=arguments[2]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===n)a=new ys(a,r);else{if(!St(u=arguments[3]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",u));if((u*=t)>a.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",u));a=new ys(a,r,u)}}return U(this,"_buffer",a),U(this,"_length",a.byteLength/t),U(this,"_isLE",i),this}return t=Rc(r),e=function(r){return Jc(r)+"ArrayFE"}(r),n=Kc[r],i=Zc[r],U(o,"BYTES_PER_ELEMENT",t),U(o,"name",e),U(o,"from",(function(n,o){var u,f,l,s,c,h,p,g,y,m,d;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",rh[r[0]],e));if(null===(f=eh(n))||!Fn(f))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",n));if(c=nh(f),(l=arguments.length)>2){if(!ue(s=arguments[2]))throw new TypeError(j("invalid argument. Third argument must be a function. Value: `%s`.",s));l>3&&(u=arguments[3])}if(Bt(o)){if(s){for(m=o.length,y=o.get&&o.set?$("default"):z("default"),p=(h=new this(f,m))._buffer,d=0;d<m;d++)p[i](d*t,s.call(u,y(o,d),d),c);return h}return new this(f,o)}if(Pt(o)&&Qc&&ue(o[_e])){if(!ue((p=o[_e]()).next))throw new TypeError(j("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",o));for(g=s?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(t.call(e,i.value,o));return n}(p,s,u):Xc(p),p=(h=new this(f,m=g.length))._buffer,d=0;d<m;d++)p[i](d*t,g[d],c);return h}throw new TypeError(j("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",o))})),U(o,"of",(function(t){var n,i,o;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",rh[r[0]],e));if(null===(n=eh(t))||!Fn(n))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",t));for(i=[],o=1;o<arguments.length;o++)i.push(arguments[o]);return new this(n,i)})),Te(o.prototype,"buffer",(function(){return this._buffer.buffer})),Te(o.prototype,"byteLength",(function(){return this._buffer.byteLength})),Te(o.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(o.prototype,"BYTES_PER_ELEMENT",o.BYTES_PER_ELEMENT),U(o.prototype,"get",(function(i){if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",rh[r[0]],e));if(!St(i))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",i));if(!(i>=this._length))return this._buffer[n](i*t,this._isLE)})),Te(o.prototype,"length",(function(){return this._length})),U(o.prototype,"set",(function(n){var o,a,f,l,s,c,h,p;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",rh[r[0]],e));if(f=this._buffer,arguments.length>1){if(!St(a=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",a))}else a=0;if(Bt(n)){if(a+(c=n.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(s=(o=n).get&&o.set?$("default"):z("default"),p=f.byteOffset+a*t,o.buffer===f.buffer&&o.byteOffset<p&&o.byteOffset+o.byteLength>p){for(l=[],h=0;h<n.length;h++)l.push(s(n,h));o=l,s=z("default")}for(h=0;h<c;a++,h++)f[i](a*t,s(o,h),this._isLE)}else{if(a>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",a));f[i](a*t,n,this._isLE)}})),U(o.prototype,"toString",(function(){var i,o,a;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",rh[r[0]],e));for(i=[],o=this._buffer,a=0;a<this._length;a++)i.push(o[n](a*t,this._isLE));return i.join(",")})),o;function a(r){return r===o}function u(r){return"object"==typeof r&&null!==r&&(r.constructor.name===e||function(r,t){var e=typeof t;if(null===t||"object"!==e&&"function"!==e)throw new TypeError(j("invalid argument. Second argument must be either an object (except null) or a function. Value: `%s`.",t));return e=typeof r,null!==r&&("object"===e||"function"===e)&&Hc.call(t,r)}(r,o.prototype))&&r.BYTES_PER_ELEMENT===t}function f(r,e,n){var o,a,u;for(o=e.length,a=e.get&&e.set?$("default"):z("default"),u=0;u<o;u++)r[i](u*t,a(e,u),n);return r}}var oh=ih("float32"),ah=ih("float64");function uh(){var r,t,e,n,i,o,a,u,f;if(r=arguments[0],arguments.length>1)if(Bt(arguments[1])){if(n=arguments[1],arguments.length>2){if(!ue(e=arguments[2]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[3]}}else{if(!ue(e=arguments[1]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[2]}if(!Cc(r))throw new TypeError(j("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",r));if(u=-1,void 0===n){if(n=[],e){for(;u+=1,!(f=r.next()).done;)n.push(e.call(t,f.value,u));return n}for(;!(f=r.next()).done;)n.push(f.value);return n}if(i=n.length,a=tn(n),o=D(n)?J(a):q(a),e){for(;u<i-1&&(u+=1,!(f=r.next()).done);)o(n,u,e.call(t,f.value,u));return n}for(;u<i-1&&(u+=1,!(f=r.next()).done);)o(n,u,f.value);return n}var fh={Complex64:"complex64",Complex128:"complex128"},lh={complex64:ge,complex128:fe};function sh(r){return lh[r]||null}var ch,hh=["complex64","complex128"].slice(),ph=[];for(ch=0;ch<hh.length;ch++)ph.push(sh(hh[ch]));var gh=hh.length;function yh(r){var t;for(t=0;t<gh;t++)if(r instanceof ph[t])return hh[t];return fh[sr(r)]||null}var mh=Wl.get("dtypes.real_floating_point"),dh=Wl.get("dtypes.complex_floating_point"),vh=Wl.get("dtypes.boolean");function wh(r){var t,e,n,i;return t=gt(r),arguments.length<2?t?n=mh:Gt(r)?n=vh:ye(r)?null===(n=yh(r))&&(n=dh):n="generic":n=arguments[1],e=Hl(1,n),i=t&&jn(n)?[r,0]:r,(D(e)?J(n):q(n))(e,0,i),e}var bh=Wl.get("dtypes.default");function Eh(r,t){var e,n,i;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>2?arguments[2]:bh))return $i(t,r);if(null===(n=mf(e)))throw new TypeError(j("invalid argument. Third argument must be a recognized data type. Value: `%s`.",e));return Mc(r,t,i=new n(r),1),i}function _h(r,t){var e,n;if(null===(e=tn(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>2&&(e=arguments[2]),n="number"==typeof t?"complex128"===e?new fe(t,0):"complex64"===e?new ge(t,0):t:t,Eh(r.length,n,e)}function Th(r,t,e){var n;if(!gt(r)||Nn(r))throw new TypeError(j("invalid argument. Start must be numeric. Value: `%s`.",r));if(!gt(t)||Nn(t))throw new TypeError(j("invalid argument. Stop must be numeric. Value: `%s`.",t));if(arguments.length<3)n=1;else if(!gt(n=e)||Nn(n))throw new TypeError(j("invalid argument. Increment must be numeric. Value: `%s`.",n));if(mu((t-r)/n)>xr)throw new RangeError("invalid arguments. Generated array exceeds maximum array length.");return ol(r,t,n)}function xh(){}var Vh="foo"===xh.name;var Ah=[Fe,ce,Ru,to,Iu,io,Pu,ln,Ou],Sh=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],Fh=gr()?si(Fe):jh;function jh(){}Fh="TypedArray"===function(r){if(!1===ue(r))throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",r));return Vh?r.name:lr.exec(r.toString())[1]}(Fh)?Fh:jh;var Rh=[Xu,zu],kh=["Complex64Array","Complex128Array"];function Ih(r){return r instanceof ef||"BooleanArray"===sr(r)}function Bh(r,t){if("function"!=typeof t)throw new TypeError(j("invalid argument. Second argument must be callable. Value: `%s`.",t));return r instanceof t}var Oh=[[mr,"Float64Array"],[_r,"Float32Array"],[Lr,"Int32Array"],[Fr,"Uint32Array"],[Hr,"Int16Array"],[Dr,"Uint16Array"],[pt,"Int8Array"],[tt,"Uint8Array"],[at,"Uint8ClampedArray"],[Pe,"Complex64Array"],[qe,"Complex128Array"],[Qe,"BooleanArray"]];function Lh(r){var t,e;for(e=0;e<Oh.length;e++)if(Bh(r,Oh[e][0]))return Oh[e][1];for(;r;){for(t=sr(r),e=0;e<Oh.length;e++)if(t===Oh[e][1])return Oh[e][1];r=si(r)}}function Ph(r){var t,e,n;if(function(r){var t,e;if("object"!=typeof r||null===r)return!1;if(r instanceof Fh)return!0;for(e=0;e<Ah.length;e++)if(r instanceof Ah[e])return!0;for(;r;){for(t=sr(r),e=0;e<Sh.length;e++)if(Sh[e]===t)return!0;r=si(r)}return!1}(r))t=r;else if(function(r){var t,e;if("object"!=typeof r||null===r)return!1;for(e=0;e<Rh.length;e++)if(r instanceof Rh[e])return!0;for(;r;){for(t=sr(r),e=0;e<kh.length;e++)if(kh[e]===t)return!0;r=si(r)}return!1}(r))t=8===r.BYTES_PER_ELEMENT?Ae(r,0):je(r,0);else{if(!Ih(r))throw new TypeError(j("invalid argument. Must provide a typed array. Value: `%s`.",r));t=sn(r,0)}for(e={type:Lh(r),data:[]},n=0;n<t.length;n++)e.data.push(t[n]);return e}function Mh(r){return M(this,"next",{configurable:!1,enumerable:!0,get:function(){return this._next}}),this.value=r,M(this,"_next",{configurable:!1,enumerable:!1,writable:!0,value:null}),M(this,"_prev",{configurable:!1,enumerable:!1,writable:!0,value:null}),this}function Ch(){return this instanceof Ch?(this._length=0,this._first=null,this._last=null,this):new Ch}U(Ch.prototype,"clear",(function(){return this._length=0,this._first=null,this._last=null,this})),U(Ch.prototype,"first",(function(){if(this._length)return this._first})),U(Ch.prototype,"insert",(function(r,t){var e;if(r===this._last)return this.push(t);for(e=this._first;e!==this._last&&e!==r;)e=e._next;if(e===this._last)throw new Error("invalid argument. The list does not contain the provided list node.");return e=new Mh(t),r._next._prev=e,e._next=r._next,r._next=e,e._prev=r,this._length+=1,this})),U(Ch.prototype,"iterator",(function(){var r,t,e,n,i;return e=this,i=-1,r=this.toArray(),U(t={},"next",(function(){if(i+=1,n||i>=r.length)return{done:!0};return{value:r[i],done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(t,_e,(function(){return e.iterator()})),t})),U(Ch.prototype,"last",(function(){if(this._length)return this._last})),Te(Ch.prototype,"length",(function(){return this._length})),U(Ch.prototype,"pop",(function(){var r;return this._length&&(r=this._last.value,this._last._prev?(this._last=this._last._prev,this._last._next=null):(this._first=null,this._last=null),this._length-=1),r})),U(Ch.prototype,"push",(function(r){var t;return t=new Mh(r),0===this._length?(this._first=t,this._last=t):(t._prev=this._last,this._last._next=t,this._last=t),this._length+=1,this})),U(Ch.prototype,"remove",(function(r){var t,e;if(r===this._first)return this.shift();if(r===this._last)return this.pop();for(t=r.value,e=this._first;e!==this._last&&e!==r;)e=e._next;if(e===this._last)throw new Error("invalid argument. The list does not contain the provided list node.");return r._prev._next=r._next,r._next._prev=r._prev,this._length-=1,t})),U(Ch.prototype,"shift",(function(){var r;return this._length&&(r=this._first.value,this._first._next?(this._first=this._first._next,this._first._prev=null):(this._first=null,this._last=null),this._length-=1),r})),U(Ch.prototype,"toArray",(function(){var r,t,e;for(t=[],r=this._first,e=0;e<this._length;e++)t.push(r.value),r=r.next;return t})),U(Ch.prototype,"toJSON",(function(){var r={type:"linked-list"};return r.data=this.toArray(),r})),U(Ch.prototype,"unshift",(function(r){var t;return t=new Mh(r),0===this._length?(this._first=t,this._last=t):(t._next=this._first,this._first._prev=t,this._first=t),this._length+=1,this}));var Uh=new Ch;function Nh(r){for(var t=Uh.first();t;){if(t.value.id===r)return t;t=t.next}return null}var Dh=-1;function Yh(r){var t,e,n,i,o;if(!(this instanceof Yh))return arguments.length>1?new Yh(r,arguments[1]):new Yh(r);if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===(n=tn(r))||null===n)if(r.length>0)if(Gt(o=Wi(r)(r,0)))i="bool";else{if(!xt(o))throw new TypeError("invalid argument. First argument must be a valid index array.");i="int"}else i="int";else if("int32"===n)i="int";else if("uint8"===n)i="mask";else{if("bool"!==n)throw new TypeError("invalid argument. First argument must be a valid index array.");i="bool"}if(t={persist:!1},arguments.length>1&&(e=function(r,t){return hi(t)?rr(t,"persist")&&(r.persist=t.persist,!Gt(r.persist))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","persist",r.persist)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(t,arguments[1]),e))throw e;return Uh.push({id:(Dh+=1).toString(),ref:this,data:r,type:i,dtype:n,persist:t.persist}),U(this,"_node",Uh.last()),function(r,t,e){M(r,t,{configurable:!0,enumerable:!1,writable:!0,value:e})}(this,"_invalidated",!1),this}U(Yh,"name","ArrayIndex"),U(Yh,"free",(function(r){var t,e;return null!==(t=Nh(r))&&(U((e=t.value).ref,"_invalidated",!0),Uh.remove(t),e.data=null,!0)})),U(Yh,"get",(function(r){var t,e,n;return null===(t=Nh(r))?null:(e={data:(n=t.value).data,type:n.type,dtype:n.dtype},n.persist||Yh.free(r),e)})),Te(Yh.prototype,"data",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.data})),Te(Yh.prototype,"dtype",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.dtype})),Te(Yh.prototype,"id",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.id})),Te(Yh.prototype,"isCached",(function(){return!this._invalidated})),Te(Yh.prototype,"type",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.type})),U(Yh.prototype,"toString",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return"ArrayIndex<"+this._node.value.id+">"})),U(Yh.prototype,"toJSON",(function(){var r;if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return{type:"ArrayIndex",data:"generic"===(r=this._node.value).dtype||null===r.dtype?D(r.data)?Wa(r.data):r.data:Ph(r.data)}}));var zh={float64:mr,float32:_r,complex128:qe,complex64:Pe};function Wh(r){return zh[r]||null}function qh(r,t,e,n,i){var o,a,u;if(0===n)return r;if(1===n)return r[0]=i?e:t,r;for(r[0]=t,a=(e-t)/(o=i?n-1:n),u=1;u<o;u++)r[u]=t+a*u;return i&&(r[o]=e),r}function Gh(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y;if(0===o)return r;if("float64"===t?(u=e,l=0):"complex64"===t?(u=xe(e),l=Ve(e)):(u=Me(e),l=Ce(e)),"float64"===n?(f=i,s=0):"complex64"===n?(f=xe(i),s=Ve(i)):(f=Me(i),s=Ce(i)),1===o)return a?(r[0]=f,r[1]=s):(r[0]=u,r[1]=l),r;for(r[0]=u,r[1]=l,c=(f-u)/(p=a?o-1:o),h=(s-l)/p,y=2,g=1;g<p;g++)r[y]=u+c*g,r[y+1]=l+h*g,y+=2;return a&&(r[y]=f,r[y+1]=s),r}function $h(r,t){return hi(t)?rr(t,"dtype")&&(r.dtype=t.dtype,!Mt(r.dtype))?new TypeError(j("invalid option. `%s` option must be a string. Option: `%s`.","dtype",r.dtype)):rr(t,"endpoint")&&(r.endpoint=t.endpoint,!Gt(r.endpoint))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","endpoint",r.endpoint)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}var Hh=!0,Jh=Wl.get("dtypes.complex_floating_point");function Xh(r,t,e){var n,i,o,a,u,f,l;if("object"==typeof r){if(null===(u=yh(r))){if(!ye(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));u="complex128"}l=!0}else{if(!gt(r)||Nn(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));u="float64"}if("object"==typeof t){if(null===(f=yh(t))){if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));f="complex128"}l=!0}else{if(!gt(t)||Nn(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));f="float64"}if(!St(e))throw new TypeError(j("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",e));if((n={endpoint:Hh}).dtype=u===f?u:Jh,arguments.length>3&&(o=$h(n,arguments[3])))throw o;if("generic"===n.dtype)return l?function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d,v;if(0===i)return[];if(u=0,"float64"===r?(l=t,c=0):"complex64"===r?(u+=1,l=xe(t),c=Ve(t)):(l=Me(t),c=Ce(t)),"float64"===e?(s=n,h=0):"complex64"===e?(u+=1,s=xe(n),h=Ve(n)):(s=Me(n),h=Ce(n)),a=2===u?ge:fe,1===i)return o?[new a(s,h)]:[new a(l,c)];for(f=[new a(l,c)],y=(s-l)/(d=o?i-1:i),m=(h-c)/d,v=1;v<d;v++)p=l+y*v,g=c+m*v,f.push(new a(p,g));return o&&f.push(new a(s,h)),f}(u,r,f,t,e,n.endpoint):function(r,t,e,n){var i,o,a,u;if(0===e)return[];if(1===e)return n?[t]:[r];for(i=[r],a=(t-r)/(o=n?e-1:e),u=1;u<o;u++)i.push(r+a*u);return n&&i.push(t),i}(r,t,e,n.endpoint);if(null===(i=Wh(n.dtype)))throw new TypeError(j('invalid option. `%s` option must be a real or complex floating-point data type or "generic". Option: `%s`.',"dtype",n.dtype));if(a=new i(e),"complex64"===n.dtype)return Gh(Ae(a,0),u,r,f,t,e,n.endpoint),a;if("complex128"===n.dtype)return Gh(je(a,0),u,r,f,t,e,n.endpoint),a;if(l)throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array data type must be a complex number data type or "generic".');return qh(a,r,t,e,n.endpoint)}function Qh(r){var t=typeof r;return null===r||"object"!==t&&"function"!==t?new TypeError(j("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",r)):null}U(Xh,"assign",(function(r,t,e){var n,i,o,a,u,f,l;if("object"==typeof r){if(null===(o=yh(r))){if(!ye(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="complex128"}u=!0}else{if(!gt(r)||Nn(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="float64"}if("object"==typeof t){if(null===(a=yh(t))){if(!ye(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="complex128"}u=!0}else{if(!gt(t)||Nn(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="float64"}if(!Bt(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={endpoint:Hh},arguments.length>3&&(i=$h(n,arguments[3])))throw i;if(null===(f=tn(e))&&(f="generic"),"complex64"===f)return Gh(Ae(e,0),o,r,a,t,e.length,n.endpoint),e;if("complex128"===f)return Gh(je(e,0),o,r,a,t,e.length,n.endpoint),e;if(u){if("generic"===f)return function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d,v;if(0===o)return r;if(f=0,"float64"===t?(l=e,c=0):"complex64"===t?(f+=1,l=xe(e),c=Ve(e)):(l=Me(e),c=Ce(e)),"float64"===n?(s=i,h=0):"complex64"===n?(f+=1,s=xe(i),h=Ve(i)):(s=Me(i),h=Ce(i)),u=2===f?ge:fe,g=r.data,p=r.accessors[1],1===o)return p(g,0,a?new u(s,h):new u(l,c)),r;for(p(g,0,new u(l,c)),y=(s-l)/(d=a?o-1:o),m=(h-c)/d,v=1;v<d;v++)p(g,v,new u(l+y*v,c+m*v));a&&p(g,d,new u(s,h))}(l=un(e),o,r,a,t,e.length,n.endpoint),e;throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array must be a complex number array or a "generic" array-like object.')}return(l=un(e)).accessorProtocol?(function(r,t,e,n,i){var o,a,u,f,l;if(0===n)return r;if(o=r.data,a=r.accessors[1],1===n)return a(o,0,i?e:t),r;for(a(o,0,t),f=(e-t)/(u=i?n-1:n),l=1;l<u;l++)a(o,l,t+f*l);i&&a(o,u,e)}(l,r,t,e.length,n.endpoint),e):(qh(e,r,t,e.length,n.endpoint),e)}));var Zh=Object.create;function Kh(){}var rp="function"==typeof Zh?Zh:function(r){return Kh.prototype=r,new Kh};var tp=Ee(),ep="little-endian",np={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},ip={c:"a",f:"a",i:"an",u:"a",b:"a"};function op(r){var t,e,n,i;function o(){var r=arguments.length;return this instanceof o?(0===r?i.call(this,ep):1===r?i.call(this,ep,arguments[0]):2===r?i.call(this,ep,arguments[0],arguments[1]):3===r&&i.call(this,ep,arguments[0],arguments[1],arguments[2]),this):0===r?new o:1===r?new o(arguments[0]):2===r?new o(arguments[0],arguments[1]):new o(arguments[0],arguments[1],arguments[2])}return i=ih(r),t=Rc(r),e=function(r){return Jc(r)+"ArrayLE"}(r),n=np[r],U(o,"BYTES_PER_ELEMENT",t),U(o,"name",e),U(o,"from",(function(i){var o,u,f,l,s,c,h,p,g;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",ip[r[0]],e));if((u=arguments.length)>1){if(!ue(f=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",f));u>2&&(o=arguments[2])}if(Bt(i)){if(f){for(p=i.length,h=i.get&&i.set?$("default"):z("default"),s=(l=new this(p))._buffer,g=0;g<p;g++)s[n](g*t,f.call(o,h(i,g),g),!0);return l}return new this(i)}if(Pt(i)&&tp&&ue(i[_e])){if(!ue((s=i[_e]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",i));for(c=f?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(t.call(e,i.value,o));return n}(s,f,o):function(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}(s),s=(l=new this(p=c.length))._buffer,g=0;g<p;g++)s[n](g*t,c[g],!0);return l}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",i))})),U(o,"of",(function(){var t,n;if(!ue(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",ip[r[0]],e));for(t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);return new this(t)})),function(r,t){var e=Qh(r);if(e)throw e;if(e=Qh(t))throw e;if(void 0===t.prototype)throw new TypeError(j("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",t.prototype));r.prototype=rp(t.prototype),M(r.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:r})}(o,i),o;function a(r){return r===o}}var ap=op("float32"),up=op("float64");function fp(r,t,e){if(!gt(r)||Nn(r))throw new TypeError(j("invalid argument. Exponent of start value must be numeric. Value: `%s`.",r));if(!gt(t)||Nn(t))throw new TypeError(j("invalid argument. Exponent of stop value must be numeric. Value: `%s`.",t));if(arguments.length<3)e=10;else if(!St(e))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",e));return ul(r,t,e)}function lp(r){return 0===r&&1/r===bt}var sp=1401298464324817e-60,cp=16777215,hp=-16777215;function pp(r){return r!=r||r===vr||r===bt?"float32":_t(r)?r>=hp&&r<=cp?"float32":"float64":r>-sp&&r<sp?"float64":"float32"}function gp(r){return gt(r)?r!=r||r===vr||r===bt?"float32":_t(r)?0===r&&lp(r)?"float32":r<0?r>=lt?"int8":r>=Wr?"int16":r>=kr?"int32":"float64":r<=Qr?"uint8":r<=Mr?"uint16":r<=xr?"uint32":"float64":r>-sp&&r<sp?"float64":"float32":Gt(r)?"bool":ye(r)?"float64"===pp(r.re)||"float64"===pp(r.im)?"complex128":"complex64":"generic"}function yp(r,t){var e;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(j("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=tn(r))||null===e?pl(r,t):pl.assign(r,t,Hl(tu(t),e),1,0)}var mp=["strict","non_strict","strict_broadcast","broadcast","repeat"],dp=pn(mp);function vp(r,t,e){var n,i,o,a;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!Bt(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"repeat"},arguments.length>3&&(i=function(r,t){return hi(t)?rr(t,"mode")&&(r.mode=t.mode,!dp(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",mp.join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=tn(r)||"generic",!Fi(a=tn(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return jn(o)&&ki(a)&&(e=bf(e,o)),gl(r,t,e,n.mode)}function wp(r,t){var e;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(j("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=tn(r))||null===e?yl(r,t):yl.assign(r,t,Hl(Qa(t),e),1,0)}var bp=new fe(NaN,NaN),Ep=new ge(NaN,NaN),_p=xn("floating_point_and_generic"),Tp=pn(_p),xp=Wl.get("dtypes.real_floating_point");function Vp(r){var t;if(arguments.length>1){if(!Tp(t=arguments[1]))throw new TypeError(j('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',_p.join('", "'),t))}else t=xp;return Eh(r,"complex128"===t?bp:"complex64"===t?Ep:NaN,t)}var Ap=new fe(NaN,NaN),Sp=new ge(NaN,NaN),Fp=["float64","float32","complex128","complex64","generic"];function jp(r){var t,e;if(null===(t=tn(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(t=arguments[1],-1===Fp.indexOf(t))throw new TypeError(j('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',Fp.join('", "'),t))}else if(-1===Fp.indexOf(t))throw new TypeError(j('invalid argument. First argument must be one of the following data types: "%s". Value: `%s`.',Fp.join('", "'),t));return e="complex128"===t?Ap:"complex64"===t?Sp:NaN,Eh(r.length,e,t)}var Rp={float64:-1,float32:"float64",int32:-1,int16:"int32",int8:"int16",uint32:-1,uint16:"uint32",uint8:"uint16",uint8c:"uint16",generic:-1,bool:-1,complex64:"complex128",complex128:-1};function kp(r){return 0===arguments.length?function(){var r,t,e,n;for(e={},t=(r=ai(Rp)).length,n=0;n<t;n++)e[r[n]]=Rp[r[n]];return e}():rr(Rp,r)?Rp[r]:null}var Ip=Wl.get("dtypes.default");function Bp(r){var t;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return dl(r)}else t=Ip;return dl.assign(Hl(r,t),1,0)}function Op(r){var t=tn(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),Bp(r.length,t)}var Lp=new fe(1,0),Pp=new ge(1,0),Mp=Wl.get("dtypes.default");function Cp(r){var t;return Eh(r,"complex128"===(t=arguments.length>1?arguments[1]:Mp)?Lp:"complex64"===t?Pp:1,t)}var Up=new fe(1,0),Np=new ge(1,0);function Dp(r){var t,e;if(null===(t=tn(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),e="complex128"===t?Up:"complex64"===t?Np:1,Eh(r.length,e,t)}var Yp=["strict","non_strict","strict_broadcast","broadcast","repeat"],zp=pn(Yp);function Wp(r,t,e){var n,i,o,a;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!Bt(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"repeat"},arguments.length>3&&(i=function(r,t){return hi(t)?rr(t,"mode")&&(r.mode=t.mode,!zp(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Yp.join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=tn(r)||"generic",!Fi(a=tn(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return jn(o)&&ki(a)&&(e=bf(e,o)),wl(r,t,e,n.mode)}var qp=0x40000000000000,Gp=1.4426950407214463,$p=1.6751713164886512e-10,Hp=2146435072,Jp=1048576,Xp=1072693248,Qp=[0,0];function Zp(r){var t,e,n,i,o,a,u,f,l,s,c,h,p;if(Nn(r)||r<0)return NaN;if(yo.assign(r,Qp,1,0),i=Qp[0],o=Qp[1],p=0,i<Jp){if(0==(i&xo|o))return bt;p-=54,i=jo(r*=qp)}return i>=Hp?r+r:i===Xp&&0===o?0:(p+=(i>>20)-qo|0,c=p+=(h=(i&=Ea)+614244&Jp|0)>>20|0,n=.5*(f=(r=Wo(r,i|h^Xp))-1)*f,l=function(r){var t,e,n,i,o,a;return t=(o=(i=(n=r/(2+r))*n)*i)*(0===(a=o)?.3999999999940942:.3999999999940942+a*(.22222198432149784+.15313837699209373*a)),e=i*function(r){return 0===r?.6666666666666735:.6666666666666735+r*(.2857142874366239+r*(.1818357216161805+.14798198605116586*r))}(o),n*(.5*r*r+(e+t))}(f),e=((u=f-(a=bo(a=f-n,0))-n+l)+a)*$p+u*Gp,(e+=c-(s=c+(t=a*Gp))+t)+(t=s))}var Kp={bool:1,float64:8,float32:4,int16:2,int32:4,int8:1,uint16:2,uint32:4,uint8:1,uint8c:1,complex64:8,complex128:16},rg=Wl.get("dtypes.default"),tg=Fc("complex64"),eg=Fc("complex128"),ng=Fc("bool");function ig(r){return r instanceof tg}function og(r){return r instanceof eg}function ag(r){return r instanceof ng}function ug(r){var t,e,n,i;if(n={highWaterMark:9007199254740992},arguments.length&&(i=function(r,t){return hi(t)?rr(t,"highWaterMark")&&(r.highWaterMark=t.highWaterMark,!St(r.highWaterMark))?new TypeError(j("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","highWaterMark",r.highWaterMark)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,r),i))throw i;return e=function(r){var t,e;for(t=[],e=0;e<r+1;e++)t.push([]);return t}(mu(Zp(n.highWaterMark))),t=0,U(a,"malloc",a),U(a,"calloc",(function(){var r,t,e,n;r=arguments.length,t=0===r?a():1===r?a(arguments[0]):a(arguments[0],arguments[1]);if(null!==t)for(e=og(t)?je(t,0):ig(t)?Ae(t,0):ag(t)?sn(t,0):t,n=0;n<e.length;n++)e[n]=0;return t})),U(a,"free",(function(r){var t,n,i;if(o=r,null!==o&&"object"==typeof o&&St(o.length)&&o.length<=It&&"number"==typeof o.BYTES_PER_ELEMENT&&"number"==typeof o.byteOffset&&"number"==typeof o.byteLength&&r.buffer)r=r.buffer;else if(!Lt(r))throw new TypeError(j("invalid argument. Must provide a typed array or ArrayBuffer. Value: `%s`.",r));var o;if(r.byteLength>0){for(t=Et(Zp(r.byteLength)),a=e.length-1,u=t,t=Nn(a)||Nn(u)?NaN:a===bt||u===bt?bt:a===u&&0===a?lp(a)?a:u:a<u?a:u,n=e[t],i=0;i<n.length;i++)if(n[i]===r)return!1;n.push(r)}var a,u;return!0})),U(a,"clear",(function(){var r;for(r=0;r<e.length;r++)e[r].length=0;t=0})),U(a,"highWaterMark",n.highWaterMark),Te(a,"nbytes",(function(){return t})),a;function o(r,i,o){var a,u,f,l;return 0===i?new r(0):(a=function(r){var i,o;return(o=Zp(r))<e.length&&e[o].length?e[o].pop():t+r>n.highWaterMark?null:(i=new is(r),t+=r,i)}((Nn(u=i)||Qi(u)||0===u?u:(u<0?(u=-u,f=-1):f=1,(l=Zp(u))===sa?u:(l=-1===f?Et(l):mu(l))>fa?vr:f*Na(2,l)))*Kp[o]),null===a?a:new r(a,0,i))}function a(){var r,t,e,n,i,a,u,f,l,s;if(null===(e=Fc(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:rg)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(r<=0)return new e(0);if(St(arguments[0]))return o(e,arguments[0],t);if(Bt(arguments[0])){if(f=(n=arguments[0]).length,(s=n)instanceof Xu||"Complex128Array"===sr(s)?n=je(n,0):!function(r){return r instanceof zu||"Complex64Array"===sr(r)}(n)?Ih(n)?n=sn(n,0):jn(t)&&(f/=2):n=Ae(n,0),null===(i=o(e,f,t)))return i;if(og(i)||ig(i)||ag(i))return i.set(n),i;for(u=Wi(n),a=Rl(i),l=0;l<f;l++)a(i,l,u(n,l));return i}throw new TypeError(j("invalid argument. First argument must be either an array length or an array-like object. Value: `%s`.",arguments[0]))}}var fg=ug();U(fg,"factory",ug);var lg={float64:{float64:"float64",float32:"float64",int32:"float64",int16:"float64",int8:"float64",uint32:"float64",uint16:"float64",uint8:"float64",uint8c:"float64",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},float32:{float64:"float64",float32:"float32",int32:"float64",int16:"float32",int8:"float32",uint32:"float64",uint16:"float32",uint8:"float32",uint8c:"float32",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},int32:{float64:"float64",float32:"float64",int32:"int32",int16:"int32",int8:"int32",uint32:"float64",uint16:"int32",uint8:"int32",uint8c:"int32",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},int16:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"float64",uint16:"int32",uint8:"int16",uint8c:"int16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},int8:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int8",uint32:"float64",uint16:"int32",uint8:"int16",uint8c:"int16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint32:{float64:"float64",float32:"float64",int32:"float64",int16:"float64",int8:"float64",uint32:"uint32",uint16:"uint32",uint8:"uint32",uint8c:"uint32",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},uint16:{float64:"float64",float32:"float32",int32:"int32",int16:"int32",int8:"int32",uint32:"uint32",uint16:"uint16",uint8:"uint16",uint8c:"uint16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint8:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"uint32",uint16:"uint16",uint8:"uint8",uint8c:"uint8",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint8c:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"uint32",uint16:"uint16",uint8:"uint8",uint8c:"uint8",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},complex128:{float64:"complex128",float32:"complex128",int32:"complex128",int16:"complex128",int8:"complex128",uint32:"complex128",uint16:"complex128",uint8:"complex128",uint8c:"complex128",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},complex64:{float64:"complex128",float32:"complex64",int32:"complex128",int16:"complex64",int8:"complex64",uint32:"complex128",uint16:"complex64",uint8:"complex64",uint8c:"complex64",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},bool:{float64:-1,float32:-1,int32:-1,int16:-1,int8:-1,uint32:-1,uint16:-1,uint8:-1,uint8c:-1,complex64:-1,complex128:-1,bool:"bool",generic:"generic"},generic:{float64:"generic",float32:"generic",int32:"generic",int16:"generic",int8:"generic",uint32:"generic",uint16:"generic",uint8:"generic",uint8c:"generic",complex64:"generic",complex128:"generic",bool:"generic",generic:"generic"}};function sg(r,t){var e;return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ai(lg)).length,f=0;f<t;f++){for(i=r[f],a=lg[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(r=Ti(r),rr(lg,r)&&rr(e=lg[r],t=Ti(t))?e[t]:null)}function cg(r,t,e){var n,i,o,a;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!Bt(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"normalize"},arguments.length>3&&(i=function(r,t){return hi(t)?rr(t,"mode")&&(r.mode=t.mode,!Al(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Vl().join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=tn(r)||"generic",!Fi(a=tn(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return jn(o)&&ki(a)&&(e=bf(e,o)),jl(r,t,e,n.mode)}var hg={Float64Array:mr,Float32Array:_r,Int32Array:Lr,Uint32Array:Fr,Int16Array:Hr,Uint16Array:Dr,Int8Array:pt,Uint8Array:tt,Uint8ClampedArray:at,Complex64Array:Pe,Complex128Array:qe,BooleanArray:Qe};function pg(r,t){var e;return t&&t.type&&ir(t.data)&&(e=hg[t.type])?new e(t.data):t}function gg(r,t){var e=t[0];return kt(e)&&(r.push(e.length),gg(r,e)),r}function yg(r,t,e,n,i){var o,a,u;for(o=t[e],u=0;u<n.length;u++){if(!kt(a=n[u])||a.length!==o)return e;if(i&&(a=yg(r,t,e+1,a,e+1<r-1))<r)return a}return r}function mg(r){var t,e;if(!kt(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return gg(t=[r.length],r),(e=t.length)>1&&(t.length=yg(e,t,1,r,e>2)),t}var dg="function"==typeof SharedArrayBuffer;function vg(r){return dg&&r instanceof SharedArrayBuffer||"[object SharedArrayBuffer]"===nr(r)}var wg="function"==typeof SharedArrayBuffer?SharedArrayBuffer:null;var bg,Eg="function"==typeof SharedArrayBuffer?SharedArrayBuffer:null;bg=function(){var r,t,e;if("function"!=typeof wg)return!1;try{e=(t=new wg(16)).slice(4,8),r=vg(t)&&vg(e)&&16===t.byteLength&&4===e.byteLength}catch(t){r=!1}return r}()?Eg:function(r){throw new Error("not supported. The current environment does not support SharedArrayBuffers, and, unfortunately, SharedArrayBuffers cannot be polyfilled. For shared memory applications, upgrade your runtime environment to one which supports SharedArrayBuffers.")};var _g=bg;function Tg(r){var t,e;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!xt(t=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(arguments.length>2){if(!xt(e=arguments[2]))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e))}else e=r.length}else t=0,e=r.length;return Il(r,t,e)}function xg(r,t){var e,n,i;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(e={mode:"normalize"},arguments.length>2&&(n=function(r,t){return hi(t)?rr(t,"mode")&&(r.mode=t.mode,!Al(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Vl().join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(e,arguments[2]),n))throw n;return"generic"===(i=tn(r))||null===i?Bl(r,t,e.mode):Bl.assign(r,t,e.mode,Hl(t.length,i),1,0)}function Vg(r){var t,e,n,i,o,a,u,f,l,s;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(i={iter:1e308,dir:1},arguments.length>1)if(hi(arguments[1])){if(e=arguments[1],arguments.length>2){if(!ue(u=arguments[2]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",u));t=arguments[3]}if(rr(e,"iter")&&(i.iter=e.iter,!St(e.iter)))throw new TypeError(j("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","iter",e.iter));if(rr(e,"dir")&&(i.dir=e.dir,1!==e.dir&&-1!==e.dir))throw new TypeError(j("invalid option. `%s` option must be either `1` or `-1`. Option: `%s`.","dir",e.dir))}else{if(!ue(u=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be either a function or an options object. Value: `%s`.",u));t=arguments[2]}return n=0,o={},u?1===i.dir?(s=-1,U(o,"next",(function(){if(s=(s+1)%r.length,n+=1,a||n>i.iter||0===r.length)return{done:!0};return{value:u.call(t,f(r,s),s,n,r),done:!1}}))):(s=r.length,U(o,"next",(function(){(s-=1)<0&&(s+=r.length);if(n+=1,a||n>i.iter||0===r.length)return{done:!0};return{value:u.call(t,f(r,s),s,n,r),done:!1}}))):1===i.dir?(s=-1,U(o,"next",(function(){if(s=(s+1)%r.length,n+=1,a||n>i.iter||0===r.length)return{done:!0};return{value:f(r,s),done:!1}}))):(s=r.length,U(o,"next",(function(){(s-=1)<0&&(s+=r.length);if(n+=1,a||n>i.iter||0===r.length)return{done:!0};return{value:f(r,s),done:!1}}))),U(o,"return",(function(r){if(a=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(o,_e,(function(){if(u)return Vg(r,i,u,t);return Vg(r,i)})),l=tn(r),f=D(r)?$(l):z(l),o}var Ag=eval;var Sg,Fg="undefined"==typeof Proxy?null:Proxy;Sg=function(){var r;try{Ag('"use strict"; var handler = { "get": function get( t, n ) { return t[ n ] * 100; } }; var target = { "beep": 3.14 }; var p = new Proxy( target, handler ); var x = p.beep; if ( x !== 314 ) { throw new Error( "native Proxy is not supported." ); }'),r=!0}catch(t){r=!1}return r}()?Fg:function(r){return r};var jg=Sg,Rg=ue(Object.assign),kg=Object.assign,Ig=void 0!==Object.getOwnPropertySymbols,Bg=ui.getOwnPropertySymbols;var Og,Lg=Ig?function(r){return Bg(ui(r))}:function(){return[]};function Pg(r){var t,e,n;for(t=ai(r),e=Lg(r),n=0;n<e.length;n++)Gn(r,e[n])&&t.push(e[n]);return t}Og=Rg?kg:function(r){var t,e,n,i,o,a,u;if(null==r)throw new TypeError(j("invalid argument. First argument must be a non-null object. Value: `%s`.",r));for(o=ui(r),a=1;a<arguments.length;a++)if(null!=(t=arguments[a]))for(i=(e=Pg(ui(t))).length,u=0;u<i;u++)o[n=e[u]]=t[n];return o};var Mg=Og;function Cg(r){return gt(r)?[r,0]:r}function Ug(r){return jn(r)?Cg:null}function Ng(r,t){return function(e){return r(e,t)}}var Dg="function"==typeof jg;function Yg(r,t){return hi(t)?rr(t,"strict")&&(r.strict=t.strict,!Gt(r.strict))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","strict",r.strict)):!rr(t,"cache")||(r.cache=t.cache,e=r.cache,n="get",null!=e&&(e=ui(e),"symbol"!=typeof n&&(n=String(n)),n in e&&ue(e[n])))?null:new TypeError(j("invalid option. `%s` option is missing a `%s` method. Option: `%s`.","cache","get",r.cache)):new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));var e,n}function zg(){return null}function Wg(r,t){return Gt(r)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function qg(r,t){return gt(r)?null:ye(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",yh(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Gg(r,t){return gt(r)||ye(r)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function $g(r,t){var e;return gt(r)?xt(r)?Pi(e=hl(r),t)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",gp(r),t)):ye(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",yh(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Hg(r,t){var e;return gt(r)?Pi(e=gp(r),t)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):ye(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",yh(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Jg(r){return"generic"===r||""===r?zg:Ii(r)?qg:Yi(r)?Hg:Di(r)?$g:Vn(r)?Wg:Gg}function Xg(r,t){return function(e,n){var i,o;switch((o=n).length){case 0:i=new e;break;case 1:i=new e(o[0]);break;case 2:i=new e(o[0],o[1]);break;case 3:i=new e(o[0],o[1],o[2]);break;case 4:i=new e(o[0],o[1],o[2],o[3]);break;case 5:i=new e(o[0],o[1],o[2],o[3],o[4]);break;case 6:i=new e(o[0],o[1],o[2],o[3],o[4],o[5]);break;case 7:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6]);break;case 8:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]);break;case 9:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]);break;case 10:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]);break;default:i=e.apply(null,o)}return r(i,t)}}function Qg(r,t){return null!=r&&("symbol"==typeof t?t in Object(r):String(t)in Object(r))}var Zg=/^-?[0-9]+$/;function Kg(r){return Mt(r)&&Zg.test(r)}var ry=/\s*ArrayIndex<[^>]+>\s*/;function ty(r){return Mt(r)&&ry.test(r)}var ey=void 0!==String.prototype.trim,ny=String.prototype.trim;var iy=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;var oy=ey&&""===ny.call(" \n\t\r\n\f\v \u2028\u2029 \ufeff")&&""===ny.call("")?function(r){return ny.call(r)}:function(r){return En(r,iy,"$1")};function ay(r,t){var e,n=t.get((e=oy(r)).substring(11,e.length-1));if(null===n)throw new Error(j("invalid operation. Unable to resolve array index. Value: `%s`.",r));return n}function uy(r,t,e){var n,i;if(-1===(i=_l(n=parseInt(r,10),t-1))){if(e)throw new RangeError(j("invalid operation. Index exceeds array bounds."));return n}return i}function fy(r){return En(r,/^invalid arguments?/,"invalid operation")}var ly=/(?:\s*-\s*)(?=\d+)(\d+)$/,sy=/(?:\s*\/\s*)(?=\d*\.?\d+)(\d*\.?\d+)$/;function cy(r,t,e,n){var i;if("end"===r)return t;if(i=r.match(ly)){if((r=t-parseInt(i[1],10))<0){if(n)return-2;r=0}return r}return(i=r.match(sy))?(r=parseFloat(i[1]))<1?n?-2:-1:Et(e&&t>0&&1!==r?(t-1)/r:t/r):-1}var hy=/\s*:\s*/,py=/^[-+]?[0-9]+$/,gy=/^end/;function yy(r,t,e){var n,i,o;if((i=(n=oy(r).split(hy)).length)<2||i>3)return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if(3===i)if(0===(o=n[2]).length)n[2]=1;else{if(!1===py.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if(0===(o=parseInt(o,10)))return{code:"ERR_SLICE_INVALID_INCREMENT"};n[2]=o}else n.push(1);if(0===(o=n[0]).length)n[2]<0&&t>0?n[0]=t-1:n[0]=0;else if(gy.test(o)){if((o=cy(o,t,n[2]<0,e))<0)return-2===o?{code:"ERR_SLICE_OUT_OF_BOUNDS"}:{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};n[2]<0&&o>=t&&(o-=1),n[0]=o}else{if(!py.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if((o=parseInt(o,10))<0){if((o=t+o)<0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=0}}else if(o>=t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=n[2]<0?t-1:t}n[0]=o}if(0===(o=n[1]).length)n[2]<0?n[1]=null:n[1]=t;else if(gy.test(o)){if((o=cy(o,t,n[2]<0,e))<0)return-2===o?{code:"ERR_SLICE_OUT_OF_BOUNDS"}:{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};n[1]=o}else{if(!py.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if((o=parseInt(o,10))<0){if((o=t+o)<0)if(n[2]>0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=0}else{if(e&&o<-1)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=null}}else if(o>t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=t}n[1]=o}return 0===t?new gu(0,0,n[2]):new gu(n[0],n[1],n[2])}var my="Slice(",dy=3,vy=/\s*,\s*/,wy=/^-?[0-9]+$/;var by=void 0!==String.prototype.startsWith;var Ey,_y=String.prototype.startsWith;Ey=by?function(r,t,e){var n;return n=e<0?r.length+e:e,0===t.length||!(n<0||n+t.length>r.length)&&_y.call(r,t,n)}:function(r,t,e){var n,i;if(n=e<0?r.length+e:e,0===t.length)return!0;if(n<0||n+t.length>r.length)return!1;for(i=0;i<t.length;i++)if(r.charCodeAt(n+i)!==t.charCodeAt(i))return!1;return!0};var Ty=Ey,xy=/:/;function Vy(r,t){var e=function(r){var t,e,n,i,o;if(r.substring(0,my.length)!==my)return null;if(")"!==r[n=r.length-1])return null;if((r=(r=oy(r.substring(my.length,n))).split(vy)).length!==dy)return null;for(t=[],o=0;o<dy;o++){if("null"===(i=r[o]))e=null;else{if(!wy.test(i))return null;e=parseInt(i,10)}t.push(e)}return new gu(t[0],t[1],t[2])}(t);if(null===e)throw new Error(j("invalid operation. Unsupported slice operation. Value: `%s`.",r));return e}function Ay(r,t,e){var n=oy(t);return function(r){return"S"===r[0]&&Ty(r,"Slice(",0)&&")"===r[r.length-1]}(n)?Vy(t,n):function(r){return xy.test(r)}(n)?function(r,t,e,n){var i=yy(t,e,!0);if(i.code){if("ERR_SLICE_INVALID_INCREMENT"===i.code)throw new Error(j("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",r));if("ERR_SLICE_INVALID_SUBSEQUENCE"===i.code)throw new Error(j("invalid operation. Unsupported slice operation. Value: `%s`.",r));if("ERR_SLICE_OUT_OF_BOUNDS"===i.code){if(n)throw new RangeError(j("invalid operation. Slice exceeds array bounds."));i=yy(t,e,!1)}}return i}(t,n,r.length,e):null}function Sy(r){return function(t,e,n){if(Kg(e))return function(r,t,e){return e.getter(r,uy(t,r.length,e.strict))}(t,e,r);if(Qg(t,e)||!Mt(e))return function(r,t,e,n){var i=r[t];return ue(i)?i===r.constructor?n.ctor:function(){var t,n;for(t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);return i.apply(this===e?r:this,t)}:i}(t,e,n,r);if(ty(e))return function(r,t,e){var n=ay(t,e.cache);if("int"===n.type)return e.postGetArray(xg(r,n.data));if("bool"===n.type)return e.postGetArray(yp(r,n.data));if("mask"===n.type)return e.postGetArray(wp(r,n.data));throw new Error(j("invalid operation. Unrecognized array index type. Value: `%s`.",n.type))}(t,e,r);return function(r,t,e){var n=Ay(r,t,e.strict);if(null!==n)try{return e.postGetArray(gf(r,n,e.strict))}catch(r){throw new r.constructor(fy(r.message))}}(t,e,r)}}function Fy(r,t,e){return r[t]=e,!0}function jy(r){return function(t,e,n,i){var o;if(Kg(e))return function(r,t,e,n){var i,o;if(i=n.validator(e,n.dtype))throw i;return o=n.preSetElement?n.preSetElement(e):e,n.setter(r,uy(t,r.length,n.strict),o),!0}(t,e,n,r);if(Qg(e)||!Mt(e))return Fy(t,e,n);if(ty(e))return function(r,t,e,n){var i,o,a,u,f;if(a=ay(t,n.cache),i=n.dtype||"generic",Bt(e))f=e;else{if(u=n.validator(e,i))throw u;f=wh(f=n.preSetElement?n.preSetElement(e):e,i),o=i}if("int"===a.type){try{cg(r,a.data,f)}catch(u){throw new u.constructor(fy(u.message))}return!0}if("bool"===a.type){try{Wp(r,a.data,f,{mode:"strict_broadcast"})}catch(u){throw new u.constructor(fy(u.message))}return!0}if(void 0===o&&(o=tn(e)||"generic"),!Fi(o,i))throw new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,i));if(jn(i)&&ki(o)&&(f=bf(f,i)),"mask"===a.type){try{Dl(a.data,r,f,r,1,0)}catch(u){throw new u.constructor(fy(u.message))}return!0}throw new Error(j("invalid operation. Unrecognized array index type. Value: `%s`.",a.type))}(t,e,n,r);if(o=function(r,t,e,n,i){var o,a,u;if(null===(a=Ay(r,t,i.strict)))return!1;if(Bt(e))u=e;else{if(o=i.validator(e,i.dtype))throw o;u=wh(e,i.dtype||"generic")}try{Ef(u,n,a,i.strict)}catch(o){throw new o.constructor(fy(o.message))}return!0}(t,e,n,i,r),o)return o;return Fy(t,e,n)}}function Ry(){var r,t;if(r={cache:Yh,strict:!1},arguments.length&&(t=Yg(r,arguments[0])))throw t;return function t(e){var n,i,o,a,u;if(f=e,!(null!=f&&"function"!=typeof f&&"number"==typeof f.length&&_t(f.length)&&f.length>=0&&f.length<=Rt))throw new TypeError(j("invalid argument. First argument must be array-like. Value: `%s`.",e));var f;if(Dg){if(n=Mg({},r),arguments.length>1&&(i=Yg(n,arguments[1])))throw i;return u={ref:e,dtype:a=(o=un(e)).dtype||"",getter:o.accessors[0],setter:o.accessors[1],preSetElement:Ug(a),postGetArray:Ng(t,n),cache:n.cache,strict:n.strict,validator:Jg(a),array2fancy:t,ctor:new jg(e.constructor||Array,{construct:Xg(t,n)})},new jg(e,{get:Sy(u),set:jy(u)})}return console.warn("WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available."),e}}var ky=Ry();function Iy(r){var t,e,n,i,o,a,u;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!ue(i=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",i));t=arguments[2]}return u=-1,U(e={},"next",i?function(){if(u+=1,n||u>=r.length)return{done:!0};return{value:i.call(t,o(r,u),u,r),done:!1}}:function(){if(u+=1,n||u>=r.length)return{done:!0};return{value:o(r,u),done:!1}}),U(e,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){if(i)return Iy(r,i,t);return Iy(r)})),a=tn(r),o=D(r)?$(a):z(a),e}function By(r){var t,e,n,i,o,a,u,f;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!ue(i=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",i));t=arguments[2]}return o=r.length,f=o,U(e={},"next",i?function(){if(f+=r.length-o-1,o=r.length,n||f<0)return n=!0,{done:!0};return{value:i.call(t,a(r,f),f,r),done:!1}}:function(){if(f+=r.length-o-1,o=r.length,n||f<0)return n=!0,{done:!0};return{value:a(r,f),done:!1}}),U(e,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){if(i)return By(r,i,t);return By(r)})),u=tn(r),a=D(r)?$(u):z(u),e}function Oy(r){var t,e,n,i,o,a,u;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!ue(i=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",i));t=arguments[2]}return u=-1,U(e={},"next",i?function(){var e;if(n)return{done:!0};e=r.length,u+=1;for(;u<e&&void 0===o(r,u);)u+=1;if(u>=e)return n=!0,{done:!0};return{value:i.call(t,o(r,u),u,r),done:!1}}:function(){var t;if(n)return{done:!0};t=r.length,u+=1;for(;u<t&&void 0===o(r,u);)u+=1;if(u>=t)return n=!0,{done:!0};return{value:o(r,u),done:!1}}),U(e,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){if(i)return Oy(r,i,t);return Oy(r)})),a=tn(r),o=D(r)?$(a):z(a),e}function Ly(r){var t,e,n,i,o,a,u,f;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!ue(i=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",i));t=arguments[2]}return o=r.length,f=o,U(e={},"next",i?function(){if(n)return{done:!0};f+=r.length-o-1,o=r.length;for(;f>=0&&void 0===a(r,f);)f-=1;if(f<0)return n=!0,{done:!0};return{value:i.call(t,a(r,f),f,r),done:!1}}:function(){if(n)return{done:!0};f+=r.length-o-1,o=r.length;for(;f>=0&&void 0===a(r,f);)f-=1;if(f<0)return n=!0,{done:!0};return{value:a(r,f),done:!1}}),U(e,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(e,_e,(function(){if(i)return Ly(r,i,t);return Ly(r)})),u=tn(r),a=D(r)?$(u):z(u),e}function Py(r,t,e,n){var i,o,a,u,f,l,s,c;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(!Bt(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!xt(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(!St(n))throw new TypeError(j("invalid argument. Fourth argument must be a nonnegative integer. Value: `%s`.",n));if(arguments.length>4){if(!ue(u=arguments[4]))throw new TypeError(j("invalid argument. Fifth argument must be a function. Value: `%s`.",u));i=arguments[5]}return f=n,c=-1,U(o={},"next",u?function(){var n;if(c+=1,a||c>=r)return{done:!0};return n=u.call(i,l(t,f),f,c,t),f+=e,{value:n,done:!1}}:function(){var n;if(c+=1,a||c>=r)return{done:!0};return n=l(t,f),f+=e,{value:n,done:!1}}),U(o,"return",(function(r){if(a=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(o,_e,(function(){if(u)return Py(r,t,e,n,u,i);return Py(r,t,e,n)})),s=tn(t),l=D(t)?$(s):z(s),o}function My(r){var t,e,n,i,o,a,u,f,l,s;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(1===(n=arguments.length))e=0,u=r.length;else if(2===n)ue(arguments[1])?(e=0,a=arguments[1]):e=arguments[1],u=r.length;else if(3===n)ue(arguments[1])?(e=0,u=r.length,a=arguments[1],t=arguments[2]):ue(arguments[2])?(e=arguments[1],u=r.length,a=arguments[2]):(e=arguments[1],u=arguments[2]);else{if(e=arguments[1],u=arguments[2],!ue(a=arguments[3]))throw new TypeError(j("invalid argument. Fourth argument must be a function. Value: `%s`.",a));t=arguments[4]}if(!xt(e))throw new TypeError(j("invalid argument. Second argument must be either an integer (starting index) or a function. Value: `%s`.",e));if(!xt(u))throw new TypeError(j("invalid argument. Third argument must be either an integer (ending index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u)<0&&(u=0):u>r.length&&(u=r.length),e<0&&(e=r.length+e)<0&&(e=0),s=e-1,U(i={},"next",a?function(){if(s+=1,o||s>=u)return{done:!0};return{value:a.call(t,f(r,s),s,s-e,r),done:!1}}:function(){if(s+=1,o||s>=u)return{done:!0};return{value:f(r,s),done:!1}}),U(i,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(i,_e,(function(){if(a)return My(r,e,u,a,t);return My(r,e,u)})),l=tn(r),f=D(r)?$(l):z(l),i}function Cy(r){var t,e,n,i,o,a,u,f,l,s;if(!Bt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(1===(n=arguments.length))e=0,u=r.length;else if(2===n)ue(arguments[1])?(e=0,a=arguments[1]):e=arguments[1],u=r.length;else if(3===n)ue(arguments[1])?(e=0,u=r.length,a=arguments[1],t=arguments[2]):ue(arguments[2])?(e=arguments[1],u=r.length,a=arguments[2]):(e=arguments[1],u=arguments[2]);else{if(e=arguments[1],u=arguments[2],!ue(a=arguments[3]))throw new TypeError(j("invalid argument. Fourth argument must be a function. Value: `%s`.",a));t=arguments[4]}if(!xt(e))throw new TypeError(j("invalid argument. Second argument must be either an integer (starting view index) or a function. Value: `%s`.",e));if(!xt(u))throw new TypeError(j("invalid argument. Third argument must be either an integer (ending view index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u)<0&&(u=0):u>r.length&&(u=r.length),e<0&&(e=r.length+e)<0&&(e=0),s=u,U(i={},"next",a?function(){if(s-=1,o||s<e)return{done:!0};return{value:a.call(t,f(r,s),s,u-s-1,r),done:!1}}:function(){if(s-=1,o||s<e)return{done:!0};return{value:f(r,s),done:!1}}),U(i,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),_e&&U(i,_e,(function(){if(a)return Cy(r,e,u,a,t);return Cy(r,e,u)})),l=tn(r),f=D(r)?$(l):z(l),i}U(ky,"factory",Ry),U(ky,"idx",Yh);var Uy=Wl.get("dtypes.default"),Ny=Fc("complex64"),Dy=Fc("complex128"),Yy=Fc("bool");function zy(){var r,t,e,n;if(null===(e=Fc(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:Uy)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?((n=arguments[0])instanceof Ny?n=Ae(n,0):n instanceof Dy?n=je(n,0):n instanceof Yy&&(n=sn(n,0)),new e(n)):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])}var Wy={complex128:qe,complex64:Pe};function qy(r){return Wy[r]||null}var Gy=Wl.get("dtypes.complex_floating_point");function $y(){var r,t,e;if(null===(e=qy(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:Gy)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?new e(arguments[0]):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])}function Hy(){return xn("complex_floating_point")}function Jy(){return xn("typed")}function Xy(){return xn("floating_point")}var Qy={int16:Hr,int32:Lr,int8:pt,uint16:Dr,uint32:Fr,uint8:tt,uint8c:at};function Zy(r){return Qy[r]||null}function Ky(){return xn("integer")}var rm=Wl.get("dtypes.real");function tm(){var r,t,e;if(null===(e=Fc(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:rm)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?new e(arguments[0]):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])}var em={float64:mr,float32:_r,int16:Hr,int32:Lr,int8:pt,uint16:Dr,uint32:Fr,uint8:tt,uint8c:at};function nm(r){return em[r]||null}function im(){return xn("real")}var om={float64:mr,float32:_r};function am(r){return om[r]||null}function um(){return xn("real_floating_point")}var fm={int16:Hr,int32:Lr,int8:pt};function lm(r){return fm[r]||null}function sm(){return xn("signed_integer")}var cm={uint16:Dr,uint32:Fr,uint8:tt,uint8c:at};function hm(r){return cm[r]||null}function pm(){return xn("unsigned_integer")}var gm=Wl.get("dtypes.default");function ym(r){var t;if(!St(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return Zl(r)}else t=gm;return Zl.assign(Hl(r,t),1,0)}function mm(r){var t=tn(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),ym(r.length,t)}function dm(r){var t=tn(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),Hl(r.length,t)}var vm={};C(vm,"MAX_ARRAY_LENGTH",Rt),C(vm,"MAX_TYPED_ARRAY_LENGTH",It);var wm={};C(wm,"base",rs),C(wm,"BooleanArray",Qe),C(wm,"ArrayBuffer",is),C(wm,"byteOrders",Sn),C(wm,"cartesianPower",os),C(wm,"cartesianProduct",as),C(wm,"cartesianSquare",us),C(wm,"Complex64Array",Pe),C(wm,"Complex128Array",qe),C(wm,"convert",bf),C(wm,"convertSame",fs),C(wm,"ctors",mf),C(wm,"DataView",ys),C(wm,"datespace",bs),C(wm,"defaults",Wl),C(wm,"dtype",tn),C(wm,"dtypes",xn),C(wm,"empty",Bc),C(wm,"emptyLike",Oc),C(wm,"filled",Yc),C(wm,"filledBy",$c),C(wm,"fixedEndianFactory",ih),C(wm,"Float32ArrayFE",oh),C(wm,"Float64ArrayFE",ah),C(wm,"Float32Array",_r),C(wm,"Float64Array",mr),C(wm,"iterator2array",uh),C(wm,"scalar2array",wh),C(wm,"full",Eh),C(wm,"fullLike",_h),C(wm,"incrspace",Th),C(wm,"ArrayIndex",Yh),C(wm,"Int8Array",pt),C(wm,"Int16Array",Hr),C(wm,"Int32Array",Lr),C(wm,"linspace",Xh),C(wm,"littleEndianFactory",op),C(wm,"Float32ArrayLE",ap),C(wm,"Float64ArrayLE",up),C(wm,"logspace",fp),C(wm,"minDataType",gp),C(wm,"mostlySafeCasts",Ai),C(wm,"mskfilter",yp),C(wm,"mskput",vp),C(wm,"mskreject",wp),C(wm,"nans",Vp),C(wm,"nansLike",jp),C(wm,"nextDataType",kp),C(wm,"oneTo",Bp),C(wm,"oneToLike",Op),C(wm,"ones",Cp),C(wm,"onesLike",Dp),C(wm,"place",Wp),C(wm,"typedarraypool",fg),C(wm,"promotionRules",sg),C(wm,"put",cg),C(wm,"typedarrayReviver",pg),C(wm,"safeCasts",Oi),C(wm,"sameKindCasts",Ui),C(wm,"shape",mg),C(wm,"SharedArrayBuffer",_g),C(wm,"slice",Tg),C(wm,"take",xg),C(wm,"circarray2iterator",Vg),C(wm,"array2fancy",ky),C(wm,"array2iterator",Iy),C(wm,"array2iteratorRight",By),C(wm,"typedarray2json",Ph),C(wm,"sparsearray2iterator",Oy),C(wm,"sparsearray2iteratorRight",Ly),C(wm,"stridedarray2iterator",Py),C(wm,"arrayview2iterator",My),C(wm,"arrayview2iteratorRight",Cy),C(wm,"typedarray",zy),C(wm,"complexarray",$y),C(wm,"complexarrayCtors",qy),C(wm,"complexarrayDataTypes",Hy),C(wm,"typedarrayCtors",Fc),C(wm,"typedarrayDataTypes",Jy),C(wm,"floatarrayCtors",Wh),C(wm,"floatarrayDataTypes",Xy),C(wm,"intarrayCtors",Zy),C(wm,"intarrayDataTypes",Ky),C(wm,"realarray",tm),C(wm,"realarrayCtors",nm),C(wm,"realarrayDataTypes",im),C(wm,"realarrayFloatCtors",am),C(wm,"realarrayFloatDataTypes",um),C(wm,"intarraySignedCtors",lm),C(wm,"intarraySignedDataTypes",sm),C(wm,"intarrayUnsignedCtors",hm),C(wm,"intarrayUnsignedDataTypes",pm),C(wm,"Uint8Array",tt),C(wm,"Uint8ClampedArray",at),C(wm,"Uint16Array",Dr),C(wm,"Uint32Array",Fr),C(wm,"zeroTo",ym),C(wm,"zeroToLike",mm),C(wm,"zeros",Hl),C(wm,"zerosLike",dm),C(wm,"constants",vm);export{is as ArrayBuffer,Yh as ArrayIndex,Qe as BooleanArray,qe as Complex128Array,Pe as Complex64Array,ys as DataView,_r as Float32Array,oh as Float32ArrayFE,ap as Float32ArrayLE,mr as Float64Array,ah as Float64ArrayFE,up as Float64ArrayLE,Hr as Int16Array,Lr as Int32Array,pt as Int8Array,_g as SharedArrayBuffer,Dr as Uint16Array,Fr as Uint32Array,tt as Uint8Array,at as Uint8ClampedArray,ky as array2fancy,Iy as array2iterator,By as array2iteratorRight,My as arrayview2iterator,Cy as arrayview2iteratorRight,rs as base,Sn as byteOrders,os as cartesianPower,as as cartesianProduct,us as cartesianSquare,Vg as circarray2iterator,$y as complexarray,qy as complexarrayCtors,Hy as complexarrayDataTypes,vm as constants,bf as convert,fs as convertSame,mf as ctors,bs as datespace,wm as default,Wl as defaults,tn as dtype,xn as dtypes,Bc as empty,Oc as emptyLike,Yc as filled,$c as filledBy,ih as fixedEndianFactory,Wh as floatarrayCtors,Xy as floatarrayDataTypes,Eh as full,_h as fullLike,Th as incrspace,Zy as intarrayCtors,Ky as intarrayDataTypes,lm as intarraySignedCtors,sm as intarraySignedDataTypes,hm as intarrayUnsignedCtors,pm as intarrayUnsignedDataTypes,uh as iterator2array,Xh as linspace,op as littleEndianFactory,fp as logspace,gp as minDataType,Ai as mostlySafeCasts,yp as mskfilter,vp as mskput,wp as mskreject,Vp as nans,jp as nansLike,kp as nextDataType,Bp as oneTo,Op as oneToLike,Cp as ones,Dp as onesLike,Wp as place,sg as promotionRules,cg as put,tm as realarray,nm as realarrayCtors,im as realarrayDataTypes,am as realarrayFloatCtors,um as realarrayFloatDataTypes,Oi as safeCasts,Ui as sameKindCasts,wh as scalar2array,mg as shape,Tg as slice,Oy as sparsearray2iterator,Ly as sparsearray2iteratorRight,Py as stridedarray2iterator,xg as take,zy as typedarray,Ph as typedarray2json,Fc as typedarrayCtors,Jy as typedarrayDataTypes,pg as typedarrayReviver,fg as typedarraypool,ym as zeroTo,mm as zeroToLike,Hl as zeros,dm as zerosLike};
//# sourceMappingURL=mod.js.map