// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
///
var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function t(r){return"number"==typeof r}function n(r){var e,t="";for(e=0;e0&&(e-=1),n=i.toExponential(e)):n=i.toPrecision(r.precision),r.alternate||(n=p.call(n,b,"$1e"),n=p.call(n,v,"e"),n=p.call(n,y,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=p.call(n,f,"e+0$1"),n=p.call(n,g,"e-0$1"),r.alternate&&(n=p.call(n,d,"$1."),n=p.call(n,h,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===l.call(r.specifier)?l.call(n):s.call(n)}function m(r){var e,t="";for(e=0;e127)throw new Error("invalid character code. Value: "+n.arg);n.arg=E(a)?String(n.arg):_(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=w(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=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(f=n.arg,g=n.width,d=n.padRight,h=void 0,(h=g-f.length)<0?f:f=d?f+m(h):m(h)+f)),c+=n.arg||"",s+=1}return c}var k=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function x(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function O(r){var e,t,n,i;for(t=[],i=0,n=k.exec(r);n;)(e=r.slice(i,k.lastIndex-n[0].length)).length&&t.push(e),t.push(x(n)),i=k.lastIndex,n=k.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function I(r){var e,t;if("string"!=typeof r)throw new TypeError(I("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[O(r)],t=1;tQ&&rr(e=r)===e;var e}function tr(r){return M(r)&&er(r)}function nr(r){return D(r)&&er(r.valueOf())}function ir(r){return tr(r)||nr(r)}function or(r){return null===r}function ar(r){return void 0===r}function ur(r){return tr(r)||or(r)||ar(r)}function cr(){var r,e,t,n;if(0===(r=arguments.length)?(e=null,t=null,n=null):1===r?(e=null,t=arguments[0],n=null):2===r?(e=arguments[0],t=arguments[1],n=null):(e=arguments[0],t=arguments[1],n=arguments[2]),!(this instanceof cr))return new cr(e,t,n);if(!ur(e))throw new TypeError(I("invalid argument. First argument must be an integer, null, or undefined. Value: `%s`.",e));if(!ur(t))throw new TypeError(I("invalid argument. Second argument must be an integer, null, or undefined. Value: `%s`.",t));if(!ur(n))throw new TypeError(I("invalid argument. Third argument must be an integer, null, or undefined. Value: `%s`.",n));if(0===n)throw new RangeError(I("invalid argument. Third argument cannot be zero. Value: `%s`.",n));return this._start=void 0===e?null:e,this._stop=void 0===t?null:t,this._step=void 0===n?null:n,this}function sr(){return/^\s*function\s*([^(]*)/i}C(ir,"isPrimitive",tr),C(ir,"isObject",nr),C(cr,"name","Slice"),G(cr.prototype,"start",(function(){return this._start})),G(cr.prototype,"stop",(function(){return this._stop})),G(cr.prototype,"step",(function(){return this._step})),C(cr.prototype,"toString",(function(){return"Slice("+this._start+","+this._stop+","+this.step+")"})),C(cr.prototype,"toJSON",(function(){return{type:"Slice",data:[this._start,this._stop,this._step]}}));var lr=/^\s*function\s*([^(]*)/i;C(sr,"REGEXP",lr);var pr=Array.isArray?Array.isArray:function(r){return"[object Array]"===X(r)};function fr(r){return null!==r&&"object"==typeof r}function gr(r){var e,t,n,i;if(("Object"===(t=X(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=lr.exec(n.toString()))return e[1]}return fr(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":t}function dr(){var r,e=arguments,t="https://stdlib.io/e/"+e[0]+"?";for(r=1;r