-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
3 lines (3 loc) · 156 KB
/
index.js
File metadata and controls
3 lines (3 loc) · 156 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("buffer")):"function"==typeof define&&define.amd?define(["buffer"],r):(t="undefined"!=typeof globalThis?globalThis:t||self).map=r(t.require$$0)}(this,(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function e(){return r&&"symbol"==typeof Symbol.toStringTag}var n=Object.prototype.toString;var i=Object.prototype.hasOwnProperty;function o(t,r){return null!=t&&i.call(t,r)}var a="function"==typeof Symbol?Symbol:void 0,f="function"==typeof a?a.toStringTag:"";var u=e()?function(t){var r,e,i;if(null==t)return n.call(t);e=t[f],r=o(t,f);try{t[f]=void 0}catch(r){return n.call(t)}return i=n.call(t),r?t[f]=e:delete t[f],i}:function(t){return n.call(t)};var s=Array.isArray?Array.isArray:function(t){return"[object Array]"===u(t)};function l(t){return"object"==typeof t&&null!==t&&!s(t)}var c=/./,h="function"==typeof Object.defineProperty?Object.defineProperty:null;var p=Object.defineProperty;function g(t){return"number"==typeof t}function d(t){var r,e="";for(r=0;r<t;r++)e+="0";return e}function y(t,r,e){var n=!1,i=r-t.length;return i<0||(function(t){return"-"===t[0]}(t)&&(n=!0,t=t.substr(1)),t=e?t+d(i):d(i)+t,n&&(t="-"+t)),t}var m=String.prototype.toLowerCase,v=String.prototype.toUpperCase;function w(t){var r,e,n;switch(t.specifier){case"b":r=2;break;case"o":r=8;break;case"x":case"X":r=16;break;default:r=10}if(e=t.arg,n=parseInt(e,10),!isFinite(n)){if(!g(e))throw new Error("invalid integer. Value: "+e);n=0}return n<0&&("u"===t.specifier||10!==r)&&(n=4294967295+n+1),n<0?(e=(-n).toString(r),t.precision&&(e=y(e,t.precision,t.padRight)),e="-"+e):(e=n.toString(r),n||t.precision?t.precision&&(e=y(e,t.precision,t.padRight)):e="",t.sign&&(e=t.sign+e)),16===r&&(t.alternate&&(e="0x"+e),e=t.specifier===v.call(t.specifier)?v.call(e):m.call(e)),8===r&&t.alternate&&"0"!==e.charAt(0)&&(e="0"+e),e}var b=Math.abs,_=String.prototype.toLowerCase,E=String.prototype.toUpperCase,T=String.prototype.replace,x=/e\+(\d)$/,V=/e-(\d)$/,O=/^(\d+)$/,j=/^(\d+)e/,A=/\.0$/,S=/\.0*e/,F=/(\..*[^0])0*e/;function I(t,r){var e,n;switch(r.specifier){case"e":case"E":n=t.toExponential(r.precision);break;case"f":case"F":n=t.toFixed(r.precision);break;case"g":case"G":b(t)<1e-4?((e=r.precision)>0&&(e-=1),n=t.toExponential(e)):n=t.toPrecision(r.precision),r.alternate||(n=T.call(n,F,"$1e"),n=T.call(n,S,"e"),n=T.call(n,A,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=T.call(n,x,"e+0$1"),n=T.call(n,V,"e-0$1"),r.alternate&&(n=T.call(n,O,"$1."),n=T.call(n,j,"$1.e")),t>=0&&r.sign&&(n=r.sign+n),n=r.specifier===E.call(r.specifier)?E.call(n):_.call(n)}function L(t){var r,e="";for(r=0;r<t;r++)e+=" ";return e}var R=String.fromCharCode,k=Array.isArray;function B(t){return t!=t}function M(t){var r={};return r.specifier=t.specifier,r.precision=void 0===t.precision?1:t.precision,r.width=t.width,r.flags=t.flags||"",r.mapping=t.mapping,r}function N(t){var r,e,n,i,o,a,f,u,s,l,c,h,p,d;if(!k(t))throw new TypeError("invalid argument. First argument must be an array. Value: `"+t+"`.");for(a="",f=1,s=0;s<t.length;s++)if(n=t[s],"string"==typeof n)a+=n;else{if(r=void 0!==n.precision,!(n=M(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(f=n.mapping),e=n.flags,l=0;l<e.length;l++)switch(i=e.charAt(l)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=e.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===n.width){if(n.width=parseInt(arguments[f],10),f+=1,B(n.width))throw new TypeError("the argument for * width at position "+f+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(r&&"*"===n.precision){if(n.precision=parseInt(arguments[f],10),f+=1,B(n.precision))throw new TypeError("the argument for * precision at position "+f+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,r=!1)}switch(n.arg=arguments[f],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":r&&(n.padZeros=!1),n.arg=w(n);break;case"s":n.maxWidth=r?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!B(n.arg)){if((o=parseInt(n.arg,10))<0||o>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=B(o)?String(n.arg):R(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(r||(n.precision=6),u=parseFloat(n.arg),!isFinite(u)){if(!g(n.arg))throw new Error("invalid floating-point number. Value: "+a);u=n.arg,n.padZeros=!1}n.arg=I(u,n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=y(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,h=n.width,p=n.padRight,d=void 0,(d=h-c.length)<0?c:c=p?c+L(d):L(d)+c)),a+=n.arg||"",f+=1}return a}var U=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function C(t){var r={mapping:t[1]?parseInt(t[1],10):void 0,flags:t[2],width:t[3],precision:t[5],specifier:t[6]};return"."===t[4]&&void 0===t[5]&&(r.precision="1"),r}function P(t){var r,e,n,i;for(e=[],i=0,n=U.exec(t);n;)(r=t.slice(i,U.lastIndex-n[0].length)).length&&e.push(r),"%"===n[6]?e.push("%"):e.push(C(n)),i=U.lastIndex,n=U.exec(t);return(r=t.slice(i)).length&&e.push(r),e}function Y(t){var r,e;if("string"!=typeof t)throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));for(r=[P(t)],e=1;e<arguments.length;e++)r.push(arguments[e]);return N.apply(null,r)}var D,W=Object.prototype,z=W.toString,G=W.__defineGetter__,$=W.__defineSetter__,J=W.__lookupGetter__,Z=W.__lookupSetter__;D=function(){try{return h({},"x",{}),!0}catch(t){return!1}}()?p:function(t,r,e){var n,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===z.call(t))throw new TypeError(Y("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof e||null===e||"[object Array]"===z.call(e))throw new TypeError(Y("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(J.call(t,r)||Z.call(t,r)?(n=t.__proto__,t.__proto__=W,delete t[r],t[r]=e.value,t.__proto__=n):t[r]=e.value),o="get"in e,a="set"in e,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&G&&G.call(t,r,e.get),a&&$&&$.call(t,r,e.set),t};var q=D;function K(t,r,e){q(t,r,{configurable:!1,enumerable:!1,writable:!1,value:e})}function X(t){return"boolean"==typeof t}var H=Boolean,Q=Boolean.prototype.toString;var tt=e();function rt(t){return"object"==typeof t&&(t instanceof H||(tt?function(t){try{return Q.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===u(t)))}function et(t){return X(t)||rt(t)}K(et,"isPrimitive",X),K(et,"isObject",rt);var nt="object"==typeof self?self:null,it="object"==typeof window?window:null,ot="object"==typeof global?global:null,at="object"==typeof globalThis?globalThis:null;function ft(t){if(arguments.length){if(!X(t))throw new TypeError(Y("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(at)return at;if(nt)return nt;if(it)return it;if(ot)return ot;throw new Error("unexpected error. Unable to resolve global object.")}var ut=ft(),st=ut.document&&ut.document.childNodes,lt=Int8Array;function ct(){return/^\s*function\s*([^(]*)/i}var ht=/^\s*function\s*([^(]*)/i;function pt(t){if("function"!=typeof t)throw new TypeError(Y("invalid argument. Must provide a function. Value: `%s`.",t));return function(r){var e,n;if(!s(r))return!1;if(0===(e=r.length))return!1;for(n=0;n<e;n++)if(!1===t(r[n]))return!1;return!0}}function gt(t){return null!==t&&"object"==typeof t}function dt(t){return gt(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function yt(t){var r,e,n;if(("Object"===(e=u(t).slice(8,-1))||"Error"===e)&&t.constructor){if("string"==typeof(n=t.constructor).name)return n.name;if(r=ht.exec(n.toString()))return r[1]}return dt(t)?"Buffer":e}K(ct,"REGEXP",ht),K(gt,"isObjectLikeArray",pt(gt));var mt="function"==typeof c||"object"==typeof lt||"function"==typeof st?function(t){return yt(t).toLowerCase()}:function(t){var r;return null===t?"null":"object"===(r=typeof t)?yt(t).toLowerCase():r};function vt(t){return"function"===mt(t)}var wt,bt=Object,_t=Object.getPrototypeOf;wt=vt(Object.getPrototypeOf)?_t:function(t){var r=function(t){return t.__proto__}(t);return r||null===r?r:"[object Function]"===u(t.constructor)?t.constructor.prototype:t instanceof bt?bt.prototype:null};var Et=wt;var Tt=Object.prototype;function xt(t){var r;return!!l(t)&&(r=function(t){return null==t?null:(t=bt(t),Et(t))}(t),!r||!o(t,"constructor")&&o(r,"constructor")&&vt(r.constructor)&&"[object Function]"===u(r.constructor)&&o(r,"isPrototypeOf")&&vt(r.isPrototypeOf)&&(r===Tt||function(t){var r;for(r in t)if(!o(t,r))return!1;return!0}(t)))}var Vt=ft();function Ot(t,r,e){q(t,r,{configurable:!1,enumerable:!1,get:e})}function jt(t){return"string"==typeof t}var At=String.prototype.valueOf;var St=e();function Ft(t){return"object"==typeof t&&(t instanceof String||(St?function(t){try{return At.call(t),!0}catch(t){return!1}}(t):"[object String]"===u(t)))}function It(t){return jt(t)||Ft(t)}function Lt(t){return"number"==typeof t}K(It,"isPrimitive",jt),K(It,"isObject",Ft);var Rt=Number,kt=Rt.prototype.toString;var Bt=e();function Mt(t){return"object"==typeof t&&(t instanceof Rt||(Bt?function(t){try{return kt.call(t),!0}catch(t){return!1}}(t):"[object Number]"===u(t)))}function Nt(t){return Lt(t)||Mt(t)}K(Nt,"isPrimitive",Lt),K(Nt,"isObject",Mt);var Ut=Number.POSITIVE_INFINITY,Ct=Rt.NEGATIVE_INFINITY,Pt=Math.floor;function Yt(t){return Pt(t)===t}function Dt(t){return t<Ut&&t>Ct&&Yt(t)}function Wt(t){return Lt(t)&&Dt(t)}function zt(t){return Mt(t)&&Dt(t.valueOf())}function Gt(t){return Wt(t)||zt(t)}function $t(t){return Wt(t)&&t>0}function Jt(t){return zt(t)&&t.valueOf()>0}function Zt(t){return $t(t)||Jt(t)}function qt(t){return Object.keys(Object(t))}K(Gt,"isPrimitive",Wt),K(Gt,"isObject",zt),K(Zt,"isPrimitive",$t),K(Zt,"isObject",Jt);var Kt,Xt=void 0!==Object.keys;function Ht(t){return"[object Arguments]"===u(t)}Kt=function(){return Ht(arguments)}();var Qt=Kt;function tr(t){return t!=t}function rr(t){return Lt(t)&&tr(t)}function er(t){return Mt(t)&&tr(t.valueOf())}function nr(t){return rr(t)||er(t)}K(nr,"isPrimitive",rr),K(nr,"isObject",er);var ir=Object.prototype.propertyIsEnumerable;var or=!ir.call("beep","0");function ar(t,r){var e;return null!=t&&(!(e=ir.call(t,r))&&or&&It(t)?!rr(r=+r)&&Wt(r)&&r>=0&&r<t.length:e)}var fr=4294967295;var ur=Qt?Ht:function(t){return null!==t&&"object"==typeof t&&!s(t)&&"number"==typeof t.length&&Yt(t.length)&&t.length>=0&&t.length<=fr&&o(t,"callee")&&!ar(t,"callee")},sr=Array.prototype.slice;var lr=ar((function(){}),"prototype"),cr=!ar({toString:null},"toString"),hr=9007199254740991;function pr(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Yt(t.length)&&t.length>=0&&t.length<=hr}function gr(t,r,e){var n,i;if(!pr(t)&&!jt(t))throw new TypeError(Y("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(0===(n=t.length))return-1;if(3===arguments.length){if(!Wt(e))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;i=e}else(i=n+e)<0&&(i=0)}else i=0;if(nr(r)){for(;i<n;i++)if(nr(t[i]))return i}else for(;i<n;i++)if(t[i]===r)return i;return-1}function dr(t){return t.constructor&&t.constructor.prototype===t}var yr=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],mr="undefined"==typeof window?void 0:window;var vr=function(){var t;if("undefined"===mt(mr))return!1;for(t in mr)try{-1===gr(yr,t)&&o(mr,t)&&null!==mr[t]&&"object"===mt(mr[t])&&dr(mr[t])}catch(t){return!0}return!1}(),wr="undefined"!=typeof window;var br,_r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];br=Xt?function(){return 2!==(qt(arguments)||"").length}(1,2)?function(t){return ur(t)?qt(sr.call(t)):qt(t)}:qt:function(t){var r,e,n,i,a,f,u;if(i=[],ur(t)){for(u=0;u<t.length;u++)i.push(u.toString());return i}if("string"==typeof t){if(t.length>0&&!o(t,"0"))for(u=0;u<t.length;u++)i.push(u.toString())}else{if(!1==(n="function"==typeof t)&&!gt(t))return i;e=lr&&n}for(a in t)e&&"prototype"===a||!o(t,a)||i.push(String(a));if(cr)for(r=function(t){if(!1===wr&&!vr)return dr(t);try{return dr(t)}catch(t){return!1}}(t),u=0;u<_r.length;u++)f=_r[u],r&&"constructor"===f||!o(t,f)||i.push(String(f));return i};var Er=br;var Tr=function(t,r){var e,n,i,a,f,u,l,c=!0;if(!gt(t))throw new TypeError(Y("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!xt(r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));if(o(r,"duplicates")&&!X(c=r.duplicates))throw new TypeError(Y("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",c))}if(n=(e=Er(t)).length,f={},c)for(l=0;l<n;l++)o(f,a=t[i=e[l]])?(u=f[a],s(u)?f[a].push(i):f[a]=[u,i]):f[a]=i;else for(l=0;l<n;l++)f[t[i=e[l]]]=i;return f}({bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},{duplicates:!1});function xr(t){var r=Tr[t];return jt(r)?r:null}var Vr={binary:1,bool:1,complex64:8,complex128:16,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32};function Or(t){var r;return jt(t)?Vr[t]||null:Lt(t)?Vr[xr(t)]||null:t&&$t(r=t.byteLength)?r:null}function jr(t){var r,e;for(r=0,e=0;e<t.length;e++)t[e]<0&&(r+=1);return 0===r?1:r===t.length?-1:0}function Ar(t){return Math.abs(t)}function Sr(t){var r,e,n,i,o,a;if(0===(e=t.length))return 0;for(r=!0,n=!0,i=Ar(t[0]),a=1;a<e;a++){if(o=Ar(t[a]),r&&o<i?r=!1:n&&o>i&&(n=!1),!n&&!r)return 0;i=o}return n&&r?3:n?1:2}var Fr="function";function Ir(t){return typeof t.get===Fr&&typeof t.set===Fr}var Lr={float64:function(t,r){return t[r]},float32:function(t,r){return t[r]},int32:function(t,r){return t[r]},int16:function(t,r){return t[r]},int8:function(t,r){return t[r]},uint32:function(t,r){return t[r]},uint16:function(t,r){return t[r]},uint8:function(t,r){return t[r]},uint8c:function(t,r){return t[r]},generic:function(t,r){return t[r]},default:function(t,r){return t[r]}};function Rr(t){var r=Lr[t];return"function"==typeof r?r:Lr.default}var kr={float64:function(t,r,e){t[r]=e},float32:function(t,r,e){t[r]=e},int32:function(t,r,e){t[r]=e},int16:function(t,r,e){t[r]=e},int8:function(t,r,e){t[r]=e},uint32:function(t,r,e){t[r]=e},uint16:function(t,r,e){t[r]=e},uint8:function(t,r,e){t[r]=e},uint8c:function(t,r,e){t[r]=e},generic:function(t,r,e){t[r]=e},default:function(t,r,e){t[r]=e}};function Br(t){var r=kr[t];return"function"==typeof r?r:kr.default}var Mr={complex128:function(t,r){return t.get(r)},complex64:function(t,r){return t.get(r)},default:function(t,r){return t.get(r)}};function Nr(t){var r=Mr[t];return"function"==typeof r?r:Mr.default}var Ur={complex128:function(t,r,e){t.set(e,r)},complex64:function(t,r,e){t.set(e,r)},default:function(t,r,e){t.set(e,r)}};function Cr(t){var r=Ur[t];return"function"==typeof r?r:Ur.default}var Pr={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"},Yr="function"==typeof Float64Array;var Dr="function"==typeof Float64Array?Float64Array:null;var Wr,zr="function"==typeof Float64Array?Float64Array:void 0;Wr=function(){var t,r,e;if("function"!=typeof Dr)return!1;try{r=new Dr([1,3.14,-3.14,NaN]),e=r,t=(Yr&&e instanceof Float64Array||"[object Float64Array]"===u(e))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}()?zr:function(){throw new Error("not implemented")};var Gr=Wr,$r="function"==typeof Float32Array;var Jr="function"==typeof Float32Array?Float32Array:null;var Zr,qr="function"==typeof Float32Array?Float32Array:void 0;Zr=function(){var t,r,e;if("function"!=typeof Jr)return!1;try{r=new Jr([1,3.14,-3.14,5e40]),e=r,t=($r&&e instanceof Float32Array||"[object Float32Array]"===u(e))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===Ut}catch(r){t=!1}return t}()?qr:function(){throw new Error("not implemented")};var Kr=Zr,Xr="function"==typeof Uint32Array;var Hr="function"==typeof Uint32Array?Uint32Array:null;var Qr,te="function"==typeof Uint32Array?Uint32Array:void 0;Qr=function(){var t,r,e;if("function"!=typeof Hr)return!1;try{r=new Hr(r=[1,3.14,-3.14,4294967296,4294967297]),e=r,t=(Xr&&e instanceof Uint32Array||"[object Uint32Array]"===u(e))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?te:function(){throw new Error("not implemented")};var re=Qr,ee="function"==typeof Int32Array;var ne="function"==typeof Int32Array?Int32Array:null;var ie,oe="function"==typeof Int32Array?Int32Array:void 0;ie=function(){var t,r,e;if("function"!=typeof ne)return!1;try{r=new ne([1,3.14,-3.14,2147483648]),e=r,t=(ee&&e instanceof Int32Array||"[object Int32Array]"===u(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){t=!1}return t}()?oe:function(){throw new Error("not implemented")};var ae=ie,fe="function"==typeof Uint16Array;var ue="function"==typeof Uint16Array?Uint16Array:null;var se,le="function"==typeof Uint16Array?Uint16Array:void 0;se=function(){var t,r,e;if("function"!=typeof ue)return!1;try{r=new ue(r=[1,3.14,-3.14,65536,65537]),e=r,t=(fe&&e instanceof Uint16Array||"[object Uint16Array]"===u(e))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?le:function(){throw new Error("not implemented")};var ce=se,he="function"==typeof Int16Array;var pe="function"==typeof Int16Array?Int16Array:null;var ge,de="function"==typeof Int16Array?Int16Array:void 0;ge=function(){var t,r,e;if("function"!=typeof pe)return!1;try{r=new pe([1,3.14,-3.14,32768]),e=r,t=(he&&e instanceof Int16Array||"[object Int16Array]"===u(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){t=!1}return t}()?de:function(){throw new Error("not implemented")};var ye=ge,me="function"==typeof Uint8Array;function ve(t){return me&&t instanceof Uint8Array||"[object Uint8Array]"===u(t)}var we="function"==typeof Uint8Array?Uint8Array:null;var be,_e="function"==typeof Uint8Array?Uint8Array:void 0;be=function(){var t,r;if("function"!=typeof we)return!1;try{t=ve(r=new we(r=[1,3.14,-3.14,256,257]))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?_e:function(){throw new Error("not implemented")};var Ee=be,Te="function"==typeof Uint8ClampedArray;var xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Ve,Oe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Ve=function(){var t,r,e;if("function"!=typeof xe)return!1;try{r=new xe([-1,0,1,3.14,4.99,255,256]),e=r,t=(Te&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===u(e))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){t=!1}return t}()?Oe:function(){throw new Error("not implemented")};var je=Ve,Ae="function"==typeof Int8Array;var Se="function"==typeof Int8Array?Int8Array:null;var Fe,Ie="function"==typeof Int8Array?Int8Array:void 0;Fe=function(){var t,r,e;if("function"!=typeof Se)return!1;try{r=new Se([1,3.14,-3.14,128]),e=r,t=(Ae&&e instanceof Int8Array||"[object Int8Array]"===u(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){t=!1}return t}()?Ie:function(){throw new Error("not implemented")};var Le=Fe;function Re(t){return Wt(t)&&t>=0}function ke(t){return zt(t)&&t.valueOf()>=0}function Be(t){return Re(t)||ke(t)}K(Be,"isPrimitive",Re),K(Be,"isObject",ke);var Me=4294967295;function Ne(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Yt(t.length)&&t.length>=0&&t.length<=Me}var Ue="function"==typeof ArrayBuffer;function Ce(t){return Ue&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===u(t)}var Pe=pt(It.isPrimitive),Ye=pt(It.isObject),De=pt(It);function We(t,r,e){q(t,r,{configurable:!1,enumerable:!0,writable:!1,value:e})}function ze(t,r){if(!(this instanceof ze))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Lt(t))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Lt(r))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return We(this,"re",t),We(this,"im",r),this}K(De,"primitives",Pe),K(De,"objects",Ye),K(ze,"name","Complex128"),K(ze,"BYTES_PER_ELEMENT",8),K(ze.prototype,"BYTES_PER_ELEMENT",8),K(ze.prototype,"byteLength",16),K(ze.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),K(ze.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var Ge="function"==typeof Math.fround?Math.fround:null,$e=new Kr(1);var Je="function"==typeof Ge?Ge:function(t){return $e[0]=t,$e[0]};function Ze(t,r){if(!(this instanceof Ze))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Lt(t))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Lt(r))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return We(this,"re",Je(t)),We(this,"im",Je(r)),this}function qe(t){return t instanceof ze||t instanceof Ze||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function Ke(t){return Yt(t/2)}K(Ze,"name","Complex64"),K(Ze,"BYTES_PER_ELEMENT",4),K(Ze.prototype,"BYTES_PER_ELEMENT",4),K(Ze.prototype,"byteLength",8),K(Ze.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),K(Ze.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var Xe=8;function He(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Xe}var Qe=16;function tn(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Qe}function rn(){return"function"==typeof a&&"symbol"==typeof a("foo")&&o(a,"iterator")&&"symbol"==typeof a.iterator}var en=rn()?Symbol.iterator:null;function nn(t){return t.re}function on(t){return t.im}function an(t,r){return new Kr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function fn(t,r){return new Gr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function un(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Ne(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!qe(n))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(nn(n),on(n))}return r}var sn=2*Kr.BYTES_PER_ELEMENT,ln=rn();function cn(t){return t instanceof gn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function hn(t){return t===gn||"Complex128Array"===t.name}function pn(t,r){return new Ze(t[r*=2],t[r+1])}function gn(){var t,r,e,n;if(r=arguments.length,!(this instanceof gn))return 0===r?new gn:1===r?new gn(arguments[0]):2===r?new gn(arguments[0],arguments[1]):new gn(arguments[0],arguments[1],arguments[2]);if(0===r)e=new Kr(0);else if(1===r)if(Re(arguments[0]))e=new Kr(2*arguments[0]);else if(pr(arguments[0]))if((n=(e=arguments[0]).length)&&s(e)&&qe(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!qe(n=r[i]))return null;t[o]=nn(n),t[o+1]=on(n),o+=2}return t}(new Kr(2*n),e),null===e){if(!Ke(n))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Kr(arguments[0])}}else{if(He(e))e=an(e,0);else if(tn(e))e=fn(e,0);else if(!Ke(n))throw new RangeError(Y("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Kr(e)}else if(Ce(arguments[0])){if(!Yt((e=arguments[0]).byteLength/sn))throw new RangeError(Y("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",sn,e.byteLength));e=new Kr(e)}else{if(!l(arguments[0]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===ln)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!vt(e[en]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!vt((e=e[en]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=un(e))instanceof Error)throw e;e=new Kr(e)}else{if(!Ce(e=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Re(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Yt(t/sn))throw new RangeError(Y("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",sn,t));if(2===r){if(!Yt((n=e.byteLength-t)/sn))throw new RangeError(Y("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",sn,n));e=new Kr(e,t)}else{if(!Re(n=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*sn>e.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*sn));e=new Kr(e,t,2*n)}}return K(this,"_buffer",e),K(this,"_length",e.length/2),this}function dn(t){return t.re}function yn(t){return t.im}function mn(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Ne(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!qe(n))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(dn(n),yn(n))}return r}K(gn,"BYTES_PER_ELEMENT",sn),K(gn,"name","Complex64Array"),K(gn,"from",(function(t){var r,e,n,i,o,a,f,u,s,c,h,p;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!hn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!vt(n=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(cn(t)){if(u=t.length,n){for(o=(i=new this(u))._buffer,p=0,h=0;h<u;h++){if(qe(c=n.call(r,t.get(h),h)))o[p]=nn(c),o[p+1]=on(c);else{if(!(Ne(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(pr(t)){if(n){for(u=t.length,f=t.get&&t.set?Nr("default"):Rr("default"),h=0;h<u;h++)if(!qe(f(t,h))){s=!0;break}if(s){if(!Ke(u))throw new RangeError(Y("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,h=0;h<u;h++)o[h]=n.call(r,f(t,h),h);return i}for(o=(i=new this(u))._buffer,p=0,h=0;h<u;h++){if(qe(c=n.call(r,f(t,h),h)))o[p]=nn(c),o[p+1]=on(c);else{if(!(Ne(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(l(t)&&ln&&vt(t[en])){if(!vt((o=t[en]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,r,e){var n,i,o,a;for(n=[],a=-1;!(i=t.next()).done;)if(a+=1,Ne(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!qe(o))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(nn(o),on(o))}return n}(o,n,r):un(o),a instanceof Error)throw a;for(o=(i=new this(u=a.length/2))._buffer,h=0;h<u;h++)o[h]=a[h];return i}throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(gn,"of",(function(){var t,r;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!hn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);return new this(t)})),K(gn.prototype,"at",(function(t){if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yt(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return pn(this._buffer,t)})),Ot(gn.prototype,"buffer",(function(){return this._buffer.buffer})),Ot(gn.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ot(gn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(gn.prototype,"BYTES_PER_ELEMENT",gn.BYTES_PER_ELEMENT),K(gn.prototype,"copyWithin",(function(t,r){if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*r):this._buffer.copyWithin(2*t,2*r,2*arguments[2]),this})),K(gn.prototype,"entries",(function(){var t,r,e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._buffer,e=this._length,o=-1,K(r={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,pn(n,o)],done:!1}})),K(r,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(r,en,(function(){return t.entries()})),r})),K(gn.prototype,"every",(function(t,r){var e,n;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(!t.call(r,pn(e,n),n,this))return!1;return!0})),K(gn.prototype,"fill",(function(t,r,e){var n,i,o,a,f,u;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Yt(e))throw new TypeError(Y("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 r=0,e=i;for(a=nn(t),f=on(t),u=r;u<e;u++)n[o=2*u]=a,n[o+1]=f;return this})),K(gn.prototype,"filter",(function(t,r){var e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=pn(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),K(gn.prototype,"find",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=pn(e,n),t.call(r,i,n,this))return i})),K(gn.prototype,"findIndex",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=pn(e,n),t.call(r,i,n,this))return n;return-1})),K(gn.prototype,"findLast",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=pn(e,n),t.call(r,i,n,this))return i})),K(gn.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=pn(e,n),t.call(r,i,n,this))return n;return-1})),K(gn.prototype,"forEach",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=pn(e,n),t.call(r,i,n,this)})),K(gn.prototype,"get",(function(t){if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Re(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return pn(this._buffer,t)})),K(gn.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=nn(t),o=on(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),K(gn.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=nn(t),o=on(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),K(gn.prototype,"join",(function(t){var r,e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!jt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));n=t}for(r=[],e=this._buffer,i=0;i<this._length;i++)r.push(pn(e,i).toString());return r.join(n)})),K(gn.prototype,"keys",(function(){var t,r,e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._length,i=-1,K(r={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),K(r,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(r,en,(function(){return t.keys()})),r})),K(gn.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(i=nn(t),o=on(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Ot(gn.prototype,"length",(function(){return this._length})),K(gn.prototype,"map",(function(t,r){var e,n,i,o,a;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(qe(a=t.call(r,pn(n,o),o,this)))e[2*o]=nn(a),e[2*o+1]=on(a);else{if(!Ne(a)||2!==a.length)throw new TypeError(Y("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})),K(gn.prototype,"reduce",(function(t,r){var e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,i=this._length,arguments.length>1)n=r,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=pn(e,0),o=1}for(;o<i;o++)n=t(n,pn(e,o),o,this);return n})),K(gn.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,i=this._length,arguments.length>1)n=r,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=pn(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,pn(e,o),o,this);return n})),K(gn.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=Pt(e/2),i=0;i<n;i++)o=e-i-1,r=t[2*i],t[2*i]=t[2*o],t[2*o]=r,r=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=r;return this})),K(gn.prototype,"set",(function(t){var r,e,n,i,o,a,f,u,s;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Re(e=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(qe(t)){if(e>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=nn(t),void(n[e+1]=on(t))}if(cn(t)){if(e+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t._buffer,s=n.byteOffset+e*sn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Kr(r.length),u=0;u<r.length;u++)i[u]=r[u];r=i}for(e*=2,s=0,u=0;u<a;u++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=2}else{if(!pr(t))throw new TypeError(Y("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",t));for(a=t.length,u=0;u<a;u++)if(!qe(t[u])){o=!0;break}if(o){if(!Ke(a))throw new RangeError(Y("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(r=t,s=n.byteOffset+e*sn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Kr(a),u=0;u<a;u++)i[u]=r[u];r=i}for(e*=2,a/=2,s=0,u=0;u<a;u++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=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++)f=t[u],n[e]=nn(f),n[e+1]=on(f),e+=2}})),K(gn.prototype,"slice",(function(t,r){var e,n,i,o,a,f,u;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,f=this._length,0===arguments.length)t=0,r=f;else{if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=f)<0&&(t=0),1===arguments.length)r=f;else{if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=f)<0&&(r=0):r>f&&(r=f)}}for(e=t<r?r-t:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)o=2*(u+t),n[2*u]=a[o],n[2*u+1]=a[o+1];return i})),K(gn.prototype,"some",(function(t,r){var e,n;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(t.call(r,pn(e,n),n,this))return!0;return!1})),K(gn.prototype,"sort",(function(t){var r,e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(pn(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=nn(r[i]),e[o+1]=on(r[i]);return this})),K(gn.prototype,"subarray",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,r=i;else{if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)r=i;else{if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return t>=i?(i=0,e=n.byteLength):t>=r?(i=0,e=n.byteOffset+t*sn):(i=r-t,e=n.byteOffset+t*sn),new this.constructor(n.buffer,e,i<0?0:i)})),K(gn.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!jt(t)&&!Pe(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)e={};else{if(!l(r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));e=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(pn(o,a).toLocaleString(n,e));return i.join(",")})),K(gn.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=new this.constructor(e),n=this._buffer,t=r._buffer,i=0;i<e;i++)o=e-i-1,t[2*i]=n[2*o],t[2*i+1]=n[2*o+1];return r})),K(gn.prototype,"toSorted",(function(t){var r,e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(pn(e,i));return r.sort(t),new gn(r)})),K(gn.prototype,"toString",(function(){var t,r,e;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],r=this._buffer,e=0;e<this._length;e++)t.push(pn(r,e).toString());return t.join(",")})),K(gn.prototype,"values",(function(){var t,r,e,n,i,o;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,e=this._length,o=-1,K(t={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:pn(i,o),done:!1}})),K(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(t,en,(function(){return r.values()})),t})),K(gn.prototype,"with",(function(t,r){var e,n,i;if(!cn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!qe(r))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=nn(r),e[2*t+1]=on(r),n}));var vn=2*Gr.BYTES_PER_ELEMENT,wn=rn();function bn(t){return t instanceof Tn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function _n(t){return t===Tn||"Complex64Array"===t.name}function En(t,r){return new ze(t[r*=2],t[r+1])}function Tn(){var t,r,e,n;if(r=arguments.length,!(this instanceof Tn))return 0===r?new Tn:1===r?new Tn(arguments[0]):2===r?new Tn(arguments[0],arguments[1]):new Tn(arguments[0],arguments[1],arguments[2]);if(0===r)e=new Gr(0);else if(1===r)if(Re(arguments[0]))e=new Gr(2*arguments[0]);else if(pr(arguments[0]))if((n=(e=arguments[0]).length)&&s(e)&&qe(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!qe(n=r[i]))return null;t[o]=dn(n),t[o+1]=yn(n),o+=2}return t}(new Gr(2*n),e),null===e){if(!Ke(n))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Gr(arguments[0])}}else{if(He(e))e=an(e,0);else if(tn(e))e=fn(e,0);else if(!Ke(n))throw new RangeError(Y("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Gr(e)}else if(Ce(arguments[0])){if(!Yt((e=arguments[0]).byteLength/vn))throw new RangeError(Y("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",vn,e.byteLength));e=new Gr(e)}else{if(!l(arguments[0]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===wn)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!vt(e[en]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!vt((e=e[en]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=mn(e))instanceof Error)throw e;e=new Gr(e)}else{if(!Ce(e=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Re(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Yt(t/vn))throw new RangeError(Y("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",vn,t));if(2===r){if(!Yt((n=e.byteLength-t)/vn))throw new RangeError(Y("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",vn,n));e=new Gr(e,t)}else{if(!Re(n=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*vn>e.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*vn));e=new Gr(e,t,2*n)}}return K(this,"_buffer",e),K(this,"_length",e.length/2),this}function xn(t){var r,e;for(r=[];!(e=t.next()).done;)r.push(H(e.value));return r}K(Tn,"BYTES_PER_ELEMENT",vn),K(Tn,"name","Complex128Array"),K(Tn,"from",(function(t){var r,e,n,i,o,a,f,u,s,c,h,p;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!_n(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!vt(n=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(bn(t)){if(u=t.length,n){for(o=(i=new this(u))._buffer,p=0,h=0;h<u;h++){if(qe(c=n.call(r,t.get(h),h)))o[p]=dn(c),o[p+1]=yn(c);else{if(!(Ne(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(pr(t)){if(n){for(u=t.length,f=t.get&&t.set?Nr("default"):Rr("default"),h=0;h<u;h++)if(!qe(f(t,h))){s=!0;break}if(s){if(!Ke(u))throw new RangeError(Y("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,h=0;h<u;h++)o[h]=n.call(r,f(t,h),h);return i}for(o=(i=new this(u))._buffer,p=0,h=0;h<u;h++){if(qe(c=n.call(r,f(t,h),h)))o[p]=dn(c),o[p+1]=yn(c);else{if(!(Ne(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(l(t)&&wn&&vt(t[en])){if(!vt((o=t[en]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,r,e){var n,i,o,a;for(n=[],a=-1;!(i=t.next()).done;)if(a+=1,Ne(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!qe(o))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(dn(o),yn(o))}return n}(o,n,r):mn(o),a instanceof Error)throw a;for(o=(i=new this(u=a.length/2))._buffer,h=0;h<u;h++)o[h]=a[h];return i}throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(Tn,"of",(function(){var t,r;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!_n(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);return new this(t)})),K(Tn.prototype,"at",(function(t){if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yt(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return En(this._buffer,t)})),Ot(Tn.prototype,"buffer",(function(){return this._buffer.buffer})),Ot(Tn.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ot(Tn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(Tn.prototype,"BYTES_PER_ELEMENT",Tn.BYTES_PER_ELEMENT),K(Tn.prototype,"copyWithin",(function(t,r){if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*r):this._buffer.copyWithin(2*t,2*r,2*arguments[2]),this})),K(Tn.prototype,"entries",(function(){var t,r,e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,t=this._buffer,n=this._length,o=-1,a=-2,K(e={},"next",(function(){var r;if(o+=1,i||o>=n)return{done:!0};return r=new ze(t[a+=2],t[a+1]),{value:[o,r],done:!1}})),K(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(e,en,(function(){return r.entries()})),e})),K(Tn.prototype,"every",(function(t,r){var e,n;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(!t.call(r,En(e,n),n,this))return!1;return!0})),K(Tn.prototype,"fill",(function(t,r,e){var n,i,o,a,f,u;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Yt(e))throw new TypeError(Y("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 r=0,e=i;for(a=dn(t),f=yn(t),u=r;u<e;u++)n[o=2*u]=a,n[o+1]=f;return this})),K(Tn.prototype,"filter",(function(t,r){var e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=En(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),K(Tn.prototype,"find",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=En(e,n),t.call(r,i,n,this))return i})),K(Tn.prototype,"findIndex",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=En(e,n),t.call(r,i,n,this))return n;return-1})),K(Tn.prototype,"findLast",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=En(e,n),t.call(r,i,n,this))return i})),K(Tn.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=En(e,n),t.call(r,i,n,this))return n;return-1})),K(Tn.prototype,"forEach",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=En(e,n),t.call(r,i,n,this)})),K(Tn.prototype,"get",(function(t){if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Re(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return En(this._buffer,t)})),Ot(Tn.prototype,"length",(function(){return this._length})),K(Tn.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=dn(t),o=yn(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),K(Tn.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=dn(t),o=yn(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),K(Tn.prototype,"join",(function(t){var r,e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!It(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));n=t}for(r=[],e=this._buffer,i=0;i<this._length;i++)r.push(En(e,i).toString());return r.join(n)})),K(Tn.prototype,"keys",(function(){var t,r,e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._length,i=-1,K(r={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),K(r,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(r,en,(function(){return t.keys()})),r})),K(Tn.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!qe(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(i=dn(t),o=yn(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),K(Tn.prototype,"map",(function(t,r){var e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(qe(a=t.call(r,En(n,o),o,this)))e[2*o]=dn(a),e[2*o+1]=yn(a);else{if(!Ne(a)||2!==a.length)throw new TypeError(Y("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})),K(Tn.prototype,"reduce",(function(t,r){var e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,i=this._length,arguments.length>1)n=r,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=En(e,0),o=1}for(;o<i;o++)n=t(n,En(e,o),o,this);return n})),K(Tn.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,i=this._length,arguments.length>1)n=r,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=En(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,En(e,o),o,this);return n})),K(Tn.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=Pt(e/2),i=0;i<n;i++)o=e-i-1,r=t[2*i],t[2*i]=t[2*o],t[2*o]=r,r=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=r;return this})),K(Tn.prototype,"set",(function(t){var r,e,n,i,o,a,f,u,s;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Re(e=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(qe(t)){if(e>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=dn(t),void(n[e+1]=yn(t))}if(bn(t)){if(e+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t._buffer,s=n.byteOffset+e*vn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Gr(r.length),u=0;u<r.length;u++)i[u]=r[u];r=i}for(e*=2,s=0,u=0;u<a;u++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=2}else{if(!pr(t))throw new TypeError(Y("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",t));for(a=t.length,u=0;u<a;u++)if(!qe(t[u])){o=!0;break}if(o){if(!Ke(a))throw new RangeError(Y("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(r=t,s=n.byteOffset+e*vn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Gr(a),u=0;u<a;u++)i[u]=r[u];r=i}for(e*=2,a/=2,s=0,u=0;u<a;u++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=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++)f=t[u],n[e]=dn(f),n[e+1]=yn(f),e+=2}})),K(Tn.prototype,"slice",(function(t,r){var e,n,i,o,a,f,u;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,f=this._length,0===arguments.length)t=0,r=f;else{if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=f)<0&&(t=0),1===arguments.length)r=f;else{if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=f)<0&&(r=0):r>f&&(r=f)}}for(e=t<r?r-t:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)o=2*(u+t),n[2*u]=a[o],n[2*u+1]=a[o+1];return i})),K(Tn.prototype,"some",(function(t,r){var e,n;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(t.call(r,En(e,n),n,this))return!0;return!1})),K(Tn.prototype,"sort",(function(t){var r,e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(En(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=dn(r[i]),e[o+1]=yn(r[i]);return this})),K(Tn.prototype,"subarray",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,r=i;else{if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)r=i;else{if(!Yt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return t>=i?(i=0,e=n.byteLength):t>=r?(i=0,e=n.byteOffset+t*vn):(i=r-t,e=n.byteOffset+t*vn),new this.constructor(n.buffer,e,i<0?0:i)})),K(Tn.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!It(t)&&!Pe(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)e={};else{if(!l(r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));e=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(En(o,a).toLocaleString(n,e));return i.join(",")})),K(Tn.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=new this.constructor(e),n=this._buffer,t=r._buffer,i=0;i<e;i++)o=e-i-1,t[2*i]=n[2*o],t[2*i+1]=n[2*o+1];return r})),K(Tn.prototype,"toSorted",(function(t){var r,e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(En(e,i));return r.sort(t),new Tn(r)})),K(Tn.prototype,"toString",(function(){var t,r,e;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],r=this._buffer,e=0;e<this._length;e++)t.push(En(r,e).toString());return t.join(",")})),K(Tn.prototype,"values",(function(){var t,r,e,n,i,o;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,e=this._length,o=-1,K(t={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:En(i,o),done:!1}})),K(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(t,en,(function(){return r.values()})),t})),K(Tn.prototype,"with",(function(t,r){var e,n,i;if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!qe(r))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=dn(r),e[2*t+1]=yn(r),n}));var Vn=Ee.BYTES_PER_ELEMENT,On=rn();function jn(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Vn}function An(t){return t===Sn}function Sn(){var t,r,e,n,i;if(r=arguments.length,!(this instanceof Sn))return 0===r?new Sn:1===r?new Sn(arguments[0]):2===r?new Sn(arguments[0],arguments[1]):new Sn(arguments[0],arguments[1],arguments[2]);if(0===r)e=new Ee(0);else if(1===r)if(Re(i=arguments[0]))e=new Ee(i);else if(pr(i))e=function(t,r){var e,n;for(e=r.length,n=0;n<e;n++)t[n]=H(r[n]);return t}(new Ee(i.length),i);else if(Ce(i))e=new Ee(i);else{if(!l(i))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===On)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!vt(i[en]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!vt((e=i[en]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new Ee(xn(e))}else{if(!Ce(e=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Re(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===r)e=new Ee(e,t);else{if(!Re(n=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Vn>e.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Vn));e=new Ee(e,t,n)}}return K(this,"_buffer",e),K(this,"_length",e.length),this}K(Sn,"BYTES_PER_ELEMENT",Vn),K(Sn,"name","BooleanArray"),K(Sn,"from",(function(t){var r,e,n,i,o,a,f,u,s;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!vt(n=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(pr(t)){if(n){for(u=t.length,f=t.get&&t.set?Nr("default"):Rr("default"),o=(i=new this(u))._buffer,s=0;s<u;s++)o[s]=H(n.call(r,f(t,s),s));return i}return new this(t)}if(l(t)&&On&&vt(t[en])){if(!vt((o=t[en]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));for(a=n?function(t,r,e){var n,i,o;for(n=[],o=-1;!(i=t.next()).done;)o+=1,n.push(H(r.call(e,i.value,o)));return n}(o,n,r):xn(o),o=(i=new this(u=a.length))._buffer,s=0;s<u;s++)o[s]=a[s];return i}throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(Sn,"of",(function(){var t,r;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);return new this(t)})),K(Sn.prototype,"at",(function(t){var r,e;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Wt(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(e=this._length,r=this._buffer,t<0&&(t+=e),!(t<0||t>=e))return H(r[t])})),Ot(Sn.prototype,"buffer",(function(){return this._buffer.buffer})),Ot(Sn.prototype,"byteLength",(function(){return this._buffer.byteLength})),Ot(Sn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(Sn.prototype,"BYTES_PER_ELEMENT",Sn.BYTES_PER_ELEMENT),K(Sn.prototype,"copyWithin",(function(t,r){if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(t,r):this._buffer.copyWithin(t,r,arguments[2]),this})),K(Sn.prototype,"entries",(function(){var t,r,e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,n=this._buffer,e=this._length,o=-1,K(r={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,H(n[o])],done:!1}})),K(r,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(r,en,(function(){return t.entries()})),r})),K(Sn.prototype,"every",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(!t.call(r,H(e[n]),n,this))return!1;return!0})),K(Sn.prototype,"fill",(function(t,r,e){var n,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Wt(e))throw new TypeError(Y("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 r=0,e=i;for(o=t?1:0,a=r;a<e;a++)n[a]=o;return this})),K(Sn.prototype,"filter",(function(t,r){var e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=H(e[i]),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),K(Sn.prototype,"find",(function(t,r){var e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=H(e[i]),t.call(r,n,i,this))return n})),K(Sn.prototype,"findIndex",(function(t,r){var e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=H(e[i]),t.call(r,n,i,this))return i;return-1})),K(Sn.prototype,"findLast",(function(t,r){var e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=H(e[i]),t.call(r,n,i,this))return n})),K(Sn.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=H(e[i]),t.call(r,n,i,this))return i;return-1})),K(Sn.prototype,"forEach",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)t.call(r,H(e[n]),n,this)})),K(Sn.prototype,"get",(function(t){if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Re(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return H(this._buffer[t])})),K(Sn.prototype,"includes",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(e=this._buffer,n=r;n<this._length;n++)if(t===H(e[n]))return!0;return!1})),K(Sn.prototype,"indexOf",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(e=this._buffer,n=r;n<this._length;n++)if(t===H(e[n]))return n;return-1})),K(Sn.prototype,"join",(function(t){var r,e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!jt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t))}else t=",";for(r=this._buffer,e=[],n=0;n<this._length;n++)r[n]?e.push("true"):e.push("false");return e.join(t)})),K(Sn.prototype,"keys",(function(){var t,r,e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,e=this._length,i=-1,K(r={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),K(r,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(r,en,(function(){return t.keys()})),r})),K(Sn.prototype,"lastIndexOf",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(e=this._buffer,n=r;n>=0;n--)if(t===H(e[n]))return n;return-1})),Ot(Sn.prototype,"length",(function(){return this._length})),K(Sn.prototype,"map",(function(t,r){var e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",t);for(i=this._buffer,e=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)e[o]=H(t.call(r,H(i[o]),o,this));return n})),K(Sn.prototype,"reduce",(function(t,r){var e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,n=this._length,arguments.length>1)i=r,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=H(e[0]),o=1}for(;o<n;o++)i=t(i,H(e[o]),o,this);return i})),K(Sn.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(e=this._buffer,n=this._length,arguments.length>1)i=r,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=H(e[n-1]),o=n-2}for(;o>=0;o--)i=t(i,H(e[o]),o,this);return i})),K(Sn.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,e=this._length,n=Pt(e/2),i=0;i<n;i++)o=e-i-1,r=t[i],t[i]=t[o],t[o]=r;return this})),K(Sn.prototype,"set",(function(t){var r,e,n,i,o,a,f;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!Re(e=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(pr(t)){if(e+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=jn(t)?t._buffer:t,f=n.byteOffset+e*Vn,r.buffer===n.buffer&&r.byteOffset<f&&r.byteOffset+r.byteLength>f){for(i=new Ee(r.length),a=0;a<r.length;a++)i[a]=r[a];r=i}for(a=0;a<o;e++,a++)n[e]=r[a]?1:0}else{if(e>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=t?1:0}})),K(Sn.prototype,"slice",(function(t,r){var e,n,i,o,a,f;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)t=0,r=a;else{if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=a)<0&&(t=0),1===arguments.length)r=a;else{if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=a)<0&&(r=0):r>a&&(r=a)}}for(e=t<r?r-t:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)n[f]=o[f+t];return i})),K(Sn.prototype,"some",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(t.call(r,H(e[n]),n,this))return!0;return!1})),K(Sn.prototype,"sort",(function(t){var r;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,0===arguments.length)return r.sort(),this;if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(H(r),H(e))})),this})),K(Sn.prototype,"subarray",(function(t,r){var e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,r=i;else{if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)r=i;else{if(!Wt(r))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return t>=i?(i=0,e=n.byteLength):t>=r?(i=0,e=n.byteOffset+t*Vn):(i=r-t,e=n.byteOffset+t*Vn),new this.constructor(n.buffer,e,i<0?0:i)})),K(Sn.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!jt(t)&&!Pe(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)e={};else{if(!l(r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));e=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(H(o[a]).toLocaleString(n,e));return i.join(",")})),K(Sn.prototype,"toReversed",(function(){var t,r,e,n,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,r=new this.constructor(e),n=this._buffer,t=r._buffer,i=0;i<e;i++)t[i]=n[e-i-1];return r})),K(Sn.prototype,"toSorted",(function(t){var r,e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),i=this._buffer,r=e._buffer,o=0;o<n;o++)r[o]=i[o];if(0===arguments.length)return r.sort(),e;if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(H(r),H(e))})),e})),K(Sn.prototype,"toString",(function(){var t,r,e;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],r=this._buffer,e=0;e<this._length;e++)r[e]?t.push("true"):t.push("false");return t.join(",")})),K(Sn.prototype,"values",(function(){var t,r,e,n,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,i=this._buffer,e=this._length,o=-1,K(t={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:H(i[o]),done:!1}})),K(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),en&&K(t,en,(function(){return r.values()})),t})),K(Sn.prototype,"with",(function(t,r){var e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(n=this._length,t<0&&(t+=n),t<0||t>=n)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!X(r))throw new TypeError(Y("invalid argument. Second argument must be a boolean. Value: `%s`.",r));return(e=new this.constructor(this._buffer))._buffer[t]=r?1:0,e}));var Fn=[Gr,Kr,ae,re,ye,ce,Le,Ee,je,gn,Tn,Sn],In=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Ln=In.length;function Rn(t){var r;if(s(t))return"generic";if(dt(t))return null;for(r=0;r<Ln;r++)if(t instanceof Fn[r])return In[r];return Pr[yt(t)]||null}function kn(t){var r=Rn(t);return Ir(t)?{data:t,dtype:r,accessorProtocol:!0,accessors:[Nr(r),Cr(r)]}:{data:t,dtype:r,accessorProtocol:!1,accessors:[Rr(r),Br(r)]}}var Bn=Array.prototype.slice;function Mn(t,r,e){var n;return function(t,r){return"function"==typeof t[r]}(t,"slice")?t.slice(r,e):(n=kn(t)).accessorProtocol?function(t,r,e){var n,i,o,a;for(n=t.data,i=t.accessors[0],o=[],a=r;a<e;a++)o.push(i(n,a));return o}(n,r,e):function(t,r,e){return Bn.call(t,r,e)}(t,r,e)}function Nn(t,r){return r&&(2===t||3===t)}function Un(t,r){return r&&(1===t||3===t)}function Cn(t,r,e){var n,i,o,a,f;for(n=t.length,i=e,o=e,f=0;f<n;f++){if(0===t[f])return[e,e];(a=r[f])>0?o+=a*(t[f]-1):a<0&&(i+=a*(t[f]-1))}return[i,o]}function Pn(t){return"column-major"===t}K(Cn,"assign",(function(t,r,e,n){var i,o,a,f,u;for(i=t.length,o=e,a=e,u=0;u<i;u++){if(0===t[u])return n[0]=e,n[1]=e,n;(f=r[u])>0?a+=f*(t[u]-1):f<0&&(o+=f*(t[u]-1))}return n[0]=o,n[1]=a,n}));var Yn=/[-\/\\^$*+?.()|[\]{}]/g;var Dn=RegExp.prototype.exec;var Wn=e();function zn(t){return"object"==typeof t&&(t instanceof RegExp||(Wn?function(t){try{return Dn.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===u(t)))}function Gn(t,r,e){return t.replace(r,e)}function $n(t,r,e){if(!jt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));if(jt(r))r=new RegExp(function(t){var r,e;if(!jt(t))throw new TypeError(Y("invalid argument. Must provide a regular expression string. Value: `%s`.",t));if("/"===t[0])for(e=t.length-1;e>=0&&"/"!==t[e];e--);return void 0===e||e<=0?t.replace(Yn,"\\$&"):(r=(r=t.substring(1,e)).replace(Yn,"\\$&"),t=t[0]+r+t.substring(e))}(r),"g");else if(!zn(r))throw new TypeError(Y("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",r));if(!jt(e)&&!vt(e))throw new TypeError(Y("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return Gn(t,r,e)}var Jn={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )",bool:"new BooleanArray( [ {{data}} ] )"};var Zn,qn={uint16:ce,uint8:Ee};(Zn=new qn.uint16(1))[0]=4660;var Kn=52===new qn.uint8(Zn.buffer)[0],Xn="function"==typeof ArrayBuffer?ArrayBuffer:null;var Hn,Qn="function"==typeof ArrayBuffer?ArrayBuffer:void 0;Hn=function(){var t,r,e;if("function"!=typeof Xn)return!1;try{(t=Ce(e=new Xn(16))&&"function"==typeof Xn.isView)&&((r=new Gr(e))[0]=-3.14,r[1]=NaN,t=t&&Xn.isView(r)&&16===e.byteLength&&-3.14===r[0]&&r[1]!=r[1])}catch(r){t=!1}return t}()?Qn:function(){throw new Error("not implemented")};var ti=Hn,ri="function"==typeof DataView;var ei="function"==typeof DataView?DataView:null;var ni,ii="function"==typeof DataView?DataView:void 0;ni=function(){var t,r,e,n;if("function"!=typeof ei)return!1;try{e=new ti(24),r=new ei(e,8),n=r,(t=(ri&&n instanceof DataView||"[object DataView]"===u(n))&&"function"==typeof r.getFloat64&&"function"==typeof r.setFloat64)&&(r.setFloat64(0,-3.14),r.setFloat64(8,NaN),t=t&&r.buffer===e&&16===r.byteLength&&8===r.byteOffset&&-3.14===r.getFloat64(0)&&r.getFloat64(8)!=r.getFloat64(8))}catch(r){t=!1}return t}()?ii:function(){throw new Error("not implemented")};var oi=ni,ai="function"==typeof BigInt?BigInt:void 0,fi=["row-major","column-major"];function ui(){return fi.slice()}var si=["row-major","column-major"];function li(){return{"row-major":101,"column-major":102}}K((function(){return si.slice()}),"enum",li);var ci={"row-major":101,"column-major":102};function hi(){return{"row-major":ci["row-major"],"column-major":ci["column-major"]}}K(ui,"enum",hi);var pi=["throw","normalize","clamp","wrap"];function gi(){return pi.slice()}function di(){return{throw:1,clamp:2,wrap:3,normalize:4}}K(gi,"enum",di);var yi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},mi=hi(),vi={throw:1,clamp:2,wrap:3,normalize:4};var wi=4294967295,bi=4294967296,_i=new Ee(8),Ei=new oi(_i.buffer);function Ti(t,r,e,n){var i,o,a;if(0===t){for(a=0;a<_i.length;a++)r[n]=0,n+=e;return r}for(o=(t&wi)>>>0,i=Pt(t/bi),Kn?(Ei.setUint32(0,o,Kn),Ei.setUint32(4,i,Kn)):(Ei.setUint32(0,i,Kn),Ei.setUint32(4,o,Kn)),a=0;a<_i.length;a++)r[n]=_i[a],n+=e;return r}K((function(t){var r,e,n,i;return r=new Ee(8),0===t||(i=(4294967295&t)>>>0,n=Pt(t/4294967296),e=new oi(r.buffer),Kn?(e.setUint32(0,i,Kn),e.setUint32(4,n,Kn)):(e.setUint32(0,n,Kn),e.setUint32(4,i,Kn))),r}),"assign",Ti);var xi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},Vi=hi(),Oi={throw:1,clamp:2,wrap:3,normalize:4};function ji(t,r,e,n,i,o){var a,f,u,s,l;if(!(this instanceof ji))return new ji(t,r,e,n,i,o);for(s=1,l=0;l<e.length;l++)s*=e[l];return f=r.BYTES_PER_ELEMENT?r.BYTES_PER_ELEMENT*s:null,this._byteLength=f,this._bytesPerElement=Or(t),this._buffer=r,this._dtype=t,this._length=s,this._ndims=e.length,this._offset=i,this._order=o,this._shape=e,this._strides=n,this._accessors=H(r.get&&r.set),this._iterationOrder=jr(n),a=function(t,r,e,n,i){var o;return 0!==t&&0!==i&&t===(o=Cn(r,e,n))[1]-o[0]+1}(s,e,n,i,this._iterationOrder),u=Sr(n),this._flags={ROW_MAJOR_CONTIGUOUS:Un(u,a),COLUMN_MAJOR_CONTIGUOUS:Nn(u,a),READONLY:!1},this.__meta_dataview__=null,this}function Ai(t){return t instanceof ji||null!==t&&"object"==typeof t&&"object"==typeof t.data&&"object"==typeof t.shape&&"object"==typeof t.strides&&"number"==typeof t.offset&&"string"==typeof t.order&&"number"==typeof t.ndims&&t.dtype&&"number"==typeof t.length&&"object"==typeof t.flags&&"function"==typeof t.get&&"function"==typeof t.set}function Si(t){if("function"!=typeof t)throw new TypeError(Y("invalid argument. Must provide a function. Value: `%s`.",t));return function(r){var e,n;if(!function(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length&&Yt(t.length)&&t.length>=0&&t.length<=Me}(r))return!1;if(0===(e=r.length))return!1;for(n=0;n<e;n++)if(!1===t(r[n]))return!1;return!0}}K(ji,"name","ndarray"),Ot(ji.prototype,"byteLength",(function(){return this._byteLength})),Ot(ji.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),Ot(ji.prototype,"data",(function(){return this._buffer})),Ot(ji.prototype,"dtype",(function(){return this._dtype})),Ot(ji.prototype,"flags",(function(){return{ROW_MAJOR_CONTIGUOUS:(t=this._flags).ROW_MAJOR_CONTIGUOUS,COLUMN_MAJOR_CONTIGUOUS:t.COLUMN_MAJOR_CONTIGUOUS,READONLY:t.READONLY};var t})),Ot(ji.prototype,"length",(function(){return this._length})),Ot(ji.prototype,"ndims",(function(){return this._ndims})),Ot(ji.prototype,"offset",(function(){return this._offset})),Ot(ji.prototype,"order",(function(){return this._order})),Ot(ji.prototype,"shape",(function(){return Mn(this._shape,0,this._shape.length)})),Ot(ji.prototype,"strides",(function(){return Mn(this._strides,0,this._strides.length)})),K(ji.prototype,"get",(function(){var t,r;for(t=this._offset,r=0;r<arguments.length;r++)t+=this._strides[r]*arguments[r];return this._accessors?this._buffer.get(t):this._buffer[t]})),K(ji.prototype,"iget",(function(t){var r,e,n,i,o,a;if(0===(n=this._ndims))return this._accessors?this._buffer.get(this._offset):this._buffer[this._offset];if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.get(this._offset+t):this._buffer[this._offset+t];if(-1===this._iterationOrder)return this._accessors?this._buffer.get(this.offset-t):this._buffer[this._offset-t]}if(e=this._shape,r=this._strides,i=this._offset,Pn(this._order)){for(a=0;a<n;a++)t-=o=t%e[a],t/=e[a],i+=o*r[a];return this._accessors?this._buffer.get(i):this._buffer[i]}for(a=n-1;a>=0;a--)t-=o=t%e[a],t/=e[a],i+=o*r[a];return this._accessors?this._buffer.get(i):this._buffer[i]})),K(ji.prototype,"set",(function(){var t,r;for(t=this._offset,r=0;r<arguments.length-1;r++)t+=this._strides[r]*arguments[r];return this._accessors?this._buffer.set(arguments[r],t):this._buffer[t]=arguments[r],this})),K(ji.prototype,"iset",(function(t,r){var e,n,i,o,a,f;if(0===(i=this._ndims))return this._accessors?this._buffer.set(t,this._offset):this._buffer[this._offset]=t,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.set(r,this._offset+t):this._buffer[this._offset+t]=r,this;if(-1===this._iterationOrder)return this._accessors?this._buffer.set(r,this._offset-t):this._buffer[this._offset-t]=r,this}if(n=this._shape,e=this._strides,o=this._offset,Pn(this._order)){for(f=0;f<i;f++)t-=a=t%n[f],t/=n[f],o+=a*e[f];return this._accessors?this._buffer.set(r,o):this._buffer[o]=r,this}for(f=i-1;f>=0;f--)t-=a=t%n[f],t/=n[f],o+=a*e[f];return this._accessors?this._buffer.set(r,o):this._buffer[o]=r,this})),K(ji.prototype,"toString",(function(){var t,r,e,n,i,o;if(r=this._shape.length,e="ndarray( '"+(n=this._dtype)+"', ",t="",this._length<=100)if("complex64"===n||"complex128"===n)for(o=0;o<this._length;o++)t+=dn(i=this.iget(o))+", "+yn(i),o<this._length-1&&(t+=", ");else for(o=0;o<this._length;o++)t+=this.iget(o),o<this._length-1&&(t+=", ");else{if("complex64"===n||"complex128"===n)for(o=0;o<3;o++)t+=dn(i=this.iget(o))+", "+yn(i),o<2&&(t+=", ");else for(o=0;o<3;o++)t+=this.iget(o),o<2&&(t+=", ");if(t+=", ..., ","complex64"===n||"complex128"===n)for(o=2;o>=0;o--)t+=dn(i=this.iget(this._length-1-o))+", "+yn(i),o>0&&(t+=", ");else for(o=2;o>=0;o--)t+=this.iget(this._length-1-o),o>0&&(t+=", ")}if(e+=$n(Jn[this.dtype],"{{data}}",t),e+=", ",e+=0===r?"[]":"[ "+this._shape.join(", ")+" ]",e+=", ",e+="[ ",0===r)e+="0";else for(o=0;o<r;o++)this._strides[o]<0?e+=-this._strides[o]:e+=this._strides[o],o<r-1&&(e+=", ");return e+=" ]",e+=", ",e+="0",e+=", ",e+="'"+this._order+"'",e+=" )"})),K(ji.prototype,"toJSON",(function(){var t,r,e,n;for(r=this._length,(t={}).type="ndarray",t.dtype=this.dtype,t.flags={READONLY:this._flags.READONLY},t.order=this._order,t.shape=this._shape.slice(),t.strides=this._strides.slice(),n=0;n<t.strides.length;n++)t.strides[n]<0&&(t.strides[n]*=-1);if(t.data=[],"complex64"===t.dtype||"complex128"===t.dtype)for(n=0;n<r;n++)e=this.iget(n),t.data.push(dn(e),yn(e));else for(n=0;n<r;n++)t.data.push(this.iget(n));return t})),K(ji.prototype,"valueOf",(function(){return 0===this._ndims?this.iget():this})),K(ji.prototype,"__array_meta_dataview__","function"==typeof Vt.BigInt&&"function"==typeof BigInt&&"bigint"==typeof Vt.BigInt("1")&&"bigint"==typeof BigInt("1")?function(){var t,r,e,n,i,o,a,f,u,s,l,c,h,p;if(u=this._mode||"throw",a=this._submode||[u],e=33+16*(c=this._ndims)+(h=a.length),(f=this.__meta_dataview__)&&f.byteLength===e)return f;for(f=new oi(new ti(e)),i=this._shape,o=this._strides,n=this._dtype,t=this._bytesPerElement,s=0,f.setInt8(s,Kn?1:0),s+=1,f.setInt16(s,yi[n],Kn),s+=2,f.setBigInt64(s,ai(c),Kn),l=8*c,s+=8,p=0;p<c;p++)f.setBigInt64(s,ai(i[p]),Kn),f.setBigInt64(s+l,ai(o[p]*t),Kn),s+=8;for(s+=l,f.setBigInt64(s,ai(this._offset*t),Kn),s+=8,f.setInt8(s,mi[this._order]),s+=1,f.setInt8(s,vi[u]),s+=1,f.setBigInt64(s,ai(h),Kn),s+=8,p=0;p<h;p++)f.setInt8(s,vi[a[p]]),s+=1;return r=0,r|=this._flags.READONLY?4:0,f.setInt32(s,r,Kn),this.__meta_dataview__=f,f}:function(){var t,r,e,n,i,o,a,f,u,s,l,c,h,p,g;if(s=this._mode||"throw",f=this._submode||[s],n=33+16*(h=this._ndims)+(p=f.length),(u=this.__meta_dataview__)&&u.byteLength===n)return u;for(u=new oi(new ti(n)),r=new Ee(u.buffer),o=this._shape,a=this._strides,i=this._dtype,t=this._bytesPerElement,l=0,u.setInt8(l,Kn?1:0),l+=1,u.setInt16(l,xi[i],Kn),Ti(h,r,1,l+=2),c=8*h,l+=8,g=0;g<h;g++)Ti(o[g],r,1,l),Ti(a[g]*t,r,1,l+c),l+=8;for(l+=c,Ti(this._offset*t,r,1,l),l+=8,u.setInt8(l,Vi[this._order]),l+=1,u.setInt8(l,Oi[s]),Ti(p,r,1,l+=1),l+=8,g=0;g<p;g++)u.setInt8(l,Oi[f[g]]),l+=1;return e=0,e|=this._flags.READONLY?4:0,u.setInt32(l,e,Kn),this.__meta_dataview__=u,u});var Fi=Si(Be.isPrimitive),Ii=Si(Be.isObject),Li=Si(Be);function Ri(t,r){return Pn(r)?function(t){var r,e,n;for(r=[],e=1,n=0;n<t.length;n++)r.push(e),e*=t[n];return r}(t):function(t){var r,e,n,i;for(r=t.length,e=[],i=0;i<r;i++)e.push(0);for(n=1,i=r-1;i>=0;i--)e[i]=n,n*=t[i];return e}(t)}function ki(t,r){var e,n,i;for(n=t.length,e=0,i=0;i<n;i++)r[i]<0&&(e-=r[i]*(t[i]-1));return e}function Bi(t){var r,e,n;if(0===(r=t.length))return 0;for(e=1,n=0;n<r;n++)e*=t[n];return e}function Mi(t){var r,e,n;if(!pr(t))throw new TypeError(Y("invalid argument. Must provide an array-like object. Value: `%s`.",t));return n=Rn(t),Ir(t)&&(r=Nr(n)),e=t.length,void 0===r?function(r){var n;for(n=0;n<e;n++)if(t[n]===r)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(r(t,i)===n)return!0;return!1}}K(Li,"primitives",Fi),K(Li,"objects",Ii),K(Ri,"assign",(function(t,r,e){return Pn(r)?function(t,r){var e,n;for(e=1,n=0;n<t.length;n++)r[n]=e,e*=t[n];return r}(t,e):function(t,r){var e,n;for(e=1,n=t.length-1;n>=0;n--)r[n]=e,e*=t[n];return r}(t,e)})),K((function(t,r){var e,n,i,o;for(i=Rn(t),n=Ir(t)?Nr(i):Rr(i),e=t.length,o=0;o<e;o++)if(n(t,o)===r)return!0;return!1}),"factory",Mi);var Ni={all:["binary","bool","complex32","complex64","complex128","float16","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex32","complex64","complex128","float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex32","complex64","complex128","float16","float32","float64"],real_floating_point:["float16","float32","float64"],complex_floating_point:["complex32","complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex32","complex64","complex128","float16","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"]},Ui=/_and_generic$/;var Ci=Mi(function(){var t,r,e;return 0===arguments.length?Ni.all.slice():(e=!1,t=arguments[0],Ui.test(t)&&"all"!==(t=Gn(t,Ui,""))&&"index"!==t&&(e=!0),r=(r=Ni[t])?r.slice():[],e&&r.length>0&&r.push("generic"),r)}());function Pi(t,r){return null!=t&&("symbol"==typeof r?r in Object(t):String(r)in Object(t))}function Yi(t){return vt(t)&&$t(t.alignment)&&$t(t.byteLength)&&vt(t.byteLengthOf)&&vt(t.byteOffsetOf)&&vt(t.bufferOf)&&vt(t.isStruct)&&vt(t.viewOf)&&o(t,"fields")&&o(t,"layout")}var Di,Wi,zi,Gi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256};function $i(t){var r=Gi[t];return Lt(r)?r:null}function Ji(t){var r=typeof t;return"string"===r?null===$i(t)?null:t:"number"===r?xr(t):"object"===r&&t?String(t):Yi(t)?t.layout:null}function Zi(t,r){var e,n,i;if(e=arguments.length,!(this instanceof Zi))return e<2?new Zi(t):new Zi(t,r);if(Ci(t))n="builtin";else{if(function(t){return t instanceof Zi||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&jt(t.char)&&jt(t.description)&&jt(t.byteOrder)&&Pi(t,"value")}(t))return new Zi(t.value,{description:t.description});if(!Yi(t))throw new TypeError(Y("invalid argument. First argument must be either a supported data type string, a struct constructor, or another data type instance. Value: `%s`.",t));n="struct"}if(e>1){if(!xt(i=r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",i));if(o(i,"description")&&!jt(i.description))throw new TypeError(Y("invalid option. `%s` option must be a string. Option: `%s`.","description",i.description))}else i={};return K(this,"_value",t),K(this,"_description",i.description||function(t){return 0===arguments.length?{binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}:(void 0===Di&&(Di={binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}),Di[Ji(t)]||null)}(t)||""),K(this,"_char",function(t){return 0===arguments.length?{binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}:(void 0===Wi&&(Wi={binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}),Wi[Ji(t)]||null)}(t)||""),K(this,"_enum",function(t){var r=typeof t;return"number"===r?xr(t)?t:null:"string"===r?$i(t):"object"===r&&t&&Wt(t.enum)?t.enum:Yi(t)?$i("userdefined_type"):null}(t)||-1),K(this,"_alignment",function(t){var r;return 0===arguments.length?{binary:1,bool:1,complex32:2,complex64:4,complex128:8,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32}:(void 0===zi&&(zi={binary:1,bool:1,complex32:2,complex64:4,complex128:8,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32}),t?$t(r=t.alignment)?r:zi[Ji(t)]||null:null)}(t)||-1),K(this,"_byteLength",Or(t)||-1),K(this,"_byteOrder","host"),K(this,"_type",n),this}function qi(t){return vt(t)&&$t(t.alignment)&&$t(t.byteLength)&&vt(t.byteLengthOf)&&vt(t.byteOffsetOf)&&vt(t.bufferOf)&&vt(t.viewOf)||function(t){return t instanceof Zi||"object"==typeof t&&null!==t&&Wt(t.alignment)&&Wt(t.byteLength)&&jt(t.byteOrder)&&jt(t.char)&&Wt(t.enum)&&Pi(t,"value")}(t)&&qi(t.value)}function Ki(t){return Ci(t)||((r=t)instanceof Zi||"object"==typeof r&&null!==r&&Wt(r.alignment)&&Wt(r.byteLength)&&jt(r.byteOrder)&&jt(r.char)&&Wt(r.enum)&&Pi(r,"value"))||qi(t);var r}function Xi(t){var r;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Ki(r=t.dtype))return r;throw new TypeError(Y("invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.",r))}function Hi(t){var r,e,n,i;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!pr(e=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));for(r=[],i=0;i<e.length;i++){if(!Re(n=e[i]))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));r.push(n)}return r}K(Zi,"name","DataType"),Ot(Zi.prototype,"alignment",(function(){return this._alignment})),Ot(Zi.prototype,"byteLength",(function(){return this._byteLength})),Ot(Zi.prototype,"byteOrder",(function(){return this._byteOrder})),Ot(Zi.prototype,"char",(function(){return this._char})),Ot(Zi.prototype,"description",(function(){return this._description})),Ot(Zi.prototype,"enum",(function(){return this._enum})),Ot(Zi.prototype,"value",(function(){return this._value})),K(Zi.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),K(Zi.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),K(Zi.prototype,"valueOf",(function(){return this.toString()}));var Qi=Mi(ui());var to="row-major",ro="column-major";function eo(t){var r,e;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e=t.order,Qi(e)?e:(r=function(t){var r,e,n,i,o,a;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!pr(i=t.strides)){if(!pr(n=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return 0===n.length?[0]:(e=t.order,Qi(e)||(e="row-major"),Ri(n,e))}for(r=[],a=0;a<i.length;a++){if(!Wt(o=i[a]))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));r.push(o)}return r}(t),1===(e=Sr(r))||3===e?to:2===e?ro:0===function(t){var r,e;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Re(e=t.ndims))return e;if(!pr(r=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return r.length}(t)?to:null)}var no=Si(Gt.isPrimitive),io=Si(Gt.isObject),oo=Si(Gt);function ao(t){return Ci(t)||((r=t)instanceof Zi||"object"==typeof r&&null!==r&&Wt(r.alignment)&&Wt(r.byteLength)&&jt(r.byteOrder)&&jt(r.char)&&Wt(r.enum)&&Pi(r,"value"))||qi(t);var r}function fo(){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"},order:"row-major",casting:"safe",index_mode:"throw"}}K(oo,"primitives",no),K(oo,"objects",io);var uo={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"},order:"row-major",casting:"safe",index_mode:"throw"},so={"dtypes.default":uo.dtypes.default,"dtypes.numeric":uo.dtypes.numeric,"dtypes.real":uo.dtypes.real,"dtypes.floating_point":uo.dtypes.floating_point,"dtypes.real_floating_point":uo.dtypes.real_floating_point,"dtypes.complex_floating_point":uo.dtypes.complex_floating_point,"dtypes.integer":uo.dtypes.integer,"dtypes.signed_integer":uo.dtypes.signed_integer,"dtypes.unsigned_integer":uo.dtypes.unsigned_integer,"dtypes.boolean":uo.dtypes.boolean,"dtypes.index":uo.dtypes.index,"dtypes.integer_index":uo.dtypes.integer_index,"dtypes.boolean_index":uo.dtypes.boolean_index,"dtypes.mask_index":uo.dtypes.mask_index,order:uo.order,casting:uo.casting,index_mode:uo.index_mode};function lo(t){var r=typeof t;return null===t||"object"!==r&&"function"!==r?new TypeError(Y("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",t)):null}K(fo,"get",(function(t){var r=so[t];return void 0===r?null:r}));var co=Object.create;function ho(){}var po="function"==typeof co?co:function(t){return ho.prototype=t,new ho};function go(t,r){return t<0?0:t>r?r:t}function yo(t,r){var e=r+1;return t<0?((t+=e)<0&&0!==(t%=e)&&(t+=e),t):t>r?((t-=e)>r&&(t%=e),t):t}function mo(t,r){return t<0?(t+=r+1)<0?-1:t:t>r?-1:t}var vo=Mi(gi()),wo={wrap:yo,clamp:go,normalize:function(t,r){var e=mo(t,r);if(e<0||e>r)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return e},throw:function(t,r){if(t<0||t>r)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return t}};function bo(t,r,e){var n;if("clamp"===e)return go(t,r);if("wrap"===e)return yo(t,r);if(n=t,"normalize"===e&&(n=mo(n,r)),n<0||n>r)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return n}K(bo,"factory",(function(t){if(!vo(t))throw new TypeError(Y("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return wo[t]}));var _o=ji.prototype.iget;var Eo=ji.prototype.iset;function To(t,r){var e,n;for(e=[],n=0;n<r;n++)e.push(t[n]);return e}var xo=32767,Vo=fo.get("index_mode"),Oo=!1;function jo(t,r,e,n,i,a,f){var u,s,l,c,h;if(!(this instanceof jo))return arguments.length<7?new jo(t,r,e,n,i,a):new jo(t,r,e,n,i,a,f);if(!ao(t))throw new TypeError(Y("invalid argument. First argument must be a supported ndarray data type. Value: `%s`.",t));if(!pr(r))throw new TypeError(Y("invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.",r));if(r.get&&r.set&&(!vt(r.get)||!vt(r.set)))throw new TypeError(Y("invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.",r));if(!Fi(e)&&(!pr(e)||e.length>0))throw new TypeError(Y("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((u=e.length)>xo)throw new RangeError(Y("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",xo,u));if(!no(n))throw new TypeError(Y("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",n));if(u>0){if(n.length!==u)throw new RangeError(Y("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",u,n.length))}else{if(1!==n.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==n[0])throw new RangeError(Y("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Re(i))throw new TypeError(Y("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!Qi(a))throw new TypeError(Y("invalid argument. Sixth argument must be a supported order. Value: `%s`.",a));if(u>0&&!function(t,r,e,n){var i=Cn(r,e,n);return i[0]>=0&&i[1]<t}(r.length,e,n,i)&&Bi(e)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((s={}).mode=Vo,s.readonly=Oo,arguments.length>6&&(l=function(t,r){var e;if(!xt(r))return new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));if(o(r,"mode")&&(t.mode=r.mode,!vo(t.mode)))return new TypeError(Y("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(o(r,"submode")){if(t.submode=r.submode,!Ne(t.submode))return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(e=0;e<t.submode.length;e++)if(!vo(t.submode[e]))return new TypeError(Y("invalid option. Each submode must be a recognized mode. Option: `%s`.",t.submode[e]));t.submode=t.submode.slice()}return o(r,"readonly")&&(t.readonly=r.readonly,!X(t.readonly))?new TypeError(Y("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",t.readonly)):null}(s,f),l))throw l;return this._mode=s.mode,void 0===s.submode&&(s.submode=[this._mode]),this._submode=s.submode,c=To(e,u),h=To(n,u||1),ji.call(this,t,r,c,h,i,a),this._flags.READONLY=s.readonly,this}!function(t,r){var e=lo(t);if(e)throw e;if(e=lo(r))throw e;if(void 0===r.prototype)throw new TypeError(Y("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",r.prototype));t.prototype=po(r.prototype),q(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t})}(jo,ji),K(jo,"name","ndarray"),K(jo.prototype,"get",(function(){var t,r,e,n;if(arguments.length!==this._ndims)throw new RangeError(Y("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,e=this._submode.length,n=0;n<arguments.length;n++){if(!Wt(arguments[n]))throw new TypeError(Y("invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.",n,arguments[n]));r=bo(arguments[n],this._shape[n]-1,this._submode[n%e]),t+=this._strides[n]*r}return this._accessors?this._buffer.get(t):this._buffer[t]})),K(jo.prototype,"iget",(function(t){if(this._ndims>0){if(!Wt(t))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",t));return t=bo(t,this._length-1,this._mode),_o.call(this,t)}return _o.call(this)})),K(jo.prototype,"set",(function(){var t,r,e,n;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(Y("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,e=this._submode.length,n=0;n<arguments.length-1;n++){if(!Wt(arguments[n]))throw new TypeError(Y("invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.",n,arguments[n]));r=bo(arguments[n],this._shape[n]-1,this._submode[n%e]),t+=this._strides[n]*r}return this._accessors?this._buffer.set(arguments[n],t):this._buffer[t]=arguments[n],this})),K(jo.prototype,"iset",(function(t,r){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!Wt(t))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",t));t=bo(t,this._length-1,this._mode),Eo.call(this,t,r)}else Eo.call(this,t);return this}));var Ao="function"==typeof Buffer?Buffer:null;var So,Fo=t.Buffer;So=function(){var t,r;if("function"!=typeof Ao)return!1;try{t=dt(r="function"==typeof Ao.from?Ao.from([1,2,3,4]):new Ao([1,2,3,4]))&&1===r[0]&&2===r[1]&&3===r[2]&&4===r[3]}catch(r){t=!1}return t}()?Fo:function(){throw new Error("not implemented")};var Io=So;var Lo=vt(Io.allocUnsafe)?function(t){if(!Be(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return Io.allocUnsafe(t)}:function(t){if(!Be(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new Io(t)};var Ro={float64:Gr,float32:Kr,int16:ye,int32:ae,int8:Le,uint16:ce,uint32:re,uint8:Ee,uint8c:je,complex64:gn,complex128:Tn,bool:Sn};function ko(t){return function(t,r){var e,n;for(e=[],n=0;n<r;n++)e.push(t);return e}(0,t)}function Bo(){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 Mo={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"}},No={"dtypes.default":Mo.dtypes.default,"dtypes.numeric":Mo.dtypes.numeric,"dtypes.real":Mo.dtypes.real,"dtypes.floating_point":Mo.dtypes.floating_point,"dtypes.real_floating_point":Mo.dtypes.real_floating_point,"dtypes.complex_floating_point":Mo.dtypes.complex_floating_point,"dtypes.integer":Mo.dtypes.integer,"dtypes.signed_integer":Mo.dtypes.signed_integer,"dtypes.unsigned_integer":Mo.dtypes.unsigned_integer,"dtypes.boolean":Mo.dtypes.boolean,"dtypes.index":Mo.dtypes.index,"dtypes.integer_index":Mo.dtypes.integer_index,"dtypes.boolean_index":Mo.dtypes.boolean_index,"dtypes.mask_index":Mo.dtypes.mask_index};K(Bo,"get",(function(t){var r=No[t];return void 0===r?null:r}));var Uo=Bo.get("dtypes.default");var Co={float64:Gr,float32:Kr,generic:Array,int16:ye,int32:ae,int8:Le,uint16:ce,uint32:re,uint8:Ee,uint8c:je,complex64:gn,complex128:Tn,bool:Sn};var Po,Yo=Bo.get("dtypes.default");function Do(t){var r,e;if(!Re(t))throw new TypeError(Y("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",t));if("generic"===(r=arguments.length>1?arguments[1]:Yo))return ko(t);if(e=function(t){return Co[t]||null}(r),null===e)throw new TypeError(Y("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new e(t)}Po=ve(Lo(1))?function(t){var r,e,n,i,o,a;if(!Re(t))throw new TypeError(Y("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",t));if("generic"===(n=arguments.length>1?arguments[1]:Uo))return ko(t);if(null===(r=Or(n)))throw new TypeError(Y("invalid argument. Second argument must be a supported data type. Value: `%s`.",n));return i=function(t){return Ro[t]||null}(n),a=r*t,"complex128"===n&&(a+=8),e=(o=Lo(a)).byteOffset,"complex128"===n&&(Re(e/r)||(e+=8)),new i(o.buffer,e,t)}:function(t){return arguments.length>1?Do(t,arguments[1]):Do(t)};var Wo=Po;function zo(t){var r,e,n,i,a,f,u,s;if(!Ai(t))throw new TypeError(Y("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",t));if(i={},arguments.length>1){if(!xt(r=arguments[1]))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));if(e=o(r,"dtype")?r.dtype:Xi(t),o(r,"shape")){if(Lt(u=r.shape)&&(u=[u]),!Fi(u)&&("object"!=typeof(s=u)||null===s||0!==s.length))throw new TypeError(Y("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",u))}else u=Hi(t);n=o(r,"order")?r.order:eo(t),o(r,"mode")&&(i.mode=r.mode),o(r,"submode")&&(i.submode=r.submode)}else e=Xi(t),u=Hi(t),n=eo(t);return u.length>0?(a=Bi(u),f=Ri(u,n)):(a=1,f=[0]),new jo(e,"binary"===e?Lo(a):Wo(a,e),u,f,ki(u,f),n,i)}function Go(t){var r,e,n;for(e=t.length,r=[],n=0;n<e;n++)r.push(t[n]);return r}var $o="row-major";function Jo(t,r){var e,n,i;return"object"!=typeof(i=t.strides)||null===i?0===(n=t.shape).length?[0]:(jt(e=t.order)||(e=$o),Ri(n,e)):r?Go(i):i}function Zo(t){var r,e,n;return Lt(n=t.offset)?n:0===(e=t.shape).length||"object"!=typeof(r=t.strides)||null===r?0:ki(e,r)}var qo="row-major",Ko="column-major";function Xo(t){var r,e;return jt(e=t.order)?e:"object"!=typeof(r=t.strides)||null===r||1===(e=Sr(r))||3===e?qo:2===e?Ko:0===t.shape.length?qo:null}function Ho(t){var r,e,n,i;return r=function(t){return t.data}(t),n=function(t,r){var e=t.shape;return r?Go(e):e}(t,!0),i=function(t){return t.dtype}(t),e=Ir(r),{ref:t,dtype:i,data:r,length:Bi(n),shape:n,strides:Jo(t,!0),offset:Zo(t),order:Xo(t),accessorProtocol:e,accessors:e?[Nr(i),Cr(i)]:[Rr(i),Br(i)]}}function Qo(t){var r,e;if(r=[],t<=0)return r;for(e=0;e<t;e++)r.push(e);return r}function ta(t,r,e,n){var i,o,a;for(o=2*e,a=2*n,i=0;a>=0&&a<r.length;)r[a]=i,r[a+1]=0,a+=o,i+=1;return t}function ra(t,r){var e,n;for(e=[],n=0;n<r.length;n++)e.push(t[r[n]]);return e}function ea(t,r,e){var n;return n=Qo(t.length),function(t,r){var e,n,i,o,a,f,u,s,l;for(n=1,i=1,l=1;l<t.length;l++){for(e=(f=t[n])<0?-f:f,u=r[i],o=n-1,a=i-1;o>=0&&!(((s=t[o])<0?-s:s)<=e);)t[o+1]=s,r[a+1]=r[a],o-=1,a-=1;t[o+1]=f,r[a+1]=u,n+=1,i+=1}}(r=Go(r),n),{sh:t=ra(t,n),sx:r,sy:e=ra(e,n),idx:n}}K(Qo,"assign",(function(t,r,e){var n=kn(t);return n.accessorProtocol?"complex128"===n.dtype?ta(t,fn(t,0),r,e):"complex64"===n.dtype?ta(t,an(t,0),r,e):function(t,r,e){var n,i,o,a;for(n=t.data,i=t.accessors[1],a=e,o=0;a>=0&&a<n.length;)i(n,a,o),a+=r,o+=1;return n}(n,r,e):function(t,r,e){var n,i;for(i=e,n=0;i>=0&&i<t.length;)t[i]=n,i+=r,n+=1;return t}(t,r,e)}));var na={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};function ia(t,r){return function(t){var r,e,n,i;if((e=t.length)<=0)return na.BLOCK_SIZE_IN_ELEMENTS;if(null===(r=Or(t[0])))return na.BLOCK_SIZE_IN_ELEMENTS;for(i=1;i<e;i++){if(null===(n=Or(t[i])))return na.BLOCK_SIZE_IN_ELEMENTS;n>r&&(r=n)}return(n=na.BLOCK_SIZE_IN_BYTES/r|0)>0?n:1}([t,r])}function oa(t){var r;return function(t,r){return"function"==typeof t[r]}(t,"reverse")?t.reverse():(r=kn(t)).accessorProtocol?function(t){var r,e,n,i,o,a,f,u;for(r=t.data,e=t.accessors[0],n=t.accessors[1],o=Pt(r.length/2),a=r.length-1,f=0;f<o;f++)u=a-f,i=e(r,f),n(r,f,e(r,u)),n(r,u,i);return r}(r):function(t){var r,e,n,i,o;for(e=Pt(t.length/2),n=t.length-1,i=0;i<e;i++)o=n-i,r=t[i],t[i]=t[o],t[o]=r;return t}(t)}function aa(t,r,e,n,i,o){var a,f,u,s,l;for(a=t.length,f=1,l=0;l<a;l++)f*=t[l];if("clamp"===o)i<0?i=0:i>=f&&(i=f-1);else if("wrap"===o)i<0?(i+=f)<0&&0!==(i%=f)&&(i+=f):i>=f&&(i-=f)>=f&&(i%=f);else if("normalize"===o&&i<0&&(i+=f),i<0||i>=f)throw new RangeError(Y("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",f,i));if(u=e,Pn(n)){for(l=0;l<a;l++)i-=s=i%t[l],i/=t[l],u+=s*r[l];return u}for(l=a-1;l>=0;l--)i-=s=i%t[l],i/=t[l],u+=s*r[l];return u}var fa=Math.ceil;function ua(t){return t<0?fa(t):Pt(t)}function sa(t,r,e,n,i,o,a){var f,u,s,l,c;for(f=t.length,u=1,c=0;c<f;c++)u*=t[c];if("clamp"===o)i<0?i=0:i>=u&&(i=u-1);else if("wrap"===o)i<0?(i+=u)<0&&0!==(i%=u)&&(i+=u):i>=u&&(i-=u)>=u&&(i%=u);else if("normalize"===o&&i<0&&(i+=u),i<0||i>=u)throw new RangeError(Y("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(0===e){if(Pn(n)){for(c=0;c<f;c++)i-=l=i%t[c],i/=t[c],a[c]=l;return a}for(c=f-1;c>=0;c--)i-=l=i%t[c],i/=t[c],a[c]=l;return a}if(Pn(n)){for(c=f-1;c>=0;c--)(l=r[c])<0?(i-=(s=ua(i/l))*l,a[c]=t[c]-1+s):(i-=(s=ua(i/l))*l,a[c]=s);return a}for(c=0;c<f;c++)(l=r[c])<0?(i-=(s=ua(i/l))*l,a[c]=t[c]-1+s):(i-=(s=ua(i/l))*l,a[c]=s);return a}function la(t,r,e,n,i,o){return sa(t,r,e,n,i,o,ko(t.length))}K(la,"assign",sa);var ca="throw";var ha="throw";var pa=[function(t,r,e,n){r.data[r.offset]=e.call(n,t.data[t.offset],[],t.ref)},function(t,r,e,n){var i,o,a,f,u,s,l,c;for(u=t.shape[0],a=t.strides[0],f=r.strides[0],s=t.offset,l=r.offset,i=t.data,o=r.data,c=0;c<u;c++)o[l]=e.call(n,i[s],[c],t.ref),s+=a,l+=f},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b;for(h=t.shape,d=t.strides,y=r.strides,c=Qo(h.length),e?(p=h[1],g=h[0],f=d[1],u=d[0]-p*d[1],s=y[1],l=y[0]-p*y[1]):(p=h[0],g=h[1],f=d[0],u=d[1]-p*d[0],s=y[0],l=y[1]-p*d[0],c=oa(c)),m=t.offset,v=r.offset,o=t.data,a=r.data,b=0;b<g;b++){for(w=0;w<p;w++)a[v]=n.call(i,o[m],ra([b,w],c),t.ref),m+=f,v+=s;m+=u,v+=l}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x;for(g=t.shape,v=t.strides,w=r.strides,p=Qo(g.length),e?(d=g[2],y=g[1],m=g[0],f=v[2],u=v[1]-d*v[2],s=v[0]-y*v[1],l=w[2],c=w[1]-d*w[2],h=w[0]-y*w[1]):(d=g[0],y=g[1],m=g[2],f=v[0],u=v[1]-d*v[0],s=v[2]-y*v[1],l=w[0],c=w[1]-d*w[0],h=w[2]-y*w[1],p=oa(p)),b=t.offset,_=r.offset,o=t.data,a=r.data,x=0;x<m;x++){for(T=0;T<y;T++){for(E=0;E<d;E++)a[_]=n.call(i,o[b],ra([x,T,E],p),t.ref),b+=f,_+=l;b+=u,_+=c}b+=s,_+=h}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A;for(y=t.shape,_=t.strides,E=r.strides,d=Qo(y.length),e?(m=y[3],v=y[2],w=y[1],b=y[0],f=_[3],u=_[2]-m*_[3],s=_[1]-v*_[2],l=_[0]-w*_[1],c=E[3],h=E[2]-m*E[3],p=E[1]-v*E[2],g=E[0]-w*E[1]):(m=y[0],v=y[1],w=y[2],b=y[3],f=_[0],u=_[1]-m*_[0],s=_[2]-v*_[1],l=_[3]-w*_[2],c=E[0],h=E[1]-m*E[0],p=E[2]-v*E[1],g=E[3]-w*E[2],d=oa(d)),T=t.offset,x=r.offset,o=t.data,a=r.data,A=0;A<b;A++){for(j=0;j<w;j++){for(O=0;O<v;O++){for(V=0;V<m;V++)a[x]=n.call(i,o[T],ra([A,j,O,V],d),t.ref),T+=f,x+=c;T+=u,x+=h}T+=s,x+=p}T+=l,x+=g}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L;for(v=t.shape,x=t.strides,V=r.strides,m=Qo(v.length),e?(w=v[4],b=v[3],_=v[2],E=v[1],T=v[0],f=x[4],u=x[3]-w*x[4],s=x[2]-b*x[3],l=x[1]-_*x[2],c=x[0]-E*x[1],h=V[4],p=V[3]-w*V[4],g=V[2]-b*V[3],d=V[1]-_*V[2],y=V[0]-E*V[1]):(w=v[0],b=v[1],_=v[2],E=v[3],T=v[4],f=x[0],u=x[1]-w*x[0],s=x[2]-b*x[1],l=x[3]-_*x[2],c=x[4]-E*x[3],h=V[0],p=V[1]-w*V[0],g=V[2]-b*V[1],d=V[3]-_*V[2],y=V[4]-E*V[3],m=oa(m)),O=t.offset,j=r.offset,o=t.data,a=r.data,L=0;L<T;L++){for(I=0;I<E;I++){for(F=0;F<_;F++){for(S=0;S<b;S++){for(A=0;A<w;A++)a[j]=n.call(i,o[O],ra([L,I,F,S,A],m),t.ref),O+=f,j+=h;O+=u,j+=p}O+=s,j+=g}O+=l,j+=d}O+=c,j+=y}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M;for(b=t.shape,j=t.strides,A=r.strides,w=Qo(b.length),e?(_=b[5],E=b[4],T=b[3],x=b[2],V=b[1],O=b[0],f=j[5],u=j[4]-_*j[5],s=j[3]-E*j[4],l=j[2]-T*j[3],c=j[1]-x*j[2],h=j[0]-V*j[1],p=A[5],g=A[4]-_*A[5],d=A[3]-E*A[4],y=A[2]-T*A[3],m=A[1]-x*A[2],v=A[0]-V*A[1]):(_=b[0],E=b[1],T=b[2],x=b[3],V=b[4],O=b[5],f=j[0],u=j[1]-_*j[0],s=j[2]-E*j[1],l=j[3]-T*j[2],c=j[4]-x*j[3],h=j[5]-V*j[4],p=A[0],g=A[1]-_*A[0],d=A[2]-E*A[1],y=A[3]-T*A[2],m=A[4]-x*A[3],v=A[5]-V*A[4],w=oa(w)),S=t.offset,F=r.offset,o=t.data,a=r.data,M=0;M<O;M++){for(B=0;B<V;B++){for(k=0;k<x;k++){for(R=0;R<T;R++){for(L=0;L<E;L++){for(I=0;I<_;I++)a[F]=n.call(i,o[S],ra([M,B,k,R,L,I],w),t.ref),S+=f,F+=p;S+=u,F+=g}S+=s,F+=d}S+=l,F+=y}S+=c,F+=m}S+=h,F+=v}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P;for(E=t.shape,F=t.strides,I=r.strides,_=Qo(E.length),e?(T=E[6],x=E[5],V=E[4],O=E[3],j=E[2],A=E[1],S=E[0],f=F[6],u=F[5]-T*F[6],s=F[4]-x*F[5],l=F[3]-V*F[4],c=F[2]-O*F[3],h=F[1]-j*F[2],p=F[0]-A*F[1],g=I[6],d=I[5]-T*I[6],y=I[4]-x*I[5],m=I[3]-V*I[4],v=I[2]-O*I[3],w=I[1]-j*I[2],b=I[0]-A*I[1]):(T=E[0],x=E[1],V=E[2],O=E[3],j=E[4],A=E[5],S=E[6],f=F[0],u=F[1]-T*F[0],s=F[2]-x*F[1],l=F[3]-V*F[2],c=F[4]-O*F[3],h=F[5]-j*F[4],p=F[6]-A*F[5],g=I[0],d=I[1]-T*I[0],y=I[2]-x*I[1],m=I[3]-V*I[2],v=I[4]-O*I[3],w=I[5]-j*I[4],b=I[6]-A*I[5],_=oa(_)),L=t.offset,R=r.offset,o=t.data,a=r.data,P=0;P<S;P++){for(C=0;C<A;C++){for(U=0;U<j;U++){for(N=0;N<O;N++){for(M=0;M<V;M++){for(B=0;B<x;B++){for(k=0;k<T;k++)a[R]=n.call(i,o[L],ra([P,C,U,N,M,B,k],_),t.ref),L+=f,R+=g;L+=u,R+=d}L+=s,R+=y}L+=l,R+=m}L+=c,R+=v}L+=h,R+=w}L+=p,R+=b}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z;for(x=t.shape,R=t.strides,k=r.strides,T=Qo(x.length),e?(V=x[7],O=x[6],j=x[5],A=x[4],S=x[3],F=x[2],I=x[1],L=x[0],f=R[7],u=R[6]-V*R[7],s=R[5]-O*R[6],l=R[4]-j*R[5],c=R[3]-A*R[4],h=R[2]-S*R[3],p=R[1]-F*R[2],g=R[0]-I*R[1],d=k[7],y=k[6]-V*k[7],m=k[5]-O*k[6],v=k[4]-j*k[5],w=k[3]-A*k[4],b=k[2]-S*k[3],_=k[1]-F*k[2],E=k[0]-I*k[1]):(V=x[0],O=x[1],j=x[2],A=x[3],S=x[4],F=x[5],I=x[6],L=x[7],f=R[0],u=R[1]-V*R[0],s=R[2]-O*R[1],l=R[3]-j*R[2],c=R[4]-A*R[3],h=R[5]-S*R[4],p=R[6]-F*R[5],g=R[7]-I*R[6],d=k[0],y=k[1]-V*k[0],m=k[2]-O*k[1],v=k[3]-j*k[2],w=k[4]-A*k[3],b=k[5]-S*k[4],_=k[6]-F*k[5],E=k[7]-I*k[6],T=oa(T)),B=t.offset,M=r.offset,o=t.data,a=r.data,z=0;z<L;z++){for(W=0;W<I;W++){for(D=0;D<F;D++){for(Y=0;Y<S;Y++){for(P=0;P<A;P++){for(C=0;C<j;C++){for(U=0;U<O;U++){for(N=0;N<V;N++)a[M]=n.call(i,o[B],ra([z,W,D,Y,P,C,U,N],T),t.ref),B+=f,M+=d;B+=u,M+=y}B+=s,M+=m}B+=l,M+=v}B+=c,M+=w}B+=h,M+=b}B+=p,M+=_}B+=g,M+=E}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z;for(O=t.shape,M=t.strides,N=r.strides,V=Qo(O.length),e?(j=O[8],A=O[7],S=O[6],F=O[5],I=O[4],L=O[3],R=O[2],k=O[1],B=O[0],f=M[8],u=M[7]-j*M[8],s=M[6]-A*M[7],l=M[5]-S*M[6],c=M[4]-F*M[5],h=M[3]-I*M[4],p=M[2]-L*M[3],g=M[1]-R*M[2],d=M[0]-k*M[1],y=N[8],m=N[7]-j*N[8],v=N[6]-A*N[7],w=N[5]-S*N[6],b=N[4]-F*N[5],_=N[3]-I*N[4],E=N[2]-L*N[3],T=N[1]-R*N[2],x=N[0]-k*N[1]):(j=O[0],A=O[1],S=O[2],F=O[3],I=O[4],L=O[5],R=O[6],k=O[7],B=O[8],f=M[0],u=M[1]-j*M[0],s=M[2]-A*M[1],l=M[3]-S*M[2],c=M[4]-F*M[3],h=M[5]-I*M[4],p=M[6]-L*M[5],g=M[7]-R*M[6],d=M[8]-k*M[7],y=N[0],m=N[1]-j*N[0],v=N[2]-A*N[1],w=N[3]-S*N[2],b=N[4]-F*N[3],_=N[5]-I*N[4],E=N[6]-L*N[5],T=N[7]-R*N[6],x=N[8]-k*N[7],V=oa(V)),U=t.offset,C=r.offset,o=t.data,a=r.data,Z=0;Z<B;Z++){for(J=0;J<k;J++){for($=0;$<R;$++){for(G=0;G<L;G++){for(z=0;z<I;z++){for(W=0;W<F;W++){for(D=0;D<S;D++){for(Y=0;Y<A;Y++){for(P=0;P<j;P++)a[C]=n.call(i,o[U],ra([Z,J,$,G,z,W,D,Y,P],V),t.ref),U+=f,C+=y;U+=u,C+=m}U+=s,C+=v}U+=l,C+=w}U+=c,C+=b}U+=h,C+=_}U+=p,C+=E}U+=g,C+=T}U+=d,C+=x}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H;for(A=t.shape,C=t.strides,P=r.strides,j=Qo(A.length),e?(S=A[9],F=A[8],I=A[7],L=A[6],R=A[5],k=A[4],B=A[3],M=A[2],N=A[1],U=A[0],f=C[9],u=C[8]-S*C[9],s=C[7]-F*C[8],l=C[6]-I*C[7],c=C[5]-L*C[6],h=C[4]-R*C[5],p=C[3]-k*C[4],g=C[2]-B*C[3],d=C[1]-M*C[2],y=C[0]-N*C[1],m=P[9],v=P[8]-S*P[9],w=P[7]-F*P[8],b=P[6]-I*P[7],_=P[5]-L*P[6],E=P[4]-R*P[5],T=P[3]-k*P[4],x=P[2]-B*P[3],V=P[1]-M*P[2],O=P[0]-N*P[1]):(S=A[0],F=A[1],I=A[2],L=A[3],R=A[4],k=A[5],B=A[6],M=A[7],N=A[8],U=A[9],f=C[0],u=C[1]-S*C[0],s=C[2]-F*C[1],l=C[3]-I*C[2],c=C[4]-L*C[3],h=C[5]-R*C[4],p=C[6]-k*C[5],g=C[7]-B*C[6],d=C[8]-M*C[7],y=C[9]-N*C[8],m=P[0],v=P[1]-S*P[0],w=P[2]-F*P[1],b=P[3]-I*P[2],_=P[4]-L*P[3],E=P[5]-R*P[4],T=P[6]-k*P[5],x=P[7]-B*P[6],V=P[8]-M*P[7],O=P[9]-N*P[8],j=oa(j)),Y=t.offset,D=r.offset,o=t.data,a=r.data,H=0;H<U;H++){for(X=0;X<N;X++){for(K=0;K<M;K++){for(q=0;q<B;q++){for(Z=0;Z<k;Z++){for(J=0;J<R;J++){for($=0;$<L;$++){for(G=0;G<I;G++){for(z=0;z<F;z++){for(W=0;W<S;W++)a[D]=n.call(i,o[Y],ra([H,X,K,q,Z,J,$,G,z,W],j),t.ref),Y+=f,D+=m;Y+=u,D+=v}Y+=s,D+=w}Y+=l,D+=b}Y+=c,D+=_}Y+=h,D+=E}Y+=p,D+=T}Y+=g,D+=x}Y+=d,D+=V}Y+=y,D+=O}}],ga=[function(t,r,e,n){r.accessors[1](r.data,r.offset,e.call(n,t.accessors[0](t.data,t.offset),[],t.ref))},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p;for(l=t.shape[0],u=t.strides[0],s=r.strides[0],c=t.offset,h=r.offset,i=t.data,o=r.data,a=t.accessors[0],f=r.accessors[1],p=0;p<l;p++)f(o,h,e.call(n,a(i,c),[p],t.ref)),c+=u,h+=s},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E;for(g=t.shape,m=t.strides,v=r.strides,p=Qo(g.length),e?(d=g[1],y=g[0],s=m[1],l=m[0]-d*m[1],c=v[1],h=v[0]-d*v[1]):(d=g[0],y=g[1],s=m[0],l=m[1]-d*m[0],c=v[0],h=v[1]-d*m[0],p=oa(p)),w=t.offset,b=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],E=0;E<y;E++){for(_=0;_<d;_++)u(a,b,n.call(i,f(o,w),ra([E,_],p),t.ref)),w+=s,b+=c;w+=l,b+=h}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O;for(y=t.shape,b=t.strides,_=r.strides,p=Qo(y.length),e?(m=y[2],v=y[1],w=y[0],f=b[2],u=b[1]-m*b[2],s=b[0]-v*b[1],l=_[2],c=_[1]-m*_[2],h=_[0]-v*_[1]):(m=y[0],v=y[1],w=y[2],f=b[0],u=b[1]-m*b[0],s=b[2]-v*b[1],l=_[0],c=_[1]-m*_[0],h=_[2]-v*_[1],p=oa(p)),E=t.offset,T=r.offset,o=t.data,a=r.data,g=t.accessors[0],d=r.accessors[1],O=0;O<w;O++){for(V=0;V<v;V++){for(x=0;x<m;x++)d(a,T,n.call(i,g(o,E),ra([O,V,x],p),t.ref)),E+=f,T+=l;E+=u,T+=c}E+=s,T+=h}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F;for(v=t.shape,T=t.strides,x=r.strides,m=Qo(v.length),e?(w=v[3],b=v[2],_=v[1],E=v[0],s=T[3],l=T[2]-w*T[3],c=T[1]-b*T[2],h=T[0]-_*T[1],p=x[3],g=x[2]-w*x[3],d=x[1]-b*x[2],y=x[0]-_*x[1]):(w=v[0],b=v[1],_=v[2],E=v[3],s=T[0],l=T[1]-w*T[0],c=T[2]-b*T[1],h=T[3]-_*T[2],p=x[0],g=x[1]-w*x[0],d=x[2]-b*x[1],y=x[3]-_*x[2],m=oa(m)),V=t.offset,O=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],F=0;F<E;F++){for(S=0;S<_;S++){for(A=0;A<b;A++){for(j=0;j<w;j++)u(a,O,n.call(i,f(o,V),ra([F,S,A,j],m),t.ref)),V+=s,O+=p;V+=l,O+=g}V+=c,O+=d}V+=h,O+=y}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k;for(b=t.shape,O=t.strides,j=r.strides,w=Qo(b.length),e?(_=b[4],E=b[3],T=b[2],x=b[1],V=b[0],s=O[4],l=O[3]-_*O[4],c=O[2]-E*O[3],h=O[1]-T*O[2],p=O[0]-x*O[1],g=j[4],d=j[3]-_*j[4],y=j[2]-E*j[3],m=j[1]-T*j[2],v=j[0]-x*j[1]):(_=b[0],E=b[1],T=b[2],x=b[3],V=b[4],s=O[0],l=O[1]-_*O[0],c=O[2]-E*O[1],h=O[3]-T*O[2],p=O[4]-x*O[3],g=j[0],d=j[1]-_*j[0],y=j[2]-E*j[1],m=j[3]-T*j[2],v=j[4]-x*j[3],w=oa(w)),A=t.offset,S=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],k=0;k<V;k++){for(R=0;R<x;R++){for(L=0;L<T;L++){for(I=0;I<E;I++){for(F=0;F<_;F++)u(a,S,n.call(i,f(o,A),ra([k,R,L,I,F],w),t.ref)),A+=s,S+=g;A+=l,S+=d}A+=c,S+=y}A+=h,S+=m}A+=p,S+=v}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U;for(E=t.shape,S=t.strides,F=r.strides,_=Qo(E.length),e?(T=E[5],x=E[4],V=E[3],O=E[2],j=E[1],A=E[0],s=S[5],l=S[4]-T*S[5],c=S[3]-x*S[4],h=S[2]-V*S[3],p=S[1]-O*S[2],g=S[0]-j*S[1],d=F[5],y=F[4]-T*F[5],m=F[3]-x*F[4],v=F[2]-V*F[3],w=F[1]-O*F[2],b=F[0]-j*F[1]):(T=E[0],x=E[1],V=E[2],O=E[3],j=E[4],A=E[5],s=S[0],l=S[1]-T*S[0],c=S[2]-x*S[1],h=S[3]-V*S[2],p=S[4]-O*S[3],g=S[5]-j*S[4],d=F[0],y=F[1]-T*F[0],m=F[2]-x*F[1],v=F[3]-V*F[2],w=F[4]-O*F[3],b=F[5]-j*F[4],_=oa(_)),I=t.offset,L=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],U=0;U<A;U++){for(N=0;N<j;N++){for(M=0;M<O;M++){for(B=0;B<V;B++){for(k=0;k<x;k++){for(R=0;R<T;R++)u(a,L,n.call(i,f(o,I),ra([U,N,M,B,k,R],_),t.ref)),I+=s,L+=d;I+=l,L+=y}I+=c,L+=m}I+=h,L+=v}I+=p,L+=w}I+=g,L+=b}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D;for(x=t.shape,L=t.strides,R=r.strides,T=Qo(x.length),e?(V=x[6],O=x[5],j=x[4],A=x[3],S=x[2],F=x[1],I=x[0],s=L[6],l=L[5]-V*L[6],c=L[4]-O*L[5],h=L[3]-j*L[4],p=L[2]-A*L[3],g=L[1]-S*L[2],d=L[0]-F*L[1],y=R[6],m=R[5]-V*R[6],v=R[4]-O*R[5],w=R[3]-j*R[4],b=R[2]-A*R[3],_=R[1]-S*R[2],E=R[0]-F*R[1]):(V=x[0],O=x[1],j=x[2],A=x[3],S=x[4],F=x[5],I=x[6],s=L[0],l=L[1]-V*L[0],c=L[2]-O*L[1],h=L[3]-j*L[2],p=L[4]-A*L[3],g=L[5]-S*L[4],d=L[6]-F*L[5],y=R[0],m=R[1]-V*R[0],v=R[2]-O*R[1],w=R[3]-j*R[2],b=R[4]-A*R[3],_=R[5]-S*R[4],E=R[6]-F*R[5],T=oa(T)),k=t.offset,B=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],D=0;D<I;D++){for(Y=0;Y<F;Y++){for(P=0;P<S;P++){for(C=0;C<A;C++){for(U=0;U<j;U++){for(N=0;N<O;N++){for(M=0;M<V;M++)u(a,B,n.call(i,f(o,k),ra([D,Y,P,C,U,N,M],T),t.ref)),k+=s,B+=y;k+=l,B+=m}k+=c,B+=v}k+=h,B+=w}k+=p,B+=b}k+=g,B+=_}k+=d,B+=E}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$;for(O=t.shape,B=t.strides,M=r.strides,V=Qo(O.length),e?(j=O[7],A=O[6],S=O[5],F=O[4],I=O[3],L=O[2],R=O[1],k=O[0],s=B[7],l=B[6]-j*B[7],c=B[5]-A*B[6],h=B[4]-S*B[5],p=B[3]-F*B[4],g=B[2]-I*B[3],d=B[1]-L*B[2],y=B[0]-R*B[1],m=M[7],v=M[6]-j*M[7],w=M[5]-A*M[6],b=M[4]-S*M[5],_=M[3]-F*M[4],E=M[2]-I*M[3],T=M[1]-L*M[2],x=M[0]-R*M[1]):(j=O[0],A=O[1],S=O[2],F=O[3],I=O[4],L=O[5],R=O[6],k=O[7],s=B[0],l=B[1]-j*B[0],c=B[2]-A*B[1],h=B[3]-S*B[2],p=B[4]-F*B[3],g=B[5]-I*B[4],d=B[6]-L*B[5],y=B[7]-R*B[6],m=M[0],v=M[1]-j*M[0],w=M[2]-A*M[1],b=M[3]-S*M[2],_=M[4]-F*M[3],E=M[5]-I*M[4],T=M[6]-L*M[5],x=M[7]-R*M[6],V=oa(V)),N=t.offset,U=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],$=0;$<k;$++){for(G=0;G<R;G++){for(z=0;z<L;z++){for(W=0;W<I;W++){for(D=0;D<F;D++){for(Y=0;Y<S;Y++){for(P=0;P<A;P++){for(C=0;C<j;C++)u(a,U,n.call(i,f(o,N),ra([$,G,z,W,D,Y,P,C],V),t.ref)),N+=s,U+=m;N+=l,U+=v}N+=c,U+=w}N+=h,U+=b}N+=p,U+=_}N+=g,U+=E}N+=d,U+=T}N+=y,U+=x}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K;for(A=t.shape,U=t.strides,C=r.strides,j=Qo(A.length),e?(S=A[8],F=A[7],I=A[6],L=A[5],R=A[4],k=A[3],B=A[2],M=A[1],N=A[0],s=U[8],l=U[7]-S*U[8],c=U[6]-F*U[7],h=U[5]-I*U[6],p=U[4]-L*U[5],g=U[3]-R*U[4],d=U[2]-k*U[3],y=U[1]-B*U[2],m=U[0]-M*U[1],v=C[8],w=C[7]-S*C[8],b=C[6]-F*C[7],_=C[5]-I*C[6],E=C[4]-L*C[5],T=C[3]-R*C[4],x=C[2]-k*C[3],V=C[1]-B*C[2],O=C[0]-M*C[1]):(S=A[0],F=A[1],I=A[2],L=A[3],R=A[4],k=A[5],B=A[6],M=A[7],N=A[8],s=U[0],l=U[1]-S*U[0],c=U[2]-F*U[1],h=U[3]-I*U[2],p=U[4]-L*U[3],g=U[5]-R*U[4],d=U[6]-k*U[5],y=U[7]-B*U[6],m=U[8]-M*U[7],v=C[0],w=C[1]-S*C[0],b=C[2]-F*C[1],_=C[3]-I*C[2],E=C[4]-L*C[3],T=C[5]-R*C[4],x=C[6]-k*C[5],V=C[7]-B*C[6],O=C[8]-M*C[7],j=oa(j)),P=t.offset,Y=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],K=0;K<N;K++){for(q=0;q<M;q++){for(Z=0;Z<B;Z++){for(J=0;J<k;J++){for($=0;$<R;$++){for(G=0;G<L;G++){for(z=0;z<I;z++){for(W=0;W<F;W++){for(D=0;D<S;D++)u(a,Y,n.call(i,f(o,P),ra([K,q,Z,J,$,G,z,W,D],j),t.ref)),P+=s,Y+=v;P+=l,Y+=w}P+=c,Y+=b}P+=h,Y+=_}P+=p,Y+=E}P+=g,Y+=T}P+=d,Y+=x}P+=y,Y+=V}P+=m,Y+=O}},function(t,r,e,n,i){var o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt;for(F=t.shape,Y=t.strides,D=r.strides,S=Qo(F.length),e?(I=F[9],L=F[8],R=F[7],k=F[6],B=F[5],M=F[4],N=F[3],U=F[2],C=F[1],P=F[0],s=Y[9],l=Y[8]-I*Y[9],c=Y[7]-L*Y[8],h=Y[6]-R*Y[7],p=Y[5]-k*Y[6],g=Y[4]-B*Y[5],d=Y[3]-M*Y[4],y=Y[2]-N*Y[3],m=Y[1]-U*Y[2],v=Y[0]-C*Y[1],w=D[9],b=D[8]-I*D[9],_=D[7]-L*D[8],E=D[6]-R*D[7],T=D[5]-k*D[6],x=D[4]-B*D[5],V=D[3]-M*D[4],O=D[2]-N*D[3],j=D[1]-U*D[2],A=D[0]-C*D[1]):(I=F[0],L=F[1],R=F[2],k=F[3],B=F[4],M=F[5],N=F[6],U=F[7],C=F[8],P=F[9],s=Y[0],l=Y[1]-I*Y[0],c=Y[2]-L*Y[1],h=Y[3]-R*Y[2],p=Y[4]-k*Y[3],g=Y[5]-B*Y[4],d=Y[6]-M*Y[5],y=Y[7]-N*Y[6],m=Y[8]-U*Y[7],v=Y[9]-C*Y[8],w=D[0],b=D[1]-I*D[0],_=D[2]-L*D[1],E=D[3]-R*D[2],T=D[4]-k*D[3],x=D[5]-B*D[4],V=D[6]-M*D[5],O=D[7]-N*D[6],j=D[8]-U*D[7],A=D[9]-C*D[8],S=oa(S)),W=t.offset,z=r.offset,o=t.data,a=r.data,f=t.accessors[0],u=r.accessors[1],tt=0;tt<P;tt++){for(Q=0;Q<C;Q++){for(H=0;H<U;H++){for(X=0;X<N;X++){for(K=0;K<M;K++){for(q=0;q<B;q++){for(Z=0;Z<k;Z++){for(J=0;J<R;J++){for($=0;$<L;$++){for(G=0;G<I;G++)u(a,z,n.call(i,f(o,W),ra([tt,Q,H,X,K,q,Z,J,$,G],S),t.ref)),W+=s,z+=w;W+=l,z+=b}W+=c,z+=_}W+=h,z+=E}W+=p,z+=T}W+=g,z+=x}W+=d,z+=V}W+=y,z+=O}W+=m,z+=j}W+=v,z+=A}}],da=[function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j;for(g=(j=ea(t.shape,t.strides,r.strides)).sh,m=j.sx,v=j.sy,p=oa(j.idx),i=ia(t.dtype,r.dtype),w=t.offset,b=r.offset,o=t.data,a=r.data,f=m[0],s=v[0],O=g[1];O>0;)for(O<i?(y=O,O=0):(y=i,O-=i),c=w+O*m[1],h=b+O*v[1],V=g[0];V>0;)for(V<i?(d=V,V=0):(d=i,V-=i),_=c+V*m[0],E=h+V*v[0],u=m[1]-d*m[0],l=v[1]-d*v[0],x=0;x<y;x++){for(T=0;T<d;T++)a[E]=e.call(n,o[_],ra([O+x,V+T],p),t.ref),_+=f,E+=s;_+=u,E+=l}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k;for(v=(k=ea(t.shape,t.strides,r.strides)).sh,E=k.sx,T=k.sy,m=oa(k.idx),i=ia(t.dtype,r.dtype),x=t.offset,V=r.offset,o=t.data,a=r.data,f=E[0],l=T[0],R=v[2];R>0;)for(R<i?(_=R,R=0):(_=i,R-=i),g=x+R*E[2],y=V+R*T[2],L=v[1];L>0;)for(L<i?(b=L,L=0):(b=i,L-=i),s=E[2]-b*E[1],h=T[2]-b*T[1],p=g+L*E[1],d=y+L*T[1],I=v[0];I>0;)for(I<i?(w=I,I=0):(w=i,I-=i),O=p+I*E[0],j=d+I*T[0],u=E[1]-w*E[0],c=T[1]-w*T[0],F=0;F<_;F++){for(S=0;S<b;S++){for(A=0;A<w;A++)a[j]=e.call(n,o[O],ra([R+F,L+S,I+A],m),t.ref),O+=f,j+=l;O+=u,j+=c}O+=s,j+=h}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y;for(E=(Y=ea(t.shape,t.strides,r.strides)).sh,j=Y.sx,A=Y.sy,v=oa(Y.idx),i=ia(t.dtype,r.dtype),S=t.offset,F=r.offset,o=t.data,a=r.data,f=j[0],c=A[0],P=E[3];P>0;)for(P<i?(O=P,P=0):(O=i,P-=i),m=S+P*j[3],_=F+P*A[3],C=E[2];C>0;)for(C<i?(V=C,C=0):(V=i,C-=i),l=j[3]-V*j[2],g=A[3]-V*A[2],y=m+C*j[2],b=_+C*A[2],U=E[1];U>0;)for(U<i?(x=U,U=0):(x=i,U-=i),s=j[2]-x*j[1],p=A[2]-x*A[1],d=y+U*j[1],w=b+U*A[1],N=E[0];N>0;)for(N<i?(T=N,N=0):(T=i,N-=i),I=d+N*j[0],L=w+N*A[0],u=j[1]-T*j[0],h=A[1]-T*A[0],M=0;M<O;M++){for(B=0;B<V;B++){for(k=0;k<x;k++){for(R=0;R<T;R++)a[L]=e.call(n,o[I],ra([P+M,C+B,U+k,N+R],v),t.ref),I+=f,L+=c;I+=u,L+=h}I+=s,L+=p}I+=l,L+=g}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z;for(O=(Z=ea(t.shape,t.strides,r.strides)).sh,L=Z.sx,R=Z.sy,_=oa(Z.idx),i=ia(t.dtype,r.dtype),k=t.offset,B=r.offset,o=t.data,a=r.data,f=L[0],h=R[0],J=O[4];J>0;)for(J<i?(I=J,J=0):(I=i,J-=i),b=k+J*L[4],V=B+J*R[4],$=O[3];$>0;)for($<i?(F=$,$=0):(F=i,$-=i),c=L[4]-F*L[3],y=R[4]-F*R[3],w=b+$*L[3],x=V+$*R[3],G=O[2];G>0;)for(G<i?(S=G,G=0):(S=i,G-=i),l=L[3]-S*L[2],d=R[3]-S*R[2],v=w+G*L[2],T=x+G*R[2],z=O[1];z>0;)for(z<i?(A=z,z=0):(A=i,z-=i),s=L[2]-A*L[1],g=R[2]-A*R[1],m=v+z*L[1],E=T+z*R[1],W=O[0];W>0;)for(W<i?(j=W,W=0):(j=i,W-=i),M=m+W*L[0],N=E+W*R[0],u=L[1]-j*L[0],p=R[1]-j*R[0],D=0;D<I;D++){for(Y=0;Y<F;Y++){for(P=0;P<S;P++){for(C=0;C<A;C++){for(U=0;U<j;U++)a[N]=e.call(n,o[M],ra([J+D,$+Y,G+P,z+C,W+U],_),t.ref),M+=f,N+=h;M+=u,N+=p}M+=s,N+=g}M+=l,N+=d}M+=c,N+=y}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt;for(F=(rt=ea(t.shape,t.strides,r.strides)).sh,N=rt.sx,U=rt.sy,S=oa(rt.idx),i=ia(t.dtype,r.dtype),C=t.offset,P=r.offset,o=t.data,a=r.data,f=N[0],p=U[0],tt=F[5];tt>0;)for(tt<i?(M=tt,tt=0):(M=i,tt-=i),T=C+tt*N[5],A=P+tt*U[5],Q=F[4];Q>0;)for(Q<i?(B=Q,Q=0):(B=i,Q-=i),h=N[5]-B*N[4],v=U[5]-B*U[4],E=T+Q*N[4],j=A+Q*U[4],H=F[3];H>0;)for(H<i?(k=H,H=0):(k=i,H-=i),c=N[4]-k*N[3],m=U[4]-k*U[3],_=E+H*N[3],O=j+H*U[3],X=F[2];X>0;)for(X<i?(R=X,X=0):(R=i,X-=i),l=N[3]-R*N[2],y=U[3]-R*U[2],b=_+X*N[2],V=O+X*U[2],K=F[1];K>0;)for(K<i?(L=K,K=0):(L=i,K-=i),s=N[2]-L*N[1],d=U[2]-L*U[1],w=b+K*N[1],x=V+K*U[1],q=F[0];q>0;)for(q<i?(I=q,q=0):(I=i,q-=i),Y=w+q*N[0],D=x+q*U[0],u=N[1]-I*N[0],g=U[1]-I*U[0],Z=0;Z<M;Z++){for(J=0;J<B;J++){for($=0;$<k;$++){for(G=0;G<R;G++){for(z=0;z<L;z++){for(W=0;W<I;W++)a[D]=e.call(n,o[Y],ra([tt+Z,Q+J,H+$,X+G,K+z,q+W],S),t.ref),Y+=f,D+=p;Y+=u,D+=g}Y+=s,D+=d}Y+=l,D+=y}Y+=c,D+=m}Y+=h,D+=v}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut;for(k=(ut=ea(t.shape,t.strides,r.strides)).sh,D=ut.sx,W=ut.sy,R=oa(ut.idx),i=ia(t.dtype,r.dtype),z=t.offset,G=r.offset,o=t.data,a=r.data,f=D[0],g=W[0],ft=k[6];ft>0;)for(ft<i?(Y=ft,ft=0):(Y=i,ft-=i),O=z+ft*D[6],L=G+ft*W[6],at=k[5];at>0;)for(at<i?(P=at,at=0):(P=i,at-=i),p=D[6]-P*D[5],b=W[6]-P*W[5],V=O+at*D[5],I=L+at*W[5],ot=k[4];ot>0;)for(ot<i?(C=ot,ot=0):(C=i,ot-=i),h=D[5]-C*D[4],w=W[5]-C*W[4],x=V+ot*D[4],F=I+ot*W[4],it=k[3];it>0;)for(it<i?(U=it,it=0):(U=i,it-=i),c=D[4]-U*D[3],v=W[4]-U*W[3],T=x+it*D[3],S=F+it*W[3],nt=k[2];nt>0;)for(nt<i?(N=nt,nt=0):(N=i,nt-=i),l=D[3]-N*D[2],m=W[3]-N*W[2],E=T+nt*D[2],A=S+nt*W[2],et=k[1];et>0;)for(et<i?(M=et,et=0):(M=i,et-=i),s=D[2]-M*D[1],y=W[2]-M*W[1],_=E+et*D[1],j=A+et*W[1],rt=k[0];rt>0;)for(rt<i?(B=rt,rt=0):(B=i,rt-=i),$=_+rt*D[0],J=j+rt*W[0],u=D[1]-B*D[0],d=W[1]-B*W[0],tt=0;tt<Y;tt++){for(Q=0;Q<P;Q++){for(H=0;H<C;H++){for(X=0;X<U;X++){for(K=0;K<N;K++){for(q=0;q<M;q++){for(Z=0;Z<B;Z++)a[J]=e.call(n,o[$],ra([ft+tt,at+Q,ot+H,it+X,nt+K,et+q,rt+Z],R),t.ref),$+=f,J+=g;$+=u,J+=d}$+=s,J+=y}$+=l,J+=m}$+=c,J+=v}$+=h,J+=w}$+=p,J+=b}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt;for(U=(dt=ea(t.shape,t.strides,r.strides)).sh,J=dt.sx,Z=dt.sy,N=oa(dt.idx),i=ia(t.dtype,r.dtype),q=t.offset,K=r.offset,o=t.data,a=r.data,f=J[0],d=Z[0],gt=U[7];gt>0;)for(gt<i?($=gt,gt=0):($=i,gt-=i),S=q+gt*J[7],M=K+gt*Z[7],pt=U[6];pt>0;)for(pt<i?(G=pt,pt=0):(G=i,pt-=i),g=J[7]-G*J[6],E=Z[7]-G*Z[6],A=S+pt*J[6],B=M+pt*Z[6],ht=U[5];ht>0;)for(ht<i?(z=ht,ht=0):(z=i,ht-=i),p=J[6]-z*J[5],_=Z[6]-z*Z[5],j=A+ht*J[5],k=B+ht*Z[5],ct=U[4];ct>0;)for(ct<i?(W=ct,ct=0):(W=i,ct-=i),h=J[5]-W*J[4],b=Z[5]-W*Z[4],O=j+ct*J[4],R=k+ct*Z[4],lt=U[3];lt>0;)for(lt<i?(D=lt,lt=0):(D=i,lt-=i),c=J[4]-D*J[3],w=Z[4]-D*Z[3],V=O+lt*J[3],L=R+lt*Z[3],st=U[2];st>0;)for(st<i?(Y=st,st=0):(Y=i,st-=i),l=J[3]-Y*J[2],v=Z[3]-Y*Z[2],x=V+st*J[2],I=L+st*Z[2],ut=U[1];ut>0;)for(ut<i?(P=ut,ut=0):(P=i,ut-=i),s=J[2]-P*J[1],m=Z[2]-P*Z[1],T=x+ut*J[1],F=I+ut*Z[1],ft=U[0];ft>0;)for(ft<i?(C=ft,ft=0):(C=i,ft-=i),X=T+ft*J[0],H=F+ft*Z[0],u=J[1]-C*J[0],y=Z[1]-C*Z[0],at=0;at<$;at++){for(ot=0;ot<G;ot++){for(it=0;it<z;it++){for(nt=0;nt<W;nt++){for(et=0;et<D;et++){for(rt=0;rt<Y;rt++){for(tt=0;tt<P;tt++){for(Q=0;Q<C;Q++)a[H]=e.call(n,o[X],ra([gt+at,pt+ot,ht+it,ct+nt,lt+et,st+rt,ut+tt,ft+Q],N),t.ref),X+=f,H+=d;X+=u,H+=y}X+=s,H+=m}X+=l,H+=v}X+=c,H+=w}X+=h,H+=b}X+=p,H+=_}X+=g,H+=E}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt,yt,mt,vt,wt,bt,_t,Et;for(D=(Et=ea(t.shape,t.strides,r.strides)).sh,H=Et.sx,Q=Et.sy,Y=oa(Et.idx),i=ia(t.dtype,r.dtype),tt=t.offset,rt=r.offset,o=t.data,a=r.data,f=H[0],y=Q[0],_t=D[8];_t>0;)for(_t<i?(X=_t,_t=0):(X=i,_t-=i),L=tt+_t*H[8],P=rt+_t*Q[8],bt=D[7];bt>0;)for(bt<i?(K=bt,bt=0):(K=i,bt-=i),d=H[8]-K*H[7],x=Q[8]-K*Q[7],I=L+bt*H[7],C=P+bt*Q[7],wt=D[6];wt>0;)for(wt<i?(q=wt,wt=0):(q=i,wt-=i),g=H[7]-q*H[6],T=Q[7]-q*Q[6],F=I+wt*H[6],U=C+wt*Q[6],vt=D[5];vt>0;)for(vt<i?(Z=vt,vt=0):(Z=i,vt-=i),p=H[6]-Z*H[5],E=Q[6]-Z*Q[5],S=F+vt*H[5],N=U+vt*Q[5],mt=D[4];mt>0;)for(mt<i?(J=mt,mt=0):(J=i,mt-=i),h=H[5]-J*H[4],_=Q[5]-J*Q[4],A=S+mt*H[4],M=N+mt*Q[4],yt=D[3];yt>0;)for(yt<i?($=yt,yt=0):($=i,yt-=i),c=H[4]-$*H[3],b=Q[4]-$*Q[3],j=A+yt*H[3],B=M+yt*Q[3],dt=D[2];dt>0;)for(dt<i?(G=dt,dt=0):(G=i,dt-=i),l=H[3]-G*H[2],w=Q[3]-G*Q[2],O=j+dt*H[2],k=B+dt*Q[2],gt=D[1];gt>0;)for(gt<i?(z=gt,gt=0):(z=i,gt-=i),s=H[2]-z*H[1],v=Q[2]-z*Q[1],V=O+gt*H[1],R=k+gt*Q[1],pt=D[0];pt>0;)for(pt<i?(W=pt,pt=0):(W=i,pt-=i),et=V+pt*H[0],nt=R+pt*Q[0],u=H[1]-W*H[0],m=Q[1]-W*Q[0],ht=0;ht<X;ht++){for(ct=0;ct<K;ct++){for(lt=0;lt<q;lt++){for(st=0;st<Z;st++){for(ut=0;ut<J;ut++){for(ft=0;ft<$;ft++){for(at=0;at<G;at++){for(ot=0;ot<z;ot++){for(it=0;it<W;it++)a[nt]=e.call(n,o[et],ra([_t+ht,bt+ct,wt+lt,vt+st,mt+ut,yt+ft,dt+at,gt+ot,pt+it],Y),t.ref),et+=f,nt+=y;et+=u,nt+=m}et+=s,nt+=v}et+=l,nt+=w}et+=c,nt+=b}et+=h,nt+=_}et+=p,nt+=E}et+=g,nt+=T}et+=d,nt+=x}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt,yt,mt,vt,wt,bt,_t,Et,Tt,xt,Vt,Ot,jt,At,St;for($=(St=ea(t.shape,t.strides,r.strides)).sh,nt=St.sx,it=St.sy,G=oa(St.idx),i=ia(t.dtype,r.dtype),ot=t.offset,at=r.offset,o=t.data,a=r.data,f=nt[0],m=it[0],At=$[9];At>0;)for(At<i?(et=At,At=0):(et=i,At-=i),B=ot+At*nt[9],z=at+At*it[9],jt=$[8];jt>0;)for(jt<i?(rt=jt,jt=0):(rt=i,jt-=i),y=nt[9]-rt*nt[8],O=it[9]-rt*it[8],k=B+jt*nt[8],W=z+jt*it[8],Ot=$[7];Ot>0;)for(Ot<i?(tt=Ot,Ot=0):(tt=i,Ot-=i),d=nt[8]-tt*nt[7],V=it[8]-tt*it[7],R=k+Ot*nt[7],D=W+Ot*it[7],Vt=$[6];Vt>0;)for(Vt<i?(Q=Vt,Vt=0):(Q=i,Vt-=i),g=nt[7]-Q*nt[6],x=it[7]-Q*it[6],L=R+Vt*nt[6],Y=D+Vt*it[6],xt=$[5];xt>0;)for(xt<i?(H=xt,xt=0):(H=i,xt-=i),p=nt[6]-H*nt[5],T=it[6]-H*it[5],I=L+xt*nt[5],P=Y+xt*it[5],Tt=$[4];Tt>0;)for(Tt<i?(X=Tt,Tt=0):(X=i,Tt-=i),h=nt[5]-X*nt[4],E=it[5]-X*it[4],F=I+Tt*nt[4],C=P+Tt*it[4],Et=$[3];Et>0;)for(Et<i?(K=Et,Et=0):(K=i,Et-=i),c=nt[4]-K*nt[3],_=it[4]-K*it[3],S=F+Et*nt[3],U=C+Et*it[3],_t=$[2];_t>0;)for(_t<i?(q=_t,_t=0):(q=i,_t-=i),l=nt[3]-q*nt[2],b=it[3]-q*it[2],A=S+_t*nt[2],N=U+_t*it[2],bt=$[1];bt>0;)for(bt<i?(Z=bt,bt=0):(Z=i,bt-=i),s=nt[2]-Z*nt[1],w=it[2]-Z*it[1],j=A+bt*nt[1],M=N+bt*it[1],wt=$[0];wt>0;)for(wt<i?(J=wt,wt=0):(J=i,wt-=i),ft=j+wt*nt[0],ut=M+wt*it[0],u=nt[1]-J*nt[0],v=it[1]-J*it[0],vt=0;vt<et;vt++){for(mt=0;mt<rt;mt++){for(yt=0;yt<tt;yt++){for(dt=0;dt<Q;dt++){for(gt=0;gt<H;gt++){for(pt=0;pt<X;pt++){for(ht=0;ht<K;ht++){for(ct=0;ct<q;ct++){for(lt=0;lt<Z;lt++){for(st=0;st<J;st++)a[ut]=e.call(n,o[ft],ra([At+vt,jt+mt,Ot+yt,Vt+dt,xt+gt,Tt+pt,Et+ht,_t+ct,bt+lt,wt+st],G),t.ref),ft+=f,ut+=m;ft+=u,ut+=v}ft+=s,ut+=w}ft+=l,ut+=b}ft+=c,ut+=_}ft+=h,ut+=E}ft+=p,ut+=T}ft+=g,ut+=x}ft+=d,ut+=V}ft+=y,ut+=O}}],ya=[function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S;for(y=(S=ea(t.shape,t.strides,r.strides)).sh,w=S.sx,b=S.sy,p=oa(S.idx),i=ia(t.dtype,r.dtype),_=t.offset,E=r.offset,o=t.data,a=r.data,f=w[0],s=b[0],A=y[1];A>0;)for(A<i?(v=A,A=0):(v=i,A-=i),c=_+A*w[1],h=E+A*b[1],j=y[0];j>0;)for(j<i?(m=j,j=0):(m=i,j-=i),T=c+j*w[0],x=h+j*b[0],u=w[1]-m*w[0],l=b[1]-m*b[0],g=t.accessors[0],d=r.accessors[1],O=0;O<v;O++){for(V=0;V<m;V++)d(a,x,e.call(n,g(o,T),ra([A+O,j+V],p),t.ref)),T+=f,x+=s;T+=u,x+=l}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M;for(b=(M=ea(t.shape,t.strides,r.strides)).sh,x=M.sx,V=M.sy,m=oa(M.idx),i=ia(t.dtype,r.dtype),O=t.offset,j=r.offset,o=t.data,a=r.data,f=x[0],l=V[0],v=t.accessors[0],w=r.accessors[1],B=b[2];B>0;)for(B<i?(T=B,B=0):(T=i,B-=i),g=O+B*x[2],y=j+B*V[2],k=b[1];k>0;)for(k<i?(E=k,k=0):(E=i,k-=i),s=x[2]-E*x[1],h=V[2]-E*V[1],p=g+k*x[1],d=y+k*V[1],R=b[0];R>0;)for(R<i?(_=R,R=0):(_=i,R-=i),A=p+R*x[0],S=d+R*V[0],u=x[1]-_*x[0],c=V[1]-_*V[0],L=0;L<T;L++){for(I=0;I<E;I++){for(F=0;F<_;F++)w(a,S,e.call(n,v(o,A),ra([B+L,k+I,R+F],m),t.ref)),A+=f,S+=l;A+=u,S+=c}A+=s,S+=h}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W;for(x=(W=ea(t.shape,t.strides,r.strides)).sh,S=W.sx,F=W.sy,b=oa(W.idx),i=ia(t.dtype,r.dtype),I=t.offset,L=r.offset,o=t.data,a=r.data,s=S[0],p=F[0],D=x[3];D>0;)for(D<i?(A=D,D=0):(A=i,D-=i),w=I+D*S[3],T=L+D*F[3],Y=x[2];Y>0;)for(Y<i?(j=Y,Y=0):(j=i,Y-=i),h=S[3]-j*S[2],y=F[3]-j*F[2],v=w+Y*S[2],E=T+Y*F[2],P=x[1];P>0;)for(P<i?(O=P,P=0):(O=i,P-=i),c=S[2]-O*S[1],d=F[2]-O*F[1],m=v+P*S[1],_=E+P*F[1],C=x[0];C>0;)for(C<i?(V=C,C=0):(V=i,C-=i),R=m+C*S[0],k=_+C*F[0],l=S[1]-V*S[0],g=F[1]-V*F[0],f=t.accessors[0],u=r.accessors[1],U=0;U<A;U++){for(N=0;N<j;N++){for(M=0;M<O;M++){for(B=0;B<V;B++)u(a,k,e.call(n,f(o,R),ra([D+U,Y+N,P+M,C+B],b),t.ref)),R+=s,k+=p;R+=l,k+=g}R+=c,k+=d}R+=h,k+=y}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K;for(A=(K=ea(t.shape,t.strides,r.strides)).sh,k=K.sx,B=K.sy,T=oa(K.idx),i=ia(t.dtype,r.dtype),M=t.offset,N=r.offset,o=t.data,a=r.data,s=k[0],g=B[0],f=t.accessors[0],u=r.accessors[1],q=A[4];q>0;)for(q<i?(R=q,q=0):(R=i,q-=i),E=M+q*k[4],j=N+q*B[4],Z=A[3];Z>0;)for(Z<i?(L=Z,Z=0):(L=i,Z-=i),p=k[4]-L*k[3],v=B[4]-L*B[3],_=E+Z*k[3],O=j+Z*B[3],J=A[2];J>0;)for(J<i?(I=J,J=0):(I=i,J-=i),h=k[3]-I*k[2],m=B[3]-I*B[2],b=_+J*k[2],V=O+J*B[2],$=A[1];$>0;)for($<i?(F=$,$=0):(F=i,$-=i),c=k[2]-F*k[1],y=B[2]-F*B[1],w=b+$*k[1],x=V+$*B[1],G=A[0];G>0;)for(G<i?(S=G,G=0):(S=i,G-=i),U=w+G*k[0],C=x+G*B[0],l=k[1]-S*k[0],d=B[1]-S*B[0],z=0;z<R;z++){for(W=0;W<L;W++){for(D=0;D<I;D++){for(Y=0;Y<F;Y++){for(P=0;P<S;P++)u(a,C,e.call(n,f(o,U),ra([q+z,Z+W,J+D,$+Y,G+P],T),t.ref)),U+=s,C+=g;U+=l,C+=d}U+=c,C+=y}U+=h,C+=m}U+=p,C+=v}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt;for(L=(nt=ea(t.shape,t.strides,r.strides)).sh,C=nt.sx,P=nt.sy,I=oa(nt.idx),i=ia(t.dtype,r.dtype),Y=t.offset,D=r.offset,o=t.data,a=r.data,s=C[0],d=P[0],u=t.accessors[0],f=r.accessors[1],et=L[5];et>0;)for(et<i?(U=et,et=0):(U=i,et-=i),V=Y+et*C[5],F=D+et*P[5],rt=L[4];rt>0;)for(rt<i?(N=rt,rt=0):(N=i,rt-=i),g=C[5]-N*C[4],b=P[5]-N*P[4],x=V+rt*C[4],S=F+rt*P[4],tt=L[3];tt>0;)for(tt<i?(M=tt,tt=0):(M=i,tt-=i),p=C[4]-M*C[3],w=P[4]-M*P[3],T=x+tt*C[3],A=S+tt*P[3],Q=L[2];Q>0;)for(Q<i?(B=Q,Q=0):(B=i,Q-=i),h=C[3]-B*C[2],v=P[3]-B*P[2],E=T+Q*C[2],j=A+Q*P[2],H=L[1];H>0;)for(H<i?(k=H,H=0):(k=i,H-=i),c=C[2]-k*C[1],m=P[2]-k*P[1],_=E+H*C[1],O=j+H*P[1],X=L[0];X>0;)for(X<i?(R=X,X=0):(R=i,X-=i),W=_+X*C[0],z=O+X*P[0],l=C[1]-R*C[0],y=P[1]-R*P[0],K=0;K<U;K++){for(q=0;q<N;q++){for(Z=0;Z<M;Z++){for(J=0;J<B;J++){for($=0;$<k;$++){for(G=0;G<R;G++)f(a,z,e.call(n,u(o,W),ra([et+K,rt+q,tt+Z,Q+J,H+$,X+G],I),t.ref)),W+=s,z+=d;W+=l,z+=y}W+=c,z+=m}W+=h,z+=v}W+=p,z+=w}W+=g,z+=b}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt;for(M=(lt=ea(t.shape,t.strides,r.strides)).sh,z=lt.sx,G=lt.sy,B=oa(lt.idx),i=ia(t.dtype,r.dtype),$=t.offset,J=r.offset,o=t.data,a=r.data,s=z[0],y=G[0],f=t.accessors[0],u=r.accessors[1],st=M[6];st>0;)for(st<i?(W=st,st=0):(W=i,st-=i),A=$+st*z[6],k=J+st*G[6],ut=M[5];ut>0;)for(ut<i?(D=ut,ut=0):(D=i,ut-=i),d=z[6]-D*z[5],E=G[6]-D*G[5],j=A+ut*z[5],R=k+ut*G[5],ft=M[4];ft>0;)for(ft<i?(Y=ft,ft=0):(Y=i,ft-=i),g=z[5]-Y*z[4],_=G[5]-Y*G[4],O=j+ft*z[4],L=R+ft*G[4],at=M[3];at>0;)for(at<i?(P=at,at=0):(P=i,at-=i),p=z[4]-P*z[3],b=G[4]-P*G[3],V=O+at*z[3],I=L+at*G[3],ot=M[2];ot>0;)for(ot<i?(C=ot,ot=0):(C=i,ot-=i),h=z[3]-C*z[2],w=G[3]-C*G[2],x=V+ot*z[2],F=I+ot*G[2],it=M[1];it>0;)for(it<i?(U=it,it=0):(U=i,it-=i),c=z[2]-U*z[1],v=G[2]-U*G[1],T=x+it*z[1],S=F+it*G[1],nt=M[0];nt>0;)for(nt<i?(N=nt,nt=0):(N=i,nt-=i),Z=T+nt*z[0],q=S+nt*G[0],l=z[1]-N*z[0],m=G[1]-N*G[0],et=0;et<W;et++){for(rt=0;rt<D;rt++){for(tt=0;tt<Y;tt++){for(Q=0;Q<P;Q++){for(H=0;H<C;H++){for(X=0;X<U;X++){for(K=0;K<N;K++)u(a,q,e.call(n,f(o,Z),ra([st+et,ut+rt,ft+tt,at+Q,ot+H,it+X,nt+K],B),t.ref)),Z+=s,q+=y;Z+=l,q+=m}Z+=c,q+=v}Z+=h,q+=w}Z+=p,q+=b}Z+=g,q+=_}Z+=d,q+=E}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt,yt,mt;for(P=(mt=ea(t.shape,t.strides,r.strides)).sh,q=mt.sx,K=mt.sy,C=oa(mt.idx),i=ia(t.dtype,r.dtype),X=t.offset,H=r.offset,o=t.data,a=r.data,s=q[0],m=K[0],f=t.accessors[0],u=r.accessors[1],yt=P[7];yt>0;)for(yt<i?(Z=yt,yt=0):(Z=i,yt-=i),I=X+yt*q[7],U=H+yt*K[7],dt=P[6];dt>0;)for(dt<i?(J=dt,dt=0):(J=i,dt-=i),y=q[7]-J*q[6],x=K[7]-J*K[6],F=I+dt*q[6],N=U+dt*K[6],gt=P[5];gt>0;)for(gt<i?($=gt,gt=0):($=i,gt-=i),d=q[6]-$*q[5],T=K[6]-$*K[5],S=F+gt*q[5],M=N+gt*K[5],pt=P[4];pt>0;)for(pt<i?(G=pt,pt=0):(G=i,pt-=i),g=q[5]-G*q[4],E=K[5]-G*K[4],A=S+pt*q[4],B=M+pt*K[4],ht=P[3];ht>0;)for(ht<i?(z=ht,ht=0):(z=i,ht-=i),p=q[4]-z*q[3],_=K[4]-z*K[3],j=A+ht*q[3],k=B+ht*K[3],ct=P[2];ct>0;)for(ct<i?(W=ct,ct=0):(W=i,ct-=i),h=q[3]-W*q[2],b=K[3]-W*K[2],O=j+ct*q[2],R=k+ct*K[2],lt=P[1];lt>0;)for(lt<i?(D=lt,lt=0):(D=i,lt-=i),c=q[2]-D*q[1],w=K[2]-D*K[1],V=O+lt*q[1],L=R+lt*K[1],st=P[0];st>0;)for(st<i?(Y=st,st=0):(Y=i,st-=i),Q=V+st*q[0],tt=L+st*K[0],l=q[1]-Y*q[0],v=K[1]-Y*K[0],ut=0;ut<Z;ut++){for(ft=0;ft<J;ft++){for(at=0;at<$;at++){for(ot=0;ot<G;ot++){for(it=0;it<z;it++){for(nt=0;nt<W;nt++){for(et=0;et<D;et++){for(rt=0;rt<Y;rt++)u(a,tt,e.call(n,f(o,Q),ra([yt+ut,dt+ft,gt+at,pt+ot,ht+it,ct+nt,lt+et,st+rt],C),t.ref)),Q+=s,tt+=m;Q+=l,tt+=v}Q+=c,tt+=w}Q+=h,tt+=b}Q+=p,tt+=_}Q+=g,tt+=E}Q+=d,tt+=T}Q+=y,tt+=x}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt,yt,mt,vt,wt,bt,_t,Et,Tt,xt;for(z=(xt=ea(t.shape,t.strides,r.strides)).sh,tt=xt.sx,rt=xt.sy,W=oa(xt.idx),i=ia(t.dtype,r.dtype),et=t.offset,nt=r.offset,o=t.data,a=r.data,s=tt[0],v=rt[0],f=t.accessors[0],u=r.accessors[1],Tt=z[8];Tt>0;)for(Tt<i?(Q=Tt,Tt=0):(Q=i,Tt-=i),k=et+Tt*tt[8],D=nt+Tt*rt[8],Et=z[7];Et>0;)for(Et<i?(H=Et,Et=0):(H=i,Et-=i),m=tt[8]-H*tt[7],O=rt[8]-H*rt[7],R=k+Et*tt[7],Y=D+Et*rt[7],_t=z[6];_t>0;)for(_t<i?(X=_t,_t=0):(X=i,_t-=i),y=tt[7]-X*tt[6],V=rt[7]-X*rt[6],L=R+_t*tt[6],P=Y+_t*rt[6],bt=z[5];bt>0;)for(bt<i?(K=bt,bt=0):(K=i,bt-=i),d=tt[6]-K*tt[5],x=rt[6]-K*rt[5],I=L+bt*tt[5],C=P+bt*rt[5],wt=z[4];wt>0;)for(wt<i?(q=wt,wt=0):(q=i,wt-=i),g=tt[5]-q*tt[4],T=rt[5]-q*rt[4],F=I+wt*tt[4],U=C+wt*rt[4],vt=z[3];vt>0;)for(vt<i?(Z=vt,vt=0):(Z=i,vt-=i),p=tt[4]-Z*tt[3],E=rt[4]-Z*rt[3],S=F+vt*tt[3],N=U+vt*rt[3],mt=z[2];mt>0;)for(mt<i?(J=mt,mt=0):(J=i,mt-=i),h=tt[3]-J*tt[2],_=rt[3]-J*rt[2],A=S+mt*tt[2],M=N+mt*rt[2],yt=z[1];yt>0;)for(yt<i?($=yt,yt=0):($=i,yt-=i),c=tt[2]-$*tt[1],b=rt[2]-$*rt[1],j=A+yt*tt[1],B=M+yt*rt[1],dt=z[0];dt>0;)for(dt<i?(G=dt,dt=0):(G=i,dt-=i),it=j+dt*tt[0],ot=B+dt*rt[0],l=tt[1]-G*tt[0],w=rt[1]-G*rt[0],gt=0;gt<Q;gt++){for(pt=0;pt<H;pt++){for(ht=0;ht<X;ht++){for(ct=0;ct<K;ct++){for(lt=0;lt<q;lt++){for(st=0;st<Z;st++){for(ut=0;ut<J;ut++){for(ft=0;ft<$;ft++){for(at=0;at<G;at++)u(a,ot,e.call(n,f(o,it),ra([Tt+gt,Et+pt,_t+ht,bt+ct,wt+lt,vt+st,mt+ut,yt+ft,dt+at],W),t.ref)),it+=s,ot+=v;it+=l,ot+=w}it+=c,ot+=b}it+=h,ot+=_}it+=p,ot+=E}it+=g,ot+=T}it+=d,ot+=x}it+=y,ot+=V}it+=m,ot+=O}},function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w,b,_,E,T,x,V,O,j,A,S,F,I,L,R,k,B,M,N,U,C,P,Y,D,W,z,G,$,J,Z,q,K,X,H,Q,tt,rt,et,nt,it,ot,at,ft,ut,st,lt,ct,ht,pt,gt,dt,yt,mt,vt,wt,bt,_t,Et,Tt,xt,Vt,Ot,jt,At,St,Ft,It;for(Z=(It=ea(t.shape,t.strides,r.strides)).sh,ot=It.sx,at=It.sy,J=oa(It.idx),i=ia(t.dtype,r.dtype),ft=t.offset,ut=r.offset,o=t.data,a=r.data,s=ot[0],w=at[0],f=t.accessors[0],u=r.accessors[1],Ft=Z[9];Ft>0;)for(Ft<i?(it=Ft,Ft=0):(it=i,Ft-=i),N=ft+Ft*ot[9],$=ut+Ft*at[9],St=Z[8];St>0;)for(St<i?(nt=St,St=0):(nt=i,St-=i),v=ot[9]-nt*ot[8],A=at[9]-nt*at[8],M=N+St*ot[8],G=$+St*at[8],At=Z[7];At>0;)for(At<i?(et=At,At=0):(et=i,At-=i),m=ot[8]-et*ot[7],j=at[8]-et*at[7],B=M+At*ot[7],z=G+At*at[7],jt=Z[6];jt>0;)for(jt<i?(rt=jt,jt=0):(rt=i,jt-=i),y=ot[7]-rt*ot[6],O=at[7]-rt*at[6],k=B+jt*ot[6],W=z+jt*at[6],Ot=Z[5];Ot>0;)for(Ot<i?(tt=Ot,Ot=0):(tt=i,Ot-=i),d=ot[6]-tt*ot[5],V=at[6]-tt*at[5],R=k+Ot*ot[5],D=W+Ot*at[5],Vt=Z[4];Vt>0;)for(Vt<i?(Q=Vt,Vt=0):(Q=i,Vt-=i),g=ot[5]-Q*ot[4],x=at[5]-Q*at[4],L=R+Vt*ot[4],Y=D+Vt*at[4],xt=Z[3];xt>0;)for(xt<i?(H=xt,xt=0):(H=i,xt-=i),p=ot[4]-H*ot[3],T=at[4]-H*at[3],I=L+xt*ot[3],P=Y+xt*at[3],Tt=Z[2];Tt>0;)for(Tt<i?(X=Tt,Tt=0):(X=i,Tt-=i),h=ot[3]-X*ot[2],E=at[3]-X*at[2],F=I+Tt*ot[2],C=P+Tt*at[2],Et=Z[1];Et>0;)for(Et<i?(K=Et,Et=0):(K=i,Et-=i),c=ot[2]-K*ot[1],_=at[2]-K*at[1],S=F+Et*ot[1],U=C+Et*at[1],_t=Z[0];_t>0;)for(_t<i?(q=_t,_t=0):(q=i,_t-=i),st=S+_t*ot[0],lt=U+_t*at[0],l=ot[1]-q*ot[0],b=at[1]-q*at[0],bt=0;bt<it;bt++){for(wt=0;wt<nt;wt++){for(vt=0;vt<et;vt++){for(mt=0;mt<rt;mt++){for(yt=0;yt<tt;yt++){for(dt=0;dt<Q;dt++){for(gt=0;gt<H;gt++){for(pt=0;pt<X;pt++){for(ht=0;ht<K;ht++){for(ct=0;ct<q;ct++)u(a,lt,e.call(n,f(o,st),ra([Ft+bt,St+wt,At+vt,jt+mt,Ot+yt,Vt+dt,xt+gt,Tt+pt,Et+ht,_t+ct],J),t.ref)),st+=s,lt+=w;st+=l,lt+=b}st+=c,lt+=_}st+=h,lt+=E}st+=p,lt+=T}st+=g,lt+=x}st+=d,lt+=V}st+=y,lt+=O}st+=m,lt+=j}st+=v,lt+=A}}],ma=pa.length-1;function va(t,r,e){var n,i,o,a,f,u,s,l,c,h,p;if(l=Ho(t[0]),c=Ho(t[1]),i=l.shape,o=c.shape,(n=i.length)!==o.length)throw new Error(Y("invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == %d. ndims(y) == %d.",n,o.length));if(0===n)return l.accessorProtocol||c.accessorProtocol?ga[n](l,c,r,e):pa[n](l,c,r,e);for(u=1,h=0;h<n;h++){if((p=i[h])!==o[h])throw new Error("invalid arguments. Arrays must have the same shape.");u*=p}return 0!==u?1===n?l.accessorProtocol||c.accessorProtocol?ga[n](l,c,r,e):pa[n](l,c,r,e):(a=jr(l.strides),f=jr(c.strides),s=Sr(l.strides),0!==a&&0!==f&&s===Sr(c.strides)&&n<=ma?l.accessorProtocol||c.accessorProtocol?ga[n](l,c,1===s,r,e):pa[n](l,c,1===s,r,e):n<=ma?l.accessorProtocol||c.accessorProtocol?ya[n-2](l,c,r,e):da[n-2](l,c,r,e):l.accessorProtocol||c.accessorProtocol?function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m,v,w;for(u=Bi(h=t.shape),i=t.data,o=r.data,p=t.strides,g=r.strides,d=t.offset,y=r.offset,a=t.order,f=r.order,s=t.accessors[0],l=r.accessors[1],w=0;w<u;w++)m=aa(h,p,d,a,w,ca),v=aa(h,g,y,f,w,ca),c=la(h,p,0,a,w,ca),l(o,v,e.call(n,s(i,m),c,t.ref))}(l,c,r,e):void function(t,r,e,n){var i,o,a,f,u,s,l,c,h,p,g,d,y,m;for(u=Bi(l=t.shape),i=t.data,o=r.data,c=t.strides,h=r.strides,p=t.offset,g=r.offset,a=t.order,f=r.order,m=0;m<u;m++)d=aa(l,c,p,a,m,ha),y=aa(l,h,g,f,m,ha),s=la(l,c,0,a,m,ha),o[y]=e.call(n,i[d],s,t.ref)}(l,c,r,e)):void 0}function wa(){var t,r=arguments,e="https://stdlib.io/e/"+r[0]+"?";for(t=1;t<r.length;t++)e+="&arg[]="+encodeURIComponent(r[t]);return e}return function(t,r,e,n){var i,a,f,u,s;if(!Ai(t))throw new TypeError(wa("null5t",t));if(arguments.length<3?a=r:3===arguments.length?vt(r)?(a=r,u=e):(i=!0,f=r,a=e):(i=!0,f=r,a=e,u=n),!vt(a))throw new TypeError(wa("null2b",a));if(i){if(!xt(f))throw new TypeError(wa("null2V",f));s=o(f,"dtype")?zo(t,{dtype:f.dtype}):zo(t)}else s=zo(t);return va([t,s],a,u),s}}));
//# sourceMappingURL=index.js.map