@utilix-tech/sdk 0.74.0 → 0.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
4
4
 
5
+ ## 0.75.0
6
+ - Add `verifyWebhookSignature` (webhook-signature-verifier): recompute an HMAC over a raw webhook payload and compare it to a provided signature, supporting the `sha256=` prefix style (Stripe/GitHub-style webhooks) plus raw hex or base64 encoding.
7
+ - Add `calculateTransferTime` and `calculateRequiredBandwidth` (data-transfer-time-estimator): estimate the theoretical time to transfer a file over a connection of a given speed, or the reverse: the bandwidth required to hit a target time.
8
+
5
9
  ## 0.74.0
6
10
  - Add `calculateLoanPrepaymentPenalty` (loan-prepayment-penalty-calculator): compute the dollar penalty cost of paying a loan off early, given its payoff balance and a prepayment penalty structure (a flat percent of balance, or a fixed number of months of interest).
7
11
  - Add `validateAria` (aria-validator): check every role and aria-* attribute in an HTML snippet against a curated WAI-ARIA 1.2 role table, flagging unknown roles, disallowed attributes, and missing required states.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **698 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **702 developer utility functions for Node.js: runs locally, no API key required.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@utilix-tech/sdk?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@utilix-tech/sdk)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@utilix-tech/sdk?style=flat-square)](https://www.npmjs.com/package/@utilix-tech/sdk)
@@ -995,9 +995,9 @@ readMidiInfo(new Uint8Array(midiBytes));
995
995
  | `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, NDJSON record deduplicator, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer, Markdown table column aligner |
996
996
  | `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
997
997
  | `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
998
- | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator |
998
+ | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator, data transfer time / required bandwidth estimator |
999
999
  | `@utilix-tech/sdk/network` | HTTP status codes, IP validation, country flags, geolocation URLs, HAR file parsing, User-Agent parsing, IPv6 address compress/expand, Permissions-Policy header builder, Client Hints header builder/parser, Content-Disposition header builder/parser, X-Content-Type-Options header builder/risk assessor, sitemap.xml validator, sitemap index splitter, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup, Strict-Transport-Security (HSTS) header builder/parser, X-Robots-Tag header builder/parser, WebSocket frame opcode reference/lookup, robots meta tag builder/parser, Cookie header byte-size budget calculator |
1000
- | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator |
1000
+ | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator, webhook HMAC signature verifier |
1001
1001
  | `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor, ARIA role & attribute validator |
1002
1002
  | `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
1003
1003
  | `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
@@ -14,6 +14,7 @@
14
14
  * encodeUrlComponent, decodeUrlComponent, isValidUrl, normalizeUrl
15
15
  * - og-meta : parseMetaTags, validateOgTags, generateMetaHtml
16
16
  * - totp-hotp-generator : generateHotp, generateTotp
17
+ * - webhook-signature-verifier : verifyWebhookSignature
17
18
  *
18
19
  * Node 18+ only. All crypto uses node:crypto; no browser-only APIs.
19
20
  */
@@ -333,6 +334,26 @@ interface TotpResult {
333
334
  declare function generateTotp(secret: string, options?: TotpOptions): TotpResult | {
334
335
  error: string;
335
336
  };
337
+ type WebhookHashAlgorithm = 'sha1' | 'sha256' | 'sha512';
338
+ interface WebhookSignatureResult {
339
+ valid: boolean;
340
+ algorithm: WebhookHashAlgorithm;
341
+ expectedHex: string;
342
+ expectedBase64: string;
343
+ providedSignature: string;
344
+ matchedEncoding: 'hex' | 'base64' | null;
345
+ }
346
+ /**
347
+ * Recomputes an HMAC over a raw webhook payload and compares it to a
348
+ * provided signature, the check every webhook receiver (Stripe, GitHub,
349
+ * Shopify, etc.) has to do before trusting a request. Accepts a signature
350
+ * with or without the common `sha256=` prefix style, and matches against
351
+ * either hex or base64 encoding since providers differ on which they send.
352
+ * Comparison is constant-time to avoid leaking timing information.
353
+ */
354
+ declare function verifyWebhookSignature(payload: string, secret: string, signature: string, algorithm?: WebhookHashAlgorithm): WebhookSignatureResult | {
355
+ error: string;
356
+ };
336
357
 
337
358
  declare const api_COMMON_HEADERS: typeof COMMON_HEADERS;
338
359
  declare const api_COMMON_PRESETS: typeof COMMON_PRESETS;
@@ -378,6 +399,8 @@ type api_TargetLanguage = TargetLanguage;
378
399
  type api_TotpOptions = TotpOptions;
379
400
  type api_TotpResult = TotpResult;
380
401
  type api_TwitterTags = TwitterTags;
402
+ type api_WebhookHashAlgorithm = WebhookHashAlgorithm;
403
+ type api_WebhookSignatureResult = WebhookSignatureResult;
381
404
  declare const api_addParam: typeof addParam;
382
405
  declare const api_base64urlDecode: typeof base64urlDecode;
383
406
  declare const api_base64urlEncode: typeof base64urlEncode;
@@ -414,8 +437,9 @@ declare const api_signJwt: typeof signJwt;
414
437
  declare const api_validateCorsConfig: typeof validateCorsConfig;
415
438
  declare const api_validateCspConfig: typeof validateCspConfig;
416
439
  declare const api_validateOgTags: typeof validateOgTags;
440
+ declare const api_verifyWebhookSignature: typeof verifyWebhookSignature;
417
441
  declare namespace api {
418
- export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags };
442
+ export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, type api_WebhookHashAlgorithm as WebhookHashAlgorithm, type api_WebhookSignatureResult as WebhookSignatureResult, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags, api_verifyWebhookSignature as verifyWebhookSignature };
419
443
  }
420
444
 
