// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 var e,r;e=this,r=function(){"use strict";function e(e,r){return e===r?0!==e||1/e==1/r:e!=e&&r!=r}var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function t(){return r&&"symbol"==typeof Symbol.toStringTag}var n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o="function"==typeof Symbol?Symbol:void 0,a="function"==typeof o?o.toStringTag:"",c=t()?function(e){var r,t,o,c,l;if(null==e)return n.call(e);t=e[a],l=a,r=null!=(c=e)&&i.call(c,l);try{e[a]=void 0}catch(r){return n.call(e)}return o=n.call(e),r?e[a]=t:delete e[a],o}:function(e){return n.call(e)},l="function"==typeof Float64Array,u="function"==typeof Float64Array?Float64Array:null,s="function"==typeof Float64Array?Float64Array:void 0,p=function(){var e,r,t;if("function"!=typeof u)return!1;try{r=new u([1,3.14,-3.14,NaN]),t=r,e=(l&&t instanceof Float64Array||"[object Float64Array]"===c(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?s:function(){throw new Error("not implemented")};function f(e){var r=new p(2);return r[0]=e.re,r[1]=e.im,r}var g="function"==typeof Object.defineProperty?Object.defineProperty:null,h=Object.defineProperty;function y(e){return"number"==typeof e}function d(e){var r,t="";for(r=0;r0&&(r-=1),t=n.toExponential(r)):t=n.toPrecision(e.precision),e.alternate||(t=T.call(t,I,"$1e"),t=T.call(t,V,"e"),t=T.call(t,j,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return t=T.call(t,F,"e+0$1"),t=T.call(t,x,"e-0$1"),e.alternate&&(t=T.call(t,A,"$1."),t=T.call(t,k,"$1.e")),n>=0&&e.sign&&(t=e.sign+t),t=e.specifier===S.call(e.specifier)?S.call(t):_.call(t)}function O(e){var r,t="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=C(o)?String(n.arg):P(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=N(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=m(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(s=n.arg,p=n.width,f=n.padRight,g=void 0,(g=p-s.length)<0?s:s=f?s+O(g):O(g)+s)),a+=n.arg||"",c+=1}return a}var M=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function Y(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function Z(e){var r,t,n,i;for(t=[],i=0,n=M.exec(e);n;)(r=e.slice(i,M.lastIndex-n[0].length)).length&&t.push(r),t.push(Y(n)),i=M.lastIndex,n=M.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function B(e){var r,t;if("string"!=typeof e)throw new TypeError(B("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=[Z(e)],t=1;t