-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser.js
More file actions
3 lines (3 loc) · 88.3 KB
/
browser.js
File metadata and controls
3 lines (3 loc) · 88.3 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
var t,r;t=this,r=function(){"use strict";var t={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"]},r=/_and_generic$/;function e(){var e,n,i,o,a;return 0===arguments.length?t.all.slice():(i=!1,e=arguments[0],r.test(e)&&(o=r,a="","all"!==(e=e.replace(o,a))&&"index"!==e&&(i=!0)),n=(n=t[e])?n.slice():[],i&&n.length>0&&n.push("generic"),n)}var n="function"==typeof Object.defineProperty?Object.defineProperty:null,i=Object.defineProperty;function o(t){return"number"==typeof t}function a(t){var r,e="";for(r=0;r<t;r++)e+="0";return e}function u(t,r,e){var n=!1,i=r-t.length;return i<0||(function(t){return"-"===t[0]}(t)&&(n=!0,t=t.substr(1)),t=e?t+a(i):a(i)+t,n&&(t="-"+t)),t}var f=String.prototype.toLowerCase,l=String.prototype.toUpperCase;function s(t){var r,e,n;switch(t.specifier){case"b":r=2;break;case"o":r=8;break;case"x":case"X":r=16;break;default:r=10}if(e=t.arg,n=parseInt(e,10),!isFinite(n)){if(!o(e))throw new Error("invalid integer. Value: "+e);n=0}return n<0&&("u"===t.specifier||10!==r)&&(n=4294967295+n+1),n<0?(e=(-n).toString(r),t.precision&&(e=u(e,t.precision,t.padRight)),e="-"+e):(e=n.toString(r),n||t.precision?t.precision&&(e=u(e,t.precision,t.padRight)):e="",t.sign&&(e=t.sign+e)),16===r&&(t.alternate&&(e="0x"+e),e=t.specifier===l.call(t.specifier)?l.call(e):f.call(e)),8===r&&t.alternate&&"0"!==e.charAt(0)&&(e="0"+e),e}var h=Math.abs,c=String.prototype.toLowerCase,p=String.prototype.toUpperCase,g=String.prototype.replace,y=/e\+(\d)$/,m=/e-(\d)$/,w=/^(\d+)$/,b=/^(\d+)e/,v=/\.0$/,d=/\.0*e/,E=/(\..*[^0])0*e/;function _(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":h(t)<1e-4?((e=r.precision)>0&&(e-=1),n=t.toExponential(e)):n=t.toPrecision(r.precision),r.alternate||(n=g.call(n,E,"$1e"),n=g.call(n,d,"e"),n=g.call(n,v,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=g.call(n,y,"e+0$1"),n=g.call(n,m,"e-0$1"),r.alternate&&(n=g.call(n,w,"$1."),n=g.call(n,b,"$1.e")),t>=0&&r.sign&&(n=r.sign+n),n=r.specifier===p.call(r.specifier)?p.call(n):c.call(n)}function T(t){var r,e="";for(r=0;r<t;r++)e+=" ";return e}var x=String.fromCharCode,V=Array.isArray;function A(t){return t!=t}function j(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 S(t){var r,e,n,i,a,f,l,h,c,p,g,y,m,w;if(!V(t))throw new TypeError("invalid argument. First argument must be an array. Value: `"+t+"`.");for(f="",l=1,c=0;c<t.length;c++)if("string"==typeof(n=t[c]))f+=n;else{if(r=void 0!==n.precision,!(n=j(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+c+"`. Value: `"+n+"`.");for(n.mapping&&(l=n.mapping),e=n.flags,p=0;p<e.length;p++)switch(i=e.charAt(p)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=e.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===n.width){if(n.width=parseInt(arguments[l],10),l+=1,A(n.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(r&&"*"===n.precision){if(n.precision=parseInt(arguments[l],10),l+=1,A(n.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,r=!1)}switch(n.arg=arguments[l],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":r&&(n.padZeros=!1),n.arg=s(n);break;case"s":n.maxWidth=r?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!A(n.arg)){if((a=parseInt(n.arg,10))<0||a>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=A(a)?String(n.arg):x(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(r||(n.precision=6),h=parseFloat(n.arg),!isFinite(h)){if(!o(n.arg))throw new Error("invalid floating-point number. Value: "+f);h=n.arg,n.padZeros=!1}n.arg=_(h,n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=u(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(g=n.arg,y=n.width,m=n.padRight,w=void 0,(w=y-g.length)<0?g:g=m?g+T(w):T(w)+g)),f+=n.arg||"",l+=1}return f}var F=/%(?:([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 k(t){var r,e,n,i;for(e=[],i=0,n=F.exec(t);n;)(r=t.slice(i,F.lastIndex-n[0].length)).length&&e.push(r),"%"===n[6]?e.push("%"):e.push(O(n)),i=F.lastIndex,n=F.exec(t);return(r=t.slice(i)).length&&e.push(r),e}function L(t){var r,e;if("string"!=typeof t)throw new TypeError(L("invalid argument. First argument must be a string. Value: `%s`.",t));for(r=[k(t)],e=1;e<arguments.length;e++)r.push(arguments[e]);return S.apply(null,r)}var I,R=Object.prototype,B=R.toString,M=R.__defineGetter__,P=R.__defineSetter__,C=R.__lookupGetter__,N=R.__lookupSetter__;I=function(){try{return n({},"x",{}),!0}catch(t){return!1}}()?i:function(t,r,e){var n,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===B.call(t))throw new TypeError(L("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof e||null===e||"[object Array]"===B.call(e))throw new TypeError(L("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(C.call(t,r)||N.call(t,r)?(n=t.__proto__,t.__proto__=R,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&&M&&M.call(t,r,e.get),a&&P&&P.call(t,r,e.set),t};var U=I;function Y(t,r,e){U(t,r,{configurable:!1,enumerable:!1,writable:!1,value:e})}function W(t){return"number"==typeof t}var $="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function G(){return $&&"symbol"==typeof Symbol.toStringTag}var Z=Object.prototype.toString,X=Object.prototype.hasOwnProperty;function D(t,r){return null!=t&&X.call(t,r)}var z="function"==typeof Symbol?Symbol:void 0,J="function"==typeof z?z.toStringTag:"",q=G()?function(t){var r,e,n;if(null==t)return Z.call(t);e=t[J],r=D(t,J);try{t[J]=void 0}catch(r){return Z.call(t)}return n=Z.call(t),r?t[J]=e:delete t[J],n}:function(t){return Z.call(t)},H=Number,K=H.prototype.toString,Q=G();function tt(t){return"object"==typeof t&&(t instanceof H||(Q?function(t){try{return K.call(t),!0}catch(t){return!1}}(t):"[object Number]"===q(t)))}function rt(t){return W(t)||tt(t)}Y(rt,"isPrimitive",W),Y(rt,"isObject",tt);var et=Number.POSITIVE_INFINITY,nt=H.NEGATIVE_INFINITY,it=Math.floor;function ot(t){return it(t)===t}function at(t){return t<et&&t>nt&&ot(t)}function ut(t){return W(t)&&at(t)}function ft(t){return tt(t)&&at(t.valueOf())}function lt(t){return ut(t)||ft(t)}function st(t){return ut(t)&&t>0}function ht(t){return ft(t)&&t.valueOf()>0}function ct(t){return st(t)||ht(t)}Y(lt,"isPrimitive",ut),Y(lt,"isObject",ft),Y(ct,"isPrimitive",st),Y(ct,"isObject",ht);var pt=/./;function gt(t){return"boolean"==typeof t}var yt=Boolean,mt=Boolean.prototype.toString,wt=G();function bt(t){return"object"==typeof t&&(t instanceof yt||(wt?function(t){try{return mt.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===q(t)))}function vt(t){return gt(t)||bt(t)}Y(vt,"isPrimitive",gt),Y(vt,"isObject",bt);var dt="object"==typeof self?self:null,Et="object"==typeof window?window:null,_t="object"==typeof globalThis?globalThis:null,Tt=function(t){if(arguments.length){if(!gt(t))throw new TypeError(L("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(_t)return _t;if(dt)return dt;if(Et)return Et;throw new Error("unexpected error. Unable to resolve global object.")}(),xt=Tt.document&&Tt.document.childNodes,Vt=Int8Array;function At(){return/^\s*function\s*([^(]*)/i}var jt=/^\s*function\s*([^(]*)/i;Y(At,"REGEXP",jt);var St=Array.isArray?Array.isArray:function(t){return"[object Array]"===q(t)};function Ft(t){if("function"!=typeof t)throw new TypeError(L("invalid argument. Must provide a function. Value: `%s`.",t));return function(r){var e,n;if(!St(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 Ot(t){return null!==t&&"object"==typeof t}function kt(t){return Ot(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function Lt(t){var r,e,n;if(("Object"===(e=q(t).slice(8,-1))||"Error"===e)&&t.constructor){if("string"==typeof(n=t.constructor).name)return n.name;if(r=jt.exec(n.toString()))return r[1]}return kt(t)?"Buffer":e}Y(Ot,"isObjectLikeArray",Ft(Ot));var It="function"==typeof pt||"object"==typeof Vt||"function"==typeof xt?function(t){return Lt(t).toLowerCase()}:function(t){var r;return null===t?"null":"object"==(r=typeof t)?Lt(t).toLowerCase():r};function Rt(t){return"function"===It(t)}function Bt(t){return Rt(t)&&st(t.alignment)&&st(t.byteLength)&&Rt(t.byteLengthOf)&&Rt(t.byteOffsetOf)&&Rt(t.bufferOf)&&Rt(t.isStruct)&&Rt(t.viewOf)&&D(t,"fields")&&D(t,"layout")}function Mt(t){return"object"==typeof t&&null!==t&&!St(t)}var Pt,Ct=Object,Nt=Object.getPrototypeOf;Pt=Rt(Object.getPrototypeOf)?Nt:function(t){var r=function(t){return t.__proto__}(t);return r||null===r?r:"[object Function]"===q(t.constructor)?t.constructor.prototype:t instanceof Ct?Ct.prototype:null};var Ut=Pt,Yt=Object.prototype;function Wt(t){var r;return!!Mt(t)&&(r=function(t){return null==t?null:(t=Ct(t),Ut(t))}(t),!r||!D(t,"constructor")&&D(r,"constructor")&&Rt(r.constructor)&&"[object Function]"===q(r.constructor)&&D(r,"isPrototypeOf")&&Rt(r.isPrototypeOf)&&(r===Yt||function(t){var r;for(r in t)if(!D(t,r))return!1;return!0}(t)))}function $t(t){return"string"==typeof t}var Gt=String.prototype.valueOf,Zt=G();function Xt(t){return"object"==typeof t&&(t instanceof String||(Zt?function(t){try{return Gt.call(t),!0}catch(t){return!1}}(t):"[object String]"===q(t)))}function Dt(t){return $t(t)||Xt(t)}Y(Dt,"isPrimitive",$t),Y(Dt,"isObject",Xt);var zt="function";function Jt(t){return typeof t.get===zt&&typeof t.set===zt}var qt={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 Ht(t){var r=qt[t];return"function"==typeof r?r:qt.default}var Kt={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 Qt(t){var r=Kt[t];return"function"==typeof r?r:Kt.default}var tr,rr={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"},er="function"==typeof Float64Array,nr="function"==typeof Float64Array?Float64Array:null,ir="function"==typeof Float64Array?Float64Array:void 0;tr=function(){var t,r,e;if("function"!=typeof nr)return!1;try{r=new nr([1,3.14,-3.14,NaN]),e=r,t=(er&&e instanceof Float64Array||"[object Float64Array]"===q(e))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}()?ir:function(){throw new Error("not implemented")};var or,ar=tr,ur="function"==typeof Float32Array,fr="function"==typeof Float32Array?Float32Array:null,lr="function"==typeof Float32Array?Float32Array:void 0;or=function(){var t,r,e;if("function"!=typeof fr)return!1;try{r=new fr([1,3.14,-3.14,5e40]),e=r,t=(ur&&e instanceof Float32Array||"[object Float32Array]"===q(e))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===et}catch(r){t=!1}return t}()?lr:function(){throw new Error("not implemented")};var sr,hr=or,cr="function"==typeof Uint32Array,pr=4294967295,gr="function"==typeof Uint32Array?Uint32Array:null,yr="function"==typeof Uint32Array?Uint32Array:void 0;sr=function(){var t,r,e;if("function"!=typeof gr)return!1;try{r=new gr(r=[1,3.14,-3.14,4294967296,4294967297]),e=r,t=(cr&&e instanceof Uint32Array||"[object Uint32Array]"===q(e))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?yr:function(){throw new Error("not implemented")};var mr,wr=sr,br="function"==typeof Int32Array,vr="function"==typeof Int32Array?Int32Array:null,dr="function"==typeof Int32Array?Int32Array:void 0;mr=function(){var t,r,e;if("function"!=typeof vr)return!1;try{r=new vr([1,3.14,-3.14,2147483648]),e=r,t=(br&&e instanceof Int32Array||"[object Int32Array]"===q(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){t=!1}return t}()?dr:function(){throw new Error("not implemented")};var Er,_r=mr,Tr="function"==typeof Uint16Array,xr="function"==typeof Uint16Array?Uint16Array:null,Vr="function"==typeof Uint16Array?Uint16Array:void 0;Er=function(){var t,r,e;if("function"!=typeof xr)return!1;try{r=new xr(r=[1,3.14,-3.14,65536,65537]),e=r,t=(Tr&&e instanceof Uint16Array||"[object Uint16Array]"===q(e))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?Vr:function(){throw new Error("not implemented")};var Ar,jr=Er,Sr="function"==typeof Int16Array,Fr="function"==typeof Int16Array?Int16Array:null,Or="function"==typeof Int16Array?Int16Array:void 0;Ar=function(){var t,r,e;if("function"!=typeof Fr)return!1;try{r=new Fr([1,3.14,-3.14,32768]),e=r,t=(Sr&&e instanceof Int16Array||"[object Int16Array]"===q(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){t=!1}return t}()?Or:function(){throw new Error("not implemented")};var kr,Lr=Ar,Ir="function"==typeof Uint8Array,Rr="function"==typeof Uint8Array?Uint8Array:null,Br="function"==typeof Uint8Array?Uint8Array:void 0;kr=function(){var t,r,e;if("function"!=typeof Rr)return!1;try{r=new Rr(r=[1,3.14,-3.14,256,257]),e=r,t=(Ir&&e instanceof Uint8Array||"[object Uint8Array]"===q(e))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?Br:function(){throw new Error("not implemented")};var Mr,Pr=kr,Cr="function"==typeof Uint8ClampedArray,Nr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null,Ur="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Mr=function(){var t,r,e;if("function"!=typeof Nr)return!1;try{r=new Nr([-1,0,1,3.14,4.99,255,256]),e=r,t=(Cr&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===q(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}()?Ur:function(){throw new Error("not implemented")};var Yr,Wr=Mr,$r="function"==typeof Int8Array,Gr="function"==typeof Int8Array?Int8Array:null,Zr="function"==typeof Int8Array?Int8Array:void 0;Yr=function(){var t,r,e;if("function"!=typeof Gr)return!1;try{r=new Gr([1,3.14,-3.14,128]),e=r,t=($r&&e instanceof Int8Array||"[object Int8Array]"===q(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){t=!1}return t}()?Zr:function(){throw new Error("not implemented")};var Xr=Yr;function Dr(t){return ut(t)&&t>=0}function zr(t){return ft(t)&&t.valueOf()>=0}function Jr(t){return Dr(t)||zr(t)}Y(Jr,"isPrimitive",Dr),Y(Jr,"isObject",zr);var qr=4294967295;function Hr(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&ot(t.length)&&t.length>=0&&t.length<=qr}var Kr=9007199254740991;function Qr(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&ot(t.length)&&t.length>=0&&t.length<=Kr}var te="function"==typeof ArrayBuffer;function re(t){return te&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===q(t)}var ee=Ft(Dt.isPrimitive),ne=Ft(Dt.isObject),ie=Ft(Dt);function oe(t,r,e){U(t,r,{configurable:!1,enumerable:!0,writable:!1,value:e})}function ae(t,r){if(!(this instanceof ae))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!W(t))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",t));if(!W(r))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return oe(this,"re",t),oe(this,"im",r),this}Y(ie,"primitives",ee),Y(ie,"objects",ne),Y(ae,"name","Complex128"),Y(ae,"BYTES_PER_ELEMENT",8),Y(ae.prototype,"BYTES_PER_ELEMENT",8),Y(ae.prototype,"byteLength",16),Y(ae.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),Y(ae.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var ue="function"==typeof Math.fround?Math.fround:null,fe=new hr(1),le="function"==typeof ue?ue:function(t){return fe[0]=t,fe[0]};function se(t,r){if(!(this instanceof se))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!W(t))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",t));if(!W(r))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return oe(this,"re",le(t)),oe(this,"im",le(r)),this}function he(t){return t instanceof ae||t instanceof se||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function ce(t){return ot(t/2)}Y(se,"name","Complex64"),Y(se,"BYTES_PER_ELEMENT",4),Y(se.prototype,"BYTES_PER_ELEMENT",4),Y(se.prototype,"byteLength",8),Y(se.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),Y(se.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var pe=8;function ge(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===pe}var ye=16;function me(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===ye}function we(){return"function"==typeof z&&"symbol"==typeof z("foo")&&D(z,"iterator")&&"symbol"==typeof z.iterator}var be=we()?Symbol.iterator:null;function ve(t,r,e){U(t,r,{configurable:!1,enumerable:!1,get:e})}function de(t){return t.re}function Ee(t){return t.im}function _e(t,r){return new hr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function Te(t,r){return new ar(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function xe(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Hr(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!he(n))return new TypeError(L("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(de(n),Ee(n))}return r}var Ve=2*hr.BYTES_PER_ELEMENT,Ae=we();function je(t){return t instanceof Oe||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Se(t){return t===Oe||"Complex128Array"===t.name}function Fe(t,r){return new se(t[r*=2],t[r+1])}function Oe(){var t,r,e,n;if(r=arguments.length,!(this instanceof Oe))return 0===r?new Oe:1===r?new Oe(arguments[0]):2===r?new Oe(arguments[0],arguments[1]):new Oe(arguments[0],arguments[1],arguments[2]);if(0===r)e=new hr(0);else if(1===r)if(Dr(arguments[0]))e=new hr(2*arguments[0]);else if(Qr(arguments[0]))if((n=(e=arguments[0]).length)&&St(e)&&he(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!he(n=r[i]))return null;t[o]=de(n),t[o+1]=Ee(n),o+=2}return t}(new hr(2*n),e),null===e){if(!ce(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new hr(arguments[0])}}else{if(ge(e))e=_e(e,0);else if(me(e))e=Te(e,0);else if(!ce(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new hr(e)}else if(re(arguments[0])){if(!ot((e=arguments[0]).byteLength/Ve))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Ve,e.byteLength));e=new hr(e)}else{if(!Mt(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Ae)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!Rt(e[be]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!Rt((e=e[be]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=xe(e))instanceof Error)throw e;e=new hr(e)}else{if(!re(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Dr(t=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!ot(t/Ve))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Ve,t));if(2===r){if(!ot((n=e.byteLength-t)/Ve))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Ve,n));e=new hr(e,t)}else{if(!Dr(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ve>e.byteLength-t)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ve));e=new hr(e,t,2*n)}}return Y(this,"_buffer",e),Y(this,"_length",e.length/2),this}function ke(t){return t.re}function Le(t){return t.im}function Ie(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Hr(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!he(n))return new TypeError(L("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(ke(n),Le(n))}return r}Y(Oe,"BYTES_PER_ELEMENT",Ve),Y(Oe,"name","Complex64Array"),Y(Oe,"from",(function(t){var r,e,n,i,o,a,u,f,l,s,h,c;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Se(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Rt(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(je(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(he(s=n.call(r,t.get(h),h)))o[c]=de(s),o[c+1]=Ee(s);else{if(!(Hr(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(t)}if(Qr(t)){if(n){for(f=t.length,u=t.get&&t.set?Ht("default"):Qt("default"),h=0;h<f;h++)if(!he(u(t,h))){l=!0;break}if(l){if(!ce(f))throw new RangeError(L("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(he(s=n.call(r,u(t,h),h)))o[c]=de(s),o[c+1]=Ee(s);else{if(!(Hr(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(t)}if(Mt(t)&&Ae&&Rt(t[be])){if(!Rt((o=t[be]()).next))throw new TypeError(L("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,Hr(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(de(o),Ee(o))}return n}(o,n,r):xe(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(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),Y(Oe,"of",(function(){var t,r;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Se(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)})),Y(Oe.prototype,"at",(function(t){if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(t))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Fe(this._buffer,t)})),ve(Oe.prototype,"buffer",(function(){return this._buffer.buffer})),ve(Oe.prototype,"byteLength",(function(){return this._buffer.byteLength})),ve(Oe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),Y(Oe.prototype,"BYTES_PER_ELEMENT",Oe.BYTES_PER_ELEMENT),Y(Oe.prototype,"copyWithin",(function(t,r){if(!je(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})),Y(Oe.prototype,"entries",(function(){var t,r,e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._buffer,e=this._length,o=-1,Y(r={},"next",(function(){return o+=1,i||o>=e?{done:!0}:{value:[o,Fe(n,o)],done:!1}})),Y(r,"return",(function(t){return i=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(r,be,(function(){return t.entries()})),r})),Y(Oe.prototype,"every",(function(t,r){var e,n;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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,Fe(e,n),n,this))return!1;return!0})),Y(Oe.prototype,"fill",(function(t,r,e){var n,i,o,a,u,f;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!ot(e))throw new TypeError(L("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=de(t),u=Ee(t),f=r;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),Y(Oe.prototype,"filter",(function(t,r){var e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Fe(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),Y(Oe.prototype,"find",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=Fe(e,n),t.call(r,i,n,this))return i})),Y(Oe.prototype,"findIndex",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=Fe(e,n),t.call(r,i,n,this))return n;return-1})),Y(Oe.prototype,"findLast",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Fe(e,n),t.call(r,i,n,this))return i})),Y(Oe.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Fe(e,n),t.call(r,i,n,this))return n;return-1})),Y(Oe.prototype,"forEach",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=Fe(e,n),t.call(r,i,n,this)})),Y(Oe.prototype,"get",(function(t){if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Dr(t))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Fe(this._buffer,t)})),Y(Oe.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=de(t),o=Ee(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),Y(Oe.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=de(t),o=Ee(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Y(Oe.prototype,"join",(function(t){var r,e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!$t(t))throw new TypeError(L("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(Fe(e,i).toString());return r.join(n)})),Y(Oe.prototype,"keys",(function(){var t,r,e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._length,i=-1,Y(r={},"next",(function(){return i+=1,n||i>=e?{done:!0}:{value:i,done:!1}})),Y(r,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(r,be,(function(){return t.keys()})),r})),Y(Oe.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("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=de(t),o=Ee(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),ve(Oe.prototype,"length",(function(){return this._length})),Y(Oe.prototype,"map",(function(t,r){var e,n,i,o,a;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(he(a=t.call(r,Fe(n,o),o,this)))e[2*o]=de(a),e[2*o+1]=Ee(a);else{if(!Hr(a)||2!==a.length)throw new TypeError(L("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})),Y(Oe.prototype,"reduce",(function(t,r){var e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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=Fe(e,0),o=1}for(;o<i;o++)n=t(n,Fe(e,o),o,this);return n})),Y(Oe.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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=Fe(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,Fe(e,o),o,this);return n})),Y(Oe.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=it(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})),Y(Oe.prototype,"set",(function(t){var r,e,n,i,o,a,u,f,l;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Dr(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(t)){if(e>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=de(t),void(n[e+1]=Ee(t))}if(je(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,l=n.byteOffset+e*Ve,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new hr(r.length),f=0;f<r.length;f++)i[f]=r[f];r=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=r[l],n[e+1]=r[l+1],e+=2,l+=2}else{if(!Qr(t))throw new TypeError(L("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(!he(t[f])){o=!0;break}if(o){if(!ce(a))throw new RangeError(L("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,l=n.byteOffset+e*Ve,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new hr(a),f=0;f<a;f++)i[f]=r[f];r=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=r[l],n[e+1]=r[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=t[f],n[e]=de(u),n[e+1]=Ee(u),e+=2}})),Y(Oe.prototype,"slice",(function(t,r){var e,n,i,o,a,u,f;if(!je(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(!ot(t))throw new TypeError(L("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(!ot(r))throw new TypeError(L("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})),Y(Oe.prototype,"some",(function(t,r){var e,n;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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,Fe(e,n),n,this))return!0;return!1})),Y(Oe.prototype,"sort",(function(t){var r,e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(Fe(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=de(r[i]),e[o+1]=Ee(r[i]);return this})),Y(Oe.prototype,"subarray",(function(t,r){var e,n,i;if(!je(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(!ot(t))throw new TypeError(L("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(!ot(r))throw new TypeError(L("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*Ve):(i=r-t,e=n.byteOffset+t*Ve),new this.constructor(n.buffer,e,i<0?0:i)})),Y(Oe.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!$t(t)&&!ee(t))throw new TypeError(L("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(!Mt(r))throw new TypeError(L("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(Fe(o,a).toLocaleString(n,e));return i.join(",")})),Y(Oe.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!je(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})),Y(Oe.prototype,"toSorted",(function(t){var r,e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(Fe(e,i));return r.sort(t),new Oe(r)})),Y(Oe.prototype,"toString",(function(){var t,r,e;if(!je(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(Fe(r,e).toString());return t.join(",")})),Y(Oe.prototype,"values",(function(){var t,r,e,n,i,o;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,e=this._length,o=-1,Y(t={},"next",(function(){return o+=1,n||o>=e?{done:!0}:{value:Fe(i,o),done:!1}})),Y(t,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(t,be,(function(){return r.values()})),t})),Y(Oe.prototype,"with",(function(t,r){var e,n,i;if(!je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(t))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!he(r))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=de(r),e[2*t+1]=Ee(r),n}));var Re=2*ar.BYTES_PER_ELEMENT,Be=we();function Me(t){return t instanceof Ne||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Pe(t){return t===Ne||"Complex64Array"===t.name}function Ce(t,r){return new ae(t[r*=2],t[r+1])}function Ne(){var t,r,e,n;if(r=arguments.length,!(this instanceof Ne))return 0===r?new Ne:1===r?new Ne(arguments[0]):2===r?new Ne(arguments[0],arguments[1]):new Ne(arguments[0],arguments[1],arguments[2]);if(0===r)e=new ar(0);else if(1===r)if(Dr(arguments[0]))e=new ar(2*arguments[0]);else if(Qr(arguments[0]))if((n=(e=arguments[0]).length)&&St(e)&&he(e[0])){if(e=function(t,r){var e,n,i,o;for(e=r.length,o=0,i=0;i<e;i++){if(!he(n=r[i]))return null;t[o]=ke(n),t[o+1]=Le(n),o+=2}return t}(new ar(2*n),e),null===e){if(!ce(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new ar(arguments[0])}}else{if(ge(e))e=_e(e,0);else if(me(e))e=Te(e,0);else if(!ce(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new ar(e)}else if(re(arguments[0])){if(!ot((e=arguments[0]).byteLength/Re))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Re,e.byteLength));e=new ar(e)}else{if(!Mt(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Be)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!Rt(e[be]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!Rt((e=e[be]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Ie(e))instanceof Error)throw e;e=new ar(e)}else{if(!re(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Dr(t=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!ot(t/Re))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Re,t));if(2===r){if(!ot((n=e.byteLength-t)/Re))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Re,n));e=new ar(e,t)}else{if(!Dr(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Re>e.byteLength-t)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Re));e=new ar(e,t,2*n)}}return Y(this,"_buffer",e),Y(this,"_length",e.length/2),this}function Ue(t){var r,e;for(r=[];!(e=t.next()).done;)r.push(yt(e.value));return r}Y(Ne,"BYTES_PER_ELEMENT",Re),Y(Ne,"name","Complex128Array"),Y(Ne,"from",(function(t){var r,e,n,i,o,a,u,f,l,s,h,c;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Rt(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(Me(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(he(s=n.call(r,t.get(h),h)))o[c]=ke(s),o[c+1]=Le(s);else{if(!(Hr(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(t)}if(Qr(t)){if(n){for(f=t.length,u=t.get&&t.set?Ht("default"):Qt("default"),h=0;h<f;h++)if(!he(u(t,h))){l=!0;break}if(l){if(!ce(f))throw new RangeError(L("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(he(s=n.call(r,u(t,h),h)))o[c]=ke(s),o[c+1]=Le(s);else{if(!(Hr(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(t)}if(Mt(t)&&Be&&Rt(t[be])){if(!Rt((o=t[be]()).next))throw new TypeError(L("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,Hr(o=r.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(ke(o),Le(o))}return n}(o,n,r):Ie(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(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),Y(Ne,"of",(function(){var t,r;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Pe(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)})),Y(Ne.prototype,"at",(function(t){if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(t))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Ce(this._buffer,t)})),ve(Ne.prototype,"buffer",(function(){return this._buffer.buffer})),ve(Ne.prototype,"byteLength",(function(){return this._buffer.byteLength})),ve(Ne.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),Y(Ne.prototype,"BYTES_PER_ELEMENT",Ne.BYTES_PER_ELEMENT),Y(Ne.prototype,"copyWithin",(function(t,r){if(!Me(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})),Y(Ne.prototype,"entries",(function(){var t,r,e,n,i,o,a;if(!Me(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,Y(e={},"next",(function(){var r;return o+=1,i||o>=n?{done:!0}:(r=new ae(t[a+=2],t[a+1]),{value:[o,r],done:!1})})),Y(e,"return",(function(t){return i=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(e,be,(function(){return r.entries()})),e})),Y(Ne.prototype,"every",(function(t,r){var e,n;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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,Ce(e,n),n,this))return!1;return!0})),Y(Ne.prototype,"fill",(function(t,r,e){var n,i,o,a,u,f;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!ot(e))throw new TypeError(L("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=ke(t),u=Le(t),f=r;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),Y(Ne.prototype,"filter",(function(t,r){var e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Ce(e,i),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),Y(Ne.prototype,"find",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ce(e,n),t.call(r,i,n,this))return i})),Y(Ne.prototype,"findIndex",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ce(e,n),t.call(r,i,n,this))return n;return-1})),Y(Ne.prototype,"findLast",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ce(e,n),t.call(r,i,n,this))return i})),Y(Ne.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ce(e,n),t.call(r,i,n,this))return n;return-1})),Y(Ne.prototype,"forEach",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)i=Ce(e,n),t.call(r,i,n,this)})),Y(Ne.prototype,"get",(function(t){if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Dr(t))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Ce(this._buffer,t)})),ve(Ne.prototype,"length",(function(){return this._length})),Y(Ne.prototype,"includes",(function(t,r){var e,n,i,o,a;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=ke(t),o=Le(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),Y(Ne.prototype,"indexOf",(function(t,r){var e,n,i,o,a;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=ke(t),o=Le(t),e=this._buffer,a=r;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Y(Ne.prototype,"join",(function(t){var r,e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Dt(t))throw new TypeError(L("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(Ce(e,i).toString());return r.join(n)})),Y(Ne.prototype,"keys",(function(){var t,r,e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._length,i=-1,Y(r={},"next",(function(){return i+=1,n||i>=e?{done:!0}:{value:i,done:!1}})),Y(r,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(r,be,(function(){return t.keys()})),r})),Y(Ne.prototype,"lastIndexOf",(function(t,r){var e,n,i,o,a;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(t))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!ot(r))throw new TypeError(L("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=ke(t),o=Le(t),e=this._buffer,a=r;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),Y(Ne.prototype,"map",(function(t,r){var e,n,i,o,a;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(he(a=t.call(r,Ce(n,o),o,this)))e[2*o]=ke(a),e[2*o+1]=Le(a);else{if(!Hr(a)||2!==a.length)throw new TypeError(L("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})),Y(Ne.prototype,"reduce",(function(t,r){var e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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=Ce(e,0),o=1}for(;o<i;o++)n=t(n,Ce(e,o),o,this);return n})),Y(Ne.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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=Ce(e,i-1),o=i-2}for(;o>=0;o--)n=t(n,Ce(e,o),o,this);return n})),Y(Ne.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=this._buffer,n=it(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})),Y(Ne.prototype,"set",(function(t){var r,e,n,i,o,a,u,f,l;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Dr(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(t)){if(e>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ke(t),void(n[e+1]=Le(t))}if(Me(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,l=n.byteOffset+e*Re,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new ar(r.length),f=0;f<r.length;f++)i[f]=r[f];r=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=r[l],n[e+1]=r[l+1],e+=2,l+=2}else{if(!Qr(t))throw new TypeError(L("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(!he(t[f])){o=!0;break}if(o){if(!ce(a))throw new RangeError(L("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,l=n.byteOffset+e*Re,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new ar(a),f=0;f<a;f++)i[f]=r[f];r=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=r[l],n[e+1]=r[l+1],e+=2,l+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=t[f],n[e]=ke(u),n[e+1]=Le(u),e+=2}})),Y(Ne.prototype,"slice",(function(t,r){var e,n,i,o,a,u,f;if(!Me(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(!ot(t))throw new TypeError(L("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(!ot(r))throw new TypeError(L("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})),Y(Ne.prototype,"some",(function(t,r){var e,n;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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,Ce(e,n),n,this))return!0;return!1})),Y(Ne.prototype,"sort",(function(t){var r,e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(Ce(e,i));for(r.sort(t),i=0;i<n;i++)e[o=2*i]=ke(r[i]),e[o+1]=Le(r[i]);return this})),Y(Ne.prototype,"subarray",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,r=i;else{if(!ot(t))throw new TypeError(L("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(!ot(r))throw new TypeError(L("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*Re):(i=r-t,e=n.byteOffset+t*Re),new this.constructor(n.buffer,e,i<0?0:i)})),Y(Ne.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Dt(t)&&!ee(t))throw new TypeError(L("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(!Mt(r))throw new TypeError(L("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(Ce(o,a).toLocaleString(n,e));return i.join(",")})),Y(Ne.prototype,"toReversed",(function(){var t,r,e,n,i,o;if(!Me(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})),Y(Ne.prototype,"toSorted",(function(t){var r,e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rt(t))throw new TypeError(L("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(Ce(e,i));return r.sort(t),new Ne(r)})),Y(Ne.prototype,"toString",(function(){var t,r,e;if(!Me(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(Ce(r,e).toString());return t.join(",")})),Y(Ne.prototype,"values",(function(){var t,r,e,n,i,o;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,e=this._length,o=-1,Y(t={},"next",(function(){return o+=1,n||o>=e?{done:!0}:{value:Ce(i,o),done:!1}})),Y(t,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(t,be,(function(){return r.values()})),t})),Y(Ne.prototype,"with",(function(t,r){var e,n,i;if(!Me(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(t))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!he(r))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=ke(r),e[2*t+1]=Le(r),n}));var Ye=Pr.BYTES_PER_ELEMENT,We=we();function $e(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Ye}function Ge(t){return t===Ze}function Ze(){var t,r,e,n,i;if(r=arguments.length,!(this instanceof Ze))return 0===r?new Ze:1===r?new Ze(arguments[0]):2===r?new Ze(arguments[0],arguments[1]):new Ze(arguments[0],arguments[1],arguments[2]);if(0===r)e=new Pr(0);else if(1===r)if(Dr(i=arguments[0]))e=new Pr(i);else if(Qr(i))e=function(t,r){var e,n;for(e=r.length,n=0;n<e;n++)t[n]=yt(r[n]);return t}(new Pr(i.length),i);else if(re(i))e=new Pr(i);else{if(!Mt(i))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===We)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!Rt(i[be]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!Rt((e=i[be]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new Pr(Ue(e))}else{if(!re(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!Dr(t=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===r)e=new Pr(e,t);else{if(!Dr(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ye>e.byteLength-t)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ye));e=new Pr(e,t,n)}}return Y(this,"_buffer",e),Y(this,"_length",e.length),this}Y(Ze,"BYTES_PER_ELEMENT",Ye),Y(Ze,"name","BooleanArray"),Y(Ze,"from",(function(t){var r,e,n,i,o,a,u,f,l;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!Rt(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(Qr(t)){if(n){for(f=t.length,u=t.get&&t.set?Ht("default"):Qt("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=yt(n.call(r,u(t,l),l));return i}return new this(t)}if(Mt(t)&&We&&Rt(t[be])){if(!Rt((o=t[be]()).next))throw new TypeError(L("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(yt(r.call(e,i.value,o)));return n}(o,n,r):Ue(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),Y(Ze,"of",(function(){var t,r;if(!Rt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ge(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)})),Y(Ze.prototype,"at",(function(t){var r,e;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ut(t))throw new TypeError(L("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 yt(r[t])})),ve(Ze.prototype,"buffer",(function(){return this._buffer.buffer})),ve(Ze.prototype,"byteLength",(function(){return this._buffer.byteLength})),ve(Ze.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),Y(Ze.prototype,"BYTES_PER_ELEMENT",Ze.BYTES_PER_ELEMENT),Y(Ze.prototype,"copyWithin",(function(t,r){if(!$e(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})),Y(Ze.prototype,"entries",(function(){var t,r,e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,n=this._buffer,e=this._length,o=-1,Y(r={},"next",(function(){return o+=1,i||o>=e?{done:!0}:{value:[o,yt(n[o])],done:!1}})),Y(r,"return",(function(t){return i=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(r,be,(function(){return t.entries()})),r})),Y(Ze.prototype,"every",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("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,yt(e[n]),n,this))return!1;return!0})),Y(Ze.prototype,"fill",(function(t,r,e){var n,i,o,a;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gt(t))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!ut(r))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!ut(e))throw new TypeError(L("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})),Y(Ze.prototype,"filter",(function(t,r){var e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=yt(e[i]),t.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),Y(Ze.prototype,"find",(function(t,r){var e,n,i;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=yt(e[i]),t.call(r,n,i,this))return n})),Y(Ze.prototype,"findIndex",(function(t,r){var e,n,i;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=0;i<this._length;i++)if(n=yt(e[i]),t.call(r,n,i,this))return i;return-1})),Y(Ze.prototype,"findLast",(function(t,r){var e,n,i;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=yt(e[i]),t.call(r,n,i,this))return n})),Y(Ze.prototype,"findLastIndex",(function(t,r){var e,n,i;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=yt(e[i]),t.call(r,n,i,this))return i;return-1})),Y(Ze.prototype,"forEach",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n<this._length;n++)t.call(r,yt(e[n]),n,this)})),Y(Ze.prototype,"get",(function(t){if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Dr(t))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return yt(this._buffer[t])})),Y(Ze.prototype,"includes",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gt(t))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!ut(r))throw new TypeError(L("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===yt(e[n]))return!0;return!1})),Y(Ze.prototype,"indexOf",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gt(t))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!ut(r))throw new TypeError(L("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===yt(e[n]))return n;return-1})),Y(Ze.prototype,"join",(function(t){var r,e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!$t(t))throw new TypeError(L("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)})),Y(Ze.prototype,"keys",(function(){var t,r,e,n,i;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,e=this._length,i=-1,Y(r={},"next",(function(){return i+=1,n||i>=e?{done:!0}:{value:i,done:!1}})),Y(r,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(r,be,(function(){return t.keys()})),r})),Y(Ze.prototype,"lastIndexOf",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!gt(t))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!ut(r))throw new TypeError(L("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===yt(e[n]))return n;return-1})),ve(Ze.prototype,"length",(function(){return this._length})),Y(Ze.prototype,"map",(function(t,r){var e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(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]=yt(t.call(r,yt(i[o]),o,this));return n})),Y(Ze.prototype,"reduce",(function(t,r){var e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("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=yt(e[0]),o=1}for(;o<n;o++)i=t(i,yt(e[o]),o,this);return i})),Y(Ze.prototype,"reduceRight",(function(t,r){var e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("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=yt(e[n-1]),o=n-2}for(;o>=0;o--)i=t(i,yt(e[o]),o,this);return i})),Y(Ze.prototype,"reverse",(function(){var t,r,e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,e=this._length,n=it(e/2),i=0;i<n;i++)o=e-i-1,r=t[i],t[i]=t[o],t[o]=r;return this})),Y(Ze.prototype,"set",(function(t){var r,e,n,i,o,a,u;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!Dr(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Qr(t)){if(e+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=$e(t)?t._buffer:t,u=n.byteOffset+e*Ye,r.buffer===n.buffer&&r.byteOffset<u&&r.byteOffset+r.byteLength>u){for(i=new Pr(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(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=t?1:0}})),Y(Ze.prototype,"slice",(function(t,r){var e,n,i,o,a,u;if(!$e(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(!ut(t))throw new TypeError(L("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(!ut(r))throw new TypeError(L("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})),Y(Ze.prototype,"some",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Rt(t))throw new TypeError(L("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,yt(e[n]),n,this))return!0;return!1})),Y(Ze.prototype,"sort",(function(t){var r;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,0===arguments.length)return r.sort(),this;if(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(yt(r),yt(e))})),this})),Y(Ze.prototype,"subarray",(function(t,r){var e,n,i;if(!$e(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(!ut(t))throw new TypeError(L("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(!ut(r))throw new TypeError(L("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*Ye):(i=r-t,e=n.byteOffset+t*Ye),new this.constructor(n.buffer,e,i<0?0:i)})),Y(Ze.prototype,"toLocaleString",(function(t,r){var e,n,i,o,a;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!$t(t)&&!ee(t))throw new TypeError(L("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(!Mt(r))throw new TypeError(L("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(yt(o[a]).toLocaleString(n,e));return i.join(",")})),Y(Ze.prototype,"toReversed",(function(){var t,r,e,n,i;if(!$e(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})),Y(Ze.prototype,"toSorted",(function(t){var r,e,n,i,o;if(!$e(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(!Rt(t))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",t));return r.sort((function(r,e){return t(yt(r),yt(e))})),e})),Y(Ze.prototype,"toString",(function(){var t,r,e;if(!$e(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(",")})),Y(Ze.prototype,"values",(function(){var t,r,e,n,i,o;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,i=this._buffer,e=this._length,o=-1,Y(t={},"next",(function(){return o+=1,n||o>=e?{done:!0}:{value:yt(i[o]),done:!1}})),Y(t,"return",(function(t){return n=!0,arguments.length?{value:t,done:!0}:{done:!0}})),be&&Y(t,be,(function(){return r.values()})),t})),Y(Ze.prototype,"with",(function(t,r){var e,n;if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ut(t))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!gt(r))throw new TypeError(L("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 Xe=[ar,hr,_r,wr,Lr,jr,Xr,Pr,Wr,Oe,Ne,Ze],De=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],ze=De.length;function Je(t){var r;if(St(t))return"generic";if(kt(t))return null;for(r=0;r<ze;r++)if(t instanceof Xe[r])return De[r];return rr[Lt(t)]||null}function qe(t){var r,e,n;if(!Qr(t))throw new TypeError(L("invalid argument. Must provide an array-like object. Value: `%s`.",t));return n=Je(t),Jt(t)&&(r=Ht(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}}Y((function(t,r){var e,n,i,o;for(i=Je(t),n=Jt(t)?Ht(i):Qt(i),e=t.length,o=0;o<e;o++)if(n(t,o)===r)return!0;return!1}),"factory",qe);var He=qe(e());function Ke(t){return Object.keys(Object(t))}var Qe,tn=void 0!==Object.keys;function rn(t){return"[object Arguments]"===q(t)}Qe=function(){return rn(arguments)}();var en=Qe;function nn(t){return t!=t}function on(t){return W(t)&&nn(t)}function an(t){return tt(t)&&nn(t.valueOf())}function un(t){return on(t)||an(t)}Y(un,"isPrimitive",on),Y(un,"isObject",an);var fn=Object.prototype.propertyIsEnumerable,ln=!fn.call("beep","0");function sn(t,r){var e;return null!=t&&(!(e=fn.call(t,r))&&ln&&Dt(t)?!on(r=+r)&&ut(r)&&r>=0&&r<t.length:e)}var hn=en?rn:function(t){return null!==t&&"object"==typeof t&&!St(t)&&"number"==typeof t.length&&ot(t.length)&&t.length>=0&&t.length<=pr&&D(t,"callee")&&!sn(t,"callee")},cn=Array.prototype.slice,pn=sn((function(){}),"prototype"),gn=!sn({toString:null},"toString");function yn(t,r,e){var n,i;if(!Qr(t)&&!$t(t))throw new TypeError(L("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(!ut(e))throw new TypeError(L("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(un(r)){for(;i<n;i++)if(un(t[i]))return i}else for(;i<n;i++)if(t[i]===r)return i;return-1}function mn(t){return t.constructor&&t.constructor.prototype===t}var wn,bn=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],vn="undefined"==typeof window?void 0:window,dn=function(){var t;if("undefined"===It(vn))return!1;for(t in vn)try{-1===yn(bn,t)&&D(vn,t)&&null!==vn[t]&&"object"===It(vn[t])&&mn(vn[t])}catch(t){return!0}return!1}(),En="undefined"!=typeof window,_n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];wn=tn?function(){return 2!==(Ke(arguments)||"").length}(1,2)?function(t){return hn(t)?Ke(cn.call(t)):Ke(t)}:Ke:function(t){var r,e,n,i,o,a,u;if(i=[],hn(t)){for(u=0;u<t.length;u++)i.push(u.toString());return i}if("string"==typeof t){if(t.length>0&&!D(t,"0"))for(u=0;u<t.length;u++)i.push(u.toString())}else{if(0==(n="function"==typeof t)&&!Ot(t))return i;e=pn&&n}for(o in t)e&&"prototype"===o||!D(t,o)||i.push(String(o));if(gn)for(r=function(t){if(!1===En&&!dn)return mn(t);try{return mn(t)}catch(t){return!1}}(t),u=0;u<_n.length;u++)a=_n[u],r&&"constructor"===a||!D(t,a)||i.push(String(a));return i};var Tn=wn,xn=function(t,r){var e,n,i,o,a,u,f,l=!0;if(!Ot(t))throw new TypeError(L("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!Wt(r))throw new TypeError(L("invalid argument. Options argument must be an object. Value: `%s`.",r));if(D(r,"duplicates")&&!gt(l=r.duplicates))throw new TypeError(L("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",l))}if(n=(e=Tn(t)).length,a={},l)for(f=0;f<n;f++)D(a,o=t[i=e[f]])?(u=a[o],St(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 Vn(t){var r=xn[t];return $t(r)?r:null}var An,jn,Sn,Fn={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 On(t){var r=Fn[t];return W(r)?r:null}function kn(t){var r=typeof t;return"string"===r?null===On(t)?null:t:"number"===r?Vn(t):"object"===r&&t?String(t):Bt(t)?t.layout:null}var Ln={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 In(t){return t instanceof Rn||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&$t(t.char)&&$t(t.description)&&$t(t.byteOrder)&&function(t,r){return null!=t&&("symbol"==typeof r?r in Object(t):String(r)in Object(t))}(t,"value")}function Rn(t,r){var e,n,i;if(e=arguments.length,!(this instanceof Rn))return e<2?new Rn(t):new Rn(t,r);if(He(t))n="builtin";else{if(In(t))return new Rn(t.value,{description:t.description});if(!Bt(t))throw new TypeError(L("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(!Wt(i=r))throw new TypeError(L("invalid argument. Options argument must be an object. Value: `%s`.",i));if(D(i,"description")&&!$t(i.description))throw new TypeError(L("invalid option. `%s` option must be a string. Option: `%s`.","description",i.description))}else i={};return Y(this,"_value",t),Y(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===An&&(An={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"}),An[kn(t)]||null)}(t)||""),Y(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===jn&&(jn={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"}),jn[kn(t)]||null)}(t)||""),Y(this,"_enum",function(t){var r=typeof t;return"number"===r?Vn(t)?t:null:"string"===r?On(t):"object"===r&&t&&ut(t.enum)?t.enum:Bt(t)?On("userdefined_type"):null}(t)||-1),Y(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===Sn&&(Sn={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?st(r=t.alignment)?r:Sn[kn(t)]||null:null)}(t)||-1),Y(this,"_byteLength",function(t){var r;return $t(t)?Ln[t]||null:W(t)?Ln[Vn(t)]||null:t&&st(r=t.byteLength)?r:null}(t)||-1),Y(this,"_byteOrder","host"),Y(this,"_type",n),this}Y(Rn,"name","DataType"),ve(Rn.prototype,"alignment",(function(){return this._alignment})),ve(Rn.prototype,"byteLength",(function(){return this._byteLength})),ve(Rn.prototype,"byteOrder",(function(){return this._byteOrder})),ve(Rn.prototype,"char",(function(){return this._char})),ve(Rn.prototype,"description",(function(){return this._description})),ve(Rn.prototype,"enum",(function(){return this._enum})),ve(Rn.prototype,"value",(function(){return this._value})),Y(Rn.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),Y(Rn.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),Y(Rn.prototype,"valueOf",(function(){return this.toString()}));var Bn,Mn=Rt(Object.assign),Pn=Object.assign,Cn=void 0!==Object.getOwnPropertySymbols,Nn=Ct.getOwnPropertySymbols,Un=Cn?function(t){return Nn(Ct(t))}:function(){return[]};function Yn(t){var r,e,n;for(r=Tn(t),e=Un(t),n=0;n<e.length;n++)sn(t,e[n])&&r.push(e[n]);return r}Bn=Mn?Pn:function(t){var r,e,n,i,o,a,u;if(null==t)throw new TypeError(L("invalid argument. First argument must be a non-null object. Value: `%s`.",t));for(o=Ct(t),a=1;a<arguments.length;a++)if(null!=(r=arguments[a]))for(i=(e=Yn(Ct(r))).length,u=0;u<i;u++)o[n=e[u]]=r[n];return o};var Wn,$n=Bn;function Gn(){return arguments.length?e(arguments[0]):e()}return function(t,r){var e,n,i;for(e=Tn(r),i=0;i<e.length;i++)oe(t,n=e[i],r[n])}(Gn,(void 0===Wn&&(Wn=function(){var t,r,n;for(r=e(),t={},n=0;n<r.length;n++)t[r[n]]=new Rn(r[n]);return t}()),$n({},Wn))),Gn},"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).dtypes=r();
//# sourceMappingURL=browser.js.map