m){for(l=[],y=0;y>18&63]+Lf[i>>12&63]+Lf[i>>6&63]+Lf[63&i]);return o.join("")}function kf(t){var e;Ff||Uf();for(var n=t.length,r=n%3,i="",o=[],a=16383,u=0,f=n-r;uf?f:u+a));return 1===r?(e=t[n-1],i+=Lf[e>>2],i+=Lf[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=Lf[e>>10],i+=Lf[e>>4&63],i+=Lf[e<<2&63],i+="="),o.push(i),o.join("")}function Mf(t,e,n,r,i){var o,a,u=8*i-r-1,f=(1<>1,l=-7,c=n?i-1:0,h=n?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-s;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=s}return(p?-1:1)*a*Math.pow(2,o-r)}function Nf(t,e,n,r,i,o){var a,u,f,s=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,g=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=l?(u=0,a=l):a+c>=1?(u=(e*f-1)*Math.pow(2,i),a+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[n+p]=255&a,p+=g,a/=256,s-=8);t[n+p-g]|=128*d}var Cf={}.toString,Yf=Array.isArray||function(t){return"[object Array]"==Cf.call(t)};Wf.TYPED_ARRAY_SUPPORT=void 0===Rf.TYPED_ARRAY_SUPPORT||Rf.TYPED_ARRAY_SUPPORT;var Df=zf();function zf(){return Wf.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Jf(t,e){if(zf()=zf())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zf().toString(16)+" bytes");return 0|t}function Xf(t){return!(null==t||!t._isBuffer)}function Hf(t,e){if(Xf(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 n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return As(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Os(t).length;default:if(r)return As(t).length;e=(""+e).toLowerCase(),r=!0}}function Qf(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return gs(this,e,n);case"utf8":case"utf-8":return ls(this,e,n);case"ascii":return hs(this,e,n);case"latin1":case"binary":return ps(this,e,n);case"base64":return ss(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ds(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function ts(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function es(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=Wf.from(e,r)),Xf(e))return 0===e.length?-1:ns(t,e,n,r,i);if("number"==typeof e)return e&=255,Wf.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):ns(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function ns(t,e,n,r,i){var o,a=1,u=t.length,f=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,f/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;ou&&(n=u-f),o=n;o>=0;o--){for(var c=!0,h=0;hi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function ss(t,e,n){return 0===e&&n===t.length?kf(t):kf(t.slice(e,n))}function ls(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:s>223?3:s>191?2:1;if(i+c<=n)switch(c){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,c=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=c}return function(t){var e=t.length;if(e<=cs)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},Wf.prototype.compare=function(t,e,n,r,i){if(!Xf(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),f=this.slice(r,i),s=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return rs(this,t,e,n);case"utf8":case"utf-8":return is(this,t,e,n);case"ascii":return os(this,t,e,n);case"latin1":case"binary":return as(this,t,e,n);case"base64":return us(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fs(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Wf.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var cs=4096;function hs(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function ms(t,e,n,r,i,o){if(!Xf(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function vs(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function bs(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function ws(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function _s(t,e,n,r,i){return i||ws(t,0,n,4),Nf(t,e,n,r,23,4),n+4}function Es(t,e,n,r,i){return i||ws(t,0,n,8),Nf(t,e,n,r,52,8),n+8}Wf.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},Wf.prototype.readUInt8=function(t,e){return e||ys(t,1,this.length),this[t]},Wf.prototype.readUInt16LE=function(t,e){return e||ys(t,2,this.length),this[t]|this[t+1]<<8},Wf.prototype.readUInt16BE=function(t,e){return e||ys(t,2,this.length),this[t]<<8|this[t+1]},Wf.prototype.readUInt32LE=function(t,e){return e||ys(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Wf.prototype.readUInt32BE=function(t,e){return e||ys(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Wf.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||ys(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},Wf.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||ys(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},Wf.prototype.readInt8=function(t,e){return e||ys(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Wf.prototype.readInt16LE=function(t,e){e||ys(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},Wf.prototype.readInt16BE=function(t,e){e||ys(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},Wf.prototype.readInt32LE=function(t,e){return e||ys(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Wf.prototype.readInt32BE=function(t,e){return e||ys(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Wf.prototype.readFloatLE=function(t,e){return e||ys(t,4,this.length),Mf(this,t,!0,23,4)},Wf.prototype.readFloatBE=function(t,e){return e||ys(t,4,this.length),Mf(this,t,!1,23,4)},Wf.prototype.readDoubleLE=function(t,e){return e||ys(t,8,this.length),Mf(this,t,!0,52,8)},Wf.prototype.readDoubleBE=function(t,e){return e||ys(t,8,this.length),Mf(this,t,!1,52,8)},Wf.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||ms(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},Wf.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,1,255,0),Wf.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Wf.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,2,65535,0),Wf.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):vs(this,t,e,!0),e+2},Wf.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,2,65535,0),Wf.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):vs(this,t,e,!1),e+2},Wf.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,4,4294967295,0),Wf.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):bs(this,t,e,!0),e+4},Wf.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,4,4294967295,0),Wf.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):bs(this,t,e,!1),e+4},Wf.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);ms(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+n},Wf.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);ms(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},Wf.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,1,127,-128),Wf.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Wf.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,2,32767,-32768),Wf.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):vs(this,t,e,!0),e+2},Wf.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,2,32767,-32768),Wf.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):vs(this,t,e,!1),e+2},Wf.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,4,2147483647,-2147483648),Wf.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):bs(this,t,e,!0),e+4},Wf.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||ms(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Wf.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):bs(this,t,e,!1),e+4},Wf.prototype.writeFloatLE=function(t,e,n){return _s(this,t,e,!0,n)},Wf.prototype.writeFloatBE=function(t,e,n){return _s(this,t,e,!1,n)},Wf.prototype.writeDoubleLE=function(t,e,n){return Es(this,t,e,!0,n)},Wf.prototype.writeDoubleBE=function(t,e,n){return Es(this,t,e,!1,n)},Wf.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!Wf.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Os(t){return function(t){var e,n,r,i,o,a;Ff||Uf();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 Bf(3*u/4-o),r=o>0?u-4:u;var f=0;for(e=0,n=0;e>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=If[t.charCodeAt(e)]<<2|If[t.charCodeAt(e+1)]>>4,a[f++]=255&i):1===o&&(i=If[t.charCodeAt(e)]<<10|If[t.charCodeAt(e+1)]<<4|If[t.charCodeAt(e+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(xs,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Vs(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Ss(t){return null!=t&&(!!t._isBuffer||js(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&js(t.slice(0,0))}(t))}function js(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}jf(Object.freeze({__proto__:null,Buffer:Wf,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),Wf.alloc(+t)},isBuffer:Ss,kMaxLength:Df})).Buffer;var Rs=function(){throw new Error("not implemented")};function Ls(){throw new Error("not implemented")}var Is={binary:Rs,float64:Qe,float32:on,float16:Ls,generic:Array,int16:Rn,int32:mn,int8:Zn,uint16:xn,uint32:ln,uint8:Pn,uint8c:Yn,complex32:Ls,complex64:Ar,complex128:Fr,bool:Cr},Bs={};var Fs=xe(Rs.allocUnsafe)?function(t){if(!st(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return Rs.allocUnsafe(t)}:function(t){if(!st(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new Rs(t)};function Us(t){return function(t,e,n,r){var i;return function(t,e){return"function"==typeof t["fill"]}(t)?t.fill(e,n,r):(n<0&&(n+=t.length)<0&&(n=0),r<0?r+=t.length:r>t.length&&(r=t.length),(i=Wr(t)).accessorProtocol?function(t,e,n,r){var i,o,a;for(i=t.data,o=t.accessors[1],a=n;ae?e:t}function zl(t,e){var n=e+1;return t<0?((t+=n)<0&&0!==(t%=n)&&(t+=n),t):t>e?((t-=n)>e&&(t%=n),t):t}function Jl(t,e){return t<0?(t+=e+1)<0?-1:t:t>e?-1:t}var Wl=Di(Oi()),$l={wrap:zl,clamp:Dl,normalize:function(t,e){var n=Jl(t,e);if(n<0||n>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return n},throw:function(t,e){if(t<0||t>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return t}};function Gl(t,e,n){var r;if("clamp"===n)return Dl(t,e);if("wrap"===n)return zl(t,e);if(r=t,"normalize"===n&&(r=Jl(r,e)),r<0||r>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return r}M(Gl,"factory",(function(t){if(!Wl(t))throw new TypeError(j("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return $l[t]}));var Zl=Ni.prototype.iget;var ql=Ni.prototype.iset;function Kl(t,e){var n,r;for(n=[],r=0;r0))throw new TypeError(j("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",n));if((u=n.length)>32767)throw new RangeError(j("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",32767,u));if(!Ul(r))throw new TypeError(j("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",r));if(u>0){if(r.length!==u)throw new RangeError(j("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",u,r.length))}else{if(1!==r.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==r[0])throw new RangeError(j("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",r[0]))}if(!ut(i))throw new TypeError(j("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!bo(o))throw new TypeError(j("invalid argument. Sixth argument must be a supported order. Value: `%s`.",o));if(u>0&&!function(t,e,n,r){var i=Kr(e,n,r);return i[0]>=0&&i[1]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=Xl,f.readonly=false,arguments.length>6&&(s=function(t,e){var n;if(!Re(e))return new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));if(J(e,"mode")&&(t.mode=e.mode,!Wl(t.mode)))return new TypeError(j("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(J(e,"submode")){if(t.submode=e.submode,!qn(t.submode))return new TypeError(j("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(j("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(n=0;n0){if(!it(t))throw new TypeError(j("invalid argument. Index must be an integer. Value: `%s`.",t));return t=Gl(t,this._length-1,this._mode),Zl.call(this,t)}return Zl.call(this)})),M(Hl.prototype,"set",(function(){var t,e,n,r;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(j("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,n=this._submode.length,r=0;r