diff --git a/CHANGELOG b/CHANGELOG index 69049ea..31ab7ff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,11 @@ +v0.17.0 +------- + +BREAKING CHANGE -- .format(): rationalize the %t format, remove the %T format, now %t have the same behaviour of the (recently added now removed) %T format, to have time expressed with h min and s separators instead of the colon, pass the 'a' mode (a for abbreviation), e.g.: %[a]t +modes parser changed to support single letter modes with no values + + v0.16.6 ------- diff --git a/browser/string-kit.js b/browser/string-kit.js index 051ce2d..57882f9 100644 --- a/browser/string-kit.js +++ b/browser/string-kit.js @@ -924,8 +924,7 @@ const StringNumber = require( './StringNumber.js' ) ; %U unsigned positive integer (>0) %P number to (absolute) percent (e.g.: 0.75 -> 75%) %p number to relative percent (e.g.: 1.25 -> +25% ; 0.75 -> -25%) - %t time duration, convert ms into h min s, e.g.: 2h14min52s - %T time duration, convert ms into H:min:s, e.g.: 2:14:52 + %t time duration, convert ms into h min s, e.g.: 2h14min52s or 2:14:52 %m convert degree into degree, minutes and seconds %h hexadecimal (input is a number) %x hexadecimal (input is a number), force pair of symbols (e.g. 'f' -> '0f') @@ -1667,7 +1666,7 @@ modes.m.noSanitize = true ; // time duration, transform ms into H:min:s // Later it should format Date as well: number=duration, date object=date // Note that it would not replace moment.js, but it could uses it. -modes.t = ( arg , modeArg , useLetters = true ) => { +modes.t = ( arg , modeArg ) => { if ( typeof arg === 'string' ) { arg = parseFloat( arg ) ; } if ( typeof arg !== 'number' ) { return '(NaN)' ; } @@ -1675,10 +1674,10 @@ modes.t = ( arg , modeArg , useLetters = true ) => { sign = '' , subModes = timeModeArg( modeArg ) , roundingType = subModes.roundingType , - hSeparator = useLetters ? 'h' : ':' , - minSeparator = useLetters ? 'min' : ':' , - sSeparator = useLetters ? 's' : '.' , - forceDecimalSeparator = useLetters ; + hSeparator = subModes.useAbbreviation ? 'h' : ':' , + minSeparator = subModes.useAbbreviation ? 'min' : ':' , + sSeparator = subModes.useAbbreviation ? 's' : '.' , + forceDecimalSeparator = subModes.useAbbreviation ; s = arg / 1000 ; @@ -1731,9 +1730,6 @@ modes.t = ( arg , modeArg , useLetters = true ) => { modes.t.noSanitize = true ; -modes.T = ( arg , modeArg ) => modes.t( arg , modeArg , false ) ; -modes.T.noSanitize = true ; - // unsigned hexadecimal @@ -1866,20 +1862,14 @@ modes.D.noSanitize = true ; const COMMON_MODE_ARG_FORMAT_REGEX = /([a-zA-Z])(.[^a-zA-Z]*)/g ; // The format for specific mode arg -const MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)(.[^a-zA-Z]*)/g ; +const MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)([^a-zA-Z]*)/g ; // Called when there is a modeArg and the mode allow common mode arg // CONVENTION: reserve upper-cased letters for common mode arg function commonModeArg( str , modeArg ) { - var match , k , v ; - - COMMON_MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = COMMON_MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( COMMON_MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'L' ) { let width = unicode.width( str ) ; v = + v || 1 ; @@ -1920,8 +1910,6 @@ const FLOAT_MODES = { // Generic number modes function floatModeArg( modeArg ) { - var match , k , v , lv ; - FLOAT_MODES.leftPadding = 1 ; FLOAT_MODES.rightPadding = 0 ; FLOAT_MODES.rightPaddingOnlyIfDecimal = false ; @@ -1930,11 +1918,7 @@ function floatModeArg( modeArg ) { FLOAT_MODES.groupSeparator = '' ; if ( modeArg ) { - MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'z' ) { // Zero-left padding FLOAT_MODES.leftPadding = + v ; @@ -1944,13 +1928,9 @@ function floatModeArg( modeArg ) { FLOAT_MODES.groupSeparator = v || ' ' ; } else if ( ! k ) { - if ( v === 'g' ) { - // Group separator - FLOAT_MODES.groupSeparator = ' ' ; - } - else if ( v[ 0 ] === '.' ) { + if ( v[ 0 ] === '.' ) { // Rounding after the decimal - lv = v[ v.length - 1 ] ; + let lv = v[ v.length - 1 ] ; // Zero-right padding? if ( lv === '!' ) { @@ -1982,6 +1962,7 @@ function floatModeArg( modeArg ) { const TIME_MODES = { + useAbbreviation: false , rightPadding: 0 , rightPaddingOnlyIfDecimal: false , rounding: 0 , @@ -1990,24 +1971,16 @@ const TIME_MODES = { forceMinutes: false } ; -const TIME_MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)([^a-zA-Z]*)/g ; - // Generic number modes function timeModeArg( modeArg ) { - var match , k , v , lv ; - TIME_MODES.rightPadding = 0 ; TIME_MODES.rightPaddingOnlyIfDecimal = false ; TIME_MODES.rounding = 0 ; TIME_MODES.roundingType = -1 ; - TIME_MODES.forceHours = TIME_MODES.forceMinutes = false ; + TIME_MODES.useAbbreviation = TIME_MODES.forceHours = TIME_MODES.forceMinutes = false ; if ( modeArg ) { - TIME_MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = TIME_MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'h' ) { TIME_MODES.forceHours = TIME_MODES.forceMinutes = true ; } @@ -2023,10 +1996,13 @@ function timeModeArg( modeArg ) { else if ( k === 'c' ) { TIME_MODES.roundingType = 1 ; } + else if ( k === 'a' ) { + TIME_MODES.useAbbreviation = true ; + } else if ( ! k ) { if ( v[ 0 ] === '.' ) { // Rounding after the decimal - lv = v[ v.length - 1 ] ; + let lv = v[ v.length - 1 ] ; // Zero-right padding? if ( lv === '!' ) { @@ -2051,18 +2027,13 @@ function timeModeArg( modeArg ) { // Generic inspect function genericInspectMode( arg , modeArg , options , modeOptions , isInspectError = false ) { - var match , k , v , - outputMaxLength , + var outputMaxLength , maxLength , depth = 3 , style = options && options.color ? 'color' : 'none' ; if ( modeArg ) { - MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'c' ) { if ( v === '+' ) { style = 'color' ; } else if ( v === '-' ) { style = 'none' ; } diff --git a/browser/string-kit.min.js b/browser/string-kit.min.js index d319f37..61f2b32 100644 --- a/browser/string-kit.min.js +++ b/browser/string-kit.min.js @@ -1 +1 @@ -(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.stringKit=e()}})(function(){var e,t,r;return function(){function f(o,s,a){function l(r,e){if(!s[r]){if(!o[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=s[r]={exports:{}};o[r][0].call(n.exports,function(e){var t=o[r][1][e];return l(t||e)},n,n.exports,f,o,s,a)}return s[r].exports}for(var u="function"==typeof require&&require,e=0;e20||this.exposant<-20){return this.toScientificString(...e)}return this.toNoExpString(...e)};i.prototype.toExponential=i.prototype.toExponentialString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}e+="e"+(this.exposant>0?"+":"")+(this.exposant-1);return e};const n=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"];const o="⁺";const s="⁻";const a="0".charCodeAt(0);i.prototype.toScientific=i.prototype.toScientificString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}var t=(this.exposant<=0?s:"")+(""+Math.abs(this.exposant-1)).split("").map(e=>n[e.charCodeAt(0)-a]).join("");e+=" × 10"+t;return e};i.prototype.toNoExp=i.prototype.toNoExpString=function(e=1,t=0,r=false,i=false,n=this.exposant){if(this.special!==null){return""+this.special}var o=[],s=[],a=this.sign<0?"-":i?"+":"";if(!this.digits.length){c(o,0,e);if(t&&!r){c(s,0,t)}}else if(n<=0){c(o,0,e);c(s,0,-n);g(s,this.digits);if(t&&this.digits.length-n=this.digits.length){if(n0)){c(s,0,t-this.digits.length+n)}}a+=this.groupSeparator?this.groupDigits(o,this.groupSeparator):o.join("");if(s.length){a+=this.decimalSeparator+(this.decimalGroupSeparator?this.groupDigits(s,this.decimalGroupSeparator):s.join(""))}else if(this.forceDecimalSeparator){a+=this.decimalSeparator}return a};const l=["","k","M","G","T","P","E","Z","Y"];const u=["","m","µ","n","p","f","a","z","y"];i.prototype.toMetric=i.prototype.toMetricString=function(e=1,t=0,r=false,i=false){if(this.special!==null){return""+this.special}if(!this.digits.length){return this.sign>0?"0":"-0"}var n="",o;if(this.exposant>0){o=1+(this.exposant-1)%3;n=l[Math.floor((this.exposant-1)/3)];if(n===undefined){return this.toScientificString()}}else{o=3- -this.exposant%3;n=u[1+Math.floor(-this.exposant/3)];if(n===undefined){return this.toScientificString()}}return this.toNoExpString(e,t,r,i,o)+n};i.prototype.precision=function(r,e=0){var t;if(this.special!==null||r>=this.digits.length){return this}if(r<0){this.digits.length=0;return this}e*=this.sign;if(e<0){t=this.digits.length>r+4&&this.digits[r]===9&&this.digits[r+1]===9&&this.digits[r+2]===9&&this.digits[r+3]===9&&this.digits[r+4]===9}else if(e>0){t=this.digits[r]>0||this.digits[r+1]>0||this.digits[r+2]>0||this.digits[r+3]>0||this.digits[r+4]>0}else{t=this.digits[r]>=5}if(t){let e=r-1,t=false;for(;e>=0;e--){if(this.digits[e]<9){this.digits[e]++;t=true;break}else{this.digits[e]=0}}if(!t){this.exposant++;this.digits[0]=1;this.digits.length=1}else{this.digits.length=e+1}}else{this.digits.length=r;this.removeTrailingZero()}return this};i.prototype.round=function(e=0,t=0){var r=this.exposant+e;return this.precision(r,t)};i.prototype.floor=function(e=0){var t=this.exposant+e;return this.precision(t,-1)};i.prototype.ceil=function(e=0){var t=this.exposant+e;return this.precision(t,1)};i.prototype.removeTrailingZero=function(){var e=this.digits.length-1;while(e>=0&&this.digits[e]===0){e--}this.digits.length=e+1};const f=3;i.prototype.groupDigits=function(e,t,r=false){var i="",n=r?0:f-e.length%f,o=0,s=e.length;for(;o{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[38;2;"+t+";"+r+";"+i+"m"};i.bgTrueColor=(t,r,i)=>{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[48;2;"+t+";"+r+";"+i+"m"};const s={0:null,1:{bold:true},2:{dim:true},22:{bold:false,dim:false},3:{italic:true},23:{italic:false},4:{underline:true},24:{underline:false},5:{blink:true},25:{blink:false},7:{inverse:true},27:{inverse:false},8:{hidden:true},28:{hidden:false},9:{strike:true},29:{strike:false},30:{color:0},31:{color:1},32:{color:2},33:{color:3},34:{color:4},35:{color:5},36:{color:6},37:{color:7},39:{color:"default"},90:{color:8},91:{color:9},92:{color:10},93:{color:11},94:{color:12},95:{color:13},96:{color:14},97:{color:15},40:{bgColor:0},41:{bgColor:1},42:{bgColor:2},43:{bgColor:3},44:{bgColor:4},45:{bgColor:5},46:{bgColor:6},47:{bgColor:7},49:{bgColor:"default"},100:{bgColor:8},101:{bgColor:9},102:{bgColor:10},103:{bgColor:11},104:{bgColor:12},105:{bgColor:13},106:{bgColor:14},107:{bgColor:15}};i.parse=e=>{var t,r,i,n,o=[];for([,t,r]of e.matchAll(/\x1b\[([0-9;]+)m|(.[^\x1b]*)/g)){if(r){if(o.length){o[o.length-1].text+=r}else{o.push({text:r})}}else{t.split(";").forEach(e=>{n=s[e];if(n===undefined){return}if(!o.length||o[o.length-1].text){if(!n){i={text:""}}else{i=Object.assign({},i,n);i.text=""}o.push(i)}else{if(!n){o[o.length-1]={text:""}}else{Object.assign(i,n)}}})}}return o}},{}],3:[function(e,t,r){"use strict";var i={};t.exports=i;i.toCamelCase=function(e,o=false,s=false){if(!e||typeof e!=="string"){return""}return e.replace(/(?:^[\s_-]*|([\s_-]+))(([^\s_-]?)([^\s_-]*))/g,(e,t,r,i,n)=>{if(o){if(!t&&!s){return r}if(!i){return""}return i.toUpperCase()+n}if(!t&&!s){return r.toLowerCase()}if(!i){return""}return i.toUpperCase()+n.toLowerCase()})};i.camelCaseToSeparated=function(e,i=" "){if(!e||typeof e!=="string"){return""}return e.replace(/^([A-Z])|([A-Z])/g,(e,t,r)=>{if(t){return t.toLowerCase()}return i+r.toLowerCase()})};i.camelCaseToDash=i.camelCaseToDashed=e=>i.camelCaseToSeparated(e,"-")},{}],4:[function(e,t,r){"use strict";r.regExp=r.regExpPattern=e=>e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1");r.regExpReplacement=e=>e.replace(/\$/g,"$$$$");r.format=e=>e.replace(/%/g,"%%");r.jsSingleQuote=e=>r.control(e).replace(/'/g,"\\'");r.jsDoubleQuote=e=>r.control(e).replace(/"/g,'\\"');r.shellArg=e=>"'"+e.replace(/'/g,"'\\''")+"'";var i={"\r":"\\r","\n":"\\n","\t":"\\t","":"\\x7f"};r.control=(e,r=false)=>e.replace(/[\x00-\x1f\x7f]/g,e=>{if(r&&(e==="\n"||e==="\t")){return e}if(i[e]!==undefined){return i[e]}var t=e.charCodeAt(0).toString(16);if(t.length%2){t="0"+t}return"\\x"+t});var n={"&":"&","<":"<",">":">",'"':""","'":"'"};r.html=e=>e.replace(/[&<>]/g,e=>n[e]);r.htmlAttr=e=>e.replace(/[&<>"]/g,e=>n[e]);r.htmlSpecialChars=e=>e.replace(/[&<>"']/g,e=>n[e]);r.unicodePercentEncode=e=>e.replace(/[\x00-\x1f\u0100-\uffff\x7f%]/g,e=>{try{return encodeURI(e)}catch(e){return""}});r.httpHeaderValue=e=>r.unicodePercentEncode(e)},{}],5:[function(T,e,B){(function(O){(function(){"use strict";const g=T("./inspect.js").inspect;const h=T("./inspect.js").inspectError;const t=T("./escape.js");const n=T("./ansi.js");const o=T("./unicode.js");const i=T("./naturalSort.js");const d=T("./StringNumber.js");B.formatMethod=function(...d){var y,e=d[0],m=1,b=d.length;if(typeof e!=="string"){if(!e){e=""}else if(typeof e.toString==="function"){e=e.toString()}else{e=""}}var k={hasMarkup:false,shift:null,markupStack:[]};if(this.markupReset&&this.startingMarkupReset){e=(typeof this.markupReset==="function"?this.markupReset(k.markupStack):this.markupReset)+e}e=e.replace(/\^\[([^\]]*)]?|\^(.)|(%%)|%([+-]?)([0-9]*)(?:\[([^\]]*)\])?([a-zA-Z])/g,(e,t,r,i,n,o,s,a)=>{var l,u,f,c,g,h,p=[];if(i){return"%"}if(t){r=t}if(r){if(this.noMarkup){return"^"+r}return S.call(this,k,e,r)}if(o){o=parseInt(o,10);if(n){if(n==="+"){o=m+o}else if(n==="-"){o=m-o}}}else{o=m}m++;if(o>=b||o<1){y=undefined}else{y=d[o]}if(w[a]){l=w[a](y,s,this);if(this.argumentSanitizer&&!w[a].noSanitize){l=this.argumentSanitizer(l)}if(s&&!w[a].noCommonModeArg){l=x(l,s)}return l}if(a==="F"){m--;if(s===undefined){return""}f=s.split(":");c=f[0];g=f[1];if(!c){return""}if(g&&(h=g.match(/%([+-]?)([0-9]*)[a-zA-Z]/g))){for(u=0;u=b||o<1){p[u]=undefined}else{p[u]=d[o]}}}if(!this||!this.fn||typeof this.fn[c]!=="function"){return""}return this.fn[c].apply(this,p)}return""});if(k.hasMarkup&&this.markupReset&&this.endingMarkupReset){e+=typeof this.markupReset==="function"?this.markupReset(k.markupStack):this.markupReset}if(this.extraArguments){for(;m1){a.push({text:""})}}else{if(s&&s.text.length){a.push(Object.assign({text:""},...u.markupStack))}else{if(s){Object.assign(s,t)}else{a.push(Object.assign({text:""},t))}}}}}return a}if(this.markupReset&&this.startingMarkupReset){l=(typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset)+l}l=l.replace(/\^\[([^\]]*)]?|\^(.)/g,(e,t,r)=>S.call(this,u,e,t||r));if(u.hasMarkup&&this.markupReset&&this.endingMarkupReset){l+=typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset}return l};function S(e,t,r){var i,n,o,s,a;if(r==="^"){return"^"}if(this.shiftMarkup&&this.shiftMarkup[r]){e.shift=this.shiftMarkup[r];return""}if(r.length>1&&this.dataMarkup&&(a=r.indexOf(":"))!==-1){n=r.slice(0,a);i=this.dataMarkup[n];if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;o=r.slice(a+1);if(typeof i==="function"){s=i(e.markupStack,n,o)}else{s={[i]:o};l(e,s)}return s}if(e.shift){i=this.shiftedMarkup?.[e.shift]?.[r];e.shift=null}else{i=this.markup?.[r]}if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;if(typeof i==="function"){s=i(e.markupStack,r)}else{s=i;l(e,s)}return s}function l(t,r){if(Array.isArray(r)){for(let e of r){if(e===null){t.markupStack.length=0}else{t.markupStack.push(e)}}}else{if(r===null){t.markupStack.length=0}else{t.markupStack.push(r)}}}B.stripMarkup=e=>e.replace(/\^\[[^\]]*]?|\^./g,e=>e==="^^"?"^":e==="^ "?" ":"");const r={argumentSanitizer:e=>t.control(e,true),extraArguments:true,color:false,noMarkup:false,endingMarkupReset:true,startingMarkupReset:false,markupReset:n.reset,shiftMarkup:{"#":"background"},markup:{":":n.reset," ":n.reset+" ","-":n.dim,"+":n.bold,_:n.underline,"/":n.italic,"!":n.inverse,b:n.blue,B:n.brightBlue,c:n.cyan,C:n.brightCyan,g:n.green,G:n.brightGreen,k:n.black,K:n.brightBlack,m:n.magenta,M:n.brightMagenta,r:n.red,R:n.brightRed,w:n.white,W:n.brightWhite,y:n.yellow,Y:n.brightYellow},shiftedMarkup:{background:{":":n.reset," ":n.reset+" ",b:n.bgBlue,B:n.bgBrightBlue,c:n.bgCyan,C:n.bgBrightCyan,g:n.bgGreen,G:n.bgBrightGreen,k:n.bgBlack,K:n.bgBrightBlack,m:n.bgMagenta,M:n.bgBrightMagenta,r:n.bgRed,R:n.bgBrightRed,w:n.bgWhite,W:n.bgBrightWhite,y:n.bgYellow,Y:n.bgBrightYellow}},dataMarkup:{fg:(e,t,r)=>{var i=n.fgColor[r]||n.trueColor(r);e.push(i);return i},bg:(e,t,r)=>{var i=n.bgColor[r]||n.bgTrueColor(r);e.push(i);return i}},markupCatchAll:(e,t,r)=>{var i="";if(r===undefined){if(t[0]==="#"){i=n.trueColor(t)}else if(typeof n[t]==="string"){i=n[t]}}e.push(i);return i}};r.dataMarkup.color=r.dataMarkup.c=r.dataMarkup.fgColor=r.dataMarkup.fg;r.dataMarkup.bgColor=r.dataMarkup.bg;B.createFormatter=e=>B.formatMethod.bind(Object.assign({},r,e));B.format=B.formatMethod.bind(r);B.format.default=r;B.createMarkup=e=>B.markupMethod.bind(Object.assign({},r,e));B.markup=B.markupMethod.bind(r);B.format.count=function(e,t=false){var r,i,n,o=1,s=0;if(typeof e!=="string"){return 0}var a=t?/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]/g:/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]|(\^\[[^\]]*]?|\^.)/g;for([,n,i,r]of e.matchAll(a)){if(r){continue}if(i){i=parseInt(i,10);if(n){if(n==="+"){i=o+i}else if(n==="-"){i=o-i}}}else{i=o}o++;if(s{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};w.r=e=>w.s(e);w.r.noSanitize=true;w.S=(e,t,r)=>{var i=e=>B.markupMethod.call(r,r.argumentSanitizer?r.argumentSanitizer(e):e);if(typeof e==="string"){return i(e)}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return i(e.toString())}return i("("+e+")")};w.S.noSanitize=true;w.S.noCommonModeArg=true;w.N=(e,t)=>{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return""+e}if(typeof e==="number"){return w.f(e,".3g ")}if(Array.isArray(e)){e=e.map(e=>w.N(e,true));if(t){return"["+e.join(",")+"]"}return e.join(", ")}if(O.isBuffer(e)){e=[...e].map(e=>{e=e.toString(16);if(e.length===1){e="0"+e}return e});return"<"+e.join(" ")+">"}var r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype){e=Object.entries(e).sort(i).map(e=>e[0]+": "+w.N(e[1],true));if(t){return"{"+e.join(", ")+"}"}return e.join(", ")}if(typeof e.inspect==="function"){return e.inspect()}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};w.n=e=>w.N(e,true);w.f=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};w.f.noSanitize=true;w.P=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e*=100;var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)+"%"};w.P.noSanitize=true;w.p=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e=(e-1)*100;var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal,true)+"%"};w.p.noSanitize=true;w.k=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"0"}var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision||r.rounding===null){i.precision(r.precision||3)}return i.toMetricString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};w.k.noSanitize=true;w.e=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toExponential()};w.e.noSanitize=true;w.K=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new d(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toScientific()};w.K.noSanitize=true;w.d=w.i=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.floor(e)}return"0"};w.i.noSanitize=true;w.u=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0)}return"0"};w.u.noSanitize=true;w.U=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),1)}return"1"};w.U.noSanitize=true;w.m=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var t="";if(e<0){t="-";e=-e}var r=P(e),i=e-r;if(!i){return t+r+"°"}var n=P(i*60),o=P(i*3600-n*60);if(o){return t+r+"°"+(""+n).padStart(2,"0")+"′"+(""+o).padStart(2,"0")+"″"}return t+r+"°"+(""+n).padStart(2,"0")+"′"};w.m.noSanitize=true;w.t=(e,t,r=true)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var i,n,o,s,a,l="",u=C(t),f=u.roundingType,c=r?"h":":",g=r?"min":":",h=r?"s":".",p=r;o=e/1e3;if(o<0){o=-o;f*=-1;l="-"}if(o<60&&!u.forceMinutes){s=new d(o,h,undefined,p);s.round(u.rounding,f);if(s.toNumber()<60){a=s.toString(1,u.rightPadding,u.rightPaddingOnlyIfDecimal);return l+a}o=60}n=Math.floor(o/60);o=o%60;s=new d(o,h,undefined,p);s.round(u.rounding,f);if(s.toNumber()<60){a=s.toString(2,u.rightPadding,u.rightPaddingOnlyIfDecimal)}else{n++;o=0;s.set(o);a=s.toString(2,u.rightPadding,u.rightPaddingOnlyIfDecimal)}if(n<60&&!u.forceHours){return l+n+g+a}i=Math.floor(n/60);n=n%60;return l+i+c+(""+n).padStart(2,"0")+g+a};w.t.noSanitize=true;w.T=(e,t)=>w.t(e,t,false);w.T.noSanitize=true;w.h=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(16)}return"0"};w.h.noSanitize=true;w.x=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"00"}var t=""+Math.max(Math.floor(e),0).toString(16);if(t.length%2){t="0"+t}return t};w.x.noSanitize=true;w.o=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(8)}return"0"};w.o.noSanitize=true;w.b=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(2)}return"0"};w.b.noSanitize=true;w.X=e=>{if(typeof e==="string"){e=O.from(e)}else if(!O.isBuffer(e)){return""}return e.toString("hex")};w.X.noSanitize=true;w.z=e=>{if(typeof e==="string"){e=O.from(e)}else if(!O.isBuffer(e)){return""}return e.toString("base64")};w.Z=e=>{if(typeof e==="string"){e=O.from(e)}else if(!O.isBuffer(e)){return""}return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]{1,2}$/g,"")};const s={};w.I=(e,t,r)=>M(e,t,r,s);w.I.noSanitize=true;const a={noFunc:true,enumOnly:true,noDescriptor:true,useInspect:true,useInspectPropertyBlackList:true};w.Y=(e,t,r)=>M(e,t,r,a);w.Y.noSanitize=true;const u={minimal:true,noIndex:true};w.O=(e,t,r)=>M(e,t,r,u);w.O.noSanitize=true;const f={};w.E=(e,t,r)=>M(e,t,r,f,true);w.E.noSanitize=true;w.J=e=>e===undefined?"null":JSON.stringify(e);w.D=()=>"";w.D.noSanitize=true;const c=/([a-zA-Z])(.[^a-zA-Z]*)/g;const p=/([a-zA-Z]|^)(.[^a-zA-Z]*)/g;function x(t,e){var r,i,n;c.lastIndex=0;while(r=c.exec(e)){[,i,n]=r;if(i==="L"){let e=o.width(t);n=+n||1;if(e>n){t=o.truncateWidth(t,n-1).trim()+"…";e=o.width(t)}if(en){t=o.truncateWidth(t,n-1).trim()+"…";e=o.width(t)}if(e{if(e===t){return 1}if(e.length===0||t.length===0){return 0}return Math.max(0,1-x.levenshtein(e,t)/t.length)};const C=0;const M=.88;const w=.9;x.bestMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n,o,s,a,l=-1,u=null;for(n=0,o=t.length;ni){i=s;u=a;l=n}}return r.indexOf?l:u};x.topMatch=(r,e,t={})=>{var i=t.scoreLimit||C,n=t.deltaRate||w,o,s,a;a=e.map((e,t)=>({pattern:e,index:t,score:x.score(r,e)}));a.sort((e,t)=>t.score-e.score);if(a[0].score<=i){return[]}i=Math.max(i,a[0].score*n);for(o=1,s=a.length;oe.index):a.map(e=>e.pattern)};const i=new Set(["a","an","the","this","that","those","some","of","in","on","at","my","your","her","his","its","our","their"]);function A(e,t=i){return e.split(/[ '"/|,:_-]+/g).filter(e=>e&&!t.has(e))}x.bestTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||M,o,s,a,l,u,f,c,g,h,p,d=i,y,m,b=A(e),k,S=-1,w=null;if(!b.length||!t.length){return r.indexOf?S:w}for(o=0,s=t.length;ok){k=m;if(m===1){break}}}p+=k}p/=b.length;if(b.length!==g.length){p*=n**Math.abs(g.length-b.length)}if(p>d){d=p;w=c;S=o}}return r.indexOf?S:w};x.topTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||M,o=r.deltaRate||w,s,a,l,u,f,c,g,h,p,d,y,m,b=A(e),k,S=[];if(!b.length||!t.length){return[]}for(s=0,a=t.length;sk){k=m;if(m===1){break}}}d+=k}d/=b.length;if(b.length!==h.length){d*=n**Math.abs(h.length-b.length)}S.push({pattern:g,index:s,score:d})}S.sort((e,t)=>t.score-e.score);if(S[0].score<=i){return[]}i=Math.max(i,S[0].score*o);for(s=1,a=S.length;se.index):S.map(e=>e.pattern)};const c=[];const g=[];x.levenshtein=(t,r)=>{if(t===r){return 0}if(t.length>r.length){let e=t;t=r;r=e}let e=t.length;let i=r.length;while(e>0&&t.charCodeAt(e-1)===r.charCodeAt(i-1)){e--;i--}let n=0;while(ns?l>s?s+1:l:l>a?a+1:l}}return s}},{}],7:[function(t,e,r){(function(P,c){(function(){"use strict";const x=t("./escape.js");const n=t("./ansi.js");const C={};const M=new Set([Object,Array]);function s(e,t){if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}var r={depth:0,ancestors:[]};if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(e.depth===undefined){e.depth=3}if(e.maxLength===undefined){e.maxLength=250}if(e.outputMaxLength===undefined){e.outputMaxLength=5e3}if(e.nofunc){e.noFunc=true}if(e.minimal){e.noFunc=true;e.noDescriptor=true;e.noType=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}if(e.minimalPlusConstructor){e.noFunc=true;e.noDescriptor=true;e.noTypeButConstructor=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}var i=A(r,e,t);if(i.length>e.outputMaxLength){i=e.style.truncate(i,e.outputMaxLength)}return i}r.inspect=s;function A(t,r,e){var i,n,o,s,a,l,u,f,c,g,h,p,d,y,m="",b="",k="",S,w;c=typeof e;h=(r.tab??r.style.tab).repeat(t.depth);if(c==="function"&&r.noFunc){return""}if(t.key!==undefined){if(t.descriptor){k=[];if(!t.descriptor.configurable){k.push("-conf")}if(!t.descriptor.enumerable){k.push("-enum")}if(!t.descriptor.writable){k.push("-w")}if(k.length){k=k.join(" ")}else{k=""}}if(t.keyIsProperty){if(v(t.key)){b='"'+r.style.key(t.key)+'": '}else{b=r.style.key(t.key)+": "}}else if(!r.noIndex){b=r.style.index(t.key)}if(k){k=" "+r.style.type(k)}}g=t.noPre?"":h+b;if(e===undefined){m+=g+r.style.constant("undefined")+k+r.style.newline}else if(e===C){m+=g+r.style.constant("[empty]")+k+r.style.newline}else if(e===null){m+=g+r.style.constant("null")+k+r.style.newline}else if(e===false){m+=g+r.style.constant("false")+k+r.style.newline}else if(e===true){m+=g+r.style.constant("true")+k+r.style.newline}else if(c==="number"){m+=g+r.style.number(e.toString())+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("number"))+k+r.style.newline}else if(c==="string"){if(e.length>r.maxLength){m+=g+'"'+r.style.string(x.control(e.slice(0,r.maxLength-1)))+'…"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+" - TRUNCATED)"))+k+r.style.newline}else{m+=g+'"'+r.style.string(x.control(e))+'"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+")"))+k+r.style.newline}}else if(P.isBuffer(e)){m+=g+r.style.inspect(e.inspect())+(r.noType?"":" "+r.style.type("Buffer")+r.style.length("("+e.length+")"))+k+r.style.newline}else if(c==="object"||c==="function"){n=o="";d=false;if(c==="function"){d=true;n=" "+r.style.funcName(e.name?e.name:"(anonymous)");o=r.style.length("("+e.length+")")}p=false;if(Array.isArray(e)){p=true;o=r.style.length("("+e.length+")")}if(!e.constructor){u="(no constructor)"}else if(!e.constructor.name){u="(anonymous)"}else{u=e.constructor.name}l=!e.constructor||M.has(e.constructor);u=r.style.constructorName(u);s=Object.getPrototypeOf(e);m+=g;if(!r.noType&&(!r.noTypeButConstructor||!l)){if(t.forceType&&!r.noType&&!r.noTypeButConstructor){m+=r.style.type(t.forceType)}else if(r.noTypeButConstructor){m+=u}else{m+=u+n+o+" "+r.style.type(c)+k}if(!d||r.funcDetails){m+=" "}}if(p&&r.noArrayProperty){a=[...Array(e.length).keys()]}else{a=Object.getOwnPropertyNames(e)}if(r.sort){a.sort()}y=j(e,t,r);if(r.protoBlackList&&r.protoBlackList.has(s)){m+=r.style.limit("[skip]")+r.style.newline}else if(y!==undefined){if(typeof y==="string"){m+="=> "+y+r.style.newline}else{m+="=> "+A({depth:t.depth,ancestors:t.ancestors,noPre:true},r,y)}}else if(d&&!r.funcDetails){m+=r.style.newline}else if(!a.length&&!r.proto){m+=(p?"[]":"{}")+r.style.newline}else if(t.depth>=r.depth){m+=r.style.limit("[depth limit]")+r.style.newline}else if(t.ancestors.indexOf(e)!==-1){m+=r.style.limit("[circular]")+r.style.newline}else{m+=(p?"[":"{")+r.style.newline;w=t.ancestors.slice();w.push(e);for(i=0;i";if(t==="fulfilled"){r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},o,e[1])}else if(t==="rejected"){if(e[1]instanceof Error){r+=" "+l({style:o.style,noErrorStack:true},e[1])}else{r+=" "+A({depth:n.depth,ancestors:n.ancestors,noPre:true},o,e[1])}}return r}}if(i._bsontype){return i.toString()}if(o.useInspect&&typeof i.inspect==="function"){return i.inspect()}return}function l(e,t){var r="",i,n,o;if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}if(!(t instanceof Error)){return"inspectError(): it's not an error, using regular variable inspection: "+s(e,t)}if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(t.stack&&!e.noErrorStack){i=u(e,t.stack)}n=t.type||t.constructor.name;o=t.code||t.name||t.errno||t.number;r+=e.style.errorType(n)+(o?" ["+e.style.errorType(o)+"]":"")+": ";r+=e.style.errorMessage(t.message)+"\n";if(i){r+=e.style.errorStack(i)+"\n"}if(t.from){r+=e.style.newline+e.style.errorFromMessage("From error:")+e.style.newline+l(e,t.from)}return r}r.inspectError=l;function u(l,e){if(arguments.length<2){e=l;l={}}else if(!l||typeof l!=="object"){l={}}if(!l.style){l.style=f.none}else if(typeof l.style==="string"){l.style=f[l.style]}if(!e){return}if((l.browser||c.browser)&&e.indexOf("@")!==-1){e=e.replace(/[{return l.style.errorStack(" at ")+(t?l.style.errorStackMethod(t)+" ":"")+l.style.errorStack("(")+(r?l.style.errorStackFile(r):l.style.errorStack("unknown"))+(i?l.style.errorStack(":")+l.style.errorStackLine(i):"")+(n?l.style.errorStack(":")+l.style.errorStackColumn(n):"")+l.style.errorStack(")")})}else{e=e.replace(/^[^\n]*\n/,"");e=e.replace(/^\s*(at)\s+(?:(?:(async|new)\s+)?([^\s:()[\]\n]+(?:\([^)]+\))?)\s)?(?:\[as ([^\s:()[\]\n]+)\]\s)?(?:\(?([^:()[\]\n]+):([0-9]+):([0-9]+)\)?)?$/gm,(e,t,r,i,n,o,s,a)=>{return l.style.errorStack(" at ")+(r?l.style.errorStackKeyword(r)+" ":"")+(i?l.style.errorStackMethod(i)+" ":"")+(n?l.style.errorStack("[as ")+l.style.errorStackMethodAs(n)+l.style.errorStack("] "):"")+l.style.errorStack("(")+(o?l.style.errorStackFile(o):l.style.errorStack("unknown"))+(s?l.style.errorStack(":")+l.style.errorStackLine(s):"")+(a?l.style.errorStack(":")+l.style.errorStackColumn(a):"")+l.style.errorStack(")")})}return e}r.inspectStack=u;var f={};var e=e=>e;f.none={trim:false,tab:" ",newline:"\n",comma:"",limit:e,type:e=>"<"+e+">",constant:e,funcName:e,constructorName:e=>"<"+e+">",length:e,key:e,index:e=>"["+e+"] ",number:e,inspect:e,string:e,errorType:e,errorMessage:e,errorStack:e,errorStackKeyword:e,errorStackMethod:e,errorStackMethodAs:e,errorStackFile:e,errorStackLine:e,errorStackColumn:e,errorFromMessage:e,truncate:(e,t)=>e.slice(0,t-1)+"…"};f.inline=Object.assign({},f.none,{trim:true,tab:"",newline:" ",comma:", ",length:()=>"",index:()=>""});f.color=Object.assign({},f.none,{limit:e=>n.bold+n.brightRed+e+n.reset,type:e=>n.italic+n.brightBlack+e+n.reset,constant:e=>n.cyan+e+n.reset,funcName:e=>n.italic+n.magenta+e+n.reset,constructorName:e=>n.magenta+e+n.reset,length:e=>n.italic+n.brightBlack+e+n.reset,key:e=>n.green+e+n.reset,index:e=>n.blue+"["+e+"]"+n.reset+" ",number:e=>n.cyan+e+n.reset,inspect:e=>n.cyan+e+n.reset,string:e=>n.blue+e+n.reset,errorType:e=>n.red+n.bold+e+n.reset,errorMessage:e=>n.red+n.italic+e+n.reset,errorStack:e=>n.brightBlack+e+n.reset,errorStackKeyword:e=>n.italic+n.bold+e+n.reset,errorStackMethod:e=>n.brightYellow+e+n.reset,errorStackMethodAs:e=>n.yellow+e+n.reset,errorStackFile:e=>n.brightCyan+e+n.reset,errorStackLine:e=>n.blue+e+n.reset,errorStackColumn:e=>n.magenta+e+n.reset,errorFromMessage:e=>n.yellow+n.underline+e+n.reset,truncate:(e,t)=>{var r=n.gray+"…"+n.reset;e=e.slice(0,t-r.length);var i=e.lastIndexOf("");if(i>=e.length-6){e=e.slice(0,i)}return e+r}});f.html=Object.assign({},f.none,{tab:"    ",newline:"
",limit:e=>''+e+"",type:e=>''+e+"",constant:e=>''+e+"",funcName:e=>''+e+"",constructorName:e=>''+e+"",length:e=>''+e+"",key:e=>''+e+"",index:e=>'['+e+"] ",number:e=>''+e+"",inspect:e=>''+e+"",string:e=>''+e+"",errorType:e=>''+e+"",errorMessage:e=>''+e+"",errorStack:e=>''+e+"",errorStackKeyword:e=>""+e+"",errorStackMethod:e=>''+e+"",errorStackMethodAs:e=>''+e+"",errorStackFile:e=>''+e+"",errorStackLine:e=>''+e+"",errorStackColumn:e=>''+e+"",errorFromMessage:e=>''+e+""})}).call(this)}).call(this,{isBuffer:t("../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js")},t("_process"))},{"../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js":18,"./ansi.js":2,"./escape.js":4,_process:19}],8:[function(e,t,r){t.exports={"߀":"0","́":""," ":" ","Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ɓ":"B","c":"C","Ⓒ":"C","C":"C","Ꜿ":"C","Ḉ":"C","Ç":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ɗ":"D","Ɖ":"D","ᴅ":"D","Ꝺ":"D","Ð":"Dh","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","ɛ":"E","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","ᴇ":"E","ꝼ":"F","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","ɢ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","ȷ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","ϻ":"M","Ꞥ":"N","Ƞ":"N","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ɲ":"N","Ꞑ":"N","ᴎ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Þ":"Th","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ɑ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","Ƃ":"b","ⓒ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c",C:"c","Ć":"c","Ĉ":"c","Ċ":"c","Č":"c","Ƈ":"c","Ȼ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","Ƌ":"d","Ꮷ":"d","ԁ":"d","Ɦ":"d","ð":"dh","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ff":"ff","fi":"fi","fl":"fl","ffi":"ffi","ffl":"ffl","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ꝿ":"g","ᵹ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ɭ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","ԉ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ɔ":"o","ᴑ":"o","œ":"oe","ƣ":"oi","ꝏ":"oo","ȣ":"ou","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ρ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ʂ":"s","ß":"ss","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","þ":"th","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"}},{}],9:[function(e,t,r){"use strict";var i=e("./latinize-map.json");t.exports=function(e){return e.replace(/[^\u0000-\u007e]/g,e=>{return i[e]||e})}},{"./latinize-map.json":8}],10:[function(e,t,r){"use strict";r.resize=function(e,t){if(e.length===t){return e}else if(e.length>t){return e.slice(0,t)}return e+" ".repeat(t-e.length)};r.occurrenceCount=function(e,t,r=false){if(!e||!t){return 0}var i=0,n=0,o=r?1:t.length;while((n=e.indexOf(t,n))!==-1){i++;n+=o}return i}},{}],11:[function(e,t,r){"use strict";const w=1;const x=2;const C=3;const M=4;const A=5;function v(e,t){if(j(t)){return x}if(t<=31||t===127){return w}if(P(t)){return M}if(e.toUpperCase()!==e.toLowerCase()){return C}return A}function j(e){if(e===32||e===9||e===160||e===45||e===95){return true}return false}function P(e){if(e>=48&&e<=57){return true}return false}function i(e,t){e=""+e;t=""+t;var r,i,n,o,s,a,l,u=e.trim(),f=u.length,c,g,h,p,d,y,m,b=t.trim(),k=b.length,S=0;for(r=c=0;ry?1:-1}if(!S&&n!==h){S=n!==a?-1:1}break;case M:i=r+1;while(P(u.charCodeAt(i))){i++}l=parseFloat(u.slice(r,i));g=c+1;while(P(b.charCodeAt(g))){g++}m=parseFloat(b.slice(c,g));if(l!==m){return l-m}if(!S&&i-r!==g-c){S=i-r-(g-c)}r=i-1;c=g-1;break}}if(S){return S}return f-r-(k-c)||f-k||e.length-t.length}t.exports=i},{}],12:[function(e,t,r){"use strict";var n=e("./escape.js");r.regexp={};r.regexp.array2alternatives=function e(t){var r,i=t.slice();i.sort((e,t)=>{return t.length-e.length});for(r=0;r{if(!r||typeof r!=="string"){return""}var t=e.dashToSpace??a.dashToSpace,i=e.underscoreToSpace??a.underscoreToSpace,n=e.zealous??a.zealous,o=e.preserveAllCaps??a.preserveAllCaps,s=e.lowerCaseWords??a.lowerCaseWords;s=s instanceof Set?s:Array.isArray(s)?new Set(s):null;if(t){r=r.replace(/-+/g," ")}if(i){r=r.replace(/_+/g," ")}r=r.replace(/ +/g," ").trim();return r.replace(/[^\s_-]+/g,(t,e)=>{if(s&&e&&e+t.lengthString.fromCodePoint(...e);f.decode=e=>Array.from(e,e=>e.codePointAt(0));f.firstCodePoint=e=>e.codePointAt(0);f.firstChar=e=>e.length?String.fromCodePoint(e.codePointAt(0)):undefined;f.toArray=e=>Array.from(e);f.toCells=(e,t,r=4,i=0,...n)=>{var o,s,a,l,u=[];for(o of t){s=o.codePointAt(0);if(s===10){i=0}else if(s===9){a=r-i%r-1;u.push(new e("\t",1,...n));i+=1+a;while(a--){u.push(new e(" ",-2,...n))}}else{l=f.codePointWidth(s),u.push(new e(o,l,...n));i+=l;while(--l>0){u.push(new e(" ",-1,...n))}}}return u};f.fromCells=e=>{var t,r="";for(t of e){if(!t.filler){r+=t.char}}return r};f.length=e=>{var t,r=0;for(t of e){r++}return r};f.width=e=>{var t,r=0;for(t of e){r+=f.codePointWidth(t.codePointAt(0))}return r};f.arrayWidth=(e,t)=>{var r,i=0;if(t===undefined){t=e.length}for(r=0;ro;f.widthLimit=f.truncateWidth=(e,t)=>{var r,i,n=0;o=0;for(r of e){i=f.codePointWidth(r.codePointAt(0));if(o+i>t){return e.slice(0,n)}o+=i;n+=r.length}return e};f.surrogatePair=e=>{var t=e.charCodeAt(0);if(t<55296||t>=57344){return 0}else if(t<56320){return 1}return-1};f.isFullWidth=e=>f.isFullWidthCodePoint(e.codePointAt(0));f.charWidth=e=>f.codePointWidth(e.codePointAt(0));f.codePointWidth=e=>{if(f.isEmojiCodePoint(e)){return 2}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return 2}return 1};f.isFullWidthCodePoint=e=>f.codePointWidth(e)===2;f.toFullWidth=e=>{return String.fromCodePoint(...Array.from(e,e=>{var t=e.codePointAt(0);return t>=33&&t<=126?65280+t-32:t}))};f.isZeroWidthDiacritic=e=>f.isZeroWidthDiacriticCodePoint(e.codePointAt(0));f.isZeroWidthDiacriticCodePoint=e=>768<=e&&e<=879||6832<=e&&e<=6911||7616<=e&&e<=7679||8400<=e&&e<=8447||65056<=e&&e<=65071||e===12441||e===12442||2304<=e&&e<=2307||2362<=e&&e<=2391&&e!==2365&&e!==2384||e===2402||e===2403||e===3633||3636<=e&&e<=3642||3655<=e&&e<=3662;f.isEmoji=e=>f.isEmojiCodePoint(e.codePointAt(0));f.isEmojiCodePoint=e=>9728<=e&&e<=9983||9984<=e&&e<=10175||126976<=e&&e<=127487||127744<=e&&e<=127994||128e3<=e&&e<=129791;f.isEmojiModifier=e=>f.isEmojiModifierCodePoint(e.codePointAt(0));f.isEmojiModifierCodePoint=e=>127995<=e&&e<=127999},{}],16:[function(e,t,r){"use strict";const S=e("./unicode.js");const w={"!":true,"?":true,":":true,";":true};t.exports=function e(t,r){var i=0,n,o,s,a,l,u,f,c,g,h,p=true,d=S.toArray(t),y=false,m,b=[];if(typeof r!=="object"){r={width:r}}if(!r.width||typeof r.width!=="number"||r.width<=0){r.width=80}s=r.offset?r.width-r.offset:r.width;if(typeof r.glue!=="string"){r.glue="\n"}if(r.regroupFn){d=r.regroupFn(d);h=r.charWidthFn||S.width}else{h=r.charWidthFn||S.charWidth}u=d.length;var k=()=>{if(!p||y){while(d[i]===" "){i++}if(y&&d[i]==="\n"){p=true;i++}}if(i>=u){return null}p=false;y=false;g=false;n=f=i;l=c=0;for(;;){if(n>=u){return d.slice(i,n).join("")}if(d[n]==="\n"){p=true;a=d.slice(i,n++).join("");if(r.fill){a+=" ".repeat(s-l)}return a}if(r.skipFn){o=r.skipFn(d,n);if(o!==n){n=o;continue}}if(d[n]===" "&&!g&&!w[d[n+1]]){f=n;c=l}else{g=false}l+=h(d[n]);if(l>s){y=true;if(f!==i){n=f}else if(st===b.length-1?e:e.trimRight())}if(!r.noJoin){b=b.join(r.glue)}if(r.updateOffset){r.offset=l}return b}},{"./unicode.js":15}],17:[function(e,t,r){},{}],18:[function(e,t,r){t.exports=function(e){return e!=null&&(i(e)||n(e)||!!e._isBuffer)};function i(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function n(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&i(e.slice(0,0))}},{}],19:[function(e,t,r){var i=t.exports={};var n;var o;function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=s}}catch(e){n=s}try{if(typeof clearTimeout==="function"){o=clearTimeout}else{o=a}}catch(e){o=a}})();function l(t){if(n===setTimeout){return setTimeout(t,0)}if((n===s||!n)&&setTimeout){n=setTimeout;return setTimeout(t,0)}try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}function u(t){if(o===clearTimeout){return clearTimeout(t)}if((o===a||!o)&&clearTimeout){o=clearTimeout;return clearTimeout(t)}try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}var f=[];var c=false;var g;var h=-1;function p(){if(!c||!g){return}c=false;if(g.length){f=g.concat(f)}else{h=-1}if(f.length){d()}}function d(){if(c){return}var e=l(p);c=true;var t=f.length;while(t){g=f;f=[];while(++h1){for(var r=1;r20||this.exposant<-20){return this.toScientificString(...e)}return this.toNoExpString(...e)};i.prototype.toExponential=i.prototype.toExponentialString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}e+="e"+(this.exposant>0?"+":"")+(this.exposant-1);return e};const n=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"];const o="⁺";const s="⁻";const a="0".charCodeAt(0);i.prototype.toScientific=i.prototype.toScientificString=function(){if(this.special!==null){return""+this.special}var e=this.sign<0?"-":"";if(!this.digits.length){return e+"0"}e+=this.digits[0];if(this.digits.length>1){e+=this.decimalSeparator+this.digits.join("").slice(1)}var t=(this.exposant<=0?s:"")+(""+Math.abs(this.exposant-1)).split("").map(e=>n[e.charCodeAt(0)-a]).join("");e+=" × 10"+t;return e};i.prototype.toNoExp=i.prototype.toNoExpString=function(e=1,t=0,r=false,i=false,n=this.exposant){if(this.special!==null){return""+this.special}var o=[],s=[],a=this.sign<0?"-":i?"+":"";if(!this.digits.length){c(o,0,e);if(t&&!r){c(s,0,t)}}else if(n<=0){c(o,0,e);c(s,0,-n);g(s,this.digits);if(t&&this.digits.length-n=this.digits.length){if(n0)){c(s,0,t-this.digits.length+n)}}a+=this.groupSeparator?this.groupDigits(o,this.groupSeparator):o.join("");if(s.length){a+=this.decimalSeparator+(this.decimalGroupSeparator?this.groupDigits(s,this.decimalGroupSeparator):s.join(""))}else if(this.forceDecimalSeparator){a+=this.decimalSeparator}return a};const l=["","k","M","G","T","P","E","Z","Y"];const u=["","m","µ","n","p","f","a","z","y"];i.prototype.toMetric=i.prototype.toMetricString=function(e=1,t=0,r=false,i=false){if(this.special!==null){return""+this.special}if(!this.digits.length){return this.sign>0?"0":"-0"}var n="",o;if(this.exposant>0){o=1+(this.exposant-1)%3;n=l[Math.floor((this.exposant-1)/3)];if(n===undefined){return this.toScientificString()}}else{o=3- -this.exposant%3;n=u[1+Math.floor(-this.exposant/3)];if(n===undefined){return this.toScientificString()}}return this.toNoExpString(e,t,r,i,o)+n};i.prototype.precision=function(r,e=0){var t;if(this.special!==null||r>=this.digits.length){return this}if(r<0){this.digits.length=0;return this}e*=this.sign;if(e<0){t=this.digits.length>r+4&&this.digits[r]===9&&this.digits[r+1]===9&&this.digits[r+2]===9&&this.digits[r+3]===9&&this.digits[r+4]===9}else if(e>0){t=this.digits[r]>0||this.digits[r+1]>0||this.digits[r+2]>0||this.digits[r+3]>0||this.digits[r+4]>0}else{t=this.digits[r]>=5}if(t){let e=r-1,t=false;for(;e>=0;e--){if(this.digits[e]<9){this.digits[e]++;t=true;break}else{this.digits[e]=0}}if(!t){this.exposant++;this.digits[0]=1;this.digits.length=1}else{this.digits.length=e+1}}else{this.digits.length=r;this.removeTrailingZero()}return this};i.prototype.round=function(e=0,t=0){var r=this.exposant+e;return this.precision(r,t)};i.prototype.floor=function(e=0){var t=this.exposant+e;return this.precision(t,-1)};i.prototype.ceil=function(e=0){var t=this.exposant+e;return this.precision(t,1)};i.prototype.removeTrailingZero=function(){var e=this.digits.length-1;while(e>=0&&this.digits[e]===0){e--}this.digits.length=e+1};const f=3;i.prototype.groupDigits=function(e,t,r=false){var i="",n=r?0:f-e.length%f,o=0,s=e.length;for(;o{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[38;2;"+t+";"+r+";"+i+"m"};i.bgTrueColor=(t,r,i)=>{if(r===undefined&&typeof t==="string"){let e=t;if(e[0]==="#"){e=e.slice(1)}if(e.length===3){e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}t=parseInt(e.slice(0,2),16)||0;r=parseInt(e.slice(2,4),16)||0;i=parseInt(e.slice(4,6),16)||0}return"[48;2;"+t+";"+r+";"+i+"m"};const s={0:null,1:{bold:true},2:{dim:true},22:{bold:false,dim:false},3:{italic:true},23:{italic:false},4:{underline:true},24:{underline:false},5:{blink:true},25:{blink:false},7:{inverse:true},27:{inverse:false},8:{hidden:true},28:{hidden:false},9:{strike:true},29:{strike:false},30:{color:0},31:{color:1},32:{color:2},33:{color:3},34:{color:4},35:{color:5},36:{color:6},37:{color:7},39:{color:"default"},90:{color:8},91:{color:9},92:{color:10},93:{color:11},94:{color:12},95:{color:13},96:{color:14},97:{color:15},40:{bgColor:0},41:{bgColor:1},42:{bgColor:2},43:{bgColor:3},44:{bgColor:4},45:{bgColor:5},46:{bgColor:6},47:{bgColor:7},49:{bgColor:"default"},100:{bgColor:8},101:{bgColor:9},102:{bgColor:10},103:{bgColor:11},104:{bgColor:12},105:{bgColor:13},106:{bgColor:14},107:{bgColor:15}};i.parse=e=>{var t,r,i,n,o=[];for([,t,r]of e.matchAll(/\x1b\[([0-9;]+)m|(.[^\x1b]*)/g)){if(r){if(o.length){o[o.length-1].text+=r}else{o.push({text:r})}}else{t.split(";").forEach(e=>{n=s[e];if(n===undefined){return}if(!o.length||o[o.length-1].text){if(!n){i={text:""}}else{i=Object.assign({},i,n);i.text=""}o.push(i)}else{if(!n){o[o.length-1]={text:""}}else{Object.assign(i,n)}}})}}return o}},{}],3:[function(e,t,r){"use strict";var i={};t.exports=i;i.toCamelCase=function(e,o=false,s=false){if(!e||typeof e!=="string"){return""}return e.replace(/(?:^[\s_-]*|([\s_-]+))(([^\s_-]?)([^\s_-]*))/g,(e,t,r,i,n)=>{if(o){if(!t&&!s){return r}if(!i){return""}return i.toUpperCase()+n}if(!t&&!s){return r.toLowerCase()}if(!i){return""}return i.toUpperCase()+n.toLowerCase()})};i.camelCaseToSeparated=function(e,i=" "){if(!e||typeof e!=="string"){return""}return e.replace(/^([A-Z])|([A-Z])/g,(e,t,r)=>{if(t){return t.toLowerCase()}return i+r.toLowerCase()})};i.camelCaseToDash=i.camelCaseToDashed=e=>i.camelCaseToSeparated(e,"-")},{}],4:[function(e,t,r){"use strict";r.regExp=r.regExpPattern=e=>e.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1");r.regExpReplacement=e=>e.replace(/\$/g,"$$$$");r.format=e=>e.replace(/%/g,"%%");r.jsSingleQuote=e=>r.control(e).replace(/'/g,"\\'");r.jsDoubleQuote=e=>r.control(e).replace(/"/g,'\\"');r.shellArg=e=>"'"+e.replace(/'/g,"'\\''")+"'";var i={"\r":"\\r","\n":"\\n","\t":"\\t","":"\\x7f"};r.control=(e,r=false)=>e.replace(/[\x00-\x1f\x7f]/g,e=>{if(r&&(e==="\n"||e==="\t")){return e}if(i[e]!==undefined){return i[e]}var t=e.charCodeAt(0).toString(16);if(t.length%2){t="0"+t}return"\\x"+t});var n={"&":"&","<":"<",">":">",'"':""","'":"'"};r.html=e=>e.replace(/[&<>]/g,e=>n[e]);r.htmlAttr=e=>e.replace(/[&<>"]/g,e=>n[e]);r.htmlSpecialChars=e=>e.replace(/[&<>"']/g,e=>n[e]);r.unicodePercentEncode=e=>e.replace(/[\x00-\x1f\u0100-\uffff\x7f%]/g,e=>{try{return encodeURI(e)}catch(e){return""}});r.httpHeaderValue=e=>r.unicodePercentEncode(e)},{}],5:[function(O,e,B){(function(P){(function(){"use strict";const u=O("./inspect.js").inspect;const f=O("./inspect.js").inspectError;const t=O("./escape.js");const n=O("./ansi.js");const o=O("./unicode.js");const i=O("./naturalSort.js");const p=O("./StringNumber.js");B.formatMethod=function(...d){var y,e=d[0],m=1,b=d.length;if(typeof e!=="string"){if(!e){e=""}else if(typeof e.toString==="function"){e=e.toString()}else{e=""}}var k={hasMarkup:false,shift:null,markupStack:[]};if(this.markupReset&&this.startingMarkupReset){e=(typeof this.markupReset==="function"?this.markupReset(k.markupStack):this.markupReset)+e}e=e.replace(/\^\[([^\]]*)]?|\^(.)|(%%)|%([+-]?)([0-9]*)(?:\[([^\]]*)\])?([a-zA-Z])/g,(e,t,r,i,n,o,s,a)=>{var l,u,f,c,g,h,p=[];if(i){return"%"}if(t){r=t}if(r){if(this.noMarkup){return"^"+r}return S.call(this,k,e,r)}if(o){o=parseInt(o,10);if(n){if(n==="+"){o=m+o}else if(n==="-"){o=m-o}}}else{o=m}m++;if(o>=b||o<1){y=undefined}else{y=d[o]}if(w[a]){l=w[a](y,s,this);if(this.argumentSanitizer&&!w[a].noSanitize){l=this.argumentSanitizer(l)}if(s&&!w[a].noCommonModeArg){l=x(l,s)}return l}if(a==="F"){m--;if(s===undefined){return""}f=s.split(":");c=f[0];g=f[1];if(!c){return""}if(g&&(h=g.match(/%([+-]?)([0-9]*)[a-zA-Z]/g))){for(u=0;u=b||o<1){p[u]=undefined}else{p[u]=d[o]}}}if(!this||!this.fn||typeof this.fn[c]!=="function"){return""}return this.fn[c].apply(this,p)}return""});if(k.hasMarkup&&this.markupReset&&this.endingMarkupReset){e+=typeof this.markupReset==="function"?this.markupReset(k.markupStack):this.markupReset}if(this.extraArguments){for(;m1){a.push({text:""})}}else{if(s&&s.text.length){a.push(Object.assign({text:""},...u.markupStack))}else{if(s){Object.assign(s,t)}else{a.push(Object.assign({text:""},t))}}}}}return a}if(this.markupReset&&this.startingMarkupReset){l=(typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset)+l}l=l.replace(/\^\[([^\]]*)]?|\^(.)/g,(e,t,r)=>S.call(this,u,e,t||r));if(u.hasMarkup&&this.markupReset&&this.endingMarkupReset){l+=typeof this.markupReset==="function"?this.markupReset(u.markupStack):this.markupReset}return l};function S(e,t,r){var i,n,o,s,a;if(r==="^"){return"^"}if(this.shiftMarkup&&this.shiftMarkup[r]){e.shift=this.shiftMarkup[r];return""}if(r.length>1&&this.dataMarkup&&(a=r.indexOf(":"))!==-1){n=r.slice(0,a);i=this.dataMarkup[n];if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;o=r.slice(a+1);if(typeof i==="function"){s=i(e.markupStack,n,o)}else{s={[i]:o};l(e,s)}return s}if(e.shift){i=this.shiftedMarkup?.[e.shift]?.[r];e.shift=null}else{i=this.markup?.[r]}if(i===undefined){if(this.markupCatchAll===undefined){return""}i=this.markupCatchAll}e.hasMarkup=true;if(typeof i==="function"){s=i(e.markupStack,r)}else{s=i;l(e,s)}return s}function l(t,r){if(Array.isArray(r)){for(let e of r){if(e===null){t.markupStack.length=0}else{t.markupStack.push(e)}}}else{if(r===null){t.markupStack.length=0}else{t.markupStack.push(r)}}}B.stripMarkup=e=>e.replace(/\^\[[^\]]*]?|\^./g,e=>e==="^^"?"^":e==="^ "?" ":"");const r={argumentSanitizer:e=>t.control(e,true),extraArguments:true,color:false,noMarkup:false,endingMarkupReset:true,startingMarkupReset:false,markupReset:n.reset,shiftMarkup:{"#":"background"},markup:{":":n.reset," ":n.reset+" ","-":n.dim,"+":n.bold,_:n.underline,"/":n.italic,"!":n.inverse,b:n.blue,B:n.brightBlue,c:n.cyan,C:n.brightCyan,g:n.green,G:n.brightGreen,k:n.black,K:n.brightBlack,m:n.magenta,M:n.brightMagenta,r:n.red,R:n.brightRed,w:n.white,W:n.brightWhite,y:n.yellow,Y:n.brightYellow},shiftedMarkup:{background:{":":n.reset," ":n.reset+" ",b:n.bgBlue,B:n.bgBrightBlue,c:n.bgCyan,C:n.bgBrightCyan,g:n.bgGreen,G:n.bgBrightGreen,k:n.bgBlack,K:n.bgBrightBlack,m:n.bgMagenta,M:n.bgBrightMagenta,r:n.bgRed,R:n.bgBrightRed,w:n.bgWhite,W:n.bgBrightWhite,y:n.bgYellow,Y:n.bgBrightYellow}},dataMarkup:{fg:(e,t,r)=>{var i=n.fgColor[r]||n.trueColor(r);e.push(i);return i},bg:(e,t,r)=>{var i=n.bgColor[r]||n.bgTrueColor(r);e.push(i);return i}},markupCatchAll:(e,t,r)=>{var i="";if(r===undefined){if(t[0]==="#"){i=n.trueColor(t)}else if(typeof n[t]==="string"){i=n[t]}}e.push(i);return i}};r.dataMarkup.color=r.dataMarkup.c=r.dataMarkup.fgColor=r.dataMarkup.fg;r.dataMarkup.bgColor=r.dataMarkup.bg;B.createFormatter=e=>B.formatMethod.bind(Object.assign({},r,e));B.format=B.formatMethod.bind(r);B.format.default=r;B.createMarkup=e=>B.markupMethod.bind(Object.assign({},r,e));B.markup=B.markupMethod.bind(r);B.format.count=function(e,t=false){var r,i,n,o=1,s=0;if(typeof e!=="string"){return 0}var a=t?/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]/g:/%([+-]?)([0-9]*)(?:\[[^\]]*\])?[a-zA-EG-Z]|(\^\[[^\]]*]?|\^.)/g;for([,n,i,r]of e.matchAll(a)){if(r){continue}if(i){i=parseInt(i,10);if(n){if(n==="+"){i=o+i}else if(n==="-"){i=o-i}}}else{i=o}o++;if(s{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};w.r=e=>w.s(e);w.r.noSanitize=true;w.S=(e,t,r)=>{var i=e=>B.markupMethod.call(r,r.argumentSanitizer?r.argumentSanitizer(e):e);if(typeof e==="string"){return i(e)}if(e===null||e===undefined||e===true||e===false){return"("+e+")"}if(typeof e==="number"){return""+e}if(typeof e.toString==="function"){return i(e.toString())}return i("("+e+")")};w.S.noSanitize=true;w.S.noCommonModeArg=true;w.N=(e,t)=>{if(typeof e==="string"){return e}if(e===null||e===undefined||e===true||e===false){return""+e}if(typeof e==="number"){return w.f(e,".3g ")}if(Array.isArray(e)){e=e.map(e=>w.N(e,true));if(t){return"["+e.join(",")+"]"}return e.join(", ")}if(P.isBuffer(e)){e=[...e].map(e=>{e=e.toString(16);if(e.length===1){e="0"+e}return e});return"<"+e.join(" ")+">"}var r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype){e=Object.entries(e).sort(i).map(e=>e[0]+": "+w.N(e[1],true));if(t){return"{"+e.join(", ")+"}"}return e.join(", ")}if(typeof e.inspect==="function"){return e.inspect()}if(typeof e.toString==="function"){return e.toString()}return"("+e+")"};w.n=e=>w.N(e,true);w.f=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};w.f.noSanitize=true;w.P=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e*=100;var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)+"%"};w.P.noSanitize=true;w.p=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}e=(e-1)*100;var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null||!r.precision){i.round(r.rounding||0)}if(r.precision){i.precision(r.precision)}return i.toNoExpString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal,true)+"%"};w.p.noSanitize=true;w.k=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"0"}var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision||r.rounding===null){i.precision(r.precision||3)}return i.toMetricString(r.leftPadding,r.rightPadding,r.rightPaddingOnlyIfDecimal)};w.k.noSanitize=true;w.e=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toExponential()};w.e.noSanitize=true;w.K=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){e=0}var r=m(t),i=new p(e,".",r.groupSeparator);if(r.rounding!==null){i.round(r.rounding)}if(r.precision){i.precision(r.precision)}return i.toScientific()};w.K.noSanitize=true;w.d=w.i=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.floor(e)}return"0"};w.i.noSanitize=true;w.u=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0)}return"0"};w.u.noSanitize=true;w.U=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),1)}return"1"};w.U.noSanitize=true;w.m=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var t="";if(e<0){t="-";e=-e}var r=j(e),i=e-r;if(!i){return t+r+"°"}var n=j(i*60),o=j(i*3600-n*60);if(o){return t+r+"°"+(""+n).padStart(2,"0")+"′"+(""+o).padStart(2,"0")+"″"}return t+r+"°"+(""+n).padStart(2,"0")+"′"};w.m.noSanitize=true;w.t=(e,t)=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"(NaN)"}var r,i,n,o,s,a="",l=k(t),u=l.roundingType,f=l.useAbbreviation?"h":":",c=l.useAbbreviation?"min":":",g=l.useAbbreviation?"s":".",h=l.useAbbreviation;n=e/1e3;if(n<0){n=-n;u*=-1;a="-"}if(n<60&&!l.forceMinutes){o=new p(n,g,undefined,h);o.round(l.rounding,u);if(o.toNumber()<60){s=o.toString(1,l.rightPadding,l.rightPaddingOnlyIfDecimal);return a+s}n=60}i=Math.floor(n/60);n=n%60;o=new p(n,g,undefined,h);o.round(l.rounding,u);if(o.toNumber()<60){s=o.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}else{i++;n=0;o.set(n);s=o.toString(2,l.rightPadding,l.rightPaddingOnlyIfDecimal)}if(i<60&&!l.forceHours){return a+i+c+s}r=Math.floor(i/60);i=i%60;return a+r+f+(""+i).padStart(2,"0")+c+s};w.t.noSanitize=true;w.h=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(16)}return"0"};w.h.noSanitize=true;w.x=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e!=="number"){return"00"}var t=""+Math.max(Math.floor(e),0).toString(16);if(t.length%2){t="0"+t}return t};w.x.noSanitize=true;w.o=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(8)}return"0"};w.o.noSanitize=true;w.b=e=>{if(typeof e==="string"){e=parseFloat(e)}if(typeof e==="number"){return""+Math.max(Math.floor(e),0).toString(2)}return"0"};w.b.noSanitize=true;w.X=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("hex")};w.X.noSanitize=true;w.z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64")};w.Z=e=>{if(typeof e==="string"){e=P.from(e)}else if(!P.isBuffer(e)){return""}return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]{1,2}$/g,"")};const s={};w.I=(e,t,r)=>C(e,t,r,s);w.I.noSanitize=true;const a={noFunc:true,enumOnly:true,noDescriptor:true,useInspect:true,useInspectPropertyBlackList:true};w.Y=(e,t,r)=>C(e,t,r,a);w.Y.noSanitize=true;const c={minimal:true,noIndex:true};w.O=(e,t,r)=>C(e,t,r,c);w.O.noSanitize=true;const g={};w.E=(e,t,r)=>C(e,t,r,g,true);w.E.noSanitize=true;w.J=e=>e===undefined?"null":JSON.stringify(e);w.D=()=>"";w.D.noSanitize=true;const h=/([a-zA-Z])(.[^a-zA-Z]*)/g;const d=/([a-zA-Z]|^)([^a-zA-Z]*)/g;function x(r,i){for(let[,e,t]of i.matchAll(h)){if(e==="L"){let e=o.width(r);t=+t||1;if(e>t){r=o.truncateWidth(r,t-1).trim()+"…";e=o.width(r)}if(et){r=o.truncateWidth(r,t-1).trim()+"…";e=o.width(r)}if(e{if(e===t){return 1}if(e.length===0||t.length===0){return 0}return Math.max(0,1-x.levenshtein(e,t)/t.length)};const C=0;const A=.88;const w=.9;x.bestMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n,o,s,a,l=-1,u=null;for(n=0,o=t.length;ni){i=s;u=a;l=n}}return r.indexOf?l:u};x.topMatch=(r,e,t={})=>{var i=t.scoreLimit||C,n=t.deltaRate||w,o,s,a;a=e.map((e,t)=>({pattern:e,index:t,score:x.score(r,e)}));a.sort((e,t)=>t.score-e.score);if(a[0].score<=i){return[]}i=Math.max(i,a[0].score*n);for(o=1,s=a.length;oe.index):a.map(e=>e.pattern)};const i=new Set(["a","an","the","this","that","those","some","of","in","on","at","my","your","her","his","its","our","their"]);function M(e,t=i){return e.split(/[ '"/|,:_-]+/g).filter(e=>e&&!t.has(e))}x.bestTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||A,o,s,a,l,u,f,c,g,h,p,d=i,y,m,b=M(e),k,S=-1,w=null;if(!b.length||!t.length){return r.indexOf?S:w}for(o=0,s=t.length;ok){k=m;if(m===1){break}}}p+=k}p/=b.length;if(b.length!==g.length){p*=n**Math.abs(g.length-b.length)}if(p>d){d=p;w=c;S=o}}return r.indexOf?S:w};x.topTokenMatch=(e,t,r={})=>{var i=r.scoreLimit||C,n=r.tokenDisparityPenalty||A,o=r.deltaRate||w,s,a,l,u,f,c,g,h,p,d,y,m,b=M(e),k,S=[];if(!b.length||!t.length){return[]}for(s=0,a=t.length;sk){k=m;if(m===1){break}}}d+=k}d/=b.length;if(b.length!==h.length){d*=n**Math.abs(h.length-b.length)}S.push({pattern:g,index:s,score:d})}S.sort((e,t)=>t.score-e.score);if(S[0].score<=i){return[]}i=Math.max(i,S[0].score*o);for(s=1,a=S.length;se.index):S.map(e=>e.pattern)};const c=[];const g=[];x.levenshtein=(t,r)=>{if(t===r){return 0}if(t.length>r.length){let e=t;t=r;r=e}let e=t.length;let i=r.length;while(e>0&&t.charCodeAt(e-1)===r.charCodeAt(i-1)){e--;i--}let n=0;while(ns?l>s?s+1:l:l>a?a+1:l}}return s}},{}],7:[function(t,e,r){(function(P,c){(function(){"use strict";const x=t("./escape.js");const n=t("./ansi.js");const C={};const A=new Set([Object,Array]);function s(e,t){if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}var r={depth:0,ancestors:[]};if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(e.depth===undefined){e.depth=3}if(e.maxLength===undefined){e.maxLength=250}if(e.outputMaxLength===undefined){e.outputMaxLength=5e3}if(e.nofunc){e.noFunc=true}if(e.minimal){e.noFunc=true;e.noDescriptor=true;e.noType=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}if(e.minimalPlusConstructor){e.noFunc=true;e.noDescriptor=true;e.noTypeButConstructor=true;e.noArrayProperty=true;e.enumOnly=true;e.proto=false;e.funcDetails=false}var i=M(r,e,t);if(i.length>e.outputMaxLength){i=e.style.truncate(i,e.outputMaxLength)}return i}r.inspect=s;function M(t,r,e){var i,n,o,s,a,l,u,f,c,g,h,p,d,y,m="",b="",k="",S,w;c=typeof e;h=(r.tab??r.style.tab).repeat(t.depth);if(c==="function"&&r.noFunc){return""}if(t.key!==undefined){if(t.descriptor){k=[];if(!t.descriptor.configurable){k.push("-conf")}if(!t.descriptor.enumerable){k.push("-enum")}if(!t.descriptor.writable){k.push("-w")}if(k.length){k=k.join(" ")}else{k=""}}if(t.keyIsProperty){if(v(t.key)){b='"'+r.style.key(t.key)+'": '}else{b=r.style.key(t.key)+": "}}else if(!r.noIndex){b=r.style.index(t.key)}if(k){k=" "+r.style.type(k)}}g=t.noPre?"":h+b;if(e===undefined){m+=g+r.style.constant("undefined")+k+r.style.newline}else if(e===C){m+=g+r.style.constant("[empty]")+k+r.style.newline}else if(e===null){m+=g+r.style.constant("null")+k+r.style.newline}else if(e===false){m+=g+r.style.constant("false")+k+r.style.newline}else if(e===true){m+=g+r.style.constant("true")+k+r.style.newline}else if(c==="number"){m+=g+r.style.number(e.toString())+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("number"))+k+r.style.newline}else if(c==="string"){if(e.length>r.maxLength){m+=g+'"'+r.style.string(x.control(e.slice(0,r.maxLength-1)))+'…"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+" - TRUNCATED)"))+k+r.style.newline}else{m+=g+'"'+r.style.string(x.control(e))+'"'+(r.noType||r.noTypeButConstructor?"":" "+r.style.type("string")+r.style.length("("+e.length+")"))+k+r.style.newline}}else if(P.isBuffer(e)){m+=g+r.style.inspect(e.inspect())+(r.noType?"":" "+r.style.type("Buffer")+r.style.length("("+e.length+")"))+k+r.style.newline}else if(c==="object"||c==="function"){n=o="";d=false;if(c==="function"){d=true;n=" "+r.style.funcName(e.name?e.name:"(anonymous)");o=r.style.length("("+e.length+")")}p=false;if(Array.isArray(e)){p=true;o=r.style.length("("+e.length+")")}if(!e.constructor){u="(no constructor)"}else if(!e.constructor.name){u="(anonymous)"}else{u=e.constructor.name}l=!e.constructor||A.has(e.constructor);u=r.style.constructorName(u);s=Object.getPrototypeOf(e);m+=g;if(!r.noType&&(!r.noTypeButConstructor||!l)){if(t.forceType&&!r.noType&&!r.noTypeButConstructor){m+=r.style.type(t.forceType)}else if(r.noTypeButConstructor){m+=u}else{m+=u+n+o+" "+r.style.type(c)+k}if(!d||r.funcDetails){m+=" "}}if(p&&r.noArrayProperty){a=[...Array(e.length).keys()]}else{a=Object.getOwnPropertyNames(e)}if(r.sort){a.sort()}y=j(e,t,r);if(r.protoBlackList&&r.protoBlackList.has(s)){m+=r.style.limit("[skip]")+r.style.newline}else if(y!==undefined){if(typeof y==="string"){m+="=> "+y+r.style.newline}else{m+="=> "+M({depth:t.depth,ancestors:t.ancestors,noPre:true},r,y)}}else if(d&&!r.funcDetails){m+=r.style.newline}else if(!a.length&&!r.proto){m+=(p?"[]":"{}")+r.style.newline}else if(t.depth>=r.depth){m+=r.style.limit("[depth limit]")+r.style.newline}else if(t.ancestors.indexOf(e)!==-1){m+=r.style.limit("[circular]")+r.style.newline}else{m+=(p?"[":"{")+r.style.newline;w=t.ancestors.slice();w.push(e);for(i=0;i";if(t==="fulfilled"){r+=" "+M({depth:n.depth,ancestors:n.ancestors,noPre:true},o,e[1])}else if(t==="rejected"){if(e[1]instanceof Error){r+=" "+l({style:o.style,noErrorStack:true},e[1])}else{r+=" "+M({depth:n.depth,ancestors:n.ancestors,noPre:true},o,e[1])}}return r}}if(i._bsontype){return i.toString()}if(o.useInspect&&typeof i.inspect==="function"){return i.inspect()}return}function l(e,t){var r="",i,n,o;if(arguments.length<2){t=e;e={}}else if(!e||typeof e!=="object"){e={}}if(!(t instanceof Error)){return"inspectError(): it's not an error, using regular variable inspection: "+s(e,t)}if(!e.style){e.style=f.none}else if(typeof e.style==="string"){e.style=f[e.style]}if(t.stack&&!e.noErrorStack){i=u(e,t.stack)}n=t.type||t.constructor.name;o=t.code||t.name||t.errno||t.number;r+=e.style.errorType(n)+(o?" ["+e.style.errorType(o)+"]":"")+": ";r+=e.style.errorMessage(t.message)+"\n";if(i){r+=e.style.errorStack(i)+"\n"}if(t.from){r+=e.style.newline+e.style.errorFromMessage("From error:")+e.style.newline+l(e,t.from)}return r}r.inspectError=l;function u(l,e){if(arguments.length<2){e=l;l={}}else if(!l||typeof l!=="object"){l={}}if(!l.style){l.style=f.none}else if(typeof l.style==="string"){l.style=f[l.style]}if(!e){return}if((l.browser||c.browser)&&e.indexOf("@")!==-1){e=e.replace(/[{return l.style.errorStack(" at ")+(t?l.style.errorStackMethod(t)+" ":"")+l.style.errorStack("(")+(r?l.style.errorStackFile(r):l.style.errorStack("unknown"))+(i?l.style.errorStack(":")+l.style.errorStackLine(i):"")+(n?l.style.errorStack(":")+l.style.errorStackColumn(n):"")+l.style.errorStack(")")})}else{e=e.replace(/^[^\n]*\n/,"");e=e.replace(/^\s*(at)\s+(?:(?:(async|new)\s+)?([^\s:()[\]\n]+(?:\([^)]+\))?)\s)?(?:\[as ([^\s:()[\]\n]+)\]\s)?(?:\(?([^:()[\]\n]+):([0-9]+):([0-9]+)\)?)?$/gm,(e,t,r,i,n,o,s,a)=>{return l.style.errorStack(" at ")+(r?l.style.errorStackKeyword(r)+" ":"")+(i?l.style.errorStackMethod(i)+" ":"")+(n?l.style.errorStack("[as ")+l.style.errorStackMethodAs(n)+l.style.errorStack("] "):"")+l.style.errorStack("(")+(o?l.style.errorStackFile(o):l.style.errorStack("unknown"))+(s?l.style.errorStack(":")+l.style.errorStackLine(s):"")+(a?l.style.errorStack(":")+l.style.errorStackColumn(a):"")+l.style.errorStack(")")})}return e}r.inspectStack=u;var f={};var e=e=>e;f.none={trim:false,tab:" ",newline:"\n",comma:"",limit:e,type:e=>"<"+e+">",constant:e,funcName:e,constructorName:e=>"<"+e+">",length:e,key:e,index:e=>"["+e+"] ",number:e,inspect:e,string:e,errorType:e,errorMessage:e,errorStack:e,errorStackKeyword:e,errorStackMethod:e,errorStackMethodAs:e,errorStackFile:e,errorStackLine:e,errorStackColumn:e,errorFromMessage:e,truncate:(e,t)=>e.slice(0,t-1)+"…"};f.inline=Object.assign({},f.none,{trim:true,tab:"",newline:" ",comma:", ",length:()=>"",index:()=>""});f.color=Object.assign({},f.none,{limit:e=>n.bold+n.brightRed+e+n.reset,type:e=>n.italic+n.brightBlack+e+n.reset,constant:e=>n.cyan+e+n.reset,funcName:e=>n.italic+n.magenta+e+n.reset,constructorName:e=>n.magenta+e+n.reset,length:e=>n.italic+n.brightBlack+e+n.reset,key:e=>n.green+e+n.reset,index:e=>n.blue+"["+e+"]"+n.reset+" ",number:e=>n.cyan+e+n.reset,inspect:e=>n.cyan+e+n.reset,string:e=>n.blue+e+n.reset,errorType:e=>n.red+n.bold+e+n.reset,errorMessage:e=>n.red+n.italic+e+n.reset,errorStack:e=>n.brightBlack+e+n.reset,errorStackKeyword:e=>n.italic+n.bold+e+n.reset,errorStackMethod:e=>n.brightYellow+e+n.reset,errorStackMethodAs:e=>n.yellow+e+n.reset,errorStackFile:e=>n.brightCyan+e+n.reset,errorStackLine:e=>n.blue+e+n.reset,errorStackColumn:e=>n.magenta+e+n.reset,errorFromMessage:e=>n.yellow+n.underline+e+n.reset,truncate:(e,t)=>{var r=n.gray+"…"+n.reset;e=e.slice(0,t-r.length);var i=e.lastIndexOf("");if(i>=e.length-6){e=e.slice(0,i)}return e+r}});f.html=Object.assign({},f.none,{tab:"    ",newline:"
",limit:e=>''+e+"",type:e=>''+e+"",constant:e=>''+e+"",funcName:e=>''+e+"",constructorName:e=>''+e+"",length:e=>''+e+"",key:e=>''+e+"",index:e=>'['+e+"] ",number:e=>''+e+"",inspect:e=>''+e+"",string:e=>''+e+"",errorType:e=>''+e+"",errorMessage:e=>''+e+"",errorStack:e=>''+e+"",errorStackKeyword:e=>""+e+"",errorStackMethod:e=>''+e+"",errorStackMethodAs:e=>''+e+"",errorStackFile:e=>''+e+"",errorStackLine:e=>''+e+"",errorStackColumn:e=>''+e+"",errorFromMessage:e=>''+e+""})}).call(this)}).call(this,{isBuffer:t("../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js")},t("_process"))},{"../../../../../../opt/node-v14.15.4/lib/node_modules/browserify/node_modules/is-buffer/index.js":18,"./ansi.js":2,"./escape.js":4,_process:19}],8:[function(e,t,r){t.exports={"߀":"0","́":""," ":" ","Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ɓ":"B","c":"C","Ⓒ":"C","C":"C","Ꜿ":"C","Ḉ":"C","Ç":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ɗ":"D","Ɖ":"D","ᴅ":"D","Ꝺ":"D","Ð":"Dh","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","ɛ":"E","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","ᴇ":"E","ꝼ":"F","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","ɢ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","ȷ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","ϻ":"M","Ꞥ":"N","Ƞ":"N","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ɲ":"N","Ꞑ":"N","ᴎ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Þ":"Th","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ɑ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","Ƃ":"b","ⓒ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c",C:"c","Ć":"c","Ĉ":"c","Ċ":"c","Č":"c","Ƈ":"c","Ȼ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","Ƌ":"d","Ꮷ":"d","ԁ":"d","Ɦ":"d","ð":"dh","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ff":"ff","fi":"fi","fl":"fl","ffi":"ffi","ffl":"ffl","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ꝿ":"g","ᵹ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ɭ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","ԉ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ɔ":"o","ᴑ":"o","œ":"oe","ƣ":"oi","ꝏ":"oo","ȣ":"ou","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ρ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ʂ":"s","ß":"ss","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","þ":"th","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"}},{}],9:[function(e,t,r){"use strict";var i=e("./latinize-map.json");t.exports=function(e){return e.replace(/[^\u0000-\u007e]/g,e=>{return i[e]||e})}},{"./latinize-map.json":8}],10:[function(e,t,r){"use strict";r.resize=function(e,t){if(e.length===t){return e}else if(e.length>t){return e.slice(0,t)}return e+" ".repeat(t-e.length)};r.occurrenceCount=function(e,t,r=false){if(!e||!t){return 0}var i=0,n=0,o=r?1:t.length;while((n=e.indexOf(t,n))!==-1){i++;n+=o}return i}},{}],11:[function(e,t,r){"use strict";const w=1;const x=2;const C=3;const A=4;const M=5;function v(e,t){if(j(t)){return x}if(t<=31||t===127){return w}if(P(t)){return A}if(e.toUpperCase()!==e.toLowerCase()){return C}return M}function j(e){if(e===32||e===9||e===160||e===45||e===95){return true}return false}function P(e){if(e>=48&&e<=57){return true}return false}function i(e,t){e=""+e;t=""+t;var r,i,n,o,s,a,l,u=e.trim(),f=u.length,c,g,h,p,d,y,m,b=t.trim(),k=b.length,S=0;for(r=c=0;ry?1:-1}if(!S&&n!==h){S=n!==a?-1:1}break;case A:i=r+1;while(P(u.charCodeAt(i))){i++}l=parseFloat(u.slice(r,i));g=c+1;while(P(b.charCodeAt(g))){g++}m=parseFloat(b.slice(c,g));if(l!==m){return l-m}if(!S&&i-r!==g-c){S=i-r-(g-c)}r=i-1;c=g-1;break}}if(S){return S}return f-r-(k-c)||f-k||e.length-t.length}t.exports=i},{}],12:[function(e,t,r){"use strict";var n=e("./escape.js");r.regexp={};r.regexp.array2alternatives=function e(t){var r,i=t.slice();i.sort((e,t)=>{return t.length-e.length});for(r=0;r{if(!r||typeof r!=="string"){return""}var t=e.dashToSpace??a.dashToSpace,i=e.underscoreToSpace??a.underscoreToSpace,n=e.zealous??a.zealous,o=e.preserveAllCaps??a.preserveAllCaps,s=e.lowerCaseWords??a.lowerCaseWords;s=s instanceof Set?s:Array.isArray(s)?new Set(s):null;if(t){r=r.replace(/-+/g," ")}if(i){r=r.replace(/_+/g," ")}r=r.replace(/ +/g," ").trim();return r.replace(/[^\s_-]+/g,(t,e)=>{if(s&&e&&e+t.lengthString.fromCodePoint(...e);f.decode=e=>Array.from(e,e=>e.codePointAt(0));f.firstCodePoint=e=>e.codePointAt(0);f.firstChar=e=>e.length?String.fromCodePoint(e.codePointAt(0)):undefined;f.toArray=e=>Array.from(e);f.toCells=(e,t,r=4,i=0,...n)=>{var o,s,a,l,u=[];for(o of t){s=o.codePointAt(0);if(s===10){i=0}else if(s===9){a=r-i%r-1;u.push(new e("\t",1,...n));i+=1+a;while(a--){u.push(new e(" ",-2,...n))}}else{l=f.codePointWidth(s),u.push(new e(o,l,...n));i+=l;while(--l>0){u.push(new e(" ",-1,...n))}}}return u};f.fromCells=e=>{var t,r="";for(t of e){if(!t.filler){r+=t.char}}return r};f.length=e=>{var t,r=0;for(t of e){r++}return r};f.width=e=>{var t,r=0;for(t of e){r+=f.codePointWidth(t.codePointAt(0))}return r};f.arrayWidth=(e,t)=>{var r,i=0;if(t===undefined){t=e.length}for(r=0;ro;f.widthLimit=f.truncateWidth=(e,t)=>{var r,i,n=0;o=0;for(r of e){i=f.codePointWidth(r.codePointAt(0));if(o+i>t){return e.slice(0,n)}o+=i;n+=r.length}return e};f.surrogatePair=e=>{var t=e.charCodeAt(0);if(t<55296||t>=57344){return 0}else if(t<56320){return 1}return-1};f.isFullWidth=e=>f.isFullWidthCodePoint(e.codePointAt(0));f.charWidth=e=>f.codePointWidth(e.codePointAt(0));f.codePointWidth=e=>{if(f.isEmojiCodePoint(e)){return 2}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return 2}return 1};f.isFullWidthCodePoint=e=>f.codePointWidth(e)===2;f.toFullWidth=e=>{return String.fromCodePoint(...Array.from(e,e=>{var t=e.codePointAt(0);return t>=33&&t<=126?65280+t-32:t}))};f.isZeroWidthDiacritic=e=>f.isZeroWidthDiacriticCodePoint(e.codePointAt(0));f.isZeroWidthDiacriticCodePoint=e=>768<=e&&e<=879||6832<=e&&e<=6911||7616<=e&&e<=7679||8400<=e&&e<=8447||65056<=e&&e<=65071||e===12441||e===12442||2304<=e&&e<=2307||2362<=e&&e<=2391&&e!==2365&&e!==2384||e===2402||e===2403||e===3633||3636<=e&&e<=3642||3655<=e&&e<=3662;f.isEmoji=e=>f.isEmojiCodePoint(e.codePointAt(0));f.isEmojiCodePoint=e=>9728<=e&&e<=9983||9984<=e&&e<=10175||126976<=e&&e<=127487||127744<=e&&e<=127994||128e3<=e&&e<=129791;f.isEmojiModifier=e=>f.isEmojiModifierCodePoint(e.codePointAt(0));f.isEmojiModifierCodePoint=e=>127995<=e&&e<=127999},{}],16:[function(e,t,r){"use strict";const S=e("./unicode.js");const w={"!":true,"?":true,":":true,";":true};t.exports=function e(t,r){var i=0,n,o,s,a,l,u,f,c,g,h,p=true,d=S.toArray(t),y=false,m,b=[];if(typeof r!=="object"){r={width:r}}if(!r.width||typeof r.width!=="number"||r.width<=0){r.width=80}s=r.offset?r.width-r.offset:r.width;if(typeof r.glue!=="string"){r.glue="\n"}if(r.regroupFn){d=r.regroupFn(d);h=r.charWidthFn||S.width}else{h=r.charWidthFn||S.charWidth}u=d.length;var k=()=>{if(!p||y){while(d[i]===" "){i++}if(y&&d[i]==="\n"){p=true;i++}}if(i>=u){return null}p=false;y=false;g=false;n=f=i;l=c=0;for(;;){if(n>=u){return d.slice(i,n).join("")}if(d[n]==="\n"){p=true;a=d.slice(i,n++).join("");if(r.fill){a+=" ".repeat(s-l)}return a}if(r.skipFn){o=r.skipFn(d,n);if(o!==n){n=o;continue}}if(d[n]===" "&&!g&&!w[d[n+1]]){f=n;c=l}else{g=false}l+=h(d[n]);if(l>s){y=true;if(f!==i){n=f}else if(st===b.length-1?e:e.trimRight())}if(!r.noJoin){b=b.join(r.glue)}if(r.updateOffset){r.offset=l}return b}},{"./unicode.js":15}],17:[function(e,t,r){},{}],18:[function(e,t,r){t.exports=function(e){return e!=null&&(i(e)||n(e)||!!e._isBuffer)};function i(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function n(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&i(e.slice(0,0))}},{}],19:[function(e,t,r){var i=t.exports={};var n;var o;function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=s}}catch(e){n=s}try{if(typeof clearTimeout==="function"){o=clearTimeout}else{o=a}}catch(e){o=a}})();function l(t){if(n===setTimeout){return setTimeout(t,0)}if((n===s||!n)&&setTimeout){n=setTimeout;return setTimeout(t,0)}try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}function u(t){if(o===clearTimeout){return clearTimeout(t)}if((o===a||!o)&&clearTimeout){o=clearTimeout;return clearTimeout(t)}try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}var f=[];var c=false;var g;var h=-1;function p(){if(!c||!g){return}c=false;if(g.length){f=g.concat(f)}else{h=-1}if(f.length){d()}}function d(){if(c){return}var e=l(p);c=true;var t=f.length;while(t){g=f;f=[];while(++h1){for(var r=1;r0) %P number to (absolute) percent (e.g.: 0.75 -> 75%) %p number to relative percent (e.g.: 1.25 -> +25% ; 0.75 -> -25%) - %t time duration, convert ms into h min s, e.g.: 2h14min52s - %T time duration, convert ms into H:min:s, e.g.: 2:14:52 + %t time duration, convert ms into h min s, e.g.: 2h14min52s or 2:14:52 %m convert degree into degree, minutes and seconds %h hexadecimal (input is a number) %x hexadecimal (input is a number), force pair of symbols (e.g. 'f' -> '0f') @@ -803,7 +802,7 @@ modes.m.noSanitize = true ; // time duration, transform ms into H:min:s // Later it should format Date as well: number=duration, date object=date // Note that it would not replace moment.js, but it could uses it. -modes.t = ( arg , modeArg , useLetters = true ) => { +modes.t = ( arg , modeArg ) => { if ( typeof arg === 'string' ) { arg = parseFloat( arg ) ; } if ( typeof arg !== 'number' ) { return '(NaN)' ; } @@ -811,10 +810,10 @@ modes.t = ( arg , modeArg , useLetters = true ) => { sign = '' , subModes = timeModeArg( modeArg ) , roundingType = subModes.roundingType , - hSeparator = useLetters ? 'h' : ':' , - minSeparator = useLetters ? 'min' : ':' , - sSeparator = useLetters ? 's' : '.' , - forceDecimalSeparator = useLetters ; + hSeparator = subModes.useAbbreviation ? 'h' : ':' , + minSeparator = subModes.useAbbreviation ? 'min' : ':' , + sSeparator = subModes.useAbbreviation ? 's' : '.' , + forceDecimalSeparator = subModes.useAbbreviation ; s = arg / 1000 ; @@ -867,9 +866,6 @@ modes.t = ( arg , modeArg , useLetters = true ) => { modes.t.noSanitize = true ; -modes.T = ( arg , modeArg ) => modes.t( arg , modeArg , false ) ; -modes.T.noSanitize = true ; - // unsigned hexadecimal @@ -1002,20 +998,14 @@ modes.D.noSanitize = true ; const COMMON_MODE_ARG_FORMAT_REGEX = /([a-zA-Z])(.[^a-zA-Z]*)/g ; // The format for specific mode arg -const MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)(.[^a-zA-Z]*)/g ; +const MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)([^a-zA-Z]*)/g ; // Called when there is a modeArg and the mode allow common mode arg // CONVENTION: reserve upper-cased letters for common mode arg function commonModeArg( str , modeArg ) { - var match , k , v ; - - COMMON_MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = COMMON_MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( COMMON_MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'L' ) { let width = unicode.width( str ) ; v = + v || 1 ; @@ -1056,8 +1046,6 @@ const FLOAT_MODES = { // Generic number modes function floatModeArg( modeArg ) { - var match , k , v , lv ; - FLOAT_MODES.leftPadding = 1 ; FLOAT_MODES.rightPadding = 0 ; FLOAT_MODES.rightPaddingOnlyIfDecimal = false ; @@ -1066,11 +1054,7 @@ function floatModeArg( modeArg ) { FLOAT_MODES.groupSeparator = '' ; if ( modeArg ) { - MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'z' ) { // Zero-left padding FLOAT_MODES.leftPadding = + v ; @@ -1080,13 +1064,9 @@ function floatModeArg( modeArg ) { FLOAT_MODES.groupSeparator = v || ' ' ; } else if ( ! k ) { - if ( v === 'g' ) { - // Group separator - FLOAT_MODES.groupSeparator = ' ' ; - } - else if ( v[ 0 ] === '.' ) { + if ( v[ 0 ] === '.' ) { // Rounding after the decimal - lv = v[ v.length - 1 ] ; + let lv = v[ v.length - 1 ] ; // Zero-right padding? if ( lv === '!' ) { @@ -1118,6 +1098,7 @@ function floatModeArg( modeArg ) { const TIME_MODES = { + useAbbreviation: false , rightPadding: 0 , rightPaddingOnlyIfDecimal: false , rounding: 0 , @@ -1126,24 +1107,16 @@ const TIME_MODES = { forceMinutes: false } ; -const TIME_MODE_ARG_FORMAT_REGEX = /([a-zA-Z]|^)([^a-zA-Z]*)/g ; - // Generic number modes function timeModeArg( modeArg ) { - var match , k , v , lv ; - TIME_MODES.rightPadding = 0 ; TIME_MODES.rightPaddingOnlyIfDecimal = false ; TIME_MODES.rounding = 0 ; TIME_MODES.roundingType = -1 ; - TIME_MODES.forceHours = TIME_MODES.forceMinutes = false ; + TIME_MODES.useAbbreviation = TIME_MODES.forceHours = TIME_MODES.forceMinutes = false ; if ( modeArg ) { - TIME_MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = TIME_MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'h' ) { TIME_MODES.forceHours = TIME_MODES.forceMinutes = true ; } @@ -1159,10 +1132,13 @@ function timeModeArg( modeArg ) { else if ( k === 'c' ) { TIME_MODES.roundingType = 1 ; } + else if ( k === 'a' ) { + TIME_MODES.useAbbreviation = true ; + } else if ( ! k ) { if ( v[ 0 ] === '.' ) { // Rounding after the decimal - lv = v[ v.length - 1 ] ; + let lv = v[ v.length - 1 ] ; // Zero-right padding? if ( lv === '!' ) { @@ -1187,18 +1163,13 @@ function timeModeArg( modeArg ) { // Generic inspect function genericInspectMode( arg , modeArg , options , modeOptions , isInspectError = false ) { - var match , k , v , - outputMaxLength , + var outputMaxLength , maxLength , depth = 3 , style = options && options.color ? 'color' : 'none' ; if ( modeArg ) { - MODE_ARG_FORMAT_REGEX.lastIndex = 0 ; - - while ( ( match = MODE_ARG_FORMAT_REGEX.exec( modeArg ) ) ) { - [ , k , v ] = match ; - + for ( let [ , k , v ] of modeArg.matchAll( MODE_ARG_FORMAT_REGEX ) ) { if ( k === 'c' ) { if ( v === '+' ) { style = 'color' ; } else if ( v === '-' ) { style = 'none' ; } diff --git a/package.json b/package.json index 515347e..3b8bf1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "string-kit", - "version": "0.16.6", + "version": "0.17.0", "engines": { "node": ">=14.15.0" }, diff --git a/test/string-test.js b/test/string-test.js index a44c493..6152b1d 100644 --- a/test/string-test.js +++ b/test/string-test.js @@ -360,66 +360,66 @@ describe( "format()" , () => { } ) ; it( "%t should format time duration" , () => { - expect( format( '%t' , 1000 ) ).to.be( '1s' ) ; - expect( format( '%t' , 1234 ) ).to.be( '1s' ) ; - expect( format( '%t' , 60000 ) ).to.be( '1min00s' ) ; - expect( format( '%t' , 123456 ) ).to.be( '2min03s' ) ; - expect( format( '%t' , 3600000 ) ).to.be( '1h00min00s' ) ; - expect( format( '%t' , 3599999 ) ).to.be( '59min59s' ) ; - expect( format( '%t' , 7890000 ) ).to.be( '2h11min30s' ) ; + expect( format( '%t' , 1000 ) ).to.be( '1' ) ; + expect( format( '%t' , 1234 ) ).to.be( '1' ) ; + expect( format( '%[m]t' , 1234 ) ).to.be( '0:01' ) ; + expect( format( '%[.1m]t' , 1234 ) ).to.be( '0:01.2' ) ; + expect( format( '%[.2m]t' , 1234 ) ).to.be( '0:01.23' ) ; + expect( format( '%[.3m]t' , 1234 ) ).to.be( '0:01.234' ) ; + expect( format( '%[.3m]t' , 1200 ) ).to.be( '0:01.2' ) ; + expect( format( '%[.3!m]t' , 1200 ) ).to.be( '0:01.200' ) ; + expect( format( '%t' , 60000 ) ).to.be( '1:00' ) ; + expect( format( '%t' , 123456 ) ).to.be( '2:03' ) ; + expect( format( '%t' , 3600000 ) ).to.be( '1:00:00' ) ; + expect( format( '%t' , 3599999 ) ).to.be( '59:59' ) ; + expect( format( '%t' , 7890000 ) ).to.be( '2:11:30' ) ; + + expect( format( '%[c]t' , 120000 ) ).to.be( '2:00' ) ; + expect( format( '%[c]t' , 119900 ) ).to.be( '2:00' ) ; + + expect( format( '%t' , -120000 ) ).to.be( '-2:00' ) ; + expect( format( '%t' , -119900 ) ).to.be( '-2:00' ) ; + + // With abbreviations + + expect( format( '%[a]t' , 1000 ) ).to.be( '1s' ) ; + expect( format( '%[a]t' , 1234 ) ).to.be( '1s' ) ; + expect( format( '%[a]t' , 60000 ) ).to.be( '1min00s' ) ; + expect( format( '%[a]t' , 123456 ) ).to.be( '2min03s' ) ; + expect( format( '%[a]t' , 3600000 ) ).to.be( '1h00min00s' ) ; + expect( format( '%[a]t' , 3599999 ) ).to.be( '59min59s' ) ; + expect( format( '%[a]t' , 7890000 ) ).to.be( '2h11min30s' ) ; // Rounding - expect( format( '%t' , 56789 ) ).to.be( '56s' ) ; - expect( format( '%[r]t' , 56789 ) ).to.be( '57s' ) ; - expect( format( '%[f]t' , 56789 ) ).to.be( '56s' ) ; - expect( format( '%[c]t' , 56789 ) ).to.be( '57s' ) ; - - expect( format( '%t' , 56389 ) ).to.be( '56s' ) ; - expect( format( '%[r]t' , 56389 ) ).to.be( '56s' ) ; - expect( format( '%[f]t' , 56389 ) ).to.be( '56s' ) ; - expect( format( '%[c]t' , 56389 ) ).to.be( '57s' ) ; - - expect( format( '%t' , 56000.01 ) ).to.be( '56s' ) ; - expect( format( '%[r]t' , 56000.01 ) ).to.be( '56s' ) ; - expect( format( '%[f]t' , 56000.01 ) ).to.be( '56s' ) ; - expect( format( '%[c]t' , 56000.01 ) ).to.be( '57s' ) ; - - expect( format( '%t' , 56000.001 ) ).to.be( '56s' ) ; - expect( format( '%[r]t' , 56000.001 ) ).to.be( '56s' ) ; - expect( format( '%[f]t' , 56000.001 ) ).to.be( '56s' ) ; - expect( format( '%[c]t' , 56000.001 ) ).to.be( '56s' ) ; - - expect( format( '%t' , 56999.99 ) ).to.be( '57s' ) ; - expect( format( '%[r]t' , 56999.99 ) ).to.be( '57s' ) ; - expect( format( '%[f]t' , 56999.99 ) ).to.be( '57s' ) ; - expect( format( '%[c]t' , 56999.99 ) ).to.be( '57s' ) ; - - expect( format( '%t' , 56999.98 ) ).to.be( '56s' ) ; - expect( format( '%[r]t' , 56999.98 ) ).to.be( '57s' ) ; - expect( format( '%[f]t' , 56999.98 ) ).to.be( '56s' ) ; - expect( format( '%[c]t' , 56999.98 ) ).to.be( '57s' ) ; - } ) ; - - it( "%T should format time duration" , () => { - expect( format( '%T' , 1000 ) ).to.be( '1' ) ; - expect( format( '%T' , 1234 ) ).to.be( '1' ) ; - expect( format( '%[m]T' , 1234 ) ).to.be( '0:01' ) ; - expect( format( '%[.1m]T' , 1234 ) ).to.be( '0:01.2' ) ; - expect( format( '%[.2m]T' , 1234 ) ).to.be( '0:01.23' ) ; - expect( format( '%[.3m]T' , 1234 ) ).to.be( '0:01.234' ) ; - expect( format( '%[.3m]T' , 1200 ) ).to.be( '0:01.2' ) ; - expect( format( '%[.3!m]T' , 1200 ) ).to.be( '0:01.200' ) ; - expect( format( '%T' , 60000 ) ).to.be( '1:00' ) ; - expect( format( '%T' , 123456 ) ).to.be( '2:03' ) ; - expect( format( '%T' , 3600000 ) ).to.be( '1:00:00' ) ; - expect( format( '%T' , 3599999 ) ).to.be( '59:59' ) ; - expect( format( '%T' , 7890000 ) ).to.be( '2:11:30' ) ; - - expect( format( '%[c]T' , 120000 ) ).to.be( '2:00' ) ; - expect( format( '%[c]T' , 119900 ) ).to.be( '2:00' ) ; - - expect( format( '%T' , -120000 ) ).to.be( '-2:00' ) ; - expect( format( '%T' , -119900 ) ).to.be( '-2:00' ) ; + expect( format( '%[a]t' , 56789 ) ).to.be( '56s' ) ; + expect( format( '%[ar]t' , 56789 ) ).to.be( '57s' ) ; + expect( format( '%[af]t' , 56789 ) ).to.be( '56s' ) ; + expect( format( '%[ac]t' , 56789 ) ).to.be( '57s' ) ; + + expect( format( '%[a]t' , 56389 ) ).to.be( '56s' ) ; + expect( format( '%[ar]t' , 56389 ) ).to.be( '56s' ) ; + expect( format( '%[af]t' , 56389 ) ).to.be( '56s' ) ; + expect( format( '%[ac]t' , 56389 ) ).to.be( '57s' ) ; + + expect( format( '%[a]t' , 56000.01 ) ).to.be( '56s' ) ; + expect( format( '%[ar]t' , 56000.01 ) ).to.be( '56s' ) ; + expect( format( '%[af]t' , 56000.01 ) ).to.be( '56s' ) ; + expect( format( '%[ac]t' , 56000.01 ) ).to.be( '57s' ) ; + + expect( format( '%[a]t' , 56000.001 ) ).to.be( '56s' ) ; + expect( format( '%[ar]t' , 56000.001 ) ).to.be( '56s' ) ; + expect( format( '%[af]t' , 56000.001 ) ).to.be( '56s' ) ; + expect( format( '%[ac]t' , 56000.001 ) ).to.be( '56s' ) ; + + expect( format( '%[a]t' , 56999.99 ) ).to.be( '57s' ) ; + expect( format( '%[ar]t' , 56999.99 ) ).to.be( '57s' ) ; + expect( format( '%[af]t' , 56999.99 ) ).to.be( '57s' ) ; + expect( format( '%[ac]t' , 56999.99 ) ).to.be( '57s' ) ; + + expect( format( '%[a]t' , 56999.98 ) ).to.be( '56s' ) ; + expect( format( '%[ar]t' , 56999.98 ) ).to.be( '57s' ) ; + expect( format( '%[af]t' , 56999.98 ) ).to.be( '56s' ) ; + expect( format( '%[ac]t' , 56999.98 ) ).to.be( '57s' ) ; } ) ; it( "%z should format as base64" , () => {