421
- export { decodeJwt as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, addParam as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, base64urlDecode as U, base64urlEncode as V, buildCurl as W, buildCurlMultiline as X, buildUrl as Y, computeJwkThumbprint as Z, convertToCode as _, api as a, decodeUrlComponent as a0, detectFormat as a1, encodeUrlComponent as a2, extractJsonPaths as a3, formatJwtJson as a4, formatResponse as a5, generateCors as a6, generateCspHeader as a7, generateFullHeader as a8, generateHotp as a9, generateMetaHtml as aa, generateTotp as ab, getParam as ac, getStats as ad, isValidUrl as ae, normalizeUrl as af, parseCspHeader as ag, parseCurl as ah, parseCurlCommand as ai, parseJwks as aj, parseMetaTags as ak, parseUrl as al, removeParam as am, signJwt as an, validateCorsConfig as ao, validateCspConfig as ap, validateOgTags as aq, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
445
+ export { computeJwkThumbprint as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, type WebhookSignatureResult as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, addParam as U, base64urlDecode as V, type WebhookHashAlgorithm as W, base64urlEncode as X, buildCurl as Y, buildCurlMultiline as Z, buildUrl as _, api as a, convertToCode as a0, decodeJwt as a1, decodeUrlComponent as a2, detectFormat as a3, encodeUrlComponent as a4, extractJsonPaths as a5, formatJwtJson as a6, formatResponse as a7, generateCors as a8, generateCspHeader as a9, generateFullHeader as aa, generateHotp as ab, generateMetaHtml as ac, generateTotp as ad, getParam as ae, getStats as af, isValidUrl as ag, normalizeUrl as ah, parseCspHeader as ai, parseCurl as aj, parseCurlCommand as ak, parseJwks as al, parseMetaTags as am, parseUrl as an, removeParam as ao, signJwt as ap, validateCorsConfig as aq, validateCspConfig as ar, validateOgTags as as, verifyWebhookSignature as at, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
@@ -14,6 +14,7 @@
14
14
  * encodeUrlComponent, decodeUrlComponent, isValidUrl, normalizeUrl
15
15
  * - og-meta : parseMetaTags, validateOgTags, generateMetaHtml
16
16
  * - totp-hotp-generator : generateHotp, generateTotp
17
+ * - webhook-signature-verifier : verifyWebhookSignature
17
18
  *
18
19
  * Node 18+ only. All crypto uses node:crypto; no browser-only APIs.
19
20
  */
@@ -333,6 +334,26 @@ interface TotpResult {
333
334
  declare function generateTotp(secret: string, options?: TotpOptions): TotpResult | {
334
335
  error: string;
335
336
  };
337
+ type WebhookHashAlgorithm = 'sha1' | 'sha256' | 'sha512';
338
+ interface WebhookSignatureResult {
339
+ valid: boolean;
340
+ algorithm: WebhookHashAlgorithm;
341
+ expectedHex: string;
342
+ expectedBase64: string;
343
+ providedSignature: string;
344
+ matchedEncoding: 'hex' | 'base64' | null;
345
+ }
346
+ /**
347
+ * Recomputes an HMAC over a raw webhook payload and compares it to a
348
+ * provided signature, the check every webhook receiver (Stripe, GitHub,
349
+ * Shopify, etc.) has to do before trusting a request. Accepts a signature
350
+ * with or without the common `sha256=` prefix style, and matches against
351
+ * either hex or base64 encoding since providers differ on which they send.
352
+ * Comparison is constant-time to avoid leaking timing information.
353
+ */
354
+ declare function verifyWebhookSignature(payload: string, secret: string, signature: string, algorithm?: WebhookHashAlgorithm): WebhookSignatureResult | {
355
+ error: string;
356
+ };
336
357
 
337
358
  declare const api_COMMON_HEADERS: typeof COMMON_HEADERS;
338
359
  declare const api_COMMON_PRESETS: typeof COMMON_PRESETS;
@@ -378,6 +399,8 @@ type api_TargetLanguage = TargetLanguage;
378
399
  type api_TotpOptions = TotpOptions;
379
400
  type api_TotpResult = TotpResult;
380
401
  type api_TwitterTags = TwitterTags;
402
+ type api_WebhookHashAlgorithm = WebhookHashAlgorithm;
403
+ type api_WebhookSignatureResult = WebhookSignatureResult;
381
404
  declare const api_addParam: typeof addParam;
382
405
  declare const api_base64urlDecode: typeof base64urlDecode;
383
406
  declare const api_base64urlEncode: typeof base64urlEncode;
@@ -414,8 +437,9 @@ declare const api_signJwt: typeof signJwt;
414
437
  declare const api_validateCorsConfig: typeof validateCorsConfig;
415
438
  declare const api_validateCspConfig: typeof validateCspConfig;
416
439
  declare const api_validateOgTags: typeof validateOgTags;
440
+ declare const api_verifyWebhookSignature: typeof verifyWebhookSignature;
417
441
  declare namespace api {
418
- export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags };
442
+ export { api_COMMON_HEADERS as COMMON_HEADERS, api_COMMON_PRESETS as COMMON_PRESETS, api_CORS_COMMON_HEADERS as CORS_COMMON_HEADERS, type api_CorsConfig as CorsConfig, type api_CorsOutput as CorsOutput, type api_CspConfig as CspConfig, type api_CspDirective as CspDirective, type api_CspSource as CspSource, type api_CurlCommand as CurlCommand, type api_CurlConfig as CurlConfig, api_DEFAULT_CORS_CONFIG as DEFAULT_CORS_CONFIG, api_DIRECTIVE_DESCRIPTIONS as DIRECTIVE_DESCRIPTIONS, type api_DirectiveConfig as DirectiveConfig, type api_FormatResult as FormatResult, api_HTTP_METHODS as HTTP_METHODS, type api_Header as Header, type api_HotpResult as HotpResult, type api_HttpMethod as HttpMethod, type api_JwkSummary as JwkSummary, type api_JwkThumbprintErrorResult as JwkThumbprintErrorResult, type api_JwkThumbprintHash as JwkThumbprintHash, type api_JwkThumbprintOutcome as JwkThumbprintOutcome, type api_JwkThumbprintResult as JwkThumbprintResult, type api_JwksError as JwksError, type api_JwksParseResult as JwksParseResult, type api_JwksResult as JwksResult, type api_JwtAlgorithm as JwtAlgorithm, type api_JwtDecodeError as JwtDecodeError, type api_JwtDecodeResult as JwtDecodeResult, type api_JwtExpiry as JwtExpiry, type api_JwtPart as JwtPart, type api_JwtResult as JwtResult, type api_JwtSignOptions as JwtSignOptions, type api_MetaTags as MetaTags, type api_OgTags as OgTags, type api_OtpAlgorithm as OtpAlgorithm, type api_OtpOptions as OtpOptions, type api_ParsedUrl as ParsedUrl, type api_ResponseFormat as ResponseFormat, api_SUPPORTED_LANGUAGES as SUPPORTED_LANGUAGES, type api_TargetLanguage as TargetLanguage, type api_TotpOptions as TotpOptions, type api_TotpResult as TotpResult, type api_TwitterTags as TwitterTags, type api_WebhookHashAlgorithm as WebhookHashAlgorithm, type api_WebhookSignatureResult as WebhookSignatureResult, api_addParam as addParam, api_base64urlDecode as base64urlDecode, api_base64urlEncode as base64urlEncode, api_buildCurl as buildCurl, api_buildCurlMultiline as buildCurlMultiline, api_buildUrl as buildUrl, api_computeJwkThumbprint as computeJwkThumbprint, api_convertToCode as convertToCode, api_decodeJwt as decodeJwt, api_decodeUrlComponent as decodeUrlComponent, api_detectFormat as detectFormat, api_encodeUrlComponent as encodeUrlComponent, api_extractJsonPaths as extractJsonPaths, api_formatJwtJson as formatJwtJson, api_formatResponse as formatResponse, api_generateCors as generateCors, api_generateCspHeader as generateCspHeader, api_generateFullHeader as generateFullHeader, api_generateHotp as generateHotp, api_generateMetaHtml as generateMetaHtml, api_generateTotp as generateTotp, api_getParam as getParam, api_getStats as getStats, api_isValidUrl as isValidUrl, api_normalizeUrl as normalizeUrl, api_parseCspHeader as parseCspHeader, api_parseCurl as parseCurl, api_parseCurlCommand as parseCurlCommand, api_parseJwks as parseJwks, api_parseMetaTags as parseMetaTags, api_parseUrl as parseUrl, api_removeParam as removeParam, api_signJwt as signJwt, api_validateCorsConfig as validateCorsConfig, api_validateCspConfig as validateCspConfig, api_validateOgTags as validateOgTags, api_verifyWebhookSignature as verifyWebhookSignature };
419
443
  }
420
444
 
421
- export { decodeJwt as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, addParam as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, base64urlDecode as U, base64urlEncode as V, buildCurl as W, buildCurlMultiline as X, buildUrl as Y, computeJwkThumbprint as Z, convertToCode as _, api as a, decodeUrlComponent as a0, detectFormat as a1, encodeUrlComponent as a2, extractJsonPaths as a3, formatJwtJson as a4, formatResponse as a5, generateCors as a6, generateCspHeader as a7, generateFullHeader as a8, generateHotp as a9, generateMetaHtml as aa, generateTotp as ab, getParam as ac, getStats as ad, isValidUrl as ae, normalizeUrl as af, parseCspHeader as ag, parseCurl as ah, parseCurlCommand as ai, parseJwks as aj, parseMetaTags as ak, parseUrl as al, removeParam as am, signJwt as an, validateCorsConfig as ao, validateCspConfig as ap, validateOgTags as aq, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
445
+ export { computeJwkThumbprint as $, type JwtPart as A, type JwtResult as B, COMMON_HEADERS as C, DEFAULT_CORS_CONFIG as D, type JwtSignOptions as E, type FormatResult as F, type OtpAlgorithm as G, HTTP_METHODS as H, type OtpOptions as I, type JwkSummary as J, type TotpOptions as K, type TotpResult as L, type MetaTags as M, type TwitterTags as N, type OgTags as O, type ParsedUrl as P, type WebhookSignatureResult as Q, type ResponseFormat as R, SUPPORTED_LANGUAGES as S, type TargetLanguage as T, addParam as U, base64urlDecode as V, type WebhookHashAlgorithm as W, base64urlEncode as X, buildCurl as Y, buildCurlMultiline as Z, buildUrl as _, api as a, convertToCode as a0, decodeJwt as a1, decodeUrlComponent as a2, detectFormat as a3, encodeUrlComponent as a4, extractJsonPaths as a5, formatJwtJson as a6, formatResponse as a7, generateCors as a8, generateCspHeader as a9, generateFullHeader as aa, generateHotp as ab, generateMetaHtml as ac, generateTotp as ad, getParam as ae, getStats as af, isValidUrl as ag, normalizeUrl as ah, parseCspHeader as ai, parseCurl as aj, parseCurlCommand as ak, parseJwks as al, parseMetaTags as am, parseUrl as an, removeParam as ao, signJwt as ap, validateCorsConfig as aq, validateCspConfig as ar, validateOgTags as as, verifyWebhookSignature as at, COMMON_PRESETS as b, CORS_COMMON_HEADERS as c, type CorsConfig as d, type CorsOutput as e, type CspConfig as f, type CspDirective as g, type CspSource as h, type CurlCommand as i, type CurlConfig as j, DIRECTIVE_DESCRIPTIONS as k, type DirectiveConfig as l, type Header as m, type HotpResult as n, type HttpMethod as o, type JwkThumbprintErrorResult as p, type JwkThumbprintHash as q, type JwkThumbprintOutcome as r, type JwkThumbprintResult as s, type JwksError as t, type JwksParseResult as u, type JwksResult as v, type JwtAlgorithm as w, type JwtDecodeError as x, type JwtDecodeResult as y, type JwtExpiry as z };
@@ -44,6 +44,7 @@ __export(units_exports, {
44
44
  calculateMovingAverages: () => calculateMovingAverages,
45
45
  calculatePaybackPeriod: () => calculatePaybackPeriod,
46
46
  calculatePercentageChange: () => calculatePercentageChange,
47
+ calculateRequiredBandwidth: () => calculateRequiredBandwidth,
47
48
  calculateRoi: () => calculateRoi,
48
49
  calculateRuleOf72: () => calculateRuleOf72,
49
50
  calculateSavingsGoal: () => calculateSavingsGoal,
@@ -52,6 +53,7 @@ __export(units_exports, {
52
53
  calculateTaxEquivalentYield: () => calculateTaxEquivalentYield,
53
54
  calculateTimeValue: () => calculateTimeValue,
54
55
  calculateTipSplit: () => calculateTipSplit,
56
+ calculateTransferTime: () => calculateTransferTime,
55
57
  calculateVideoBitrate: () => calculateVideoBitrate,
56
58
  compareSemver: () => compareSemver,
57
59
  compareUnitPrices: () => compareUnitPrices,
@@ -2697,5 +2699,68 @@ function calculateLoanPrepaymentPenalty(payoffBalance, penaltyType, params) {
2697
2699
  totalPayoffCost: round2(payoffBalance + penaltyAmount)
2698
2700
  };
2699
2701
  }
2702
+ var FILE_SIZE_UNIT_BYTES = {
2703
+ B: 1,
2704
+ KB: 1e3,
2705
+ MB: 1e6,
2706
+ GB: 1e9,
2707
+ TB: 1e12
2708
+ };
2709
+ var SPEED_UNIT_BITS_PER_SECOND = {
2710
+ Kbps: 1e3,
2711
+ Mbps: 1e6,
2712
+ Gbps: 1e9,
2713
+ KBps: 1e3 * 8,
2714
+ MBps: 1e6 * 8,
2715
+ GBps: 1e9 * 8
2716
+ };
2717
+ function formatDurationSeconds(totalSeconds) {
2718
+ if (totalSeconds < 1) return `${(totalSeconds * 1e3).toFixed(0)}ms`;
2719
+ if (totalSeconds < 60) {
2720
+ const decimals = totalSeconds < 10 && totalSeconds % 1 !== 0 ? 1 : 0;
2721
+ return `${totalSeconds.toFixed(decimals)}s`;
2722
+ }
2723
+ const days = Math.floor(totalSeconds / 86400);
2724
+ const hours = Math.floor(totalSeconds % 86400 / 3600);
2725
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
2726
+ const seconds = Math.round(totalSeconds % 60);
2727
+ const parts = [];
2728
+ if (days > 0) parts.push(`${days}d`);
2729
+ if (hours > 0) parts.push(`${hours}h`);
2730
+ if (minutes > 0) parts.push(`${minutes}m`);
2731
+ if (seconds > 0 || parts.length === 0) parts.push(`${seconds}s`);
2732
+ return parts.join(" ");
2733
+ }
2734
+ function calculateTransferTime(fileSize, fileSizeUnit, speed, speedUnit) {
2735
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
2736
+ if (!Number.isFinite(speed) || speed <= 0) return { error: "Connection speed must be a positive number" };
2737
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
2738
+ if (!(speedUnit in SPEED_UNIT_BITS_PER_SECOND)) return { error: `Unsupported speed unit: ${speedUnit}` };
2739
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
2740
+ const speedBitsPerSecond = speed * SPEED_UNIT_BITS_PER_SECOND[speedUnit];
2741
+ const transferTimeSeconds = fileSizeBytes * 8 / speedBitsPerSecond;
2742
+ return {
2743
+ fileSizeBytes,
2744
+ speedBitsPerSecond,
2745
+ transferTimeSeconds,
2746
+ formattedTime: formatDurationSeconds(transferTimeSeconds)
2747
+ };
2748
+ }
2749
+ function calculateRequiredBandwidth(fileSize, fileSizeUnit, targetSeconds) {
2750
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
2751
+ if (!Number.isFinite(targetSeconds) || targetSeconds <= 0) {
2752
+ return { error: "Target time must be a positive number of seconds" };
2753
+ }
2754
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
2755
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
2756
+ const requiredBitsPerSecond = fileSizeBytes * 8 / targetSeconds;
2757
+ return {
2758
+ fileSizeBytes,
2759
+ targetSeconds,
2760
+ requiredBitsPerSecond,
2761
+ requiredMbps: requiredBitsPerSecond / 1e6,
2762
+ requiredMBps: requiredBitsPerSecond / 8 / 1e6
2763
+ };
2764
+ }
2700
2765
 
2701
- export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
2766
+ export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
@@ -46,7 +46,8 @@ __export(api_exports, {
46
46
  signJwt: () => signJwt,
47
47
  validateCorsConfig: () => validateCorsConfig,
48
48
  validateCspConfig: () => validateCspConfig,
49
- validateOgTags: () => validateOgTags
49
+ validateOgTags: () => validateOgTags,
50
+ verifyWebhookSignature: () => verifyWebhookSignature
50
51
  });
51
52
  function escapeShell(value) {
52
53
  return `'${value.replace(/'/g, "'\\''")}'`;
@@ -1379,5 +1380,39 @@ function generateTotp(secret, options = {}) {
1379
1380
  const secondsRemaining = periodSeconds - timestamp % periodSeconds;
1380
1381
  return { ...hotp, periodSeconds, secondsRemaining };
1381
1382
  }
1383
+ var WEBHOOK_HASH_ALGORITHMS = ["sha1", "sha256", "sha512"];
1384
+ function constantTimeEqual(a, b) {
1385
+ if (a.length !== b.length) return false;
1386
+ let diff = 0;
1387
+ for (let i = 0; i < a.length; i++) diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
1388
+ return diff === 0;
1389
+ }
1390
+ function verifyWebhookSignature(payload, secret, signature, algorithm = "sha256") {
1391
+ if (!payload) return { error: "Payload is required" };
1392
+ if (!secret) return { error: "Secret is required" };
1393
+ if (!signature || !signature.trim()) return { error: "Signature is required" };
1394
+ if (!WEBHOOK_HASH_ALGORITHMS.includes(algorithm)) {
1395
+ return { error: "Algorithm must be one of sha1, sha256, sha512" };
1396
+ }
1397
+ const trimmedSignature = signature.trim();
1398
+ const prefixMatch = trimmedSignature.match(/^(sha1|sha256|sha512)=(.+)$/i);
1399
+ const providedSignature = prefixMatch ? prefixMatch[2].trim() : trimmedSignature;
1400
+ const expectedHex = createHmac(algorithm, secret).update(payload, "utf8").digest("hex");
1401
+ const expectedBase64 = createHmac(algorithm, secret).update(payload, "utf8").digest("base64");
1402
+ let matchedEncoding = null;
1403
+ if (constantTimeEqual(providedSignature.toLowerCase(), expectedHex.toLowerCase())) {
1404
+ matchedEncoding = "hex";
1405
+ } else if (constantTimeEqual(providedSignature, expectedBase64)) {
1406
+ matchedEncoding = "base64";
1407
+ }
1408
+ return {
1409
+ valid: matchedEncoding !== null,
1410
+ algorithm,
1411
+ expectedHex,
1412
+ expectedBase64,
1413
+ providedSignature: trimmedSignature,
1414
+ matchedEncoding
1415
+ };
1416
+ }
1382
1417
 
1383
- export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, api_exports, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags };
1418
+ export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, api_exports, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags, verifyWebhookSignature };
package/dist/index.cjs CHANGED
@@ -8578,6 +8578,7 @@ __export(units_exports, {
8578
8578
  calculateMovingAverages: () => calculateMovingAverages,
8579
8579
  calculatePaybackPeriod: () => calculatePaybackPeriod,
8580
8580
  calculatePercentageChange: () => calculatePercentageChange,
8581
+ calculateRequiredBandwidth: () => calculateRequiredBandwidth,
8581
8582
  calculateRoi: () => calculateRoi,
8582
8583
  calculateRuleOf72: () => calculateRuleOf72,
8583
8584
  calculateSavingsGoal: () => calculateSavingsGoal,
@@ -8586,6 +8587,7 @@ __export(units_exports, {
8586
8587
  calculateTaxEquivalentYield: () => calculateTaxEquivalentYield,
8587
8588
  calculateTimeValue: () => calculateTimeValue,
8588
8589
  calculateTipSplit: () => calculateTipSplit,
8590
+ calculateTransferTime: () => calculateTransferTime,
8589
8591
  calculateVideoBitrate: () => calculateVideoBitrate,
8590
8592
  compareSemver: () => compareSemver,
8591
8593
  compareUnitPrices: () => compareUnitPrices,
@@ -11231,6 +11233,69 @@ function calculateLoanPrepaymentPenalty(payoffBalance, penaltyType, params) {
11231
11233
  totalPayoffCost: round2(payoffBalance + penaltyAmount)
11232
11234
  };
11233
11235
  }
11236
+ var FILE_SIZE_UNIT_BYTES = {
11237
+ B: 1,
11238
+ KB: 1e3,
11239
+ MB: 1e6,
11240
+ GB: 1e9,
11241
+ TB: 1e12
11242
+ };
11243
+ var SPEED_UNIT_BITS_PER_SECOND = {
11244
+ Kbps: 1e3,
11245
+ Mbps: 1e6,
11246
+ Gbps: 1e9,
11247
+ KBps: 1e3 * 8,
11248
+ MBps: 1e6 * 8,
11249
+ GBps: 1e9 * 8
11250
+ };
11251
+ function formatDurationSeconds(totalSeconds) {
11252
+ if (totalSeconds < 1) return `${(totalSeconds * 1e3).toFixed(0)}ms`;
11253
+ if (totalSeconds < 60) {
11254
+ const decimals = totalSeconds < 10 && totalSeconds % 1 !== 0 ? 1 : 0;
11255
+ return `${totalSeconds.toFixed(decimals)}s`;
11256
+ }
11257
+ const days = Math.floor(totalSeconds / 86400);
11258
+ const hours = Math.floor(totalSeconds % 86400 / 3600);
11259
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
11260
+ const seconds = Math.round(totalSeconds % 60);
11261
+ const parts = [];
11262
+ if (days > 0) parts.push(`${days}d`);
11263
+ if (hours > 0) parts.push(`${hours}h`);
11264
+ if (minutes > 0) parts.push(`${minutes}m`);
11265
+ if (seconds > 0 || parts.length === 0) parts.push(`${seconds}s`);
11266
+ return parts.join(" ");
11267
+ }
11268
+ function calculateTransferTime(fileSize, fileSizeUnit, speed, speedUnit) {
11269
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
11270
+ if (!Number.isFinite(speed) || speed <= 0) return { error: "Connection speed must be a positive number" };
11271
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
11272
+ if (!(speedUnit in SPEED_UNIT_BITS_PER_SECOND)) return { error: `Unsupported speed unit: ${speedUnit}` };
11273
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
11274
+ const speedBitsPerSecond = speed * SPEED_UNIT_BITS_PER_SECOND[speedUnit];
11275
+ const transferTimeSeconds = fileSizeBytes * 8 / speedBitsPerSecond;
11276
+ return {
11277
+ fileSizeBytes,
11278
+ speedBitsPerSecond,
11279
+ transferTimeSeconds,
11280
+ formattedTime: formatDurationSeconds(transferTimeSeconds)
11281
+ };
11282
+ }
11283
+ function calculateRequiredBandwidth(fileSize, fileSizeUnit, targetSeconds) {
11284
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
11285
+ if (!Number.isFinite(targetSeconds) || targetSeconds <= 0) {
11286
+ return { error: "Target time must be a positive number of seconds" };
11287
+ }
11288
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
11289
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
11290
+ const requiredBitsPerSecond = fileSizeBytes * 8 / targetSeconds;
11291
+ return {
11292
+ fileSizeBytes,
11293
+ targetSeconds,
11294
+ requiredBitsPerSecond,
11295
+ requiredMbps: requiredBitsPerSecond / 1e6,
11296
+ requiredMBps: requiredBitsPerSecond / 8 / 1e6
11297
+ };
11298
+ }
11234
11299
 
11235
11300
  // src/tools/network.ts
11236
11301
  var network_exports = {};
@@ -14789,7 +14854,8 @@ __export(api_exports, {
14789
14854
  signJwt: () => signJwt,
14790
14855
  validateCorsConfig: () => validateCorsConfig,
14791
14856
  validateCspConfig: () => validateCspConfig,
14792
- validateOgTags: () => validateOgTags
14857
+ validateOgTags: () => validateOgTags,
14858
+ verifyWebhookSignature: () => verifyWebhookSignature
14793
14859
  });
14794
14860
  function escapeShell(value) {
14795
14861
  return `'${value.replace(/'/g, "'\\''")}'`;
@@ -16122,6 +16188,40 @@ function generateTotp(secret, options = {}) {
16122
16188
  const secondsRemaining = periodSeconds - timestamp % periodSeconds;
16123
16189
  return { ...hotp, periodSeconds, secondsRemaining };
16124
16190
  }
16191
+ var WEBHOOK_HASH_ALGORITHMS = ["sha1", "sha256", "sha512"];
16192
+ function constantTimeEqual(a, b) {
16193
+ if (a.length !== b.length) return false;
16194
+ let diff = 0;
16195
+ for (let i = 0; i < a.length; i++) diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
16196
+ return diff === 0;
16197
+ }
16198
+ function verifyWebhookSignature(payload, secret, signature, algorithm = "sha256") {
16199
+ if (!payload) return { error: "Payload is required" };
16200
+ if (!secret) return { error: "Secret is required" };
16201
+ if (!signature || !signature.trim()) return { error: "Signature is required" };
16202
+ if (!WEBHOOK_HASH_ALGORITHMS.includes(algorithm)) {
16203
+ return { error: "Algorithm must be one of sha1, sha256, sha512" };
16204
+ }
16205
+ const trimmedSignature = signature.trim();
16206
+ const prefixMatch = trimmedSignature.match(/^(sha1|sha256|sha512)=(.+)$/i);
16207
+ const providedSignature = prefixMatch ? prefixMatch[2].trim() : trimmedSignature;
16208
+ const expectedHex = crypto.createHmac(algorithm, secret).update(payload, "utf8").digest("hex");
16209
+ const expectedBase64 = crypto.createHmac(algorithm, secret).update(payload, "utf8").digest("base64");
16210
+ let matchedEncoding = null;
16211
+ if (constantTimeEqual(providedSignature.toLowerCase(), expectedHex.toLowerCase())) {
16212
+ matchedEncoding = "hex";
16213
+ } else if (constantTimeEqual(providedSignature, expectedBase64)) {
16214
+ matchedEncoding = "base64";
16215
+ }
16216
+ return {
16217
+ valid: matchedEncoding !== null,
16218
+ algorithm,
16219
+ expectedHex,
16220
+ expectedBase64,
16221
+ providedSignature: trimmedSignature,
16222
+ matchedEncoding
16223
+ };
16224
+ }
16125
16225
 
16126
16226
  // src/tools/code.ts
16127
16227
  var code_exports = {};
package/dist/index.d.cts CHANGED
@@ -5,9 +5,9 @@ export { t as text } from './text-DWUcY8H1.cjs';
5
5
  export { d as data } from './data-26TALa9U.cjs';
6
6
  export { g as generators } from './generators-DAXXrMvG.cjs';
7
7
  export { t as time } from './time-KqJjdqII.cjs';
8
- export { u as units } from './units-BAwyBk4x.cjs';
8
+ export { u as units } from './units-BqegyALA.cjs';
9
9
  export { n as network } from './network-Da3meCWM.cjs';
10
- export { a as api } from './api-C8rImfka.cjs';
10
+ export { a as api } from './api-CQnIUrVB.cjs';
11
11
  export { c as code } from './code-46xO9xFf.cjs';
12
12
  export { c as color } from './color-tPwZCr9H.cjs';
13
13
  export { c as css } from './css-Cf7AMGM-.cjs';
package/dist/index.d.ts CHANGED
@@ -5,9 +5,9 @@ export { t as text } from './text-DWUcY8H1.js';
5
5
  export { d as data } from './data-26TALa9U.js';
6
6
  export { g as generators } from './generators-DAXXrMvG.js';
7
7
  export { t as time } from './time-KqJjdqII.js';
8
- export { u as units } from './units-BAwyBk4x.js';
8
+ export { u as units } from './units-BqegyALA.js';
9
9
  export { n as network } from './network-Da3meCWM.js';
10
- export { a as api } from './api-C8rImfka.js';
10
+ export { a as api } from './api-CQnIUrVB.js';
11
11
  export { c as code } from './code-46xO9xFf.js';
12
12
  export { c as color } from './color-tPwZCr9H.js';
13
13
  export { c as css } from './css-Cf7AMGM-.js';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { media_exports as media } from './chunk-PT4N4UBL.js';
2
- export { units_exports as units } from './chunk-AKVWWLNJ.js';
2
+ export { units_exports as units } from './chunk-RP574L5Z.js';
3
3
  export { network_exports as network } from './chunk-CXUOV672.js';
4
- export { api_exports as api } from './chunk-4S63T7Y4.js';
4
+ export { api_exports as api } from './chunk-U2HREMZU.js';
5
5
  export { code_exports as code } from './chunk-XT2BQWXT.js';
6
6
  export { color_exports as color } from './chunk-BPVAB4P2.js';
7
7
  export { css_exports as css } from './chunk-6YPV2AB5.js';
@@ -1334,6 +1334,40 @@ function generateTotp(secret, options = {}) {
1334
1334
  const secondsRemaining = periodSeconds - timestamp % periodSeconds;
1335
1335
  return { ...hotp, periodSeconds, secondsRemaining };
1336
1336
  }
1337
+ var WEBHOOK_HASH_ALGORITHMS = ["sha1", "sha256", "sha512"];
1338
+ function constantTimeEqual(a, b) {
1339
+ if (a.length !== b.length) return false;
1340
+ let diff = 0;
1341
+ for (let i = 0; i < a.length; i++) diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
1342
+ return diff === 0;
1343
+ }
1344
+ function verifyWebhookSignature(payload, secret, signature, algorithm = "sha256") {
1345
+ if (!payload) return { error: "Payload is required" };
1346
+ if (!secret) return { error: "Secret is required" };
1347
+ if (!signature || !signature.trim()) return { error: "Signature is required" };
1348
+ if (!WEBHOOK_HASH_ALGORITHMS.includes(algorithm)) {
1349
+ return { error: "Algorithm must be one of sha1, sha256, sha512" };
1350
+ }
1351
+ const trimmedSignature = signature.trim();
1352
+ const prefixMatch = trimmedSignature.match(/^(sha1|sha256|sha512)=(.+)$/i);
1353
+ const providedSignature = prefixMatch ? prefixMatch[2].trim() : trimmedSignature;
1354
+ const expectedHex = crypto.createHmac(algorithm, secret).update(payload, "utf8").digest("hex");
1355
+ const expectedBase64 = crypto.createHmac(algorithm, secret).update(payload, "utf8").digest("base64");
1356
+ let matchedEncoding = null;
1357
+ if (constantTimeEqual(providedSignature.toLowerCase(), expectedHex.toLowerCase())) {
1358
+ matchedEncoding = "hex";
1359
+ } else if (constantTimeEqual(providedSignature, expectedBase64)) {
1360
+ matchedEncoding = "base64";
1361
+ }
1362
+ return {
1363
+ valid: matchedEncoding !== null,
1364
+ algorithm,
1365
+ expectedHex,
1366
+ expectedBase64,
1367
+ providedSignature: trimmedSignature,
1368
+ matchedEncoding
1369
+ };
1370
+ }
1337
1371
 
1338
1372
  exports.COMMON_HEADERS = COMMON_HEADERS;
1339
1373
  exports.COMMON_PRESETS = COMMON_PRESETS;
@@ -1378,3 +1412,4 @@ exports.signJwt = signJwt;
1378
1412
  exports.validateCorsConfig = validateCorsConfig;
1379
1413
  exports.validateCspConfig = validateCspConfig;
1380
1414
  exports.validateOgTags = validateOgTags;
1415
+ exports.verifyWebhookSignature = verifyWebhookSignature;
@@ -1 +1 @@
1
- export { C as COMMON_HEADERS, b as COMMON_PRESETS, c as CORS_COMMON_HEADERS, d as CorsConfig, e as CorsOutput, f as CspConfig, g as CspDirective, h as CspSource, i as CurlCommand, j as CurlConfig, D as DEFAULT_CORS_CONFIG, k as DIRECTIVE_DESCRIPTIONS, l as DirectiveConfig, F as FormatResult, H as HTTP_METHODS, m as Header, n as HotpResult, o as HttpMethod, J as JwkSummary, p as JwkThumbprintErrorResult, q as JwkThumbprintHash, r as JwkThumbprintOutcome, s as JwkThumbprintResult, t as JwksError, u as JwksParseResult, v as JwksResult, w as JwtAlgorithm, x as JwtDecodeError, y as JwtDecodeResult, z as JwtExpiry, A as JwtPart, B as JwtResult, E as JwtSignOptions, M as MetaTags, O as OgTags, G as OtpAlgorithm, I as OtpOptions, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, K as TotpOptions, L as TotpResult, N as TwitterTags, Q as addParam, U as base64urlDecode, V as base64urlEncode, W as buildCurl, X as buildCurlMultiline, Y as buildUrl, Z as computeJwkThumbprint, _ as convertToCode, $ as decodeJwt, a0 as decodeUrlComponent, a1 as detectFormat, a2 as encodeUrlComponent, a3 as extractJsonPaths, a4 as formatJwtJson, a5 as formatResponse, a6 as generateCors, a7 as generateCspHeader, a8 as generateFullHeader, a9 as generateHotp, aa as generateMetaHtml, ab as generateTotp, ac as getParam, ad as getStats, ae as isValidUrl, af as normalizeUrl, ag as parseCspHeader, ah as parseCurl, ai as parseCurlCommand, aj as parseJwks, ak as parseMetaTags, al as parseUrl, am as removeParam, an as signJwt, ao as validateCorsConfig, ap as validateCspConfig, aq as validateOgTags } from '../api-C8rImfka.cjs';
1
+ export { C as COMMON_HEADERS, b as COMMON_PRESETS, c as CORS_COMMON_HEADERS, d as CorsConfig, e as CorsOutput, f as CspConfig, g as CspDirective, h as CspSource, i as CurlCommand, j as CurlConfig, D as DEFAULT_CORS_CONFIG, k as DIRECTIVE_DESCRIPTIONS, l as DirectiveConfig, F as FormatResult, H as HTTP_METHODS, m as Header, n as HotpResult, o as HttpMethod, J as JwkSummary, p as JwkThumbprintErrorResult, q as JwkThumbprintHash, r as JwkThumbprintOutcome, s as JwkThumbprintResult, t as JwksError, u as JwksParseResult, v as JwksResult, w as JwtAlgorithm, x as JwtDecodeError, y as JwtDecodeResult, z as JwtExpiry, A as JwtPart, B as JwtResult, E as JwtSignOptions, M as MetaTags, O as OgTags, G as OtpAlgorithm, I as OtpOptions, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, K as TotpOptions, L as TotpResult, N as TwitterTags, W as WebhookHashAlgorithm, Q as WebhookSignatureResult, U as addParam, V as base64urlDecode, X as base64urlEncode, Y as buildCurl, Z as buildCurlMultiline, _ as buildUrl, $ as computeJwkThumbprint, a0 as convertToCode, a1 as decodeJwt, a2 as decodeUrlComponent, a3 as detectFormat, a4 as encodeUrlComponent, a5 as extractJsonPaths, a6 as formatJwtJson, a7 as formatResponse, a8 as generateCors, a9 as generateCspHeader, aa as generateFullHeader, ab as generateHotp, ac as generateMetaHtml, ad as generateTotp, ae as getParam, af as getStats, ag as isValidUrl, ah as normalizeUrl, ai as parseCspHeader, aj as parseCurl, ak as parseCurlCommand, al as parseJwks, am as parseMetaTags, an as parseUrl, ao as removeParam, ap as signJwt, aq as validateCorsConfig, ar as validateCspConfig, as as validateOgTags, at as verifyWebhookSignature } from '../api-CQnIUrVB.cjs';
@@ -1 +1 @@
1
- export { C as COMMON_HEADERS, b as COMMON_PRESETS, c as CORS_COMMON_HEADERS, d as CorsConfig, e as CorsOutput, f as CspConfig, g as CspDirective, h as CspSource, i as CurlCommand, j as CurlConfig, D as DEFAULT_CORS_CONFIG, k as DIRECTIVE_DESCRIPTIONS, l as DirectiveConfig, F as FormatResult, H as HTTP_METHODS, m as Header, n as HotpResult, o as HttpMethod, J as JwkSummary, p as JwkThumbprintErrorResult, q as JwkThumbprintHash, r as JwkThumbprintOutcome, s as JwkThumbprintResult, t as JwksError, u as JwksParseResult, v as JwksResult, w as JwtAlgorithm, x as JwtDecodeError, y as JwtDecodeResult, z as JwtExpiry, A as JwtPart, B as JwtResult, E as JwtSignOptions, M as MetaTags, O as OgTags, G as OtpAlgorithm, I as OtpOptions, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, K as TotpOptions, L as TotpResult, N as TwitterTags, Q as addParam, U as base64urlDecode, V as base64urlEncode, W as buildCurl, X as buildCurlMultiline, Y as buildUrl, Z as computeJwkThumbprint, _ as convertToCode, $ as decodeJwt, a0 as decodeUrlComponent, a1 as detectFormat, a2 as encodeUrlComponent, a3 as extractJsonPaths, a4 as formatJwtJson, a5 as formatResponse, a6 as generateCors, a7 as generateCspHeader, a8 as generateFullHeader, a9 as generateHotp, aa as generateMetaHtml, ab as generateTotp, ac as getParam, ad as getStats, ae as isValidUrl, af as normalizeUrl, ag as parseCspHeader, ah as parseCurl, ai as parseCurlCommand, aj as parseJwks, ak as parseMetaTags, al as parseUrl, am as removeParam, an as signJwt, ao as validateCorsConfig, ap as validateCspConfig, aq as validateOgTags } from '../api-C8rImfka.js';
1
+ export { C as COMMON_HEADERS, b as COMMON_PRESETS, c as CORS_COMMON_HEADERS, d as CorsConfig, e as CorsOutput, f as CspConfig, g as CspDirective, h as CspSource, i as CurlCommand, j as CurlConfig, D as DEFAULT_CORS_CONFIG, k as DIRECTIVE_DESCRIPTIONS, l as DirectiveConfig, F as FormatResult, H as HTTP_METHODS, m as Header, n as HotpResult, o as HttpMethod, J as JwkSummary, p as JwkThumbprintErrorResult, q as JwkThumbprintHash, r as JwkThumbprintOutcome, s as JwkThumbprintResult, t as JwksError, u as JwksParseResult, v as JwksResult, w as JwtAlgorithm, x as JwtDecodeError, y as JwtDecodeResult, z as JwtExpiry, A as JwtPart, B as JwtResult, E as JwtSignOptions, M as MetaTags, O as OgTags, G as OtpAlgorithm, I as OtpOptions, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, K as TotpOptions, L as TotpResult, N as TwitterTags, W as WebhookHashAlgorithm, Q as WebhookSignatureResult, U as addParam, V as base64urlDecode, X as base64urlEncode, Y as buildCurl, Z as buildCurlMultiline, _ as buildUrl, $ as computeJwkThumbprint, a0 as convertToCode, a1 as decodeJwt, a2 as decodeUrlComponent, a3 as detectFormat, a4 as encodeUrlComponent, a5 as extractJsonPaths, a6 as formatJwtJson, a7 as formatResponse, a8 as generateCors, a9 as generateCspHeader, aa as generateFullHeader, ab as generateHotp, ac as generateMetaHtml, ad as generateTotp, ae as getParam, af as getStats, ag as isValidUrl, ah as normalizeUrl, ai as parseCspHeader, aj as parseCurl, ak as parseCurlCommand, al as parseJwks, am as parseMetaTags, an as parseUrl, ao as removeParam, ap as signJwt, aq as validateCorsConfig, ar as validateCspConfig, as as validateOgTags, at as verifyWebhookSignature } from '../api-CQnIUrVB.js';
package/dist/tools/api.js CHANGED
@@ -1,2 +1,2 @@
1
- export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags } from '../chunk-4S63T7Y4.js';
1
+ export { COMMON_HEADERS, COMMON_PRESETS, CORS_COMMON_HEADERS, DEFAULT_CORS_CONFIG, DIRECTIVE_DESCRIPTIONS, HTTP_METHODS, SUPPORTED_LANGUAGES, addParam, base64urlDecode, base64urlEncode, buildCurl, buildCurlMultiline, buildUrl, computeJwkThumbprint, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateHotp, generateMetaHtml, generateTotp, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags, verifyWebhookSignature } from '../chunk-U2HREMZU.js';
2
2
  import '../chunk-MLKGABMK.js';
@@ -2588,6 +2588,69 @@ function calculateLoanPrepaymentPenalty(payoffBalance, penaltyType, params) {
2588
2588
  totalPayoffCost: round2(payoffBalance + penaltyAmount)
2589
2589
  };
2590
2590
  }
2591
+ var FILE_SIZE_UNIT_BYTES = {
2592
+ B: 1,
2593
+ KB: 1e3,
2594
+ MB: 1e6,
2595
+ GB: 1e9,
2596
+ TB: 1e12
2597
+ };
2598
+ var SPEED_UNIT_BITS_PER_SECOND = {
2599
+ Kbps: 1e3,
2600
+ Mbps: 1e6,
2601
+ Gbps: 1e9,
2602
+ KBps: 1e3 * 8,
2603
+ MBps: 1e6 * 8,
2604
+ GBps: 1e9 * 8
2605
+ };
2606
+ function formatDurationSeconds(totalSeconds) {
2607
+ if (totalSeconds < 1) return `${(totalSeconds * 1e3).toFixed(0)}ms`;
2608
+ if (totalSeconds < 60) {
2609
+ const decimals = totalSeconds < 10 && totalSeconds % 1 !== 0 ? 1 : 0;
2610
+ return `${totalSeconds.toFixed(decimals)}s`;
2611
+ }
2612
+ const days = Math.floor(totalSeconds / 86400);
2613
+ const hours = Math.floor(totalSeconds % 86400 / 3600);
2614
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
2615
+ const seconds = Math.round(totalSeconds % 60);
2616
+ const parts = [];
2617
+ if (days > 0) parts.push(`${days}d`);
2618
+ if (hours > 0) parts.push(`${hours}h`);
2619
+ if (minutes > 0) parts.push(`${minutes}m`);
2620
+ if (seconds > 0 || parts.length === 0) parts.push(`${seconds}s`);
2621
+ return parts.join(" ");
2622
+ }
2623
+ function calculateTransferTime(fileSize, fileSizeUnit, speed, speedUnit) {
2624
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
2625
+ if (!Number.isFinite(speed) || speed <= 0) return { error: "Connection speed must be a positive number" };
2626
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
2627
+ if (!(speedUnit in SPEED_UNIT_BITS_PER_SECOND)) return { error: `Unsupported speed unit: ${speedUnit}` };
2628
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
2629
+ const speedBitsPerSecond = speed * SPEED_UNIT_BITS_PER_SECOND[speedUnit];
2630
+ const transferTimeSeconds = fileSizeBytes * 8 / speedBitsPerSecond;
2631
+ return {
2632
+ fileSizeBytes,
2633
+ speedBitsPerSecond,
2634
+ transferTimeSeconds,
2635
+ formattedTime: formatDurationSeconds(transferTimeSeconds)
2636
+ };
2637
+ }
2638
+ function calculateRequiredBandwidth(fileSize, fileSizeUnit, targetSeconds) {
2639
+ if (!Number.isFinite(fileSize) || fileSize <= 0) return { error: "File size must be a positive number" };
2640
+ if (!Number.isFinite(targetSeconds) || targetSeconds <= 0) {
2641
+ return { error: "Target time must be a positive number of seconds" };
2642
+ }
2643
+ if (!(fileSizeUnit in FILE_SIZE_UNIT_BYTES)) return { error: `Unsupported file size unit: ${fileSizeUnit}` };
2644
+ const fileSizeBytes = fileSize * FILE_SIZE_UNIT_BYTES[fileSizeUnit];
2645
+ const requiredBitsPerSecond = fileSizeBytes * 8 / targetSeconds;
2646
+ return {
2647
+ fileSizeBytes,
2648
+ targetSeconds,
2649
+ requiredBitsPerSecond,
2650
+ requiredMbps: requiredBitsPerSecond / 1e6,
2651
+ requiredMBps: requiredBitsPerSecond / 8 / 1e6
2652
+ };
2653
+ }
2591
2654
 
2592
2655
  exports.BASE_LABELS = BASE_LABELS;
2593
2656
  exports.BASE_PREFIXES = BASE_PREFIXES;
@@ -2630,6 +2693,7 @@ exports.calculateMortgagePoints = calculateMortgagePoints;
2630
2693
  exports.calculateMovingAverages = calculateMovingAverages;
2631
2694
  exports.calculatePaybackPeriod = calculatePaybackPeriod;
2632
2695
  exports.calculatePercentageChange = calculatePercentageChange;
2696
+ exports.calculateRequiredBandwidth = calculateRequiredBandwidth;
2633
2697
  exports.calculateRoi = calculateRoi;
2634
2698
  exports.calculateRuleOf72 = calculateRuleOf72;
2635
2699
  exports.calculateSavingsGoal = calculateSavingsGoal;
@@ -2638,6 +2702,7 @@ exports.calculateTax = calculateTax;
2638
2702
  exports.calculateTaxEquivalentYield = calculateTaxEquivalentYield;
2639
2703
  exports.calculateTimeValue = calculateTimeValue;
2640
2704
  exports.calculateTipSplit = calculateTipSplit;
2705
+ exports.calculateTransferTime = calculateTransferTime;
2641
2706
  exports.calculateVideoBitrate = calculateVideoBitrate;
2642
2707
  exports.compareSemver = compareSemver;
2643
2708
  exports.compareUnitPrices = compareUnitPrices;
@@ -1 +1 @@
1
- export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as IsinValidationResult, ah as LoanBalanceInput, ai as LoanBalanceResult, aj as LoanPrepaymentPenaltyResult, ak as LoanRefinanceResult, al as LoanResult, am as MarginMarkupField, an as MarginMarkupInput, ao as MarginMarkupResult, ap as MortgagePointsResult, aq as MovingAveragePoint, ar as MovingAverageResult, as as NotationStyle, at as NumberBase, au as PaybackPeriodInput, av as PaybackPeriodResult, aw as PercentChangeDirection, ax as PercentageChangeResult, ay as Permission, az as PrepaymentPenaltyType, aA as PxConvertResult, aB as RoiInput, aC as RoiResult, aD as RuleOf72Direction, aE as RuleOf72Result, aF as SavingsGoalInput, aG as SavingsGoalMode, aH as SavingsGoalResult, aI as SemverVersion, aJ as SimpleInterestResult, aK as SubnetInfo, aL as SuccessiveDiscountResult, aM as SuccessiveDiscountStep, aN as TaxDirection, aO as TaxEquivalentYieldDirection, aP as TaxEquivalentYieldResult, aQ as TaxResult, aR as TimeValueDirection, aS as TimeValueResult, aT as TipSplitResult, aU as USD_DENOMINATIONS, aV as UnitPriceItem, aW as UnitPriceResult, aX as UtilizationTier, aY as VideoBitrateInput, aZ as VideoBitrateMode, a_ as VideoBitrateResult, a$ as ViewportConvertResult, b0 as VinValidationResult, b1 as applySuccessiveDiscounts, b2 as autoFormat, b3 as bumpVersion, b4 as calcAspectRatio, b5 as calcSubnet, b6 as calculateBlendedLoanRate, b7 as calculateBreakEven, b8 as calculateCashBreakdown, b9 as calculateCashRounding, ba as calculateCdMaturity, bb as calculateChange, bc as calculateCompoundInterest, bd as calculateCreditUtilization, be as calculateDebtToIncomeRatio, bf as calculateDepreciationSchedule, bg as calculateDiscount, bh as calculateEmi, bi as calculateExtraPaymentPayoff, bj as calculateFreelancerRate, bk as calculateGpa, bl as calculateLoan, bm as calculateLoanPrepaymentPenalty, bn as calculateLoanRefinance, bo as calculateMarginMarkup, bp as calculateMortgagePoints, bq as calculateMovingAverages, br as calculatePaybackPeriod, bs as calculatePercentageChange, bt as calculateRoi, bu as calculateRuleOf72, bv as calculateSavingsGoal, bw as calculateSimpleInterest, bx as calculateTax, by as calculateTaxEquivalentYield, bz as calculateTimeValue, bA as calculateTipSplit, bB as calculateVideoBitrate, bC as compareSemver, bD as compareUnitPrices, bE as convert, bF as convertAprApy, bG as convertBytes, bH as convertIp, bI as coverBox, bJ as decimalToIp, bK as decimalToIpCidr, bL as describePermissions, bM as fitIntoBox, bN as formatNumber, bO as formatValue, bP as formatVwValue, bQ as formatWithSeparator, bR as gcd, bS as ipFromBinary, bT as ipFromDecimal, bU as ipFromHex, bV as ipToBinary, bW as ipToDecimal, bX as ipToDecimalCidr, bY as ipToHex, bZ as ipToOctal, b_ as isValid, b$ as isValidCidr, c0 as isValidIp, c1 as isValidIpv4, c2 as marginToMarkup, c3 as markupToMargin, c4 as octalToPermissions, c5 as parseFileSize, c6 as parseInput, c7 as parseNumberString, c8 as parseSemver, c9 as permissionsToChmod, ca as permissionsToOctal, cb as permissionsToSymbolic, cc as planDebtPayoff, cd as ptToPx, ce as pxToAll, cf as pxToViewport, cg as remToPx, ch as satisfiesRange, ci as scaleByHeight, cj as scaleByWidth, ck as sortVersions, cl as splitSubnet, cm as symbolicToPermissions, cn as validateBarcode, co as validateCardNumber, cp as validateIban, cq as validateIsbn, cr as validateIsin, cs as validateVin, ct as viewportToPx } from '../units-BAwyBk4x.cjs';
1
+ export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FileSizeUnit, a6 as FormatOptions, a7 as FreelancerRateInput, a8 as FreelancerRateResult, a9 as GPA_GRADE_POINTS, aa as GpaCourse, ab as GpaCourseResult, ac as GpaResult, ad as IbanValidationResult, ae as IpConversion, af as IsbnFormat, ag as IsbnResult, ah as IsinValidationResult, ai as LoanBalanceInput, aj as LoanBalanceResult, ak as LoanPrepaymentPenaltyResult, al as LoanRefinanceResult, am as LoanResult, an as MarginMarkupField, ao as MarginMarkupInput, ap as MarginMarkupResult, aq as MortgagePointsResult, ar as MovingAveragePoint, as as MovingAverageResult, at as NotationStyle, au as NumberBase, av as PaybackPeriodInput, aw as PaybackPeriodResult, ax as PercentChangeDirection, ay as PercentageChangeResult, az as Permission, aA as PrepaymentPenaltyType, aB as PxConvertResult, aC as RequiredBandwidthResult, aD as RoiInput, aE as RoiResult, aF as RuleOf72Direction, aG as RuleOf72Result, aH as SavingsGoalInput, aI as SavingsGoalMode, aJ as SavingsGoalResult, aK as SemverVersion, aL as SimpleInterestResult, aM as SubnetInfo, aN as SuccessiveDiscountResult, aO as SuccessiveDiscountStep, aP as TaxDirection, aQ as TaxEquivalentYieldDirection, aR as TaxEquivalentYieldResult, aS as TaxResult, aT as TimeValueDirection, aU as TimeValueResult, aV as TipSplitResult, aW as TransferSpeedUnit, aX as TransferTimeResult, aY as USD_DENOMINATIONS, aZ as UnitPriceItem, a_ as UnitPriceResult, a$ as UtilizationTier, b0 as VideoBitrateInput, b1 as VideoBitrateMode, b2 as VideoBitrateResult, b3 as ViewportConvertResult, b4 as VinValidationResult, b5 as applySuccessiveDiscounts, b6 as autoFormat, b7 as bumpVersion, b8 as calcAspectRatio, b9 as calcSubnet, ba as calculateBlendedLoanRate, bb as calculateBreakEven, bc as calculateCashBreakdown, bd as calculateCashRounding, be as calculateCdMaturity, bf as calculateChange, bg as calculateCompoundInterest, bh as calculateCreditUtilization, bi as calculateDebtToIncomeRatio, bj as calculateDepreciationSchedule, bk as calculateDiscount, bl as calculateEmi, bm as calculateExtraPaymentPayoff, bn as calculateFreelancerRate, bo as calculateGpa, bp as calculateLoan, bq as calculateLoanPrepaymentPenalty, br as calculateLoanRefinance, bs as calculateMarginMarkup, bt as calculateMortgagePoints, bu as calculateMovingAverages, bv as calculatePaybackPeriod, bw as calculatePercentageChange, bx as calculateRequiredBandwidth, by as calculateRoi, bz as calculateRuleOf72, bA as calculateSavingsGoal, bB as calculateSimpleInterest, bC as calculateTax, bD as calculateTaxEquivalentYield, bE as calculateTimeValue, bF as calculateTipSplit, bG as calculateTransferTime, bH as calculateVideoBitrate, bI as compareSemver, bJ as compareUnitPrices, bK as convert, bL as convertAprApy, bM as convertBytes, bN as convertIp, bO as coverBox, bP as decimalToIp, bQ as decimalToIpCidr, bR as describePermissions, bS as fitIntoBox, bT as formatNumber, bU as formatValue, bV as formatVwValue, bW as formatWithSeparator, bX as gcd, bY as ipFromBinary, bZ as ipFromDecimal, b_ as ipFromHex, b$ as ipToBinary, c0 as ipToDecimal, c1 as ipToDecimalCidr, c2 as ipToHex, c3 as ipToOctal, c4 as isValid, c5 as isValidCidr, c6 as isValidIp, c7 as isValidIpv4, c8 as marginToMarkup, c9 as markupToMargin, ca as octalToPermissions, cb as parseFileSize, cc as parseInput, cd as parseNumberString, ce as parseSemver, cf as permissionsToChmod, cg as permissionsToOctal, ch as permissionsToSymbolic, ci as planDebtPayoff, cj as ptToPx, ck as pxToAll, cl as pxToViewport, cm as remToPx, cn as satisfiesRange, co as scaleByHeight, cp as scaleByWidth, cq as sortVersions, cr as splitSubnet, cs as symbolicToPermissions, ct as validateBarcode, cu as validateCardNumber, cv as validateIban, cw as validateIsbn, cx as validateIsin, cy as validateVin, cz as viewportToPx } from '../units-BqegyALA.cjs';
@@ -1 +1 @@
1
- export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as IsinValidationResult, ah as LoanBalanceInput, ai as LoanBalanceResult, aj as LoanPrepaymentPenaltyResult, ak as LoanRefinanceResult, al as LoanResult, am as MarginMarkupField, an as MarginMarkupInput, ao as MarginMarkupResult, ap as MortgagePointsResult, aq as MovingAveragePoint, ar as MovingAverageResult, as as NotationStyle, at as NumberBase, au as PaybackPeriodInput, av as PaybackPeriodResult, aw as PercentChangeDirection, ax as PercentageChangeResult, ay as Permission, az as PrepaymentPenaltyType, aA as PxConvertResult, aB as RoiInput, aC as RoiResult, aD as RuleOf72Direction, aE as RuleOf72Result, aF as SavingsGoalInput, aG as SavingsGoalMode, aH as SavingsGoalResult, aI as SemverVersion, aJ as SimpleInterestResult, aK as SubnetInfo, aL as SuccessiveDiscountResult, aM as SuccessiveDiscountStep, aN as TaxDirection, aO as TaxEquivalentYieldDirection, aP as TaxEquivalentYieldResult, aQ as TaxResult, aR as TimeValueDirection, aS as TimeValueResult, aT as TipSplitResult, aU as USD_DENOMINATIONS, aV as UnitPriceItem, aW as UnitPriceResult, aX as UtilizationTier, aY as VideoBitrateInput, aZ as VideoBitrateMode, a_ as VideoBitrateResult, a$ as ViewportConvertResult, b0 as VinValidationResult, b1 as applySuccessiveDiscounts, b2 as autoFormat, b3 as bumpVersion, b4 as calcAspectRatio, b5 as calcSubnet, b6 as calculateBlendedLoanRate, b7 as calculateBreakEven, b8 as calculateCashBreakdown, b9 as calculateCashRounding, ba as calculateCdMaturity, bb as calculateChange, bc as calculateCompoundInterest, bd as calculateCreditUtilization, be as calculateDebtToIncomeRatio, bf as calculateDepreciationSchedule, bg as calculateDiscount, bh as calculateEmi, bi as calculateExtraPaymentPayoff, bj as calculateFreelancerRate, bk as calculateGpa, bl as calculateLoan, bm as calculateLoanPrepaymentPenalty, bn as calculateLoanRefinance, bo as calculateMarginMarkup, bp as calculateMortgagePoints, bq as calculateMovingAverages, br as calculatePaybackPeriod, bs as calculatePercentageChange, bt as calculateRoi, bu as calculateRuleOf72, bv as calculateSavingsGoal, bw as calculateSimpleInterest, bx as calculateTax, by as calculateTaxEquivalentYield, bz as calculateTimeValue, bA as calculateTipSplit, bB as calculateVideoBitrate, bC as compareSemver, bD as compareUnitPrices, bE as convert, bF as convertAprApy, bG as convertBytes, bH as convertIp, bI as coverBox, bJ as decimalToIp, bK as decimalToIpCidr, bL as describePermissions, bM as fitIntoBox, bN as formatNumber, bO as formatValue, bP as formatVwValue, bQ as formatWithSeparator, bR as gcd, bS as ipFromBinary, bT as ipFromDecimal, bU as ipFromHex, bV as ipToBinary, bW as ipToDecimal, bX as ipToDecimalCidr, bY as ipToHex, bZ as ipToOctal, b_ as isValid, b$ as isValidCidr, c0 as isValidIp, c1 as isValidIpv4, c2 as marginToMarkup, c3 as markupToMargin, c4 as octalToPermissions, c5 as parseFileSize, c6 as parseInput, c7 as parseNumberString, c8 as parseSemver, c9 as permissionsToChmod, ca as permissionsToOctal, cb as permissionsToSymbolic, cc as planDebtPayoff, cd as ptToPx, ce as pxToAll, cf as pxToViewport, cg as remToPx, ch as satisfiesRange, ci as scaleByHeight, cj as scaleByWidth, ck as sortVersions, cl as splitSubnet, cm as symbolicToPermissions, cn as validateBarcode, co as validateCardNumber, cp as validateIban, cq as validateIsbn, cr as validateIsin, cs as validateVin, ct as viewportToPx } from '../units-BAwyBk4x.js';
1
+ export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FileSizeUnit, a6 as FormatOptions, a7 as FreelancerRateInput, a8 as FreelancerRateResult, a9 as GPA_GRADE_POINTS, aa as GpaCourse, ab as GpaCourseResult, ac as GpaResult, ad as IbanValidationResult, ae as IpConversion, af as IsbnFormat, ag as IsbnResult, ah as IsinValidationResult, ai as LoanBalanceInput, aj as LoanBalanceResult, ak as LoanPrepaymentPenaltyResult, al as LoanRefinanceResult, am as LoanResult, an as MarginMarkupField, ao as MarginMarkupInput, ap as MarginMarkupResult, aq as MortgagePointsResult, ar as MovingAveragePoint, as as MovingAverageResult, at as NotationStyle, au as NumberBase, av as PaybackPeriodInput, aw as PaybackPeriodResult, ax as PercentChangeDirection, ay as PercentageChangeResult, az as Permission, aA as PrepaymentPenaltyType, aB as PxConvertResult, aC as RequiredBandwidthResult, aD as RoiInput, aE as RoiResult, aF as RuleOf72Direction, aG as RuleOf72Result, aH as SavingsGoalInput, aI as SavingsGoalMode, aJ as SavingsGoalResult, aK as SemverVersion, aL as SimpleInterestResult, aM as SubnetInfo, aN as SuccessiveDiscountResult, aO as SuccessiveDiscountStep, aP as TaxDirection, aQ as TaxEquivalentYieldDirection, aR as TaxEquivalentYieldResult, aS as TaxResult, aT as TimeValueDirection, aU as TimeValueResult, aV as TipSplitResult, aW as TransferSpeedUnit, aX as TransferTimeResult, aY as USD_DENOMINATIONS, aZ as UnitPriceItem, a_ as UnitPriceResult, a$ as UtilizationTier, b0 as VideoBitrateInput, b1 as VideoBitrateMode, b2 as VideoBitrateResult, b3 as ViewportConvertResult, b4 as VinValidationResult, b5 as applySuccessiveDiscounts, b6 as autoFormat, b7 as bumpVersion, b8 as calcAspectRatio, b9 as calcSubnet, ba as calculateBlendedLoanRate, bb as calculateBreakEven, bc as calculateCashBreakdown, bd as calculateCashRounding, be as calculateCdMaturity, bf as calculateChange, bg as calculateCompoundInterest, bh as calculateCreditUtilization, bi as calculateDebtToIncomeRatio, bj as calculateDepreciationSchedule, bk as calculateDiscount, bl as calculateEmi, bm as calculateExtraPaymentPayoff, bn as calculateFreelancerRate, bo as calculateGpa, bp as calculateLoan, bq as calculateLoanPrepaymentPenalty, br as calculateLoanRefinance, bs as calculateMarginMarkup, bt as calculateMortgagePoints, bu as calculateMovingAverages, bv as calculatePaybackPeriod, bw as calculatePercentageChange, bx as calculateRequiredBandwidth, by as calculateRoi, bz as calculateRuleOf72, bA as calculateSavingsGoal, bB as calculateSimpleInterest, bC as calculateTax, bD as calculateTaxEquivalentYield, bE as calculateTimeValue, bF as calculateTipSplit, bG as calculateTransferTime, bH as calculateVideoBitrate, bI as compareSemver, bJ as compareUnitPrices, bK as convert, bL as convertAprApy, bM as convertBytes, bN as convertIp, bO as coverBox, bP as decimalToIp, bQ as decimalToIpCidr, bR as describePermissions, bS as fitIntoBox, bT as formatNumber, bU as formatValue, bV as formatVwValue, bW as formatWithSeparator, bX as gcd, bY as ipFromBinary, bZ as ipFromDecimal, b_ as ipFromHex, b$ as ipToBinary, c0 as ipToDecimal, c1 as ipToDecimalCidr, c2 as ipToHex, c3 as ipToOctal, c4 as isValid, c5 as isValidCidr, c6 as isValidIp, c7 as isValidIpv4, c8 as marginToMarkup, c9 as markupToMargin, ca as octalToPermissions, cb as parseFileSize, cc as parseInput, cd as parseNumberString, ce as parseSemver, cf as permissionsToChmod, cg as permissionsToOctal, ch as permissionsToSymbolic, ci as planDebtPayoff, cj as ptToPx, ck as pxToAll, cl as pxToViewport, cm as remToPx, cn as satisfiesRange, co as scaleByHeight, cp as scaleByWidth, cq as sortVersions, cr as splitSubnet, cs as symbolicToPermissions, ct as validateBarcode, cu as validateCardNumber, cv as validateIban, cw as validateIsbn, cx as validateIsin, cy as validateVin, cz as viewportToPx } from '../units-BqegyALA.js';
@@ -1,2 +1,2 @@
1
- export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx } from '../chunk-AKVWWLNJ.js';
1
+ export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx } from '../chunk-RP574L5Z.js';
2
2
  import '../chunk-MLKGABMK.js';
@@ -45,6 +45,7 @@
45
45
  * - isin-validator : validateIsin
46
46
  * - mortgage-points-calculator : calculateMortgagePoints
47
47
  * - loan-prepayment-penalty-calculator : calculateLoanPrepaymentPenalty
48
+ * - data-transfer-time-estimator : calculateTransferTime, calculateRequiredBandwidth
48
49
  */
49
50
  interface PxConvertResult {
50
51
  px: number;
@@ -1283,6 +1284,39 @@ declare function calculateLoanPrepaymentPenalty(payoffBalance: number, penaltyTy
1283
1284
  }): LoanPrepaymentPenaltyResult | {
1284
1285
  error: string;
1285
1286
  };
1287
+ type FileSizeUnit = "B" | "KB" | "MB" | "GB" | "TB";
1288
+ type TransferSpeedUnit = "Kbps" | "Mbps" | "Gbps" | "KBps" | "MBps" | "GBps";
1289
+ interface TransferTimeResult {
1290
+ fileSizeBytes: number;
1291
+ speedBitsPerSecond: number;
1292
+ transferTimeSeconds: number;
1293
+ formattedTime: string;
1294
+ }
1295
+ /**
1296
+ * Estimates the theoretical time to transfer a file of a given size over a
1297
+ * connection of a given speed. File size units are decimal/SI (1 MB =
1298
+ * 1,000,000 bytes) and speed units follow standard networking convention
1299
+ * (Mbps = megabits/second, MBps = megabytes/second), matching how ISPs and
1300
+ * browsers report each. This is a theoretical ceiling: protocol overhead,
1301
+ * latency, and real-world throughput variance are not modeled.
1302
+ */
1303
+ declare function calculateTransferTime(fileSize: number, fileSizeUnit: FileSizeUnit, speed: number, speedUnit: TransferSpeedUnit): TransferTimeResult | {
1304
+ error: string;
1305
+ };
1306
+ interface RequiredBandwidthResult {
1307
+ fileSizeBytes: number;
1308
+ targetSeconds: number;
1309
+ requiredBitsPerSecond: number;
1310
+ requiredMbps: number;
1311
+ requiredMBps: number;
1312
+ }
1313
+ /**
1314
+ * The reverse calculation: given a file size and a target transfer time,
1315
+ * computes the minimum connection speed required to hit that target.
1316
+ */
1317
+ declare function calculateRequiredBandwidth(fileSize: number, fileSizeUnit: FileSizeUnit, targetSeconds: number): RequiredBandwidthResult | {
1318
+ error: string;
1319
+ };
1286
1320
 
1287
1321
  type units_AmortizationRow = AmortizationRow;
1288
1322
  type units_AprApyDirection = AprApyDirection;
@@ -1342,6 +1376,7 @@ type units_EmiTenureUnit = EmiTenureUnit;
1342
1376
  type units_EmiYearlyBreakdownRow = EmiYearlyBreakdownRow;
1343
1377
  type units_ExtraPaymentPayoffResult = ExtraPaymentPayoffResult;
1344
1378
  type units_FilePermissions = FilePermissions;
1379
+ type units_FileSizeUnit = FileSizeUnit;
1345
1380
  type units_FormatOptions = FormatOptions;
1346
1381
  type units_FreelancerRateInput = FreelancerRateInput;
1347
1382
  type units_FreelancerRateResult = FreelancerRateResult;
@@ -1374,6 +1409,7 @@ type units_PercentageChangeResult = PercentageChangeResult;
1374
1409
  type units_Permission = Permission;
1375
1410
  type units_PrepaymentPenaltyType = PrepaymentPenaltyType;
1376
1411
  type units_PxConvertResult = PxConvertResult;
1412
+ type units_RequiredBandwidthResult = RequiredBandwidthResult;
1377
1413
  type units_RoiInput = RoiInput;
1378
1414
  type units_RoiResult = RoiResult;
1379
1415
  type units_RuleOf72Direction = RuleOf72Direction;
@@ -1393,6 +1429,8 @@ type units_TaxResult = TaxResult;
1393
1429
  type units_TimeValueDirection = TimeValueDirection;
1394
1430
  type units_TimeValueResult = TimeValueResult;
1395
1431
  type units_TipSplitResult = TipSplitResult;
1432
+ type units_TransferSpeedUnit = TransferSpeedUnit;
1433
+ type units_TransferTimeResult = TransferTimeResult;
1396
1434
  declare const units_USD_DENOMINATIONS: typeof USD_DENOMINATIONS;
1397
1435
  type units_UnitPriceItem = UnitPriceItem;
1398
1436
  type units_UnitPriceResult = UnitPriceResult;
@@ -1430,6 +1468,7 @@ declare const units_calculateMortgagePoints: typeof calculateMortgagePoints;
1430
1468
  declare const units_calculateMovingAverages: typeof calculateMovingAverages;
1431
1469
  declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
1432
1470
  declare const units_calculatePercentageChange: typeof calculatePercentageChange;
1471
+ declare const units_calculateRequiredBandwidth: typeof calculateRequiredBandwidth;
1433
1472
  declare const units_calculateRoi: typeof calculateRoi;
1434
1473
  declare const units_calculateRuleOf72: typeof calculateRuleOf72;
1435
1474
  declare const units_calculateSavingsGoal: typeof calculateSavingsGoal;
@@ -1438,6 +1477,7 @@ declare const units_calculateTax: typeof calculateTax;
1438
1477
  declare const units_calculateTaxEquivalentYield: typeof calculateTaxEquivalentYield;
1439
1478
  declare const units_calculateTimeValue: typeof calculateTimeValue;
1440
1479
  declare const units_calculateTipSplit: typeof calculateTipSplit;
1480
+ declare const units_calculateTransferTime: typeof calculateTransferTime;
1441
1481
  declare const units_calculateVideoBitrate: typeof calculateVideoBitrate;
1442
1482
  declare const units_compareSemver: typeof compareSemver;
1443
1483
  declare const units_compareUnitPrices: typeof compareUnitPrices;
@@ -1496,7 +1536,7 @@ declare const units_validateIsin: typeof validateIsin;
1496
1536
  declare const units_validateVin: typeof validateVin;
1497
1537
  declare const units_viewportToPx: typeof viewportToPx;
1498
1538
  declare namespace units {
1499
- export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BlendedLoanRateResult as BlendedLoanRateResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtPayoffComparison as DebtPayoffComparison, type units_DebtPayoffInput as DebtPayoffInput, type units_DebtPayoffPlanResult as DebtPayoffPlanResult, type units_DebtPayoffScheduleEntry as DebtPayoffScheduleEntry, type units_DebtPayoffStrategy as DebtPayoffStrategy, type units_DebtPayoffStrategyResult as DebtPayoffStrategyResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_DtiTier as DtiTier, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_ExtraPaymentPayoffResult as ExtraPaymentPayoffResult, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_FreelancerRateInput as FreelancerRateInput, type units_FreelancerRateResult as FreelancerRateResult, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_IsinValidationResult as IsinValidationResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanPrepaymentPenaltyResult as LoanPrepaymentPenaltyResult, type units_LoanRefinanceResult as LoanRefinanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MortgagePointsResult as MortgagePointsResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PrepaymentPenaltyType as PrepaymentPenaltyType, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxEquivalentYieldDirection as TaxEquivalentYieldDirection, type units_TaxEquivalentYieldResult as TaxEquivalentYieldResult, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, type units_VinValidationResult as VinValidationResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBlendedLoanRate as calculateBlendedLoanRate, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateExtraPaymentPayoff as calculateExtraPaymentPayoff, units_calculateFreelancerRate as calculateFreelancerRate, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateLoanPrepaymentPenalty as calculateLoanPrepaymentPenalty, units_calculateLoanRefinance as calculateLoanRefinance, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMortgagePoints as calculateMortgagePoints, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTaxEquivalentYield as calculateTaxEquivalentYield, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_planDebtPayoff as planDebtPayoff, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_validateIsin as validateIsin, units_validateVin as validateVin, units_viewportToPx as viewportToPx };
1539
+ export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BlendedLoanRateResult as BlendedLoanRateResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtPayoffComparison as DebtPayoffComparison, type units_DebtPayoffInput as DebtPayoffInput, type units_DebtPayoffPlanResult as DebtPayoffPlanResult, type units_DebtPayoffScheduleEntry as DebtPayoffScheduleEntry, type units_DebtPayoffStrategy as DebtPayoffStrategy, type units_DebtPayoffStrategyResult as DebtPayoffStrategyResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_DtiTier as DtiTier, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_ExtraPaymentPayoffResult as ExtraPaymentPayoffResult, type units_FilePermissions as FilePermissions, type units_FileSizeUnit as FileSizeUnit, type units_FormatOptions as FormatOptions, type units_FreelancerRateInput as FreelancerRateInput, type units_FreelancerRateResult as FreelancerRateResult, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_IsinValidationResult as IsinValidationResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanPrepaymentPenaltyResult as LoanPrepaymentPenaltyResult, type units_LoanRefinanceResult as LoanRefinanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MortgagePointsResult as MortgagePointsResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PrepaymentPenaltyType as PrepaymentPenaltyType, type units_PxConvertResult as PxConvertResult, type units_RequiredBandwidthResult as RequiredBandwidthResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxEquivalentYieldDirection as TaxEquivalentYieldDirection, type units_TaxEquivalentYieldResult as TaxEquivalentYieldResult, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, type units_TransferSpeedUnit as TransferSpeedUnit, type units_TransferTimeResult as TransferTimeResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, type units_VinValidationResult as VinValidationResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBlendedLoanRate as calculateBlendedLoanRate, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateExtraPaymentPayoff as calculateExtraPaymentPayoff, units_calculateFreelancerRate as calculateFreelancerRate, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateLoanPrepaymentPenalty as calculateLoanPrepaymentPenalty, units_calculateLoanRefinance as calculateLoanRefinance, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMortgagePoints as calculateMortgagePoints, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRequiredBandwidth as calculateRequiredBandwidth, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTaxEquivalentYield as calculateTaxEquivalentYield, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateTransferTime as calculateTransferTime, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_planDebtPayoff as planDebtPayoff, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_validateIsin as validateIsin, units_validateVin as validateVin, units_viewportToPx as viewportToPx };
1500
1540
  }
