-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod.js
More file actions
4 lines (4 loc) · 181 KB
/
Copy pathmod.js
File metadata and controls
4 lines (4 loc) · 181 KB
1
2
3
4
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./mod.d.ts" />
var t="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function e(t){return"number"==typeof t}function n(t){var r,e="";for(r=0;r<t;r++)e+="0";return e}function i(t,r,e){var i=!1,o=r-t.length;return o<0||(function(t){return"-"===t[0]}(t)&&(i=!0,t=t.substr(1)),t=e?t+n(o):n(o)+t,i&&(t="-"+t)),t}var o=String.prototype.toLowerCase,a=String.prototype.toUpperCase;function u(t){var r,n,u;switch(t.specifier){case"b":r=2;break;case"o":r=8;break;case"x":case"X":r=16;break;default:r=10}if(n=t.arg,u=parseInt(n,10),!isFinite(u)){if(!e(n))throw new Error("invalid integer. Value: "+n);u=0}return u<0&&("u"===t.specifier||10!==r)&&(u=4294967295+u+1),u<0?(n=(-u).toString(r),t.precision&&(n=i(n,t.precision,t.padRight)),n="-"+n):(n=u.toString(r),u||t.precision?t.precision&&(n=i(n,t.precision,t.padRight)):n="",t.sign&&(n=t.sign+n)),16===r&&(t.alternate&&(n="0x"+n),n=t.specifier===a.call(t.specifier)?a.call(n):o.call(n)),8===r&&t.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}var f=Math.abs,s=String.prototype.toLowerCase,l=String.prototype.toUpperCase,h=String.prototype.replace,c=/e\+(\d)$/,p=/e-(\d)$/,g=/^(\d+)$/,y=/^(\d+)e/,d=/\.0$/,m=/\.0*e/,v=/(\..*[^0])0*e/;function w(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":f(t)<1e-4?((e=r.precision)>0&&(e-=1),n=t.toExponential(e)):n=t.toPrecision(r.precision),r.alternate||(n=h.call(n,v,"$1e"),n=h.call(n,m,"e"),n=h.call(n,d,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,g,"$1."),n=h.call(n,y,"$1.e")),t>=0&&r.sign&&(n=r.sign+n),n=r.specifier===l.call(r.specifier)?l.call(n):s.call(n)}function b(t){var r,e="";for(r=0;r<t;r++)e+=" ";return e}var _=String.fromCharCode,E=Array.isArray;function T(t){return t!=t}function x(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 A(t){var r,n,o,a,f,s,l,h,c,p,g,y,d,m;if(!E(t))throw new TypeError("invalid argument. First argument must be an array. Value: `"+t+"`.");for(s="",l=1,c=0;c<t.length;c++)if(o=t[c],"string"==typeof o)s+=o;else{if(r=void 0!==o.precision,!(o=x(o)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+c+"`. Value: `"+o+"`.");for(o.mapping&&(l=o.mapping),n=o.flags,p=0;p<n.length;p++)switch(a=n.charAt(p)){case" ":o.sign=" ";break;case"+":o.sign="+";break;case"-":o.padRight=!0,o.padZeros=!1;break;case"0":o.padZeros=n.indexOf("-")<0;break;case"#":o.alternate=!0;break;default:throw new Error("invalid flag: "+a)}if("*"===o.width){if(o.width=parseInt(arguments[l],10),l+=1,T(o.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+o.width+"`.");o.width<0&&(o.padRight=!0,o.width=-o.width)}if(r&&"*"===o.precision){if(o.precision=parseInt(arguments[l],10),l+=1,T(o.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+o.precision+"`.");o.precision<0&&(o.precision=1,r=!1)}switch(o.arg=arguments[l],o.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":r&&(o.padZeros=!1),o.arg=u(o);break;case"s":o.maxWidth=r?o.precision:-1,o.arg=String(o.arg);break;case"c":if(!T(o.arg)){if((f=parseInt(o.arg,10))<0||f>127)throw new Error("invalid character code. Value: "+o.arg);o.arg=T(f)?String(o.arg):_(f)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(r||(o.precision=6),h=parseFloat(o.arg),!isFinite(h)){if(!e(o.arg))throw new Error("invalid floating-point number. Value: "+s);h=o.arg,o.padZeros=!1}o.arg=w(h,o);break;default:throw new Error("invalid specifier: "+o.specifier)}o.maxWidth>=0&&o.arg.length>o.maxWidth&&(o.arg=o.arg.substring(0,o.maxWidth)),o.padZeros?o.arg=i(o.arg,o.width||o.precision,o.padRight):o.width&&(o.arg=(g=o.arg,y=o.width,d=o.padRight,m=void 0,(m=y-g.length)<0?g:g=d?g+b(m):b(m)+g)),s+=o.arg||"",l+=1}return s}var V=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function O(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 S(t){var r,e,n,i;for(e=[],i=0,n=V.exec(t);n;)(r=t.slice(i,V.lastIndex-n[0].length)).length&&e.push(r),"%"===n[6]?e.push("%"):e.push(O(n)),i=V.lastIndex,n=V.exec(t);return(r=t.slice(i)).length&&e.push(r),e}function R(t){var r,e;if("string"!=typeof t)throw new TypeError(R("invalid argument. First argument must be a string. Value: `%s`.",t));for(r=[S(t)],e=1;e<arguments.length;e++)r.push(arguments[e]);return A.apply(null,r)}var j,I=Object.prototype,L=I.toString,B=I.__defineGetter__,P=I.__defineSetter__,F=I.__lookupGetter__,U=I.__lookupSetter__;j=function(){try{return t({},"x",{}),!0}catch(t){return!1}}()?r:function(t,r,e){var n,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===L.call(t))throw new TypeError(R("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof e||null===e||"[object Array]"===L.call(e))throw new TypeError(R("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(F.call(t,r)||U.call(t,r)?(n=t.__proto__,t.__proto__=I,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&&B&&B.call(t,r,e.get),a&&P&&P.call(t,r,e.set),t};var M=j;function k(t,r,e){M(t,r,{configurable:!1,enumerable:!1,writable:!1,value:e})}function C(t){return"boolean"==typeof t}var N="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function Y(){return N&&"symbol"==typeof Symbol.toStringTag}var D=Object.prototype.toString;var z=Object.prototype.hasOwnProperty;function W(t,r){return null!=t&&z.call(t,r)}var G="function"==typeof Symbol?Symbol:void 0,J="function"==typeof G?G.toStringTag:"";var $=Y()?function(t){var r,e,n;if(null==t)return D.call(t);e=t[J],r=W(t,J);try{t[J]=void 0}catch(r){return D.call(t)}return n=D.call(t),r?t[J]=e:delete t[J],n}:function(t){return D.call(t)},Z=Boolean,K=Boolean.prototype.toString;var X=Y();function q(t){return"object"==typeof t&&(t instanceof Z||(X?function(t){try{return K.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===$(t)))}function H(t){return C(t)||q(t)}k(H,"isPrimitive",C),k(H,"isObject",q);var Q="object"==typeof self?self:null,tt="object"==typeof window?window:null,rt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},et="object"==typeof rt?rt:null,nt="object"==typeof globalThis?globalThis:null;function it(t){if(arguments.length){if(!C(t))throw new TypeError(R("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(nt)return nt;if(Q)return Q;if(tt)return tt;if(et)return et;throw new Error("unexpected error. Unable to resolve global object.")}var ot=it();function at(t,r,e){M(t,r,{configurable:!1,enumerable:!1,get:e})}function ut(t){return"string"==typeof t}var ft=String.prototype.valueOf;var st=Y();function lt(t){return"object"==typeof t&&(t instanceof String||(st?function(t){try{return ft.call(t),!0}catch(t){return!1}}(t):"[object String]"===$(t)))}function ht(t){return ut(t)||lt(t)}function ct(t){return"number"==typeof t}k(ht,"isPrimitive",ut),k(ht,"isObject",lt);var pt=Number,gt=pt.prototype.toString;var yt=Y();function dt(t){return"object"==typeof t&&(t instanceof pt||(yt?function(t){try{return gt.call(t),!0}catch(t){return!1}}(t):"[object Number]"===$(t)))}function mt(t){return ct(t)||dt(t)}k(mt,"isPrimitive",ct),k(mt,"isObject",dt);var vt=Number.POSITIVE_INFINITY,wt=pt.NEGATIVE_INFINITY,bt=Math.floor;function _t(t){return bt(t)===t}function Et(t){return t<vt&&t>wt&&_t(t)}function Tt(t){return ct(t)&&Et(t)}function xt(t){return dt(t)&&Et(t.valueOf())}function At(t){return Tt(t)||xt(t)}function Vt(t){return Tt(t)&&t>0}function Ot(t){return xt(t)&&t.valueOf()>0}function St(t){return Vt(t)||Ot(t)}function Rt(t){return Object.keys(Object(t))}k(At,"isPrimitive",Tt),k(At,"isObject",xt),k(St,"isPrimitive",Vt),k(St,"isObject",Ot);var jt=void 0!==Object.keys;function It(t){return"[object Arguments]"===$(t)}var Lt=function(){return It(arguments)}();function Bt(t){return t!=t}function Pt(t){return ct(t)&&Bt(t)}function Ft(t){return dt(t)&&Bt(t.valueOf())}function Ut(t){return Pt(t)||Ft(t)}k(Ut,"isPrimitive",Pt),k(Ut,"isObject",Ft);var Mt=Object.prototype.propertyIsEnumerable;var kt=!Mt.call("beep","0");function Ct(t,r){var e;return null!=t&&(!(e=Mt.call(t,r))&&kt&&ht(t)?!Pt(r=+r)&&Tt(r)&&r>=0&&r<t.length:e)}var Nt=Array.isArray?Array.isArray:function(t){return"[object Array]"===$(t)},Yt=4294967295;var Dt=Lt?It:function(t){return null!==t&&"object"==typeof t&&!Nt(t)&&"number"==typeof t.length&&_t(t.length)&&t.length>=0&&t.length<=Yt&&W(t,"callee")&&!Ct(t,"callee")},zt=Array.prototype.slice;function Wt(t){if("function"!=typeof t)throw new TypeError(R("invalid argument. Must provide a function. Value: `%s`.",t));return function(r){var e,n;if(!Nt(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}k(Gt,"isObjectLikeArray",Wt(Gt));var Jt=Ct((function(){}),"prototype"),$t=!Ct({toString:null},"toString"),Zt=9007199254740991;function Kt(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&_t(t.length)&&t.length>=0&&t.length<=Zt}function Xt(t,r,e){var n,i;if(!Kt(t)&&!ut(t))throw new TypeError(R("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(!Tt(e))throw new TypeError(R("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(Ut(r)){for(;i<n;i++)if(Ut(t[i]))return i}else for(;i<n;i++)if(t[i]===r)return i;return-1}var qt=/./,Ht=it(),Qt=Ht.document&&Ht.document.childNodes,tr=Int8Array;function rr(){return/^\s*function\s*([^(]*)/i}var er=/^\s*function\s*([^(]*)/i;function nr(t){return Gt(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function ir(t){var r,e,n;if(("Object"===(e=$(t).slice(8,-1))||"Error"===e)&&t.constructor){if("string"==typeof(n=t.constructor).name)return n.name;if(r=er.exec(n.toString()))return r[1]}return nr(t)?"Buffer":e}k(rr,"REGEXP",er);var or="function"==typeof qt||"object"==typeof tr||"function"==typeof Qt?function(t){return ir(t).toLowerCase()}:function(t){var r;return null===t?"null":"object"===(r=typeof t)?ir(t).toLowerCase():r};function ar(t){return t.constructor&&t.constructor.prototype===t}var ur=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],fr="undefined"==typeof window?void 0:window;var sr=function(){var t;if("undefined"===or(fr))return!1;for(t in fr)try{-1===Xt(ur,t)&&W(fr,t)&&null!==fr[t]&&"object"===or(fr[t])&&ar(fr[t])}catch(t){return!0}return!1}(),lr="undefined"!=typeof window;var hr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var cr=jt?function(){return 2!==(Rt(arguments)||"").length}(1,2)?function(t){return Dt(t)?Rt(zt.call(t)):Rt(t)}:Rt:function(t){var r,e,n,i,o,a,u;if(i=[],Dt(t)){for(u=0;u<t.length;u++)i.push(u.toString());return i}if("string"==typeof t){if(t.length>0&&!W(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=Jt&&n}for(o in t)e&&"prototype"===o||!W(t,o)||i.push(String(o));if($t)for(r=function(t){if(!1===lr&&!sr)return ar(t);try{return ar(t)}catch(t){return!1}}(t),u=0;u<hr.length;u++)a=hr[u],r&&"constructor"===a||!W(t,a)||i.push(String(a));return i};function pr(t){return"object"==typeof t&&null!==t&&!Nt(t)}function gr(t){return"function"===or(t)}var yr,dr=Object,mr=Object.getPrototypeOf;yr=gr(Object.getPrototypeOf)?mr:function(t){var r=function(t){return t.__proto__}(t);return r||null===r?r:"[object Function]"===$(t.constructor)?t.constructor.prototype:t instanceof dr?dr.prototype:null};var vr=yr;var wr=Object.prototype;function br(t){var r;return!!pr(t)&&(r=function(t){return null==t?null:(t=dr(t),vr(t))}(t),!r||!W(t,"constructor")&&W(r,"constructor")&&gr(r.constructor)&&"[object Function]"===$(r.constructor)&&W(r,"isPrototypeOf")&&gr(r.isPrototypeOf)&&(r===wr||function(t){var r;for(r in t)if(!W(t,r))return!1;return!0}(t)))}var _r=function(t,r){var e,n,i,o,a,u,f,s=!0;if(!Gt(t))throw new TypeError(R("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!br(r))throw new TypeError(R("invalid argument. Options argument must be an object. Value: `%s`.",r));if(W(r,"duplicates")&&!C(s=r.duplicates))throw new TypeError(R("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",s))}if(n=(e=cr(t)).length,a={},s)for(f=0;f<n;f++)W(a,o=t[i=e[f]])?(u=a[o],Nt(u)?a[o].push(i):a[o]=[u,i]):a[o]=i;else for(f=0;f<n;f++)a[t[i=e[f]]]=i;return a}({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 Er(t){var r=_r[t];return ut(r)?r:null}var Tr={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 xr(t){var r;return ut(t)?Tr[t]||null:ct(t)?Tr[Er(t)]||null:t&&Vt(r=t.byteLength)?r:null}function Ar(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 Vr(t){return Math.abs(t)}function Or(t){var r,e,n,i,o,a;if(0===(e=t.length))return 0;for(r=!0,n=!0,i=Vr(t[0]),a=1;a<e;a++){if(o=Vr(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 Sr="function";function Rr(t){return typeof t.get===Sr&&typeof t.set===Sr}var jr={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 Ir(t){var r=jr[t];return"function"==typeof r?r:jr.default}var Lr={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=Lr[t];return"function"==typeof r?r:Lr.default}var Pr={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 Fr(t){var r=Pr[t];return"function"==typeof r?r:Pr.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 Mr(t){var r=Ur[t];return"function"==typeof r?r:Ur.default}var kr={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"},Cr="function"==typeof Float64Array;var Nr="function"==typeof Float64Array?Float64Array:null;var Yr,Dr="function"==typeof Float64Array?Float64Array:void 0;Yr=function(){var t,r,e;if("function"!=typeof Nr)return!1;try{r=new Nr([1,3.14,-3.14,NaN]),e=r,t=(Cr&&e instanceof Float64Array||"[object Float64Array]"===$(e))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}()?Dr:function(){throw new Error("not implemented")};var zr=Yr,Wr="function"==typeof Float32Array;var Gr="function"==typeof Float32Array?Float32Array:null;var Jr,$r="function"==typeof Float32Array?Float32Array:void 0;Jr=function(){var t,r,e;if("function"!=typeof Gr)return!1;try{r=new Gr([1,3.14,-3.14,5e40]),e=r,t=(Wr&&e instanceof Float32Array||"[object Float32Array]"===$(e))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===vt}catch(r){t=!1}return t}()?$r:function(){throw new Error("not implemented")};var Zr=Jr,Kr="function"==typeof Uint32Array;var Xr="function"==typeof Uint32Array?Uint32Array:null;var qr,Hr="function"==typeof Uint32Array?Uint32Array:void 0;qr=function(){var t,r,e;if("function"!=typeof Xr)return!1;try{r=new Xr(r=[1,3.14,-3.14,4294967296,4294967297]),e=r,t=(Kr&&e instanceof Uint32Array||"[object Uint32Array]"===$(e))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?Hr:function(){throw new Error("not implemented")};var Qr=qr,te="function"==typeof Int32Array;var re="function"==typeof Int32Array?Int32Array:null;var ee,ne="function"==typeof Int32Array?Int32Array:void 0;ee=function(){var t,r,e;if("function"!=typeof re)return!1;try{r=new re([1,3.14,-3.14,2147483648]),e=r,t=(te&&e instanceof Int32Array||"[object Int32Array]"===$(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){t=!1}return t}()?ne:function(){throw new Error("not implemented")};var ie=ee,oe="function"==typeof Uint16Array;var ae="function"==typeof Uint16Array?Uint16Array:null;var ue,fe="function"==typeof Uint16Array?Uint16Array:void 0;ue=function(){var t,r,e;if("function"!=typeof ae)return!1;try{r=new ae(r=[1,3.14,-3.14,65536,65537]),e=r,t=(oe&&e instanceof Uint16Array||"[object Uint16Array]"===$(e))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?fe:function(){throw new Error("not implemented")};var se=ue,le="function"==typeof Int16Array;var he="function"==typeof Int16Array?Int16Array:null;var ce,pe="function"==typeof Int16Array?Int16Array:void 0;ce=function(){var t,r,e;if("function"!=typeof he)return!1;try{r=new he([1,3.14,-3.14,32768]),e=r,t=(le&&e instanceof Int16Array||"[object Int16Array]"===$(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){t=!1}return t}()?pe:function(){throw new Error("not implemented")};var ge=ce,ye="function"==typeof Uint8Array;function de(t){return ye&&t instanceof Uint8Array||"[object Uint8Array]"===$(t)}var me="function"==typeof Uint8Array?Uint8Array:null;var ve,we="function"==typeof Uint8Array?Uint8Array:void 0;ve=function(){var t,r;if("function"!=typeof me)return!1;try{t=de(r=new me(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}()?we:function(){throw new Error("not implemented")};var be=ve,_e="function"==typeof Uint8ClampedArray;var Ee="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Te,xe="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Te=function(){var t,r,e;if("function"!=typeof Ee)return!1;try{r=new Ee([-1,0,1,3.14,4.99,255,256]),e=r,t=(_e&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===$(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}()?xe:function(){throw new Error("not implemented")};var Ae=Te,Ve="function"==typeof Int8Array;var Oe="function"==typeof Int8Array?Int8Array:null;var Se,Re="function"==typeof Int8Array?Int8Array:void 0;Se=function(){var t,r,e;if("function"!=typeof Oe)return!1;try{r=new Oe([1,3.14,-3.14,128]),e=r,t=(Ve&&e instanceof Int8Array||"[object Int8Array]"===$(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){t=!1}return t}()?Re:function(){throw new Error("not implemented")};var je=Se;function Ie(t){return Tt(t)&&t>=0}function Le(t){return xt(t)&&t.valueOf()>=0}function Be(t){return Ie(t)||Le(t)}k(Be,"isPrimitive",Ie),k(Be,"isObject",Le);var Pe=4294967295;function Fe(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&_t(t.length)&&t.length>=0&&t.length<=Pe}var Ue="function"==typeof ArrayBuffer;function Me(t){return Ue&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===$(t)}var ke=Wt(ht.isPrimitive),Ce=Wt(ht.isObject),Ne=Wt(ht);function Ye(t,r,e){M(t,r,{configurable:!1,enumerable:!0,writable:!1,value:e})}function De(t,r){if(!(this instanceof De))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!ct(t))throw new TypeError(R("invalid argument. Real component must be a number. Value: `%s`.",t));if(!ct(r))throw new TypeError(R("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Ye(this,"re",t),Ye(this,"im",r),this}k(Ne,"primitives",ke),k(Ne,"objects",Ce),k(De,"name","Complex128"),k(De,"BYTES_PER_ELEMENT",8),k(De.prototype,"BYTES_PER_ELEMENT",8),k(De.prototype,"byteLength",16),k(De.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),k(De.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var ze="function"==typeof Math.fround?Math.fround:null,We=new Zr(1);var Ge="function"==typeof ze?ze:function(t){return We[0]=t,We[0]};function Je(t,r){if(!(this instanceof Je))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!ct(t))throw new TypeError(R("invalid argument. Real component must be a number. Value: `%s`.",t));if(!ct(r))throw new TypeError(R("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Ye(this,"re",Ge(t)),Ye(this,"im",Ge(r)),this}function $e(t){return t instanceof De||t instanceof Je||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function Ze(t){return _t(t/2)}k(Je,"name","Complex64"),k(Je,"BYTES_PER_ELEMENT",4),k(Je.prototype,"BYTES_PER_ELEMENT",4),k(Je.prototype,"byteLength",8),k(Je.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),k(Je.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var Ke=8;function Xe(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Ke}var qe=16;function He(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===qe}function Qe(){return"function"==typeof G&&"symbol"==typeof G("foo")&&W(G,"iterator")&&"symbol"==typeof G.iterator}var tn=Qe()?Symbol.iterator:null;function rn(t){return t.re}function en(t){return t.im}function nn(t,r){return new Zr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function on(t,r){return new zr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function an(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Fe(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!$e(n))return new TypeError(R("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(rn(n),en(n))}return r}var un=2*Zr.BYTES_PER_ELEMENT,fn=Qe();function sn(t){return t instanceof cn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function ln(t){return t===cn||"Complex128Array"===t.name}function hn(t,r){return new Je(t[r*=2],t[r+1])}function cn(){var t,r,e,n;if(r=arguments.length,!(this instanceof cn))return 0===r?new cn:1===r?new cn(arguments[0]):2===r?new cn(arguments[0],arguments[1]):new cn(arguments[0],arguments[1],arguments[2]);if(0===r)e=new Zr(0);else if(1===r)if(Ie(arguments[0]))e=new Zr(2*arguments[0]);else if(Kt(arguments[0]))if((n=(e=arguments[0]).length)&&Nt(e)&&$e(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!$e(n=r[i]))return null;t[o]=rn(n),t[o+1]=en(n),o+=2}return t}(new Zr(2*n),e),null===e){if(!Ze(n))throw new RangeError(R("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Zr(arguments[0])}}else{if(Xe(e))e=nn(e,0);else if(He(e))e=on(e,0);else if(!Ze(n))throw new RangeError(R("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Zr(e)}else if(Me(arguments[0])){if(!_t((e=arguments[0]).byteLength/un))throw new RangeError(R("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",un,e.byteLength));e=new Zr(e)}else{if(!pr(arguments[0]))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===fn)throw new TypeError(R("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!gr(e[tn]))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!gr((e=e[tn]()).next))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=an(e))instanceof Error)throw e;e=new Zr(e)}else{if(!Me(e=arguments[0]))throw new TypeError(R("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Ie(t=arguments[1]))throw new TypeError(R("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!_t(t/un))throw new RangeError(R("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",un,t));if(2===r){if(!_t((n=e.byteLength-t)/un))throw new RangeError(R("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",un,n));e=new Zr(e,t)}else{if(!Ie(n=arguments[2]))throw new TypeError(R("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*un>e.byteLength-t)throw new RangeError(R("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*un));e=new Zr(e,t,2*n)}}return k(this,"_buffer",e),k(this,"_length",e.length/2),this}function pn(t){return t.re}function gn(t){return t.im}function yn(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Fe(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!$e(n))return new TypeError(R("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(pn(n),gn(n))}return r}k(cn,"BYTES_PER_ELEMENT",un),k(cn,"name","Complex64Array"),k(cn,"from",(function(t){var r,e,n,i,o,a,u,f,s,l,h,c;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ln(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!gr(n=arguments[1]))throw new TypeError(R("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(sn(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if($e(l=n.call(r,t.get(h),h)))o[c]=rn(l),o[c+1]=en(l);else{if(!(Fe(l)&&l.length>=2))throw new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(t)}if(Kt(t)){if(n){for(f=t.length,u=t.get&&t.set?Fr("default"):Ir("default"),h=0;h<f;h++)if(!$e(u(t,h))){s=!0;break}if(s){if(!Ze(f))throw new RangeError(R("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(r,u(t,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if($e(l=n.call(r,u(t,h),h)))o[c]=rn(l),o[c+1]=en(l);else{if(!(Fe(l)&&l.length>=2))throw new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(t)}if(pr(t)&&fn&&gr(t[tn])){if(!gr((o=t[tn]()).next))throw new TypeError(R("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,Fe(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!$e(o))return new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(rn(o),en(o))}return n}(o,n,r):an(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(R("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),k(cn,"of",(function(){var t,r;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ln(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(cn.prototype,"at",(function(t){if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(t))throw new TypeError(R("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return hn(this._buffer,t)})),at(cn.prototype,"buffer",(function(){return this._buffer.buffer})),at(cn.prototype,"byteLength",(function(){return this._buffer.byteLength})),at(cn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),k(cn.prototype,"BYTES_PER_ELEMENT",cn.BYTES_PER_ELEMENT),k(cn.prototype,"copyWithin",(function(t,r){if(!sn(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(cn.prototype,"entries",(function(){var t,r,e,n,i,o;if(!sn(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,hn(n,o)],done:!1}})),k(r,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),tn&&k(r,tn,(function(){return t.entries()})),r})),k(cn.prototype,"every",(function(t,r){var e,n;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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,hn(e,n),n,this))return!1;return!0})),k(cn.prototype,"fill",(function(t,r,e){var n,i,o,a,u,f;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!_t(e))throw new TypeError(R("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=rn(t),u=en(t),f=r;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),k(cn.prototype,"filter",(function(t,r){var e,n,i,o;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=hn(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),k(cn.prototype,"find",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=hn(e,n),t.call(r,i,n,this))return i})),k(cn.prototype,"findIndex",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=hn(e,n),t.call(r,i,n,this))return n;return-1})),k(cn.prototype,"findLast",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=hn(e,n),t.call(r,i,n,this))return i})),k(cn.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=hn(e,n),t.call(r,i,n,this))return n;return-1})),k(cn.prototype,"forEach",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=hn(e,n),t.call(r,i,n,this)})),k(cn.prototype,"get",(function(t){if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ie(t))throw new TypeError(R("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return hn(this._buffer,t)})),k(cn.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=rn(t),o=en(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(cn.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=rn(t),o=en(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(cn.prototype,"join",(function(t){var r,e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!ut(t))throw new TypeError(R("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(hn(e,i).toString());return r.join(n)})),k(cn.prototype,"keys",(function(){var t,r,e,n,i;if(!sn(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}})),tn&&k(r,tn,(function(){return t.keys()})),r})),k(cn.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("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=rn(t),o=en(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),at(cn.prototype,"length",(function(){return this._length})),k(cn.prototype,"map",(function(t,r){var e,n,i,o,a;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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($e(a=t.call(r,hn(n,o),o,this)))e[2*o]=rn(a),e[2*o+1]=en(a);else{if(!Fe(a)||2!==a.length)throw new TypeError(R("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(cn.prototype,"reduce",(function(t,r){var e,n,i,o;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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=hn(e,0),o=1}for(;o<i;o++)n=t(n,hn(e,o),o,this);return n})),k(cn.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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=hn(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,hn(e,o),o,this);return n})),k(cn.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=bt(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(cn.prototype,"set",(function(t){var r,e,n,i,o,a,u,f,s;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Ie(e=arguments[1]))throw new TypeError(R("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if($e(t)){if(e>=this._length)throw new RangeError(R("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=rn(t),void(n[e+1]=en(t))}if(sn(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*un,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Zr(r.length),f=0;f<r.length;f++)i[f]=r[f];r=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=2}else{if(!Kt(t))throw new TypeError(R("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,f=0;f<a;f++)if(!$e(t[f])){o=!0;break}if(o){if(!Ze(a))throw new RangeError(R("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*un,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new Zr(a),f=0;f<a;f++)i[f]=r[f];r=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)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,f=0;f<a;f++)u=t[f],n[e]=rn(u),n[e+1]=en(u),e+=2}})),k(cn.prototype,"slice",(function(t,r){var e,n,i,o,a,u,f;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,r=u;else{if(!_t(t))throw new TypeError(R("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)r=u;else{if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=u)<0&&(r=0):r>u&&(r=u)}}for(e=t<r?r-t:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+t),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),k(cn.prototype,"some",(function(t,r){var e,n;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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,hn(e,n),n,this))return!0;return!1})),k(cn.prototype,"sort",(function(t){var r,e,n,i,o;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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(hn(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=rn(r[i]),e[o+1]=en(r[i]);return this})),k(cn.prototype,"subarray",(function(t,r){var e,n,i;if(!sn(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(!_t(t))throw new TypeError(R("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(!_t(r))throw new TypeError(R("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*un):(i=r-t,e=n.byteOffset+t*un),new this.constructor(n.buffer,e,i<0?0:i)})),k(cn.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!ut(t)&&!ke(t))throw new TypeError(R("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(!pr(r))throw new TypeError(R("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(hn(o,a).toLocaleString(n,e));return i.join(",")})),k(cn.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!sn(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(cn.prototype,"toSorted",(function(t){var r,e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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(hn(e,i));return r.sort(t),new cn(r)})),k(cn.prototype,"toString",(function(){var t,r,e;if(!sn(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(hn(r,e).toString());return t.join(",")})),k(cn.prototype,"values",(function(){var t,r,e,n,i,o;if(!sn(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:hn(i,o),done:!1}})),k(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),tn&&k(t,tn,(function(){return r.values()})),t})),k(cn.prototype,"with",(function(t,r){var e,n,i;if(!sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(t))throw new TypeError(R("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(R("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!$e(r))throw new TypeError(R("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=rn(r),e[2*t+1]=en(r),n}));var dn=2*zr.BYTES_PER_ELEMENT,mn=Qe();function vn(t){return t instanceof _n||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function wn(t){return t===_n||"Complex64Array"===t.name}function bn(t,r){return new De(t[r*=2],t[r+1])}function _n(){var t,r,e,n;if(r=arguments.length,!(this instanceof _n))return 0===r?new _n:1===r?new _n(arguments[0]):2===r?new _n(arguments[0],arguments[1]):new _n(arguments[0],arguments[1],arguments[2]);if(0===r)e=new zr(0);else if(1===r)if(Ie(arguments[0]))e=new zr(2*arguments[0]);else if(Kt(arguments[0]))if((n=(e=arguments[0]).length)&&Nt(e)&&$e(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!$e(n=r[i]))return null;t[o]=pn(n),t[o+1]=gn(n),o+=2}return t}(new zr(2*n),e),null===e){if(!Ze(n))throw new RangeError(R("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new zr(arguments[0])}}else{if(Xe(e))e=nn(e,0);else if(He(e))e=on(e,0);else if(!Ze(n))throw new RangeError(R("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new zr(e)}else if(Me(arguments[0])){if(!_t((e=arguments[0]).byteLength/dn))throw new RangeError(R("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",dn,e.byteLength));e=new zr(e)}else{if(!pr(arguments[0]))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===mn)throw new TypeError(R("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!gr(e[tn]))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!gr((e=e[tn]()).next))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=yn(e))instanceof Error)throw e;e=new zr(e)}else{if(!Me(e=arguments[0]))throw new TypeError(R("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Ie(t=arguments[1]))throw new TypeError(R("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!_t(t/dn))throw new RangeError(R("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",dn,t));if(2===r){if(!_t((n=e.byteLength-t)/dn))throw new RangeError(R("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",dn,n));e=new zr(e,t)}else{if(!Ie(n=arguments[2]))throw new TypeError(R("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*dn>e.byteLength-t)throw new RangeError(R("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*dn));e=new zr(e,t,2*n)}}return k(this,"_buffer",e),k(this,"_length",e.length/2),this}function En(t){var r,e;for(r=[];!(e=t.next()).done;)r.push(Z(e.value));return r}k(_n,"BYTES_PER_ELEMENT",dn),k(_n,"name","Complex128Array"),k(_n,"from",(function(t){var r,e,n,i,o,a,u,f,s,l,h,c;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!wn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!gr(n=arguments[1]))throw new TypeError(R("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(vn(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if($e(l=n.call(r,t.get(h),h)))o[c]=pn(l),o[c+1]=gn(l);else{if(!(Fe(l)&&l.length>=2))throw new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(t)}if(Kt(t)){if(n){for(f=t.length,u=t.get&&t.set?Fr("default"):Ir("default"),h=0;h<f;h++)if(!$e(u(t,h))){s=!0;break}if(s){if(!Ze(f))throw new RangeError(R("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(r,u(t,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if($e(l=n.call(r,u(t,h),h)))o[c]=pn(l),o[c+1]=gn(l);else{if(!(Fe(l)&&l.length>=2))throw new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(t)}if(pr(t)&&mn&&gr(t[tn])){if(!gr((o=t[tn]()).next))throw new TypeError(R("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,Fe(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!$e(o))return new TypeError(R("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(pn(o),gn(o))}return n}(o,n,r):yn(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(R("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),k(_n,"of",(function(){var t,r;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!wn(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(_n.prototype,"at",(function(t){if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(t))throw new TypeError(R("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return bn(this._buffer,t)})),at(_n.prototype,"buffer",(function(){return this._buffer.buffer})),at(_n.prototype,"byteLength",(function(){return this._buffer.byteLength})),at(_n.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),k(_n.prototype,"BYTES_PER_ELEMENT",_n.BYTES_PER_ELEMENT),k(_n.prototype,"copyWithin",(function(t,r){if(!vn(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(_n.prototype,"entries",(function(){var t,r,e,n,i,o,a;if(!vn(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 De(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}})),tn&&k(e,tn,(function(){return r.entries()})),e})),k(_n.prototype,"every",(function(t,r){var e,n;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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,bn(e,n),n,this))return!1;return!0})),k(_n.prototype,"fill",(function(t,r,e){var n,i,o,a,u,f;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!_t(e))throw new TypeError(R("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=pn(t),u=gn(t),f=r;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),k(_n.prototype,"filter",(function(t,r){var e,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=bn(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),k(_n.prototype,"find",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=bn(e,n),t.call(r,i,n,this))return i})),k(_n.prototype,"findIndex",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=bn(e,n),t.call(r,i,n,this))return n;return-1})),k(_n.prototype,"findLast",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=bn(e,n),t.call(r,i,n,this))return i})),k(_n.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=bn(e,n),t.call(r,i,n,this))return n;return-1})),k(_n.prototype,"forEach",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=bn(e,n),t.call(r,i,n,this)})),k(_n.prototype,"get",(function(t){if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ie(t))throw new TypeError(R("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return bn(this._buffer,t)})),at(_n.prototype,"length",(function(){return this._length})),k(_n.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=pn(t),o=gn(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(_n.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=pn(t),o=gn(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(_n.prototype,"join",(function(t){var r,e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!ht(t))throw new TypeError(R("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(bn(e,i).toString());return r.join(n)})),k(_n.prototype,"keys",(function(){var t,r,e,n,i;if(!vn(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}})),tn&&k(r,tn,(function(){return t.keys()})),r})),k(_n.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!$e(t))throw new TypeError(R("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!_t(r))throw new TypeError(R("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=pn(t),o=gn(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),k(_n.prototype,"map",(function(t,r){var e,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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($e(a=t.call(r,bn(n,o),o,this)))e[2*o]=pn(a),e[2*o+1]=gn(a);else{if(!Fe(a)||2!==a.length)throw new TypeError(R("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(_n.prototype,"reduce",(function(t,r){var e,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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=bn(e,0),o=1}for(;o<i;o++)n=t(n,bn(e,o),o,this);return n})),k(_n.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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=bn(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,bn(e,o),o,this);return n})),k(_n.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=bt(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(_n.prototype,"set",(function(t){var r,e,n,i,o,a,u,f,s;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Ie(e=arguments[1]))throw new TypeError(R("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if($e(t)){if(e>=this._length)throw new RangeError(R("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=pn(t),void(n[e+1]=gn(t))}if(vn(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*dn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new zr(r.length),f=0;f<r.length;f++)i[f]=r[f];r=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=r[s],n[e+1]=r[s+1],e+=2,s+=2}else{if(!Kt(t))throw new TypeError(R("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,f=0;f<a;f++)if(!$e(t[f])){o=!0;break}if(o){if(!Ze(a))throw new RangeError(R("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*dn,r.buffer===n.buffer&&r.byteOffset<s&&r.byteOffset+r.byteLength>s){for(i=new zr(a),f=0;f<a;f++)i[f]=r[f];r=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)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,f=0;f<a;f++)u=t[f],n[e]=pn(u),n[e+1]=gn(u),e+=2}})),k(_n.prototype,"slice",(function(t,r){var e,n,i,o,a,u,f;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,r=u;else{if(!_t(t))throw new TypeError(R("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)r=u;else{if(!_t(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=u)<0&&(r=0):r>u&&(r=u)}}for(e=t<r?r-t:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+t),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),k(_n.prototype,"some",(function(t,r){var e,n;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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,bn(e,n),n,this))return!0;return!1})),k(_n.prototype,"sort",(function(t){var r,e,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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(bn(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=pn(r[i]),e[o+1]=gn(r[i]);return this})),k(_n.prototype,"subarray",(function(t,r){var e,n,i;if(!vn(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(!_t(t))throw new TypeError(R("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(!_t(r))throw new TypeError(R("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*dn):(i=r-t,e=n.byteOffset+t*dn),new this.constructor(n.buffer,e,i<0?0:i)})),k(_n.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!ht(t)&&!ke(t))throw new TypeError(R("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(!pr(r))throw new TypeError(R("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(bn(o,a).toLocaleString(n,e));return i.join(",")})),k(_n.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!vn(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(_n.prototype,"toSorted",(function(t){var r,e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(t))throw new TypeError(R("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(bn(e,i));return r.sort(t),new _n(r)})),k(_n.prototype,"toString",(function(){var t,r,e;if(!vn(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(bn(r,e).toString());return t.join(",")})),k(_n.prototype,"values",(function(){var t,r,e,n,i,o;if(!vn(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:bn(i,o),done:!1}})),k(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),tn&&k(t,tn,(function(){return r.values()})),t})),k(_n.prototype,"with",(function(t,r){var e,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_t(t))throw new TypeError(R("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(R("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!$e(r))throw new TypeError(R("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=pn(r),e[2*t+1]=gn(r),n}));var Tn=be.BYTES_PER_ELEMENT,xn=Qe();function An(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Tn}function Vn(t){return t===On}function On(){var t,r,e,n,i;if(r=arguments.length,!(this instanceof On))return 0===r?new On:1===r?new On(arguments[0]):2===r?new On(arguments[0],arguments[1]):new On(arguments[0],arguments[1],arguments[2]);if(0===r)e=new be(0);else if(1===r)if(Ie(i=arguments[0]))e=new be(i);else if(Kt(i))e=function(t,r){var e,n;for(e=r.length,n=0;n<e;n++)t[n]=Z(r[n]);return t}(new be(i.length),i);else if(Me(i))e=new be(i);else{if(!pr(i))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===xn)throw new TypeError(R("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!gr(i[tn]))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!gr((e=i[tn]()).next))throw new TypeError(R("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new be(En(e))}else{if(!Me(e=arguments[0]))throw new TypeError(R("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Ie(t=arguments[1]))throw new TypeError(R("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===r)e=new be(e,t);else{if(!Ie(n=arguments[2]))throw new TypeError(R("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Tn>e.byteLength-t)throw new RangeError(R("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Tn));e=new be(e,t,n)}}return k(this,"_buffer",e),k(this,"_length",e.length),this}k(On,"BYTES_PER_ELEMENT",Tn),k(On,"name","BooleanArray"),k(On,"from",(function(t){var r,e,n,i,o,a,u,f,s;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!gr(n=arguments[1]))throw new TypeError(R("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(Kt(t)){if(n){for(f=t.length,u=t.get&&t.set?Fr("default"):Ir("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=Z(n.call(r,u(t,s),s));return i}return new this(t)}if(pr(t)&&xn&&gr(t[tn])){if(!gr((o=t[tn]()).next))throw new TypeError(R("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(Z(r.call(e,i.value,o)));return n}(o,n,r):En(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(R("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),k(On,"of",(function(){var t,r;if(!gr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Vn(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(On.prototype,"at",(function(t){var r,e;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(t))throw new TypeError(R("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 Z(r[t])})),at(On.prototype,"buffer",(function(){return this._buffer.buffer})),at(On.prototype,"byteLength",(function(){return this._buffer.byteLength})),at(On.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),k(On.prototype,"BYTES_PER_ELEMENT",On.BYTES_PER_ELEMENT),k(On.prototype,"copyWithin",(function(t,r){if(!An(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(On.prototype,"entries",(function(){var t,r,e,n,i,o;if(!An(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,Z(n[o])],done:!1}})),k(r,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),tn&&k(r,tn,(function(){return t.entries()})),r})),k(On.prototype,"every",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("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,Z(e[n]),n,this))return!1;return!0})),k(On.prototype,"fill",(function(t,r,e){var n,i,o,a;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!C(t))throw new TypeError(R("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Tt(r))throw new TypeError(R("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Tt(e))throw new TypeError(R("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(On.prototype,"filter",(function(t,r){var e,n,i,o;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Z(e[i]),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),k(On.prototype,"find",(function(t,r){var e,n,i;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=Z(e[i]),t.call(r,n,i,this))return n})),k(On.prototype,"findIndex",(function(t,r){var e,n,i;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=Z(e[i]),t.call(r,n,i,this))return i;return-1})),k(On.prototype,"findLast",(function(t,r){var e,n,i;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Z(e[i]),t.call(r,n,i,this))return n})),k(On.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Z(e[i]),t.call(r,n,i,this))return i;return-1})),k(On.prototype,"forEach",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)t.call(r,Z(e[n]),n,this)})),k(On.prototype,"get",(function(t){if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ie(t))throw new TypeError(R("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Z(this._buffer[t])})),k(On.prototype,"includes",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!C(t))throw new TypeError(R("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Tt(r))throw new TypeError(R("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===Z(e[n]))return!0;return!1})),k(On.prototype,"indexOf",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!C(t))throw new TypeError(R("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Tt(r))throw new TypeError(R("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===Z(e[n]))return n;return-1})),k(On.prototype,"join",(function(t){var r,e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!ut(t))throw new TypeError(R("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(On.prototype,"keys",(function(){var t,r,e,n,i;if(!An(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}})),tn&&k(r,tn,(function(){return t.keys()})),r})),k(On.prototype,"lastIndexOf",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!C(t))throw new TypeError(R("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Tt(r))throw new TypeError(R("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===Z(e[n]))return n;return-1})),at(On.prototype,"length",(function(){return this._length})),k(On.prototype,"map",(function(t,r){var e,n,i,o;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(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]=Z(t.call(r,Z(i[o]),o,this));return n})),k(On.prototype,"reduce",(function(t,r){var e,n,i,o;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("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=Z(e[0]),o=1}for(;o<n;o++)i=t(i,Z(e[o]),o,this);return i})),k(On.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("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=Z(e[n-1]),o=n-2}for(;o>=0;o--)i=t(i,Z(e[o]),o,this);return i})),k(On.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,e=this._length,n=bt(e/2),i=0;i<n;i++)o=e-i-1,r=t[i],t[i]=t[o],t[o]=r;return this})),k(On.prototype,"set",(function(t){var r,e,n,i,o,a,u;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!Ie(e=arguments[1]))throw new TypeError(R("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Kt(t)){if(e+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=An(t)?t._buffer:t,u=n.byteOffset+e*Tn,r.buffer===n.buffer&&r.byteOffset<u&&r.byteOffset+r.byteLength>u){for(i=new be(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(R("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=t?1:0}})),k(On.prototype,"slice",(function(t,r){var e,n,i,o,a,u;if(!An(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(!Tt(t))throw new TypeError(R("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(!Tt(r))throw new TypeError(R("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,u=0;u<e;u++)n[u]=o[u+t];return i})),k(On.prototype,"some",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gr(t))throw new TypeError(R("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,Z(e[n]),n,this))return!0;return!1})),k(On.prototype,"sort",(function(t){var r;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,0===arguments.length)return r.sort(),this;if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(Z(r),Z(e))})),this})),k(On.prototype,"subarray",(function(t,r){var e,n,i;if(!An(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(!Tt(t))throw new TypeError(R("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(!Tt(r))throw new TypeError(R("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*Tn):(i=r-t,e=n.byteOffset+t*Tn),new this.constructor(n.buffer,e,i<0?0:i)})),k(On.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!ut(t)&&!ke(t))throw new TypeError(R("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(!pr(r))throw new TypeError(R("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(Z(o[a]).toLocaleString(n,e));return i.join(",")})),k(On.prototype,"toReversed",(function(){var t,r,e,n,i;if(!An(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(On.prototype,"toSorted",(function(t){var r,e,n,i,o;if(!An(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(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(Z(r),Z(e))})),e})),k(On.prototype,"toString",(function(){var t,r,e;if(!An(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(On.prototype,"values",(function(){var t,r,e,n,i,o;if(!An(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:Z(i[o]),done:!1}})),k(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),tn&&k(t,tn,(function(){return r.values()})),t})),k(On.prototype,"with",(function(t,r){var e,n;if(!An(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(t))throw new TypeError(R("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(R("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!C(r))throw new TypeError(R("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 Sn=[zr,Zr,ie,Qr,ge,se,je,be,Ae,cn,_n,On],Rn=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],jn=Rn.length;function In(t){var r;if(Nt(t))return"generic";if(nr(t))return null;for(r=0;r<jn;r++)if(t instanceof Sn[r])return Rn[r];return kr[ir(t)]||null}function Ln(t){var r=In(t);return Rr(t)?{data:t,dtype:r,accessorProtocol:!0,accessors:[Fr(r),Mr(r)]}:{data:t,dtype:r,accessorProtocol:!1,accessors:[Ir(r),Br(r)]}}var Bn=Array.prototype.slice;function Pn(t,r,e){var n;return function(t,r){return"function"==typeof t[r]}(t,"slice")?t.slice(r,e):(n=Ln(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 Fn(t,r){return r&&(2===t||3===t)}function Un(t,r){return r&&(1===t||3===t)}function Mn(t,r,e){var n,i,o,a,u;for(n=t.length,i=e,o=e,u=0;u<n;u++){if(0===t[u])return[e,e];(a=r[u])>0?o+=a*(t[u]-1):a<0&&(i+=a*(t[u]-1))}return[i,o]}function kn(t){return"column-major"===t}k(Mn,"assign",(function(t,r,e,n){var i,o,a,u,f;for(i=t.length,o=e,a=e,f=0;f<i;f++){if(0===t[f])return n[0]=e,n[1]=e,n;(u=r[f])>0?a+=u*(t[f]-1):u<0&&(o+=u*(t[f]-1))}return n[0]=o,n[1]=a,n}));var Cn=/[-\/\\^$*+?.()|[\]{}]/g;var Nn=RegExp.prototype.exec;var Yn=Y();function Dn(t){return"object"==typeof t&&(t instanceof RegExp||(Yn?function(t){try{return Nn.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===$(t)))}function zn(t,r,e){return t.replace(r,e)}function Wn(t,r,e){if(!ut(t))throw new TypeError(R("invalid argument. First argument must be a string. Value: `%s`.",t));if(ut(r))r=new RegExp(function(t){var r,e;if(!ut(t))throw new TypeError(R("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(Cn,"\\$&"):(r=(r=t.substring(1,e)).replace(Cn,"\\$&"),t=t[0]+r+t.substring(e))}(r),"g");else if(!Dn(r))throw new TypeError(R("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",r));if(!ut(e)&&!gr(e))throw new TypeError(R("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return zn(t,r,e)}var Gn={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 Jn,$n={uint16:se,uint8:be};(Jn=new $n.uint16(1))[0]=4660;var Zn=52===new $n.uint8(Jn.buffer)[0],Kn="function"==typeof ArrayBuffer?ArrayBuffer:null;var Xn,qn="function"==typeof ArrayBuffer?ArrayBuffer:void 0;Xn=function(){var t,r,e;if("function"!=typeof Kn)return!1;try{(t=Me(e=new Kn(16))&&"function"==typeof Kn.isView)&&((r=new zr(e))[0]=-3.14,r[1]=NaN,t=t&&Kn.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 Hn=Xn,Qn="function"==typeof DataView;var ti="function"==typeof DataView?DataView:null;var ri,ei="function"==typeof DataView?DataView:void 0;ri=function(){var t,r,e,n;if("function"!=typeof ti)return!1;try{e=new Hn(24),r=new ti(e,8),n=r,(t=(Qn&&n instanceof DataView||"[object DataView]"===$(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}()?ei:function(){throw new Error("not implemented")};var ni=ri,ii="function"==typeof BigInt?BigInt:void 0,oi=["row-major","column-major"];function ai(){return oi.slice()}var ui=["row-major","column-major"];function fi(){return{"row-major":101,"column-major":102}}k((function(){return ui.slice()}),"enum",fi);var si={"row-major":101,"column-major":102};function li(){return{"row-major":si["row-major"],"column-major":si["column-major"]}}k(ai,"enum",li);var hi=["throw","normalize","clamp","wrap"];function ci(){return hi.slice()}function pi(){return{throw:1,clamp:2,wrap:3,normalize:4}}k(ci,"enum",pi);var 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},yi=li(),di={throw:1,clamp:2,wrap:3,normalize:4};var mi=4294967295,vi=4294967296,wi=new be(8),bi=new ni(wi.buffer);function _i(t,r,e,n){var i,o,a;if(0===t){for(a=0;a<wi.length;a++)r[n]=0,n+=e;return r}for(o=(t&mi)>>>0,i=bt(t/vi),Zn?(bi.setUint32(0,o,Zn),bi.setUint32(4,i,Zn)):(bi.setUint32(0,i,Zn),bi.setUint32(4,o,Zn)),a=0;a<wi.length;a++)r[n]=wi[a],n+=e;return r}k((function(t){var r,e,n,i;return r=new be(8),0===t||(i=(4294967295&t)>>>0,n=bt(t/4294967296),e=new ni(r.buffer),Zn?(e.setUint32(0,i,Zn),e.setUint32(4,n,Zn)):(e.setUint32(0,n,Zn),e.setUint32(4,i,Zn))),r}),"assign",_i);var Ei={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},Ti=li(),xi={throw:1,clamp:2,wrap:3,normalize:4};function Ai(t,r,e,n,i,o){var a,u,f,s,l;if(!(this instanceof Ai))return new Ai(t,r,e,n,i,o);for(s=1,l=0;l<e.length;l++)s*=e[l];return u=r.BYTES_PER_ELEMENT?r.BYTES_PER_ELEMENT*s:null,this._byteLength=u,this._bytesPerElement=xr(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=Z(r.get&&r.set),this._iterationOrder=Ar(n),a=function(t,r,e,n,i){var o;return 0!==t&&0!==i&&t===(o=Mn(r,e,n))[1]-o[0]+1}(s,e,n,i,this._iterationOrder),f=Or(n),this._flags={ROW_MAJOR_CONTIGUOUS:Un(f,a),COLUMN_MAJOR_CONTIGUOUS:Fn(f,a),READONLY:!1},this.__meta_dataview__=null,this}function Vi(t){return gr(t)&&Vt(t.alignment)&&Vt(t.byteLength)&&gr(t.byteLengthOf)&&gr(t.byteOffsetOf)&&gr(t.bufferOf)&&gr(t.isStruct)&&gr(t.viewOf)&&W(t,"fields")&&W(t,"layout")}k(Ai,"name","ndarray"),at(Ai.prototype,"byteLength",(function(){return this._byteLength})),at(Ai.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),at(Ai.prototype,"data",(function(){return this._buffer})),at(Ai.prototype,"dtype",(function(){return this._dtype})),at(Ai.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})),at(Ai.prototype,"length",(function(){return this._length})),at(Ai.prototype,"ndims",(function(){return this._ndims})),at(Ai.prototype,"offset",(function(){return this._offset})),at(Ai.prototype,"order",(function(){return this._order})),at(Ai.prototype,"shape",(function(){return Pn(this._shape,0,this._shape.length)})),at(Ai.prototype,"strides",(function(){return Pn(this._strides,0,this._strides.length)})),k(Ai.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(Ai.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,kn(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(Ai.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(Ai.prototype,"iset",(function(t,r){var e,n,i,o,a,u;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,kn(this._order)){for(u=0;u<i;u++)t-=a=t%n[u],t/=n[u],o+=a*e[u];return this._accessors?this._buffer.set(r,o):this._buffer[o]=r,this}for(u=i-1;u>=0;u--)t-=a=t%n[u],t/=n[u],o+=a*e[u];return this._accessors?this._buffer.set(r,o):this._buffer[o]=r,this})),k(Ai.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+=pn(i=this.iget(o))+", "+gn(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+=pn(i=this.iget(o))+", "+gn(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+=pn(i=this.iget(this._length-1-o))+", "+gn(i),o>0&&(t+=", ");else for(o=2;o>=0;o--)t+=this.iget(this._length-1-o),o>0&&(t+=", ")}if(e+=Wn(Gn[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(Ai.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(pn(e),gn(e));else for(n=0;n<r;n++)t.data.push(this.iget(n));return t})),k(Ai.prototype,"valueOf",(function(){return 0===this._ndims?this.iget():this})),k(Ai.prototype,"__array_meta_dataview__","function"==typeof ot.BigInt&&"function"==typeof BigInt&&"bigint"==typeof ot.BigInt("1")&&"bigint"==typeof BigInt("1")?function(){var t,r,e,n,i,o,a,u,f,s,l,h,c,p;if(f=this._mode||"throw",a=this._submode||[f],e=33+16*(h=this._ndims)+(c=a.length),(u=this.__meta_dataview__)&&u.byteLength===e)return u;for(u=new ni(new Hn(e)),i=this._shape,o=this._strides,n=this._dtype,t=this._bytesPerElement,s=0,u.setInt8(s,Zn?1:0),s+=1,u.setInt16(s,gi[n],Zn),s+=2,u.setBigInt64(s,ii(h),Zn),l=8*h,s+=8,p=0;p<h;p++)u.setBigInt64(s,ii(i[p]),Zn),u.setBigInt64(s+l,ii(o[p]*t),Zn),s+=8;for(s+=l,u.setBigInt64(s,ii(this._offset*t),Zn),s+=8,u.setInt8(s,yi[this._order]),s+=1,u.setInt8(s,di[f]),s+=1,u.setBigInt64(s,ii(c),Zn),s+=8,p=0;p<c;p++)u.setInt8(s,di[a[p]]),s+=1;return r=0,r|=this._flags.READONLY?4:0,u.setInt32(s,r,Zn),this.__meta_dataview__=u,u}:function(){var t,r,e,n,i,o,a,u,f,s,l,h,c,p,g;if(s=this._mode||"throw",u=this._submode||[s],n=33+16*(c=this._ndims)+(p=u.length),(f=this.__meta_dataview__)&&f.byteLength===n)return f;for(f=new ni(new Hn(n)),r=new be(f.buffer),o=this._shape,a=this._strides,i=this._dtype,t=this._bytesPerElement,l=0,f.setInt8(l,Zn?1:0),l+=1,f.setInt16(l,Ei[i],Zn),_i(c,r,1,l+=2),h=8*c,l+=8,g=0;g<c;g++)_i(o[g],r,1,l),_i(a[g]*t,r,1,l+h),l+=8;for(l+=h,_i(this._offset*t,r,1,l),l+=8,f.setInt8(l,Ti[this._order]),l+=1,f.setInt8(l,xi[s]),_i(p,r,1,l+=1),l+=8,g=0;g<p;g++)f.setInt8(l,xi[u[g]]),l+=1;return e=0,e|=this._flags.READONLY?4:0,f.setInt32(l,e,Zn),this.__meta_dataview__=f,f});var Oi={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 Si(t){var r=Oi[t];return ct(r)?r:null}function Ri(t){var r=typeof t;return"string"===r?null===Si(t)?null:t:"number"===r?Er(t):"object"===r&&t?String(t):Vi(t)?t.layout:null}var ji,Ii={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var Li=function(t){return 0===arguments.length?function(){var t,r,e,n,i,o,a,u,f;for(e={},r=(t=cr(Ii)).length,f=0;f<r;f++){for(i=t[f],a=Ii[i],n={},u=0;u<r;u++)n[o=t[u]]=a[o];e[i]=n}return e}():(void 0===ji&&(ji=function(){var t,r,e,n,i,o,a,u,f;for(e={},r=(t=cr(Ii)).length,f=0;f<r;f++){for(i=t[f],a=Ii[i],n=[],u=0;u<r;u++)1===a[o=t[u]]&&n.push(o);e[i]=n}return e}()),t=Ri(t),W(ji,t)?ji[t].slice():null)}();function Bi(t){var r,e,n;if(!Kt(t))throw new TypeError(R("invalid argument. Must provide an array-like object. Value: `%s`.",t));return n=In(t),Rr(t)&&(r=Fr(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((function(t,r){var e,n,i,o;for(i=In(t),n=Rr(t)?Fr(i):Ir(i),e=t.length,o=0;o<e;o++)if(n(t,o)===r)return!0;return!1}),"factory",Bi);var Pi={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"]},Fi=/_and_generic$/;function Ui(){var t,r,e;return 0===arguments.length?Pi.all.slice():(e=!1,t=arguments[0],Fi.test(t)&&"all"!==(t=zn(t,Fi,""))&&"index"!==t&&(e=!0),r=(r=Pi[t])?r.slice():[],e&&r.length>0&&r.push("generic"),r)}var Mi,ki,Ci,Ni=Bi(Ui());function Yi(t,r){return null!=t&&("symbol"==typeof r?r in Object(t):String(r)in Object(t))}function Di(t,r){var e,n,i;if(e=arguments.length,!(this instanceof Di))return e<2?new Di(t):new Di(t,r);if(Ni(t))n="builtin";else{if(function(t){return t instanceof Di||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&ut(t.char)&&ut(t.description)&&ut(t.byteOrder)&&Yi(t,"value")}(t))return new Di(t.value,{description:t.description});if(!Vi(t))throw new TypeError(R("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(!br(i=r))throw new TypeError(R("invalid argument. Options argument must be an object. Value: `%s`.",i));if(W(i,"description")&&!ut(i.description))throw new TypeError(R("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===Mi&&(Mi={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"}),Mi[Ri(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===ki&&(ki={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"}),ki[Ri(t)]||null)}(t)||""),k(this,"_enum",function(t){var r=typeof t;return"number"===r?Er(t)?t:null:"string"===r?Si(t):"object"===r&&t&&Tt(t.enum)?t.enum:Vi(t)?Si("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===Ci&&(Ci={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?Vt(r=t.alignment)?r:Ci[Ri(t)]||null:null)}(t)||-1),k(this,"_byteLength",xr(t)||-1),k(this,"_byteOrder","host"),k(this,"_type",n),this}function zi(t){return gr(t)&&Vt(t.alignment)&&Vt(t.byteLength)&&gr(t.byteLengthOf)&&gr(t.byteOffsetOf)&&gr(t.bufferOf)&&gr(t.viewOf)||function(t){return t instanceof Di||"object"==typeof t&&null!==t&&Tt(t.alignment)&&Tt(t.byteLength)&&ut(t.byteOrder)&&ut(t.char)&&Tt(t.enum)&&Yi(t,"value")}(t)&&zi(t.value)}function Wi(t){return Ni(t)||((r=t)instanceof Di||"object"==typeof r&&null!==r&&Tt(r.alignment)&&Tt(r.byteLength)&&ut(r.byteOrder)&&ut(r.char)&&Tt(r.enum)&&Yi(r,"value"))||zi(t);var r}function Gi(t){var r;if("object"!=typeof t||null===t)throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Wi(r=t.dtype))return r;throw new TypeError(R("invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.",r))}k(Di,"name","DataType"),at(Di.prototype,"alignment",(function(){return this._alignment})),at(Di.prototype,"byteLength",(function(){return this._byteLength})),at(Di.prototype,"byteOrder",(function(){return this._byteOrder})),at(Di.prototype,"char",(function(){return this._char})),at(Di.prototype,"description",(function(){return this._description})),at(Di.prototype,"enum",(function(){return this._enum})),at(Di.prototype,"value",(function(){return this._value})),k(Di.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),k(Di.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),k(Di.prototype,"valueOf",(function(){return this.toString()}));var Ji=Bi(ai());function $i(t,r){return kn(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)}k($i,"assign",(function(t,r,e){return kn(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)}));var Zi="row-major",Ki="column-major";function Xi(t){var r,e;if("object"!=typeof t||null===t)throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e=t.order,Ji(e)?e:(r=function(t){var r,e,n,i,o,a;if("object"!=typeof t||null===t)throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!Kt(i=t.strides)){if(!Kt(n=t.shape))throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));return 0===n.length?[0]:(e=t.order,Ji(e)||(e="row-major"),$i(n,e))}for(r=[],a=0;a<i.length;a++){if(!Tt(o=i[a]))throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));r.push(o)}return r}(t),1===(e=Or(r))||3===e?Zi:2===e?Ki:0===function(t){var r,e;if("object"!=typeof t||null===t)throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Ie(e=t.ndims))return e;if(!Kt(r=t.shape))throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));return r.length}(t)?Zi:null)}function qi(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length&&_t(t.length)&&t.length>=0&&t.length<=Pe}function Hi(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}var Qi=[],to=[],ro="undefined"!=typeof Uint8Array?Uint8Array:Array,eo=!1;function no(){eo=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)Qi[r]=t[r],to[t.charCodeAt(r)]=r;to["-".charCodeAt(0)]=62,to["_".charCodeAt(0)]=63}function io(t,r,e){for(var n,i,o=[],a=r;a<e;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(Qi[(i=n)>>18&63]+Qi[i>>12&63]+Qi[i>>6&63]+Qi[63&i]);return o.join("")}function oo(t){var r;eo||no();for(var e=t.length,n=e%3,i="",o=[],a=16383,u=0,f=e-n;u<f;u+=a)o.push(io(t,u,u+a>f?f:u+a));return 1===n?(r=t[e-1],i+=Qi[r>>2],i+=Qi[r<<4&63],i+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],i+=Qi[r>>10],i+=Qi[r>>4&63],i+=Qi[r<<2&63],i+="="),o.push(i),o.join("")}function ao(t,r,e,n,i){var o,a,u=8*i-n-1,f=(1<<u)-1,s=f>>1,l=-7,h=e?i-1:0,c=e?-1:1,p=t[r+h];for(h+=c,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[r+h],h+=c,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[r+h],h+=c,l-=8);if(0===o)o=1-s;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=s}return(p?-1:1)*a*Math.pow(2,o-n)}function uo(t,r,e,n,i,o){var a,u,f,s=8*o-i-1,l=(1<<s)-1,h=l>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=l):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),(r+=a+h>=1?c/f:c*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=l?(u=0,a=l):a+h>=1?(u=(r*f-1)*Math.pow(2,i),a+=h):(u=r*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[e+p]=255&a,p+=g,a/=256,s-=8);t[e+p-g]|=128*y}var fo={}.toString,so=Array.isArray||function(t){return"[object Array]"==fo.call(t)};po.TYPED_ARRAY_SUPPORT=void 0===rt.TYPED_ARRAY_SUPPORT||rt.TYPED_ARRAY_SUPPORT;var lo=ho();function ho(){return po.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function co(t,r){if(ho()<r)throw new RangeError("Invalid typed array length");return po.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=po.prototype:(null===t&&(t=new po(r)),t.length=r),t}function po(t,r,e){if(!(po.TYPED_ARRAY_SUPPORT||this instanceof po))return new po(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return mo(this,t)}return go(this,t,r,e)}function go(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);po.TYPED_ARRAY_SUPPORT?(t=r).__proto__=po.prototype:t=vo(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!po.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|_o(r,e);t=co(t,n);var i=t.write(r,e);i!==n&&(t=t.slice(0,i));return t}(t,r,e):function(t,r){if(bo(r)){var e=0|wo(r.length);return 0===(t=co(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?co(t,0):vo(t,r);if("Buffer"===r.type&&so(r.data))return vo(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function yo(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function mo(t,r){if(yo(r),t=co(t,r<0?0:0|wo(r)),!po.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function vo(t,r){var e=r.length<0?0:0|wo(r.length);t=co(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function wo(t){if(t>=ho())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ho().toString(16)+" bytes");return 0|t}function bo(t){return!(null==t||!t._isBuffer)}function _o(t,r){if(bo(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Zo(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Ko(t).length;default:if(n)return Zo(t).length;r=(""+r).toLowerCase(),n=!0}}function Eo(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Mo(this,r,e);case"utf8":case"utf-8":return Bo(this,r,e);case"ascii":return Fo(this,r,e);case"latin1":case"binary":return Uo(this,r,e);case"base64":return Lo(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ko(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function To(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function xo(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=po.from(r,n)),bo(r))return 0===r.length?-1:Ao(t,r,e,n,i);if("number"==typeof r)return r&=255,po.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):Ao(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Ao(t,r,e,n,i){var o,a=1,u=t.length,f=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;a=2,u/=2,f/=2,e/=2}function s(t,r){return 1===a?t[r]:t.readUInt16BE(r*a)}if(i){var l=-1;for(o=e;o<u;o++)if(s(t,o)===s(r,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===f)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(e+f>u&&(e=u-f),o=e;o>=0;o--){for(var h=!0,c=0;c<f;c++)if(s(t,o+c)!==s(r,c)){h=!1;break}if(h)return o}return-1}function Vo(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var u=parseInt(r.substr(2*a,2),16);if(isNaN(u))return a;t[e+a]=u}return a}function Oo(t,r,e,n){return Xo(Zo(r,t.length-e),t,e,n)}function So(t,r,e,n){return Xo(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function Ro(t,r,e,n){return So(t,r,e,n)}function jo(t,r,e,n){return Xo(Ko(r),t,e,n)}function Io(t,r,e,n){return Xo(function(t,r){for(var e,n,i,o=[],a=0;a<t.length&&!((r-=2)<0);++a)n=(e=t.charCodeAt(a))>>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function Lo(t,r,e){return 0===r&&e===t.length?oo(t):oo(t.slice(r,e))}function Bo(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,a,u,f,s=t[i],l=null,h=s>239?4:s>223?3:s>191?2:1;if(i+h<=e)switch(h){case 1:s<128&&(l=s);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&s)<<6|63&o)>127&&(l=f);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(f=(15&s)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(l=f);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(f=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(l=f)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var r=t.length;if(r<=Po)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=Po));return e}(n)}po.poolSize=8192,po._augment=function(t){return t.__proto__=po.prototype,t},po.from=function(t,r,e){return go(null,t,r,e)},po.TYPED_ARRAY_SUPPORT&&(po.prototype.__proto__=Uint8Array.prototype,po.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&po[Symbol.species]),po.alloc=function(t,r,e){return function(t,r,e,n){return yo(r),r<=0?co(t,r):void 0!==e?"string"==typeof n?co(t,r).fill(e,n):co(t,r).fill(e):co(t,r)}(null,t,r,e)},po.allocUnsafe=function(t){return mo(null,t)},po.allocUnsafeSlow=function(t){return mo(null,t)},po.isBuffer=qo,po.compare=function(t,r){if(!bo(t)||!bo(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},po.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},po.concat=function(t,r){if(!so(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return po.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=po.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var o=t[e];if(!bo(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},po.byteLength=_o,po.prototype._isBuffer=!0,po.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)To(this,r,r+1);return this},po.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)To(this,r,r+3),To(this,r+1,r+2);return this},po.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)To(this,r,r+7),To(this,r+1,r+6),To(this,r+2,r+5),To(this,r+3,r+4);return this},po.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Bo(this,0,t):Eo.apply(this,arguments)},po.prototype.equals=function(t){if(!bo(t))throw new TypeError("Argument must be a Buffer");return this===t||0===po.compare(this,t)},po.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},po.prototype.compare=function(t,r,e,n,i){if(!bo(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(e>>>=0)-(r>>>=0),u=Math.min(o,a),f=this.slice(n,i),s=t.slice(r,e),l=0;l<u;++l)if(f[l]!==s[l]){o=f[l],a=s[l];break}return o<a?-1:a<o?1:0},po.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},po.prototype.indexOf=function(t,r,e){return xo(this,t,r,e,!0)},po.prototype.lastIndexOf=function(t,r,e){return xo(this,t,r,e,!1)},po.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return Vo(this,t,r,e);case"utf8":case"utf-8":return Oo(this,t,r,e);case"ascii":return So(this,t,r,e);case"latin1":case"binary":return Ro(this,t,r,e);case"base64":return jo(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Io(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},po.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Po=4096;function Fo(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function Uo(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function Mo(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=$o(t[o]);return i}function ko(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function Co(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function No(t,r,e,n,i,o){if(!bo(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function Yo(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function Do(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function zo(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Wo(t,r,e,n,i){return i||zo(t,0,e,4),uo(t,r,e,n,23,4),e+4}function Go(t,r,e,n,i){return i||zo(t,0,e,8),uo(t,r,e,n,52,8),e+8}po.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),po.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=po.prototype;else{var i=r-t;e=new po(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},po.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||Co(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},po.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||Co(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},po.prototype.readUInt8=function(t,r){return r||Co(t,1,this.length),this[t]},po.prototype.readUInt16LE=function(t,r){return r||Co(t,2,this.length),this[t]|this[t+1]<<8},po.prototype.readUInt16BE=function(t,r){return r||Co(t,2,this.length),this[t]<<8|this[t+1]},po.prototype.readUInt32LE=function(t,r){return r||Co(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},po.prototype.readUInt32BE=function(t,r){return r||Co(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},po.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||Co(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},po.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||Co(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},po.prototype.readInt8=function(t,r){return r||Co(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},po.prototype.readInt16LE=function(t,r){r||Co(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},po.prototype.readInt16BE=function(t,r){r||Co(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},po.prototype.readInt32LE=function(t,r){return r||Co(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},po.prototype.readInt32BE=function(t,r){return r||Co(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},po.prototype.readFloatLE=function(t,r){return r||Co(t,4,this.length),ao(this,t,!0,23,4)},po.prototype.readFloatBE=function(t,r){return r||Co(t,4,this.length),ao(this,t,!1,23,4)},po.prototype.readDoubleLE=function(t,r){return r||Co(t,8,this.length),ao(this,t,!0,52,8)},po.prototype.readDoubleBE=function(t,r){return r||Co(t,8,this.length),ao(this,t,!1,52,8)},po.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||No(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},po.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||No(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},po.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,1,255,0),po.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},po.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,2,65535,0),po.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Yo(this,t,r,!0),r+2},po.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,2,65535,0),po.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Yo(this,t,r,!1),r+2},po.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,4,4294967295,0),po.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):Do(this,t,r,!0),r+4},po.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,4,4294967295,0),po.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):Do(this,t,r,!1),r+4},po.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);No(this,t,r,e,i-1,-i)}var o=0,a=1,u=0;for(this[r]=255&t;++o<e&&(a*=256);)t<0&&0===u&&0!==this[r+o-1]&&(u=1),this[r+o]=(t/a>>0)-u&255;return r+e},po.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);No(this,t,r,e,i-1,-i)}var o=e-1,a=1,u=0;for(this[r+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[r+o+1]&&(u=1),this[r+o]=(t/a>>0)-u&255;return r+e},po.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,1,127,-128),po.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},po.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,2,32767,-32768),po.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Yo(this,t,r,!0),r+2},po.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,2,32767,-32768),po.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Yo(this,t,r,!1),r+2},po.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,4,2147483647,-2147483648),po.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):Do(this,t,r,!0),r+4},po.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||No(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),po.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):Do(this,t,r,!1),r+4},po.prototype.writeFloatLE=function(t,r,e){return Wo(this,t,r,!0,e)},po.prototype.writeFloatBE=function(t,r,e){return Wo(this,t,r,!1,e)},po.prototype.writeDoubleLE=function(t,r,e){return Go(this,t,r,!0,e)},po.prototype.writeDoubleBE=function(t,r,e){return Go(this,t,r,!1,e)},po.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!po.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},po.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!po.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var a=bo(t)?t:Zo(new po(t,n).toString()),u=a.length;for(o=0;o<e-r;++o)this[o+r]=a[o%u]}return this};var Jo=/[^+\/0-9A-Za-z-_]/g;function $o(t){return t<16?"0"+t.toString(16):t.toString(16)}function Zo(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Ko(t){return function(t){var r,e,n,i,o,a;eo||no();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[u-2]?2:"="===t[u-1]?1:0,a=new ro(3*u/4-o),n=o>0?u-4:u;var f=0;for(r=0,e=0;r<n;r+=4,e+=3)i=to[t.charCodeAt(r)]<<18|to[t.charCodeAt(r+1)]<<12|to[t.charCodeAt(r+2)]<<6|to[t.charCodeAt(r+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=to[t.charCodeAt(r)]<<2|to[t.charCodeAt(r+1)]>>4,a[f++]=255&i):1===o&&(i=to[t.charCodeAt(r)]<<10|to[t.charCodeAt(r+1)]<<4|to[t.charCodeAt(r+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Jo,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Xo(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function qo(t){return null!=t&&(!!t._isBuffer||Ho(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Ho(t.slice(0,0))}(t))}function Ho(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var Qo=Object.freeze({__proto__:null,Buffer:po,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),po.alloc(+t)},isBuffer:qo,kMaxLength:lo}),ta=po;function ra(t){if(t.__esModule)return t;var r=t.default;if("function"==typeof r){var e=function t(){return this instanceof t?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach((function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})})),e}var ea,na=ra(Qo).Buffer;ea=function(){var t,r;if("function"!=typeof ta)return!1;try{t=nr(r="function"==typeof ta.from?ta.from([1,2,3,4]):new ta([1,2,3,4]))&&1===r[0]&&2===r[1]&&3===r[2]&&4===r[3]}catch(r){t=!1}return t}()?na:function(){throw new Error("not implemented")};var ia=ea;var oa=gr(ia.allocUnsafe)?function(t){if(!Be(t))throw new TypeError(R("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return ia.allocUnsafe(t)}:function(t){if(!Be(t))throw new TypeError(R("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new ia(t)};var aa={float64:zr,float32:Zr,int16:ge,int32:ie,int8:je,uint16:se,uint32:Qr,uint8:be,uint8c:Ae,complex64:cn,complex128:_n,bool:On};function ua(t){return function(t,r){var e,n;for(e=[],n=0;n<r;n++)e.push(t);return e}(0,t)}function fa(){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 sa={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"}},la={"dtypes.default":sa.dtypes.default,"dtypes.numeric":sa.dtypes.numeric,"dtypes.real":sa.dtypes.real,"dtypes.floating_point":sa.dtypes.floating_point,"dtypes.real_floating_point":sa.dtypes.real_floating_point,"dtypes.complex_floating_point":sa.dtypes.complex_floating_point,"dtypes.integer":sa.dtypes.integer,"dtypes.signed_integer":sa.dtypes.signed_integer,"dtypes.unsigned_integer":sa.dtypes.unsigned_integer,"dtypes.boolean":sa.dtypes.boolean,"dtypes.index":sa.dtypes.index,"dtypes.integer_index":sa.dtypes.integer_index,"dtypes.boolean_index":sa.dtypes.boolean_index,"dtypes.mask_index":sa.dtypes.mask_index};k(fa,"get",(function(t){var r=la[t];return void 0===r?null:r}));var ha=fa.get("dtypes.default");var ca={float64:zr,float32:Zr,generic:Array,int16:ge,int32:ie,int8:je,uint16:se,uint32:Qr,uint8:be,uint8c:Ae,complex64:cn,complex128:_n,bool:On};var pa,ga=fa.get("dtypes.default");function ya(t){var r,e;if(!Ie(t))throw new TypeError(R("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",t));if("generic"===(r=arguments.length>1?arguments[1]:ga))return ua(t);if(e=function(t){return ca[t]||null}(r),null===e)throw new TypeError(R("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new e(t)}pa=de(oa(1))?function(t){var r,e,n,i,o,a;if(!Ie(t))throw new TypeError(R("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",t));if("generic"===(n=arguments.length>1?arguments[1]:ha))return ua(t);if(null===(r=xr(n)))throw new TypeError(R("invalid argument. Second argument must be a supported data type. Value: `%s`.",n));return i=function(t){return aa[t]||null}(n),a=r*t,"complex128"===n&&(a+=8),e=(o=oa(a)).byteOffset,"complex128"===n&&(Ie(e/r)||(e+=8)),new i(o.buffer,e,t)}:function(t){return arguments.length>1?ya(t,arguments[1]):ya(t)};var da=pa;function ma(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 va(t){if("function"!=typeof t)throw new TypeError(R("invalid argument. Must provide a function. Value: `%s`.",t));return function(r){var e,n;if(!qi(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}}var wa=va(Be.isPrimitive),ba=va(Be.isObject),_a=va(Be);k(_a,"primitives",wa),k(_a,"objects",ba);var Ea=va(At.isPrimitive),Ta=va(At.isObject),xa=va(At);function Aa(t){return Ni(t)||((r=t)instanceof Di||"object"==typeof r&&null!==r&&Tt(r.alignment)&&Tt(r.byteLength)&&ut(r.byteOrder)&&ut(r.char)&&Tt(r.enum)&&Yi(r,"value"))||zi(t);var r}function Va(){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(xa,"primitives",Ea),k(xa,"objects",Ta);var Oa={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"},Sa={"dtypes.default":Oa.dtypes.default,"dtypes.numeric":Oa.dtypes.numeric,"dtypes.real":Oa.dtypes.real,"dtypes.floating_point":Oa.dtypes.floating_point,"dtypes.real_floating_point":Oa.dtypes.real_floating_point,"dtypes.complex_floating_point":Oa.dtypes.complex_floating_point,"dtypes.integer":Oa.dtypes.integer,"dtypes.signed_integer":Oa.dtypes.signed_integer,"dtypes.unsigned_integer":Oa.dtypes.unsigned_integer,"dtypes.boolean":Oa.dtypes.boolean,"dtypes.index":Oa.dtypes.index,"dtypes.integer_index":Oa.dtypes.integer_index,"dtypes.boolean_index":Oa.dtypes.boolean_index,"dtypes.mask_index":Oa.dtypes.mask_index,order:Oa.order,casting:Oa.casting,index_mode:Oa.index_mode};function Ra(t){var r=typeof t;return null===t||"object"!==r&&"function"!==r?new TypeError(R("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",t)):null}k(Va,"get",(function(t){var r=Sa[t];return void 0===r?null:r}));var ja=Object.create;function Ia(){}var La="function"==typeof ja?ja:function(t){return Ia.prototype=t,new Ia};function Ba(t,r){return t<0?0:t>r?r:t}function Pa(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 Fa(t,r){return t<0?(t+=r+1)<0?-1:t:t>r?-1:t}var Ua=Bi(ci()),Ma={wrap:Pa,clamp:Ba,normalize:function(t,r){var e=Fa(t,r);if(e<0||e>r)throw new RangeError(R("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(R("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return t}};function ka(t,r,e){var n;if("clamp"===e)return Ba(t,r);if("wrap"===e)return Pa(t,r);if(n=t,"normalize"===e&&(n=Fa(n,r)),n<0||n>r)throw new RangeError(R("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return n}k(ka,"factory",(function(t){if(!Ua(t))throw new TypeError(R("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return Ma[t]}));var Ca=Ai.prototype.iget;var Na=Ai.prototype.iset;function Ya(t,r){var e,n;for(e=[],n=0;n<r;n++)e.push(t[n]);return e}var Da=32767,za=Va.get("index_mode"),Wa=!1;function Ga(t,r,e,n,i,o,a){var u,f,s,l,h;if(!(this instanceof Ga))return arguments.length<7?new Ga(t,r,e,n,i,o):new Ga(t,r,e,n,i,o,a);if(!Aa(t))throw new TypeError(R("invalid argument. First argument must be a supported ndarray data type. Value: `%s`.",t));if(!Kt(r))throw new TypeError(R("invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.",r));if(r.get&&r.set&&(!gr(r.get)||!gr(r.set)))throw new TypeError(R("invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.",r));if(!wa(e)&&(!Kt(e)||e.length>0))throw new TypeError(R("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((u=e.length)>Da)throw new RangeError(R("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Da,u));if(!Ea(n))throw new TypeError(R("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(R("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(R("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Ie(i))throw new TypeError(R("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!Ji(o))throw new TypeError(R("invalid argument. Sixth argument must be a supported order. Value: `%s`.",o));if(u>0&&!function(t,r,e,n){var i=Mn(r,e,n);return i[0]>=0&&i[1]<t}(r.length,e,n,i)&&ma(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((f={}).mode=za,f.readonly=Wa,arguments.length>6&&(s=function(t,r){var e;if(!br(r))return new TypeError(R("invalid argument. Options argument must be an object. Value: `%s`.",r));if(W(r,"mode")&&(t.mode=r.mode,!Ua(t.mode)))return new TypeError(R("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(W(r,"submode")){if(t.submode=r.submode,!Fe(t.submode))return new TypeError(R("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(R("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(!Ua(t.submode[e]))return new TypeError(R("invalid option. Each submode must be a recognized mode. Option: `%s`.",t.submode[e]));t.submode=t.submode.slice()}return W(r,"readonly")&&(t.readonly=r.readonly,!C(t.readonly))?new TypeError(R("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",t.readonly)):null}(f,a),s))throw s;return this._mode=f.mode,void 0===f.submode&&(f.submode=[this._mode]),this._submode=f.submode,l=Ya(e,u),h=Ya(n,u||1),Ai.call(this,t,r,l,h,i,o),this._flags.READONLY=f.readonly,this}!function(t,r){var e=Ra(t);if(e)throw e;if(e=Ra(r))throw e;if(void 0===r.prototype)throw new TypeError(R("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",r.prototype));t.prototype=La(r.prototype),M(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t})}(Ga,Ai),k(Ga,"name","ndarray"),k(Ga.prototype,"get",(function(){var t,r,e,n;if(arguments.length!==this._ndims)throw new RangeError(R("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(!Tt(arguments[n]))throw new TypeError(R("invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.",n,arguments[n]));r=ka(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(Ga.prototype,"iget",(function(t){if(this._ndims>0){if(!Tt(t))throw new TypeError(R("invalid argument. Index must be an integer. Value: `%s`.",t));return t=ka(t,this._length-1,this._mode),Ca.call(this,t)}return Ca.call(this)})),k(Ga.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(R("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(!Tt(arguments[n]))throw new TypeError(R("invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.",n,arguments[n]));r=ka(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(Ga.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(!Tt(t))throw new TypeError(R("invalid argument. Index must be an integer. Value: `%s`.",t));t=ka(t,this._length-1,this._mode),Na.call(this,t,r)}else Na.call(this,t);return this}));var Ja=Va.get("dtypes.default"),$a=Va.get("order");var Za=Bi(Ui("complex_floating_point"));var Ka=Bi(Ui("real"));var Xa=8,qa=16;function Ha(t){return"object"==typeof t&&null!==t&&("Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===qa||"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Xa)}var Qa=1;function tu(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Qa}var ru="number";var eu={complex64:Je,complex128:De};function nu(t){var r,e,n;for(e=t.length,r=[],n=0;n<e;n++)r.push(t[n]);return r}var iu="row-major";function ou(t,r){var e,n,i;return"object"!=typeof(i=t.strides)||null===i?0===(n=t.shape).length?[0]:(ut(e=t.order)||(e=iu),$i(n,e)):r?nu(i):i}function au(t){var r,e,n;return ct(n=t.offset)?n:0===(e=t.shape).length||"object"!=typeof(r=t.strides)||null===r?0:Hi(e,r)}var uu="row-major",fu="column-major";function su(t){var r,e;return ut(e=t.order)?e:"object"!=typeof(r=t.strides)||null===r||1===(e=Or(r))||3===e?uu:2===e?fu:0===t.shape.length?uu:null}function lu(t){var r,e,n,i;return r=function(t){return t.data}(t),n=function(t,r){var e=t.shape;return r?nu(e):e}(t,!0),i=function(t){return t.dtype}(t),e=Rr(r),{ref:t,dtype:i,data:r,length:ma(n),shape:n,strides:ou(t,!0),offset:au(t),order:su(t),accessorProtocol:e,accessors:e?[Fr(i),Mr(i)]:[Ir(i),Br(i)]}}var hu=5;var cu=5;function pu(t,r,e,n,i){var o,a,u,f;if(t<=0||1===r)return e;if((u=Ln(e)).accessorProtocol)return function(t,r,e,n,i){var o,a,u,f,s,l;if(o=e.data,a=e.accessors[0],u=e.accessors[1],f=i,0===n)return u(o,f,a(o,f)*t*r),e;if(1===n){if((s=t%hu)>0)for(l=0;l<s;l++)u(o,f,a(o,f)*r),f+=n;if(t<hu)return e;for(l=s;l<t;l+=hu)u(o,f,a(o,f)*r),u(o,f+1,a(o,f+1)*r),u(o,f+2,a(o,f+2)*r),u(o,f+3,a(o,f+3)*r),u(o,f+4,a(o,f+4)*r),f+=hu;return e}for(l=0;l<t;l++)u(o,f,a(o,f)*r),f+=n}(t,r,u,n,i),e;if(o=i,0===n)return e[o]*=r*t,e;if(1===n){if((a=t%cu)>0)for(f=0;f<a;f++)e[o]*=r,o+=n;if(t<cu)return e;for(f=a;f<t;f+=cu)e[o]*=r,e[o+1]*=r,e[o+2]*=r,e[o+3]*=r,e[o+4]*=r,o+=cu;return e}for(f=0;f<t;f++)e[o]*=r,o+=n;return e}function gu(t,r,e,n){return pu(t,r,e,n,function(t,r){return r>0?0:(1-t)*r}(t,n))}function yu(t){var r,e;if(r=[],t<=0)return r;for(e=0;e<t;e++)r.push(e);return r}function du(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 mu(t,r){var e,n;for(e=[],n=0;n<r.length;n++)e.push(t[r[n]]);return e}function vu(t,r,e){var n;return n=yu(t.length),function(t,r){var e,n,i,o,a,u,f,s,l;for(n=1,i=1,l=1;l<t.length;l++){for(e=(u=t[n])<0?-u:u,f=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]=u,r[a+1]=f,n+=1,i+=1}}(r=nu(r),n),{sh:t=mu(t,n),sx:r,sy:e=mu(e,n),idx:n}}k(gu,"ndarray",pu),k(yu,"assign",(function(t,r,e){var n=Ln(t);return n.accessorProtocol?"complex128"===n.dtype?du(t,on(t,0),r,e):"complex64"===n.dtype?du(t,nn(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 wu={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};function bu(t,r){return function(t){var r,e,n,i;if((e=t.length)<=0)return wu.BLOCK_SIZE_IN_ELEMENTS;if(null===(r=xr(t[0])))return wu.BLOCK_SIZE_IN_ELEMENTS;for(i=1;i<e;i++){if(null===(n=xr(t[i])))return wu.BLOCK_SIZE_IN_ELEMENTS;n>r&&(r=n)}return(n=wu.BLOCK_SIZE_IN_BYTES/r|0)>0?n:1}([t,r])}function _u(t,r,e,n,i,o){var a,u,f,s,l;for(a=t.length,u=1,l=0;l<a;l++)u*=t[l];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(R("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(f=e,kn(n)){for(l=0;l<a;l++)i-=s=i%t[l],i/=t[l],f+=s*r[l];return f}for(l=a-1;l>=0;l--)i-=s=i%t[l],i/=t[l],f+=s*r[l];return f}var Eu="throw";var Tu="throw";var xu=[function(t,r){r.data[r.offset]=t.data[t.offset]},function(t,r){var e,n,i,o,a,u,f,s;for(a=t.shape[0],i=t.strides[0],o=r.strides[0],u=t.offset,f=r.offset,e=t.data,n=r.data,s=0;s<a;s++)n[f]=e[u],u+=i,f+=o},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m;for(s=t.shape,c=t.strides,p=r.strides,e?(l=s[1],h=s[0],o=c[1],a=c[0]-l*c[1],u=p[1],f=p[0]-l*p[1]):(l=s[0],h=s[1],o=c[0],a=c[1]-l*c[0],u=p[0],f=p[1]-l*p[0]),g=t.offset,y=r.offset,n=t.data,i=r.data,m=0;m<h;m++){for(d=0;d<l;d++)i[y]=n[g],g+=o,y+=u;g+=a,y+=f}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_;for(h=t.shape,y=t.strides,d=r.strides,e?(c=h[2],p=h[1],g=h[0],o=y[2],a=y[1]-c*y[2],u=y[0]-p*y[1],f=d[2],s=d[1]-c*d[2],l=d[0]-p*d[1]):(c=h[0],p=h[1],g=h[2],o=y[0],a=y[1]-c*y[0],u=y[2]-p*y[1],f=d[0],s=d[1]-c*d[0],l=d[2]-p*d[1]),m=t.offset,v=r.offset,n=t.data,i=r.data,_=0;_<g;_++){for(b=0;b<p;b++){for(w=0;w<c;w++)i[v]=n[m],m+=o,v+=f;m+=a,v+=s}m+=u,v+=l}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A;for(p=t.shape,v=t.strides,w=r.strides,e?(g=p[3],y=p[2],d=p[1],m=p[0],o=v[3],a=v[2]-g*v[3],u=v[1]-y*v[2],f=v[0]-d*v[1],s=w[3],l=w[2]-g*w[3],h=w[1]-y*w[2],c=w[0]-d*w[1]):(g=p[0],y=p[1],d=p[2],m=p[3],o=v[0],a=v[1]-g*v[0],u=v[2]-y*v[1],f=v[3]-d*v[2],s=w[0],l=w[1]-g*w[0],h=w[2]-y*w[1],c=w[3]-d*w[2]),b=t.offset,_=r.offset,n=t.data,i=r.data,A=0;A<m;A++){for(x=0;x<d;x++){for(T=0;T<y;T++){for(E=0;E<g;E++)i[_]=n[b],b+=o,_+=s;b+=a,_+=l}b+=u,_+=h}b+=f,_+=c}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R;for(y=t.shape,_=t.strides,E=r.strides,e?(d=y[4],m=y[3],v=y[2],w=y[1],b=y[0],o=_[4],a=_[3]-d*_[4],u=_[2]-m*_[3],f=_[1]-v*_[2],s=_[0]-w*_[1],l=E[4],h=E[3]-d*E[4],c=E[2]-m*E[3],p=E[1]-v*E[2],g=E[0]-w*E[1]):(d=y[0],m=y[1],v=y[2],w=y[3],b=y[4],o=_[0],a=_[1]-d*_[0],u=_[2]-m*_[1],f=_[3]-v*_[2],s=_[4]-w*_[3],l=E[0],h=E[1]-d*E[0],c=E[2]-m*E[1],p=E[3]-v*E[2],g=E[4]-w*E[3]),T=t.offset,x=r.offset,n=t.data,i=r.data,R=0;R<b;R++){for(S=0;S<w;S++){for(O=0;O<v;O++){for(V=0;V<m;V++){for(A=0;A<d;A++)i[x]=n[T],T+=o,x+=l;T+=a,x+=h}T+=u,x+=c}T+=f,x+=p}T+=s,x+=g}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B;for(m=t.shape,x=t.strides,A=r.strides,e?(v=m[5],w=m[4],b=m[3],_=m[2],E=m[1],T=m[0],o=x[5],a=x[4]-v*x[5],u=x[3]-w*x[4],f=x[2]-b*x[3],s=x[1]-_*x[2],l=x[0]-E*x[1],h=A[5],c=A[4]-v*A[5],p=A[3]-w*A[4],g=A[2]-b*A[3],y=A[1]-_*A[2],d=A[0]-E*A[1]):(v=m[0],w=m[1],b=m[2],_=m[3],E=m[4],T=m[5],o=x[0],a=x[1]-v*x[0],u=x[2]-w*x[1],f=x[3]-b*x[2],s=x[4]-_*x[3],l=x[5]-E*x[4],h=A[0],c=A[1]-v*A[0],p=A[2]-w*A[1],g=A[3]-b*A[2],y=A[4]-_*A[3],d=A[5]-E*A[4]),V=t.offset,O=r.offset,n=t.data,i=r.data,B=0;B<T;B++){for(L=0;L<E;L++){for(I=0;I<_;I++){for(j=0;j<b;j++){for(R=0;R<w;R++){for(S=0;S<v;S++)i[O]=n[V],V+=o,O+=h;V+=a,O+=c}V+=u,O+=p}V+=f,O+=g}V+=s,O+=y}V+=l,O+=d}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M;for(w=t.shape,O=t.strides,S=r.strides,e?(b=w[6],_=w[5],E=w[4],T=w[3],x=w[2],A=w[1],V=w[0],o=O[6],a=O[5]-b*O[6],u=O[4]-_*O[5],f=O[3]-E*O[4],s=O[2]-T*O[3],l=O[1]-x*O[2],h=O[0]-A*O[1],c=S[6],p=S[5]-b*S[6],g=S[4]-_*S[5],y=S[3]-E*S[4],d=S[2]-T*S[3],m=S[1]-x*S[2],v=S[0]-A*S[1]):(b=w[0],_=w[1],E=w[2],T=w[3],x=w[4],A=w[5],V=w[6],o=O[0],a=O[1]-b*O[0],u=O[2]-_*O[1],f=O[3]-E*O[2],s=O[4]-T*O[3],l=O[5]-x*O[4],h=O[6]-A*O[5],c=S[0],p=S[1]-b*S[0],g=S[2]-_*S[1],y=S[3]-E*S[2],d=S[4]-T*S[3],m=S[5]-x*S[4],v=S[6]-A*S[5]),R=t.offset,j=r.offset,n=t.data,i=r.data,M=0;M<V;M++){for(U=0;U<A;U++){for(F=0;F<x;F++){for(P=0;P<T;P++){for(B=0;B<E;B++){for(L=0;L<_;L++){for(I=0;I<b;I++)i[j]=n[R],R+=o,j+=c;R+=a,j+=p}R+=u,j+=g}R+=f,j+=y}R+=s,j+=d}R+=l,j+=m}R+=h,j+=v}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y;for(_=t.shape,j=t.strides,I=r.strides,e?(E=_[7],T=_[6],x=_[5],A=_[4],V=_[3],O=_[2],S=_[1],R=_[0],o=j[7],a=j[6]-E*j[7],u=j[5]-T*j[6],f=j[4]-x*j[5],s=j[3]-A*j[4],l=j[2]-V*j[3],h=j[1]-O*j[2],c=j[0]-S*j[1],p=I[7],g=I[6]-E*I[7],y=I[5]-T*I[6],d=I[4]-x*I[5],m=I[3]-A*I[4],v=I[2]-V*I[3],w=I[1]-O*I[2],b=I[0]-S*I[1]):(E=_[0],T=_[1],x=_[2],A=_[3],V=_[4],O=_[5],S=_[6],R=_[7],o=j[0],a=j[1]-E*j[0],u=j[2]-T*j[1],f=j[3]-x*j[2],s=j[4]-A*j[3],l=j[5]-V*j[4],h=j[6]-O*j[5],c=j[7]-S*j[6],p=I[0],g=I[1]-E*I[0],y=I[2]-T*I[1],d=I[3]-x*I[2],m=I[4]-A*I[3],v=I[5]-V*I[4],w=I[6]-O*I[5],b=I[7]-S*I[6]),L=t.offset,B=r.offset,n=t.data,i=r.data,Y=0;Y<R;Y++){for(N=0;N<S;N++){for(C=0;C<O;C++){for(k=0;k<V;k++){for(M=0;M<A;M++){for(U=0;U<x;U++){for(F=0;F<T;F++){for(P=0;P<E;P++)i[B]=n[L],L+=o,B+=p;L+=a,B+=g}L+=u,B+=y}L+=f,B+=d}L+=s,B+=m}L+=l,B+=v}L+=h,B+=w}L+=c,B+=b}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G;for(T=t.shape,B=t.strides,P=r.strides,e?(x=T[8],A=T[7],V=T[6],O=T[5],S=T[4],R=T[3],j=T[2],I=T[1],L=T[0],o=B[8],a=B[7]-x*B[8],u=B[6]-A*B[7],f=B[5]-V*B[6],s=B[4]-O*B[5],l=B[3]-S*B[4],h=B[2]-R*B[3],c=B[1]-j*B[2],p=B[0]-I*B[1],g=P[8],y=P[7]-x*P[8],d=P[6]-A*P[7],m=P[5]-V*P[6],v=P[4]-O*P[5],w=P[3]-S*P[4],b=P[2]-R*P[3],_=P[1]-j*P[2],E=P[0]-I*P[1]):(x=T[0],A=T[1],V=T[2],O=T[3],S=T[4],R=T[5],j=T[6],I=T[7],L=T[8],o=B[0],a=B[1]-x*B[0],u=B[2]-A*B[1],f=B[3]-V*B[2],s=B[4]-O*B[3],l=B[5]-S*B[4],h=B[6]-R*B[5],c=B[7]-j*B[6],p=B[8]-I*B[7],g=P[0],y=P[1]-x*P[0],d=P[2]-A*P[1],m=P[3]-V*P[2],v=P[4]-O*P[3],w=P[5]-S*P[4],b=P[6]-R*P[5],_=P[7]-j*P[6],E=P[8]-I*P[7]),F=t.offset,U=r.offset,n=t.data,i=r.data,G=0;G<L;G++){for(W=0;W<I;W++){for(z=0;z<j;z++){for(D=0;D<R;D++){for(Y=0;Y<S;Y++){for(N=0;N<O;N++){for(C=0;C<V;C++){for(k=0;k<A;k++){for(M=0;M<x;M++)i[U]=n[F],F+=o,U+=g;F+=a,U+=y}F+=u,U+=d}F+=f,U+=m}F+=s,U+=v}F+=l,U+=w}F+=h,U+=b}F+=c,U+=_}F+=p,U+=E}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K;for(A=t.shape,U=t.strides,M=r.strides,e?(V=A[9],O=A[8],S=A[7],R=A[6],j=A[5],I=A[4],L=A[3],B=A[2],P=A[1],F=A[0],o=U[9],a=U[8]-V*U[9],u=U[7]-O*U[8],f=U[6]-S*U[7],s=U[5]-R*U[6],l=U[4]-j*U[5],h=U[3]-I*U[4],c=U[2]-L*U[3],p=U[1]-B*U[2],g=U[0]-P*U[1],y=M[9],d=M[8]-V*M[9],m=M[7]-O*M[8],v=M[6]-S*M[7],w=M[5]-R*M[6],b=M[4]-j*M[5],_=M[3]-I*M[4],E=M[2]-L*M[3],T=M[1]-B*M[2],x=M[0]-P*M[1]):(V=A[0],O=A[1],S=A[2],R=A[3],j=A[4],I=A[5],L=A[6],B=A[7],P=A[8],F=A[9],o=U[0],a=U[1]-V*U[0],u=U[2]-O*U[1],f=U[3]-S*U[2],s=U[4]-R*U[3],l=U[5]-j*U[4],h=U[6]-I*U[5],c=U[7]-L*U[6],p=U[8]-B*U[7],g=U[9]-P*U[8],y=M[0],d=M[1]-V*M[0],m=M[2]-O*M[1],v=M[3]-S*M[2],w=M[4]-R*M[3],b=M[5]-j*M[4],_=M[6]-I*M[5],E=M[7]-L*M[6],T=M[8]-B*M[7],x=M[9]-P*M[8]),k=t.offset,C=r.offset,n=t.data,i=r.data,K=0;K<F;K++){for(Z=0;Z<P;Z++){for($=0;$<B;$++){for(J=0;J<L;J++){for(G=0;G<I;G++){for(W=0;W<j;W++){for(z=0;z<R;z++){for(D=0;D<S;D++){for(Y=0;Y<O;Y++){for(N=0;N<V;N++)i[C]=n[k],k+=o,C+=y;k+=a,C+=d}k+=u,C+=m}k+=f,C+=v}k+=s,C+=w}k+=l,C+=b}k+=h,C+=_}k+=c,C+=E}k+=p,C+=T}k+=g,C+=x}}],Au=[function(t,r){r.accessors[1](r.data,r.offset,t.accessors[0](t.data,t.offset))},function(t,r){var e,n,i,o,a,u,f,s,l,h;for(f=t.shape[0],a=t.strides[0],u=r.strides[0],s=t.offset,l=r.offset,e=t.data,n=r.data,i=t.accessors[0],o=r.accessors[1],h=0;h<f;h++)o(n,l,i(e,s)),s+=a,l+=u},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w;for(h=t.shape,g=t.strides,y=r.strides,e?(c=h[1],p=h[0],u=g[1],f=g[0]-c*g[1],s=y[1],l=y[0]-c*y[1]):(c=h[0],p=h[1],u=g[0],f=g[1]-c*g[0],s=y[0],l=y[1]-c*y[0]),d=t.offset,m=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],w=0;w<p;w++){for(v=0;v<c;v++)a(i,m,o(n,d)),d+=u,m+=s;d+=f,m+=l}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T;for(p=t.shape,m=t.strides,v=r.strides,e?(g=p[2],y=p[1],d=p[0],u=m[2],f=m[1]-g*m[2],s=m[0]-y*m[1],l=v[2],h=v[1]-g*v[2],c=v[0]-y*v[1]):(g=p[0],y=p[1],d=p[2],u=m[0],f=m[1]-g*m[0],s=m[2]-y*m[1],l=v[0],h=v[1]-g*v[0],c=v[2]-y*v[1]),w=t.offset,b=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],T=0;T<d;T++){for(E=0;E<y;E++){for(_=0;_<g;_++)a(i,b,o(n,w)),w+=u,b+=l;w+=f,b+=h}w+=s,b+=c}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O;for(y=t.shape,b=t.strides,_=r.strides,e?(d=y[3],m=y[2],v=y[1],w=y[0],u=b[3],f=b[2]-d*b[3],s=b[1]-m*b[2],l=b[0]-v*b[1],h=_[3],c=_[2]-d*_[3],p=_[1]-m*_[2],g=_[0]-v*_[1]):(d=y[0],m=y[1],v=y[2],w=y[3],u=b[0],f=b[1]-d*b[0],s=b[2]-m*b[1],l=b[3]-v*b[2],h=_[0],c=_[1]-d*_[0],p=_[2]-m*_[1],g=_[3]-v*_[2]),E=t.offset,T=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],O=0;O<w;O++){for(V=0;V<v;V++){for(A=0;A<m;A++){for(x=0;x<d;x++)a(i,T,o(n,E)),E+=u,T+=h;E+=f,T+=c}E+=s,T+=p}E+=l,T+=g}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I;for(m=t.shape,T=t.strides,x=r.strides,e?(v=m[4],w=m[3],b=m[2],_=m[1],E=m[0],u=T[4],f=T[3]-v*T[4],s=T[2]-w*T[3],l=T[1]-b*T[2],h=T[0]-_*T[1],c=x[4],p=x[3]-v*x[4],g=x[2]-w*x[3],y=x[1]-b*x[2],d=x[0]-_*x[1]):(v=m[0],w=m[1],b=m[2],_=m[3],E=m[4],u=T[0],f=T[1]-v*T[0],s=T[2]-w*T[1],l=T[3]-b*T[2],h=T[4]-_*T[3],c=x[0],p=x[1]-v*x[0],g=x[2]-w*x[1],y=x[3]-b*x[2],d=x[4]-_*x[3]),A=t.offset,V=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],I=0;I<E;I++){for(j=0;j<_;j++){for(R=0;R<b;R++){for(S=0;S<w;S++){for(O=0;O<v;O++)a(i,V,o(n,A)),A+=u,V+=c;A+=f,V+=p}A+=s,V+=g}A+=l,V+=y}A+=h,V+=d}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F;for(w=t.shape,V=t.strides,O=r.strides,e?(b=w[5],_=w[4],E=w[3],T=w[2],x=w[1],A=w[0],u=V[5],f=V[4]-b*V[5],s=V[3]-_*V[4],l=V[2]-E*V[3],h=V[1]-T*V[2],c=V[0]-x*V[1],p=O[5],g=O[4]-b*O[5],y=O[3]-_*O[4],d=O[2]-E*O[3],m=O[1]-T*O[2],v=O[0]-x*O[1]):(b=w[0],_=w[1],E=w[2],T=w[3],x=w[4],A=w[5],u=V[0],f=V[1]-b*V[0],s=V[2]-_*V[1],l=V[3]-E*V[2],h=V[4]-T*V[3],c=V[5]-x*V[4],p=O[0],g=O[1]-b*O[0],y=O[2]-_*O[1],d=O[3]-E*O[2],m=O[4]-T*O[3],v=O[5]-x*O[4]),S=t.offset,R=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],F=0;F<A;F++){for(P=0;P<x;P++){for(B=0;B<T;B++){for(L=0;L<E;L++){for(I=0;I<_;I++){for(j=0;j<b;j++)a(i,R,o(n,S)),S+=u,R+=p;S+=f,R+=g}S+=s,R+=y}S+=l,R+=d}S+=h,R+=m}S+=c,R+=v}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C;for(_=t.shape,R=t.strides,j=r.strides,e?(E=_[6],T=_[5],x=_[4],A=_[3],V=_[2],O=_[1],S=_[0],u=R[6],f=R[5]-E*R[6],s=R[4]-T*R[5],l=R[3]-x*R[4],h=R[2]-A*R[3],c=R[1]-V*R[2],p=R[0]-O*R[1],g=j[6],y=j[5]-E*j[6],d=j[4]-T*j[5],m=j[3]-x*j[4],v=j[2]-A*j[3],w=j[1]-V*j[2],b=j[0]-O*j[1]):(E=_[0],T=_[1],x=_[2],A=_[3],V=_[4],O=_[5],S=_[6],u=R[0],f=R[1]-E*R[0],s=R[2]-T*R[1],l=R[3]-x*R[2],h=R[4]-A*R[3],c=R[5]-V*R[4],p=R[6]-O*R[5],g=j[0],y=j[1]-E*j[0],d=j[2]-T*j[1],m=j[3]-x*j[2],v=j[4]-A*j[3],w=j[5]-V*j[4],b=j[6]-O*j[5]),I=t.offset,L=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],C=0;C<S;C++){for(k=0;k<O;k++){for(M=0;M<V;M++){for(U=0;U<A;U++){for(F=0;F<x;F++){for(P=0;P<T;P++){for(B=0;B<E;B++)a(i,L,o(n,I)),I+=u,L+=g;I+=f,L+=y}I+=s,L+=d}I+=l,L+=m}I+=h,L+=v}I+=c,L+=w}I+=p,L+=b}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z;for(T=t.shape,L=t.strides,B=r.strides,e?(x=T[7],A=T[6],V=T[5],O=T[4],S=T[3],R=T[2],j=T[1],I=T[0],u=L[7],f=L[6]-x*L[7],s=L[5]-A*L[6],l=L[4]-V*L[5],h=L[3]-O*L[4],c=L[2]-S*L[3],p=L[1]-R*L[2],g=L[0]-j*L[1],y=B[7],d=B[6]-x*B[7],m=B[5]-A*B[6],v=B[4]-V*B[5],w=B[3]-O*B[4],b=B[2]-S*B[3],_=B[1]-R*B[2],E=B[0]-j*B[1]):(x=T[0],A=T[1],V=T[2],O=T[3],S=T[4],R=T[5],j=T[6],I=T[7],u=L[0],f=L[1]-x*L[0],s=L[2]-A*L[1],l=L[3]-V*L[2],h=L[4]-O*L[3],c=L[5]-S*L[4],p=L[6]-R*L[5],g=L[7]-j*L[6],y=B[0],d=B[1]-x*B[0],m=B[2]-A*B[1],v=B[3]-V*B[2],w=B[4]-O*B[3],b=B[5]-S*B[4],_=B[6]-R*B[5],E=B[7]-j*B[6]),P=t.offset,F=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],z=0;z<I;z++){for(D=0;D<j;D++){for(Y=0;Y<R;Y++){for(N=0;N<S;N++){for(C=0;C<O;C++){for(k=0;k<V;k++){for(M=0;M<A;M++){for(U=0;U<x;U++)a(i,F,o(n,P)),P+=u,F+=y;P+=f,F+=d}P+=s,F+=m}P+=l,F+=v}P+=h,F+=w}P+=c,F+=b}P+=p,F+=_}P+=g,F+=E}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$;for(A=t.shape,F=t.strides,U=r.strides,e?(V=A[8],O=A[7],S=A[6],R=A[5],j=A[4],I=A[3],L=A[2],B=A[1],P=A[0],u=F[8],f=F[7]-V*F[8],s=F[6]-O*F[7],l=F[5]-S*F[6],h=F[4]-R*F[5],c=F[3]-j*F[4],p=F[2]-I*F[3],g=F[1]-L*F[2],y=F[0]-B*F[1],d=U[8],m=U[7]-V*U[8],v=U[6]-O*U[7],w=U[5]-S*U[6],b=U[4]-R*U[5],_=U[3]-j*U[4],E=U[2]-I*U[3],T=U[1]-L*U[2],x=U[0]-B*U[1]):(V=A[0],O=A[1],S=A[2],R=A[3],j=A[4],I=A[5],L=A[6],B=A[7],P=A[8],u=F[0],f=F[1]-V*F[0],s=F[2]-O*F[1],l=F[3]-S*F[2],h=F[4]-R*F[3],c=F[5]-j*F[4],p=F[6]-I*F[5],g=F[7]-L*F[6],y=F[8]-B*F[7],d=U[0],m=U[1]-V*U[0],v=U[2]-O*U[1],w=U[3]-S*U[2],b=U[4]-R*U[3],_=U[5]-j*U[4],E=U[6]-I*U[5],T=U[7]-L*U[6],x=U[8]-B*U[7]),M=t.offset,k=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],$=0;$<P;$++){for(J=0;J<B;J++){for(G=0;G<L;G++){for(W=0;W<I;W++){for(z=0;z<j;z++){for(D=0;D<R;D++){for(Y=0;Y<S;Y++){for(N=0;N<O;N++){for(C=0;C<V;C++)a(i,k,o(n,M)),M+=u,k+=d;M+=f,k+=m}M+=s,k+=v}M+=l,k+=w}M+=h,k+=b}M+=c,k+=_}M+=p,k+=E}M+=g,k+=T}M+=y,k+=x}},function(t,r,e){var n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q;for(O=t.shape,k=t.strides,C=r.strides,e?(S=O[9],R=O[8],j=O[7],I=O[6],L=O[5],B=O[4],P=O[3],F=O[2],U=O[1],M=O[0],u=k[9],f=k[8]-S*k[9],s=k[7]-R*k[8],l=k[6]-j*k[7],h=k[5]-I*k[6],c=k[4]-L*k[5],p=k[3]-B*k[4],g=k[2]-P*k[3],y=k[1]-F*k[2],d=k[0]-U*k[1],m=C[9],v=C[8]-S*C[9],w=C[7]-R*C[8],b=C[6]-j*C[7],_=C[5]-I*C[6],E=C[4]-L*C[5],T=C[3]-B*C[4],x=C[2]-P*C[3],A=C[1]-F*C[2],V=C[0]-U*C[1]):(S=O[0],R=O[1],j=O[2],I=O[3],L=O[4],B=O[5],P=O[6],F=O[7],U=O[8],M=O[9],u=k[0],f=k[1]-S*k[0],s=k[2]-R*k[1],l=k[3]-j*k[2],h=k[4]-I*k[3],c=k[5]-L*k[4],p=k[6]-B*k[5],g=k[7]-P*k[6],y=k[8]-F*k[7],d=k[9]-U*k[8],m=C[0],v=C[1]-S*C[0],w=C[2]-R*C[1],b=C[3]-j*C[2],_=C[4]-I*C[3],E=C[5]-L*C[4],T=C[6]-B*C[5],x=C[7]-P*C[6],A=C[8]-F*C[7],V=C[9]-U*C[8]),N=t.offset,Y=r.offset,n=t.data,i=r.data,o=t.accessors[0],a=r.accessors[1],q=0;q<M;q++){for(X=0;X<U;X++){for(K=0;K<F;K++){for(Z=0;Z<P;Z++){for($=0;$<B;$++){for(J=0;J<L;J++){for(G=0;G<I;G++){for(W=0;W<j;W++){for(z=0;z<R;z++){for(D=0;D<S;D++)a(i,Y,o(n,N)),N+=u,Y+=m;N+=f,Y+=v}N+=s,Y+=w}N+=l,Y+=b}N+=h,Y+=_}N+=c,Y+=E}N+=p,Y+=T}N+=g,Y+=x}N+=y,Y+=A}N+=d,Y+=V}}],Vu=[function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x;for(h=(x=vu(t.shape,t.strides,r.strides)).sh,g=x.sx,y=x.sy,e=bu(t.dtype,r.dtype),d=t.offset,m=r.offset,n=t.data,i=r.data,o=g[0],u=y[0],T=h[1];T>0;)for(T<e?(p=T,T=0):(p=e,T-=e),s=d+T*g[1],l=m+T*y[1],E=h[0];E>0;)for(E<e?(c=E,E=0):(c=e,E-=e),v=s+E*g[0],w=l+E*y[0],a=g[1]-c*g[0],f=y[1]-c*y[0],_=0;_<p;_++){for(b=0;b<c;b++)i[w]=n[v],v+=o,w+=u;v+=a,w+=f}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I;for(y=(I=vu(t.shape,t.strides,r.strides)).sh,w=I.sx,b=I.sy,e=bu(t.dtype,r.dtype),_=t.offset,E=r.offset,n=t.data,i=r.data,o=w[0],f=b[0],j=y[2];j>0;)for(j<e?(v=j,j=0):(v=e,j-=e),c=_+j*w[2],g=E+j*b[2],R=y[1];R>0;)for(R<e?(m=R,R=0):(m=e,R-=e),u=w[2]-m*w[1],l=b[2]-m*b[1],h=c+R*w[1],p=g+R*b[1],S=y[0];S>0;)for(S<e?(d=S,S=0):(d=e,S-=e),T=h+S*w[0],x=p+S*b[0],a=w[1]-d*w[0],s=b[1]-d*b[0],O=0;O<v;O++){for(V=0;V<m;V++){for(A=0;A<d;A++)i[x]=n[T],T+=o,x+=f;T+=a,x+=s}T+=u,x+=l}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k;for(w=(k=vu(t.shape,t.strides,r.strides)).sh,x=k.sx,A=k.sy,e=bu(t.dtype,r.dtype),V=t.offset,O=r.offset,n=t.data,i=r.data,o=x[0],s=A[0],M=w[3];M>0;)for(M<e?(T=M,M=0):(T=e,M-=e),y=V+M*x[3],v=O+M*A[3],U=w[2];U>0;)for(U<e?(E=U,U=0):(E=e,U-=e),f=x[3]-E*x[2],c=A[3]-E*A[2],g=y+U*x[2],m=v+U*A[2],F=w[1];F>0;)for(F<e?(_=F,F=0):(_=e,F-=e),u=x[2]-_*x[1],h=A[2]-_*A[1],p=g+F*x[1],d=m+F*A[1],P=w[0];P>0;)for(P<e?(b=P,P=0):(b=e,P-=e),S=p+P*x[0],R=d+P*A[0],a=x[1]-b*x[0],l=A[1]-b*A[0],B=0;B<T;B++){for(L=0;L<E;L++){for(I=0;I<_;I++){for(j=0;j<b;j++)i[R]=n[S],S+=o,R+=s;S+=a,R+=l}S+=u,R+=h}S+=f,R+=c}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G;for(T=(G=vu(t.shape,t.strides,r.strides)).sh,R=G.sx,j=G.sy,e=bu(t.dtype,r.dtype),I=t.offset,L=r.offset,n=t.data,i=r.data,o=R[0],l=j[0],W=T[4];W>0;)for(W<e?(S=W,W=0):(S=e,W-=e),v=I+W*R[4],E=L+W*j[4],z=T[3];z>0;)for(z<e?(O=z,z=0):(O=e,z-=e),s=R[4]-O*R[3],g=j[4]-O*j[3],m=v+z*R[3],_=E+z*j[3],D=T[2];D>0;)for(D<e?(V=D,D=0):(V=e,D-=e),f=R[3]-V*R[2],p=j[3]-V*j[2],d=m+D*R[2],b=_+D*j[2],Y=T[1];Y>0;)for(Y<e?(A=Y,Y=0):(A=e,Y-=e),u=R[2]-A*R[1],c=j[2]-A*j[1],y=d+Y*R[1],w=b+Y*j[1],N=T[0];N>0;)for(N<e?(x=N,N=0):(x=e,N-=e),B=y+N*R[0],P=w+N*j[0],a=R[1]-x*R[0],h=j[1]-x*j[0],C=0;C<S;C++){for(k=0;k<O;k++){for(M=0;M<V;M++){for(U=0;U<A;U++){for(F=0;F<x;F++)i[P]=n[B],B+=o,P+=l;B+=a,P+=h}B+=u,P+=c}B+=f,P+=p}B+=s,P+=g}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H;for(O=(H=vu(t.shape,t.strides,r.strides)).sh,P=H.sx,F=H.sy,e=bu(t.dtype,r.dtype),U=t.offset,M=r.offset,n=t.data,i=r.data,o=P[0],h=F[0],q=O[5];q>0;)for(q<e?(B=q,q=0):(B=e,q-=e),_=U+q*P[5],V=M+q*F[5],X=O[4];X>0;)for(X<e?(L=X,X=0):(L=e,X-=e),l=P[5]-L*P[4],d=F[5]-L*F[4],b=_+X*P[4],A=V+X*F[4],K=O[3];K>0;)for(K<e?(I=K,K=0):(I=e,K-=e),s=P[4]-I*P[3],y=F[4]-I*F[3],w=b+K*P[3],x=A+K*F[3],Z=O[2];Z>0;)for(Z<e?(j=Z,Z=0):(j=e,Z-=e),f=P[3]-j*P[2],g=F[3]-j*F[2],v=w+Z*P[2],T=x+Z*F[2],$=O[1];$>0;)for($<e?(R=$,$=0):(R=e,$-=e),u=P[2]-R*P[1],p=F[2]-R*F[1],m=v+$*P[1],E=T+$*F[1],J=O[0];J>0;)for(J<e?(S=J,J=0):(S=e,J-=e),k=m+J*P[0],C=E+J*F[0],a=P[1]-S*P[0],c=F[1]-S*F[0],G=0;G<B;G++){for(W=0;W<L;W++){for(z=0;z<I;z++){for(D=0;D<j;D++){for(Y=0;Y<R;Y++){for(N=0;N<S;N++)i[C]=n[k],k+=o,C+=h;k+=a,C+=c}k+=u,C+=p}k+=f,C+=g}k+=s,C+=y}k+=l,C+=d}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot;for(I=(ot=vu(t.shape,t.strides,r.strides)).sh,C=ot.sx,N=ot.sy,e=bu(t.dtype,r.dtype),Y=t.offset,D=r.offset,n=t.data,i=r.data,o=C[0],c=N[0],it=I[6];it>0;)for(it<e?(k=it,it=0):(k=e,it-=e),x=Y+it*C[6],j=D+it*N[6],nt=I[5];nt>0;)for(nt<e?(M=nt,nt=0):(M=e,nt-=e),h=C[6]-M*C[5],v=N[6]-M*N[5],T=x+nt*C[5],R=j+nt*N[5],et=I[4];et>0;)for(et<e?(U=et,et=0):(U=e,et-=e),l=C[5]-U*C[4],m=N[5]-U*N[4],E=T+et*C[4],S=R+et*N[4],rt=I[3];rt>0;)for(rt<e?(F=rt,rt=0):(F=e,rt-=e),s=C[4]-F*C[3],d=N[4]-F*N[3],_=E+rt*C[3],O=S+rt*N[3],tt=I[2];tt>0;)for(tt<e?(P=tt,tt=0):(P=e,tt-=e),f=C[3]-P*C[2],y=N[3]-P*N[2],b=_+tt*C[2],V=O+tt*N[2],Q=I[1];Q>0;)for(Q<e?(B=Q,Q=0):(B=e,Q-=e),u=C[2]-B*C[1],g=N[2]-B*N[1],w=b+Q*C[1],A=V+Q*N[1],H=I[0];H>0;)for(H<e?(L=H,H=0):(L=e,H-=e),z=w+H*C[0],W=A+H*N[0],a=C[1]-L*C[0],p=N[1]-L*N[0],q=0;q<k;q++){for(X=0;X<M;X++){for(K=0;K<U;K++){for(Z=0;Z<F;Z++){for($=0;$<P;$++){for(J=0;J<B;J++){for(G=0;G<L;G++)i[W]=n[z],z+=o,W+=c;z+=a,W+=p}z+=u,W+=g}z+=f,W+=y}z+=s,W+=d}z+=l,W+=m}z+=h,W+=v}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct;for(F=(ct=vu(t.shape,t.strides,r.strides)).sh,W=ct.sx,G=ct.sy,e=bu(t.dtype,r.dtype),J=t.offset,$=r.offset,n=t.data,i=r.data,o=W[0],p=G[0],ht=F[7];ht>0;)for(ht<e?(z=ht,ht=0):(z=e,ht-=e),O=J+ht*W[7],P=$+ht*G[7],lt=F[6];lt>0;)for(lt<e?(D=lt,lt=0):(D=e,lt-=e),c=W[7]-D*W[6],b=G[7]-D*G[6],V=O+lt*W[6],B=P+lt*G[6],st=F[5];st>0;)for(st<e?(Y=st,st=0):(Y=e,st-=e),h=W[6]-Y*W[5],w=G[6]-Y*G[5],A=V+st*W[5],L=B+st*G[5],ft=F[4];ft>0;)for(ft<e?(N=ft,ft=0):(N=e,ft-=e),l=W[5]-N*W[4],v=G[5]-N*G[4],x=A+ft*W[4],I=L+ft*G[4],ut=F[3];ut>0;)for(ut<e?(C=ut,ut=0):(C=e,ut-=e),s=W[4]-C*W[3],m=G[4]-C*G[3],T=x+ut*W[3],j=I+ut*G[3],at=F[2];at>0;)for(at<e?(k=at,at=0):(k=e,at-=e),f=W[3]-k*W[2],d=G[3]-k*G[2],E=T+at*W[2],R=j+at*G[2],ot=F[1];ot>0;)for(ot<e?(M=ot,ot=0):(M=e,ot-=e),u=W[2]-M*W[1],y=G[2]-M*G[1],_=E+ot*W[1],S=R+ot*G[1],it=F[0];it>0;)for(it<e?(U=it,it=0):(U=e,it-=e),Z=_+it*W[0],K=S+it*G[0],a=W[1]-U*W[0],g=G[1]-U*G[0],nt=0;nt<z;nt++){for(et=0;et<D;et++){for(rt=0;rt<Y;rt++){for(tt=0;tt<N;tt++){for(Q=0;Q<C;Q++){for(H=0;H<k;H++){for(q=0;q<M;q++){for(X=0;X<U;X++)i[K]=n[Z],Z+=o,K+=p;Z+=a,K+=g}Z+=u,K+=y}Z+=f,K+=d}Z+=s,K+=m}Z+=l,K+=v}Z+=h,K+=w}Z+=c,K+=b}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct,pt,gt,yt,dt,mt,vt,wt;for(C=(wt=vu(t.shape,t.strides,r.strides)).sh,K=wt.sx,X=wt.sy,e=bu(t.dtype,r.dtype),q=t.offset,H=r.offset,n=t.data,i=r.data,o=K[0],g=X[0],vt=C[8];vt>0;)for(vt<e?(Z=vt,vt=0):(Z=e,vt-=e),j=q+vt*K[8],k=H+vt*X[8],mt=C[7];mt>0;)for(mt<e?($=mt,mt=0):($=e,mt-=e),p=K[8]-$*K[7],E=X[8]-$*X[7],R=j+mt*K[7],M=k+mt*X[7],dt=C[6];dt>0;)for(dt<e?(J=dt,dt=0):(J=e,dt-=e),c=K[7]-J*K[6],_=X[7]-J*X[6],S=R+dt*K[6],U=M+dt*X[6],yt=C[5];yt>0;)for(yt<e?(G=yt,yt=0):(G=e,yt-=e),h=K[6]-G*K[5],b=X[6]-G*X[5],O=S+yt*K[5],F=U+yt*X[5],gt=C[4];gt>0;)for(gt<e?(W=gt,gt=0):(W=e,gt-=e),l=K[5]-W*K[4],w=X[5]-W*X[4],V=O+gt*K[4],P=F+gt*X[4],pt=C[3];pt>0;)for(pt<e?(z=pt,pt=0):(z=e,pt-=e),s=K[4]-z*K[3],v=X[4]-z*X[3],A=V+pt*K[3],B=P+pt*X[3],ct=C[2];ct>0;)for(ct<e?(D=ct,ct=0):(D=e,ct-=e),f=K[3]-D*K[2],m=X[3]-D*X[2],x=A+ct*K[2],L=B+ct*X[2],ht=C[1];ht>0;)for(ht<e?(Y=ht,ht=0):(Y=e,ht-=e),u=K[2]-Y*K[1],d=X[2]-Y*X[1],T=x+ht*K[1],I=L+ht*X[1],lt=C[0];lt>0;)for(lt<e?(N=lt,lt=0):(N=e,lt-=e),Q=T+lt*K[0],tt=I+lt*X[0],a=K[1]-N*K[0],y=X[1]-N*X[0],st=0;st<Z;st++){for(ft=0;ft<$;ft++){for(ut=0;ut<J;ut++){for(at=0;at<G;at++){for(ot=0;ot<W;ot++){for(it=0;it<z;it++){for(nt=0;nt<D;nt++){for(et=0;et<Y;et++){for(rt=0;rt<N;rt++)i[tt]=n[Q],Q+=o,tt+=g;Q+=a,tt+=y}Q+=u,tt+=d}Q+=f,tt+=m}Q+=s,tt+=v}Q+=l,tt+=w}Q+=h,tt+=b}Q+=c,tt+=_}Q+=p,tt+=E}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct,pt,gt,yt,dt,mt,vt,wt,bt,_t,Et,Tt,xt,At,Vt;for(z=(Vt=vu(t.shape,t.strides,r.strides)).sh,tt=Vt.sx,rt=Vt.sy,e=bu(t.dtype,r.dtype),et=t.offset,nt=r.offset,n=t.data,i=r.data,o=tt[0],y=rt[0],At=z[9];At>0;)for(At<e?(Q=At,At=0):(Q=e,At-=e),B=et+At*tt[9],D=nt+At*rt[9],xt=z[8];xt>0;)for(xt<e?(H=xt,xt=0):(H=e,xt-=e),g=tt[9]-H*tt[8],x=rt[9]-H*rt[8],L=B+xt*tt[8],Y=D+xt*rt[8],Tt=z[7];Tt>0;)for(Tt<e?(q=Tt,Tt=0):(q=e,Tt-=e),p=tt[8]-q*tt[7],T=rt[8]-q*rt[7],I=L+Tt*tt[7],N=Y+Tt*rt[7],Et=z[6];Et>0;)for(Et<e?(X=Et,Et=0):(X=e,Et-=e),c=tt[7]-X*tt[6],E=rt[7]-X*rt[6],j=I+Et*tt[6],C=N+Et*rt[6],_t=z[5];_t>0;)for(_t<e?(K=_t,_t=0):(K=e,_t-=e),h=tt[6]-K*tt[5],_=rt[6]-K*rt[5],R=j+_t*tt[5],k=C+_t*rt[5],bt=z[4];bt>0;)for(bt<e?(Z=bt,bt=0):(Z=e,bt-=e),l=tt[5]-Z*tt[4],b=rt[5]-Z*rt[4],S=R+bt*tt[4],M=k+bt*rt[4],wt=z[3];wt>0;)for(wt<e?($=wt,wt=0):($=e,wt-=e),s=tt[4]-$*tt[3],w=rt[4]-$*rt[3],O=S+wt*tt[3],U=M+wt*rt[3],vt=z[2];vt>0;)for(vt<e?(J=vt,vt=0):(J=e,vt-=e),f=tt[3]-J*tt[2],v=rt[3]-J*rt[2],V=O+vt*tt[2],F=U+vt*rt[2],mt=z[1];mt>0;)for(mt<e?(G=mt,mt=0):(G=e,mt-=e),u=tt[2]-G*tt[1],m=rt[2]-G*rt[1],A=V+mt*tt[1],P=F+mt*rt[1],dt=z[0];dt>0;)for(dt<e?(W=dt,dt=0):(W=e,dt-=e),it=A+dt*tt[0],ot=P+dt*rt[0],a=tt[1]-W*tt[0],d=rt[1]-W*rt[0],yt=0;yt<Q;yt++){for(gt=0;gt<H;gt++){for(pt=0;pt<q;pt++){for(ct=0;ct<X;ct++){for(ht=0;ht<K;ht++){for(lt=0;lt<Z;lt++){for(st=0;st<$;st++){for(ft=0;ft<J;ft++){for(ut=0;ut<G;ut++){for(at=0;at<W;at++)i[ot]=n[it],it+=o,ot+=y;it+=a,ot+=d}it+=u,ot+=m}it+=f,ot+=v}it+=s,ot+=w}it+=l,ot+=b}it+=h,ot+=_}it+=c,ot+=E}it+=p,ot+=T}it+=g,ot+=x}}],Ou=[function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V;for(p=(V=vu(t.shape,t.strides,r.strides)).sh,d=V.sx,m=V.sy,e=bu(t.dtype,r.dtype),v=t.offset,w=r.offset,n=t.data,i=r.data,u=d[0],s=m[0],o=t.accessors[0],a=r.accessors[1],A=p[1];A>0;)for(A<e?(y=A,A=0):(y=e,A-=e),h=v+A*d[1],c=w+A*m[1],x=p[0];x>0;)for(x<e?(g=x,x=0):(g=e,x-=e),b=h+x*d[0],_=c+x*m[0],f=d[1]-g*d[0],l=m[1]-g*m[0],T=0;T<y;T++){for(E=0;E<g;E++)a(i,_,o(n,b)),b+=u,_+=s;b+=f,_+=l}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B;for(m=(B=vu(t.shape,t.strides,r.strides)).sh,_=B.sx,E=B.sy,e=bu(t.dtype,r.dtype),T=t.offset,x=r.offset,n=t.data,i=r.data,u=_[0],l=E[0],o=t.accessors[0],a=r.accessors[1],L=m[2];L>0;)for(L<e?(b=L,L=0):(b=e,L-=e),g=T+L*_[2],d=x+L*E[2],I=m[1];I>0;)for(I<e?(w=I,I=0):(w=e,I-=e),s=_[2]-w*_[1],c=E[2]-w*E[1],p=g+I*_[1],y=d+I*E[1],j=m[0];j>0;)for(j<e?(v=j,j=0):(v=e,j-=e),A=p+j*_[0],V=y+j*E[0],f=_[1]-v*_[0],h=E[1]-v*E[0],R=0;R<b;R++){for(S=0;S<w;S++){for(O=0;O<v;O++)a(i,V,o(n,A)),A+=u,V+=l;A+=f,V+=h}A+=s,V+=c}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N;for(_=(N=vu(t.shape,t.strides,r.strides)).sh,V=N.sx,O=N.sy,e=bu(t.dtype,r.dtype),S=t.offset,R=r.offset,n=t.data,i=r.data,u=V[0],h=O[0],o=t.accessors[0],a=r.accessors[1],C=_[3];C>0;)for(C<e?(A=C,C=0):(A=e,C-=e),m=S+C*V[3],b=R+C*O[3],k=_[2];k>0;)for(k<e?(x=k,k=0):(x=e,k-=e),l=V[3]-x*V[2],g=O[3]-x*O[2],d=m+k*V[2],w=b+k*O[2],M=_[1];M>0;)for(M<e?(T=M,M=0):(T=e,M-=e),s=V[2]-T*V[1],p=O[2]-T*O[1],y=d+M*V[1],v=w+M*O[1],U=_[0];U>0;)for(U<e?(E=U,U=0):(E=e,U-=e),j=y+U*V[0],I=v+U*O[0],f=V[1]-E*V[0],c=O[1]-E*O[0],F=0;F<A;F++){for(P=0;P<x;P++){for(B=0;B<T;B++){for(L=0;L<E;L++)a(i,I,o(n,j)),j+=u,I+=h;j+=f,I+=c}j+=s,I+=p}j+=l,I+=g}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$;for(A=($=vu(t.shape,t.strides,r.strides)).sh,I=$.sx,L=$.sy,e=bu(t.dtype,r.dtype),B=t.offset,P=r.offset,n=t.data,i=r.data,u=I[0],c=L[0],o=t.accessors[0],a=r.accessors[1],J=A[4];J>0;)for(J<e?(j=J,J=0):(j=e,J-=e),b=B+J*I[4],x=P+J*L[4],G=A[3];G>0;)for(G<e?(R=G,G=0):(R=e,G-=e),h=I[4]-R*I[3],d=L[4]-R*L[3],w=b+G*I[3],T=x+G*L[3],W=A[2];W>0;)for(W<e?(S=W,W=0):(S=e,W-=e),l=I[3]-S*I[2],y=L[3]-S*L[2],v=w+W*I[2],E=T+W*L[2],z=A[1];z>0;)for(z<e?(O=z,z=0):(O=e,z-=e),s=I[2]-O*I[1],g=L[2]-O*L[1],m=v+z*I[1],_=E+z*L[1],D=A[0];D>0;)for(D<e?(V=D,D=0):(V=e,D-=e),F=m+D*I[0],U=_+D*L[0],f=I[1]-V*I[0],p=L[1]-V*L[0],Y=0;Y<j;Y++){for(N=0;N<R;N++){for(C=0;C<S;C++){for(k=0;k<O;k++){for(M=0;M<V;M++)a(i,U,o(n,F)),F+=u,U+=c;F+=f,U+=p}F+=s,U+=g}F+=l,U+=y}F+=h,U+=d}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt;for(R=(tt=vu(t.shape,t.strides,r.strides)).sh,U=tt.sx,M=tt.sy,e=bu(t.dtype,r.dtype),k=t.offset,C=r.offset,n=t.data,i=r.data,u=U[0],p=M[0],o=t.accessors[0],a=r.accessors[1],Q=R[5];Q>0;)for(Q<e?(F=Q,Q=0):(F=e,Q-=e),T=k+Q*U[5],S=C+Q*M[5],H=R[4];H>0;)for(H<e?(P=H,H=0):(P=e,H-=e),c=U[5]-P*U[4],v=M[5]-P*M[4],E=T+H*U[4],O=S+H*M[4],q=R[3];q>0;)for(q<e?(B=q,q=0):(B=e,q-=e),h=U[4]-B*U[3],m=M[4]-B*M[3],_=E+q*U[3],V=O+q*M[3],X=R[2];X>0;)for(X<e?(L=X,X=0):(L=e,X-=e),l=U[3]-L*U[2],d=M[3]-L*M[2],b=_+X*U[2],A=V+X*M[2],K=R[1];K>0;)for(K<e?(I=K,K=0):(I=e,K-=e),s=U[2]-I*U[1],y=M[2]-I*M[1],w=b+K*U[1],x=A+K*M[1],Z=R[0];Z>0;)for(Z<e?(j=Z,Z=0):(j=e,Z-=e),N=w+Z*U[0],Y=x+Z*M[0],f=U[1]-j*U[0],g=M[1]-j*M[0],$=0;$<F;$++){for(J=0;J<P;J++){for(G=0;G<B;G++){for(W=0;W<L;W++){for(z=0;z<I;z++){for(D=0;D<j;D++)a(i,Y,o(n,N)),N+=u,Y+=p;N+=f,Y+=g}N+=s,Y+=y}N+=l,Y+=d}N+=h,Y+=m}N+=c,Y+=v}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut;for(B=(ut=vu(t.shape,t.strides,r.strides)).sh,Y=ut.sx,D=ut.sy,e=bu(t.dtype,r.dtype),z=t.offset,W=r.offset,n=t.data,i=r.data,u=Y[0],g=D[0],o=t.accessors[0],a=r.accessors[1],at=B[6];at>0;)for(at<e?(N=at,at=0):(N=e,at-=e),V=z+at*Y[6],L=W+at*D[6],ot=B[5];ot>0;)for(ot<e?(C=ot,ot=0):(C=e,ot-=e),p=Y[6]-C*Y[5],b=D[6]-C*D[5],A=V+ot*Y[5],I=L+ot*D[5],it=B[4];it>0;)for(it<e?(k=it,it=0):(k=e,it-=e),c=Y[5]-k*Y[4],w=D[5]-k*D[4],x=A+it*Y[4],j=I+it*D[4],nt=B[3];nt>0;)for(nt<e?(M=nt,nt=0):(M=e,nt-=e),h=Y[4]-M*Y[3],v=D[4]-M*D[3],T=x+nt*Y[3],R=j+nt*D[3],et=B[2];et>0;)for(et<e?(U=et,et=0):(U=e,et-=e),l=Y[3]-U*Y[2],m=D[3]-U*D[2],E=T+et*Y[2],S=R+et*D[2],rt=B[1];rt>0;)for(rt<e?(F=rt,rt=0):(F=e,rt-=e),s=Y[2]-F*Y[1],d=D[2]-F*D[1],_=E+rt*Y[1],O=S+rt*D[1],tt=B[0];tt>0;)for(tt<e?(P=tt,tt=0):(P=e,tt-=e),G=_+tt*Y[0],J=O+tt*D[0],f=Y[1]-P*Y[0],y=D[1]-P*D[0],Q=0;Q<N;Q++){for(H=0;H<C;H++){for(q=0;q<k;q++){for(X=0;X<M;X++){for(K=0;K<U;K++){for(Z=0;Z<F;Z++){for($=0;$<P;$++)a(i,J,o(n,G)),G+=u,J+=g;G+=f,J+=y}G+=s,J+=d}G+=l,J+=m}G+=h,J+=v}G+=c,J+=w}G+=p,J+=b}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct,pt,gt;for(M=(gt=vu(t.shape,t.strides,r.strides)).sh,J=gt.sx,$=gt.sy,e=bu(t.dtype,r.dtype),Z=t.offset,K=r.offset,n=t.data,i=r.data,u=J[0],y=$[0],o=t.accessors[0],a=r.accessors[1],pt=M[7];pt>0;)for(pt<e?(G=pt,pt=0):(G=e,pt-=e),R=Z+pt*J[7],U=K+pt*$[7],ct=M[6];ct>0;)for(ct<e?(W=ct,ct=0):(W=e,ct-=e),g=J[7]-W*J[6],E=$[7]-W*$[6],S=R+ct*J[6],F=U+ct*$[6],ht=M[5];ht>0;)for(ht<e?(z=ht,ht=0):(z=e,ht-=e),p=J[6]-z*J[5],_=$[6]-z*$[5],O=S+ht*J[5],P=F+ht*$[5],lt=M[4];lt>0;)for(lt<e?(D=lt,lt=0):(D=e,lt-=e),c=J[5]-D*J[4],b=$[5]-D*$[4],V=O+lt*J[4],B=P+lt*$[4],st=M[3];st>0;)for(st<e?(Y=st,st=0):(Y=e,st-=e),h=J[4]-Y*J[3],w=$[4]-Y*$[3],A=V+st*J[3],L=B+st*$[3],ft=M[2];ft>0;)for(ft<e?(N=ft,ft=0):(N=e,ft-=e),l=J[3]-N*J[2],v=$[3]-N*$[2],x=A+ft*J[2],I=L+ft*$[2],ut=M[1];ut>0;)for(ut<e?(C=ut,ut=0):(C=e,ut-=e),s=J[2]-C*J[1],m=$[2]-C*$[1],T=x+ut*J[1],j=I+ut*$[1],at=M[0];at>0;)for(at<e?(k=at,at=0):(k=e,at-=e),X=T+at*J[0],q=j+at*$[0],f=J[1]-k*J[0],d=$[1]-k*$[0],ot=0;ot<G;ot++){for(it=0;it<W;it++){for(nt=0;nt<z;nt++){for(et=0;et<D;et++){for(rt=0;rt<Y;rt++){for(tt=0;tt<N;tt++){for(Q=0;Q<C;Q++){for(H=0;H<k;H++)a(i,q,o(n,X)),X+=u,q+=y;X+=f,q+=d}X+=s,q+=m}X+=l,q+=v}X+=h,q+=w}X+=c,q+=b}X+=p,q+=_}X+=g,q+=E}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct,pt,gt,yt,dt,mt,vt,wt,bt,_t;for(Y=(_t=vu(t.shape,t.strides,r.strides)).sh,q=_t.sx,H=_t.sy,e=bu(t.dtype,r.dtype),Q=t.offset,tt=r.offset,n=t.data,i=r.data,u=q[0],d=H[0],o=t.accessors[0],a=r.accessors[1],bt=Y[8];bt>0;)for(bt<e?(X=bt,bt=0):(X=e,bt-=e),L=Q+bt*q[8],N=tt+bt*H[8],wt=Y[7];wt>0;)for(wt<e?(K=wt,wt=0):(K=e,wt-=e),y=q[8]-K*q[7],x=H[8]-K*H[7],I=L+wt*q[7],C=N+wt*H[7],vt=Y[6];vt>0;)for(vt<e?(Z=vt,vt=0):(Z=e,vt-=e),g=q[7]-Z*q[6],T=H[7]-Z*H[6],j=I+vt*q[6],k=C+vt*H[6],mt=Y[5];mt>0;)for(mt<e?($=mt,mt=0):($=e,mt-=e),p=q[6]-$*q[5],E=H[6]-$*H[5],R=j+mt*q[5],M=k+mt*H[5],dt=Y[4];dt>0;)for(dt<e?(J=dt,dt=0):(J=e,dt-=e),c=q[5]-J*q[4],_=H[5]-J*H[4],S=R+dt*q[4],U=M+dt*H[4],yt=Y[3];yt>0;)for(yt<e?(G=yt,yt=0):(G=e,yt-=e),h=q[4]-G*q[3],b=H[4]-G*H[3],O=S+yt*q[3],F=U+yt*H[3],gt=Y[2];gt>0;)for(gt<e?(W=gt,gt=0):(W=e,gt-=e),l=q[3]-W*q[2],w=H[3]-W*H[2],V=O+gt*q[2],P=F+gt*H[2],pt=Y[1];pt>0;)for(pt<e?(z=pt,pt=0):(z=e,pt-=e),s=q[2]-z*q[1],v=H[2]-z*H[1],A=V+pt*q[1],B=P+pt*H[1],ct=Y[0];ct>0;)for(ct<e?(D=ct,ct=0):(D=e,ct-=e),rt=A+ct*q[0],et=B+ct*H[0],f=q[1]-D*q[0],m=H[1]-D*H[0],ht=0;ht<X;ht++){for(lt=0;lt<K;lt++){for(st=0;st<Z;st++){for(ft=0;ft<$;ft++){for(ut=0;ut<J;ut++){for(at=0;at<G;at++){for(ot=0;ot<W;ot++){for(it=0;it<z;it++){for(nt=0;nt<D;nt++)a(i,et,o(n,rt)),rt+=u,et+=d;rt+=f,et+=m}rt+=s,et+=v}rt+=l,et+=w}rt+=h,et+=b}rt+=c,et+=_}rt+=p,et+=E}rt+=g,et+=T}rt+=y,et+=x}},function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w,b,_,E,T,x,A,V,O,S,R,j,I,L,B,P,F,U,M,k,C,N,Y,D,z,W,G,J,$,Z,K,X,q,H,Q,tt,rt,et,nt,it,ot,at,ut,ft,st,lt,ht,ct,pt,gt,yt,dt,mt,vt,wt,bt,_t,Et,Tt,xt,At,Vt,Ot,St;for(G=(St=vu(t.shape,t.strides,r.strides)).sh,et=St.sx,nt=St.sy,e=bu(t.dtype,r.dtype),it=t.offset,ot=r.offset,n=t.data,i=r.data,u=et[0],m=nt[0],o=t.accessors[0],a=r.accessors[1],Ot=G[9];Ot>0;)for(Ot<e?(rt=Ot,Ot=0):(rt=e,Ot-=e),F=it+Ot*et[9],W=ot+Ot*nt[9],Vt=G[8];Vt>0;)for(Vt<e?(tt=Vt,Vt=0):(tt=e,Vt-=e),d=et[9]-tt*et[8],V=nt[9]-tt*nt[8],P=F+Vt*et[8],z=W+Vt*nt[8],At=G[7];At>0;)for(At<e?(Q=At,At=0):(Q=e,At-=e),y=et[8]-Q*et[7],A=nt[8]-Q*nt[7],B=P+At*et[7],D=z+At*nt[7],xt=G[6];xt>0;)for(xt<e?(H=xt,xt=0):(H=e,xt-=e),g=et[7]-H*et[6],x=nt[7]-H*nt[6],L=B+xt*et[6],Y=D+xt*nt[6],Tt=G[5];Tt>0;)for(Tt<e?(q=Tt,Tt=0):(q=e,Tt-=e),p=et[6]-q*et[5],T=nt[6]-q*nt[5],I=L+Tt*et[5],N=Y+Tt*nt[5],Et=G[4];Et>0;)for(Et<e?(X=Et,Et=0):(X=e,Et-=e),c=et[5]-X*et[4],E=nt[5]-X*nt[4],j=I+Et*et[4],C=N+Et*nt[4],_t=G[3];_t>0;)for(_t<e?(K=_t,_t=0):(K=e,_t-=e),h=et[4]-K*et[3],_=nt[4]-K*nt[3],R=j+_t*et[3],k=C+_t*nt[3],bt=G[2];bt>0;)for(bt<e?(Z=bt,bt=0):(Z=e,bt-=e),l=et[3]-Z*et[2],b=nt[3]-Z*nt[2],S=R+bt*et[2],M=k+bt*nt[2],wt=G[1];wt>0;)for(wt<e?($=wt,wt=0):($=e,wt-=e),s=et[2]-$*et[1],w=nt[2]-$*nt[1],O=S+wt*et[1],U=M+wt*nt[1],vt=G[0];vt>0;)for(vt<e?(J=vt,vt=0):(J=e,vt-=e),at=O+vt*et[0],ut=U+vt*nt[0],f=et[1]-J*et[0],v=nt[1]-J*nt[0],mt=0;mt<rt;mt++){for(dt=0;dt<tt;dt++){for(yt=0;yt<Q;yt++){for(gt=0;gt<H;gt++){for(pt=0;pt<q;pt++){for(ct=0;ct<X;ct++){for(ht=0;ht<K;ht++){for(lt=0;lt<Z;lt++){for(st=0;st<$;st++){for(ft=0;ft<J;ft++)a(i,ut,o(n,at)),at+=u,ut+=m;at+=f,ut+=v}at+=s,ut+=w}at+=l,ut+=b}at+=h,ut+=_}at+=c,ut+=E}at+=p,ut+=T}at+=g,ut+=x}at+=y,ut+=A}at+=d,ut+=V}}],Su=xu.length-1,Ru={complex128:"float64",complex64:"float32",complex32:"float16"};function ju(t){return t.data=function(t,r){return new be(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,t.length-r)}(t.data,0),t.accessorProtocol=!1,t}function Iu(t){var r=t.shape.length;return t.data=function(t,r){if(He(t))return on(t,r);if(Xe(t))return nn(t,r);throw new TypeError(R("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",t))}(t.data,0),t.accessorProtocol=!1,t.dtype=Ru[String(t.dtype)],t.strides=gu(r,2,t.strides,1),t.offset*=2,t.shape.push(2),0===r?t.strides[0]=1:t.strides.push(1),t}function Lu(t){var r,e,n,i,o,a,u,f,s,l,h,c,p,g,y,d,m,v,w;if(y=lu(t[0]),d=lu(t[1]),tu(y.data)&&tu(d.data)?(y=ju(y),d=ju(d)):Ha(y.data)&&Ha(d.data)?(y=Iu(y),d=Iu(d)):(w=y.dtype,Ka(String(w))&&function(t){return Za(String(t))}(d.dtype)&&(y.accessorProtocol=!0,y.accessors[0]=function(t,r,e){var n;if(!gr(t))throw new TypeError(R("invalid argument. First argument must be a function. Value: `%s`.",t));if(!Ie(r))throw new TypeError(R("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",r));if(!gr(e))throw new TypeError(R("invalid argument. Third argument must be a constructor function. Value: `%s`.",e));return n=[function(){var r=t();return typeof r===ru?new e(r,0):r},function(r){var n=t(r);return typeof n===ru?new e(n,0):n},function(r,n){var i=t(r,n);return typeof i===ru?new e(i,0):i},function(r,n,i){var o=t(r,n,i);return typeof o===ru?new e(o,0):o},function(r,n,i,o){var a=t(r,n,i,o);return typeof a===ru?new e(a,0):a},function(r,n,i,o,a){var u=t(r,n,i,o,a);return typeof u===ru?new e(u,0):u}],r<=5?n[r]:function(){var r,n,i;for(r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);return typeof(n=t.apply(null,r))===ru?new e(n,0):n}}(y.accessors[0],2,function(t){return eu[t]||null}(String(d.dtype))))),i=y.shape,o=d.shape,(r=i.length)!==o.length)throw new Error("invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == "+r+". ndims(y) == "+o.length+".");if(0===r)return y.accessorProtocol||d.accessorProtocol?Au[r](y,d):xu[r](y,d);for(f=1,g=0,v=0;v<r;v++){if((m=i[v])!==o[v])throw new Error("invalid arguments. Arrays must have the same shape.");f*=m,1===m&&(g+=1)}if(0!==f){if(1===r)return y.accessorProtocol||d.accessorProtocol?Au[r](y,d):xu[r](y,d);if(l=y.strides,h=d.strides,g===r-1){for(v=0;v<r&&1===i[v];v++);return y.shape=[i[v]],d.shape=y.shape,y.strides=[l[v]],d.strides=[h[v]],y.accessorProtocol||d.accessorProtocol?Au[1](y,d):xu[1](y,d)}if(a=Ar(l),u=Ar(h),s=Or(l),0!==a&&0!==u&&s===Or(h)){if(e=Mn(i,l,y.offset),n=Mn(o,h,d.offset),f===e[1]-e[0]+1&&f===n[1]-n[0]+1)return c=1===a?e[0]:e[1],p=1===u?n[0]:n[1],y.shape=[f],d.shape=y.shape,y.strides=[a],d.strides=[u],y.offset=c,d.offset=p,y.accessorProtocol||d.accessorProtocol?Au[1](y,d):xu[1](y,d);if(r<=Su)return y.accessorProtocol||d.accessorProtocol?Au[r](y,d,1===s):xu[r](y,d,1===s)}return r<=Su?y.accessorProtocol||d.accessorProtocol?Ou[r-2](y,d):Vu[r-2](y,d):y.accessorProtocol||d.accessorProtocol?function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y;for(a=ma(s=t.shape),e=t.data,n=r.data,l=t.strides,h=r.strides,c=t.offset,p=r.offset,i=t.order,o=r.order,u=t.accessors[0],f=r.accessors[1],y=0;y<a;y++)g=_u(s,l,c,i,y,Eu),f(n,_u(s,h,p,o,y,Eu),u(e,g))}(y,d):void function(t,r){var e,n,i,o,a,u,f,s,l,h,c,p;for(a=ma(u=t.shape),e=t.data,n=r.data,f=t.strides,s=r.strides,l=t.offset,h=r.offset,i=t.order,o=r.order,p=0;p<a;p++)c=_u(u,f,l,i,p,Tu),n[_u(u,s,h,o,p,Tu)]=e[c]}(y,d)}}function Bu(){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}function Pu(t){var r,e,n,i,o,a;if(!((a=t)instanceof Ai||null!==a&&"object"==typeof a&&"object"==typeof a.data&&"object"==typeof a.shape&&"object"==typeof a.strides&&"number"==typeof a.offset&&"string"==typeof a.order&&"number"==typeof a.ndims&&a.dtype&&"number"==typeof a.length&&"object"==typeof a.flags&&"function"==typeof a.get&&"function"==typeof a.set))throw new TypeError(Bu("null5t",t));if(e={},arguments.length>1){if(!br(r=arguments[1]))throw new TypeError(Bu("null2V",r));if(i=Gi(t),W(r,"dtype")){if(!function(t,r){var e;return(t=Ri(t))===(r=Ri(r))||!!(e=Li[t])&&e[r]>0}(i,r.dtype))throw new TypeError(Bu("invalid option. First argument cannot be safely cast to the specified data type. Input data type: %s. Option: `%s`.",String(i),String(r.dtype)));e.dtype=r.dtype}else e.dtype=i;W(r,"order")?e.order=r.order:e.order=Xi(t),W(r,"mode")&&(e.mode=r.mode),W(r,"submode")&&(e.submode=r.submode)}else e.dtype=Gi(t),e.order=Xi(t);return n=function(t){var r,e,n,i;if("object"!=typeof t||null===t)throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!Kt(e=t.shape))throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));for(r=[],i=0;i<e.length;i++){if(!Ie(n=e[i]))throw new TypeError(R("invalid argument. Must provide an ndarray. Value: `%s`.",t));r.push(n)}return r}(t),o=function(t){var r,e,n,i,o,a,u;if(i={},arguments.length>1){if(!br(r=arguments[1]))throw new TypeError(R("invalid argument. Options argument must be an object. Value: `%s`.",r));e=W(r,"dtype")?r.dtype:Ja,n=W(r,"order")?r.order:$a,W(r,"mode")&&(i.mode=r.mode),W(r,"submode")&&(i.submode=r.submode)}else e=Ja,n=$a;if(ct(t))u=[t];else{if(!qi(t))throw new TypeError(R("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",t));u=t}if(u.length>0){if((o=ma(u))!=o||o<0)throw new TypeError(R("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",t));a=$i(u,n)}else o=1,a=[0];return new Ga(e,"binary"===e?oa(o):da(o,e),u,a,Hi(u,a),n,i)}(n,e),Lu([t,o]),o}export{Pu as default};
//# sourceMappingURL=mod.js.map