-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.mjs
More file actions
4 lines (4 loc) · 245 KB
/
index.mjs
File metadata and controls
4 lines (4 loc) · 245 KB
1
2
3
4
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./index.d.ts" />
import r from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.3-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-nonenumerable-read-write-accessor@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-nonenumerable-read-only-property@v0.2.3-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-buffer@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-array@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-constructor-name@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-float64array-support@v0.2.3-esm/index.mjs";import s from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-float32array-support@v0.2.3-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-uint32array-support@v0.2.3-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-int32array-support@v0.2.3-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-uint16array-support@v0.2.3-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-int16array-support@v0.2.3-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-uint8array-support@v0.2.3-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-uint8clampedarray-support@v0.2.3-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-int8array-support@v0.2.3-esm/index.mjs";import{isPrimitive as m}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-nonnegative-integer@v0.2.3-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-array-like-object@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-collection@v0.2.3-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-arraybuffer@v0.2.3-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-object@v0.2.3-esm/index.mjs";import{primitives as b}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-string-array@esm/index.mjs";import E,{isPrimitive as x}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-string@v0.2.3-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-function@v0.2.3-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-complex-like@esm/index.mjs";import _ from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert-is-even@esm/index.mjs";import V from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert-is-integer@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-iterator-symbol-support@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/symbol-iterator@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-nonenumerable-read-only-accessor@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float32-ctor@esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/string-format@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float32-real@esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float32-imag@esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-floor@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-complex64@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-complex128@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/string-format@v0.2.3-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float64-ctor@esm/index.mjs";import N from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float64-real@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-float64-imag@esm/index.mjs";import{isPrimitive as U}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-boolean@esm/index.mjs";import z,{isPrimitive as Y}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-integer@v0.2.3-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-iterator-symbol-support@v0.2.3-esm/index.mjs";import W from"https://cdn.jsdelivr.net/gh/stdlib-js/symbol-iterator@v0.2.3-esm/index.mjs";import G from"https://cdn.jsdelivr.net/gh/stdlib-js/boolean-ctor@esm/index.mjs";import J from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-complex128@v0.2.3-esm/index.mjs";import $ from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-complex64@v0.2.2-esm/index.mjs";import K from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-boolean@esm/index.mjs";import H from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-own-property@v0.2.3-esm/index.mjs";import Q from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-property@esm/index.mjs";import Z from"https://cdn.jsdelivr.net/gh/stdlib-js/number-float32-base-assert-is-almost-equal@esm/index.mjs";import X from"https://cdn.jsdelivr.net/gh/stdlib-js/number-float64-base-assert-is-almost-equal@esm/index.mjs";import rr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-almost-equal@esm/index.mjs";import tr from"https://cdn.jsdelivr.net/gh/stdlib-js/number-float32-base-assert-is-almost-same-value@esm/index.mjs";import er from"https://cdn.jsdelivr.net/gh/stdlib-js/number-float64-base-assert-is-almost-same-value@esm/index.mjs";import nr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-almost-same-value@esm/index.mjs";import ir from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-same-value@esm/index.mjs";import or from"https://cdn.jsdelivr.net/gh/stdlib-js/string-base-replace@esm/index.mjs";import ar from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-keys@esm/index.mjs";import sr from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-dtype-resolve-str@esm/index.mjs";import ur from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-fast-max@esm/index.mjs";import lr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-fast-min@esm/index.mjs";import fr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-pow@esm/index.mjs";import cr from"https://cdn.jsdelivr.net/gh/stdlib-js/strided-base-reinterpret-complex@esm/index.mjs";import hr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-same-value-zero@esm/index.mjs";import dr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert-is-nan@esm/index.mjs";import pr from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-accessor@esm/index.mjs";import mr from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-write-accessor@esm/index.mjs";import gr from"https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-normalize-slice@esm/index.mjs";import vr from"https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-length@esm/index.mjs";import yr,{ndarray as wr}from"https://cdn.jsdelivr.net/gh/stdlib-js/blas-base-gcopy@esm/index.mjs";import br from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-numel@esm/index.mjs";import Er from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-shape2strides@esm/index.mjs";import xr from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-vind2bind@esm/index.mjs";import Tr from"https://cdn.jsdelivr.net/gh/stdlib-js/blas-ext-base-grev@esm/index.mjs";import jr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-ceil@esm/index.mjs";import _r from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-accessor-array@esm/index.mjs";import{ndarray as Vr}from"https://cdn.jsdelivr.net/gh/stdlib-js/blas-ext-base-gjoin@esm/index.mjs";import kr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int8-min@esm/index.mjs";import Ar from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int16-min@esm/index.mjs";import Fr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int32-min@esm/index.mjs";import Sr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int8-max@esm/index.mjs";import Pr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int16-max@esm/index.mjs";import Br from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-int32-max@esm/index.mjs";import Lr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-uint8-max@esm/index.mjs";import Rr from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-uint16-max@esm/index.mjs";import Ir from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-uint32-max@esm/index.mjs";import Mr from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-nonenumerable-property@esm/index.mjs";import{factory as Or}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-ind@esm/index.mjs";import Cr from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-normalize-index@esm/index.mjs";import Nr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-maxn@esm/index.mjs";import Dr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-arraybuffer-support@v0.2.3-esm/index.mjs";import Ur from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-dataview-support@v0.2.3-esm/index.mjs";import zr from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-round@esm/index.mjs";import Yr from"https://cdn.jsdelivr.net/gh/stdlib-js/blas-ext-base-gfill@v0.2.3-esm/index.mjs";import qr from"https://cdn.jsdelivr.net/gh/stdlib-js/iter-length@esm/index.mjs";import Wr from"https://cdn.jsdelivr.net/gh/stdlib-js/blas-ext-base-gfill-by@v0.2.3-esm/index.mjs";import Gr from"https://cdn.jsdelivr.net/gh/stdlib-js/iter-length@v0.2.3-esm/index.mjs";import Jr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-arraybuffer@esm/index.mjs";import $r from"https://cdn.jsdelivr.net/gh/stdlib-js/string-base-lowercase@esm/index.mjs";import Kr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-prototype-of@v0.2.3-esm/index.mjs";import Hr from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-bytes-per-element@esm/index.mjs";import Qr from"https://cdn.jsdelivr.net/gh/stdlib-js/string-base-capitalize@esm/index.mjs";import Zr from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-iterator-like@esm/index.mjs";import{isPrimitive as Xr}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-number@esm/index.mjs";import rt from"https://cdn.jsdelivr.net/gh/stdlib-js/complex-dtype@esm/index.mjs";import tt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-typed-array@esm/index.mjs";import et from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-complex-typed-array@esm/index.mjs";import nt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-booleanarray@esm/index.mjs";import it from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-instance-of@esm/index.mjs";import ot from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-get-prototype-of@esm/index.mjs";import at from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-plain-object@esm/index.mjs";import st from"https://cdn.jsdelivr.net/gh/stdlib-js/dstructs-linked-list@esm/index.mjs";import ut from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-inherit@esm/index.mjs";import lt from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-assert-is-negative-zero@esm/index.mjs";import ft from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-float64-pinf@esm/index.mjs";import ct from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-float64-ninf@esm/index.mjs";import ht from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-float32-smallest-subnormal@esm/index.mjs";import dt from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-float32-max-safe-integer@esm/index.mjs";import pt from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-float32-min-safe-integer@esm/index.mjs";import mt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-typed-array-like@esm/index.mjs";import gt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-complex64array@esm/index.mjs";import vt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-complex128array@esm/index.mjs";import yt from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-ceil2@esm/index.mjs";import wt from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-log2@esm/index.mjs";import bt from"https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-min@esm/index.mjs";import Et from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import xt from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-index-modes@esm/index.mjs";import Tt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-sharedarraybuffer-support@v0.2.3-esm/index.mjs";import jt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-array-like@esm/index.mjs";import _t from"https://cdn.jsdelivr.net/gh/stdlib-js/proxy-ctor@esm/index.mjs";import Vt from"https://cdn.jsdelivr.net/gh/stdlib-js/object-assign@esm/index.mjs";import kt from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-method-in@esm/index.mjs";import At from"https://cdn.jsdelivr.net/gh/stdlib-js/string-base-trim@esm/index.mjs";import Ft from"https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-seq2slice@esm/index.mjs";import St from"https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-str2slice@esm/index.mjs";import Pt from"https://cdn.jsdelivr.net/gh/stdlib-js/string-base-starts-with@esm/index.mjs";import Bt from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-array@v0.2.3-esm/index.mjs";export{default as constants}from"https://cdn.jsdelivr.net/gh/stdlib-js/constants-array@v0.2.3-esm/index.mjs";var Lt="function";function Rt(r){return typeof r.get===Lt&&typeof r.set===Lt}var It={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 Mt(r){var t=It[r];return"function"==typeof t?t:It.default}var Ot={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 Ct(r){var t=Ot[r];return"function"==typeof t?t:Ot.default}var Nt={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 Dt(r){var t=Nt[r];return"function"==typeof t?t:Nt.default}var Ut={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 zt(r){var t=Ut[r];return"function"==typeof t?t:Ut.default}var Yt={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"},qt="function"==typeof Float64Array?Float64Array:void 0;var Wt=a()?qt:function(){throw new Error("not implemented")},Gt="function"==typeof Float32Array?Float32Array:void 0;var Jt=s()?Gt:function(){throw new Error("not implemented")},$t="function"==typeof Uint32Array?Uint32Array:void 0;var Kt=u()?$t:function(){throw new Error("not implemented")},Ht="function"==typeof Int32Array?Int32Array:void 0;var Qt=l()?Ht:function(){throw new Error("not implemented")},Zt="function"==typeof Uint16Array?Uint16Array:void 0;var Xt=f()?Zt:function(){throw new Error("not implemented")},re="function"==typeof Int16Array?Int16Array:void 0;var te=c()?re:function(){throw new Error("not implemented")},ee="function"==typeof Uint8Array?Uint8Array:void 0;var ne=h()?ee:function(){throw new Error("not implemented")},ie="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var oe=d()?ie:function(){throw new Error("not implemented")},ae="function"==typeof Int8Array?Int8Array:void 0;var se=p()?ae:function(){throw new Error("not implemented")},ue=8;function le(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===ue}var fe=16;function ce(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===fe}function he(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(n=e.value,g(n)&&n.length>=2)t.push(n[0],n[1]);else{if(!j(n))return new TypeError(O("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(B(n),L(n))}return t}var de=2*Jt.BYTES_PER_ELEMENT,pe=k();function me(r){return r instanceof ye||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ge(r){return r===ye||"Complex128Array"===r.name}function ve(r,t){return new S(r[t*=2],r[t+1])}function ye(){var r,t,n,o;if(t=arguments.length,!(this instanceof ye))return 0===t?new ye:1===t?new ye(arguments[0]):2===t?new ye(arguments[0],arguments[1]):new ye(arguments[0],arguments[1],arguments[2]);if(0===t)n=new Jt(0);else if(1===t)if(m(arguments[0]))n=new Jt(2*arguments[0]);else if(v(arguments[0]))if((o=(n=arguments[0]).length)&&i(n)&&j(n[0])){if(n=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(n=t[i],!j(n))return null;r[o]=B(n),r[o+1]=L(n),o+=2}return r}(new Jt(2*o),n),null===n){if(!_(o))throw new RangeError(P("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",o));n=new Jt(arguments[0])}}else{if(le(n))n=I(n,0);else if(ce(n))n=M(n,0);else if(!_(o))throw new RangeError(P("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",o));n=new Jt(n)}else if(y(arguments[0])){if(!V((n=arguments[0]).byteLength/de))throw new RangeError(P("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",de,n.byteLength));n=new Jt(n)}else{if(!w(arguments[0]))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===pe)throw new TypeError(P("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!T(n[A]))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(n=n[A](),!T(n.next))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=he(n))instanceof Error)throw n;n=new Jt(n)}else{if(!y(n=arguments[0]))throw new TypeError(P("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!m(r=arguments[1]))throw new TypeError(P("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!V(r/de))throw new RangeError(P("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",de,r));if(2===t){if(o=n.byteLength-r,!V(o/de))throw new RangeError(P("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",de,o));n=new Jt(n,r)}else{if(!m(o=arguments[2]))throw new TypeError(P("invalid argument. Length must be a nonnegative integer. Value: `%s`.",o));if(o*de>n.byteLength-r)throw new RangeError(P("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",o*de));n=new Jt(n,r,2*o)}}return e(this,"_buffer",n),e(this,"_length",n.length/2),this}function we(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(n=e.value,g(n)&&n.length>=2)t.push(n[0],n[1]);else{if(!j(n))return new TypeError(O("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(N(n),D(n))}return t}e(ye,"BYTES_PER_ELEMENT",de),e(ye,"name","Complex64Array"),e(ye,"from",(function(r){var t,e,n,i,o,a,s,u,l,f,c,h;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ge(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!T(n=arguments[1]))throw new TypeError(P("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(me(r)){if(u=r.length,n){for(o=(i=new this(u))._buffer,h=0,c=0;c<u;c++){if(f=n.call(t,r.get(c),c),j(f))o[h]=B(f),o[h+1]=L(f);else{if(!(g(f)&&f.length>=2))throw new TypeError(P("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[h]=f[0],o[h+1]=f[1]}h+=2}return i}return new this(r)}if(v(r)){if(n){for(u=r.length,s=r.get&&r.set?Dt("default"):Mt("default"),c=0;c<u;c++)if(!j(s(r,c))){l=!0;break}if(l){if(!_(u))throw new RangeError(P("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,u));for(o=(i=new this(u/2))._buffer,c=0;c<u;c++)o[c]=n.call(t,s(r,c),c);return i}for(o=(i=new this(u))._buffer,h=0,c=0;c<u;c++){if(f=n.call(t,s(r,c),c),j(f))o[h]=B(f),o[h+1]=L(f);else{if(!(g(f)&&f.length>=2))throw new TypeError(P("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[h]=f[0],o[h+1]=f[1]}h+=2}return i}return new this(r)}if(w(r)&&pe&&T(r[A])){if(o=r[A](),!T(o.next))throw new TypeError(P("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,o=t.call(e,i.value,a),g(o)&&o.length>=2)n.push(o[0],o[1]);else{if(!j(o))return new TypeError(O("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(B(o),L(o))}return n}(o,n,t):he(o),a instanceof Error)throw a;for(o=(i=new this(u=a.length/2))._buffer,c=0;c<u;c++)o[c]=a[c];return i}throw new TypeError(P("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),e(ye,"of",(function(){var r,t;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ge(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)})),e(ye.prototype,"at",(function(r){if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!V(r))throw new TypeError(P("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return ve(this._buffer,r)})),F(ye.prototype,"buffer",(function(){return this._buffer.buffer})),F(ye.prototype,"byteLength",(function(){return this._buffer.byteLength})),F(ye.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),e(ye.prototype,"BYTES_PER_ELEMENT",ye.BYTES_PER_ELEMENT),e(ye.prototype,"copyWithin",(function(r,t){if(!me(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})),e(ye.prototype,"entries",(function(){var r,t,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,n=this._length,a=-1,e(t={},"next",(function(){if(a+=1,o||a>=n)return{done:!0};return{value:[a,ve(i,a)],done:!1}})),e(t,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(t,A,(function(){return r.entries()})),t})),e(ye.prototype,"every",(function(r,t){var e,n;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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,ve(e,n),n,this))return!1;return!0})),e(ye.prototype,"fill",(function(r,t,e){var n,i,o,a,s,u;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!V(e))throw new TypeError(P("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=B(r),s=L(r),u=t;u<e;u++)n[o=2*u]=a,n[o+1]=s;return this})),e(ye.prototype,"filter",(function(r,t){var e,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=ve(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),e(ye.prototype,"find",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=ve(e,n),r.call(t,i,n,this))return i})),e(ye.prototype,"findIndex",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=ve(e,n),r.call(t,i,n,this))return n;return-1})),e(ye.prototype,"findLast",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=ve(e,n),r.call(t,i,n,this))return i})),e(ye.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=ve(e,n),r.call(t,i,n,this))return n;return-1})),e(ye.prototype,"forEach",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=ve(e,n),r.call(t,i,n,this)})),e(ye.prototype,"get",(function(r){if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!m(r))throw new TypeError(P("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return ve(this._buffer,r)})),e(ye.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=B(r),o=L(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),e(ye.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=B(r),o=L(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),e(ye.prototype,"join",(function(r){var t,e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!x(r))throw new TypeError(P("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(ve(e,i).toString());return t.join(n)})),e(ye.prototype,"keys",(function(){var r,t,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._length,o=-1,e(t={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:o,done:!1}})),e(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(t,A,(function(){return r.keys()})),t})),e(ye.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("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=B(r),o=L(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),F(ye.prototype,"length",(function(){return this._length})),e(ye.prototype,"map",(function(r,t){var e,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(a=r.call(t,ve(n,o),o,this),j(a))e[2*o]=B(a),e[2*o+1]=L(a);else{if(!g(a)||2!==a.length)throw new TypeError(P("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})),e(ye.prototype,"reduce",(function(r,t){var e,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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=ve(e,0),o=1}for(;o<i;o++)n=r(n,ve(e,o),o,this);return n})),e(ye.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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=ve(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,ve(e,o),o,this);return n})),e(ye.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=R(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})),e(ye.prototype,"set",(function(r){var t,e,n,i,o,a,s,u,l;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!m(e=arguments[1]))throw new TypeError(P("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(j(r)){if(e>=this._length)throw new RangeError(P("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=B(r),void(n[e+1]=L(r))}if(me(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*de,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Jt(t.length),u=0;u<t.length;u++)i[u]=t[u];t=i}for(e*=2,l=0,u=0;u<a;u++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!v(r))throw new TypeError(P("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,u=0;u<a;u++)if(!j(r[u])){o=!0;break}if(o){if(!_(a))throw new RangeError(P("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*de,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Jt(a),u=0;u<a;u++)i[u]=t[u];t=i}for(e*=2,a/=2,l=0,u=0;u<a;u++)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,u=0;u<a;u++)s=r[u],n[e]=B(s),n[e+1]=L(s),e+=2}})),e(ye.prototype,"slice",(function(r,t){var e,n,i,o,a,s,u;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,s=this._length,0===arguments.length)r=0,t=s;else{if(!V(r))throw new TypeError(P("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=s)<0&&(r=0),1===arguments.length)t=s;else{if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=s)<0&&(t=0):t>s&&(t=s)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)o=2*(u+r),n[2*u]=a[o],n[2*u+1]=a[o+1];return i})),e(ye.prototype,"some",(function(r,t){var e,n;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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,ve(e,n),n,this))return!0;return!1})),e(ye.prototype,"sort",(function(r){var t,e,n,i,o;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(ve(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=B(t[i]),e[o+1]=L(t[i]);return this})),e(ye.prototype,"subarray",(function(r,t){var e,n,i;if(!me(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(!V(r))throw new TypeError(P("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(!V(t))throw new TypeError(P("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*de):(i=t-r,e=n.byteOffset+r*de),new this.constructor(n.buffer,e,i<0?0:i)})),e(ye.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!x(r)&&!b(r))throw new TypeError(P("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(!w(t))throw new TypeError(P("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(ve(o,a).toLocaleString(n,e));return i.join(",")})),e(ye.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!me(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})),e(ye.prototype,"toSorted",(function(r){var t,e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(ve(e,i));return t.sort(r),new ye(t)})),e(ye.prototype,"toString",(function(){var r,t,e;if(!me(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(ve(t,e).toString());return r.join(",")})),e(ye.prototype,"values",(function(){var r,t,n,i,o,a;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,o=this._buffer,n=this._length,a=-1,e(r={},"next",(function(){if(a+=1,i||a>=n)return{done:!0};return{value:ve(o,a),done:!1}})),e(r,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(r,A,(function(){return t.values()})),r})),e(ye.prototype,"with",(function(r,t){var e,n,i;if(!me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!V(r))throw new TypeError(P("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(P("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!j(t))throw new TypeError(P("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=B(t),e[2*r+1]=L(t),n}));var be=2*Wt.BYTES_PER_ELEMENT,Ee=k();function xe(r){return r instanceof _e||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Te(r){return r===_e||"Complex64Array"===r.name}function je(r,t){return new C(r[t*=2],r[t+1])}function _e(){var r,t,n,o;if(t=arguments.length,!(this instanceof _e))return 0===t?new _e:1===t?new _e(arguments[0]):2===t?new _e(arguments[0],arguments[1]):new _e(arguments[0],arguments[1],arguments[2]);if(0===t)n=new Wt(0);else if(1===t)if(m(arguments[0]))n=new Wt(2*arguments[0]);else if(v(arguments[0]))if((o=(n=arguments[0]).length)&&i(n)&&j(n[0])){if(n=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(n=t[i],!j(n))return null;r[o]=N(n),r[o+1]=D(n),o+=2}return r}(new Wt(2*o),n),null===n){if(!_(o))throw new RangeError(P("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",o));n=new Wt(arguments[0])}}else{if(le(n))n=I(n,0);else if(ce(n))n=M(n,0);else if(!_(o))throw new RangeError(P("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",o));n=new Wt(n)}else if(y(arguments[0])){if(!V((n=arguments[0]).byteLength/be))throw new RangeError(P("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",be,n.byteLength));n=new Wt(n)}else{if(!w(arguments[0]))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===Ee)throw new TypeError(P("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!T(n[A]))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(n=n[A](),!T(n.next))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=we(n))instanceof Error)throw n;n=new Wt(n)}else{if(!y(n=arguments[0]))throw new TypeError(P("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!m(r=arguments[1]))throw new TypeError(P("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!V(r/be))throw new RangeError(P("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",be,r));if(2===t){if(o=n.byteLength-r,!V(o/be))throw new RangeError(P("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",be,o));n=new Wt(n,r)}else{if(!m(o=arguments[2]))throw new TypeError(P("invalid argument. Length must be a nonnegative integer. Value: `%s`.",o));if(o*be>n.byteLength-r)throw new RangeError(P("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",o*be));n=new Wt(n,r,2*o)}}return e(this,"_buffer",n),e(this,"_length",n.length/2),this}function Ve(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(G(e.value));return t}e(_e,"BYTES_PER_ELEMENT",be),e(_e,"name","Complex128Array"),e(_e,"from",(function(r){var t,e,n,i,o,a,s,u,l,f,c,h;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Te(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!T(n=arguments[1]))throw new TypeError(P("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(xe(r)){if(u=r.length,n){for(o=(i=new this(u))._buffer,h=0,c=0;c<u;c++){if(f=n.call(t,r.get(c),c),j(f))o[h]=N(f),o[h+1]=D(f);else{if(!(g(f)&&f.length>=2))throw new TypeError(P("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[h]=f[0],o[h+1]=f[1]}h+=2}return i}return new this(r)}if(v(r)){if(n){for(u=r.length,s=r.get&&r.set?Dt("default"):Mt("default"),c=0;c<u;c++)if(!j(s(r,c))){l=!0;break}if(l){if(!_(u))throw new RangeError(P("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",u));for(o=(i=new this(u/2))._buffer,c=0;c<u;c++)o[c]=n.call(t,s(r,c),c);return i}for(o=(i=new this(u))._buffer,h=0,c=0;c<u;c++){if(f=n.call(t,s(r,c),c),j(f))o[h]=N(f),o[h+1]=D(f);else{if(!(g(f)&&f.length>=2))throw new TypeError(P("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[h]=f[0],o[h+1]=f[1]}h+=2}return i}return new this(r)}if(w(r)&&Ee&&T(r[A])){if(o=r[A](),!T(o.next))throw new TypeError(P("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,o=t.call(e,i.value,a),g(o)&&o.length>=2)n.push(o[0],o[1]);else{if(!j(o))return new TypeError(O("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(N(o),D(o))}return n}(o,n,t):we(o),a instanceof Error)throw a;for(o=(i=new this(u=a.length/2))._buffer,c=0;c<u;c++)o[c]=a[c];return i}throw new TypeError(P("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),e(_e,"of",(function(){var r,t;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Te(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)})),e(_e.prototype,"at",(function(r){if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!V(r))throw new TypeError(P("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return je(this._buffer,r)})),F(_e.prototype,"buffer",(function(){return this._buffer.buffer})),F(_e.prototype,"byteLength",(function(){return this._buffer.byteLength})),F(_e.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),e(_e.prototype,"BYTES_PER_ELEMENT",_e.BYTES_PER_ELEMENT),e(_e.prototype,"copyWithin",(function(r,t){if(!xe(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})),e(_e.prototype,"entries",(function(){var r,t,n,i,o,a,s;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,i=this._length,a=-1,s=-2,e(n={},"next",(function(){var t;if(a+=1,o||a>=i)return{done:!0};return t=new C(r[s+=2],r[s+1]),{value:[a,t],done:!1}})),e(n,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(n,A,(function(){return t.entries()})),n})),e(_e.prototype,"every",(function(r,t){var e,n;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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,je(e,n),n,this))return!1;return!0})),e(_e.prototype,"fill",(function(r,t,e){var n,i,o,a,s,u;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!V(e))throw new TypeError(P("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=N(r),s=D(r),u=t;u<e;u++)n[o=2*u]=a,n[o+1]=s;return this})),e(_e.prototype,"filter",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=je(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),e(_e.prototype,"find",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=je(e,n),r.call(t,i,n,this))return i})),e(_e.prototype,"findIndex",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=je(e,n),r.call(t,i,n,this))return n;return-1})),e(_e.prototype,"findLast",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=je(e,n),r.call(t,i,n,this))return i})),e(_e.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=je(e,n),r.call(t,i,n,this))return n;return-1})),e(_e.prototype,"forEach",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=je(e,n),r.call(t,i,n,this)})),e(_e.prototype,"get",(function(r){if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!m(r))throw new TypeError(P("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return je(this._buffer,r)})),F(_e.prototype,"length",(function(){return this._length})),e(_e.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=N(r),o=D(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),e(_e.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=N(r),o=D(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),e(_e.prototype,"join",(function(r){var t,e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!E(r))throw new TypeError(P("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(je(e,i).toString());return t.join(n)})),e(_e.prototype,"keys",(function(){var r,t,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._length,o=-1,e(t={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:o,done:!1}})),e(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(t,A,(function(){return r.keys()})),t})),e(_e.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!j(r))throw new TypeError(P("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!V(t))throw new TypeError(P("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=N(r),o=D(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),e(_e.prototype,"map",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(a=r.call(t,je(n,o),o,this),j(a))e[2*o]=N(a),e[2*o+1]=D(a);else{if(!g(a)||2!==a.length)throw new TypeError(P("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})),e(_e.prototype,"reduce",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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=je(e,0),o=1}for(;o<i;o++)n=r(n,je(e,o),o,this);return n})),e(_e.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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=je(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,je(e,o),o,this);return n})),e(_e.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=R(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})),e(_e.prototype,"set",(function(r){var t,e,n,i,o,a,s,u,l;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!m(e=arguments[1]))throw new TypeError(P("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(j(r)){if(e>=this._length)throw new RangeError(P("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=N(r),void(n[e+1]=D(r))}if(xe(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*be,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Wt(t.length),u=0;u<t.length;u++)i[u]=t[u];t=i}for(e*=2,l=0,u=0;u<a;u++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!v(r))throw new TypeError(P("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,u=0;u<a;u++)if(!j(r[u])){o=!0;break}if(o){if(!_(a))throw new RangeError(P("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*be,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Wt(a),u=0;u<a;u++)i[u]=t[u];t=i}for(e*=2,a/=2,l=0,u=0;u<a;u++)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,u=0;u<a;u++)s=r[u],n[e]=N(s),n[e+1]=D(s),e+=2}})),e(_e.prototype,"slice",(function(r,t){var e,n,i,o,a,s,u;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,s=this._length,0===arguments.length)r=0,t=s;else{if(!V(r))throw new TypeError(P("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=s)<0&&(r=0),1===arguments.length)t=s;else{if(!V(t))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=s)<0&&(t=0):t>s&&(t=s)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)o=2*(u+r),n[2*u]=a[o],n[2*u+1]=a[o+1];return i})),e(_e.prototype,"some",(function(r,t){var e,n;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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,je(e,n),n,this))return!0;return!1})),e(_e.prototype,"sort",(function(r){var t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(je(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=N(t[i]),e[o+1]=D(t[i]);return this})),e(_e.prototype,"subarray",(function(r,t){var e,n,i;if(!xe(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(!V(r))throw new TypeError(P("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(!V(t))throw new TypeError(P("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*be):(i=t-r,e=n.byteOffset+r*be),new this.constructor(n.buffer,e,i<0?0:i)})),e(_e.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!E(r)&&!b(r))throw new TypeError(P("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(!w(t))throw new TypeError(P("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(je(o,a).toLocaleString(n,e));return i.join(",")})),e(_e.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!xe(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})),e(_e.prototype,"toSorted",(function(r){var t,e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!T(r))throw new TypeError(P("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(je(e,i));return t.sort(r),new _e(t)})),e(_e.prototype,"toString",(function(){var r,t,e;if(!xe(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(je(t,e).toString());return r.join(",")})),e(_e.prototype,"values",(function(){var r,t,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,o=this._buffer,n=this._length,a=-1,e(r={},"next",(function(){if(a+=1,i||a>=n)return{done:!0};return{value:je(o,a),done:!1}})),e(r,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),A&&e(r,A,(function(){return t.values()})),r})),e(_e.prototype,"with",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!V(r))throw new TypeError(P("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(P("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!j(t))throw new TypeError(P("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=N(t),e[2*r+1]=D(t),n}));var ke=ne.BYTES_PER_ELEMENT,Ae=q();function Fe(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===ke}function Se(r){return r===Pe}function Pe(){var r,t,n,i,o;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)n=new ne(0);else if(1===t)if(m(o=arguments[0]))n=new ne(o);else if(v(o))n=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=G(t[n]);return r}(new ne(o.length),o);else if(y(o))n=new ne(o);else{if(!w(o))throw new TypeError(O("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",o));if(!1===Ae)throw new TypeError(O("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",o));if(!T(o[W]))throw new TypeError(O("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",o));if(n=o[W](),!T(n.next))throw new TypeError(O("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",o));n=new ne(Ve(n))}else{if(!y(n=arguments[0]))throw new TypeError(O("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!m(r=arguments[1]))throw new TypeError(O("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)n=new ne(n,r);else{if(!m(i=arguments[2]))throw new TypeError(O("invalid argument. Length must be a nonnegative integer. Value: `%s`.",i));if(i*ke>n.byteLength-r)throw new RangeError(O("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*ke));n=new ne(n,r,i)}}return e(this,"_buffer",n),e(this,"_length",n.length),this}e(Pe,"BYTES_PER_ELEMENT",ke),e(Pe,"name","BooleanArray"),e(Pe,"from",(function(r){var t,e,n,i,o,a,s,u,l;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Se(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!T(n=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(v(r)){if(n){for(u=r.length,s=r.get&&r.set?Dt("default"):Mt("default"),o=(i=new this(u))._buffer,l=0;l<u;l++)o[l]=G(n.call(t,s(r,l),l));return i}return new this(r)}if(w(r)&&Ae&&T(r[W])){if(o=r[W](),!T(o.next))throw new TypeError(O("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(G(t.call(e,i.value,o)));return n}(o,n,t):Ve(o),o=(i=new this(u=a.length))._buffer,l=0;l<u;l++)o[l]=a[l];return i}throw new TypeError(O("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),e(Pe,"of",(function(){var r,t;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Se(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)})),e(Pe.prototype,"at",(function(r){var t,e;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Y(r))throw new TypeError(O("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 G(t[r])})),F(Pe.prototype,"buffer",(function(){return this._buffer.buffer})),F(Pe.prototype,"byteLength",(function(){return this._buffer.byteLength})),F(Pe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),e(Pe.prototype,"BYTES_PER_ELEMENT",Pe.BYTES_PER_ELEMENT),e(Pe.prototype,"copyWithin",(function(r,t){if(!Fe(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})),e(Pe.prototype,"entries",(function(){var r,t,n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,i=this._buffer,n=this._length,a=-1,e(t={},"next",(function(){if(a+=1,o||a>=n)return{done:!0};return{value:[a,G(i[a])],done:!1}})),e(t,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(t,W,(function(){return r.entries()})),t})),e(Pe.prototype,"every",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("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,G(e[n]),n,this))return!1;return!0})),e(Pe.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!U(r))throw new TypeError(O("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Y(t))throw new TypeError(O("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Y(e))throw new TypeError(O("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})),e(Pe.prototype,"filter",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=G(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),e(Pe.prototype,"find",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=G(e[i]),r.call(t,n,i,this))return n})),e(Pe.prototype,"findIndex",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=G(e[i]),r.call(t,n,i,this))return i;return-1})),e(Pe.prototype,"findLast",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=G(e[i]),r.call(t,n,i,this))return n})),e(Pe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=G(e[i]),r.call(t,n,i,this))return i;return-1})),e(Pe.prototype,"forEach",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,G(e[n]),n,this)})),e(Pe.prototype,"get",(function(r){if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!m(r))throw new TypeError(O("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return G(this._buffer[r])})),e(Pe.prototype,"includes",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!U(r))throw new TypeError(O("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Y(t))throw new TypeError(O("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===G(e[n]))return!0;return!1})),e(Pe.prototype,"indexOf",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!U(r))throw new TypeError(O("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Y(t))throw new TypeError(O("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===G(e[n]))return n;return-1})),e(Pe.prototype,"join",(function(r){var t,e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!x(r))throw new TypeError(O("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)})),e(Pe.prototype,"keys",(function(){var r,t,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._length,o=-1,e(t={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:o,done:!1}})),e(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(t,W,(function(){return r.keys()})),t})),e(Pe.prototype,"lastIndexOf",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!U(r))throw new TypeError(O("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Y(t))throw new TypeError(O("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===G(e[n]))return n;return-1})),F(Pe.prototype,"length",(function(){return this._length})),e(Pe.prototype,"map",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(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]=G(r.call(t,G(i[o]),o,this));return n})),e(Pe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("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=G(e[0]),o=1}for(;o<n;o++)i=r(i,G(e[o]),o,this);return i})),e(Pe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("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=G(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,G(e[o]),o,this);return i})),e(Pe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=R(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),e(Pe.prototype,"set",(function(r){var t,e,n,i,o,a,s;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!m(e=arguments[1]))throw new TypeError(O("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(v(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Fe(r)?r._buffer:r,s=n.byteOffset+e*ke,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new ne(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(O("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),e(Pe.prototype,"slice",(function(r,t){var e,n,i,o,a,s;if(!Fe(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(!Y(r))throw new TypeError(O("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(!Y(t))throw new TypeError(O("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,s=0;s<e;s++)n[s]=o[s+r];return i})),e(Pe.prototype,"some",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!T(r))throw new TypeError(O("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,G(e[n]),n,this))return!0;return!1})),e(Pe.prototype,"sort",(function(r){var t;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(G(t),G(e))})),this})),e(Pe.prototype,"subarray",(function(r,t){var e,n,i;if(!Fe(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(!Y(r))throw new TypeError(O("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(!Y(t))throw new TypeError(O("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)})),e(Pe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!x(r)&&!b(r))throw new TypeError(O("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(!w(t))throw new TypeError(O("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(G(o[a]).toLocaleString(n,e));return i.join(",")})),e(Pe.prototype,"toReversed",(function(){var r,t,e,n,i;if(!Fe(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})),e(Pe.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!Fe(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(!T(r))throw new TypeError(O("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(G(t),G(e))})),e})),e(Pe.prototype,"toString",(function(){var r,t,e;if(!Fe(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(",")})),e(Pe.prototype,"values",(function(){var r,t,n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,o=this._buffer,n=this._length,a=-1,e(r={},"next",(function(){if(a+=1,i||a>=n)return{done:!0};return{value:G(o[a]),done:!1}})),e(r,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(r,W,(function(){return t.values()})),r})),e(Pe.prototype,"with",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Y(r))throw new TypeError(O("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(O("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!U(t))throw new TypeError(O("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 Be=[Wt,Jt,Qt,Kt,te,Xt,se,ne,oe,ye,_e,Pe],Le=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Re=Le.length;function Ie(r){var t;if(i(r))return"generic";if(n(r))return null;for(t=0;t<Re;t++)if(r instanceof Be[t])return Le[t];return Yt[o(r)]||null}function Me(r){var t=Ie(r);return Rt(r)?{accessorProtocol:!0,accessors:[Dt(t),zt(t)]}:{accessorProtocol:!1,accessors:[Mt(t),Ct(t)]}}function Oe(r){var t;if(!(this instanceof Oe))return new Oe(r);if(!v(r))throw new TypeError(O("invalid argument. Must provide an array-like object. Value: `%s`.",r));return t=Me(r),this._buffer=r,this._getter=t.accessors[0],this._setter=t.accessors[1],this}e(Oe,"name","AccessorArray"),t(Oe.prototype,"length",(function(){return this._buffer.length}),(function(r){this._buffer.length=r})),e(Oe.prototype,"get",(function(r){return this._getter(this._buffer,r)})),e(Oe.prototype,"set",(function(r,t){arguments.length<2?this._setter(this._buffer,0,r):this._setter(this._buffer,t,r)}));var Ce=1;function Ne(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ce}function De(r){var t=Ie(r);return Rt(r)?{data:r,dtype:t,accessorProtocol:!0,accessors:[Dt(t),zt(t)]}:{data:r,dtype:t,accessorProtocol:!1,accessors:[Mt(t),Ct(t)]}}function Ue(r){var t;for(t=0;t<r.length;t++)if(r[t])return!0;return!1}function ze(r){var t=Ie(r);return Rt(r)?Dt(t):Mt(t)}function Ye(r,t){var e,n,i,o;for(i=Ie(r),n=Rt(r)?Dt(i):Mt(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}function qe(r){var t,e,n;if(!v(r))throw new TypeError(O("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=Ie(r),Rt(r)&&(t=Dt(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 We(r,t,e,n){var i;for(i=0;i<r.length;i++)if(!n(r[i],t[i],e))return!1;return!0}function Ge(r,t,e,n){var i,o,a,s,u;for(i=r.data,o=t.data,a=r.accessors[0],s=t.accessors[0],u=0;u<i.length;u++)if(!n(a(i,u),s(o,u),e))return!1;return!0}function Je(r,t,e,n){var i;for(i=0;i<r.length;i++)if(!n(r[i],t[i],e))return!1;return!0}function $e(r,t,e,n){var i,o,a,s,u;for(i=r.data,o=t.data,a=r.accessors[0],s=t.accessors[0],u=0;u<i.length;u++)if(!n(a(i,u),s(o,u),e))return!1;return!0}function Ke(r,t){var e;for(e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function He(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 Qe(r,t){var e;for(e=0;e<r.length;e++)if(!ir(r[e],t[e]))return!1;return!0}function Ze(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(!ir(i(e,a),o(n,a)))return!1;return!0}e(Ye,"factory",qe);var Xe={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"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]},rn=/_and_generic$/;function tn(){var r,t,e;return 0===arguments.length?Xe.all.slice():(e=!1,r=arguments[0],rn.test(r)&&"all"!==(r=or(r,rn,""))&&"index"!==r&&(e=!0),t=(t=Xe[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}var en=qe(tn("boolean")),nn=["little-endian","big-endian"];function on(){return nn.slice()}var an=qe(on()),sn=qe(tn("complex_floating_point")),un=8,ln=16;function fn(r){return"object"==typeof r&&null!==r&&("Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===ln||"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===un)}var cn,hn=qe(tn()),dn=qe(tn("floating_point")),pn=qe(tn("integer")),mn={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 gn(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(mn)).length,u=0;u<t;u++){for(i=r[u],a=mn[i],n={},s=0;s<t;s++)n[o=r[s]]=a[o];e[i]=n}return e}():(void 0===cn&&(cn=function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(mn)).length,u=0;u<t;u++){for(i=r[u],a=mn[i],n=[],s=0;s<t;s++)1===a[o=r[s]]&&n.push(o);e[i]=n}return e}()),r=sr(r),H(cn,r)?cn[r].slice():null)}var vn=gn();function yn(r,t){return r===t||vn[r][t]>0}var wn,bn=qe(tn("numeric")),En=qe(tn("real")),xn=qe(tn("real_floating_point")),Tn={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 jn(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(Tn)).length,u=0;u<t;u++){for(i=r[u],a=Tn[i],n={},s=0;s<t;s++)n[o=r[s]]=a[o];e[i]=n}return e}():(void 0===wn&&(wn=function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(Tn)).length,u=0;u<t;u++){for(i=r[u],a=Tn[i],n=[],s=0;s<t;s++)1===a[o=r[s]]&&n.push(o);e[i]=n}return e}()),r=sr(r),H(wn,r)?wn[r].slice():null)}var _n=jn();function Vn(r,t){return r===t||_n[r][t]>0}var kn,An={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 Fn(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(An)).length,u=0;u<t;u++){for(i=r[u],a=An[i],n={},s=0;s<t;s++)n[o=r[s]]=a[o];e[i]=n}return e}():(void 0===kn&&(kn=function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(An)).length,u=0;u<t;u++){for(i=r[u],a=An[i],n=[],s=0;s<t;s++)1===a[o=r[s]]&&n.push(o);e[i]=n}return e}()),r=sr(r),H(kn,r)?kn[r].slice():null)}var Sn=Fn();var Pn=qe(tn("signed_integer"));var Bn=qe(tn("unsigned_integer")),Ln={};function Rn(r,t){var e,n;for(e=[],n=0;n<t;n++)e.push(r);return e}function In(r,t){var e,n,i,o;for(n=t[1],i=t[0],e=[],o=0;o<i;o++)e.push(Rn(r,n));return e}function Mn(r){return In(0,r)}r(Ln,"contains",Ye),r(Ln,"hasAlmostEqualValues",(function(r,t,e){var n,i,o,a,s;return r.length===t.length&&(i=De(r),o=De(t),i.accessorProtocol||o.accessorProtocol?(n=2,Ne(r)?Ne(t)?We(K(r,0),K(t,0),e,X):Ge(i,o,e,rr):(ce(r)?(a=J(r,0),n-=1):le(r)&&(a=$(r,0),n-=1),ce(t)?(s=J(t,0),n-=1):le(t)&&(s=$(t,0),n-=1),0===n?8===a.BYTES_PER_ELEMENT||8===s.BYTES_PER_ELEMENT?We(a,s,e,X):We(a,s,e,Z):Ge(i,o,e,rr))):4===r.BYTES_PER_ELEMENT&&4===t.BYTES_PER_ELEMENT?We(r,t,e,Z):We(r,t,e,rr))})),r(Ln,"hasAlmostSameValues",(function(r,t,e){var n,i,o,a,s;return r.length===t.length&&(i=De(r),o=De(t),i.accessorProtocol||o.accessorProtocol?(n=2,Ne(r)?Ne(t)?Je(K(r,0),K(t,0),e,er):$e(i,o,e,nr):(ce(r)?(a=J(r,0),n-=1):le(r)&&(a=$(r,0),n-=1),ce(t)?(s=J(t,0),n-=1):le(t)&&(s=$(t,0),n-=1),0===n?8===a.BYTES_PER_ELEMENT||8===s.BYTES_PER_ELEMENT?Je(a,s,e,er):Je(a,s,e,tr):$e(i,o,e,nr))):4===r.BYTES_PER_ELEMENT&&4===t.BYTES_PER_ELEMENT?Je(r,t,e,tr):Je(r,t,e,nr))})),r(Ln,"hasEqualValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=De(r),i=De(t),n.accessorProtocol||i.accessorProtocol?(e=2,Ne(r)?Ne(t)?Ke(K(r,0),K(t,0)):He(n,i):(ce(r)?(o=J(r,0),e-=1):le(r)&&(o=$(r,0),e-=1),ce(t)?(a=J(t,0),e-=1):le(t)&&(a=$(t,0),e-=1),0===e?Ke(o,a):He(n,i))):Ke(r,t))})),r(Ln,"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})),r(Ln,"hasSameValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=De(r),i=De(t),n.accessorProtocol||i.accessorProtocol?(e=2,Ne(r)?Ne(t)?Qe(K(r,0),K(t,0)):Ze(n,i):(ce(r)?(o=J(r,0),e-=1):le(r)&&(o=$(r,0),e-=1),ce(t)?(a=J(t,0),e-=1):le(t)&&(a=$(t,0),e-=1),0===e?Qe(o,a):Ze(n,i))):Qe(r,t))})),r(Ln,"isAccessorArray",Rt),r(Ln,"isBooleanDataType",en),r(Ln,"isBooleanArray",Ne),r(Ln,"isByteOrder",an),r(Ln,"isComplexFloatingPointDataType",sn),r(Ln,"isComplexTypedArray",fn),r(Ln,"isComplex64Array",le),r(Ln,"isComplex128Array",ce),r(Ln,"isDataType",hn),r(Ln,"isFloatingPointDataType",dn),r(Ln,"isIntegerDataType",pn),r(Ln,"isMostlySafeDataTypeCast",yn),r(Ln,"isNumericDataType",bn),r(Ln,"isRealDataType",En),r(Ln,"isRealFloatingPointDataType",xn),r(Ln,"isSafeDataTypeCast",Vn),r(Ln,"isSameKindDataTypeCast",(function(r,t){return r===t||Sn[r][t]>0})),r(Ln,"isSignedIntegerDataType",Pn),r(Ln,"isSortedAscending",(function(r){var t,e,n,i,o,a;if(n=Ie(r),e=Rt(r)?Dt(n):Mt(n),0===(t=r.length))return!1;for(i=e(r,0),a=1;a<t;a++){if(i>(o=e(r,a)))return!1;i=o}return!0})),r(Ln,"isUnsignedIntegerDataType",Bn);var On={};function Cn(r,t,e,n,i,o,a){var s,u,l;if(s=i[o],(u=o+1)!==n)for(l=0;l<s;l++)Cn(r[l],t[l],e[l],n,i,u,a);else for(l=0;l<s;l++)e[l]=a(r[l],t[l])}function Nn(r){var t,e,n;for(e=r.length,t=[],n=0;n<e;n++)t.push(r[n]);return t}function Dn(r){return Rn(0,r)}function Un(r,t,e){var n,i,o,a,s,u,l,f;if((a=e.length)<(s=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=s;l<a;l++)n=[n];for(o=Dn(a),l=a-1;l>=0;l--)if(!((f=s-a+l)<0)){if(u=t[f],0!==(i=e[l])&&i<u)throw new Error(O("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.",Nn(t).join(", "),Nn(e).join(", "),l));if(u===i)o[l]=1;else{if(1!==u)throw new Error(O("invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.",Nn(t).join(", "),Nn(e).join(", "),l));o[l]=0}}return{ref:r,data:n,shape:Nn(e),strides:o}}function zn(r,t){var e,n,i,o,a,s,u,l,f,c;if((s=r.length)<=0||t<=0)return[];for(e=ze(r),a=fr(s,t),o=[],l=0;l<t;l++)o.push(0);for(n=[],l=0;l<a;l++){for(c=l,f=t-1;f>=0;f--)c-=u=c%s,c/=s,o[f]=u;for(i=[],f=0;f<t;f++)i.push(e(r,o[f]));n.push(i)}return n}function Yn(r,t){var e,n,i,o,a,s,u,l;for(e=ze(r),n=ze(t),o=r.length,a=t.length,i=[],u=0;u<o;u++)for(s=e(r,u),l=0;l<a;l++)i.push([s,n(t,l)]);return i}function qn(r){var t,e,n,i,o,a;for(t=ze(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 Wn(r){var t,e,n,i;for(n=ze(r),e=r.length,t=[],i=0;i<e;i++)t.push(n(r,i));return t}function Gn(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]||(t+=1);return t}function Jn(r){return Rt(r)?Ne(r)?Gn(K(r,0)):fn(r)?function(r){var t,e,n;for(t=cr(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=ze(r),e=0,n=0;n<r.length;n++)t(r,n)||(e+=1);return e}(r):Gn(r)}function $n(r){var t,e;if(t=[],r<=0)return t;for(e=0;e<r;e++)t.push(e);return t}function Kn(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}function Hn(r,t,e){var n,i,o,a,s;for(n=r.data,i=r.accessors[0],s=0,o=0;o<t.length;o++)e(i(n,a=t[o]),a,n)&&(t[s]=a,s+=1);return t.length=s,t}function Qn(r,t,e){var n,i,o;for(o=0,n=0;n<t.length;n++)e(r[i=t[n]],i,r)&&(t[o]=i,o+=1);return t.length=o,t}function Zn(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]&&(t+=1);return t}function Xn(r){return Rt(r)?Ne(r)?Zn(K(r,0)):fn(r)?function(r){var t,e,n;for(t=cr(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=ze(r),e=0,n=0;n<r.length;n++)t(r,n)&&(e+=1);return e}(r):Zn(r)}function ri(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!1,s=n,u=0;u<r.length;u+=2)!1===a&&(r[u]||r[u+1])&&(a=!0),o(i,s,a),s+=e;return i}function ti(r,t,e,n){var i=De(r),o=De(t);return i.accessorProtocol||o.accessorProtocol?(ce(r)?ri(J(r,0),o,e,n):le(r)?ri($(r,0),o,e,n):Ne(r)?function(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!1,s=n,u=0;u<r.length;u++)!1===a&&r[u]&&(a=!0),o(i,s,a),s+=e}(K(r,0),o,e,n):function(r,t,e,n){var i,o,a,s,u,l,f;for(i=r.data,o=t.data,a=r.accessors[0],s=t.accessors[1],u=!1,l=n,f=0;f<i.length;f++)!1===u&&a(i,f)&&(u=!0),s(o,l,u),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 ei(r){return ti(r,Rn(!1,r.length),1,0)}function ni(r,t,e,n,i,o){var a=De(r),s=De(t);return a.accessorProtocol||s.accessorProtocol?function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],f=!1,c=n,h=0;h<a.length;h++)!f&&i.call(o,u(a,h),h,r)&&(f=!0),l(s,c,f),c+=e;return s}(a,s,e,n,i,o):(function(r,t,e,n,i,o){var a,s,u;for(a=!1,s=n,u=0;u<r.length;u++)!a&&i.call(o,r[u],u,r)&&(a=!0),t[s]=a,s+=e}(r,t,e,n,i,o),t)}function ii(r,t,e){return ni(r,Rn(!1,r.length),1,0,t,e)}function oi(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],f=!1,c=n,h=a.length-1;h>=0;h--)!f&&i.call(o,u(a,h),h,r)&&(f=!0),l(s,c,f),c+=e}(a,s,e,n,i,o),t):(function(r,t,e,n,i,o){var a,s,u;for(a=!1,s=n,u=r.length-1;u>=0;u--)!a&&i.call(o,r[u],u,r)&&(a=!0),t[s]=a,s+=e}(r,t,e,n,i,o),t)}function ai(r,t,e){return oi(r,Rn(!1,r.length),1,0,t,e)}function si(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!0,s=n,u=0;u<r.length;u+=2)!0!==a||r[u]||r[u+1]||(a=!1),o(i,s,a),s+=e;return i}function ui(r,t,e,n){var i=De(r),o=De(t);return i.accessorProtocol||o.accessorProtocol?(ce(r)?si(J(r,0),o,e,n):le(r)?si($(r,0),o,e,n):Ne(r)?function(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!0,s=n,u=0;u<r.length;u++)!0!==a||r[u]||(a=!1),o(i,s,a),s+=e}(K(r,0),o,e,n):function(r,t,e,n){var i,o,a,s,u,l,f;for(i=r.data,o=t.data,a=r.accessors[0],s=t.accessors[1],u=!0,l=n,f=0;f<i.length;f++)!0!==u||a(i,f)||(u=!1),s(o,l,u),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 li(r){return ui(r,Rn(!0,r.length),1,0)}function fi(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],c=n,f=!0,h=0;h<=a.length-1;h++)f?(i.call(o,u(a,h),h,a)||(f=!1),l(s,c,f),c+=e):(l(s,c,f),c+=e)}(a,s,e,n,i,o),t):(function(r,t,e,n,i,o){var a,s,u;for(a=!0,s=n,u=0;u<=r.length-1;u++)a?(i.call(o,r[u],u,r)||(a=!1),t[s]=a,s+=e):(t[s]=a,s+=e)}(r,t,e,n,i,o),t)}function ci(r,t,e){return fi(r,Rn(!0,r.length),1,0,t,e)}function hi(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],c=n,f=!0,h=a.length-1;h>=0;h--)f&&!i.call(o,u(a,h),h,a)&&(f=!1),l(s,c,f),c+=e}(a,s,e,n,i,o),t):(function(r,t,e,n,i,o){var a,s,u;for(a=!0,s=n,u=r.length-1;u>=0;u--)a&&!i.call(o,r[u],u,r)&&(a=!1),t[s]=a,s+=e}(r,t,e,n,i,o),t)}function di(r,t,e){return hi(r,Rn(!0,r.length),1,0,t,e)}function pi(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!0,s=n,u=0;u<r.length;u+=2)!0===a&&(r[u]||r[u+1])&&(a=!1),o(i,s,a),s+=e;return i}function mi(r,t,e,n){var i=De(r),o=De(t);return i.accessorProtocol||o.accessorProtocol?(ce(r)?pi(J(r,0),o,e,n):le(r)?pi($(r,0),o,e,n):Ne(r)?function(r,t,e,n){var i,o,a,s,u;for(o=t.accessors[1],i=t.data,a=!0,s=n,u=0;u<r.length;u++)!0===a&&r[u]&&(a=!1),o(i,s,a),s+=e}(K(r,0),o,e,n):function(r,t,e,n){var i,o,a,s,u,l,f;for(i=r.data,o=t.data,a=r.accessors[0],s=t.accessors[1],u=!0,l=n,f=0;f<i.length;f++)!0===u&&a(i,f)&&(u=!1),s(o,l,u),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 gi(r){return mi(r,Rn(!0,r.length),1,0)}function vi(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],c=n,f=!0,h=0;h<a.length;h++)f&&i.call(o,u(a,h),h,a)&&(f=!1),l(s,c,f),c+=e}(a,s,e,n,i,o),t):(function(r,t,e,n,i,o){var a,s,u;for(a=!0,s=n,u=0;u<r.length;u++)a&&i.call(o,r[u],u,r)&&(a=!1),t[s]=a,s+=e}(r,t,e,n,i,o),t)}function yi(r,t,e){return vi(r,Rn(!0,r.length),1,0,t,e)}function wi(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],c=n,f=!0,h=a.length-1;h>=0;h--)f&&i.call(o,u(a,h),h,a)&&(f=!1),l(s,c,f),c+=e}(a,s,e,n,i,o),t):(function(r,t,e,n,i,o){var a,s,u;for(a=!0,s=n,u=r.length-1;u>=0;u--)a&&i.call(o,r[u],u,r)&&(a=!1),t[s]=a,s+=e}(r,t,e,n,i,o),t)}function bi(r,t,e){return wi(r,Rn(!0,r.length),1,0,t,e)}function Ei(r,t,e,n,i){var o,a,s,u,l;for(a=e.accessors[1],o=e.data,s=!1,u=i,l=0;l<r.length;l+=2)s||!r[l]&&!r[l+1]||(t-=1)<=0&&(s=!0),a(o,u,s),u+=n;return o}function xi(r,t,e,n,i){var o=De(r),a=De(e);return o.accessorProtocol||a.accessorProtocol?ce(r)?Ei(J(r,0),t,a,n,i):le(r)?Ei($(r,0),t,a,n,i):Ne(r)?function(r,t,e,n,i){var o,a,s,u,l;for(a=e.accessors[1],o=e.data,s=!1,u=i,l=0;l<r.length;l++)!s&&r[l]&&(t-=1)<=0&&(s=!0),a(o,u,s),u+=n;return o}(K(r,0),t,a,n,i):function(r,t,e,n,i){var o,a,s,u,l,f,c;for(o=r.data,a=e.data,s=r.accessors[0],u=e.accessors[1],l=!1,f=i,c=0;c<o.length;c++)!l&&s(o,c)&&(t-=1)<=0&&(l=!0),u(a,f,l),f+=n;return a}(o,t,a,n,i):(function(r,t,e,n,i){var o,a,s;for(o=!1,a=i,s=0;s<r.length;s++)!o&&r[s]&&(t-=1)<=0&&(o=!0),e[a]=o,a+=n}(r,t,e,n,i),e)}function Ti(r,t){return xi(r,t,Rn(!1,r.length),1,0)}function ji(r,t,e,n,i,o,a){var s,u;return s=De(r),u=De(e),s.accessorProtocol||u.accessorProtocol?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d;for(s=r.data,u=e.data,l=r.accessors[0],f=e.accessors[1],h=i,c=!1,d=0;d<=s.length-1;d++)!c&&o.call(a,l(s,d),d,s)&&(t-=1)<=0&&(c=!0),f(u,h,c),h+=n}(s,t,u,n,i,o,a),e):(function(r,t,e,n,i,o,a){var s,u,l;for(s=!1,u=i,l=0;l<=r.length-1;l++)!s&&o.call(a,r[l],l,r)&&(t-=1)<=0&&(s=!0),e[u]=s,u+=n}(r,t,e,n,i,o,a),e)}function _i(r,t,e,n){return ji(r,t,Rn(!1,r.length),1,0,e,n)}function Vi(r,t,e,n,i,o,a){var s,u;return s=De(r),u=De(e),s.accessorProtocol||u.accessorProtocol?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p;for(u=r.data,l=e.data,f=r.accessors[0],c=e.accessors[1],d=i,h=!1,s=0,p=u.length-1;p>=0;p--)!1===h&&o.call(a,f(u,p),p,u)&&(s+=1)>=t&&(h=!0),c(l,d,h),d+=n}(s,t,u,n,i,o,a),e):(function(r,t,e,n,i,o,a){var s,u,l,f;for(u=!1,s=0,l=i,f=r.length-1;f>=0;f--)!1===u&&o.call(a,r[f],f,r)&&(s+=1)>=t&&(u=!0),e[l]=u,l+=n}(r,t,e,n,i,o,a),e)}function ki(r,t,e,n){return Vi(r,t,Rn(!1,r.length),1,0,e,n)}function Ai(r){var t;for(t=0;t<r.length;t++)if(!r[t])return!1;return!0}function Fi(r){var t;for(t=0;t<r.length;t+=2)if(!r[t]&&!r[t+1])return!1;return!0}function Si(r,t,e){var n,i,o,a,s;if(i=r.length,(o=gr(t,i,!0)).code){if(e)throw new RangeError(O("invalid argument. Slice exceeds array bounds. Array length: %d.",i));o=gr(t,i,!1)}return s=vr(o),n="generic"===(a=Ie(r))||null===a?Dn(s):new r.constructor(s),wr(s,r,o.step,o.start,n,1,0),n}r(On,"filled2dBy",(function(r,t,e,n,i,o){var a,s,u,l,f,c;for(l=r[0],u=r[1],a=[],c=0;c<l;c++){for(s=[],f=0;f<u;f++)f>=c&&f<=c+t||f<=c&&c<=f+e?s.push(i.call(o,[c,f])):s.push(n);a.push(s)}return a})),r(On,"toCompact",(function(r,t,e,n){var i,o,a,s,u,l,f;if(a=r.length,s=r[0].length,n){for(i=Mn([s,t+e+1]),l=0;l<s;l++)for(o=i[l],f=t-l,u=ur(0,l-t);u<lr(a,l+e+1);u++)o[f+u]=r[u][l];return i}for(i=Mn([t+e+1,s]),l=0;l<s;l++)for(f=t-l,u=ur(0,l-t);u<lr(a,l+e+1);u++)i[f+u][l]=r[u][l];return i})),e($n,"assign",(function(r,t,e){var n=De(r);return n.accessorProtocol?"complex128"===n.dtype?Kn(r,J(r,0),t,e):"complex64"===n.dtype?Kn(r,$(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)})),e(ei,"assign",ti),e(ii,"assign",ni),e(ai,"assign",oi),e(li,"assign",ui),e(ci,"assign",fi),e(di,"assign",hi),e(gi,"assign",mi),e(yi,"assign",vi),e(bi,"assign",wi),e(Ti,"assign",xi),e(_i,"assign",ji),e(ki,"assign",Vi);var Pi={float64:Wt,float32:Jt,generic:Array,int16:te,int32:Qt,int8:se,uint16:Xt,uint32:Kt,uint8:ne,uint8c:oe,complex64:ye,complex128:_e,bool:Pe};function Bi(r){return Pi[r]||null}function Li(r){return"complex64"===r}function Ri(r){return"complex128"===r}function Ii(r){return"bool"===r}function Mi(r,t){var e,n,i,o,a,s,u,l,f;if(!v(r))throw new TypeError(P("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===t)return Wn(r);if(null===(n=Bi(t)))throw new TypeError(P("invalid argument. Second argument must be a recognized array data type. Value: `%s`.",t));if(u=r.length,e=Li(l=Ie(r)),s=new n(u),e||Ri(l)){if(i=e?$(r,0):J(r,0),Li(t))return o=$(s,0),yr(2*u,i,1,o,1),s;if(Ri(t))return o=J(s,0),yr(2*u,i,1,o,1),s;if(Ii(t)){for(o=K(s,0),f=0;f<u;f++)i[2*f]||i[2*f+1]?o[f]=1:o[f]=0;return s}return yr(u,i,2,s,1),s}if(Ii(l))return i=K(r,0),Ii(t)?(o=K(s,0),yr(u,i,1,o,1),s):Li(t)?(o=$(s,0),yr(u,i,1,o,2),s):Ri(t)?(o=J(s,0),yr(u,i,1,o,2),s):(yr(u,i,1,s,1),s);if((e=Li(t))||Ri(t))return o=e?$(s,0):J(s,0),yr(u,r,1,o,2),s;if(Ii(t)){for(o=K(s,0),a=ze(r),f=0;f<u;f++)a(r,f)?o[f]=1:o[f]=0;return s}return yr(u,r,1,s,1),s}function Oi(r,t,e,n){var i,o,a,s,u,l,f;if(a=Ie(r)||"generic",s=Ie(t)||"generic",i=r.length,o=t.length,!yn(a,s))throw new TypeError(O("invalid argument. Input array values cannot be safely cast to the output array data type. Data types: [%s, %s].",a,s));if(sn(s)&&En(a)&&(r=Mi(r,s)),(u=gr(e,o,!0)).code){if(n)throw new RangeError(O("invalid argument. Slice exceeds array bounds. Array length: %d.",o));u=gr(e,o,!1)}if(f=vr(u),1===i)l=0;else{if(i!==f)throw new Error(O("invalid argument. Input array and the output array slice are broadcast incompatible. Array length: %u. Desired length: %u.",i,f));l=1}return wr(f,r,l,0,t,u.step,u.start),t}function Ci(r,t,e){var n,i;for(n=[],i=0;i<r;i++)n.push(t.call(e,i));return n}function Ni(r,t){var e,n,i,o,a,s,u;for(i=t[2],o=t[1],a=t[0],e=[],s=0;s<a;s++){for(n=[],u=0;u<o;u++)n.push(Rn(r,i));e.push(n)}return e}function Di(r,t){var e,n,i,o,a,s,u,l,f,c;for(o=t[3],a=t[2],s=t[1],u=t[0],e=[],c=0;c<u;c++){for(i=[],f=0;f<s;f++){for(n=[],l=0;l<a;l++)n.push(Rn(r,o));i.push(n)}e.push(i)}return e}function Ui(r,t){var e,n,i,o,a,s,u,l,f,c,h,d,p;for(a=t[4],s=t[3],u=t[2],l=t[1],f=t[0],e=[],p=0;p<f;p++){for(o=[],d=0;d<l;d++){for(i=[],h=0;h<u;h++){for(n=[],c=0;c<s;c++)n.push(Rn(r,a));i.push(n)}o.push(i)}e.push(o)}return e}function zi(r,t,e,n,i){var o,a,s;if(o=e[n],(a=n+1)===t)return Rn(r,o);for(s=0;s<o;s++)i.push(zi(r,t,e,a,[]));return i}function Yi(r,t){return zi(r,t.length,t,0,[])}function qi(r,t,e,n,i,o,a){var s,u,l,f,c;for(u=(f=e+1)===r,l=t[e],c=0;c<l;c++)(s=n.slice()).push(c),u?i.push(o.call(a,s)):i.push(qi(r,t,f,s,[],o,a));return i}var Wi="throw";function Gi(r,t,e,n,i){var o;for(o=0;o<t;o++)e[i]=r[o],i+=n}function Ji(r,t,e,n,i,o,a){var s,u,l,f;for(s=(l=n+1)===t,u=e[n],f=0;f<u;f++)s?(i[a]=r[f],a+=o):a=Ji(r[f],t,e,l,i,o,a);return a}function $i(r,t,e,n,i,o){var a=t.length;return 0===a?n:1===a?(Gi(r,t[0],n,i,o),n):e?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(Ji(r,t,e,0,s=Dn(a=br(e)),1,0),f=Er(e,u="row-major"),Gi(e,t,l=Dn(t),1,0),Tr(t,l,1),Tr(t,f,1),h=0;h<a;h++)c=xr(l,f,0,u,h,Wi),n[o]=s[c],o+=i}(r,a,t,n,i,o),n):(Ji(r,a,t,0,n,i,o),n)}function Ki(r,t,e){return $i(r,t,e,Dn(br(t)),1,0)}e(Ki,"assign",$i);var Hi="throw";function Qi(r,t,e,n,i,o,a,s,u,l,f){var c,h,d,p,m;for(c=(p=i+1)===e,d=n[i],m=0;m<d;m++)(h=o.slice()).push(m),c?(a[u]=l.call(f,t[m],h,r),u+=s):u=Qi(r,t[m],e,n,p,h,a,s,u,l,f);return u}function Zi(r,t,e,n,i,o,a,s){var u=t.length;return 0===u?n:1===u?(function(r,t,e,n,i,o,a){var s;for(s=0;s<t;s++)e[i]=o.call(a,r[s],[s],r),i+=n}(r,t[0],n,i,o,a,s),n):e?(function(r,t,e,n,i,o,a,s){var u,l,f,c,h,d,p;for(Qi(r,r,t,e,0,[],l=Dn(u=br(e)),1,0,a,s),h=Er(e,f="row-major"),c=Nn(e),Tr(t,c,1),Tr(t,h,1),p=0;p<u;p++)d=xr(c,h,0,f,p,Hi),n[o]=l[d],o+=i}(r,u,t,n,i,o,a,s),n):(Qi(r,r,u,t,0,[],n,i,o,a,s),n)}function Xi(r,t,e,n,i){return Zi(r,t,e,Dn(br(t)),1,0,n,i)}function ro(r,t,e){var n,i,o,a,s,u;if(i=t[1],o=t[0],n=[],e){for(a=0;a<i;a++)for(s=0;s<o;s++)n.push(r[s][a]);return n}for(s=0;s<o;s++)for(u=r[s],a=0;a<i;a++)n.push(u[a]);return n}function to(r,t,e,n,i){var o,a,s,u,l,f;if(a=t[1],s=t[0],o=[],e){for(u=0;u<a;u++)for(l=0;l<s;l++)o.push(n.call(i,r[l][u],[l,u],r));return o}for(l=0;l<s;l++)for(f=r[l],u=0;u<a;u++)o.push(n.call(i,f[u],[l,u],r));return o}function eo(r,t,e){var n,i,o,a,s,u,l,f,c;if(i=t[2],o=t[1],a=t[0],n=[],e){for(s=0;s<i;s++)for(u=0;u<o;u++)for(l=0;l<a;l++)n.push(r[l][u][s]);return n}for(l=0;l<a;l++)for(c=r[l],u=0;u<o;u++)for(f=c[u],s=0;s<i;s++)n.push(f[s]);return n}function no(r,t,e,n,i){var o,a,s,u,l,f,c,h,d;if(a=t[2],s=t[1],u=t[0],o=[],e){for(l=0;l<a;l++)for(f=0;f<s;f++)for(c=0;c<u;c++)o.push(n.call(i,r[c][f][l],[c,f,l],r));return o}for(c=0;c<u;c++)for(d=r[c],f=0;f<s;f++)for(h=d[f],l=0;l<a;l++)o.push(n.call(i,h[l],[c,f,l],r));return o}function io(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p;if(i=t[3],o=t[2],a=t[1],s=t[0],n=[],e){for(u=0;u<i;u++)for(l=0;l<o;l++)for(f=0;f<a;f++)for(c=0;c<s;c++)n.push(r[c][f][l][u]);return n}for(c=0;c<s;c++)for(p=r[c],f=0;f<a;f++)for(d=p[f],l=0;l<o;l++)for(h=d[l],u=0;u<i;u++)n.push(h[u]);return n}function oo(r,t,e,n,i){var o,a,s,u,l,f,c,h,d,p,m,g;if(a=t[3],s=t[2],u=t[1],l=t[0],o=[],e){for(f=0;f<a;f++)for(c=0;c<s;c++)for(h=0;h<u;h++)for(d=0;d<l;d++)o.push(n.call(i,r[d][h][c][f],[d,h,c,f],r));return o}for(d=0;d<l;d++)for(g=r[d],h=0;h<u;h++)for(m=g[h],c=0;c<s;c++)for(p=m[c],f=0;f<a;f++)o.push(n.call(i,p[f],[d,h,c,f],r));return o}function ao(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v;if(i=t[4],o=t[3],a=t[2],s=t[1],u=t[0],n=[],e){for(l=0;l<i;l++)for(f=0;f<o;f++)for(c=0;c<a;c++)for(h=0;h<s;h++)for(d=0;d<u;d++)n.push(r[d][h][c][f][l]);return n}for(d=0;d<u;d++)for(v=r[d],h=0;h<s;h++)for(g=v[h],c=0;c<a;c++)for(m=g[c],f=0;f<o;f++)for(p=m[f],l=0;l<i;l++)n.push(p[l]);return n}function so(r,t,e,n,i){var o,a,s,u,l,f,c,h,d,p,m,g,v,y,w;if(a=t[4],s=t[3],u=t[2],l=t[1],f=t[0],o=[],e){for(c=0;c<a;c++)for(h=0;h<s;h++)for(d=0;d<u;d++)for(p=0;p<l;p++)for(m=0;m<f;m++)o.push(n.call(i,r[m][p][d][h][c],[m,p,d,h,c],r));return o}for(m=0;m<f;m++)for(w=r[m],p=0;p<l;p++)for(y=w[p],d=0;d<u;d++)for(v=y[d],h=0;h<s;h++)for(g=v[h],c=0;c<a;c++)o.push(n.call(i,g[c],[m,p,d,h,c],r));return o}function uo(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 lo(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(uo(r[e]));return t}function fo(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(lo(r[e]));return t}function co(r){var t,e;for(t=[],e=r.length-1;e>=0;e--)t.push(r[e]);return t}function ho(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(co(r[e]));return t}function po(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(ho(r[e]));return t}function mo(r,t,e){var n,i,o;if((i=jr((t-r)/e))<=1)return[r];for(n=[r],o=1;o<i;o++)n.push(r+e*o);return n}function go(r,t){return Vr(r.length,t,r,1,0)}function vo(r,t,e){var n,i,o,a;if(0===e)return[];for(o=(t-r)/(i=e-1),n=[fr(10,r)],a=1;a<i;a++)n.push(fr(10,r+o*a));return n.push(fr(10,t)),n}function yo(r,t,e,n,i,o){var a,s;return a=De(r),s=De(t),a.accessorProtocol||s.accessorProtocol?(function(r,t,e,n,i,o){var a,s,u,l,f,c;for(a=r.data,s=t.data,u=r.accessors[0],l=t.accessors[1],f=n,c=0;c<a.length;c++)l(s,f,i.call(o,u(a,c),c,a)),f+=e}(a,s,e,n,i,o),t):function(r,t,e,n,i,o){var a,s;for(a=n,s=0;s<r.length;s++)t[a]=i.call(o,r[s],s,r),a+=e;return t}(r,t,e,n,i,o)}function wo(r,t,e){return"function"==typeof r["map"]?r.map(t,e):yo(r,Dn(r.length),1,0,t,e)}function bo(r,t,e,n){var i,o,a,s,u,l,f;for(i=t[1],o=t[0],f=[],s=0;s<o;s++){for(u=r[s],l=[],a=0;a<i;a++)l.push(e.call(n,u[a],[s,a],r));f.push(l)}return f}function Eo(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p;for(i=t[2],o=t[1],a=t[0],p=[],l=0;l<a;l++){for(h=r[l],d=[],u=0;u<o;u++){for(f=h[u],c=[],s=0;s<i;s++)c.push(e.call(n,f[s],[l,u,s],r));d.push(c)}p.push(d)}return p}function xo(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y;for(i=t[3],o=t[2],a=t[1],s=t[0],y=[],c=0;c<s;c++){for(g=r[c],v=[],f=0;f<a;f++){for(p=g[f],m=[],l=0;l<o;l++){for(h=p[l],d=[],u=0;u<i;u++)d.push(e.call(n,h[u],[c,f,l,u],r));m.push(d)}v.push(m)}y.push(v)}return y}function To(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;for(i=t[4],o=t[3],a=t[2],s=t[1],u=t[0],x=[],d=0;d<u;d++){for(b=r[d],E=[],h=0;h<s;h++){for(y=b[h],w=[],c=0;c<a;c++){for(g=y[c],v=[],f=0;f<o;f++){for(p=g[f],m=[],l=0;l<i;l++)m.push(e.call(n,p[l],[d,h,c,f,l],r));v.push(m)}w.push(v)}E.push(w)}x.push(E)}return x}function jo(r){return r<0?r>=kr?"int8":r>=Ar?"int16":r>=Fr?"int32":"float64":r<=Sr?"int8":r<=Pr?"int16":r<=Br?"int32":"float64"}function _o(r,t){var e,n,i,o;for(e=ze(r),n=ze(t),i=[],o=0;o<r.length;o++)n(t,o)&&i.push(e(r,o));return i}function Vo(r,t,e,n){var i,o,a,s;for(i=ze(r),o=ze(t),a=[],s=0;s<r.length;s++)o(t,s)&&a.push(e.call(n,i(r,s),s,r));return a}function ko(r,t,e,n){var i,o,a,s;if(s=e.length,"strict"===n){if(Jn(t)!==s)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!==s&&Jn(t)>s)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==s&&Jn(t)!==s)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&&Jn(t)>s)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=De(r),o=De(t),a=De(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?sn(i.dtype)&&sn(a.dtype)?(function(r,t,e){var n,i,o,a,s;for(n=t.data,i=t.accessors[0],a=e.length,o=0,s=0;s<r.length;s+=2)i(n,s/2)||(r[s]=e[o],r[s+1]=e[o+1],o=(o+2)%a)}(cr(r,0),o,cr(e,0)),r):en(i.dtype)&&en(a.dtype)?(function(r,t,e){var n,i,o,a,s;for(n=t.data,i=t.accessors[0],a=e.length,o=0,s=0;s<r.length;s++)i(n,s)||(r[s]=e[o],o=(s+1)%a)}(K(r,0),o,K(e,0)),r):(function(r,t,e){var n,i,o,a,s,u,l,f,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],s=t.accessors[0],u=e.accessors[0],f=o.length,l=0,c=0;c<n.length;c++)s(i,c)||(a(n,c,u(o,l)),l=(l+1)%f)}(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 Ao(r,t){var e,n,i,o;for(e=ze(r),n=ze(t),i=[],o=0;o<r.length;o++)n(t,o)||i.push(e(r,o));return i}function Fo(r,t,e,n){var i,o,a,s;for(i=ze(r),o=ze(t),a=[],s=0;s<r.length;s++)o(t,s)||a.push(e.call(n,i(r,s),s,r));return a}function So(r){var t;for(t=0;t<r.length;t++)if(r[t])return!1;return!0}function Po(r){var t,e;if(t=[],r<=0)return t;for(e=1;e<r+1;e++)t.push(e);return t}function Bo(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 Lo(r,t,e,n){var i,o,a,s;if(s=e.length,"strict"===n){if(Xn(t)!==s)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!==s&&Xn(t)>s)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==s&&Xn(t)!==s)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&&Xn(t)>s)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=De(r),o=De(t),a=De(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?sn(i.dtype)&&sn(a.dtype)?(function(r,t,e){var n,i,o,a,s;for(n=t.data,i=t.accessors[0],a=e.length,o=0,s=0;s<r.length;s+=2)i(n,s/2)&&(r[s]=e[o],r[s+1]=e[o+1],o=(o+2)%a)}(cr(r,0),o,cr(e,0)),r):en(i.dtype)&&en(a.dtype)?(function(r,t,e){var n,i,o,a,s;for(n=t.data,i=t.accessors[0],a=e.length,o=0,s=0;s<r.length;s++)i(n,s)&&(r[s]=e[o],o=(s+1)%a)}(K(r,0),o,K(e,0)),r):(function(r,t,e){var n,i,o,a,s,u,l,f,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],s=t.accessors[0],u=e.accessors[0],f=o.length,l=0,c=0;c<n.length;c++)s(i,c)&&(a(n,c,u(o,l)),l=(l+1)%f)}(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 Ro(r,t,e,n){var i,o,a,s,u,l;if(t.length>0)if(e.length===t.length)o=1;else{if(1!==e.length)throw new Error(O("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=Or(n),a=r.length-1,s=De(r),u=De(t),l=De(e),s.accessorProtocol||u.accessorProtocol||l.accessorProtocol?sn(s.dtype)&&sn(l.dtype)?(function(r,t,e,n,i,o){var a,s,u,l,f,c;for(a=t.data,s=t.accessors[0],l=2*n,u=0,f=0;f<a.length;f++)r[c=2*i(s(a,f),o)]=e[u],r[c+1]=e[u+1],u+=l}(cr(r,0),u,cr(e,0),o,i,a),r):en(s.dtype)&&en(l.dtype)?(function(r,t,e,n,i,o){var a,s,u,l;for(a=t.data,s=t.accessors[0],u=0,l=0;l<a.length;l++)r[i(s(a,l),o)]=e[u],u+=n}(K(r,0),u,K(e,0),o,i,a),r):(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d;for(a=r.data,s=t.data,u=e.data,l=r.accessors[1],f=t.accessors[0],c=e.accessors[0],h=0,d=0;d<s.length;d++)l(a,i(f(s,d),o),c(u,h)),h+=n}(s,u,l,o,i,a),r):(function(r,t,e,n,i,o){var a,s;for(a=0,s=0;s<t.length;s++)r[i(t[s],o)]=e[a],a+=n}(r,t,e,o,i,a),r)}e(Xi,"assign",Zi),e(ro,"assign",(function(r,t,e,n,i,o){var a,s,u,l,f,c;if(a=t[1],s=t[0],c=o,e){for(u=0;u<a;u++)for(l=0;l<s;l++)n[c]=r[l][u],c+=i;return n}for(l=0;l<s;l++)for(f=r[l],u=0;u<a;u++)n[c]=f[u],c+=i;return n})),e(to,"assign",(function(r,t,e,n,i,o,a,s){var u,l,f,c,h,d;if(u=t[1],l=t[0],d=o,e){for(f=0;f<u;f++)for(c=0;c<l;c++)n[d]=a.call(s,r[c][f],[c,f],r),d+=i;return n}for(c=0;c<l;c++)for(h=r[c],f=0;f<u;f++)n[d]=a.call(s,h[f],[c,f],r),d+=i;return n})),e(eo,"assign",(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d,p;if(a=t[2],s=t[1],u=t[0],p=o,e){for(l=0;l<a;l++)for(f=0;f<s;f++)for(c=0;c<u;c++)n[p]=r[c][f][l],p+=i;return n}for(c=0;c<u;c++)for(d=r[c],f=0;f<s;f++)for(h=d[f],l=0;l<a;l++)n[p]=h[l],p+=i;return n})),e(no,"assign",(function(r,t,e,n,i,o,a,s){var u,l,f,c,h,d,p,m,g;if(u=t[2],l=t[1],f=t[0],g=o,e){for(c=0;c<u;c++)for(h=0;h<l;h++)for(d=0;d<f;d++)n[g]=a.call(s,r[d][h][c],[d,h,c],r),g+=i;return n}for(d=0;d<f;d++)for(m=r[d],h=0;h<l;h++)for(p=m[h],c=0;c<u;c++)n[g]=a.call(s,p[c],[d,h,c],r),g+=i;return n})),e(io,"assign",(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d,p,m,g,v;if(a=t[3],s=t[2],u=t[1],l=t[0],v=o,e){for(f=0;f<a;f++)for(c=0;c<s;c++)for(h=0;h<u;h++)for(d=0;d<l;d++)n[v]=r[d][h][c][f],v+=i;return n}for(d=0;d<l;d++)for(g=r[d],h=0;h<u;h++)for(m=g[h],c=0;c<s;c++)for(p=m[c],f=0;f<a;f++)n[v]=p[f],v+=i;return n})),e(oo,"assign",(function(r,t,e,n,i,o,a,s){var u,l,f,c,h,d,p,m,g,v,y,w;if(u=t[3],l=t[2],f=t[1],c=t[0],w=o,e){for(h=0;h<u;h++)for(d=0;d<l;d++)for(p=0;p<f;p++)for(m=0;m<c;m++)n[w]=a.call(s,r[m][p][d][h],[m,p,d,h],r),w+=i;return n}for(m=0;m<c;m++)for(y=r[m],p=0;p<f;p++)for(v=y[p],d=0;d<l;d++)for(g=v[d],h=0;h<u;h++)n[w]=a.call(s,g[h],[m,p,d,h],r),w+=i;return n})),e(ao,"assign",(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d,p,m,g,v,y,w,b;if(a=t[4],s=t[3],u=t[2],l=t[1],f=t[0],b=o,e){for(c=0;c<a;c++)for(h=0;h<s;h++)for(d=0;d<u;d++)for(p=0;p<l;p++)for(m=0;m<f;m++)n[b]=r[m][p][d][h][c],b+=i;return n}for(m=0;m<f;m++)for(w=r[m],p=0;p<l;p++)for(y=w[p],d=0;d<u;d++)for(v=y[d],h=0;h<s;h++)for(g=v[h],c=0;c<a;c++)n[b]=g[c],b+=i;return n})),e(so,"assign",(function(r,t,e,n,i,o,a,s){var u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;if(u=t[4],l=t[3],f=t[2],c=t[1],h=t[0],x=o,e){for(d=0;d<u;d++)for(p=0;p<l;p++)for(m=0;m<f;m++)for(g=0;g<c;g++)for(v=0;v<h;v++)n[x]=a.call(s,r[v][g][m][p][d],[v,g,m,p,d],r),x+=i;return n}for(v=0;v<h;v++)for(E=r[v],g=0;g<c;g++)for(b=E[g],m=0;m<f;m++)for(w=b[m],p=0;p<l;p++)for(y=w[p],d=0;d<u;d++)n[x]=a.call(s,y[d],[v,g,m,p,d],r),x+=i;return n})),e(wo,"assign",yo),e(bo,"assign",(function(r,t,e,n,i){var o,a,s,u,l,f;if(o=e[1],a=e[0],o<=0||a<=0)return t;for(u=0;u<a;u++)for(l=r[u],f=t[u],s=0;s<o;s++)f[s]=n.call(i,l[s],[u,s],r);return t})),e(Eo,"assign",(function(r,t,e,n,i){var o,a,s,u,l,f,c,h,d,p;if(o=e[2],a=e[1],s=e[0],o<=0||a<=0||s<=0)return t;for(f=0;f<s;f++)for(d=r[f],p=t[f],l=0;l<a;l++)for(c=d[l],h=p[l],u=0;u<o;u++)h[u]=n.call(i,c[u],[f,l,u],r);return t})),e(xo,"assign",(function(r,t,e,n,i){var o,a,s,u,l,f,c,h,d,p,m,g,v,y;if(o=e[3],a=e[2],s=e[1],u=e[0],o<=0||a<=0||s<=0||u<=0)return t;for(h=0;h<u;h++)for(v=r[h],y=t[h],c=0;c<s;c++)for(m=v[c],g=y[c],f=0;f<a;f++)for(d=m[f],p=g[f],l=0;l<o;l++)p[l]=n.call(i,d[l],[h,c,f,l],r);return t})),e(To,"assign",(function(r,t,e,n,i){var o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;if(o=e[4],a=e[3],s=e[2],u=e[1],l=e[0],o<=0||a<=0||s<=0||u<=0||l<=0)return t;for(p=0;p<l;p++)for(E=r[p],x=t[p],d=0;d<u;d++)for(w=E[d],b=x[d],h=0;h<s;h++)for(v=w[h],y=b[h],c=0;c<a;c++)for(m=v[c],g=y[c],f=0;f<o;f++)g[f]=n.call(i,m[f],[p,d,h,c,f],r);return t})),e(_o,"assign",(function(r,t,e,n,i){var o,a,s;return o=De(r),a=De(t),s=De(e),o.accessorProtocol||a.accessorProtocol||s.accessorProtocol?sn(o.dtype)&&sn(s.dtype)?(function(r,t,e,n,i){var o,a,s,u,l,f;for(o=t.data,a=t.accessors[0],u=2*n,s=2*i,l=0;l<o.length;l++)a(o,l)&&(f=2*l,e[s]=r[f],e[s+1]=r[f+1],s+=u)}(cr(r,0),a,cr(e,0),n,i),e):en(o.dtype)&&en(s.dtype)?(function(r,t,e,n,i){var o,a,s,u;for(o=t.data,a=t.accessors[0],s=i,u=0;u<o.length;u++)a(o,u)&&(e[s]=r[u],s+=n)}(K(r,0),a,K(e,0),n,i),e):(function(r,t,e,n,i){var o,a,s,u,l,f,c,h;for(o=r.data,a=t.data,s=e.data,u=r.accessors[0],l=t.accessors[0],f=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)&&(f(s,c,u(o,h)),c+=n)}(o,a,s,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)})),e(Vo,"assign",(function(r,t,e,n,i,o,a){var s,u,l;return s=De(r),u=De(t),l=De(e),s.accessorProtocol||u.accessorProtocol||l.accessorProtocol?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p;for(s=r.data,u=t.data,l=e.data,f=r.accessors[0],c=t.accessors[0],h=e.accessors[1],d=i,p=0;p<s.length;p++)c(u,p)&&(h(l,d,o.call(a,f(s,p),p,s)),d+=n)}(s,u,l,n,i,o,a),e):(function(r,t,e,n,i,o,a){var s,u;for(s=i,u=0;u<r.length;u++)t[u]&&(e[s]=o.call(a,r[u],u,r),s+=n)}(r,t,e,n,i,o,a),e)})),e(Ao,"assign",(function(r,t,e,n,i){var o,a,s;return o=De(r),a=De(t),s=De(e),o.accessorProtocol||a.accessorProtocol||s.accessorProtocol?sn(o.dtype)&&sn(s.dtype)?(function(r,t,e,n,i){var o,a,s,u,l,f;for(o=t.data,a=t.accessors[0],u=2*n,s=2*i,l=0;l<o.length;l++)a(o,l)||(f=2*l,e[s]=r[f],e[s+1]=r[f+1],s+=u)}(cr(r,0),a,cr(e,0),n,i),e):en(o.dtype)&&en(s.dtype)?(function(r,t,e,n,i){var o,a,s,u;for(o=t.data,a=t.accessors[0],s=i,u=0;u<o.length;u++)a(o,u)||(e[s]=r[u],s+=n)}(K(r,0),a,K(e,0),n,i),e):(function(r,t,e,n,i){var o,a,s,u,l,f,c,h;for(o=r.data,a=t.data,s=e.data,u=r.accessors[0],l=t.accessors[0],f=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)||(f(s,c,u(o,h)),c+=n)}(o,a,s,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)})),e(Fo,"assign",(function(r,t,e,n,i,o,a){var s,u,l;return s=De(r),u=De(t),l=De(e),s.accessorProtocol||u.accessorProtocol||l.accessorProtocol?sn(s.dtype)&&sn(l.dtype)?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h;for(s=t.data,u=t.accessors[0],f=2*n,l=2*i,c=0;c<s.length;c++)u(s,c)||(h=2*c,e[l]=o.call(a,r[h],h,r),e[l+1]=o.call(a,r[h+1],h+1,r),l+=f)}(cr(r,0),u,cr(e,0),n,i,o,a),e):(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p;for(s=r.data,u=t.data,l=e.data,f=r.accessors[0],c=t.accessors[0],h=e.accessors[1],d=i,p=0;p<s.length;p++)c(u,p)||(h(l,d,o.call(a,f(s,p),p,s)),d+=n)}(s,u,l,n,i,o,a),e):(function(r,t,e,n,i,o,a){var s,u;for(s=i,u=0;u<r.length;u++)t[u]||(e[s]=o.call(a,r[u],u,r),s+=n)}(r,t,e,n,i,o,a),e)})),e(Po,"assign",(function(r,t,e){var n=De(r);return n.accessorProtocol?ce(r)?Bo(r,J(r,0),t,e):le(r)?Bo(r,$(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)}));var Io=Array.prototype.slice;function Mo(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"slice")?r.slice(t,e):(n=De(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 Io.call(r,t,e)}(r,t,e)}function Oo(r,t,e,n,i){var o,a,s,u,l,f;if(l=e[n],n===t-1)return Mo(r,i,i+l);for(o=1,f=u=n+1;f<e.length;f++)o*=e[f];for(s=[],f=0;f<l;f++)a=Oo(r,t,e,u,i),s.push(a),i+=o;return s}function Co(r){var t=Ie(r);return Rt(r)?zt(t):Ct(t)}var No={};r(No,"filled2dBy",(function(r,t,e){var n,i,o,a;for(n=[],o=0;o<r;o++){for(i=[],a=0;a<r;a++)o>a?i.push(n[a][o]):i.push(t.call(e,[o,a]));n.push(i)}return n}));var Do={};function Uo(r,t,e){var n,i,o,a,s,u,l;for(i=ze(r),o=ze(t),n=Or(e),s=r.length-1,a=[],u=0;u<t.length;u++)l=n(o(t,u),s),a.push(i(r,l));return a}function zo(r,t,e,n){var i,o,a,s,u,l,f;for(o=ze(r),a=ze(t),i=Or(e),u=r.length-1,s=[],l=0;l<t.length;l++)f=i(a(t,l),u),s.push(n.call(null,o(r,f),f));return s}r(Do,"filled2dBy",(function(r,t,e,n,i){var o,a,s,u;for(o=[],s=0;s<r;s++){for(a=[],u=0;u<r;u++)u>=s&&u<=s+t?a.push(n.call(i,[s,u])):u<s?a.push(o[u][s]):a.push(e);o.push(a)}return o})),r(Do,"toCompact",(function(r,t,e,n){var i,o,a,s,u,l,f;if(s=t.length,n){if(i=Mn([s,e+1]),"upper"===r){for(u=0;u<s;u++)for(o=i[u],a=t[u],l=u;l<lr(s,u+e+1);l++)o[l-u]=a[l];return i}for(u=0;u<s;u++)for(o=i[u],a=t[u],f=ur(0,e-u),l=ur(0,u-e);l<=u;l++)o[f]=a[l],f+=1;return i}if(i=Mn([e+1,s]),"upper"===r){for(l=0;l<s;l++)for(f=e-l,u=ur(0,l-e);u<=l;u++)i[f+u][l]=t[u][l];return i}for(l=0;l<s;l++)for(f=-l,u=l;u<lr(s,l+e+1);u++)i[f+u][l]=t[u][l];return i})),e(Uo,"assign",(function(r,t,e,n,i,o){var a,s,u;return a=De(r),s=De(t),u=De(n),a.accessorProtocol||s.accessorProtocol||u.accessorProtocol?sn(a.dtype)&&sn(u.dtype)?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d;for(s=t.data,u=t.accessors[0],a=Or(e),l=r.length/2-1,c=2*i,f=2*o,h=0;h<s.length;h++)d=2*a(u(s,h),l),n[f]=r[d],n[f+1]=r[d+1],f+=c}(cr(r,0),s,e,cr(n,0),i,o),n):en(a.dtype)&&en(u.dtype)?(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(s=t.data,u=t.accessors[0],a=Or(e),l=r.length-1,f=o,c=0;c<s.length;c++)h=a(u(s,c),l),n[f]=r[h],f+=i}(K(r,0),s,e,K(n,0),i,o),n):(function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d,p,m;for(s=r.data,u=t.data,l=n.data,f=r.accessors[0],c=t.accessors[0],h=n.accessors[1],a=Or(e),d=s.length-1,p=o,m=0;m<u.length;m++)h(l,p,f(s,a(c(u,m),d))),p+=i}(a,s,e,u,i,o),n):(function(r,t,e,n,i,o){var a,s,u,l,f;for(a=Or(e),s=r.length-1,u=o,l=0;l<t.length;l++)f=a(t[l],s),n[u]=r[f],u+=i}(r,t,e,n,i,o),n)})),e(zo,"assign",(function(r,t,e,n,i,o,a){var s,u,l;return s=De(r),u=De(t),l=De(n),s.accessorProtocol||u.accessorProtocol||l.accessorProtocol?sn(s.dtype)&&sn(l.dtype)?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p;for(u=t.data,l=t.accessors[0],s=Or(e),f=r.length/2-1,h=2*i,c=2*o,d=0;d<u.length;d++)p=2*s(l(u,d),f),n[c]=a.call(null,r[p],p),n[c+1]=a.call(null,r[p+1],p+1),c+=h}(cr(r,0),u,e,cr(n,0),i,o,a),n):(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p,m,g,v;for(u=r.data,l=t.data,f=n.data,c=r.accessors[0],h=t.accessors[0],d=n.accessors[1],s=Or(e),p=u.length-1,m=o,g=0;g<l.length;g++)v=s(h(l,g),p),d(f,m,a.call(null,c(u,v),v)),m+=i}(s,u,e,l,i,o,a),n):(function(r,t,e,n,i,o,a){var s,u,l,f,c;for(s=Or(e),u=r.length-1,l=o,f=0;f<t.length;f++)c=s(t[f],u),n[l]=r[c],l+=i;for(f=0;f<n.length;f++)n[f]=a.call(null,n[f],f)}(r,t,e,n,i,o,a),n)}));var Yo=2;function qo(r,t,e,n){var i,o,a,s,u,l,f,c,h;if(-1===(a=Cr(e,Yo-1)))throw new RangeError(O("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",Yo,e));if(s=Or(n),o=[],0===a){for(i=r.length-1,f=0;f<t.length;f++)u=s(t[f],i),o.push(r[u]);return o}for(f=0;f<r.length;f++){for(h=[],i=(c=r[f]).length-1,l=0;l<t.length;l++)u=s(t[l],i),h.push(c[u]);o.push(h)}return o}function Wo(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}}}var Go={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}},Jo={"dtypes.default":Go.dtypes.default,"dtypes.numeric":Go.dtypes.numeric,"dtypes.real":Go.dtypes.real,"dtypes.floating_point":Go.dtypes.floating_point,"dtypes.real_floating_point":Go.dtypes.real_floating_point,"dtypes.complex_floating_point":Go.dtypes.complex_floating_point,"dtypes.integer":Go.dtypes.integer,"dtypes.signed_integer":Go.dtypes.signed_integer,"dtypes.unsigned_integer":Go.dtypes.unsigned_integer,"dtypes.boolean":Go.dtypes.boolean,"dtypes.index":Go.dtypes.index,"dtypes.integer_index":Go.dtypes.integer_index,"dtypes.boolean_index":Go.dtypes.boolean_index,"dtypes.mask_index":Go.dtypes.mask_index};e(Wo,"get",(function(r){var t=Jo[r];return void 0===t?null:t}));var $o=Wo.get("dtypes.default"),Ko=tn("numeric_and_generic"),Ho=qe(Ko);function Qo(r){var t,e;if(!m(r))throw new TypeError(O("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if(!Ho(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(Ko,'", "'),t))}else t=$o;if("generic"===t)return Dn(r);if(null===(e=Bi(t)))throw new TypeError(O("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}function Zo(r,t,e,n,i,o){var a,s,u;for(a=o,u=0,s=0;s<r.length+1;s++)s===t?n[a]=e:(n[a]=r[u],u+=1),a+=i;return n}function Xo(r,t,e,n,i,o){var a,s;if((t=Cr(t,r.length))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return a=De(r),s=De(n),a.accessorProtocol||s.accessorProtocol?sn(a.dtype)&&sn(s.dtype)&&j(e)?(function(r,t,e,n,i,o){var a,s,u,l;for(a=2*i,s=2*o,l=0,u=0;u<(r.length+2)/2;u++)u===t?(n[s]=N(e),n[s+1]=D(e)):(n[s]=r[l],n[s+1]=r[l+1],l+=2),s+=a}(cr(r,0),t,e,cr(n,0),i,o),n):en(a.dtype)&&en(s.dtype)?(Zo(K(r,0),t,G(e),K(n,0),i,o),n):(function(r,t,e,n,i,o){var a,s,u,l,f,c,h;for(a=r.data,s=n.data,u=r.accessors[0],l=n.accessors[1],f=o,h=0,c=0;c<a.length+1;c++)c===t?l(s,f,e):(l(s,f,u(a,h)),h+=1),f+=i}(a,t,e,s,i,o),n):(Zo(r,t,e,n,i,o),n)}function ra(r,t,e){var n;if((t=Cr(t,r.length))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return Xo(r,t,e,n=Qo(r.length+1,Ie(r)||"generic"),1,0),n}function ta(r,t,e,n,i,o){var a,s,u;if(a=n[i],(s=i+1)!==e)for(u=0;u<a;u++)ta(r[u],t[u],e,n,s,o);else for(u=0;u<a;u++)t[u]=o(r[u])}function ea(r,t){if(1===r)return 0;if(r===t)return 1;throw new Error("invalid arguments. Input arguments are not broadcast compatible.")}function na(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g;if(0===(a=[r.length,t.length,e.length])[0])return[];for(p=Nr(a[0],a[1],a[2]),f=ea(a[0],p),u=ea(a[1],p),l=ea(a[2],p),o=ze(r),n=ze(t),i=ze(e),d=0,c=0,h=0,s=[],g=0;g<p;g++)m=o(r,d)?n(t,c):i(e,h),s.push(m),d+=f,c+=u,h+=l;return s}function ia(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p;for(l=ea(t.length,r),s=ea(e.length,r),u=ea(n.length,r),h=0,f=0,c=0,d=a,p=0;p<r;p++)i[d]=t[h]?e[f]:n[c],h+=l,f+=s,c+=u,d+=o;return i}function oa(r,t,e,n,i,o){var a,s,u,l,f;return 0===r.length?n:(f=function(r,t,e){return jr(t<0?(e+1)/-t:(r-e)/t)}(n.length,i,o),a=De(r),en(a.dtype)&&(a=De(r=K(r,0))),s=De(t),u=De(e),l=De(n),a.accessorProtocol||s.accessorProtocol||u.accessorProtocol||l.accessorProtocol?!1===a.accessorProtocol&&en(s.dtype)&&en(u.dtype)&&en(l.dtype)?(ia(f,r,K(t,0),K(e,0),K(n,0),i,o),n):sn(s.dtype)&&sn(u.dtype)&&sn(l.dtype)?(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p,m,g,v;for(s=t.data,u=t.accessors[0],c=ea(s.length,r),l=2*ea(e.length/2,r),f=2*ea(n.length/2,r),h=2*o,m=0,d=0,p=0,g=2*a,v=0;v<r;v++)u(s,m)?(i[g]=e[d],i[g+1]=e[d+1]):(i[g]=n[p],i[g+1]=n[p+1]),m+=c,d+=l,p+=f,g+=h}(f,a,cr(t,0),cr(e,0),cr(n,0),i,o),n):(function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;for(l=t.data,s=e.data,u=n.data,f=i.data,d=t.accessors[0],c=e.accessors[0],h=n.accessors[0],p=i.accessors[1],v=ea(l.length,r),m=ea(s.length,r),g=ea(u.length,r),b=0,y=0,w=0,E=a,x=0;x<r;x++)p(f,E,d(l,b)?c(s,y):h(u,w)),b+=v,y+=m,w+=g,E+=o}(f,a,s,u,l,i,o),n):(ia(f,r,t,e,n,i,o),n))}function aa(r,t,e){var n;if("function"==typeof r["with"])return r.with(t,e);if((t=Cr(t,r.length-1))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return Co(n=Mo(r,0,r.length))(n,t,e),n}function sa(r,t,e,n,i,o){var a,s;for(a=o,s=0;s<r.length;s++)n[a]=r[s],a+=i;return n[o+t*i]=e,n}function ua(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 la(r,t,e,n,i){var o,a;if((t=Cr(t,r.length-1))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return o=De(r),a=De(e),o.accessorProtocol||a.accessorProtocol?sn(o.dtype)&&sn(a.dtype)?(function(r,t,e,n,i){var o,a,s,u;for(o=2*n,a=2*i,s=0;s<r.length/2;s++)s!==t&&(u=2*s,e[a]=r[u],e[a+1]=r[u+1],a+=o)}(cr(r,0),t,cr(e,0),n,i),e):en(o.dtype)&&en(a.dtype)?(ua(K(r,0),t,K(e,0),n,i),e):(function(r,t,e,n,i){var o,a,s,u,l,f;for(o=r.data,a=e.data,s=r.accessors[0],u=e.accessors[1],l=i,f=0;f<o.length;f++)f!==t&&(u(a,l,s(o,f)),l+=n)}(o,t,a,n,i),e):(ua(r,t,e,n,i),e)}function fa(r,t){var e;if((t=Cr(t,r.length-1))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return la(r,t,e=Qo(r.length-1,Ie(r)||"generic"),1,0),e}e(ra,"assign",Xo),e(na,"assign",oa),e(aa,"assign",(function(r,t,e,n,i,o){var a,s;if((t=Cr(t,r.length-1))<0)throw new RangeError(O("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return a=De(r),s=De(n),a.accessorProtocol||s.accessorProtocol?sn(a.dtype)&&sn(s.dtype)&&j(e)?(function(r,t,e,n,i,o){var a,s,u,l;for(a=2*i,s=2*o,u=0;u<r.length/2;u++)l=2*u,n[s]=r[l],n[s+1]=r[l+1],s+=a;n[s=2*(o+t*i)]=N(e),n[s+1]=D(e)}(cr(r,0),t,e,cr(n,0),i,o),n):en(a.dtype)&&en(s.dtype)?(sa(K(r,0),t,G(e),K(n,0),i,o),n):(function(r,t,e,n,i,o){var a,s,u,l,f,c;for(a=r.data,s=n.data,u=r.accessors[0],l=n.accessors[1],f=o,c=0;c<a.length;c++)l(s,f,u(a,c)),f+=i;l(s,o+t*i,e)}(a,t,e,s,i,o),n):(sa(r,t,e,n,i,o),n)})),e(fa,"assign",la);var ca={};r(ca,"AccessorArray",Oe),r(ca,"accessorGetter",Dt),r(ca,"accessorSetter",zt),r(ca,"accessors",Me),r(ca,"any",(function(r){var t=De(r);return t.accessorProtocol?ce(r)?Ue(J(r,0)):le(r)?Ue($(r,0)):Ne(r)?Ue(K(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):Ue(r)})),r(ca,"anyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"some")?r.some(t,e):(n=De(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)})),r(ca,"anyByRight",(function(r,t,e){var n=De(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)})),r(ca,"anyHasOwnProp",(function(r,t){return Rt(r)?function(r,t){var e,n;for(e=ze(r),n=0;n<r.length;n++)if(H(e(r,n),t))return!0;return!1}(r,t):function(r,t){var e;for(e=0;e<r.length;e++)if(H(r[e],t))return!0;return!1}(r,t)})),r(ca,"anyHasProp",(function(r,t){return Rt(r)?function(r,t){var e,n;for(e=ze(r),n=0;n<r.length;n++)if(Q(e(r,n),t))return!0;return!1}(r,t):function(r,t){var e;for(e=0;e<r.length;e++)if(Q(r[e],t))return!0;return!1}(r,t)})),r(ca,"anyIsEntry",(function(r,t,e){return Rt(r)?function(r,t,e){var n,i,o;for(n=ze(r),o=0;o<r.length;o++)if(i=n(r,o),H(i,t)&&i[t]===e)return!0;return!1}(r,t,e):function(r,t,e){var n,i;for(i=0;i<r.length;i++)if(n=r[i],H(n,t)&&n[t]===e)return!0;return!1}(r,t,e)})),r(ca,"anyIsEntryIn",(function(r,t,e){return Rt(r)?function(r,t,e){var n,i,o;if(n=ze(r),void 0===e){for(o=0;o<r.length;o++)if(i=n(r,o),Q(i,t)&&i[t]===e)return!0;return!1}for(o=0;o<r.length;o++)if(n(r,o)[t]===e)return!0;return!1}(r,t,e):function(r,t,e){var n,i;if(void 0===e){for(i=0;i<r.length;i++)if(n=r[i],Q(n,t)&&n[t]===e)return!0;return!1}for(i=0;i<r.length;i++)if(r[i][t]===e)return!0;return!1}(r,t,e)})),r(ca,"arraylike2object",De),r(ca,"assert",Ln),r(ca,"at",(function(r,t){if("function"==typeof r["at"])return r.at(t);if(t<0){if((t+=r.length)<0)return}else if(t>=r.length)return;return ze(r)(r,t)})),r(ca,"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]})),r(ca,"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]})),r(ca,"at4d",(function(r,t,e,n,i){var o,a,s,u,l;for(a=[t,e,n,i],o=r,u=0;u<a.length;u++){if(l=a[u],s=o.length,l<0&&(l+=s),l<0||l>=s)return;o=o[l]}return o})),r(ca,"at5d",(function(r,t,e,n,i,o){var a,s,u,l,f;for(s=[t,e,n,i,o],a=r,l=0;l<s.length;l++){if(f=s[l],u=a.length,f<0&&(f+=u),f<0||f>=u)return;a=a[f]}return a})),r(ca,"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})),r(ca,"banded",On),r(ca,"bifurcateEntries",(function(r,t){var e,n,i,o,a,s;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=ze(r),n=ze(t),o=[[],[]],s=0;s<i;s++)a=e(r,s),n(t,s)?o[0].push([s,a]):o[1].push([s,a]);return o})),r(ca,"bifurcateEntriesBy",(function(r,t,e){var n,i,o,a,s;if(0===(i=r.length))return[];for(n=ze(r),o=[[],[]],s=0;s<i;s++)a=n(r,s),t.call(e,a,s,r)?o[0].push([s,a]):o[1].push([s,a]);return o})),r(ca,"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=ze(t),i=[[],[]],o=0;o<n;o++)e(t,o)?i[0].push(o):i[1].push(o);return i})),r(ca,"bifurcateIndicesBy",(function(r,t,e){var n,i,o,a;if(0===(i=r.length))return[];for(n=ze(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})),r(ca,"bifurcateValues",(function(r,t){var e,n,i,o,a,s;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=ze(r),n=ze(t),o=[[],[]],s=0;s<i;s++)a=e(r,s),n(t,s)?o[0].push(a):o[1].push(a);return o})),r(ca,"bifurcateValuesBy",(function(r,t,e){var n,i,o,a,s;if(0===(i=r.length))return[];for(n=ze(r),o=[[],[]],s=0;s<i;s++)a=n(r,s),t.call(e,a,s,r)?o[0].push(a):o[1].push(a);return o})),r(ca,"binary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(f=r[0],c=r[1],h=r[2],a=0;a<i;a++)for(s=f[a],u=c[a],l=h[a],o=0;o<n;o++)l[o]=e(s[o],u[o])})),r(ca,"binary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(m=r[0],g=r[1],v=r[2],u=0;u<o;u++)for(f=m[u],h=g[u],p=v[u],s=0;s<i;s++)for(l=f[s],c=h[s],d=p[s],a=0;a<n;a++)d[a]=e(l[a],c[a])})),r(ca,"binary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;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],x=r[2],f=0;f<a;f++)for(d=b[f],g=E[f],w=x[f],l=0;l<o;l++)for(h=d[l],m=g[l],y=w[l],u=0;u<i;u++)for(c=h[u],p=m[u],v=y[u],s=0;s<n;s++)v[s]=e(c[s],p[s])})),r(ca,"binary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(_=r[0],V=r[1],k=r[2],h=0;h<s;h++)for(g=_[h],b=V[h],j=k[h],c=0;c<a;c++)for(m=g[c],w=b[c],T=j[c],f=0;f<o;f++)for(p=m[f],y=w[f],x=T[f],l=0;l<i;l++)for(d=p[l],v=y[l],E=x[l],u=0;u<n;u++)E[u]=e(d[u],v[u])})),r(ca,"binarynd",(function(r,t,e){return Cn(r[0],r[1],r[2],t.length,t,0,e)})),r(ca,"broadcastArray",Un),r(ca,"bbinary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T;if(s=(y=t[2])[1],u=y[0],!(s<=0||u<=0))for(E=(b=Un(r[0],t[0],y)).data,n=(w=b.strides)[1],i=w[0],x=(b=Un(r[1],t[1],y)).data,o=(w=b.strides)[1],a=w[0],T=r[2],h=0,p=0,f=0;f<u;f++){for(c=0,d=0,m=E[h],g=x[p],v=T[f],l=0;l<s;l++)v[l]=e(m[c],g[d]),c+=n,d+=o;h+=i,p+=a}})),r(ca,"bbinary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B;if(l=(k=t[2])[2],f=k[1],c=k[0],!(l<=0||f<=0||c<=0))for(S=(F=Un(r[0],t[0],k)).data,n=(A=F.strides)[2],i=A[1],o=A[0],P=(F=Un(r[1],t[1],k)).data,a=(A=F.strides)[2],s=A[1],u=A[0],B=r[2],v=0,b=0,p=0;p<c;p++){for(g=0,w=0,x=S[v],j=P[b],V=B[p],d=0;d<f;d++){for(m=0,y=0,E=x[g],T=j[w],_=V[d],h=0;h<l;h++)_[h]=e(E[m],T[y]),m+=n,y+=a;g+=i,w+=s}v+=o,b+=u}})),r(ca,"bbinary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U;if(c=(M=t[2])[3],h=M[2],d=M[1],p=M[0],!(c<=0||h<=0||d<=0||p<=0))for(N=(C=Un(r[0],t[0],M)).data,n=(O=C.strides)[3],i=O[2],o=O[1],a=O[0],D=(C=Un(r[1],t[1],M)).data,s=(O=C.strides)[3],u=O[2],l=O[1],f=O[0],U=r[2],x=0,V=0,y=0;y<p;y++){for(E=0,_=0,F=N[x],B=D[V],I=U[y],v=0;v<d;v++){for(b=0,j=0,A=F[E],P=B[_],R=I[v],g=0;g<h;g++){for(w=0,T=0,k=A[b],S=P[j],L=R[g],m=0;m<c;m++)L[m]=e(k[w],S[T]),w+=n,T+=s;b+=i,j+=u}E+=o,_+=l}x+=a,V+=f}})),r(ca,"bbinary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H;if(d=(W=t[2])[4],p=W[3],m=W[2],g=W[1],v=W[0],!(d<=0||p<=0||m<=0||g<=0||v<=0))for($=(J=Un(r[0],t[0],W)).data,n=(G=J.strides)[4],i=G[3],o=G[2],a=G[1],s=G[0],K=(J=Un(r[1],t[1],W)).data,u=(G=J.strides)[4],l=G[3],f=G[2],c=G[1],h=G[0],H=r[2],k=0,B=0,x=0;x<v;x++){for(V=0,P=0,M=$[k],D=K[B],q=H[x],E=0;E<g;E++){for(_=0,S=0,I=M[V],N=D[P],Y=q[E],b=0;b<m;b++){for(j=0,F=0,R=I[_],C=N[S],z=Y[b],w=0;w<p;w++){for(T=0,A=0,L=R[j],O=C[F],U=z[w],y=0;y<d;y++)U[y]=e(L[T],O[A]),T+=n,A+=u;j+=i,F+=l}_+=o,S+=f}V+=a,P+=c}k+=s,B+=h}})),r(ca,"bquaternary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I;if(c=(A=t[4])[1],h=A[0],!(c<=0||h<=0))for(P=(S=Un(r[0],t[0],A)).data,n=(F=S.strides)[1],i=F[0],B=(S=Un(r[1],t[1],A)).data,o=(F=S.strides)[1],a=F[0],L=(S=Un(r[2],t[2],A)).data,s=(F=S.strides)[1],u=F[0],R=(S=Un(r[3],t[3],A)).data,l=(F=S.strides)[1],f=F[0],I=r[4],g=0,y=0,b=0,x=0,p=0;p<h;p++){for(m=0,v=0,w=0,E=0,T=P[g],j=B[y],_=L[b],V=R[x],k=I[p],d=0;d<c;d++)k[d]=e(T[m],j[v],_[w],V[E]),m+=n,v+=o,w+=s,E+=l;g+=i,y+=a,b+=u,x+=f}})),r(ca,"bquaternary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H;if(m=(Y=t[4])[2],g=Y[1],v=Y[0],!(m<=0||g<=0||v<=0))for(G=(W=Un(r[0],t[0],Y)).data,n=(q=W.strides)[2],i=q[1],o=q[0],J=(W=Un(r[1],t[1],Y)).data,a=(q=W.strides)[2],s=q[1],u=q[0],$=(W=Un(r[2],t[2],Y)).data,l=(q=W.strides)[2],f=q[1],c=q[0],K=(W=Un(r[3],t[3],Y)).data,h=(q=W.strides)[2],d=q[1],p=q[0],H=r[4],T=0,V=0,F=0,B=0,b=0;b<v;b++){for(x=0,_=0,A=0,P=0,R=G[T],M=J[V],C=$[F],D=K[B],z=H[b],w=0;w<g;w++){for(E=0,j=0,k=0,S=0,L=R[x],I=M[_],O=C[A],N=D[P],U=z[w],y=0;y<m;y++)U[y]=e(L[E],I[j],O[k],N[S]),E+=n,j+=a,k+=l,S+=h;x+=i,_+=s,A+=f,P+=d}T+=o,V+=u,F+=c,B+=p}})),r(ca,"bquaternary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H,Q,Z,X,rr,tr,er,nr,ir,or,ar,sr,ur,lr,fr,cr;if(w=(ir=t[4])[3],b=ir[2],E=ir[1],x=ir[0],!(w<=0||b<=0||E<=0||x<=0))for(sr=(ar=Un(r[0],t[0],ir)).data,n=(or=ar.strides)[3],i=or[2],o=or[1],a=or[0],ur=(ar=Un(r[1],t[1],ir)).data,s=(or=ar.strides)[3],u=or[2],l=or[1],f=or[0],lr=(ar=Un(r[2],t[2],ir)).data,c=(or=ar.strides)[3],h=or[2],d=or[1],p=or[0],fr=(ar=Un(r[3],t[3],ir)).data,m=(or=ar.strides)[3],g=or[2],v=or[1],y=or[0],cr=r[4],S=0,R=0,C=0,z=0,V=0;V<x;V++){for(F=0,L=0,O=0,U=0,W=sr[S],$=ur[R],Q=lr[C],rr=fr[z],nr=cr[V],_=0;_<E;_++){for(A=0,B=0,M=0,D=0,q=W[F],J=$[L],H=Q[O],X=rr[U],er=nr[_],j=0;j<b;j++){for(k=0,P=0,I=0,N=0,Y=q[A],G=J[B],K=H[M],Z=X[D],tr=er[j],T=0;T<w;T++)tr[T]=e(Y[k],G[P],K[I],Z[N]),k+=n,P+=s,I+=c,N+=m;A+=i,B+=u,M+=h,D+=g}F+=o,L+=l,O+=d,U+=v}S+=a,R+=f,C+=p,z+=y}})),r(ca,"bquaternary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H,Q,Z,X,rr,tr,er,nr,ir,or,ar,sr,ur,lr,fr,cr,hr,dr,pr,mr,gr,vr,yr,wr,br,Er,xr,Tr,jr,_r,Vr;if(T=(wr=t[4])[4],j=wr[3],_=wr[2],V=wr[1],k=wr[0],!(T<=0||j<=0||_<=0||V<=0||k<=0))for(xr=(Er=Un(r[0],t[0],wr)).data,n=(br=Er.strides)[4],i=br[3],o=br[2],a=br[1],s=br[0],Tr=(Er=Un(r[1],t[1],wr)).data,u=(br=Er.strides)[4],l=br[3],f=br[2],c=br[1],h=br[0],jr=(Er=Un(r[2],t[2],wr)).data,d=(br=Er.strides)[4],p=br[3],m=br[2],g=br[1],v=br[0],_r=(Er=Un(r[3],t[3],wr)).data,y=(br=Er.strides)[4],w=br[3],b=br[2],E=br[1],x=br[0],Vr=r[4],O=0,z=0,J=0,Z=0,B=0;B<k;B++){for(M=0,U=0,G=0,Q=0,er=xr[O],ar=Tr[z],fr=jr[J],pr=_r[Z],yr=Vr[B],P=0;P<V;P++){for(I=0,D=0,W=0,H=0,tr=er[M],or=ar[U],lr=fr[G],dr=pr[Q],vr=yr[P],S=0;S<_;S++){for(R=0,N=0,q=0,K=0,rr=tr[I],ir=or[D],ur=lr[W],hr=dr[H],gr=vr[S],F=0;F<j;F++){for(L=0,C=0,Y=0,$=0,X=rr[R],nr=ir[N],sr=ur[q],cr=hr[K],mr=gr[F],A=0;A<T;A++)mr[A]=e(X[L],nr[C],sr[Y],cr[$]),L+=n,C+=u,Y+=d,$+=y;R+=i,N+=l,q+=p,K+=w}I+=o,D+=f,W+=m,H+=b}M+=a,U+=c,G+=g,Q+=E}O+=s,z+=h,J+=v,Z+=x}})),r(ca,"bquinary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U;if(d=(L=t[5])[1],p=L[0],!(d<=0||p<=0))for(M=(I=Un(r[0],t[0],L)).data,n=(R=I.strides)[1],i=R[0],O=(I=Un(r[1],t[1],L)).data,o=(R=I.strides)[1],a=R[0],C=(I=Un(r[2],t[2],L)).data,s=(R=I.strides)[1],u=R[0],N=(I=Un(r[3],t[3],L)).data,l=(R=I.strides)[1],f=R[0],D=(I=Un(r[4],t[4],L)).data,c=(R=I.strides)[1],h=R[0],U=r[5],y=0,b=0,x=0,j=0,V=0,g=0;g<p;g++){for(v=0,w=0,E=0,T=0,_=0,k=M[y],A=O[b],F=C[x],S=N[j],P=D[V],B=U[g],m=0;m<d;m++)B[m]=e(k[v],A[w],F[E],S[T],P[_]),v+=n,w+=o,E+=s,T+=l,_+=c;y+=i,b+=a,x+=u,j+=f,V+=h}})),r(ca,"bquinary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H,Q,Z,X,rr,tr,er,nr,ir,or,ar,sr,ur,lr,fr,cr,hr,dr,pr,mr,gr,vr,yr,wr,br,Er,xr,Tr;if(T=(mr=t[5])[3],j=mr[2],_=mr[1],V=mr[0],!(T<=0||j<=0||_<=0||V<=0))for(yr=(vr=Un(r[0],t[0],mr)).data,n=(gr=vr.strides)[3],i=gr[2],o=gr[1],a=gr[0],wr=(vr=Un(r[1],t[1],mr)).data,s=(gr=vr.strides)[3],u=gr[2],l=gr[1],f=gr[0],br=(vr=Un(r[2],t[2],mr)).data,c=(gr=vr.strides)[3],h=gr[2],d=gr[1],p=gr[0],Er=(vr=Un(r[3],t[3],mr)).data,m=(gr=vr.strides)[3],g=gr[2],v=gr[1],y=gr[0],xr=(vr=Un(r[4],t[4],mr)).data,w=(gr=vr.strides)[3],b=gr[2],E=gr[1],x=gr[0],Tr=r[5],R=0,C=0,z=0,G=0,H=0,S=0;S<V;S++){for(L=0,O=0,U=0,W=0,K=0,X=yr[R],er=wr[C],or=br[z],ur=Er[G],cr=xr[H],pr=Tr[S],F=0;F<_;F++){for(B=0,M=0,D=0,q=0,$=0,Z=X[L],tr=er[O],ir=or[U],sr=ur[W],fr=cr[K],dr=pr[F],A=0;A<j;A++){for(P=0,I=0,N=0,Y=0,J=0,Q=Z[B],rr=tr[M],nr=ir[D],ar=sr[q],lr=fr[$],hr=dr[A],k=0;k<T;k++)hr[k]=e(Q[P],rr[I],nr[N],ar[Y],lr[J]),P+=n,I+=s,N+=c,Y+=m,J+=w;B+=i,M+=u,D+=h,q+=g,$+=b}L+=o,O+=l,U+=d,W+=v,K+=E}R+=a,C+=f,z+=p,G+=y,H+=x}})),r(ca,"bternary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F;if(l=(T=t[3])[1],f=T[0],!(l<=0||f<=0))for(V=(_=Un(r[0],t[0],T)).data,n=(j=_.strides)[1],i=j[0],k=(_=Un(r[1],t[1],T)).data,o=(j=_.strides)[1],a=j[0],A=(_=Un(r[2],t[2],T)).data,s=(j=_.strides)[1],u=j[0],F=r[3],p=0,g=0,y=0,h=0;h<f;h++){for(d=0,m=0,v=0,w=V[p],b=k[g],E=A[y],x=F[h],c=0;c<l;c++)x[c]=e(w[d],b[m],E[v]),d+=n,m+=o,v+=s;p+=i,g+=a,y+=u}})),r(ca,"bternary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U;if(h=(L=t[3])[2],d=L[1],p=L[0],!(h<=0||d<=0||p<=0))for(C=(O=Un(r[0],t[0],L)).data,n=(R=O.strides)[2],i=R[1],o=R[0],N=(O=Un(r[1],t[1],L)).data,a=(R=O.strides)[2],s=R[1],u=R[0],D=(O=Un(r[2],t[2],L)).data,l=(R=O.strides)[2],f=R[1],c=R[0],U=r[3],b=0,T=0,V=0,v=0;v<p;v++){for(w=0,x=0,_=0,A=C[b],S=N[T],B=D[V],M=U[v],g=0;g<d;g++){for(y=0,E=0,j=0,k=A[w],F=S[x],P=B[_],I=M[g],m=0;m<h;m++)I[m]=e(k[y],F[E],P[j]),y+=n,E+=a,j+=l;w+=i,x+=s,_+=f}b+=o,T+=u,V+=c}})),r(ca,"bternary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H,Q,Z,X;if(m=(q=t[3])[3],g=q[2],v=q[1],y=q[0],!(m<=0||g<=0||v<=0||y<=0))for(H=(K=Un(r[0],t[0],q)).data,n=(W=K.strides)[3],i=W[2],o=W[1],a=W[0],Q=(K=Un(r[1],t[1],q)).data,s=(W=K.strides)[3],u=W[2],l=W[1],f=W[0],Z=(K=Un(r[2],t[2],q)).data,c=(W=K.strides)[3],h=W[2],d=W[1],p=W[0],X=r[3],V=0,S=0,R=0,x=0;x<y;x++){for(_=0,F=0,L=0,O=H[V],D=Q[S],Y=Z[R],$=X[x],E=0;E<v;E++){for(j=0,A=0,B=0,M=O[_],N=D[F],z=Y[L],J=$[E],b=0;b<g;b++){for(T=0,k=0,P=0,I=M[j],C=N[A],U=z[B],G=J[b],w=0;w<m;w++)G[w]=e(I[T],C[k],U[P]),T+=n,k+=s,P+=c;j+=i,A+=u,B+=h}_+=o,F+=l,L+=d}V+=a,S+=f,R+=p}})),r(ca,"bternary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z,Y,q,W,G,J,$,K,H,Q,Z,X,rr,tr,er,nr,ir,or,ar,sr,ur,lr,fr,cr;if(y=(tr=t[3])[4],w=tr[3],b=tr[2],E=tr[1],x=tr[0],!(y<=0||w<=0||b<=0||E<=0||x<=0))for(ur=(sr=Un(r[0],t[0],tr)).data,n=(er=sr.strides)[4],i=er[3],o=er[2],a=er[1],s=er[0],lr=(sr=Un(r[1],t[1],tr)).data,u=(er=sr.strides)[4],l=er[3],f=er[2],c=er[1],h=er[0],fr=(sr=Un(r[2],t[2],tr)).data,d=(er=sr.strides)[4],p=er[3],m=er[2],g=er[1],v=er[0],cr=r[3],B=0,O=0,z=0,k=0;k<x;k++){for(P=0,M=0,U=0,G=ur[B],H=lr[O],rr=fr[z],ar=cr[k],V=0;V<E;V++){for(S=0,I=0,D=0,W=G[P],K=H[M],X=rr[U],or=ar[V],_=0;_<b;_++){for(F=0,R=0,N=0,q=W[S],$=K[I],Z=X[D],ir=or[_],j=0;j<w;j++){for(A=0,L=0,C=0,Y=q[F],J=$[R],Q=Z[N],nr=ir[j],T=0;T<y;T++)nr[T]=e(Y[A],J[L],Q[C]),A+=n,L+=u,C+=d;F+=i,R+=l,N+=p}S+=o,I+=f,D+=m}P+=a,M+=c,U+=g}B+=s,O+=h,z+=v}})),r(ca,"bunary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v;if(o=(d=t[1])[1],a=d[0],!(o<=0||a<=0))for(g=(m=Un(r[0],t[0],d)).data,n=(p=m.strides)[1],i=p[0],v=r[1],f=0,u=0;u<a;u++){for(l=0,c=g[f],h=v[u],s=0;s<o;s++)h[s]=e(c[l]),l+=n;f+=i}})),r(ca,"bunary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T;if(a=(w=t[1])[2],s=w[1],u=w[0],!(a<=0||s<=0||u<=0))for(x=(E=Un(r[0],t[0],w)).data,n=(b=E.strides)[2],i=b[1],o=b[0],T=r[1],p=0,c=0;c<u;c++){for(d=0,g=x[p],y=T[c],f=0;f<s;f++){for(h=0,m=g[d],v=y[f],l=0;l<a;l++)v[l]=e(m[h]),h+=n;d+=i}p+=o}})),r(ca,"bunary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F;if(s=(_=t[1])[3],u=_[2],l=_[1],f=_[0],!(s<=0||u<=0||l<=0||f<=0))for(A=(k=Un(r[0],t[0],_)).data,n=(V=k.strides)[3],i=V[2],o=V[1],a=V[0],F=r[1],y=0,p=0;p<f;p++){for(v=0,E=A[y],j=F[p],d=0;d<l;d++){for(g=0,b=E[v],T=j[d],h=0;h<u;h++){for(m=0,w=b[g],x=T[h],c=0;c<s;c++)x[c]=e(w[m]),m+=n;g+=i}v+=o}y+=a}})),r(ca,"bunary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I;if(u=(P=t[1])[4],l=P[3],f=P[2],c=P[1],h=P[0],!(u<=0||l<=0||f<=0||c<=0||h<=0))for(R=(L=Un(r[0],t[0],P)).data,n=(B=L.strides)[4],i=B[3],o=B[2],a=B[1],s=B[0],I=r[1],x=0,v=0;v<h;v++){for(E=0,V=R[x],S=I[v],g=0;g<c;g++){for(b=0,_=V[E],F=S[g],m=0;m<f;m++){for(w=0,j=_[b],A=F[m],p=0;p<l;p++){for(y=0,T=j[w],k=A[p],d=0;d<u;d++)k[d]=e(T[y]),y+=n;w+=i}b+=o}E+=a}x+=s}})),r(ca,"cartesianPower",zn),r(ca,"cartesianProduct",Yn),r(ca,"cartesianSquare",qn),r(ca,"copy",Wn),r(ca,"copyIndexed",Nn),r(ca,"countFalsy",Jn),r(ca,"countIf",(function(r,t,e){return Rt(r)?function(r,t,e){var n,i,o;for(n=ze(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)})),r(ca,"countIfs",(function(){var r,t,e,n,i;for(t=[],r=[],i=0;i<arguments.length;i+=2)t.push(De(arguments[i])),r.push(arguments[i+1]);for(e=$n(arguments[0].length),i=0;i<t.length;i++)e=(n=t[i]).accessorProtocol?Hn(n,e,r[i]):Qn(n.data,e,r[i]);return e.length})),r(ca,"countSameValue",(function(r,t){return Rt(r)?fn(r)?function(r,t){var e,n,i,o,a;if(!j(t))return 0;for(n=N(t),i=D(t),e=cr(r,0),o=0,a=0;a<e.length;a+=2)ir(e[a],n)&&ir(e[a+1],i)&&(o+=1);return o}(r,t):Ne(r)?function(r,t){var e,n,i,o;if(!U(t))return 0;for(e=K(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=ze(r),n=0,i=0;i<r.length;i++)ir(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++)ir(r[n],t)&&(e+=1);return e}(r,t)})),r(ca,"countSameValueZero",(function(r,t){return Rt(r)?fn(r)?function(r,t){var e,n,i,o,a;if(!j(t))return 0;for(n=N(t),i=D(t),e=cr(r,0),o=0,a=0;a<e.length;a+=2)hr(e[a],n)&&hr(e[a+1],i)&&(o+=1);return o}(r,t):Ne(r)?function(r,t){var e,n,i,o;if(!U(t))return 0;for(e=K(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=ze(r),n=0,i=0;i<r.length;i++)hr(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++)hr(r[n],t)&&(e+=1);return e}(r,t)})),r(ca,"countTruthy",Xn),r(ca,"cuany",ei),r(ca,"cuanyBy",ii),r(ca,"cuanyByRight",ai),r(ca,"cuevery",li),r(ca,"cueveryBy",ci),r(ca,"cueveryByRight",di),r(ca,"cunone",gi),r(ca,"cunoneBy",yi),r(ca,"cunoneByRight",bi),r(ca,"cusome",Ti),r(ca,"cusomeBy",_i),r(ca,"cusomeByRight",ki),r(ca,"dedupe",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,s,u;if(0===(i=r.length))return r;for(a=!1,n=r[0],dr(n)&&(a=!0),e=1,o=1,u=1;u<i;u++)(s=r[u])===n||a&&dr(s)?(e+=1)<=t&&(r[o]=n,o+=1):(n=s,e=1,r[o]=n,o+=1,a=!1,dr(n)&&(a=!0));return r.length=o,r}(r,t):function(r,t){var e,n,i,o,a,s;if(0===(i=r.length))return r;for(n=r[0],e=1,o=1,s=1;s<i;s++)(a=r[s])===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)})),r(ca,"entries2objects",(function(r,t){var e,n,i,o,a,s,u;if((o=r.length)<1)return[];for(s=(e=ze(t))(t,0),u=e(t,1),e=ze(r),n=[],a=0;a<o;a++)(i={})[s]=a,i[u]=e(r,a),n.push(i);return n})),r(ca,"entries2views",(function(r,t){var n,i,o,a,s,u,l,f,c;if((u=r.length)<1)return[];function h(r){return e(this,"_i",r),this}for(a=Me(r).accessors,i=a[0],o=a[1],n=ze(t),l=n(t,0),f=n(t,1),pr(h.prototype,l,(function(){return this._i})),mr(h.prototype,f,(function(){return i(r,this._i)}),(function(t){o(r,this._i,t)})),e(h.prototype,"toJSON",(function(){var r;return r={},r[l]=this[l],r[f]=this[f],r})),s=[],c=0;c<u;c++)s.push(new h(c));return s})),r(ca,"every",(function(r){var t=De(r);return t.accessorProtocol?ce(r)?Fi(J(r,0)):le(r)?Fi($(r,0)):Ne(r)?Ai(K(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):Ai(r)})),r(ca,"everyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"every")?r.every(t,e):(n=De(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)})),r(ca,"everyByRight",(function(r,t,e){var n=De(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)})),r(ca,"falses",(function(r){return Rn(!1,r)})),r(ca,"fancySlice",Si),r(ca,"fancySliceAssign",Oi),r(ca,"fill",(function(r,t,e,n){var i;return function(r,t){return"function"==typeof r[t]}(r,"fill")?r.fill(t,e,n):(e<0&&(e+=r.length)<0&&(e=0),n<0?n+=r.length:n>r.length&&(n=r.length),(i=De(r)).accessorProtocol?function(r,t,e,n){var i,o,a;for(i=r.data,o=r.accessors[1],a=e;a<n;a++)o(i,a,t);return i}(i,t,e,n):function(r,t,e,n){var i;for(i=e;i<n;i++)r[i]=t;return r}(r,t,e,n))})),r(ca,"fillBy",(function(r,t,e,n,i){var o;return t<0&&(t+=r.length)<0&&(t=0),e<0?e+=r.length:e>r.length&&(e=r.length),(o=De(r)).accessorProtocol?function(r,t,e,n,i){var o,a,s,u;for(o=r.data,a=r.accessors[0],s=r.accessors[1],u=t;u<e;u++)s(o,u,n.call(i,a(o,u),u,o));return o}(o,t,e,n,i):function(r,t,e,n,i){var o;for(o=t;o<e;o++)r[o]=n.call(i,r[o],o,r);return r}(r,t,e,n,i)})),r(ca,"filled",Rn),r(ca,"filledBy",Ci),r(ca,"filled2d",In),r(ca,"filled2dBy",(function(r,t,e){var n,i,o,a,s,u;for(o=r[1],a=r[0],n=[],s=0;s<a;s++){for(i=[],u=0;u<o;u++)i.push(t.call(e,[s,u]));n.push(i)}return n})),r(ca,"filled3d",Ni),r(ca,"filled3dBy",(function(r,t,e){var n,i,o,a,s,u,l,f,c;for(a=r[2],s=r[1],u=r[0],n=[],c=0;c<u;c++){for(o=[],f=0;f<s;f++){for(i=[],l=0;l<a;l++)i.push(t.call(e,[c,f,l]));o.push(i)}n.push(o)}return n})),r(ca,"filled4d",Di),r(ca,"filled4dBy",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p;for(s=r[3],u=r[2],l=r[1],f=r[0],n=[],p=0;p<f;p++){for(a=[],d=0;d<l;d++){for(o=[],h=0;h<u;h++){for(i=[],c=0;c<s;c++)i.push(t.call(e,[p,d,h,c]));o.push(i)}a.push(o)}n.push(a)}return n})),r(ca,"filled5d",Ui),r(ca,"filled5dBy",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v;for(u=r[4],l=r[3],f=r[2],c=r[1],h=r[0],n=[],v=0;v<h;v++){for(s=[],g=0;g<c;g++){for(a=[],m=0;m<f;m++){for(o=[],p=0;p<l;p++){for(i=[],d=0;d<u;d++)i.push(t.call(e,[v,g,m,p,d]));o.push(i)}a.push(o)}s.push(a)}n.push(s)}return n})),r(ca,"fillednd",Yi),r(ca,"filledndBy",(function(r,t,e){return qi(r.length,r,0,[],[],t,e)})),r(ca,"filter",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"filter")?r.filter(t,e):(n=De(r)).accessorProtocol?function(r,t,e){var n,i,o,a,s;for(n=r.data,i=r.accessors[0],o=[],s=0;s<n.length;s++)a=i(n,s),t.call(e,a,s,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)})),r(ca,"first",(function(r){if(0!==r.length)return ze(r)(r,0)})),r(ca,"flatten",Ki),r(ca,"flattenBy",Xi),r(ca,"flatten2d",ro),r(ca,"flatten2dBy",to),r(ca,"flatten3d",eo),r(ca,"flatten3dBy",no),r(ca,"flatten4d",io),r(ca,"flatten4dBy",oo),r(ca,"flatten5d",ao),r(ca,"flatten5dBy",so),r(ca,"fliplr2d",uo),r(ca,"fliplr3d",lo),r(ca,"fliplr4d",fo),r(ca,"fliplr5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(fo(r[e]));return t})),r(ca,"flipud2d",co),r(ca,"flipud3d",ho),r(ca,"flipud4d",po),r(ca,"flipud5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(po(r[e]));return t})),r(ca,"forEach",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"forEach")?r.forEach(t,e):(n=De(r)).accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)t.call(e,i(n,o),o,n)}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)t.call(e,r[n],n,r)}(r,t,e)})),r(ca,"strided2array",(function(r,t,e,n){var i,o,a,s;for(o=ze(t),a=n,i=[],s=0;s<r;s++)i.push(o(t,a)),a+=e;return i})),r(ca,"getter",Mt),r(ca,"groupEntries",(function(r,t){var e,n,o,a,s,u,l,f;if(o=r.length,t.length!==o)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=ze(r),n=ze(t),a={},f=0;f<o;f++)l=e(r,f),u=a[s=n(t,f).toString()],i(u)?u.push([f,l]):a[s]=[[f,l]];return a})),r(ca,"groupEntriesBy",(function(r,t,e){var n,o,a,s,u,l,f;for(o=r.length,n=ze(r),a={},f=0;f<o;f++)l=n(r,f),u=a[s=t.call(e,l,f,r)],i(u)?u.push([f,l]):a[s]=[[f,l]];return a})),r(ca,"groupIndices",(function(r,t){var e,n,o,a,s,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=ze(t),o={},u=0;u<n;u++)s=o[a=e(t,u).toString()],i(s)?s.push(u):o[a]=[u];return o})),r(ca,"groupIndicesBy",(function(r,t,e){var n,o,a,s,u,l;for(o=r.length,n=ze(r),a={},l=0;l<o;l++)u=a[s=t.call(e,n(r,l),l,r)],i(u)?u.push(l):a[s]=[l];return a})),r(ca,"groupValues",(function(r,t){var e,n,o,a,s,u,l,f;if(o=r.length,t.length!==o)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=ze(r),n=ze(t),a={},f=0;f<o;f++)l=e(r,f),u=a[s=n(t,f).toString()],i(u)?u.push(l):a[s]=[l];return a})),r(ca,"groupValuesBy",(function(r,t,e){var n,o,a,s,u,l,f;for(o=r.length,n=ze(r),a={},f=0;f<o;f++)l=n(r,f),u=a[s=t.call(e,l,f,r)],i(u)?u.push(l):a[s]=[l];return a})),r(ca,"groupValuesOnKey",(function(r,t){var e,n,o,a,s,u;for(e=ze(r),n={},s=0;s<r.length;s++)o=n[u=(a=e(r,s))[t]],i(o)?o.push(a):n[u]=[a];return n})),r(ca,"incrspace",mo),r(ca,"indexOf",(function(r,t,e){return"function"==typeof r["indexOf"]?r.indexOf(t,e):(e<0&&(e+=r.length)<0&&(e=0),_r(r)?function(r,t,e){var n,i;for(n=ze(r),i=e;i<r.length;i++)if(t===n(r,i))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n<r.length;n++)if(t===r[n])return n;return-1}(r,t,e))})),r(ca,"indexOfSameValue",(function(r,t,e){return e<0&&(e+=r.length)<0&&(e=0),_r(r)?fn(r)?function(r,t,e){var n,i,o,a;if(!j(t))return-1;for(n=cr(r,0),i=N(t),o=D(t),a=2*e;a<n.length;a+=2)if(ir(n[a],i)&&ir(n[a+1],o))return a/2;return-1}(r,t,e):Ne(r)?function(r,t,e){var n,i,o;if(!U(t))return-1;for(n=K(r,0),i=t?1:0,o=e;o<n.length;o++)if(n[o]===i)return o;return-1}(r,t,e):function(r,t,e){var n,i;for(n=ze(r),i=e;i<r.length;i++)if(ir(t,n(r,i)))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n<r.length;n++)if(ir(t,r[n]))return n;return-1}(r,t,e)})),r(ca,"indicesComplement",(function(r,t){var e,n,i;for(e={},i=0;i<t.length;i++)e[t[i]]=!0;for(n=[],i=0;i<r;i++)void 0===e[i]&&n.push(i);return n})),r(ca,"insertAt",(function(r,t,e){var n,i;for(n=r.length,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r.push(r[n-1]),i=n-2;i>=t;i--)r[i+1]=r[i];return r[t]=e,r})),r(ca,"join",go),r(ca,"last",(function(r){var t,e;if(t=ze(r),!((e=r.length-1)<0))return t(r,e)})),r(ca,"lastIndexOf",(function(r,t,e){if("function"==typeof r["lastIndexOf"])return r.lastIndexOf(t,e);if(e<0){if((e+=r.length)<0)return-1}else e>r.length&&(e=r.length-1);return _r(r)?function(r,t,e){var n,i;for(n=ze(r),i=e;i>=0;i--)if(t===n(r,i))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n>=0;n--)if(t===r[n])return n;return-1}(r,t,e)})),r(ca,"lastIndexOfSameValue",(function(r,t,e){if(e<0){if((e+=r.length)<0)return-1}else e>r.length&&(e=r.length-1);return _r(r)?fn(r)?function(r,t,e){var n,i,o,a;if(!j(t))return-1;for(n=cr(r,0),i=N(t),o=D(t),a=2*e;a>=0;a-=2)if(ir(n[a],i)&&ir(n[a+1],o))return a/2;return-1}(r,t,e):Ne(r)?function(r,t,e){var n,i,o;if(!U(t))return-1;for(n=K(r,0),i=t?1:0,o=e;o>=0;o--)if(n[o]===i)return o;return-1}(r,t,e):function(r,t,e){var n,i;for(n=ze(r),i=e;i>=0;i--)if(ir(t,n(r,i)))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n>=0;n--)if(ir(t,r[n]))return n;return-1}(r,t,e)})),r(ca,"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})),r(ca,"linspace2d",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p;if(0===(p=(l=e[1])*(c=e[0])))return[];for(d=(t-r)/(p-1),n?o=1-l*(i=c):(i=1,o=0),a=[],u=0,h=0;h<c;h++){for(s=[],f=0;f<l;f++)s.push(r+u*d),u+=i;a.push(s),u+=o}return a})),r(ca,"logspace",vo),r(ca,"map",wo),r(ca,"map2d",bo),r(ca,"map3d",Eo),r(ca,"map4d",xo),r(ca,"map5d",To),r(ca,"minSignedIntegerDataType",jo),r(ca,"minUnsignedIntegerDataType",(function(r){return r<=Lr?"uint8":r<=Rr?"uint16":r<=Ir?"uint32":"float64"})),r(ca,"mskbinary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],d=r[3],p=r[2],a=0;a<i;a++)for(s=c[a],u=h[a],l=d[a],f=p[a],o=0;o<n;o++)0===f[o]&&(l[o]=e(s[o],u[o]))})),r(ca,"mskbinary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(v=r[0],y=r[1],w=r[3],b=r[2],u=0;u<o;u++)for(d=v[u],p=y[u],m=w[u],g=b[u],s=0;s<i;s++)for(l=d[s],f=p[s],c=m[s],h=g[s],a=0;a<n;a++)0===h[a]&&(c[a]=e(l[a],f[a]))})),r(ca,"mskbinary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V;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],j=r[1],V=r[2],_=r[3],f=0;f<a;f++)for(d=T[f],g=j[f],w=_[f],x=V[f],l=0;l<o;l++)for(h=d[l],m=g[l],y=w[l],E=x[l],u=0;u<i;u++)for(c=h[u],p=m[u],v=y[u],b=E[u],s=0;s<n;s++)0===b[s]&&(v[s]=e(c[s],p[s]))})),r(ca,"mskbinary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(F=r[0],S=r[1],B=r[2],P=r[3],h=0;h<s;h++)for(g=F[h],b=S[h],j=P[h],A=B[h],c=0;c<a;c++)for(m=g[c],w=b[c],T=j[c],k=A[c],f=0;f<o;f++)for(p=m[f],y=w[f],x=T[f],V=k[f],l=0;l<i;l++)for(d=p[l],v=y[l],E=x[l],_=V[l],u=0;u<n;u++)0===_[u]&&(E[u]=e(d[u],v[u]))})),r(ca,"mskfilter",_o),r(ca,"mskfilterMap",Vo),r(ca,"mskfilter2",(function(r,t,e){var n,i,o,a,s,u;for(n=ze(r),i=ze(t),o=ze(e),a=[],s=[],u=0;u<r.length;u++)o(e,u)&&(a.push(n(r,u)),s.push(i(t,u)));return[a,s]})),r(ca,"mskfiltern",(function(){var r,t,e,n,i,o,a,s;for(e=arguments.length,n=ze(i=arguments[e-=1]),r=[],t=[],o=[],a=0;a<e;a++)t.push(arguments[a]),r.push(ze(t[a])),o.push([]);for(a=0;a<i.length;a++)if(n(i,a))for(s=0;s<e;s++)o[s].push(r[s](t[s],a));return o})),r(ca,"mskput",ko),r(ca,"mskreject",Ao),r(ca,"mskrejectMap",Fo),r(ca,"mskunary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(f=r[0],c=r[2],h=r[1],a=0;a<i;a++)for(s=f[a],u=c[a],l=h[a],o=0;o<n;o++)0===l[o]&&(u[o]=e(s[o]))})),r(ca,"mskunary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(m=r[0],g=r[2],v=r[1],u=0;u<o;u++)for(f=m[u],h=g[u],p=v[u],s=0;s<i;s++)for(l=f[s],c=h[s],d=p[s],a=0;a<n;a++)0===d[a]&&(c[a]=e(l[a]))})),r(ca,"mskunary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;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[2],x=r[1],f=0;f<a;f++)for(d=b[f],g=E[f],w=x[f],l=0;l<o;l++)for(h=d[l],m=g[l],y=w[l],u=0;u<i;u++)for(c=h[u],p=m[u],v=y[u],s=0;s<n;s++)0===v[s]&&(p[s]=e(c[s]))})),r(ca,"mskunary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(_=r[0],V=r[2],k=r[1],h=0;h<s;h++)for(g=_[h],b=V[h],j=k[h],c=0;c<a;c++)for(m=g[c],w=b[c],T=j[c],f=0;f<o;f++)for(p=m[f],y=w[f],x=T[f],l=0;l<i;l++)for(d=p[l],v=y[l],E=x[l],u=0;u<n;u++)0===E[u]&&(v[u]=e(d[u]))})),r(ca,"nCartesianProduct",(function(r,t){var e,n,i,o,a,s,u,l,f,c,h,d;for(e=arguments.length,i=[r,t],u=[0,0],l=(n=[r.length,t.length])[0]*n[1],c=2;c<e;c++)s=arguments[c],i.push(s),n.push(s.length),u.push(0),l*=n[c];for(o=[],c=0;c<l;c++){for(d=c,h=e-1;h>=0;h--)d-=f=d%n[h],d/=n[h],u[h]=f;for(a=[],h=0;h<e;h++)a.push(i[h][u[h]]);o.push(a)}return o})),r(ca,"nested2objects",(function(r,t){var e,n,i,o,a,s,u,l,f,c;if((u=r.length)<1)return[];if((l=(n=ze(r))(r,0).length)<1)return[];for(e=Wn(t),o=[],f=0;f<u;f++){for(i=ze(s=n(r,f)),a={},c=0;c<l;c++)a[e[c]]=i(s,c);o.push(a)}return o})),r(ca,"nested2views",(function(r,t){var n,i,o,a,s,u;if((a=r.length)<1)return[];if(n=ze(r),(s=n(r,0).length)<1)return[];function l(r,t){var n=Me(r).accessors;return Mr(this,"_arr",r),Mr(this,"_get",n[0]),Mr(this,"_set",n[1]),e(this,"_i",t),this}for(i=Wn(t),u=0;u<s;u++)mr(l.prototype,i[u],f(u),c(u));for(e(l.prototype,"_updateCache",(function(){var t,e;(e=n(r,this._i))!==this._arr&&(t=Me(e).accessors,this._arr=e,this._get=t[0],this._set=t[1])})),e(l.prototype,"toJSON",(function(){var r,t,e;for(r={},e=0;e<s;e++)r[t=i[e]]=this[t];return r})),o=[],u=0;u<a;u++)o.push(new l(n(r,u),u));return o;function f(r){return function(){return this._updateCache(),this._get(this._arr,r)}}function c(r){return function(t){this._updateCache(),this._set(this._arr,r,t)}}})),r(ca,"none",(function(r){var t=De(r);return t.accessorProtocol?ce(r)?So(J(r,0)):le(r)?So($(r,0)):Ne(r)?So(K(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):So(r)})),r(ca,"noneBy",(function(r,t,e){var n=De(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)})),r(ca,"noneByRight",(function(r,t,e){var n=De(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)})),r(ca,"nulls",(function(r){return Rn(null,r)})),r(ca,"oneTo",Po),r(ca,"ones",(function(r){return Rn(1,r)})),r(ca,"ones2d",(function(r){return In(1,r)})),r(ca,"ones3d",(function(r){return Ni(1,r)})),r(ca,"ones4d",(function(r){return Di(1,r)})),r(ca,"ones5d",(function(r){return Ui(1,r)})),r(ca,"onesnd",(function(r){return Yi(1,r)})),r(ca,"place",Lo),r(ca,"put",Ro),r(ca,"quaternary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g;if(n=t[1],i=t[0],!(n<=0||i<=0))for(h=r[0],d=r[1],p=r[2],m=r[3],g=r[4],a=0;a<i;a++)for(s=h[a],u=d[a],l=p[a],f=m[a],c=g[a],o=0;o<n;o++)c[o]=e(s[o],u[o],l[o],f[o])})),r(ca,"quaternary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,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],x=r[3],T=r[4],u=0;u<o;u++)for(p=w[u],m=b[u],g=E[u],v=x[u],y=T[u],s=0;s<i;s++)for(l=p[s],f=m[s],c=g[s],h=v[s],d=y[s],a=0;a<n;a++)d[a]=e(l[a],f[a],c[a],h[a])})),r(ca,"quaternary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(V=r[0],k=r[1],A=r[2],F=r[3],S=r[4],f=0;f<a;f++)for(E=V[f],x=k[f],T=A[f],j=F[f],_=S[f],l=0;l<o;l++)for(g=E[l],v=x[l],y=T[l],w=j[l],b=_[l],u=0;u<i;u++)for(c=g[u],h=v[u],d=y[u],p=w[u],m=b[u],s=0;s<n;s++)m[s]=e(c[s],h[s],d[s],p[s])})),r(ca,"quaternary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(L=r[0],R=r[1],I=r[2],M=r[3],O=r[4],h=0;h<s;h++)for(A=L[h],F=R[h],S=I[h],P=M[h],B=O[h],c=0;c<a;c++)for(T=A[c],j=F[c],_=S[c],V=P[c],k=B[c],f=0;f<o;f++)for(y=T[f],w=j[f],b=_[f],E=V[f],x=k[f],l=0;l<i;l++)for(d=y[l],p=w[l],m=b[l],g=E[l],v=x[l],u=0;u<n;u++)v[u]=e(d[u],p[u],m[u],g[u])})),r(ca,"quinary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y;if(n=t[1],i=t[0],!(n<=0||i<=0))for(d=r[0],p=r[1],m=r[2],g=r[3],v=r[4],y=r[5],a=0;a<i;a++)for(s=d[a],u=p[a],l=m[a],f=g[a],c=v[a],h=y[a],o=0;o<n;o++)h[o]=e(s[o],u[o],l[o],f[o],c[o])})),r(ca,"quinary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(E=r[0],x=r[1],T=r[2],j=r[3],_=r[4],V=r[5],u=0;u<o;u++)for(m=E[u],g=x[u],v=T[u],y=j[u],w=_[u],b=V[u],s=0;s<i;s++)for(l=m[s],f=g[s],c=v[s],h=y[s],d=w[s],p=b[s],a=0;a<n;a++)p[a]=e(l[a],f[a],c[a],h[a],d[a])})),r(ca,"quinary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(F=r[0],S=r[1],P=r[2],B=r[3],L=r[4],R=r[5],f=0;f<a;f++)for(T=F[f],j=S[f],_=P[f],V=B[f],k=L[f],A=R[f],l=0;l<o;l++)for(v=T[l],y=j[l],w=_[l],b=V[l],E=k[l],x=A[l],u=0;u<i;u++)for(c=v[u],h=y[u],d=w[u],p=b[u],m=E[u],g=x[u],s=0;s<n;s++)g[s]=e(c[s],h[s],d[s],p[s],m[s])})),r(ca,"quinary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B,L,R,I,M,O,C,N,D,U,z;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(O=r[0],C=r[1],N=r[2],D=r[3],U=r[4],z=r[5],h=0;h<s;h++)for(P=O[h],B=C[h],L=N[h],R=D[h],I=U[h],M=z[h],c=0;c<a;c++)for(_=P[c],V=B[c],k=L[c],A=R[c],F=I[c],S=M[c],f=0;f<o;f++)for(w=_[f],b=V[f],E=k[f],x=A[f],T=F[f],j=S[f],l=0;l<i;l++)for(d=w[l],p=b[l],m=E[l],g=x[l],v=T[l],y=j[l],u=0;u<n;u++)y[u]=e(d[u],p[u],m[u],g[u],v[u])})),r(ca,"reject",(function(r,t,e){var n=De(r);return n.accessorProtocol?function(r,t,e){var n,i,o,a,s;for(n=r.data,i=r.accessors[0],o=[],s=0;s<n.length;s++)a=i(n,s),t.call(e,a,s,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)})),r(ca,"rekey",(function(r,t){var e,n,i,o,a,s,u,l,f,c;if((u=r.length)<1)return[];for(l=(e=ar(t)).length,n=[],f=0;f<l;f++)n.push(t[e[f]]);for(i=ze(r),o=[],f=0;f<u;f++){for(s=i(r,f),a={},c=0;c<l;c++)a[n[c]]=s[e[c]];o.push(a)}return o})),r(ca,"rekeyViews",(function(r,t){var n,i,o,a,s,u,l;if((s=r.length)<1)return[];for(i=ar(t),u=i.length,o=[],l=0;l<u;l++)o.push(t[i[l]]);function f(r){return e(this,"_i",r),this}for(n=ze(r),l=0;l<u;l++)mr(f.prototype,o[l],c(i[l]),h(i[l]));for(e(f.prototype,"toJSON",(function(){var r,t,e;for(r={},e=0;e<u;e++)r[t=o[e]]=this[t];return r})),a=[],l=0;l<s;l++)a.push(new f(l));return a;function c(t){return function(){return n(r,this._i)[t]}}function h(t){return function(e){n(r,this._i)[t]=e}}})),r(ca,"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})),r(ca,"reshape",(function(r,t,e,n){return Oo(Ki(r,t,n),e.length,e,0,0)})),r(ca,"resolveGetter",ze),r(ca,"resolveSetter",Co),r(ca,"reverse",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"reverse")?r.reverse():(t=De(r)).accessorProtocol?function(r){var t,e,n,i,o,a,s,u;for(t=r.data,e=r.accessors[0],n=r.accessors[1],o=R(t.length/2),a=t.length-1,s=0;s<o;s++)u=a-s,i=e(t,s),n(t,s,e(t,u)),n(t,u,i);return t}(t):function(r){var t,e,n,i,o;for(e=R(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)})),r(ca,"scatterFilled",(function(r,t,e,n,i){return Ro(Rn(r,t),e,n,i)})),r(ca,"scattered",(function(r,t,e,n){return Ro(Dn(r),t,e,n)})),r(ca,"setter",Ct),r(ca,"slice",Mo),r(ca,"strided2array2d",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d;for(i=ze(r),f=t[0],l=t[1],u=e[0],s=e[1],o=[],h=0;h<f;h++){for(a=[],d=n+u*h,c=0;c<l;c++)a.push(i(r,d)),d+=s;o.push(a)}return o})),r(ca,"strided2array3d",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y;for(i=ze(r),d=t[0],h=t[1],c=t[2],u=e[0],s=e[1],a=e[2],o=[],g=0;g<d;g++){for(v=[],l=n+u*g,m=0;m<h;m++){for(y=[],f=l+s*m,p=0;p<c;p++)y.push(i(r,f)),f+=a;v.push(y)}o.push(v)}return o})),r(ca,"strided2array4d",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T;for(i=ze(r),g=t[0],m=t[1],p=t[2],d=t[3],l=e[0],u=e[1],s=e[2],a=e[3],o=[],b=0;b<g;b++){for(E=[],f=n+l*b,w=0;w<m;w++){for(x=[],c=f+u*w,y=0;y<p;y++){for(T=[],h=c+s*y,v=0;v<d;v++)T.push(i(r,h)),h+=a;x.push(T)}E.push(x)}o.push(E)}return o})),r(ca,"strided2array5d",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A;for(i=ze(r),w=t[0],y=t[1],v=t[2],g=t[3],m=t[4],f=e[0],l=e[1],u=e[2],s=e[3],a=e[4],o=[],j=0;j<w;j++){for(_=[],c=n+f*j,T=0;T<y;T++){for(V=[],h=c+l*T,x=0;x<v;x++){for(k=[],d=h+u*x,E=0;E<g;E++){for(A=[],p=d+s*E,b=0;b<m;b++)A.push(i(r,p)),p+=a;k.push(A)}V.push(k)}_.push(V)}o.push(_)}return o})),r(ca,"symmetric",No),r(ca,"symmetricBanded",Do),r(ca,"take",Uo),r(ca,"takeIndexed",(function(r,t){var e,n;for(e=[],n=0;n<t.length;n++)e.push(r[t[n]]);return e})),r(ca,"takeIndexed2",(function(r,t,e){var n,i,o;for(n=[],i=[],o=0;o<e.length;o++)n.push(r[e[o]]),i.push(t[e[o]]);return[n,i]})),r(ca,"takeMap",zo),r(ca,"take2d",qo),r(ca,"take3d",(function(r,t,e,n){var i,o,a,s,u,l;if(-1===(a=Cr(e,2)))throw new RangeError(O("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",3,e));if(o=[],0===a){for(s=Or(n),i=r.length-1,l=0;l<t.length;l++)u=s(t[l],i),o.push(r[u]);return o}for(a=e-1,l=0;l<r.length;l++)o.push(qo(r[l],t,a,n));return o})),r(ca,"ternary2d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],d=r[2],p=r[3],a=0;a<i;a++)for(s=c[a],u=h[a],l=d[a],f=p[a],o=0;o<n;o++)f[o]=e(s[o],u[o],l[o])})),r(ca,"ternary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(v=r[0],y=r[1],w=r[2],b=r[3],u=0;u<o;u++)for(d=v[u],p=y[u],m=w[u],g=b[u],s=0;s<i;s++)for(l=d[s],f=p[s],c=m[s],h=g[s],a=0;a<n;a++)h[a]=e(l[a],f[a],c[a])})),r(ca,"ternary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V;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],j=r[1],_=r[2],V=r[3],f=0;f<a;f++)for(w=T[f],b=j[f],E=_[f],x=V[f],l=0;l<o;l++)for(m=w[l],g=b[l],v=E[l],y=x[l],u=0;u<i;u++)for(c=m[u],h=g[u],d=v[u],p=y[u],s=0;s<n;s++)p[s]=e(c[s],h[s],d[s])})),r(ca,"ternary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_,V,k,A,F,S,P,B;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0))for(F=r[0],S=r[1],P=r[2],B=r[3],h=0;h<s;h++)for(_=F[h],V=S[h],k=P[h],A=B[h],c=0;c<a;c++)for(E=_[c],x=V[c],T=k[c],j=A[c],f=0;f<o;f++)for(v=E[f],y=x[f],w=T[f],b=j[f],l=0;l<i;l++)for(d=v[l],p=y[l],m=w[l],g=b[l],u=0;u<n;u++)g[u]=e(d[u],p[u],m[u])})),r(ca,"toAccessorArray",(function(r){return r&&"object"==typeof r&&Rt(r)?r:new Oe(r)})),r(ca,"toDeduped",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,s,u;if(o=[],0===(i=r.length))return o;for(a=!1,n=NaN,e=0,u=0;u<i;u++)(s=r[u])===n||a&&dr(s)?(e+=1)<=t&&o.push(n):(n=s,e=1,o.push(n),a=!1,dr(n)&&(a=!0));return o}(r,t):function(r,t){var e,n,i,o,a,s;if(o=[],0===(i=r.length))return o;for(n=NaN,e=0,s=0;s<i;s++)(a=r[s])===n?(e+=1)<=t&&o.push(n):(n=a,e=1,o.push(n));return o}(r,t)})),r(ca,"toInsertedAt",ra),r(ca,"toReversed",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"toReversed")?r.toReversed():(t=De(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)})),r(ca,"trues",(function(r){return Rn(!0,r)})),r(ca,"unary2d",(function(r,t,e){var n,i,o,a,s,u,l,f;if(n=t[1],i=t[0],!(n<=0||i<=0))for(l=r[0],f=r[1],a=0;a<i;a++)for(s=l[a],u=f[a],o=0;o<n;o++)u[o]=e(s[o])})),r(ca,"unary2dBy",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d;if(o=t[1],a=t[0],!(o<=0||a<=0))for(arguments.length>4&&(i=arguments[4]),c=r[0],h=r[1],u=0;u<a;u++)for(l=c[u],f=h[u],s=0;s<o;s++)void 0!==(d=n.call(i,l[s],[u,s],[c,h]))&&(f[s]=e(d))})),r(ca,"unary3d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(d=r[0],p=r[1],u=0;u<o;u++)for(f=d[u],h=p[u],s=0;s<i;s++)for(l=f[s],c=h[s],a=0;a<n;a++)c[a]=e(l[a])})),r(ca,"unary3dBy",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v;if(o=t[2],a=t[1],s=t[0],!(o<=0||a<=0||s<=0))for(arguments.length>4&&(i=arguments[4]),m=r[0],g=r[1],f=0;f<s;f++)for(h=m[f],p=g[f],l=0;l<a;l++)for(c=h[l],d=p[l],u=0;u<o;u++)void 0!==(v=n.call(i,c[u],[f,l,u],[m,g]))&&(d[u]=e(v))})),r(ca,"unary4d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(v=r[0],y=r[1],f=0;f<a;f++)for(d=v[f],g=y[f],l=0;l<o;l++)for(h=d[l],m=g[l],u=0;u<i;u++)for(c=h[u],p=m[u],s=0;s<n;s++)p[s]=e(c[s])})),r(ca,"unary4dBy",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E;if(o=t[3],a=t[2],s=t[1],u=t[0],!(o<=0||a<=0||s<=0||u<=0))for(arguments.length>4&&(i=arguments[4]),w=r[0],b=r[1],h=0;h<u;h++)for(m=w[h],y=b[h],c=0;c<s;c++)for(p=m[c],v=y[c],f=0;f<a;f++)for(d=p[f],g=v[f],l=0;l<o;l++)void 0!==(E=n.call(i,d[l],[h,c,f,l],[w,b]))&&(g[l]=e(E))})),r(ca,"unary5d",(function(r,t,e){var n,i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x;if(n=t[4],i=t[3],o=t[2],a=t[1],s=t[0],!(n<=0||i<=0||o<=0||a<=0||s<=0))for(E=r[0],x=r[1],h=0;h<s;h++)for(g=E[h],b=x[h],c=0;c<a;c++)for(m=g[c],w=b[c],f=0;f<o;f++)for(p=m[f],y=w[f],l=0;l<i;l++)for(d=p[l],v=y[l],u=0;u<n;u++)v[u]=e(d[u])})),r(ca,"unary5dBy",(function(r,t,e,n){var i,o,a,s,u,l,f,c,h,d,p,m,g,v,y,w,b,E,x,T,j,_;if(o=t[4],a=t[3],s=t[2],u=t[1],l=t[0],!(o<=0||a<=0||s<=0||u<=0||l<=0))for(arguments.length>4&&(i=arguments[4]),T=r[0],j=r[1],p=0;p<l;p++)for(y=T[p],x=j[p],d=0;d<u;d++)for(v=y[d],E=x[d],h=0;h<s;h++)for(g=v[h],b=E[h],c=0;c<a;c++)for(m=g[c],w=b[c],f=0;f<o;f++)void 0!==(_=n.call(i,m[f],[p,d,h,c,f],[T,j]))&&(w[f]=e(_))})),r(ca,"unarynd",(function(r,t,e){return ta(r[0],r[1],t.length,t,0,e)})),r(ca,"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})),r(ca,"where",na),r(ca,"arrayWith",aa),r(ca,"without",fa),r(ca,"zeroTo",$n),r(ca,"zeros",Dn),r(ca,"zeros2d",Mn),r(ca,"zeros3d",(function(r){return Ni(0,r)})),r(ca,"zeros4d",(function(r){return Di(0,r)})),r(ca,"zeros5d",(function(r){return Ui(0,r)})),r(ca,"zerosnd",(function(r){return Yi(0,r)})),r(ca,"zip",(function(r){var t,e,n,i,o,a,s,u;if((o=r.length)<1)return[];if((a=(e=Wn(r))[0].length)<1)return[];for(t=[],u=0;u<o;u++)t.push(ze(e[u]));for(n=[],s=0;s<a;s++){for(i=[],u=0;u<o;u++)i.push(t[u](e[u],s));n.push(i)}return n})),r(ca,"zip2object",(function(r,t){var e=De(r),n=De(t);return e.accessorProtocol||n.accessorProtocol?function(r,t){var e,n,i,o,a,s;for(e=r.data,i=r.accessors[0],n=t.data,o=t.accessors[0],a={},s=0;s<e.length;s++)a[i(e,s)]=o(n,s);return a}(e,n):function(r,t){var e,n;for(e={},n=0;n<r.length;n++)e[r[n]]=t[n];return e}(r,t)})),r(ca,"zip2objects",(function(r,t){var e,n,i,o,a,s,u,l,f,c;if((u=r.length)<1)return[];if((l=(n=Wn(r))[0].length)<1)return[];for(e=[],o=ze(t),i=[],c=0;c<u;c++)e.push(ze(n[c])),i.push(o(t,c));for(a=[],f=0;f<l;f++){for(s={},c=0;c<u;c++)s[i[c]]=e[c](n[c],f);a.push(s)}return a})),r(ca,"zip2views",(function(r,t){var n,i,o,a,s,u,l,f,c;if((l=r.length)<1)return[];if((f=(o=Wn(r))[0].length)<1)return[];for(u=[],c=0;c<l;c++)u.push(Me(o[c]).accessors);function h(r){return e(this,"_i",r),this}for(a=Wn(t),c=0;c<l;c++)n=d(o[c],u[c][0]),i=p(o[c],u[c][1]),mr(h.prototype,a[c],n,i);for(e(h.prototype,"toJSON",(function(){var r,t,e;for(r={},e=0;e<l;e++)r[t=a[e]]=this[t];return r})),s=[],c=0;c<f;c++)s.push(new h(c));return s;function d(r,t){return function(){return t(r,this._i)}}function p(r,t){return function(e){t(r,this._i,e)}}}));var ha="function"==typeof ArrayBuffer?ArrayBuffer:void 0;var da=Dr()?ha:function(){throw new Error("not implemented")};function pa(r,t){if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!m(t))throw new TypeError(O("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",t));return zn(r,t)}function ma(r,t){if(!v(r))throw new TypeError(P("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(P("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));return Yn(r,t)}function ga(r){if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));return qn(r)}function va(r,t){var e=Ie(t);if(null===e)throw new TypeError(P("invalid argument. Second argument must have a recognized/supported data type. Type: `%s`. Value: `%s`.",e,t));return Mi(r,e)}var ya="function"==typeof DataView?DataView:void 0;var wa=Ur()?ya:function(){throw new Error("not implemented")},ba=/^\d{10}$|^\d{13}$/,Ea=["floor","ceil","round"];function xa(r,t){var e;if("string"===(e=typeof r)){if((r=Date.parse(r))!=r)throw new Error(O("invalid argument. Unable to parse %s date.",t.toLowerCase()));r=new Date(r)}if("number"===e){if(!ba.test(r))throw new Error(O("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(O("invalid argument. %s date must either be a date string, Date object, Unix timestamp, or JavaScript timestamp.",t));return r}function Ta(r,t,e,n){var i,o,a,s,u,l,f,c,h;if(o=100,a=!0,i={round:"floor"},r=xa(r,"Start"),t=xa(t,"Stop"),arguments.length>2){if(3===arguments.length?w(e)?i=e:(o=e,a=!1):(i=n,o=e),0===o)return[];if(!z(o)||o<0)throw new TypeError(O("invalid argument. Length must be a positive integer. Value: `%s`.",o));if(a){if(!w(i))throw new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",i));if(H(i,"round")){if(!x(i.round))throw new TypeError(O("invalid option. `%s` option must be a string. Option: `%s`.","round",i.round));if(-1===Ea.indexOf(i.round))throw new Error(O('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"round",Ea.join('", "'),i.round))}}}switch(i.round){case"round":l=zr;break;case"ceil":l=jr;break;default:l=R}for(u=o-1,c=(t.getTime()-r.getTime())/u,f=r,(s=new Array(o))[0]=f,f=f.getTime(),h=1;h<u;h++)f+=c,s[h]=new Date(l(f));return s[u]=t,s}function ja(r){var t;return arguments.length>1?"bool"===(t=arguments[1])?new Pe(r):Qo(r,t):Qo(r)}function _a(r){var t=Ie(r);if(null===t)throw new TypeError(O("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]),ja(r.length,t)}var Va=k(),ka=Wo.get("dtypes.default");function Aa(){var r,t,e,n,i,o,a;if(t=arguments.length,(t-=1)>=0&&x(arguments[t])?(e=arguments[t],t-=1):e=ka,null===(n=Bi(e)))throw new TypeError(P("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(m(a)?o=a:v(a)&&(o=a.length),void 0!==o)return Rn(r,o);if(y(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(w(a)){if(!1===Va)throw new TypeError(P("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!T(a[A]))throw new TypeError(P("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(a=a[A](),!T(a.next))throw new TypeError(P("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(P("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a))}if(y(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(P("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(v(a=arguments[1]))i=new n(a.length);else if(y(a))i=new n(a);else if(m(a))i=new n(a);else{if(!w(a))throw new TypeError(P("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!1===Va)throw new TypeError(P("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!T(a[A]))throw new TypeError(P("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(a=a[A](),!T(a.next))throw new TypeError(P("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));i=new n(qr(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],sn(e)?function(r,t){var e;for(e=0;e<r.length;e++)r.set(t,e)}(i,r):en(e)?Yr(i.length,r?1:0,K(i,0),1):Yr(i.length,r,i,1)),i}var Fa=q(),Sa=Wo.get("dtypes.default");function Pa(){var r,t,e,n,i,o,a,s;if(0===(t=arguments.length))return new(i=Bi(Sa))(0);if(x(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=Bi(e)))throw new TypeError(O("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(T(arguments[t-=1]))if(T(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],!T(n=arguments[t-=1]))throw new TypeError(O("invalid argument. Callback argument must be a function. Value: `%s`.",n))}if((t-=1)>=0&&x(arguments[t])?(e=arguments[t],t-=1):e=Sa,null===(i=Bi(e)))throw new TypeError(O("invalid argument. Must provide a recognized data type. Value: `%s`.",e));if("generic"===e){if(s=arguments[0],0===t){if(m(s)?a=s:v(s)&&(a=s.length),void 0!==a)return Ci(a,n,r);if(y(s))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(w(s)){if(!1===Fa)throw new TypeError(O("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",s));if(!T(s[W]))throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s));if(s=s[W](),!T(s.next))throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s));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}(s,n,r)}throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s))}if(y(s))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s))}if(0===t)if(v(s=arguments[0]))o=new i(s.length);else if(y(s))o=new i(s);else if(m(s))o=new i(s);else{if(!w(s))throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s));if(!1===Fa)throw new TypeError(O("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",s));if(!T(s[W]))throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s));if(s=s[W](),!T(s.next))throw new TypeError(O("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",s));o=new i(Gr(s))}else o=1===t?new i(arguments[0],arguments[1]):new i(arguments[0],arguments[1],arguments[2]);return o.length>0&&(sn(e)||en(e)?function(r,t,e){var n;for(n=0;n<r.length;n++)r.set(t.call(e,n),n)}(o,n,r):Wr(o.length,o,1,(function(t,e){return n.call(r,e)}))),o}function Ba(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}var La=q(),Ra="little-endian",Ia="big-endian",Ma={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},Oa={float64:"getFloat64",float32:"getFloat32",int32:"getInt32",int16:"getInt16",uint32:"getUint32",uint16:"getUint16"},Ca={c:"a",f:"a",i:"an",u:"a",b:"a"},Na=qe(["float64","float32","int32","int16","uint32","uint16"]);function Da(r){return x(r)?$r(r):null}function Ua(r){return r===Ra}function za(r){return r?Ra:Ia}function Ya(r){var t,n,i,o;if(!Na(r))throw new TypeError(P("invalid argument. First argument must be a supported data type. Value: `%s`.",r));function a(){var r,n,i,o,s,u,f,c;if(i=arguments.length,!(this instanceof a))return i<2?new a(arguments[0]):2===i?new a(arguments[0],arguments[1]):3===i?new a(arguments[0],arguments[1],arguments[2]):new a(arguments[0],arguments[1],arguments[2],arguments[3]);if(null===(n=Da(arguments[0]))||!an(n))throw new TypeError(P("invalid argument. First argument must be a supported byte order. Value: `%s`.",arguments[0]));if(o=Ua(n),0===(i-=1))s=new wa(new da(0));else if(1===i)if(m(f=arguments[i]))s=new wa(new da(f*t));else if(v(f))s=l(new wa(new da(f.length*t)),f,o);else if(Jr(f)){if(s=new wa(f),!m(f.byteLength/t))throw new RangeError(P("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",t,s.byteLength))}else{if(!w(f))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",f));if(!1===La)throw new TypeError(P("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",f));if(!T(f[W]))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",f));if(s=f[W](),!T(s.next))throw new TypeError(P("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",f));c=Ba(s),s=l(new wa(new da(c.length*t)),c,o)}else{if(!Jr(s=arguments[1]))throw new TypeError(P("invalid argument. Must provide an ArrayBuffer. Value: `%s`.",s));if(!m(r=arguments[2]))throw new TypeError(P("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===i)s=new wa(s,r);else{if(!m(u=arguments[3]))throw new TypeError(P("invalid argument. Length must be a nonnegative integer. Value: `%s`.",u));if((u*=t)>s.byteLength-r)throw new RangeError(P("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",u));s=new wa(s,r,u)}}return e(this,"_buffer",s),e(this,"_length",s.byteLength/t),e(this,"_isLE",o),this}return t=Hr(r),n=function(r){return Qr(r)+"ArrayFE"}(r),i=Oa[r],o=Ma[r],e(a,"BYTES_PER_ELEMENT",t),e(a,"name",n),e(a,"from",(function(e,i){var a,u,l,f,c,h,d,p,m,g,y;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!s(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(null===(u=Da(e))||!an(u))throw new TypeError(P("invalid argument. First argument must be a supported byte order. Value: `%s`.",e));if(c=Ua(u),(l=arguments.length)>2){if(!T(f=arguments[2]))throw new TypeError(P("invalid argument. Third argument must be a function. Value: `%s`.",f));l>3&&(a=arguments[3])}if(v(i)){if(f){for(g=i.length,m=i.get&&i.set?Dt("default"):Mt("default"),d=(h=new this(u,g))._buffer,y=0;y<g;y++)d[o](y*t,f.call(a,m(i,y),y),c);return h}return new this(u,i)}if(w(i)&&La&&T(i[W])){if(d=i[W](),!T(d.next))throw new TypeError(P("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",i));for(p=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}(d,f,a):Ba(d),d=(h=new this(u,g=p.length))._buffer,y=0;y<g;y++)d[o](y*t,p[y],c);return h}throw new TypeError(P("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",i))})),e(a,"of",(function(t){var e,i,o;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!s(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(null===(e=Da(t))||!an(e))throw new TypeError(P("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(e,i)})),e(a.prototype,"at",(function(e){var o;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!Y(e))throw new TypeError(P("invalid argument. Must provide an integer. Value: `%s`.",e));if(o=this._length,e<0&&(e+=o),!(e<0||e>=o))return this._buffer[i](e*t,this._isLE)})),F(a.prototype,"buffer",(function(){return this._buffer.buffer})),F(a.prototype,"byteLength",(function(){return this._buffer.byteLength})),F(a.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),e(a.prototype,"BYTES_PER_ELEMENT",a.BYTES_PER_ELEMENT),e(a.prototype,"every",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,s=0;s<this._length;s++)if(!e.call(o,a[i](s*t,this._isLE),s,this))return!1;return!0})),e(a.prototype,"filter",(function(e,o){var a,s,l,f;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,s=[],l=0;l<this._length;l++)f=a[i](l*t,this._isLE),e.call(o,f,l,this)&&s.push(f);return new this.constructor(za(this._isLE),s)})),e(a.prototype,"forEach",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,s=0;s<this._length;s++)e.call(o,a[i](s*t,this._isLE),s,this)})),e(a.prototype,"get",(function(e){if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!m(e))throw new TypeError(P("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return this._buffer[i](e*t,this._isLE)})),e(a.prototype,"includes",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(arguments.length>1){if(!Y(o))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",o));o<0&&(o+=this._length)<0&&(o=0)}else o=0;for(a=this._buffer,s=o;s<this._length;s++)if(a[i](s*t,this._isLE)===e)return!0;return!1})),e(a.prototype,"indexOf",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(arguments.length>1){if(!Y(o))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",o));o<0&&(o+=this._length)<0&&(o=0)}else o=0;for(a=this._buffer,s=o;s<this._length;s++)if(a[i](s*t,this._isLE)===e)return s;return-1})),e(a.prototype,"join",(function(e){var o,a,s,l;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(arguments.length>0){if(!x(e))throw new TypeError(P("invalid argument. First argument must be a string. Value: `%s`.",e));s=e}else s=",";for(o=[],a=this._buffer,l=0;l<this._length;l++)o.push(a[i](l*t,this._isLE));return o.join(s)})),e(a.prototype,"lastIndexOf",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(arguments.length>1){if(!Y(o))throw new TypeError(P("invalid argument. Second argument must be an integer. Value: `%s`.",o));o>=this._length?o=this._length-1:o<0&&(o+=this._length)}else o=this._length-1;for(a=this._buffer,s=o;s>=0;s--)if(a[i](s*t,this._isLE)===e)return s;return-1})),F(a.prototype,"length",(function(){return this._length})),e(a.prototype,"map",(function(e,a){var s,l,f,c,h;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));for(f=this._buffer,s=(l=new this.constructor(za(this._isLE),this._length))._buffer,c=0;c<this._length;c++)h=e.call(a,f[i](c*t,this._isLE),c,this),s[o](c*t,h,this._isLE);return l})),e(a.prototype,"reduce",(function(e,o){var a,s,l,f;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));if(a=this._buffer,s=this._length,arguments.length>1)l=o,f=0;else{if(0===s)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");l=a[i](0*t,this._isLE),f=1}for(;f<s;f++)l=e(l,a[i](f*t,this._isLE),f,this);return l})),e(a.prototype,"reduceRight",(function(e,o){var a,s,l,f;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));if(a=this._buffer,s=this._length,arguments.length>1)l=o,f=s-1;else{if(0===s)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");l=a[i]((s-1)*t,this._isLE),f=s-2}for(;f>=0;f--)l=e(l,a[i](f*t,this._isLE),f,this);return l})),e(a.prototype,"set",(function(e){var i,a,s,l,f,c,h,d;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(s=this._buffer,arguments.length>1){if(!m(a=arguments[1]))throw new TypeError(P("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",a))}else a=0;if(v(e)){if(a+(c=e.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(f=(i=e).get&&i.set?Dt("default"):Mt("default"),d=s.byteOffset+a*t,i.buffer===s.buffer&&i.byteOffset<d&&i.byteOffset+i.byteLength>d){for(l=[],h=0;h<c;h++)l.push(f(e,h));i=l,f=Mt("default")}for(h=0;h<c;a++,h++)s[o](a*t,f(i,h),this._isLE)}else{if(a>=this._length)throw new RangeError(P("invalid argument. Index argument is out-of-bounds. Value: `%u`.",a));s[o](a*t,e,this._isLE)}})),e(a.prototype,"some",(function(e,o){var a,s;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!T(e))throw new TypeError(P("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,s=0;s<this._length;s++)if(e.call(o,a[i](s*t,this._isLE),s,this))return!0;return!1})),e(a.prototype,"toString",(function(){var e,o,a;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));for(e=[],o=this._buffer,a=0;a<this._length;a++)e.push(o[i](a*t,this._isLE));return e.join(",")})),e(a.prototype,"with",(function(e,i){var a,s,l;if(!u(this))throw new TypeError(P("invalid invocation. `this` is not %s %s.",Ca[r[0]],n));if(!Y(e))throw new TypeError(P("invalid argument. First argument must be an integer. Value: `%s`.",e));if(l=this._length,a=this._buffer,e<0&&(e+=l),e<0||e>=l)throw new RangeError(P("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));return(s=new this.constructor(za(this._isLE),a.buffer))._buffer[o](e*t,i,this._isLE),s})),a;function s(r){return r===a}function u(r){return"object"==typeof r&&null!==r&&(r.constructor.name===n||Kr(r,a.prototype))&&r.BYTES_PER_ELEMENT===t}function l(r,e,n){var i,a,s;for(i=e.length,a=e.get&&e.set?Dt("default"):Mt("default"),s=0;s<i;s++)r[o](s*t,a(e,s),n);return r}}var qa=Ya("float32"),Wa=Ya("float64");function Ga(){var r,t,e,n,i,o,a,s,u;if(r=arguments[0],arguments.length>1)if(v(arguments[1])){if(n=arguments[1],arguments.length>2){if(!T(e=arguments[2]))throw new TypeError(P("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[3]}}else{if(!T(e=arguments[1]))throw new TypeError(P("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[2]}if(!Zr(r))throw new TypeError(P("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",r));if(s=-1,void 0===n){if(n=[],e){for(;s+=1,!(u=r.next()).done;)n.push(e.call(t,u.value,s));return n}for(;!(u=r.next()).done;)n.push(u.value);return n}if(i=n.length,a=Ie(n),o=Rt(n)?zt(a):Ct(a),e){for(;s<i-1&&(s+=1,!(u=r.next()).done);)o(n,s,e.call(t,u.value,s));return n}for(;s<i-1&&(s+=1,!(u=r.next()).done);)o(n,s,u.value);return n}var Ja=Wo.get("dtypes.real_floating_point"),$a=Wo.get("dtypes.complex_floating_point"),Ka=Wo.get("dtypes.boolean");function Ha(r){var t,e,n,i;return t=Xr(r),arguments.length<2?t?n=Ja:U(r)?n=Ka:j(r)?null===(n=rt(r))&&(n=$a):n="generic":n=arguments[1],e=ja(1,n),i=t&&sn(n)?[r,0]:r,(Rt(e)?zt(n):Ct(n))(e,0,i),e}var Qa=Wo.get("dtypes.default");function Za(r,t){var e,n,i;if(!m(r))throw new TypeError(O("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>2?arguments[2]:Qa))return Rn(t,r);if(null===(n=Bi(e)))throw new TypeError(O("invalid argument. Third argument must be a recognized data type. Value: `%s`.",e));return i=new n(r),Yr(r,t,i,1),i}function Xa(r,t){var e,n;if(null===(e=Ie(r)))throw new TypeError(O("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 C(t,0):"complex64"===e?new S(t,0):t:t,Za(r.length,n,e)}function rs(r,t,e){var n;if(!Xr(r)||dr(r))throw new TypeError(O("invalid argument. Start must be numeric. Value: `%s`.",r));if(!Xr(t)||dr(t))throw new TypeError(O("invalid argument. Stop must be numeric. Value: `%s`.",t));if(arguments.length<3)n=1;else if(!Xr(n=e)||dr(n))throw new TypeError(O("invalid argument. Increment must be numeric. Value: `%s`.",n));if(jr((t-r)/n)>Ir)throw new RangeError("invalid arguments. Generated array exceeds maximum array length.");return mo(r,t,n)}var ts=[[Wt,"Float64Array"],[Jt,"Float32Array"],[Qt,"Int32Array"],[Kt,"Uint32Array"],[te,"Int16Array"],[Xt,"Uint16Array"],[se,"Int8Array"],[ne,"Uint8Array"],[oe,"Uint8ClampedArray"],[ye,"Complex64Array"],[_e,"Complex128Array"],[Pe,"BooleanArray"]];function es(r){var t,e;for(e=0;e<ts.length;e++)if(it(r,ts[e][0]))return ts[e][1];for(;r;){for(t=o(r),e=0;e<ts.length;e++)if(t===ts[e][1])return ts[e][1];r=ot(r)}}function ns(r){var t,e,n;if(tt(r))t=r;else if(et(r))t=8===r.BYTES_PER_ELEMENT?$(r,0):J(r,0);else{if(!nt(r))throw new TypeError(O("invalid argument. Must provide a typed array. Value: `%s`.",r));t=K(r,0)}for(e={type:es(r),data:[]},n=0;n<t.length;n++)e.data.push(t[n]);return e}var is=new st;function os(r){for(var t=is.first();t;){if(t.value.id===r)return t;t=t.next}return null}var as=-1;function ss(r){var t,n,i,o,a;if(!(this instanceof ss))return arguments.length>1?new ss(r,arguments[1]):new ss(r);if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===(i=Ie(r))||null===i)if(r.length>0)if(a=ze(r)(r,0),U(a))o="bool";else{if(!Y(a))throw new TypeError("invalid argument. First argument must be a valid index array.");o="int"}else o="int";else if("int32"===i)o="int";else if("uint8"===i)o="mask";else{if("bool"!==i)throw new TypeError("invalid argument. First argument must be a valid index array.");o="bool"}if(t={persist:!1},arguments.length>1&&(n=function(r,t){return at(t)?H(t,"persist")&&(r.persist=t.persist,!U(r.persist))?new TypeError(O("invalid option. `%s` option must be a boolean. Option: `%s`.","persist",r.persist)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(t,arguments[1]),n))throw n;return is.push({id:(as+=1).toString(),ref:this,data:r,type:o,dtype:i,persist:t.persist}),e(this,"_node",is.last()),Mr(this,"_invalidated",!1),this}e(ss,"name","ArrayIndex"),e(ss,"free",(function(r){var t,n;return null!==(t=os(r))&&(n=t.value,e(n.ref,"_invalidated",!0),is.remove(t),n.data=null,!0)})),e(ss,"get",(function(r){var t,e,n;return null===(t=os(r))?null:(e={data:(n=t.value).data,type:n.type,dtype:n.dtype},n.persist||ss.free(r),e)})),F(ss.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})),F(ss.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})),F(ss.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})),F(ss.prototype,"isCached",(function(){return!this._invalidated})),F(ss.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})),e(ss.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+">"})),e(ss.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?Rt(r.data)?Wn(r.data):r.data:ns(r.data)}}));var us={float64:Wt,float32:Jt,complex128:_e,complex64:ye};function ls(r){return us[r]||null}function fs(r,t,e,n,i){var o,a,s;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),s=1;s<o;s++)r[s]=t+a*s;return i&&(r[o]=e),r}function cs(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p,m;if(0===o)return r;if("float64"===t?(s=e,l=0):"complex64"===t?(s=B(e),l=L(e)):(s=N(e),l=D(e)),"float64"===n?(u=i,f=0):"complex64"===n?(u=B(i),f=L(i)):(u=N(i),f=D(i)),1===o)return a?(r[0]=u,r[1]=f):(r[0]=s,r[1]=l),r;for(r[0]=s,r[1]=l,c=(u-s)/(d=a?o-1:o),h=(f-l)/d,m=2,p=1;p<d;p++)r[m]=s+c*p,r[m+1]=l+h*p,m+=2;return a&&(r[m]=u,r[m+1]=f),r}function hs(r,t){return at(t)?H(t,"dtype")&&(r.dtype=t.dtype,!x(r.dtype))?new TypeError(O("invalid option. `%s` option must be a string. Option: `%s`.","dtype",r.dtype)):H(t,"endpoint")&&(r.endpoint=t.endpoint,!U(r.endpoint))?new TypeError(O("invalid option. `%s` option must be a boolean. Option: `%s`.","endpoint",r.endpoint)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}var ds=!0,ps=Wo.get("dtypes.complex_floating_point");function ms(r,t,e){var n,i,o,a,s,u,l;if("object"==typeof r){if(null===(s=rt(r))){if(!j(r))throw new TypeError(O("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));s="complex128"}l=!0}else{if(!Xr(r)||dr(r))throw new TypeError(O("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));s="float64"}if("object"==typeof t){if(null===(u=rt(t))){if(!j(t))throw new TypeError(O("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));u="complex128"}l=!0}else{if(!Xr(t)||dr(t))throw new TypeError(O("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));u="float64"}if(!m(e))throw new TypeError(O("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",e));if((n={endpoint:ds}).dtype=s===u?s:ps,arguments.length>3&&(o=hs(n,arguments[3])))throw o;if("generic"===n.dtype)return l?function(r,t,e,n,i,o){var a,s,u,l,f,c,h,d,p,m,g,v,y;if(0===i)return[];if(s=0,"float64"===r?(l=t,c=0):"complex64"===r?(s+=1,l=B(t),c=L(t)):(l=N(t),c=D(t)),"float64"===e?(f=n,h=0):"complex64"===e?(s+=1,f=B(n),h=L(n)):(f=N(n),h=D(n)),a=2===s?S:C,1===i)return o?[new a(f,h)]:[new a(l,c)];for(u=[new a(l,c)],m=(f-l)/(v=o?i-1:i),g=(h-c)/v,y=1;y<v;y++)d=l+m*y,p=c+g*y,u.push(new a(d,p));return o&&u.push(new a(f,h)),u}(s,r,u,t,e,n.endpoint):function(r,t,e,n){var i,o,a,s;if(0===e)return[];if(1===e)return n?[t]:[r];for(i=[r],a=(t-r)/(o=n?e-1:e),s=1;s<o;s++)i.push(r+a*s);return n&&i.push(t),i}(r,t,e,n.endpoint);if(null===(i=ls(n.dtype)))throw new TypeError(O('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 cs($(a,0),s,r,u,t,e,n.endpoint),a;if("complex128"===n.dtype)return cs(J(a,0),s,r,u,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 fs(a,r,t,e,n.endpoint)}e(ms,"assign",(function(r,t,e){var n,i,o,a,s,u,l;if("object"==typeof r){if(null===(o=rt(r))){if(!j(r))throw new TypeError(O("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="complex128"}s=!0}else{if(!Xr(r)||dr(r))throw new TypeError(O("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="float64"}if("object"==typeof t){if(null===(a=rt(t))){if(!j(t))throw new TypeError(O("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="complex128"}s=!0}else{if(!Xr(t)||dr(t))throw new TypeError(O("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="float64"}if(!v(e))throw new TypeError(O("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={endpoint:ds},arguments.length>3&&(i=hs(n,arguments[3])))throw i;if(null===(u=Ie(e))&&(u="generic"),"complex64"===u)return cs($(e,0),o,r,a,t,e.length,n.endpoint),e;if("complex128"===u)return cs(J(e,0),o,r,a,t,e.length,n.endpoint),e;if(s){if("generic"===u)return function(r,t,e,n,i,o,a){var s,u,l,f,c,h,d,p,m,g,v,y;if(0===o)return r;if(u=0,"float64"===t?(l=e,c=0):"complex64"===t?(u+=1,l=B(e),c=L(e)):(l=N(e),c=D(e)),"float64"===n?(f=i,h=0):"complex64"===n?(u+=1,f=B(i),h=L(i)):(f=N(i),h=D(i)),s=2===u?S:C,p=r.data,d=r.accessors[1],1===o)return d(p,0,a?new s(f,h):new s(l,c)),r;for(d(p,0,new s(l,c)),m=(f-l)/(v=a?o-1:o),g=(h-c)/v,y=1;y<v;y++)d(p,y,new s(l+m*y,c+g*y));a&&d(p,v,new s(f,h))}(l=De(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=De(e)).accessorProtocol?(function(r,t,e,n,i){var o,a,s,u,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),u=(e-t)/(s=i?n-1:n),l=1;l<s;l++)a(o,l,t+u*l);i&&a(o,s,e)}(l,r,t,e.length,n.endpoint),e):(fs(e,r,t,e.length,n.endpoint),e)}));var gs=q(),vs="little-endian",ys={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},ws={c:"a",f:"a",i:"an",u:"a",b:"a"};function bs(r){var t,n,i,o;function a(){var r=arguments.length;return this instanceof a?(0===r?o.call(this,vs):1===r?o.call(this,vs,arguments[0]):2===r?o.call(this,vs,arguments[0],arguments[1]):3===r&&o.call(this,vs,arguments[0],arguments[1],arguments[2]),this):0===r?new a:1===r?new a(arguments[0]):2===r?new a(arguments[0],arguments[1]):new a(arguments[0],arguments[1],arguments[2])}return o=Ya(r),t=Hr(r),n=function(r){return Qr(r)+"ArrayLE"}(r),i=ys[r],e(a,"BYTES_PER_ELEMENT",t),e(a,"name",n),e(a,"from",(function(e){var o,a,u,l,f,c,h,d,p;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!s(this))throw new TypeError(O("invalid invocation. `this` is not %s %s.",ws[r[0]],n));if((a=arguments.length)>1){if(!T(u=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",u));a>2&&(o=arguments[2])}if(v(e)){if(u){for(d=e.length,h=e.get&&e.set?Dt("default"):Mt("default"),f=(l=new this(d))._buffer,p=0;p<d;p++)f[i](p*t,u.call(o,h(e,p),p),!0);return l}return new this(e)}if(w(e)&&gs&&T(e[A])){if(f=e[A](),!T(f.next))throw new TypeError(O("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));for(c=u?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}(f,u,o):function(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}(f),f=(l=new this(d=c.length))._buffer,p=0;p<d;p++)f[i](p*t,c[p],!0);return l}throw new TypeError(O("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e))})),e(a,"of",(function(){var t,e;if(!T(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!s(this))throw new TypeError(O("invalid invocation. `this` is not %s %s.",ws[r[0]],n));for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),ut(a,o),a;function s(r){return r===a}}var Es=bs("float32"),xs=bs("float64");function Ts(r,t,e){if(!Xr(r)||dr(r))throw new TypeError(O("invalid argument. Exponent of start value must be numeric. Value: `%s`.",r));if(!Xr(t)||dr(t))throw new TypeError(O("invalid argument. Exponent of stop value must be numeric. Value: `%s`.",t));if(arguments.length<3)e=10;else if(!m(e))throw new TypeError(O("invalid argument. Length must be a nonnegative integer. Value: `%s`.",e));return vo(r,t,e)}function js(r){return r!=r||r===ft||r===ct?"float32":V(r)?r>=pt&&r<=dt?"float32":"float64":r>-ht&&r<ht?"float64":"float32"}function _s(r){return Xr(r)?r!=r||r===ft||r===ct?"float32":V(r)?0===r&<(r)?"float32":r<0?r>=kr?"int8":r>=Ar?"int16":r>=Fr?"int32":"float64":r<=Lr?"uint8":r<=Rr?"uint16":r<=Ir?"uint32":"float64":r>-ht&&r<ht?"float64":"float32":U(r)?"bool":j(r)?"float64"===js(r.re)||"float64"===js(r.im)?"complex128":"complex64":"generic"}function Vs(r,t){var e;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(O("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=Ie(r))||null===e?_o(r,t):_o.assign(r,t,Qo(Xn(t),e),1,0)}var ks=["strict","non_strict","strict_broadcast","broadcast","repeat"],As=qe(ks);function Fs(r,t,e){var n,i,o,a;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!v(e))throw new TypeError(O("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 at(t)?H(t,"mode")&&(r.mode=t.mode,!As(r.mode))?new TypeError(O('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",ks.join('", "'),r.mode)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ie(r)||"generic",!yn(a=Ie(e)||"generic",o))throw new TypeError(O("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return sn(o)&&En(a)&&(e=Mi(e,o)),ko(r,t,e,n.mode)}function Ss(r,t){var e;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(O("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=Ie(r))||null===e?Ao(r,t):Ao.assign(r,t,Qo(Jn(t),e),1,0)}var Ps=new C(NaN,NaN),Bs=new S(NaN,NaN),Ls=tn("floating_point_and_generic"),Rs=qe(Ls),Is=Wo.get("dtypes.real_floating_point");function Ms(r){var t;if(arguments.length>1){if(!Rs(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(Ls,'", "'),t))}else t=Is;return Za(r,"complex128"===t?Ps:"complex64"===t?Bs:NaN,t)}var Os=new C(NaN,NaN),Cs=new S(NaN,NaN),Ns=tn("floating_point_and_generic"),Ds=qe(Ns);function Us(r){var t,e;if(null===(t=Ie(r)))throw new TypeError(O("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(!Ds(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(Ns,'", "'),t))}else if(!Ds(t))throw new TypeError(O('invalid argument. First argument must have one of the following data types: "%s". Value: `%s`.',go(Ns,'", "'),t));return e="complex128"===t?Os:"complex64"===t?Cs:NaN,Za(r.length,e,t)}var zs={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 Ys(r){return 0===arguments.length?function(){var r,t,e,n;for(e={},t=(r=ar(zs)).length,n=0;n<t;n++)e[r[n]]=zs[r[n]];return e}():H(zs,r)?zs[r]:null}var qs=["generic"],Ws=qe(qs);function Gs(r){var t;if(arguments.length>1){if(!Ws(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(qs,'", "'),t))}else t="generic";return Za(r,null,t)}var Js=Wo.get("dtypes.default");function $s(r){var t;if(!m(r))throw new TypeError(O("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return Po(r)}else t=Js;return Po.assign(Qo(r,t),1,0)}var Ks=tn("numeric_and_generic"),Hs=qe(Ks);function Qs(r){var t=Ie(r);if(null===t)throw new TypeError(O("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(!Hs(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(Ks,'", "'),t))}else if(!Hs(t))throw new TypeError(O('invalid argument. First argument must have one of the following data types: "%s". Value: `%s`.',go(Ks,'", "'),t));return $s(r.length,t)}var Zs=new C(1,0),Xs=new S(1,0),ru=tn("numeric_and_generic"),tu=qe(ru),eu=Wo.get("dtypes.default");function nu(r){var t;if(arguments.length>1){if(!tu(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(ru,'", "'),t))}else t=eu;return Za(r,"complex128"===t?Zs:"complex64"===t?Xs:1,t)}var iu=new C(1,0),ou=new S(1,0),au=tn("numeric_and_generic"),su=qe(au);function uu(r){var t,e;if(null===(t=Ie(r)))throw new TypeError(O("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(!su(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(au,'", "'),t))}else if(!su(t))throw new TypeError(O('invalid argument. First argument must have one of the following data types: "%s". Value: `%s`.',go(au,'", "'),t));return e="complex128"===t?iu:"complex64"===t?ou:1,Za(r.length,e,t)}var lu=["strict","non_strict","strict_broadcast","broadcast","repeat"],fu=qe(lu);function cu(r,t,e){var n,i,o,a;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!v(e))throw new TypeError(O("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 at(t)?H(t,"mode")&&(r.mode=t.mode,!fu(r.mode))?new TypeError(O('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",lu.join('", "'),r.mode)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ie(r)||"generic",!yn(a=Ie(e)||"generic",o))throw new TypeError(O("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return sn(o)&&En(a)&&(e=Mi(e,o)),Lo(r,t,e,n.mode)}var hu={float64:Wt,float32:Jt,int16:te,int32:Qt,int8:se,uint16:Xt,uint32:Kt,uint8:ne,uint8c:oe,complex64:ye,complex128:_e,bool:Pe};function du(r){return hu[r]||null}var pu={bool:1,float64:8,float32:4,int16:2,int32:4,int8:1,uint16:2,uint32:4,uint8:1,uint8c:1,complex64:8,complex128:16},mu=Wo.get("dtypes.default"),gu=du("complex64"),vu=du("complex128"),yu=du("bool");function wu(r){return r instanceof gu}function bu(r){return r instanceof vu}function Eu(r){return r instanceof yu}function xu(r){var t,n,i,o;if(i={highWaterMark:9007199254740992},arguments.length&&(o=function(r,t){return at(t)?H(t,"highWaterMark")&&(r.highWaterMark=t.highWaterMark,!m(r.highWaterMark))?new TypeError(O("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","highWaterMark",r.highWaterMark)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(i,r),o))throw o;return n=function(r){var t,e;for(t=[],e=0;e<r+1;e++)t.push([]);return t}(jr(wt(i.highWaterMark))),t=0,e(s,"malloc",s),e(s,"calloc",(function(){var r,t,e,n;r=arguments.length,t=0===r?s():1===r?s(arguments[0]):s(arguments[0],arguments[1]);if(null!==t)for(e=bu(t)?J(t,0):wu(t)?$(t,0):Eu(t)?K(t,0):t,n=0;n<e.length;n++)e[n]=0;return t})),e(s,"free",(function(r){var t,e,i;if(mt(r)&&r.buffer)r=r.buffer;else if(!y(r))throw new TypeError(O("invalid argument. Must provide a typed array or ArrayBuffer. Value: `%s`.",r));if(r.byteLength>0){for(t=R(wt(r.byteLength)),t=bt(n.length-1,t),e=n[t],i=0;i<e.length;i++)if(e[i]===r)return!1;e.push(r)}return!0})),e(s,"clear",(function(){var r;for(r=0;r<n.length;r++)n[r].length=0;t=0})),e(s,"highWaterMark",i.highWaterMark),F(s,"nbytes",(function(){return t})),s;function a(r,e,o){var a;return 0===e?new r(0):null===(a=function(r){var e,o;return(o=wt(r))<n.length&&n[o].length?n[o].pop():t+r>i.highWaterMark?null:(e=new da(r),t+=r,e)}(yt(e)*pu[o]))?a:new r(a,0,e)}function s(){var r,t,e,n,i,o,s,u,l;if(null===(e=du(t=(r=arguments.length)&&x(arguments[r-1])?arguments[r-=1]:mu)))throw new TypeError(O("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(r<=0)return new e(0);if(m(arguments[0]))return a(e,arguments[0],t);if(v(arguments[0])){if(u=(n=arguments[0]).length,vt(n)?n=J(n,0):gt(n)?n=$(n,0):nt(n)?n=K(n,0):sn(t)&&(u/=2),null===(i=a(e,u,t)))return i;if(bu(i)||wu(i)||Eu(i))return i.set(n),i;for(s=ze(n),o=Co(i),l=0;l<u;l++)o(i,l,s(n,l));return i}throw new TypeError(O("invalid argument. First argument must be either an array length or an array-like object. Value: `%s`.",arguments[0]))}}var Tu=xu();e(Tu,"factory",xu);var ju={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 _u(r,t){var e;return 0===arguments.length?function(){var r,t,e,n,i,o,a,s,u;for(e={},t=(r=ar(ju)).length,u=0;u<t;u++){for(i=r[u],a=ju[i],n={},s=0;s<t;s++)n[o=r[s]]=a[o];e[i]=n}return e}():(r=sr(r),H(ju,r)&&(e=ju[r],t=sr(t),H(e,t))?e[t]:null)}function Vu(r,t,e){var n,i,o,a;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!v(e))throw new TypeError(O("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 at(t)?H(t,"mode")&&(r.mode=t.mode,!Et(r.mode))?new TypeError(O('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",xt().join('", "'),r.mode)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ie(r)||"generic",!yn(a=Ie(e)||"generic",o))throw new TypeError(O("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return sn(o)&&En(a)&&(e=Mi(e,o)),Ro(r,t,e,n.mode)}var ku={Float64Array:Wt,Float32Array:Jt,Int32Array:Qt,Uint32Array:Kt,Int16Array:te,Uint16Array:Xt,Int8Array:se,Uint8Array:ne,Uint8ClampedArray:oe,Complex64Array:ye,Complex128Array:_e,BooleanArray:Pe};function Au(r,t){var e;return t&&t.type&&i(t.data)&&(e=ku[t.type])?new e(t.data):t}function Fu(r,t){var e=t[0];return g(e)&&(r.push(e.length),Fu(r,e)),r}function Su(r,t,e,n,i){var o,a,s;for(o=t[e],s=0;s<n.length;s++){if(a=n[s],!g(a)||a.length!==o)return e;if(i&&(a=Su(r,t,e+1,a,e+1<r-1))<r)return a}return r}function Pu(r){var t,e;if(!g(r))throw new TypeError(O("invalid argument. Must provide an array-like object. Value: `%s`.",r));return Fu(t=[r.length],r),(e=t.length)>1&&(t.length=Su(e,t,1,r,e>2)),t}var Bu="function"==typeof SharedArrayBuffer?SharedArrayBuffer:null;var Lu=Tt()?Bu: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.")};function Ru(r){var t,e;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!Y(t=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(arguments.length>2){if(!Y(e=arguments[2]))throw new TypeError(O("invalid argument. Third argument must be an integer. Value: `%s`.",e))}else e=r.length}else t=0,e=r.length;return Mo(r,t,e)}function Iu(r,t){var e,n,i;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!v(t))throw new TypeError(O("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 at(t)?H(t,"mode")&&(r.mode=t.mode,!Et(r.mode))?new TypeError(O('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",xt().join('", "'),r.mode)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}(e,arguments[2]),n))throw n;return"generic"===(i=Ie(r))||null===i?Uo(r,t,e.mode):Uo.assign(r,t,e.mode,Qo(t.length,i),1,0)}function Mu(r){var t,n,i,o,a,s,u,l,f,c;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(o={iter:1e308,dir:1},arguments.length>1)if(at(arguments[1])){if(n=arguments[1],arguments.length>2){if(!T(u=arguments[2]))throw new TypeError(O("invalid argument. Callback argument must be a function. Value: `%s`.",u));t=arguments[3]}if(H(n,"iter")&&(o.iter=n.iter,!m(n.iter)))throw new TypeError(O("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","iter",n.iter));if(H(n,"dir")&&(o.dir=n.dir,1!==n.dir&&-1!==n.dir))throw new TypeError(O("invalid option. `%s` option must be either `1` or `-1`. Option: `%s`.","dir",n.dir))}else{if(!T(u=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be either a function or an options object. Value: `%s`.",u));t=arguments[2]}return i=0,a={},u?1===o.dir?(c=-1,e(a,"next",(function(){if(c=(c+1)%r.length,i+=1,s||i>o.iter||0===r.length)return{done:!0};return{value:u.call(t,l(r,c),c,i,r),done:!1}}))):(c=r.length,e(a,"next",(function(){(c-=1)<0&&(c+=r.length);if(i+=1,s||i>o.iter||0===r.length)return{done:!0};return{value:u.call(t,l(r,c),c,i,r),done:!1}}))):1===o.dir?(c=-1,e(a,"next",(function(){if(c=(c+1)%r.length,i+=1,s||i>o.iter||0===r.length)return{done:!0};return{value:l(r,c),done:!1}}))):(c=r.length,e(a,"next",(function(){(c-=1)<0&&(c+=r.length);if(i+=1,s||i>o.iter||0===r.length)return{done:!0};return{value:l(r,c),done:!1}}))),e(a,"return",(function(r){if(s=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(a,W,(function(){if(u)return Mu(r,o,u,t);return Mu(r,o)})),f=Ie(r),l=Rt(r)?Dt(f):Mt(f),a}function Ou(r){return Xr(r)?[r,0]:r}function Cu(r){return sn(r)?Ou:null}function Nu(r,t){return function(e){return r(e,t)}}var Du="function"==typeof _t;function Uu(r,t){return at(t)?H(t,"strict")&&(r.strict=t.strict,!U(r.strict))?new TypeError(O("invalid option. `%s` option must be a boolean. Option: `%s`.","strict",r.strict)):H(t,"cache")&&(r.cache=t.cache,!kt(r.cache,"get"))?new TypeError(O("invalid option. `%s` option is missing a `%s` method. Option: `%s`.","cache","get",r.cache)):null:new TypeError(O("invalid argument. Options argument must be an object. Value: `%s`.",t))}function zu(){return null}function Yu(r,t){return U(r)?null:new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function qu(r,t){return Xr(r)?null:j(r)?new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",rt(r),t)):new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Wu(r,t){return Xr(r)||j(r)?null:new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Gu(r,t){var e;return Xr(r)?Y(r)?Vn(e=jo(r),t)?null:new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",_s(r),t)):j(r)?new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",rt(r),t)):new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Ju(r,t){var e;return Xr(r)?Vn(e=_s(r),t)?null:new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):j(r)?new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",rt(r),t)):new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function $u(r){return"generic"===r||""===r?zu:xn(r)?qu:Bn(r)?Ju:Pn(r)?Gu:en(r)?Yu:Wu}function Ku(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)}}var Hu=/^-?[0-9]+$/;function Qu(r){return x(r)&&Hu.test(r)}var Zu=/\s*ArrayIndex<[^>]+>\s*/;function Xu(r){return x(r)&&Zu.test(r)}function rl(r,t){var e,n=t.get((e=At(r)).substring(11,e.length-1));if(null===n)throw new Error(O("invalid operation. Unable to resolve array index. Value: `%s`.",r));return n}function tl(r,t,e){var n,i;if(n=parseInt(r,10),-1===(i=Cr(n,t-1))){if(e)throw new RangeError(O("invalid operation. Index exceeds array bounds."));return n}return i}function el(r){return or(r,/^invalid arguments?/,"invalid operation")}var nl=/:/;function il(r,t,e){var n=At(t);return function(r){return"S"===r[0]&&Pt(r,"Slice(",0)&&")"===r[r.length-1]}(n)?function(r,t){var e=St(t);if(null===e)throw new Error(O("invalid operation. Unsupported slice operation. Value: `%s`.",r));return e}(t,n):function(r){return nl.test(r)}(n)?function(r,t,e,n){var i=Ft(t,e,!0);if(i.code){if("ERR_SLICE_INVALID_INCREMENT"===i.code)throw new Error(O("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",r));if("ERR_SLICE_INVALID_SUBSEQUENCE"===i.code)throw new Error(O("invalid operation. Unsupported slice operation. Value: `%s`.",r));if("ERR_SLICE_OUT_OF_BOUNDS"===i.code){if(n)throw new RangeError(O("invalid operation. Slice exceeds array bounds."));i=Ft(t,e,!1)}}return i}(t,n,r.length,e):null}function ol(r){return function(t,e,n){if(Qu(e))return function(r,t,e){return e.getter(r,tl(t,r.length,e.strict))}(t,e,r);if(Q(t,e)||!x(e))return function(r,t,e,n){var i=r[t];return T(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(Xu(e))return function(r,t,e){var n=rl(t,e.cache);if("int"===n.type)return e.postGetArray(Iu(r,n.data));if("bool"===n.type)return e.postGetArray(Vs(r,n.data));if("mask"===n.type)return e.postGetArray(Ss(r,n.data));throw new Error(O("invalid operation. Unrecognized array index type. Value: `%s`.",n.type))}(t,e,r);return function(r,t,e){var n=il(r,t,e.strict);if(null!==n)try{return e.postGetArray(Si(r,n,e.strict))}catch(r){throw new r.constructor(el(r.message))}}(t,e,r)}}function al(r,t,e){return r[t]=e,!0}function sl(r){return function(t,e,n,i){var o;if(Qu(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,tl(t,r.length,n.strict),o),!0}(t,e,n,r);if(Q(t,e)||!x(e))return al(t,e,n);if(Xu(e))return function(r,t,e,n){var i,o,a,s,u;if(a=rl(t,n.cache),i=n.dtype||"generic",v(e))u=e;else{if(s=n.validator(e,i))throw s;u=Ha(u=n.preSetElement?n.preSetElement(e):e,i),o=i}if("int"===a.type){try{Vu(r,a.data,u)}catch(s){throw new s.constructor(el(s.message))}return!0}if("bool"===a.type){try{cu(r,a.data,u,{mode:"strict_broadcast"})}catch(s){throw new s.constructor(el(s.message))}return!0}if(void 0===o&&(o=Ie(e)||"generic"),!yn(o,i))throw new TypeError(O("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,i));if(sn(i)&&En(o)&&(u=Mi(u,i)),"mask"===a.type){try{oa(a.data,r,u,r,1,0)}catch(s){throw new s.constructor(el(s.message))}return!0}throw new Error(O("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,s;if(null===(a=il(r,t,i.strict)))return!1;if(v(e))s=e;else{if(o=i.validator(e,i.dtype))throw o;s=Ha(e,i.dtype||"generic")}try{Oi(s,n,a,i.strict)}catch(o){throw new o.constructor(el(o.message))}return!0}(t,e,n,i,r),o)return o;return al(t,e,n)}}function ul(){var r,t;if(r={cache:ss,strict:!1},arguments.length&&(t=Uu(r,arguments[0])))throw t;return function t(e){var n,i,o,a,s;if(!jt(e)&&!v(e))throw new TypeError(O("invalid argument. First argument must be array-like. Value: `%s`.",e));if(Du){if(n=Vt({},r),arguments.length>1&&(i=Uu(n,arguments[1])))throw i;return s={ref:e,dtype:a=(o=De(e)).dtype||"",getter:o.accessors[0],setter:o.accessors[1],preSetElement:Cu(a),postGetArray:Nu(t,n),cache:n.cache,strict:n.strict,validator:$u(a),array2fancy:t,ctor:new _t(e.constructor||Array,{construct:Ku(t,n)})},new _t(e,{get:ol(s),set:sl(s)})}return console.warn("WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available."),e}}var ll=ul();function fl(r){var t,n,i,o,a,s,u;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!T(o=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",o));t=arguments[2]}return u=-1,e(n={},"next",o?function(){if(u+=1,i||u>=r.length)return{done:!0};return{value:o.call(t,a(r,u),u,r),done:!1}}:function(){if(u+=1,i||u>=r.length)return{done:!0};return{value:a(r,u),done:!1}}),e(n,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(n,W,(function(){if(o)return fl(r,o,t);return fl(r)})),s=Ie(r),a=Rt(r)?Dt(s):Mt(s),n}function cl(r){var t,n,i,o,a,s,u,l;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!T(o=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",o));t=arguments[2]}return a=r.length,l=a,e(n={},"next",o?function(){if(l+=r.length-a-1,a=r.length,i||l<0)return i=!0,{done:!0};return{value:o.call(t,s(r,l),l,r),done:!1}}:function(){if(l+=r.length-a-1,a=r.length,i||l<0)return i=!0,{done:!0};return{value:s(r,l),done:!1}}),e(n,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(n,W,(function(){if(o)return cl(r,o,t);return cl(r)})),u=Ie(r),s=Rt(r)?Dt(u):Mt(u),n}function hl(r){var t,n,i,o,a,s,u;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!T(o=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",o));t=arguments[2]}return u=-1,e(n={},"next",o?function(){var e;if(i)return{done:!0};e=r.length,u+=1;for(;u<e&&void 0===a(r,u);)u+=1;if(u>=e)return i=!0,{done:!0};return{value:o.call(t,a(r,u),u,r),done:!1}}:function(){var t;if(i)return{done:!0};t=r.length,u+=1;for(;u<t&&void 0===a(r,u);)u+=1;if(u>=t)return i=!0,{done:!0};return{value:a(r,u),done:!1}}),e(n,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(n,W,(function(){if(o)return hl(r,o,t);return hl(r)})),s=Ie(r),a=Rt(r)?Dt(s):Mt(s),n}function dl(r){var t,n,i,o,a,s,u,l;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!T(o=arguments[1]))throw new TypeError(O("invalid argument. Second argument must be a function. Value: `%s`.",o));t=arguments[2]}return a=r.length,l=a,e(n={},"next",o?function(){if(i)return{done:!0};l+=r.length-a-1,a=r.length;for(;l>=0&&void 0===s(r,l);)l-=1;if(l<0)return i=!0,{done:!0};return{value:o.call(t,s(r,l),l,r),done:!1}}:function(){if(i)return{done:!0};l+=r.length-a-1,a=r.length;for(;l>=0&&void 0===s(r,l);)l-=1;if(l<0)return i=!0,{done:!0};return{value:s(r,l),done:!1}}),e(n,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(n,W,(function(){if(o)return dl(r,o,t);return dl(r)})),u=Ie(r),s=Rt(r)?Dt(u):Mt(u),n}function pl(r,t,n,i){var o,a,s,u,l,f,c,h;if(!m(r))throw new TypeError(O("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(!v(t))throw new TypeError(O("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!Y(n))throw new TypeError(O("invalid argument. Third argument must be an integer. Value: `%s`.",n));if(!m(i))throw new TypeError(O("invalid argument. Fourth argument must be a nonnegative integer. Value: `%s`.",i));if(arguments.length>4){if(!T(u=arguments[4]))throw new TypeError(O("invalid argument. Fifth argument must be a function. Value: `%s`.",u));o=arguments[5]}return l=i,h=-1,e(a={},"next",u?function(){var e;if(h+=1,s||h>=r)return{done:!0};return e=u.call(o,f(t,l),l,h,t),l+=n,{value:e,done:!1}}:function(){var e;if(h+=1,s||h>=r)return{done:!0};return e=f(t,l),l+=n,{value:e,done:!1}}),e(a,"return",(function(r){if(s=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(a,W,(function(){if(u)return pl(r,t,n,i,u,o);return pl(r,t,n,i)})),c=Ie(t),f=Rt(t)?Dt(c):Mt(c),a}function ml(r){var t,n,i,o,a,s,u,l,f,c;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(1===(i=arguments.length))n=0,u=r.length;else if(2===i)T(arguments[1])?(n=0,s=arguments[1]):n=arguments[1],u=r.length;else if(3===i)T(arguments[1])?(n=0,u=r.length,s=arguments[1],t=arguments[2]):T(arguments[2])?(n=arguments[1],u=r.length,s=arguments[2]):(n=arguments[1],u=arguments[2]);else{if(n=arguments[1],u=arguments[2],!T(s=arguments[3]))throw new TypeError(O("invalid argument. Fourth argument must be a function. Value: `%s`.",s));t=arguments[4]}if(!Y(n))throw new TypeError(O("invalid argument. Second argument must be either an integer (starting index) or a function. Value: `%s`.",n));if(!Y(u))throw new TypeError(O("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),n<0&&(n=r.length+n)<0&&(n=0),c=n-1,e(o={},"next",s?function(){if(c+=1,a||c>=u)return{done:!0};return{value:s.call(t,l(r,c),c,c-n,r),done:!1}}:function(){if(c+=1,a||c>=u)return{done:!0};return{value:l(r,c),done:!1}}),e(o,"return",(function(r){if(a=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(o,W,(function(){if(s)return ml(r,n,u,s,t);return ml(r,n,u)})),f=Ie(r),l=Rt(r)?Dt(f):Mt(f),o}function gl(r){var t,n,i,o,a,s,u,l,f,c;if(!v(r))throw new TypeError(O("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(1===(i=arguments.length))n=0,u=r.length;else if(2===i)T(arguments[1])?(n=0,s=arguments[1]):n=arguments[1],u=r.length;else if(3===i)T(arguments[1])?(n=0,u=r.length,s=arguments[1],t=arguments[2]):T(arguments[2])?(n=arguments[1],u=r.length,s=arguments[2]):(n=arguments[1],u=arguments[2]);else{if(n=arguments[1],u=arguments[2],!T(s=arguments[3]))throw new TypeError(O("invalid argument. Fourth argument must be a function. Value: `%s`.",s));t=arguments[4]}if(!Y(n))throw new TypeError(O("invalid argument. Second argument must be either an integer (starting view index) or a function. Value: `%s`.",n));if(!Y(u))throw new TypeError(O("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),n<0&&(n=r.length+n)<0&&(n=0),c=u,e(o={},"next",s?function(){if(c-=1,a||c<n)return{done:!0};return{value:s.call(t,l(r,c),c,u-c-1,r),done:!1}}:function(){if(c-=1,a||c<n)return{done:!0};return{value:l(r,c),done:!1}}),e(o,"return",(function(r){if(a=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),W&&e(o,W,(function(){if(s)return gl(r,n,u,s,t);return gl(r,n,u)})),f=Ie(r),l=Rt(r)?Dt(f):Mt(f),o}e(ll,"factory",ul),e(ll,"idx",ss);var vl=Wo.get("dtypes.default"),yl=du("complex64"),wl=du("complex128"),bl=du("bool");function El(){var r,t,e,n;if(null===(e=du(t=(r=arguments.length)&&x(arguments[r-1])?arguments[r-=1]:vl)))throw new TypeError(O("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?((n=arguments[0])instanceof yl?n=$(n,0):n instanceof wl?n=J(n,0):n instanceof bl&&(n=K(n,0)),new e(n)):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])}var xl={complex128:_e,complex64:ye};function Tl(r){return xl[r]||null}var jl=Wo.get("dtypes.complex_floating_point");function _l(){var r,t,e;if(null===(e=Tl(t=(r=arguments.length)&&x(arguments[r-1])?arguments[r-=1]:jl)))throw new TypeError(O("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 Vl(){return tn("complex_floating_point")}function kl(){return tn("typed")}function Al(){return tn("floating_point")}var Fl={int16:te,int32:Qt,int8:se,uint16:Xt,uint32:Kt,uint8:ne,uint8c:oe};function Sl(r){return Fl[r]||null}function Pl(){return tn("integer")}var Bl=Wo.get("dtypes.real");function Ll(){var r,t,e;if(null===(e=du(t=(r=arguments.length)&&x(arguments[r-1])?arguments[r-=1]:Bl)))throw new TypeError(O("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 Rl={float64:Wt,float32:Jt,int16:te,int32:Qt,int8:se,uint16:Xt,uint32:Kt,uint8:ne,uint8c:oe};function Il(r){return Rl[r]||null}function Ml(){return tn("real")}var Ol={float64:Wt,float32:Jt};function Cl(r){return Ol[r]||null}function Nl(){return tn("real_floating_point")}var Dl={int16:te,int32:Qt,int8:se};function Ul(r){return Dl[r]||null}function zl(){return tn("signed_integer")}var Yl={uint16:Xt,uint32:Kt,uint8:ne,uint8c:oe};function ql(r){return Yl[r]||null}function Wl(){return tn("unsigned_integer")}var Gl=Wo.get("dtypes.default");function Jl(r){var t;if(!m(r))throw new TypeError(O("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return $n(r)}else t=Gl;return $n.assign(Qo(r,t),1,0)}var $l=tn("numeric_and_generic"),Kl=qe($l);function Hl(r){var t=Ie(r);if(null===t)throw new TypeError(O("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(!Kl(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go($l,'", "'),t))}else if(!Kl(t))throw new TypeError(O('invalid argument. First argument must have one of the following data types: "%s". Value: `%s`.',go($l,'", "'),t));return Jl(r.length,t)}var Ql=tn("numeric_and_generic"),Zl=qe(Ql);function Xl(r){var t=Ie(r);if(null===t)throw new TypeError(O("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(!Zl(t=arguments[1]))throw new TypeError(O('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',go(Ql,'", "'),t))}else if(!Zl(t))throw new TypeError(O('invalid argument. First argument must have one of the following data types: "%s". Value: `%s`.',go(Ql,'", "'),t));return Qo(r.length,t)}var rf={};r(rf,"base",ca),r(rf,"BooleanArray",Pe),r(rf,"ArrayBuffer",da),r(rf,"byteOrders",on),r(rf,"cartesianPower",pa),r(rf,"cartesianProduct",ma),r(rf,"cartesianSquare",ga),r(rf,"Complex64Array",ye),r(rf,"Complex128Array",_e),r(rf,"convert",Mi),r(rf,"convertSame",va),r(rf,"ctors",Bi),r(rf,"DataView",wa),r(rf,"datespace",Ta),r(rf,"defaults",Wo),r(rf,"dtype",Ie),r(rf,"dtypes",tn),r(rf,"empty",ja),r(rf,"emptyLike",_a),r(rf,"filled",Aa),r(rf,"filledBy",Pa),r(rf,"fixedEndianFactory",Ya),r(rf,"Float32ArrayFE",qa),r(rf,"Float64ArrayFE",Wa),r(rf,"Float32Array",Jt),r(rf,"Float64Array",Wt),r(rf,"iterator2array",Ga),r(rf,"scalar2array",Ha),r(rf,"full",Za),r(rf,"fullLike",Xa),r(rf,"incrspace",rs),r(rf,"ArrayIndex",ss),r(rf,"Int8Array",se),r(rf,"Int16Array",te),r(rf,"Int32Array",Qt),r(rf,"linspace",ms),r(rf,"littleEndianFactory",bs),r(rf,"Float32ArrayLE",Es),r(rf,"Float64ArrayLE",xs),r(rf,"logspace",Ts),r(rf,"minDataType",_s),r(rf,"mostlySafeCasts",gn),r(rf,"mskfilter",Vs),r(rf,"mskput",Fs),r(rf,"mskreject",Ss),r(rf,"nans",Ms),r(rf,"nansLike",Us),r(rf,"nextDataType",Ys),r(rf,"nulls",Gs),r(rf,"oneTo",$s),r(rf,"oneToLike",Qs),r(rf,"ones",nu),r(rf,"onesLike",uu),r(rf,"place",cu),r(rf,"typedarraypool",Tu),r(rf,"promotionRules",_u),r(rf,"put",Vu),r(rf,"typedarrayReviver",Au),r(rf,"safeCasts",jn),r(rf,"sameKindCasts",Fn),r(rf,"shape",Pu),r(rf,"SharedArrayBuffer",Lu),r(rf,"slice",Ru),r(rf,"take",Iu),r(rf,"circarray2iterator",Mu),r(rf,"array2fancy",ll),r(rf,"array2iterator",fl),r(rf,"array2iteratorRight",cl),r(rf,"typedarray2json",ns),r(rf,"sparsearray2iterator",hl),r(rf,"sparsearray2iteratorRight",dl),r(rf,"stridedarray2iterator",pl),r(rf,"arrayview2iterator",ml),r(rf,"arrayview2iteratorRight",gl),r(rf,"typedarray",El),r(rf,"complexarray",_l),r(rf,"complexarrayCtors",Tl),r(rf,"complexarrayDataTypes",Vl),r(rf,"typedarrayCtors",du),r(rf,"typedarrayDataTypes",kl),r(rf,"floatarrayCtors",ls),r(rf,"floatarrayDataTypes",Al),r(rf,"intarrayCtors",Sl),r(rf,"intarrayDataTypes",Pl),r(rf,"realarray",Ll),r(rf,"realarrayCtors",Il),r(rf,"realarrayDataTypes",Ml),r(rf,"realarrayFloatCtors",Cl),r(rf,"realarrayFloatDataTypes",Nl),r(rf,"intarraySignedCtors",Ul),r(rf,"intarraySignedDataTypes",zl),r(rf,"intarrayUnsignedCtors",ql),r(rf,"intarrayUnsignedDataTypes",Wl),r(rf,"Uint8Array",ne),r(rf,"Uint8ClampedArray",oe),r(rf,"Uint16Array",Xt),r(rf,"Uint32Array",Kt),r(rf,"zeroTo",Jl),r(rf,"zeroToLike",Hl),r(rf,"zeros",Qo),r(rf,"zerosLike",Xl),r(rf,"constants",Bt);export{da as ArrayBuffer,ss as ArrayIndex,Pe as BooleanArray,_e as Complex128Array,ye as Complex64Array,wa as DataView,Jt as Float32Array,qa as Float32ArrayFE,Es as Float32ArrayLE,Wt as Float64Array,Wa as Float64ArrayFE,xs as Float64ArrayLE,te as Int16Array,Qt as Int32Array,se as Int8Array,Lu as SharedArrayBuffer,Xt as Uint16Array,Kt as Uint32Array,ne as Uint8Array,oe as Uint8ClampedArray,ll as array2fancy,fl as array2iterator,cl as array2iteratorRight,ml as arrayview2iterator,gl as arrayview2iteratorRight,ca as base,on as byteOrders,pa as cartesianPower,ma as cartesianProduct,ga as cartesianSquare,Mu as circarray2iterator,_l as complexarray,Tl as complexarrayCtors,Vl as complexarrayDataTypes,Mi as convert,va as convertSame,Bi as ctors,Ta as datespace,rf as default,Wo as defaults,Ie as dtype,tn as dtypes,ja as empty,_a as emptyLike,Aa as filled,Pa as filledBy,Ya as fixedEndianFactory,ls as floatarrayCtors,Al as floatarrayDataTypes,Za as full,Xa as fullLike,rs as incrspace,Sl as intarrayCtors,Pl as intarrayDataTypes,Ul as intarraySignedCtors,zl as intarraySignedDataTypes,ql as intarrayUnsignedCtors,Wl as intarrayUnsignedDataTypes,Ga as iterator2array,ms as linspace,bs as littleEndianFactory,Ts as logspace,_s as minDataType,gn as mostlySafeCasts,Vs as mskfilter,Fs as mskput,Ss as mskreject,Ms as nans,Us as nansLike,Ys as nextDataType,Gs as nulls,$s as oneTo,Qs as oneToLike,nu as ones,uu as onesLike,cu as place,_u as promotionRules,Vu as put,Ll as realarray,Il as realarrayCtors,Ml as realarrayDataTypes,Cl as realarrayFloatCtors,Nl as realarrayFloatDataTypes,jn as safeCasts,Fn as sameKindCasts,Ha as scalar2array,Pu as shape,Ru as slice,hl as sparsearray2iterator,dl as sparsearray2iteratorRight,pl as stridedarray2iterator,Iu as take,El as typedarray,ns as typedarray2json,du as typedarrayCtors,kl as typedarrayDataTypes,Au as typedarrayReviver,Tu as typedarraypool,Jl as zeroTo,Hl as zeroToLike,Qo as zeros,Xl as zerosLike};
//# sourceMappingURL=index.mjs.map