1501
1541
 
1502
- export { type DtiTier as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtPayoffComparison as N, type DebtPayoffInput as O, type DebtPayoffPlanResult as P, type DebtPayoffScheduleEntry as Q, type DebtPayoffStrategy as R, type DebtPayoffStrategyResult as S, type DebtToIncomeRatioResult as T, type DepreciationMethod as U, type DepreciationResult as V, type DepreciationYear as W, type Dimensions as X, type DiscountField as Y, type DiscountInput as Z, type DiscountResult as _, type AprApyDirection as a, type ViewportConvertResult as a$, type EmiResult as a0, type EmiTenureUnit as a1, type EmiYearlyBreakdownRow as a2, type ExtraPaymentPayoffResult as a3, type FilePermissions as a4, type FormatOptions as a5, type FreelancerRateInput as a6, type FreelancerRateResult as a7, GPA_GRADE_POINTS as a8, type GpaCourse as a9, type PxConvertResult as aA, type RoiInput as aB, type RoiResult as aC, type RuleOf72Direction as aD, type RuleOf72Result as aE, type SavingsGoalInput as aF, type SavingsGoalMode as aG, type SavingsGoalResult as aH, type SemverVersion as aI, type SimpleInterestResult as aJ, type SubnetInfo as aK, type SuccessiveDiscountResult as aL, type SuccessiveDiscountStep as aM, type TaxDirection as aN, type TaxEquivalentYieldDirection as aO, type TaxEquivalentYieldResult as aP, type TaxResult as aQ, type TimeValueDirection as aR, type TimeValueResult as aS, type TipSplitResult as aT, USD_DENOMINATIONS as aU, type UnitPriceItem as aV, type UnitPriceResult as aW, type UtilizationTier as aX, type VideoBitrateInput as aY, type VideoBitrateMode as aZ, type VideoBitrateResult as a_, type GpaCourseResult as aa, type GpaResult as ab, type IbanValidationResult as ac, type IpConversion as ad, type IsbnFormat as ae, type IsbnResult as af, type IsinValidationResult as ag, type LoanBalanceInput as ah, type LoanBalanceResult as ai, type LoanPrepaymentPenaltyResult as aj, type LoanRefinanceResult as ak, type LoanResult as al, type MarginMarkupField as am, type MarginMarkupInput as an, type MarginMarkupResult as ao, type MortgagePointsResult as ap, type MovingAveragePoint as aq, type MovingAverageResult as ar, type NotationStyle as as, type NumberBase as at, type PaybackPeriodInput as au, type PaybackPeriodResult as av, type PercentChangeDirection as aw, type PercentageChangeResult as ax, type Permission as ay, type PrepaymentPenaltyType as az, type AprApyResult as b, isValidCidr as b$, type VinValidationResult as b0, applySuccessiveDiscounts as b1, autoFormat as b2, bumpVersion as b3, calcAspectRatio as b4, calcSubnet as b5, calculateBlendedLoanRate as b6, calculateBreakEven as b7, calculateCashBreakdown as b8, calculateCashRounding as b9, calculateTipSplit as bA, calculateVideoBitrate as bB, compareSemver as bC, compareUnitPrices as bD, convert as bE, convertAprApy as bF, convertBytes as bG, convertIp as bH, coverBox as bI, decimalToIp as bJ, decimalToIpCidr as bK, describePermissions as bL, fitIntoBox as bM, formatNumber as bN, formatValue as bO, formatVwValue as bP, formatWithSeparator as bQ, gcd as bR, ipFromBinary as bS, ipFromDecimal as bT, ipFromHex as bU, ipToBinary as bV, ipToDecimal as bW, ipToDecimalCidr as bX, ipToHex as bY, ipToOctal as bZ, isValid as b_, calculateCdMaturity as ba, calculateChange as bb, calculateCompoundInterest as bc, calculateCreditUtilization as bd, calculateDebtToIncomeRatio as be, calculateDepreciationSchedule as bf, calculateDiscount as bg, calculateEmi as bh, calculateExtraPaymentPayoff as bi, calculateFreelancerRate as bj, calculateGpa as bk, calculateLoan as bl, calculateLoanPrepaymentPenalty as bm, calculateLoanRefinance as bn, calculateMarginMarkup as bo, calculateMortgagePoints as bp, calculateMovingAverages as bq, calculatePaybackPeriod as br, calculatePercentageChange as bs, calculateRoi as bt, calculateRuleOf72 as bu, calculateSavingsGoal as bv, calculateSimpleInterest as bw, calculateTax as bx, calculateTaxEquivalentYield as by, calculateTimeValue as bz, type AspectRatioResult as c, isValidIp as c0, isValidIpv4 as c1, marginToMarkup as c2, markupToMargin as c3, octalToPermissions as c4, parseFileSize as c5, parseInput as c6, parseNumberString as c7, parseSemver as c8, permissionsToChmod as c9, permissionsToOctal as ca, permissionsToSymbolic as cb, planDebtPayoff as cc, ptToPx as cd, pxToAll as ce, pxToViewport as cf, remToPx as cg, satisfiesRange as ch, scaleByHeight as ci, scaleByWidth as cj, sortVersions as ck, splitSubnet as cl, symbolicToPermissions as cm, validateBarcode as cn, validateCardNumber as co, validateIban as cp, validateIsbn as cq, validateIsin as cr, validateVin as cs, viewportToPx as ct, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
1542
+ export { type DtiTier as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtPayoffComparison as N, type DebtPayoffInput as O, type DebtPayoffPlanResult as P, type DebtPayoffScheduleEntry as Q, type DebtPayoffStrategy as R, type DebtPayoffStrategyResult as S, type DebtToIncomeRatioResult as T, type DepreciationMethod as U, type DepreciationResult as V, type DepreciationYear as W, type Dimensions as X, type DiscountField as Y, type DiscountInput as Z, type DiscountResult as _, type AprApyDirection as a, type UtilizationTier as a$, type EmiResult as a0, type EmiTenureUnit as a1, type EmiYearlyBreakdownRow as a2, type ExtraPaymentPayoffResult as a3, type FilePermissions as a4, type FileSizeUnit as a5, type FormatOptions as a6, type FreelancerRateInput as a7, type FreelancerRateResult as a8, GPA_GRADE_POINTS as a9, type PrepaymentPenaltyType as aA, type PxConvertResult as aB, type RequiredBandwidthResult as aC, type RoiInput as aD, type RoiResult as aE, type RuleOf72Direction as aF, type RuleOf72Result as aG, type SavingsGoalInput as aH, type SavingsGoalMode as aI, type SavingsGoalResult as aJ, type SemverVersion as aK, type SimpleInterestResult as aL, type SubnetInfo as aM, type SuccessiveDiscountResult as aN, type SuccessiveDiscountStep as aO, type TaxDirection as aP, type TaxEquivalentYieldDirection as aQ, type TaxEquivalentYieldResult as aR, type TaxResult as aS, type TimeValueDirection as aT, type TimeValueResult as aU, type TipSplitResult as aV, type TransferSpeedUnit as aW, type TransferTimeResult as aX, USD_DENOMINATIONS as aY, type UnitPriceItem as aZ, type UnitPriceResult as a_, type GpaCourse as aa, type GpaCourseResult as ab, type GpaResult as ac, type IbanValidationResult as ad, type IpConversion as ae, type IsbnFormat as af, type IsbnResult as ag, type IsinValidationResult as ah, type LoanBalanceInput as ai, type LoanBalanceResult as aj, type LoanPrepaymentPenaltyResult as ak, type LoanRefinanceResult as al, type LoanResult as am, type MarginMarkupField as an, type MarginMarkupInput as ao, type MarginMarkupResult as ap, type MortgagePointsResult as aq, type MovingAveragePoint as ar, type MovingAverageResult as as, type NotationStyle as at, type NumberBase as au, type PaybackPeriodInput as av, type PaybackPeriodResult as aw, type PercentChangeDirection as ax, type PercentageChangeResult as ay, type Permission as az, type AprApyResult as b, ipToBinary as b$, type VideoBitrateInput as b0, type VideoBitrateMode as b1, type VideoBitrateResult as b2, type ViewportConvertResult as b3, type VinValidationResult as b4, applySuccessiveDiscounts as b5, autoFormat as b6, bumpVersion as b7, calcAspectRatio as b8, calcSubnet as b9, calculateSavingsGoal as bA, calculateSimpleInterest as bB, calculateTax as bC, calculateTaxEquivalentYield as bD, calculateTimeValue as bE, calculateTipSplit as bF, calculateTransferTime as bG, calculateVideoBitrate as bH, compareSemver as bI, compareUnitPrices as bJ, convert as bK, convertAprApy as bL, convertBytes as bM, convertIp as bN, coverBox as bO, decimalToIp as bP, decimalToIpCidr as bQ, describePermissions as bR, fitIntoBox as bS, formatNumber as bT, formatValue as bU, formatVwValue as bV, formatWithSeparator as bW, gcd as bX, ipFromBinary as bY, ipFromDecimal as bZ, ipFromHex as b_, calculateBlendedLoanRate as ba, calculateBreakEven as bb, calculateCashBreakdown as bc, calculateCashRounding as bd, calculateCdMaturity as be, calculateChange as bf, calculateCompoundInterest as bg, calculateCreditUtilization as bh, calculateDebtToIncomeRatio as bi, calculateDepreciationSchedule as bj, calculateDiscount as bk, calculateEmi as bl, calculateExtraPaymentPayoff as bm, calculateFreelancerRate as bn, calculateGpa as bo, calculateLoan as bp, calculateLoanPrepaymentPenalty as bq, calculateLoanRefinance as br, calculateMarginMarkup as bs, calculateMortgagePoints as bt, calculateMovingAverages as bu, calculatePaybackPeriod as bv, calculatePercentageChange as bw, calculateRequiredBandwidth as bx, calculateRoi as by, calculateRuleOf72 as bz, type AspectRatioResult as c, ipToDecimal as c0, ipToDecimalCidr as c1, ipToHex as c2, ipToOctal as c3, isValid as c4, isValidCidr as c5, isValidIp as c6, isValidIpv4 as c7, marginToMarkup as c8, markupToMargin as c9, octalToPermissions as ca, parseFileSize as cb, parseInput as cc, parseNumberString as cd, parseSemver as ce, permissionsToChmod as cf, permissionsToOctal as cg, permissionsToSymbolic as ch, planDebtPayoff as ci, ptToPx as cj, pxToAll as ck, pxToViewport as cl, remToPx as cm, satisfiesRange as cn, scaleByHeight as co, scaleByWidth as cp, sortVersions as cq, splitSubnet as cr, symbolicToPermissions as cs, validateBarcode as ct, validateCardNumber as cu, validateIban as cv, validateIsbn as cw, validateIsin as cx, validateVin as cy, viewportToPx as cz, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
@@ -45,6 +45,7 @@
45
45
  * - isin-validator : validateIsin
46
46
  * - mortgage-points-calculator : calculateMortgagePoints
47
47
  * - loan-prepayment-penalty-calculator : calculateLoanPrepaymentPenalty
48
+ * - data-transfer-time-estimator : calculateTransferTime, calculateRequiredBandwidth
48
49
  */
49
50
  interface PxConvertResult {
50
51
  px: number;
@@ -1283,6 +1284,39 @@ declare function calculateLoanPrepaymentPenalty(payoffBalance: number, penaltyTy
1283
1284
  }): LoanPrepaymentPenaltyResult | {
1284
1285
  error: string;
1285
1286
  };
1287
+ type FileSizeUnit = "B" | "KB" | "MB" | "GB" | "TB";
1288
+ type TransferSpeedUnit = "Kbps" | "Mbps" | "Gbps" | "KBps" | "MBps" | "GBps";
1289
+ interface TransferTimeResult {
1290
+ fileSizeBytes: number;
1291
+ speedBitsPerSecond: number;
1292
+ transferTimeSeconds: number;
1293
+ formattedTime: string;
1294
+ }
1295
+ /**
1296
+ * Estimates the theoretical time to transfer a file of a given size over a
1297
+ * connection of a given speed. File size units are decimal/SI (1 MB =
1298
+ * 1,000,000 bytes) and speed units follow standard networking convention
1299
+ * (Mbps = megabits/second, MBps = megabytes/second), matching how ISPs and
1300
+ * browsers report each. This is a theoretical ceiling: protocol overhead,
1301
+ * latency, and real-world throughput variance are not modeled.
1302
+ */
1303
+ declare function calculateTransferTime(fileSize: number, fileSizeUnit: FileSizeUnit, speed: number, speedUnit: TransferSpeedUnit): TransferTimeResult | {
1304
+ error: string;
1305
+ };
1306
+ interface RequiredBandwidthResult {
1307
+ fileSizeBytes: number;
1308
+ targetSeconds: number;
1309
+ requiredBitsPerSecond: number;
1310
+ requiredMbps: number;
1311
+ requiredMBps: number;
1312
+ }
1313
+ /**
1314
+ * The reverse calculation: given a file size and a target transfer time,
1315
+ * computes the minimum connection speed required to hit that target.
1316
+ */
1317
+ declare function calculateRequiredBandwidth(fileSize: number, fileSizeUnit: FileSizeUnit, targetSeconds: number): RequiredBandwidthResult | {
1318
+ error: string;
1319
+ };
1286
1320
 
1287
1321
  type units_AmortizationRow = AmortizationRow;
1288
1322
  type units_AprApyDirection = AprApyDirection;
@@ -1342,6 +1376,7 @@ type units_EmiTenureUnit = EmiTenureUnit;
1342
1376
  type units_EmiYearlyBreakdownRow = EmiYearlyBreakdownRow;
1343
1377
  type units_ExtraPaymentPayoffResult = ExtraPaymentPayoffResult;
1344
1378
  type units_FilePermissions = FilePermissions;
1379
+ type units_FileSizeUnit = FileSizeUnit;
1345
1380
  type units_FormatOptions = FormatOptions;
1346
1381
  type units_FreelancerRateInput = FreelancerRateInput;
1347
1382
  type units_FreelancerRateResult = FreelancerRateResult;
@@ -1374,6 +1409,7 @@ type units_PercentageChangeResult = PercentageChangeResult;
1374
1409
  type units_Permission = Permission;
1375
1410
  type units_PrepaymentPenaltyType = PrepaymentPenaltyType;
1376
1411
  type units_PxConvertResult = PxConvertResult;
1412
+ type units_RequiredBandwidthResult = RequiredBandwidthResult;
1377
1413
  type units_RoiInput = RoiInput;
1378
1414
  type units_RoiResult = RoiResult;
1379
1415
  type units_RuleOf72Direction = RuleOf72Direction;
@@ -1393,6 +1429,8 @@ type units_TaxResult = TaxResult;
1393
1429
  type units_TimeValueDirection = TimeValueDirection;
1394
1430
  type units_TimeValueResult = TimeValueResult;
1395
1431
  type units_TipSplitResult = TipSplitResult;
1432
+ type units_TransferSpeedUnit = TransferSpeedUnit;
1433
+ type units_TransferTimeResult = TransferTimeResult;
1396
1434
  declare const units_USD_DENOMINATIONS: typeof USD_DENOMINATIONS;
1397
1435
  type units_UnitPriceItem = UnitPriceItem;
1398
1436
  type units_UnitPriceResult = UnitPriceResult;
@@ -1430,6 +1468,7 @@ declare const units_calculateMortgagePoints: typeof calculateMortgagePoints;
1430
1468
  declare const units_calculateMovingAverages: typeof calculateMovingAverages;
1431
1469
  declare const units_calculatePaybackPeriod: typeof calculatePaybackPeriod;
1432
1470
  declare const units_calculatePercentageChange: typeof calculatePercentageChange;
1471
+ declare const units_calculateRequiredBandwidth: typeof calculateRequiredBandwidth;
1433
1472
  declare const units_calculateRoi: typeof calculateRoi;
1434
1473
  declare const units_calculateRuleOf72: typeof calculateRuleOf72;
1435
1474
  declare const units_calculateSavingsGoal: typeof calculateSavingsGoal;
@@ -1438,6 +1477,7 @@ declare const units_calculateTax: typeof calculateTax;
1438
1477
  declare const units_calculateTaxEquivalentYield: typeof calculateTaxEquivalentYield;
1439
1478
  declare const units_calculateTimeValue: typeof calculateTimeValue;
1440
1479
  declare const units_calculateTipSplit: typeof calculateTipSplit;
1480
+ declare const units_calculateTransferTime: typeof calculateTransferTime;
1441
1481
  declare const units_calculateVideoBitrate: typeof calculateVideoBitrate;
1442
1482
  declare const units_compareSemver: typeof compareSemver;
1443
1483
  declare const units_compareUnitPrices: typeof compareUnitPrices;
@@ -1496,7 +1536,7 @@ declare const units_validateIsin: typeof validateIsin;
1496
1536
  declare const units_validateVin: typeof validateVin;
1497
1537
  declare const units_viewportToPx: typeof viewportToPx;
1498
1538
  declare namespace units {
1499
- export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BlendedLoanRateResult as BlendedLoanRateResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtPayoffComparison as DebtPayoffComparison, type units_DebtPayoffInput as DebtPayoffInput, type units_DebtPayoffPlanResult as DebtPayoffPlanResult, type units_DebtPayoffScheduleEntry as DebtPayoffScheduleEntry, type units_DebtPayoffStrategy as DebtPayoffStrategy, type units_DebtPayoffStrategyResult as DebtPayoffStrategyResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_DtiTier as DtiTier, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_ExtraPaymentPayoffResult as ExtraPaymentPayoffResult, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_FreelancerRateInput as FreelancerRateInput, type units_FreelancerRateResult as FreelancerRateResult, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_IsinValidationResult as IsinValidationResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanPrepaymentPenaltyResult as LoanPrepaymentPenaltyResult, type units_LoanRefinanceResult as LoanRefinanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MortgagePointsResult as MortgagePointsResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PrepaymentPenaltyType as PrepaymentPenaltyType, type units_PxConvertResult as PxConvertResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxEquivalentYieldDirection as TaxEquivalentYieldDirection, type units_TaxEquivalentYieldResult as TaxEquivalentYieldResult, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, type units_VinValidationResult as VinValidationResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBlendedLoanRate as calculateBlendedLoanRate, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateExtraPaymentPayoff as calculateExtraPaymentPayoff, units_calculateFreelancerRate as calculateFreelancerRate, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateLoanPrepaymentPenalty as calculateLoanPrepaymentPenalty, units_calculateLoanRefinance as calculateLoanRefinance, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMortgagePoints as calculateMortgagePoints, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTaxEquivalentYield as calculateTaxEquivalentYield, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_planDebtPayoff as planDebtPayoff, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_validateIsin as validateIsin, units_validateVin as validateVin, units_viewportToPx as viewportToPx };
1539
+ export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BlendedLoanRateResult as BlendedLoanRateResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CashBreakdownResult as CashBreakdownResult, type units_CashChangeResult as CashChangeResult, type units_CashDenominationItem as CashDenominationItem, type units_CashRoundingMode as CashRoundingMode, type units_CashRoundingResult as CashRoundingResult, type units_CdMaturityResult as CdMaturityResult, type units_CompareUnitPricesResult as CompareUnitPricesResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_CreditAccountInput as CreditAccountInput, type units_CreditAccountResult as CreditAccountResult, type units_CreditUtilizationResult as CreditUtilizationResult, type units_DebtItemInput as DebtItemInput, type units_DebtItemResult as DebtItemResult, type units_DebtPayoffComparison as DebtPayoffComparison, type units_DebtPayoffInput as DebtPayoffInput, type units_DebtPayoffPlanResult as DebtPayoffPlanResult, type units_DebtPayoffScheduleEntry as DebtPayoffScheduleEntry, type units_DebtPayoffStrategy as DebtPayoffStrategy, type units_DebtPayoffStrategyResult as DebtPayoffStrategyResult, type units_DebtToIncomeRatioResult as DebtToIncomeRatioResult, type units_DepreciationMethod as DepreciationMethod, type units_DepreciationResult as DepreciationResult, type units_DepreciationYear as DepreciationYear, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_DtiTier as DtiTier, type units_EmiResult as EmiResult, type units_EmiTenureUnit as EmiTenureUnit, type units_EmiYearlyBreakdownRow as EmiYearlyBreakdownRow, type units_ExtraPaymentPayoffResult as ExtraPaymentPayoffResult, type units_FilePermissions as FilePermissions, type units_FileSizeUnit as FileSizeUnit, type units_FormatOptions as FormatOptions, type units_FreelancerRateInput as FreelancerRateInput, type units_FreelancerRateResult as FreelancerRateResult, units_GPA_GRADE_POINTS as GPA_GRADE_POINTS, type units_GpaCourse as GpaCourse, type units_GpaCourseResult as GpaCourseResult, type units_GpaResult as GpaResult, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_IsinValidationResult as IsinValidationResult, type units_LoanBalanceInput as LoanBalanceInput, type units_LoanBalanceResult as LoanBalanceResult, type units_LoanPrepaymentPenaltyResult as LoanPrepaymentPenaltyResult, type units_LoanRefinanceResult as LoanRefinanceResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_MortgagePointsResult as MortgagePointsResult, type units_MovingAveragePoint as MovingAveragePoint, type units_MovingAverageResult as MovingAverageResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PaybackPeriodInput as PaybackPeriodInput, type units_PaybackPeriodResult as PaybackPeriodResult, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PrepaymentPenaltyType as PrepaymentPenaltyType, type units_PxConvertResult as PxConvertResult, type units_RequiredBandwidthResult as RequiredBandwidthResult, type units_RoiInput as RoiInput, type units_RoiResult as RoiResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SavingsGoalInput as SavingsGoalInput, type units_SavingsGoalMode as SavingsGoalMode, type units_SavingsGoalResult as SavingsGoalResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxEquivalentYieldDirection as TaxEquivalentYieldDirection, type units_TaxEquivalentYieldResult as TaxEquivalentYieldResult, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, type units_TransferSpeedUnit as TransferSpeedUnit, type units_TransferTimeResult as TransferTimeResult, units_USD_DENOMINATIONS as USD_DENOMINATIONS, type units_UnitPriceItem as UnitPriceItem, type units_UnitPriceResult as UnitPriceResult, type units_UtilizationTier as UtilizationTier, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, type units_VinValidationResult as VinValidationResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBlendedLoanRate as calculateBlendedLoanRate, units_calculateBreakEven as calculateBreakEven, units_calculateCashBreakdown as calculateCashBreakdown, units_calculateCashRounding as calculateCashRounding, units_calculateCdMaturity as calculateCdMaturity, units_calculateChange as calculateChange, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateCreditUtilization as calculateCreditUtilization, units_calculateDebtToIncomeRatio as calculateDebtToIncomeRatio, units_calculateDepreciationSchedule as calculateDepreciationSchedule, units_calculateDiscount as calculateDiscount, units_calculateEmi as calculateEmi, units_calculateExtraPaymentPayoff as calculateExtraPaymentPayoff, units_calculateFreelancerRate as calculateFreelancerRate, units_calculateGpa as calculateGpa, units_calculateLoan as calculateLoan, units_calculateLoanPrepaymentPenalty as calculateLoanPrepaymentPenalty, units_calculateLoanRefinance as calculateLoanRefinance, units_calculateMarginMarkup as calculateMarginMarkup, units_calculateMortgagePoints as calculateMortgagePoints, units_calculateMovingAverages as calculateMovingAverages, units_calculatePaybackPeriod as calculatePaybackPeriod, units_calculatePercentageChange as calculatePercentageChange, units_calculateRequiredBandwidth as calculateRequiredBandwidth, units_calculateRoi as calculateRoi, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSavingsGoal as calculateSavingsGoal, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTaxEquivalentYield as calculateTaxEquivalentYield, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateTransferTime as calculateTransferTime, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_compareUnitPrices as compareUnitPrices, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_planDebtPayoff as planDebtPayoff, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_validateIsin as validateIsin, units_validateVin as validateVin, units_viewportToPx as viewportToPx };
1500
1540
  }
1501
1541
 
1502
- export { type DtiTier as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtPayoffComparison as N, type DebtPayoffInput as O, type DebtPayoffPlanResult as P, type DebtPayoffScheduleEntry as Q, type DebtPayoffStrategy as R, type DebtPayoffStrategyResult as S, type DebtToIncomeRatioResult as T, type DepreciationMethod as U, type DepreciationResult as V, type DepreciationYear as W, type Dimensions as X, type DiscountField as Y, type DiscountInput as Z, type DiscountResult as _, type AprApyDirection as a, type ViewportConvertResult as a$, type EmiResult as a0, type EmiTenureUnit as a1, type EmiYearlyBreakdownRow as a2, type ExtraPaymentPayoffResult as a3, type FilePermissions as a4, type FormatOptions as a5, type FreelancerRateInput as a6, type FreelancerRateResult as a7, GPA_GRADE_POINTS as a8, type GpaCourse as a9, type PxConvertResult as aA, type RoiInput as aB, type RoiResult as aC, type RuleOf72Direction as aD, type RuleOf72Result as aE, type SavingsGoalInput as aF, type SavingsGoalMode as aG, type SavingsGoalResult as aH, type SemverVersion as aI, type SimpleInterestResult as aJ, type SubnetInfo as aK, type SuccessiveDiscountResult as aL, type SuccessiveDiscountStep as aM, type TaxDirection as aN, type TaxEquivalentYieldDirection as aO, type TaxEquivalentYieldResult as aP, type TaxResult as aQ, type TimeValueDirection as aR, type TimeValueResult as aS, type TipSplitResult as aT, USD_DENOMINATIONS as aU, type UnitPriceItem as aV, type UnitPriceResult as aW, type UtilizationTier as aX, type VideoBitrateInput as aY, type VideoBitrateMode as aZ, type VideoBitrateResult as a_, type GpaCourseResult as aa, type GpaResult as ab, type IbanValidationResult as ac, type IpConversion as ad, type IsbnFormat as ae, type IsbnResult as af, type IsinValidationResult as ag, type LoanBalanceInput as ah, type LoanBalanceResult as ai, type LoanPrepaymentPenaltyResult as aj, type LoanRefinanceResult as ak, type LoanResult as al, type MarginMarkupField as am, type MarginMarkupInput as an, type MarginMarkupResult as ao, type MortgagePointsResult as ap, type MovingAveragePoint as aq, type MovingAverageResult as ar, type NotationStyle as as, type NumberBase as at, type PaybackPeriodInput as au, type PaybackPeriodResult as av, type PercentChangeDirection as aw, type PercentageChangeResult as ax, type Permission as ay, type PrepaymentPenaltyType as az, type AprApyResult as b, isValidCidr as b$, type VinValidationResult as b0, applySuccessiveDiscounts as b1, autoFormat as b2, bumpVersion as b3, calcAspectRatio as b4, calcSubnet as b5, calculateBlendedLoanRate as b6, calculateBreakEven as b7, calculateCashBreakdown as b8, calculateCashRounding as b9, calculateTipSplit as bA, calculateVideoBitrate as bB, compareSemver as bC, compareUnitPrices as bD, convert as bE, convertAprApy as bF, convertBytes as bG, convertIp as bH, coverBox as bI, decimalToIp as bJ, decimalToIpCidr as bK, describePermissions as bL, fitIntoBox as bM, formatNumber as bN, formatValue as bO, formatVwValue as bP, formatWithSeparator as bQ, gcd as bR, ipFromBinary as bS, ipFromDecimal as bT, ipFromHex as bU, ipToBinary as bV, ipToDecimal as bW, ipToDecimalCidr as bX, ipToHex as bY, ipToOctal as bZ, isValid as b_, calculateCdMaturity as ba, calculateChange as bb, calculateCompoundInterest as bc, calculateCreditUtilization as bd, calculateDebtToIncomeRatio as be, calculateDepreciationSchedule as bf, calculateDiscount as bg, calculateEmi as bh, calculateExtraPaymentPayoff as bi, calculateFreelancerRate as bj, calculateGpa as bk, calculateLoan as bl, calculateLoanPrepaymentPenalty as bm, calculateLoanRefinance as bn, calculateMarginMarkup as bo, calculateMortgagePoints as bp, calculateMovingAverages as bq, calculatePaybackPeriod as br, calculatePercentageChange as bs, calculateRoi as bt, calculateRuleOf72 as bu, calculateSavingsGoal as bv, calculateSimpleInterest as bw, calculateTax as bx, calculateTaxEquivalentYield as by, calculateTimeValue as bz, type AspectRatioResult as c, isValidIp as c0, isValidIpv4 as c1, marginToMarkup as c2, markupToMargin as c3, octalToPermissions as c4, parseFileSize as c5, parseInput as c6, parseNumberString as c7, parseSemver as c8, permissionsToChmod as c9, permissionsToOctal as ca, permissionsToSymbolic as cb, planDebtPayoff as cc, ptToPx as cd, pxToAll as ce, pxToViewport as cf, remToPx as cg, satisfiesRange as ch, scaleByHeight as ci, scaleByWidth as cj, sortVersions as ck, splitSubnet as cl, symbolicToPermissions as cm, validateBarcode as cn, validateCardNumber as co, validateIban as cp, validateIsbn as cq, validateIsin as cr, validateVin as cs, viewportToPx as ct, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
1542
+ export { type DtiTier as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type CashRoundingResult as D, type CdMaturityResult as E, type CompareUnitPricesResult as F, type CompoundInterestResult as G, type CompoundYearRow as H, type CreditAccountInput as I, type CreditAccountResult as J, type CreditUtilizationResult as K, type DebtItemInput as L, type DebtItemResult as M, type DebtPayoffComparison as N, type DebtPayoffInput as O, type DebtPayoffPlanResult as P, type DebtPayoffScheduleEntry as Q, type DebtPayoffStrategy as R, type DebtPayoffStrategyResult as S, type DebtToIncomeRatioResult as T, type DepreciationMethod as U, type DepreciationResult as V, type DepreciationYear as W, type Dimensions as X, type DiscountField as Y, type DiscountInput as Z, type DiscountResult as _, type AprApyDirection as a, type UtilizationTier as a$, type EmiResult as a0, type EmiTenureUnit as a1, type EmiYearlyBreakdownRow as a2, type ExtraPaymentPayoffResult as a3, type FilePermissions as a4, type FileSizeUnit as a5, type FormatOptions as a6, type FreelancerRateInput as a7, type FreelancerRateResult as a8, GPA_GRADE_POINTS as a9, type PrepaymentPenaltyType as aA, type PxConvertResult as aB, type RequiredBandwidthResult as aC, type RoiInput as aD, type RoiResult as aE, type RuleOf72Direction as aF, type RuleOf72Result as aG, type SavingsGoalInput as aH, type SavingsGoalMode as aI, type SavingsGoalResult as aJ, type SemverVersion as aK, type SimpleInterestResult as aL, type SubnetInfo as aM, type SuccessiveDiscountResult as aN, type SuccessiveDiscountStep as aO, type TaxDirection as aP, type TaxEquivalentYieldDirection as aQ, type TaxEquivalentYieldResult as aR, type TaxResult as aS, type TimeValueDirection as aT, type TimeValueResult as aU, type TipSplitResult as aV, type TransferSpeedUnit as aW, type TransferTimeResult as aX, USD_DENOMINATIONS as aY, type UnitPriceItem as aZ, type UnitPriceResult as a_, type GpaCourse as aa, type GpaCourseResult as ab, type GpaResult as ac, type IbanValidationResult as ad, type IpConversion as ae, type IsbnFormat as af, type IsbnResult as ag, type IsinValidationResult as ah, type LoanBalanceInput as ai, type LoanBalanceResult as aj, type LoanPrepaymentPenaltyResult as ak, type LoanRefinanceResult as al, type LoanResult as am, type MarginMarkupField as an, type MarginMarkupInput as ao, type MarginMarkupResult as ap, type MortgagePointsResult as aq, type MovingAveragePoint as ar, type MovingAverageResult as as, type NotationStyle as at, type NumberBase as au, type PaybackPeriodInput as av, type PaybackPeriodResult as aw, type PercentChangeDirection as ax, type PercentageChangeResult as ay, type Permission as az, type AprApyResult as b, ipToBinary as b$, type VideoBitrateInput as b0, type VideoBitrateMode as b1, type VideoBitrateResult as b2, type ViewportConvertResult as b3, type VinValidationResult as b4, applySuccessiveDiscounts as b5, autoFormat as b6, bumpVersion as b7, calcAspectRatio as b8, calcSubnet as b9, calculateSavingsGoal as bA, calculateSimpleInterest as bB, calculateTax as bC, calculateTaxEquivalentYield as bD, calculateTimeValue as bE, calculateTipSplit as bF, calculateTransferTime as bG, calculateVideoBitrate as bH, compareSemver as bI, compareUnitPrices as bJ, convert as bK, convertAprApy as bL, convertBytes as bM, convertIp as bN, coverBox as bO, decimalToIp as bP, decimalToIpCidr as bQ, describePermissions as bR, fitIntoBox as bS, formatNumber as bT, formatValue as bU, formatVwValue as bV, formatWithSeparator as bW, gcd as bX, ipFromBinary as bY, ipFromDecimal as bZ, ipFromHex as b_, calculateBlendedLoanRate as ba, calculateBreakEven as bb, calculateCashBreakdown as bc, calculateCashRounding as bd, calculateCdMaturity as be, calculateChange as bf, calculateCompoundInterest as bg, calculateCreditUtilization as bh, calculateDebtToIncomeRatio as bi, calculateDepreciationSchedule as bj, calculateDiscount as bk, calculateEmi as bl, calculateExtraPaymentPayoff as bm, calculateFreelancerRate as bn, calculateGpa as bo, calculateLoan as bp, calculateLoanPrepaymentPenalty as bq, calculateLoanRefinance as br, calculateMarginMarkup as bs, calculateMortgagePoints as bt, calculateMovingAverages as bu, calculatePaybackPeriod as bv, calculatePercentageChange as bw, calculateRequiredBandwidth as bx, calculateRoi as by, calculateRuleOf72 as bz, type AspectRatioResult as c, ipToDecimal as c0, ipToDecimalCidr as c1, ipToHex as c2, ipToOctal as c3, isValid as c4, isValidCidr as c5, isValidIp as c6, isValidIpv4 as c7, marginToMarkup as c8, markupToMargin as c9, octalToPermissions as ca, parseFileSize as cb, parseInput as cc, parseNumberString as cd, parseSemver as ce, permissionsToChmod as cf, permissionsToOctal as cg, permissionsToSymbolic as ch, planDebtPayoff as ci, ptToPx as cj, pxToAll as ck, pxToViewport as cl, remToPx as cm, satisfiesRange as cn, scaleByHeight as co, scaleByWidth as cp, sortVersions as cq, splitSubnet as cr, symbolicToPermissions as cs, validateBarcode as ct, validateCardNumber as cu, validateIban as cv, validateIsbn as cw, validateIsin as cx, validateVin as cy, viewportToPx as cz, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BlendedLoanRateResult as i, type BreakEvenInput as j, type BreakEvenResult as k, type ByteConvertResult as l, type ByteUnit as m, COMMON_LOCALES as n, COMMON_PERMISSIONS as o, COMMON_RATIOS as p, COMMON_SIZES as q, COMMON_TAX_RATES as r, COMMON_TIP_PERCENTAGES as s, COMMON_VIEWPORTS as t, units as u, type CardValidationResult as v, type CashBreakdownResult as w, type CashChangeResult as x, type CashDenominationItem as y, type CashRoundingMode as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/sdk",
3
- "version": "0.74.0",
3
+ "version": "0.75.0",
4
4
  "description": "154+ developer utility tools for Node.js: JSON, encoding, hashing, color, CSS, network and more. Runs locally, no API key required.",
5
5
  "author": "Utilix <hello@utilix.tech>",
6
6
  "license": "MIT",