@utilix-tech/sdk 0.24.0 → 0.26.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/dist/index.cjs CHANGED
@@ -1920,6 +1920,7 @@ __export(text_exports, {
1920
1920
  analyzeText: () => analyzeText,
1921
1921
  applyOp: () => applyOp,
1922
1922
  applyOps: () => applyOps,
1923
+ calculateStringDistance: () => calculateStringDistance,
1923
1924
  centerText: () => centerText,
1924
1925
  convertAll: () => convertAll,
1925
1926
  convertCase: () => convertCase,
@@ -4463,6 +4464,47 @@ function detectFillerWords(text) {
4463
4464
  const density = totalWords > 0 ? Math.round(totalMatches / totalWords * 1e3) / 10 : 0;
4464
4465
  return { totalWords, totalMatches, fillerCount, hedgeCount, clicheCount, density, matches };
4465
4466
  }
4467
+ var MAX_STRING_DISTANCE_LENGTH = 5e3;
4468
+ function calculateStringDistance(a, b, options) {
4469
+ if (typeof a !== "string" || typeof b !== "string") {
4470
+ return { error: "Both a and b must be strings" };
4471
+ }
4472
+ if (a.length > MAX_STRING_DISTANCE_LENGTH || b.length > MAX_STRING_DISTANCE_LENGTH) {
4473
+ return { error: `Strings must be at most ${MAX_STRING_DISTANCE_LENGTH} characters` };
4474
+ }
4475
+ const mode = options?.mode ?? "levenshtein";
4476
+ const caseSensitive = options?.caseSensitive ?? true;
4477
+ const s1 = caseSensitive ? a : a.toLowerCase();
4478
+ const s2 = caseSensitive ? b : b.toLowerCase();
4479
+ const m = s1.length;
4480
+ const n = s2.length;
4481
+ const maxLength = Math.max(m, n);
4482
+ if (m === 0 || n === 0) {
4483
+ return { a, b, distance: maxLength, similarity: maxLength === 0 ? 1 : 0, maxLength, mode };
4484
+ }
4485
+ const dp = Array.from({ length: m + 1 }, () => new Array(n + 1).fill(0));
4486
+ for (let i = 0; i <= m; i++) dp[i][0] = i;
4487
+ for (let j = 0; j <= n; j++) dp[0][j] = j;
4488
+ for (let i = 1; i <= m; i++) {
4489
+ for (let j = 1; j <= n; j++) {
4490
+ const cost = s1[i - 1] === s2[j - 1] ? 0 : 1;
4491
+ dp[i][j] = Math.min(
4492
+ dp[i - 1][j] + 1,
4493
+ // deletion
4494
+ dp[i][j - 1] + 1,
4495
+ // insertion
4496
+ dp[i - 1][j - 1] + cost
4497
+ // substitution
4498
+ );
4499
+ if (mode === "damerau" && i > 1 && j > 1 && s1[i - 1] === s2[j - 2] && s1[i - 2] === s2[j - 1]) {
4500
+ dp[i][j] = Math.min(dp[i][j], dp[i - 2][j - 2] + 1);
4501
+ }
4502
+ }
4503
+ }
4504
+ const distance = dp[m][n];
4505
+ const similarity = maxLength === 0 ? 1 : Math.round((1 - distance / maxLength) * 1e4) / 1e4;
4506
+ return { a, b, distance, similarity, maxLength, mode };
4507
+ }
4466
4508
 
4467
4509
  // src/tools/data.ts
4468
4510
  var data_exports = {};
@@ -7106,6 +7148,7 @@ __export(units_exports, {
7106
7148
  bumpVersion: () => bumpVersion,
7107
7149
  calcAspectRatio: () => calcAspectRatio,
7108
7150
  calcSubnet: () => calcSubnet,
7151
+ calculateBreakEven: () => calculateBreakEven,
7109
7152
  calculateCompoundInterest: () => calculateCompoundInterest,
7110
7153
  calculateDiscount: () => calculateDiscount,
7111
7154
  calculateLoan: () => calculateLoan,
@@ -7115,6 +7158,7 @@ __export(units_exports, {
7115
7158
  calculateTax: () => calculateTax,
7116
7159
  calculateTimeValue: () => calculateTimeValue,
7117
7160
  calculateTipSplit: () => calculateTipSplit,
7161
+ calculateVideoBitrate: () => calculateVideoBitrate,
7118
7162
  compareSemver: () => compareSemver,
7119
7163
  convert: () => convert,
7120
7164
  convertAprApy: () => convertAprApy,
@@ -8635,6 +8679,98 @@ function applySuccessiveDiscounts(originalPrice, discountPercents) {
8635
8679
  steps
8636
8680
  };
8637
8681
  }
8682
+ function calculateBreakEven(input) {
8683
+ const { fixedCosts, variableCostPerUnit, pricePerUnit, salesVolume } = input;
8684
+ if (!Number.isFinite(fixedCosts)) return { error: "fixedCosts must be a finite number" };
8685
+ if (!Number.isFinite(variableCostPerUnit)) return { error: "variableCostPerUnit must be a finite number" };
8686
+ if (!Number.isFinite(pricePerUnit)) return { error: "pricePerUnit must be a finite number" };
8687
+ if (fixedCosts < 0) return { error: "fixedCosts cannot be negative" };
8688
+ if (variableCostPerUnit < 0) return { error: "variableCostPerUnit cannot be negative" };
8689
+ if (pricePerUnit <= 0) return { error: "pricePerUnit must be greater than zero" };
8690
+ if (pricePerUnit <= variableCostPerUnit) {
8691
+ return { error: "pricePerUnit must be greater than variableCostPerUnit, otherwise every unit sold loses money and break-even is never reached" };
8692
+ }
8693
+ const round4 = (n) => Math.round(n * 1e4) / 1e4;
8694
+ const contributionMarginPerUnit = pricePerUnit - variableCostPerUnit;
8695
+ const contributionMarginRatio = contributionMarginPerUnit / pricePerUnit * 100;
8696
+ const breakEvenUnits = fixedCosts / contributionMarginPerUnit;
8697
+ const breakEvenUnitsRounded = Math.ceil(breakEvenUnits);
8698
+ const breakEvenRevenue = breakEvenUnits * pricePerUnit;
8699
+ const result = {
8700
+ fixedCosts: round4(fixedCosts),
8701
+ variableCostPerUnit: round4(variableCostPerUnit),
8702
+ pricePerUnit: round4(pricePerUnit),
8703
+ contributionMarginPerUnit: round4(contributionMarginPerUnit),
8704
+ contributionMarginRatio: round4(contributionMarginRatio),
8705
+ breakEvenUnits: round4(breakEvenUnits),
8706
+ breakEvenUnitsRounded,
8707
+ breakEvenRevenue: round4(breakEvenRevenue)
8708
+ };
8709
+ if (typeof salesVolume === "number" && Number.isFinite(salesVolume)) {
8710
+ if (salesVolume < 0) return { error: "salesVolume cannot be negative" };
8711
+ const revenueAtSalesVolume = salesVolume * pricePerUnit;
8712
+ const profitAtSalesVolume = salesVolume * contributionMarginPerUnit - fixedCosts;
8713
+ const marginOfSafetyUnits = salesVolume - breakEvenUnits;
8714
+ result.salesVolume = round4(salesVolume);
8715
+ result.revenueAtSalesVolume = round4(revenueAtSalesVolume);
8716
+ result.profitAtSalesVolume = round4(profitAtSalesVolume);
8717
+ result.marginOfSafetyUnits = round4(marginOfSafetyUnits);
8718
+ result.marginOfSafetyPercent = salesVolume > 0 ? round4(marginOfSafetyUnits / salesVolume * 100) : 0;
8719
+ }
8720
+ return result;
8721
+ }
8722
+ function calculateVideoBitrate(input) {
8723
+ const { mode, durationSeconds, videoBitrateKbps, targetSizeMB } = input;
8724
+ const audioBitrateKbps = input.audioBitrateKbps ?? 0;
8725
+ if (!Number.isFinite(durationSeconds) || durationSeconds <= 0) {
8726
+ return { error: "durationSeconds must be a positive number" };
8727
+ }
8728
+ if (!Number.isFinite(audioBitrateKbps) || audioBitrateKbps < 0) {
8729
+ return { error: "audioBitrateKbps must be zero or a positive number" };
8730
+ }
8731
+ const round23 = (n) => Math.round(n * 100) / 100;
8732
+ if (mode === "size-from-bitrate") {
8733
+ if (typeof videoBitrateKbps !== "number" || !Number.isFinite(videoBitrateKbps) || videoBitrateKbps <= 0) {
8734
+ return { error: 'videoBitrateKbps must be a positive number for mode "size-from-bitrate"' };
8735
+ }
8736
+ const totalBitrateKbps = videoBitrateKbps + audioBitrateKbps;
8737
+ const fileSizeBytes = totalBitrateKbps * 1e3 * durationSeconds / 8;
8738
+ return {
8739
+ mode,
8740
+ durationSeconds,
8741
+ videoBitrateKbps: round23(videoBitrateKbps),
8742
+ audioBitrateKbps: round23(audioBitrateKbps),
8743
+ totalBitrateKbps: round23(totalBitrateKbps),
8744
+ fileSizeBytes: Math.round(fileSizeBytes),
8745
+ fileSizeMB: round23(fileSizeBytes / 1e6),
8746
+ fileSizeMiB: round23(fileSizeBytes / 1048576)
8747
+ };
8748
+ }
8749
+ if (mode === "bitrate-from-size") {
8750
+ if (typeof targetSizeMB !== "number" || !Number.isFinite(targetSizeMB) || targetSizeMB <= 0) {
8751
+ return { error: 'targetSizeMB must be a positive number for mode "bitrate-from-size"' };
8752
+ }
8753
+ const fileSizeBytes = targetSizeMB * 1e6;
8754
+ const totalBitrateKbps = fileSizeBytes * 8 / (1e3 * durationSeconds);
8755
+ const videoKbps = totalBitrateKbps - audioBitrateKbps;
8756
+ if (videoKbps <= 0) {
8757
+ return {
8758
+ error: "audioBitrateKbps exceeds the total bitrate available at this target size and duration; lower the audio bitrate or raise the target size"
8759
+ };
8760
+ }
8761
+ return {
8762
+ mode,
8763
+ durationSeconds,
8764
+ videoBitrateKbps: round23(videoKbps),
8765
+ audioBitrateKbps: round23(audioBitrateKbps),
8766
+ totalBitrateKbps: round23(totalBitrateKbps),
8767
+ fileSizeBytes: Math.round(fileSizeBytes),
8768
+ fileSizeMB: round23(targetSizeMB),
8769
+ fileSizeMiB: round23(fileSizeBytes / 1048576)
8770
+ };
8771
+ }
8772
+ return { error: 'mode must be "size-from-bitrate" or "bitrate-from-size"' };
8773
+ }
8638
8774
 
8639
8775
  // src/tools/network.ts
8640
8776
  var network_exports = {};
@@ -10467,6 +10603,7 @@ __export(api_exports, {
10467
10603
  buildCurl: () => buildCurl,
10468
10604
  buildCurlMultiline: () => buildCurlMultiline,
10469
10605
  buildUrl: () => buildUrl,
10606
+ computeJwkThumbprint: () => computeJwkThumbprint,
10470
10607
  convertToCode: () => convertToCode,
10471
10608
  decodeJwt: () => decodeJwt,
10472
10609
  decodeUrlComponent: () => decodeUrlComponent,
@@ -10985,6 +11122,48 @@ function parseJwks(input) {
10985
11122
  const duplicateKids = [...kidCounts.entries()].filter(([, c]) => c > 1).map(([kid]) => kid);
10986
11123
  return { ok: true, keys, count: keys.length, duplicateKids };
10987
11124
  }
11125
+ var JWK_THUMBPRINT_MEMBERS = {
11126
+ oct: ["k", "kty"],
11127
+ RSA: ["e", "kty", "n"],
11128
+ EC: ["crv", "kty", "x", "y"],
11129
+ OKP: ["crv", "kty", "x"]
11130
+ };
11131
+ var JWK_THUMBPRINT_NODE_HASH = {
11132
+ "SHA-256": "sha256",
11133
+ "SHA-384": "sha384",
11134
+ "SHA-512": "sha512"
11135
+ };
11136
+ function computeJwkThumbprint(input, hashAlg = "SHA-256") {
11137
+ const trimmed = input.trim();
11138
+ if (!trimmed) return { ok: false, error: "No input provided" };
11139
+ const nodeHash = JWK_THUMBPRINT_NODE_HASH[hashAlg];
11140
+ if (!nodeHash) return { ok: false, error: 'hashAlg must be one of "SHA-256", "SHA-384", "SHA-512"' };
11141
+ let jwk;
11142
+ try {
11143
+ jwk = JSON.parse(trimmed);
11144
+ } catch (e) {
11145
+ return { ok: false, error: `Invalid JSON: ${e instanceof Error ? e.message : String(e)}` };
11146
+ }
11147
+ if (jwk === null || typeof jwk !== "object" || Array.isArray(jwk)) {
11148
+ return { ok: false, error: "Input must be a single JWK object, not a JWKS set or array" };
11149
+ }
11150
+ const obj = jwk;
11151
+ const kty = obj.kty;
11152
+ if (typeof kty !== "string") return { ok: false, error: 'JWK must have a "kty" (key type) member' };
11153
+ const members = JWK_THUMBPRINT_MEMBERS[kty];
11154
+ if (!members) return { ok: false, error: `Unsupported key type "${kty}": supported types are RSA, EC, oct, OKP` };
11155
+ const canonical = {};
11156
+ for (const m of members) {
11157
+ const v = obj[m];
11158
+ if (typeof v !== "string" || v.length === 0) {
11159
+ return { ok: false, error: `JWK is missing required member "${m}" for key type "${kty}"` };
11160
+ }
11161
+ canonical[m] = v;
11162
+ }
11163
+ const canonicalJson = "{" + members.map((m) => `${JSON.stringify(m)}:${JSON.stringify(canonical[m])}`).join(",") + "}";
11164
+ const thumbprint = crypto.createHash(nodeHash).update(canonicalJson, "utf8").digest("base64url");
11165
+ return { ok: true, kty, hashAlg, members, canonicalJson, thumbprint };
11166
+ }
10988
11167
  var ALG_TO_NODE_HASH = {
10989
11168
  HS256: "sha256",
10990
11169
  HS384: "sha384",
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  export { j as json } from './json-DEVFIpsC.cjs';
2
2
  export { e as encoding } from './encoding-Dk3wpmb3.cjs';
3
3
  export { h as hashing } from './hashing-CnetQFD_.cjs';
4
- export { t as text } from './text-DS70aMY5.cjs';
4
+ export { t as text } from './text-D1fySkCB.cjs';
5
5
  export { d as data } from './data-XRb0D7Zn.cjs';
6
6
  export { g as generators } from './generators-BGtRGpJZ.cjs';
7
7
  export { t as time } from './time-KqJjdqII.cjs';
8
- export { u as units } from './units-DAoSM2g8.cjs';
8
+ export { u as units } from './units-D2wEimKG.cjs';
9
9
  export { n as network } from './network-BJOjJnmY.cjs';
10
- export { a as api } from './api-Xl7OzIgq.cjs';
10
+ export { a as api } from './api-DmTNE4c1.cjs';
11
11
  export { c as code } from './code-DaRvff2v.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
@@ -1,13 +1,13 @@
1
1
  export { j as json } from './json-DEVFIpsC.js';
2
2
  export { e as encoding } from './encoding-Dk3wpmb3.js';
3
3
  export { h as hashing } from './hashing-CnetQFD_.js';
4
- export { t as text } from './text-DS70aMY5.js';
4
+ export { t as text } from './text-D1fySkCB.js';
5
5
  export { d as data } from './data-XRb0D7Zn.js';
6
6
  export { g as generators } from './generators-BGtRGpJZ.js';
7
7
  export { t as time } from './time-KqJjdqII.js';
8
- export { u as units } from './units-DAoSM2g8.js';
8
+ export { u as units } from './units-D2wEimKG.js';
9
9
  export { n as network } from './network-BJOjJnmY.js';
10
- export { a as api } from './api-Xl7OzIgq.js';
10
+ export { a as api } from './api-DmTNE4c1.js';
11
11
  export { c as code } from './code-DaRvff2v.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-XMKJYVKB.js';
2
- export { units_exports as units } from './chunk-HZIS2DMJ.js';
2
+ export { units_exports as units } from './chunk-HP6C4VBX.js';
3
3
  export { network_exports as network } from './chunk-Y5OOP6WN.js';
4
- export { api_exports as api } from './chunk-Q3B3YWOA.js';
4
+ export { api_exports as api } from './chunk-52ZDKSIX.js';
5
5
  export { code_exports as code } from './chunk-LXKIPPDG.js';
6
6
  export { color_exports as color } from './chunk-BPVAB4P2.js';
7
7
  export { css_exports as css } from './chunk-6YPV2AB5.js';
@@ -10,7 +10,7 @@ export { ai_agent_exports as ai_agent } from './chunk-265NPGKH.js';
10
10
  export { json_exports as json } from './chunk-WO3LJMVV.js';
11
11
  export { encoding_exports as encoding } from './chunk-DOWQZUTP.js';
12
12
  export { hashing_exports as hashing } from './chunk-GEFVMGZR.js';
13
- export { text_exports as text } from './chunk-2I4O5YCT.js';
13
+ export { text_exports as text } from './chunk-AFEZ6N4A.js';
14
14
  export { data_exports as data } from './chunk-66QHV5KW.js';
15
15
  export { generators_exports as generators } from './chunk-2CJSLYWI.js';
16
16
  export { time_exports as time } from './chunk-IEPWZERQ.js';
@@ -18,6 +18,7 @@
18
18
  * - html-table : detectDelimiter, parseTableData, generateHtmlTable, generateMarkdownTable, csvToHtml, csvToMarkdown
19
19
  * - ascii-art : textToAscii, getAvailableFonts, addBorder, centerText
20
20
  * - morse-code : textToMorse, morseToText, isValidMorse, getMorseForChar, getMorseTiming
21
+ * - string-distance : calculateStringDistance
21
22
  * - passive-voice-detector: detectPassiveVoice
22
23
  * - readability-score: scoreReadability
23
24
  * - filler-word-detector: detectFillerWords
@@ -302,6 +303,30 @@ interface FillerWordResult {
302
303
  * candidate to reconsider, not always wrong in context.
303
304
  */
304
305
  declare function detectFillerWords(text: string): FillerWordResult;
306
+ type StringDistanceMode = 'levenshtein' | 'damerau';
307
+ interface StringDistanceResult {
308
+ a: string;
309
+ b: string;
310
+ distance: number;
311
+ similarity: number;
312
+ maxLength: number;
313
+ mode: StringDistanceMode;
314
+ }
315
+ /**
316
+ * Compute the edit distance between two strings: the minimum number of
317
+ * single-character insertions, deletions, and substitutions (plus adjacent
318
+ * transpositions in "damerau" mode) needed to turn `a` into `b`. "damerau"
319
+ * mode is the optimal-string-alignment variant (each substring edited at
320
+ * most once), not unrestricted Damerau-Levenshtein. Also returns a
321
+ * normalized 0-1 similarity ratio. Classic O(n*m) dynamic programming, pure
322
+ * string comparison with no external dependency.
323
+ */
324
+ declare function calculateStringDistance(a: string, b: string, options?: {
325
+ mode?: StringDistanceMode;
326
+ caseSensitive?: boolean;
327
+ }): StringDistanceResult | {
328
+ error: string;
329
+ };
305
330
 
306
331
  type text_AsciiFont = AsciiFont;
307
332
  type text_AsciiOptions = AsciiOptions;
@@ -335,6 +360,8 @@ type text_PassiveVoiceSentence = PassiveVoiceSentence;
335
360
  type text_ReadabilityResult = ReadabilityResult;
336
361
  type text_ReadabilityScore = ReadabilityScore;
337
362
  type text_SlugSeparator = SlugSeparator;
363
+ type text_StringDistanceMode = StringDistanceMode;
364
+ type text_StringDistanceResult = StringDistanceResult;
338
365
  type text_TableOptions = TableOptions;
339
366
  type text_TextAnalysis = TextAnalysis;
340
367
  type text_WordCountResult = WordCountResult;
@@ -342,6 +369,7 @@ declare const text_addBorder: typeof addBorder;
342
369
  declare const text_analyzeText: typeof analyzeText;
343
370
  declare const text_applyOp: typeof applyOp;
344
371
  declare const text_applyOps: typeof applyOps;
372
+ declare const text_calculateStringDistance: typeof calculateStringDistance;
345
373
  declare const text_centerText: typeof centerText;
346
374
  declare const text_convertAll: typeof convertAll;
347
375
  declare const text_convertCase: typeof convertCase;
@@ -391,7 +419,7 @@ declare const text_textToMorse: typeof textToMorse;
391
419
  declare const text_unescapeString: typeof unescapeString;
392
420
  declare const text_wordFrequency: typeof wordFrequency;
393
421
  declare namespace text {
394
- export { type text_AsciiFont as AsciiFont, type text_AsciiOptions as AsciiOptions, text_CASE_FORMATS as CASE_FORMATS, type text_CaseFormat as CaseFormat, type text_ConvertOptions as ConvertOptions, text_DEFAULT_CONVERT_OPTIONS as DEFAULT_CONVERT_OPTIONS, type text_DiffFile as DiffFile, type text_DiffHunk as DiffHunk, type text_DiffLine as DiffLine, type text_DiffResult as DiffResult, type text_DiffType as DiffType, type text_DiffViewerLine as DiffViewerLine, text_ESCAPE_MODES as ESCAPE_MODES, type text_EscapeMode as EscapeMode, type text_FillerCategory as FillerCategory, type text_FillerMatch as FillerMatch, type text_FillerWordResult as FillerWordResult, text_LINE_OPS as LINE_OPS, type text_LineOp as LineOp, type text_LineType as LineType, type text_LoremUnit as LoremUnit, text_MORSE_CODE as MORSE_CODE, type text_MarkdownResult as MarkdownResult, type text_MorseOptions as MorseOptions, type text_ParsedDiff as ParsedDiff, type text_ParsedTable as ParsedTable, type text_PassiveVoiceMatch as PassiveVoiceMatch, type text_PassiveVoiceResult as PassiveVoiceResult, type text_PassiveVoiceSentence as PassiveVoiceSentence, type text_ReadabilityResult as ReadabilityResult, type text_ReadabilityScore as ReadabilityScore, type text_SlugSeparator as SlugSeparator, type text_TableOptions as TableOptions, type text_TextAnalysis as TextAnalysis, type text_WordCountResult as WordCountResult, text_addBorder as addBorder, text_analyzeText as analyzeText, text_applyOp as applyOp, text_applyOps as applyOps, text_centerText as centerText, text_convertAll as convertAll, text_convertCase as convertCase, text_countWords as countWords, text_csvToHtml as csvToHtml, text_csvToMarkdown as csvToMarkdown, text_detectDelimiter as detectDelimiter, text_detectFillerWords as detectFillerWords, text_detectPassiveVoice as detectPassiveVoice, text_diffLines as diffLines, text_diffLinesSimple as diffLinesSimple, text_diffStats as diffStats, text_escapeAll as escapeAll, text_escapeString as escapeString, text_extractHeadings as extractHeadings, text_formatReadingTime as formatReadingTime, text_generate as generate, text_generateDiff as generateDiff, text_generateHtmlTable as generateHtmlTable, text_generateMarkdownTable as generateMarkdownTable, text_generateParagraphs as generateParagraphs, text_generateSentences as generateSentences, text_generateWords as generateWords, text_getAvailableFonts as getAvailableFonts, text_getMorseForChar as getMorseForChar, text_getMorseTiming as getMorseTiming, text_htmlToMarkdown as htmlToMarkdown, text_isValidMorse as isValidMorse, text_markdownToHtml as markdownToHtml, text_morseToText as morseToText, text_numberToOrdinal as numberToOrdinal, text_numberToRoman as numberToRoman, text_numberToWords as numberToWords, text_ordinalWords as ordinalWords, text_parseDiff as parseDiff, text_parseTableData as parseTableData, text_readabilityScore as readabilityScore, text_renderMarkdown as renderMarkdown, text_romanToNumber as romanToNumber, text_scoreReadability as scoreReadability, text_sentenceCount as sentenceCount, text_slugify as slugify, text_slugifyAll as slugifyAll, text_syllableCount as syllableCount, text_textToAscii as textToAscii, text_textToMorse as textToMorse, text_unescapeString as unescapeString, text_wordFrequency as wordFrequency };
422
+ export { type text_AsciiFont as AsciiFont, type text_AsciiOptions as AsciiOptions, text_CASE_FORMATS as CASE_FORMATS, type text_CaseFormat as CaseFormat, type text_ConvertOptions as ConvertOptions, text_DEFAULT_CONVERT_OPTIONS as DEFAULT_CONVERT_OPTIONS, type text_DiffFile as DiffFile, type text_DiffHunk as DiffHunk, type text_DiffLine as DiffLine, type text_DiffResult as DiffResult, type text_DiffType as DiffType, type text_DiffViewerLine as DiffViewerLine, text_ESCAPE_MODES as ESCAPE_MODES, type text_EscapeMode as EscapeMode, type text_FillerCategory as FillerCategory, type text_FillerMatch as FillerMatch, type text_FillerWordResult as FillerWordResult, text_LINE_OPS as LINE_OPS, type text_LineOp as LineOp, type text_LineType as LineType, type text_LoremUnit as LoremUnit, text_MORSE_CODE as MORSE_CODE, type text_MarkdownResult as MarkdownResult, type text_MorseOptions as MorseOptions, type text_ParsedDiff as ParsedDiff, type text_ParsedTable as ParsedTable, type text_PassiveVoiceMatch as PassiveVoiceMatch, type text_PassiveVoiceResult as PassiveVoiceResult, type text_PassiveVoiceSentence as PassiveVoiceSentence, type text_ReadabilityResult as ReadabilityResult, type text_ReadabilityScore as ReadabilityScore, type text_SlugSeparator as SlugSeparator, type text_StringDistanceMode as StringDistanceMode, type text_StringDistanceResult as StringDistanceResult, type text_TableOptions as TableOptions, type text_TextAnalysis as TextAnalysis, type text_WordCountResult as WordCountResult, text_addBorder as addBorder, text_analyzeText as analyzeText, text_applyOp as applyOp, text_applyOps as applyOps, text_calculateStringDistance as calculateStringDistance, text_centerText as centerText, text_convertAll as convertAll, text_convertCase as convertCase, text_countWords as countWords, text_csvToHtml as csvToHtml, text_csvToMarkdown as csvToMarkdown, text_detectDelimiter as detectDelimiter, text_detectFillerWords as detectFillerWords, text_detectPassiveVoice as detectPassiveVoice, text_diffLines as diffLines, text_diffLinesSimple as diffLinesSimple, text_diffStats as diffStats, text_escapeAll as escapeAll, text_escapeString as escapeString, text_extractHeadings as extractHeadings, text_formatReadingTime as formatReadingTime, text_generate as generate, text_generateDiff as generateDiff, text_generateHtmlTable as generateHtmlTable, text_generateMarkdownTable as generateMarkdownTable, text_generateParagraphs as generateParagraphs, text_generateSentences as generateSentences, text_generateWords as generateWords, text_getAvailableFonts as getAvailableFonts, text_getMorseForChar as getMorseForChar, text_getMorseTiming as getMorseTiming, text_htmlToMarkdown as htmlToMarkdown, text_isValidMorse as isValidMorse, text_markdownToHtml as markdownToHtml, text_morseToText as morseToText, text_numberToOrdinal as numberToOrdinal, text_numberToRoman as numberToRoman, text_numberToWords as numberToWords, text_ordinalWords as ordinalWords, text_parseDiff as parseDiff, text_parseTableData as parseTableData, text_readabilityScore as readabilityScore, text_renderMarkdown as renderMarkdown, text_romanToNumber as romanToNumber, text_scoreReadability as scoreReadability, text_sentenceCount as sentenceCount, text_slugify as slugify, text_slugifyAll as slugifyAll, text_syllableCount as syllableCount, text_textToAscii as textToAscii, text_textToMorse as textToMorse, text_unescapeString as unescapeString, text_wordFrequency as wordFrequency };
395
423
  }
396
424
 
397
- export { escapeString as $, type AsciiFont as A, applyOp as B, CASE_FORMATS as C, DEFAULT_CONVERT_OPTIONS as D, ESCAPE_MODES as E, type FillerCategory as F, applyOps as G, centerText as H, convertAll as I, convertCase as J, countWords as K, LINE_OPS as L, MORSE_CODE as M, csvToHtml as N, csvToMarkdown as O, type ParsedDiff as P, detectDelimiter as Q, type ReadabilityResult as R, type SlugSeparator as S, type TableOptions as T, detectFillerWords as U, detectPassiveVoice as V, type WordCountResult as W, diffLines as X, diffLinesSimple as Y, diffStats as Z, escapeAll as _, type AsciiOptions as a, extractHeadings as a0, formatReadingTime as a1, generate as a2, generateDiff as a3, generateHtmlTable as a4, generateMarkdownTable as a5, generateParagraphs as a6, generateSentences as a7, generateWords as a8, getAvailableFonts as a9, getMorseForChar as aa, getMorseTiming as ab, htmlToMarkdown as ac, isValidMorse as ad, markdownToHtml as ae, morseToText as af, numberToOrdinal as ag, numberToRoman as ah, numberToWords as ai, ordinalWords as aj, parseDiff as ak, parseTableData as al, readabilityScore as am, renderMarkdown as an, romanToNumber as ao, scoreReadability as ap, sentenceCount as aq, slugify as ar, slugifyAll as as, syllableCount as at, textToAscii as au, textToMorse as av, unescapeString as aw, wordFrequency as ax, type CaseFormat as b, type ConvertOptions as c, type DiffFile as d, type DiffHunk as e, type DiffLine as f, type DiffResult as g, type DiffType as h, type DiffViewerLine as i, type EscapeMode as j, type FillerMatch as k, type FillerWordResult as l, type LineOp as m, type LineType as n, type LoremUnit as o, type MarkdownResult as p, type MorseOptions as q, type ParsedTable as r, type PassiveVoiceMatch as s, text as t, type PassiveVoiceResult as u, type PassiveVoiceSentence as v, type ReadabilityScore as w, type TextAnalysis as x, addBorder as y, analyzeText as z };
425
+ export { diffLinesSimple as $, type AsciiFont as A, addBorder as B, CASE_FORMATS as C, DEFAULT_CONVERT_OPTIONS as D, ESCAPE_MODES as E, type FillerCategory as F, analyzeText as G, applyOp as H, applyOps as I, calculateStringDistance as J, centerText as K, LINE_OPS as L, MORSE_CODE as M, convertAll as N, convertCase as O, type ParsedDiff as P, countWords as Q, type ReadabilityResult as R, type SlugSeparator as S, type TableOptions as T, csvToHtml as U, csvToMarkdown as V, type WordCountResult as W, detectDelimiter as X, detectFillerWords as Y, detectPassiveVoice as Z, diffLines as _, type AsciiOptions as a, diffStats as a0, escapeAll as a1, escapeString as a2, extractHeadings as a3, formatReadingTime as a4, generate as a5, generateDiff as a6, generateHtmlTable as a7, generateMarkdownTable as a8, generateParagraphs as a9, wordFrequency as aA, generateSentences as aa, generateWords as ab, getAvailableFonts as ac, getMorseForChar as ad, getMorseTiming as ae, htmlToMarkdown as af, isValidMorse as ag, markdownToHtml as ah, morseToText as ai, numberToOrdinal as aj, numberToRoman as ak, numberToWords as al, ordinalWords as am, parseDiff as an, parseTableData as ao, readabilityScore as ap, renderMarkdown as aq, romanToNumber as ar, scoreReadability as as, sentenceCount as at, slugify as au, slugifyAll as av, syllableCount as aw, textToAscii as ax, textToMorse as ay, unescapeString as az, type CaseFormat as b, type ConvertOptions as c, type DiffFile as d, type DiffHunk as e, type DiffLine as f, type DiffResult as g, type DiffType as h, type DiffViewerLine as i, type EscapeMode as j, type FillerMatch as k, type FillerWordResult as l, type LineOp as m, type LineType as n, type LoremUnit as o, type MarkdownResult as p, type MorseOptions as q, type ParsedTable as r, type PassiveVoiceMatch as s, text as t, type PassiveVoiceResult as u, type PassiveVoiceSentence as v, type ReadabilityScore as w, type StringDistanceMode as x, type StringDistanceResult as y, type TextAnalysis as z };
@@ -18,6 +18,7 @@
18
18
  * - html-table : detectDelimiter, parseTableData, generateHtmlTable, generateMarkdownTable, csvToHtml, csvToMarkdown
19
19
  * - ascii-art : textToAscii, getAvailableFonts, addBorder, centerText
20
20
  * - morse-code : textToMorse, morseToText, isValidMorse, getMorseForChar, getMorseTiming
21
+ * - string-distance : calculateStringDistance
21
22
  * - passive-voice-detector: detectPassiveVoice
22
23
  * - readability-score: scoreReadability
23
24
  * - filler-word-detector: detectFillerWords
@@ -302,6 +303,30 @@ interface FillerWordResult {
302
303
  * candidate to reconsider, not always wrong in context.
303
304
  */
304
305
  declare function detectFillerWords(text: string): FillerWordResult;
306
+ type StringDistanceMode = 'levenshtein' | 'damerau';
307
+ interface StringDistanceResult {
308
+ a: string;
309
+ b: string;
310
+ distance: number;
311
+ similarity: number;
312
+ maxLength: number;
313
+ mode: StringDistanceMode;
314
+ }
315
+ /**
316
+ * Compute the edit distance between two strings: the minimum number of
317
+ * single-character insertions, deletions, and substitutions (plus adjacent
318
+ * transpositions in "damerau" mode) needed to turn `a` into `b`. "damerau"
319
+ * mode is the optimal-string-alignment variant (each substring edited at
320
+ * most once), not unrestricted Damerau-Levenshtein. Also returns a
321
+ * normalized 0-1 similarity ratio. Classic O(n*m) dynamic programming, pure
322
+ * string comparison with no external dependency.
323
+ */
324
+ declare function calculateStringDistance(a: string, b: string, options?: {
325
+ mode?: StringDistanceMode;
326
+ caseSensitive?: boolean;
327
+ }): StringDistanceResult | {
328
+ error: string;
329
+ };
305
330
 
306
331
  type text_AsciiFont = AsciiFont;
307
332
  type text_AsciiOptions = AsciiOptions;
@@ -335,6 +360,8 @@ type text_PassiveVoiceSentence = PassiveVoiceSentence;
335
360
  type text_ReadabilityResult = ReadabilityResult;
336
361
  type text_ReadabilityScore = ReadabilityScore;
337
362
  type text_SlugSeparator = SlugSeparator;
363
+ type text_StringDistanceMode = StringDistanceMode;
364
+ type text_StringDistanceResult = StringDistanceResult;
338
365
  type text_TableOptions = TableOptions;
339
366
  type text_TextAnalysis = TextAnalysis;
340
367
  type text_WordCountResult = WordCountResult;
@@ -342,6 +369,7 @@ declare const text_addBorder: typeof addBorder;
342
369
  declare const text_analyzeText: typeof analyzeText;
343
370
  declare const text_applyOp: typeof applyOp;
344
371
  declare const text_applyOps: typeof applyOps;
372
+ declare const text_calculateStringDistance: typeof calculateStringDistance;
345
373
  declare const text_centerText: typeof centerText;
346
374
  declare const text_convertAll: typeof convertAll;
347
375
  declare const text_convertCase: typeof convertCase;
@@ -391,7 +419,7 @@ declare const text_textToMorse: typeof textToMorse;
391
419
  declare const text_unescapeString: typeof unescapeString;
392
420
  declare const text_wordFrequency: typeof wordFrequency;
393
421
  declare namespace text {
394
- export { type text_AsciiFont as AsciiFont, type text_AsciiOptions as AsciiOptions, text_CASE_FORMATS as CASE_FORMATS, type text_CaseFormat as CaseFormat, type text_ConvertOptions as ConvertOptions, text_DEFAULT_CONVERT_OPTIONS as DEFAULT_CONVERT_OPTIONS, type text_DiffFile as DiffFile, type text_DiffHunk as DiffHunk, type text_DiffLine as DiffLine, type text_DiffResult as DiffResult, type text_DiffType as DiffType, type text_DiffViewerLine as DiffViewerLine, text_ESCAPE_MODES as ESCAPE_MODES, type text_EscapeMode as EscapeMode, type text_FillerCategory as FillerCategory, type text_FillerMatch as FillerMatch, type text_FillerWordResult as FillerWordResult, text_LINE_OPS as LINE_OPS, type text_LineOp as LineOp, type text_LineType as LineType, type text_LoremUnit as LoremUnit, text_MORSE_CODE as MORSE_CODE, type text_MarkdownResult as MarkdownResult, type text_MorseOptions as MorseOptions, type text_ParsedDiff as ParsedDiff, type text_ParsedTable as ParsedTable, type text_PassiveVoiceMatch as PassiveVoiceMatch, type text_PassiveVoiceResult as PassiveVoiceResult, type text_PassiveVoiceSentence as PassiveVoiceSentence, type text_ReadabilityResult as ReadabilityResult, type text_ReadabilityScore as ReadabilityScore, type text_SlugSeparator as SlugSeparator, type text_TableOptions as TableOptions, type text_TextAnalysis as TextAnalysis, type text_WordCountResult as WordCountResult, text_addBorder as addBorder, text_analyzeText as analyzeText, text_applyOp as applyOp, text_applyOps as applyOps, text_centerText as centerText, text_convertAll as convertAll, text_convertCase as convertCase, text_countWords as countWords, text_csvToHtml as csvToHtml, text_csvToMarkdown as csvToMarkdown, text_detectDelimiter as detectDelimiter, text_detectFillerWords as detectFillerWords, text_detectPassiveVoice as detectPassiveVoice, text_diffLines as diffLines, text_diffLinesSimple as diffLinesSimple, text_diffStats as diffStats, text_escapeAll as escapeAll, text_escapeString as escapeString, text_extractHeadings as extractHeadings, text_formatReadingTime as formatReadingTime, text_generate as generate, text_generateDiff as generateDiff, text_generateHtmlTable as generateHtmlTable, text_generateMarkdownTable as generateMarkdownTable, text_generateParagraphs as generateParagraphs, text_generateSentences as generateSentences, text_generateWords as generateWords, text_getAvailableFonts as getAvailableFonts, text_getMorseForChar as getMorseForChar, text_getMorseTiming as getMorseTiming, text_htmlToMarkdown as htmlToMarkdown, text_isValidMorse as isValidMorse, text_markdownToHtml as markdownToHtml, text_morseToText as morseToText, text_numberToOrdinal as numberToOrdinal, text_numberToRoman as numberToRoman, text_numberToWords as numberToWords, text_ordinalWords as ordinalWords, text_parseDiff as parseDiff, text_parseTableData as parseTableData, text_readabilityScore as readabilityScore, text_renderMarkdown as renderMarkdown, text_romanToNumber as romanToNumber, text_scoreReadability as scoreReadability, text_sentenceCount as sentenceCount, text_slugify as slugify, text_slugifyAll as slugifyAll, text_syllableCount as syllableCount, text_textToAscii as textToAscii, text_textToMorse as textToMorse, text_unescapeString as unescapeString, text_wordFrequency as wordFrequency };
422
+ export { type text_AsciiFont as AsciiFont, type text_AsciiOptions as AsciiOptions, text_CASE_FORMATS as CASE_FORMATS, type text_CaseFormat as CaseFormat, type text_ConvertOptions as ConvertOptions, text_DEFAULT_CONVERT_OPTIONS as DEFAULT_CONVERT_OPTIONS, type text_DiffFile as DiffFile, type text_DiffHunk as DiffHunk, type text_DiffLine as DiffLine, type text_DiffResult as DiffResult, type text_DiffType as DiffType, type text_DiffViewerLine as DiffViewerLine, text_ESCAPE_MODES as ESCAPE_MODES, type text_EscapeMode as EscapeMode, type text_FillerCategory as FillerCategory, type text_FillerMatch as FillerMatch, type text_FillerWordResult as FillerWordResult, text_LINE_OPS as LINE_OPS, type text_LineOp as LineOp, type text_LineType as LineType, type text_LoremUnit as LoremUnit, text_MORSE_CODE as MORSE_CODE, type text_MarkdownResult as MarkdownResult, type text_MorseOptions as MorseOptions, type text_ParsedDiff as ParsedDiff, type text_ParsedTable as ParsedTable, type text_PassiveVoiceMatch as PassiveVoiceMatch, type text_PassiveVoiceResult as PassiveVoiceResult, type text_PassiveVoiceSentence as PassiveVoiceSentence, type text_ReadabilityResult as ReadabilityResult, type text_ReadabilityScore as ReadabilityScore, type text_SlugSeparator as SlugSeparator, type text_StringDistanceMode as StringDistanceMode, type text_StringDistanceResult as StringDistanceResult, type text_TableOptions as TableOptions, type text_TextAnalysis as TextAnalysis, type text_WordCountResult as WordCountResult, text_addBorder as addBorder, text_analyzeText as analyzeText, text_applyOp as applyOp, text_applyOps as applyOps, text_calculateStringDistance as calculateStringDistance, text_centerText as centerText, text_convertAll as convertAll, text_convertCase as convertCase, text_countWords as countWords, text_csvToHtml as csvToHtml, text_csvToMarkdown as csvToMarkdown, text_detectDelimiter as detectDelimiter, text_detectFillerWords as detectFillerWords, text_detectPassiveVoice as detectPassiveVoice, text_diffLines as diffLines, text_diffLinesSimple as diffLinesSimple, text_diffStats as diffStats, text_escapeAll as escapeAll, text_escapeString as escapeString, text_extractHeadings as extractHeadings, text_formatReadingTime as formatReadingTime, text_generate as generate, text_generateDiff as generateDiff, text_generateHtmlTable as generateHtmlTable, text_generateMarkdownTable as generateMarkdownTable, text_generateParagraphs as generateParagraphs, text_generateSentences as generateSentences, text_generateWords as generateWords, text_getAvailableFonts as getAvailableFonts, text_getMorseForChar as getMorseForChar, text_getMorseTiming as getMorseTiming, text_htmlToMarkdown as htmlToMarkdown, text_isValidMorse as isValidMorse, text_markdownToHtml as markdownToHtml, text_morseToText as morseToText, text_numberToOrdinal as numberToOrdinal, text_numberToRoman as numberToRoman, text_numberToWords as numberToWords, text_ordinalWords as ordinalWords, text_parseDiff as parseDiff, text_parseTableData as parseTableData, text_readabilityScore as readabilityScore, text_renderMarkdown as renderMarkdown, text_romanToNumber as romanToNumber, text_scoreReadability as scoreReadability, text_sentenceCount as sentenceCount, text_slugify as slugify, text_slugifyAll as slugifyAll, text_syllableCount as syllableCount, text_textToAscii as textToAscii, text_textToMorse as textToMorse, text_unescapeString as unescapeString, text_wordFrequency as wordFrequency };
395
423
  }
396
424
 
397
- export { escapeString as $, type AsciiFont as A, applyOp as B, CASE_FORMATS as C, DEFAULT_CONVERT_OPTIONS as D, ESCAPE_MODES as E, type FillerCategory as F, applyOps as G, centerText as H, convertAll as I, convertCase as J, countWords as K, LINE_OPS as L, MORSE_CODE as M, csvToHtml as N, csvToMarkdown as O, type ParsedDiff as P, detectDelimiter as Q, type ReadabilityResult as R, type SlugSeparator as S, type TableOptions as T, detectFillerWords as U, detectPassiveVoice as V, type WordCountResult as W, diffLines as X, diffLinesSimple as Y, diffStats as Z, escapeAll as _, type AsciiOptions as a, extractHeadings as a0, formatReadingTime as a1, generate as a2, generateDiff as a3, generateHtmlTable as a4, generateMarkdownTable as a5, generateParagraphs as a6, generateSentences as a7, generateWords as a8, getAvailableFonts as a9, getMorseForChar as aa, getMorseTiming as ab, htmlToMarkdown as ac, isValidMorse as ad, markdownToHtml as ae, morseToText as af, numberToOrdinal as ag, numberToRoman as ah, numberToWords as ai, ordinalWords as aj, parseDiff as ak, parseTableData as al, readabilityScore as am, renderMarkdown as an, romanToNumber as ao, scoreReadability as ap, sentenceCount as aq, slugify as ar, slugifyAll as as, syllableCount as at, textToAscii as au, textToMorse as av, unescapeString as aw, wordFrequency as ax, type CaseFormat as b, type ConvertOptions as c, type DiffFile as d, type DiffHunk as e, type DiffLine as f, type DiffResult as g, type DiffType as h, type DiffViewerLine as i, type EscapeMode as j, type FillerMatch as k, type FillerWordResult as l, type LineOp as m, type LineType as n, type LoremUnit as o, type MarkdownResult as p, type MorseOptions as q, type ParsedTable as r, type PassiveVoiceMatch as s, text as t, type PassiveVoiceResult as u, type PassiveVoiceSentence as v, type ReadabilityScore as w, type TextAnalysis as x, addBorder as y, analyzeText as z };
425
+ export { diffLinesSimple as $, type AsciiFont as A, addBorder as B, CASE_FORMATS as C, DEFAULT_CONVERT_OPTIONS as D, ESCAPE_MODES as E, type FillerCategory as F, analyzeText as G, applyOp as H, applyOps as I, calculateStringDistance as J, centerText as K, LINE_OPS as L, MORSE_CODE as M, convertAll as N, convertCase as O, type ParsedDiff as P, countWords as Q, type ReadabilityResult as R, type SlugSeparator as S, type TableOptions as T, csvToHtml as U, csvToMarkdown as V, type WordCountResult as W, detectDelimiter as X, detectFillerWords as Y, detectPassiveVoice as Z, diffLines as _, type AsciiOptions as a, diffStats as a0, escapeAll as a1, escapeString as a2, extractHeadings as a3, formatReadingTime as a4, generate as a5, generateDiff as a6, generateHtmlTable as a7, generateMarkdownTable as a8, generateParagraphs as a9, wordFrequency as aA, generateSentences as aa, generateWords as ab, getAvailableFonts as ac, getMorseForChar as ad, getMorseTiming as ae, htmlToMarkdown as af, isValidMorse as ag, markdownToHtml as ah, morseToText as ai, numberToOrdinal as aj, numberToRoman as ak, numberToWords as al, ordinalWords as am, parseDiff as an, parseTableData as ao, readabilityScore as ap, renderMarkdown as aq, romanToNumber as ar, scoreReadability as as, sentenceCount as at, slugify as au, slugifyAll as av, syllableCount as aw, textToAscii as ax, textToMorse as ay, unescapeString as az, type CaseFormat as b, type ConvertOptions as c, type DiffFile as d, type DiffHunk as e, type DiffLine as f, type DiffResult as g, type DiffType as h, type DiffViewerLine as i, type EscapeMode as j, type FillerMatch as k, type FillerWordResult as l, type LineOp as m, type LineType as n, type LoremUnit as o, type MarkdownResult as p, type MorseOptions as q, type ParsedTable as r, type PassiveVoiceMatch as s, text as t, type PassiveVoiceResult as u, type PassiveVoiceSentence as v, type ReadabilityScore as w, type StringDistanceMode as x, type StringDistanceResult as y, type TextAnalysis as z };
@@ -493,6 +493,48 @@ function parseJwks(input) {
493
493
  const duplicateKids = [...kidCounts.entries()].filter(([, c]) => c > 1).map(([kid]) => kid);
494
494
  return { ok: true, keys, count: keys.length, duplicateKids };
495
495
  }
496
+ var JWK_THUMBPRINT_MEMBERS = {
497
+ oct: ["k", "kty"],
498
+ RSA: ["e", "kty", "n"],
499
+ EC: ["crv", "kty", "x", "y"],
500
+ OKP: ["crv", "kty", "x"]
501
+ };
502
+ var JWK_THUMBPRINT_NODE_HASH = {
503
+ "SHA-256": "sha256",
504
+ "SHA-384": "sha384",
505
+ "SHA-512": "sha512"
506
+ };
507
+ function computeJwkThumbprint(input, hashAlg = "SHA-256") {
508
+ const trimmed = input.trim();
509
+ if (!trimmed) return { ok: false, error: "No input provided" };
510
+ const nodeHash = JWK_THUMBPRINT_NODE_HASH[hashAlg];
511
+ if (!nodeHash) return { ok: false, error: 'hashAlg must be one of "SHA-256", "SHA-384", "SHA-512"' };
512
+ let jwk;
513
+ try {
514
+ jwk = JSON.parse(trimmed);
515
+ } catch (e) {
516
+ return { ok: false, error: `Invalid JSON: ${e instanceof Error ? e.message : String(e)}` };
517
+ }
518
+ if (jwk === null || typeof jwk !== "object" || Array.isArray(jwk)) {
519
+ return { ok: false, error: "Input must be a single JWK object, not a JWKS set or array" };
520
+ }
521
+ const obj = jwk;
522
+ const kty = obj.kty;
523
+ if (typeof kty !== "string") return { ok: false, error: 'JWK must have a "kty" (key type) member' };
524
+ const members = JWK_THUMBPRINT_MEMBERS[kty];
525
+ if (!members) return { ok: false, error: `Unsupported key type "${kty}": supported types are RSA, EC, oct, OKP` };
526
+ const canonical = {};
527
+ for (const m of members) {
528
+ const v = obj[m];
529
+ if (typeof v !== "string" || v.length === 0) {
530
+ return { ok: false, error: `JWK is missing required member "${m}" for key type "${kty}"` };
531
+ }
532
+ canonical[m] = v;
533
+ }
534
+ const canonicalJson = "{" + members.map((m) => `${JSON.stringify(m)}:${JSON.stringify(canonical[m])}`).join(",") + "}";
535
+ const thumbprint = crypto.createHash(nodeHash).update(canonicalJson, "utf8").digest("base64url");
536
+ return { ok: true, kty, hashAlg, members, canonicalJson, thumbprint };
537
+ }
496
538
  var ALG_TO_NODE_HASH = {
497
539
  HS256: "sha256",
498
540
  HS384: "sha384",
@@ -1237,6 +1279,7 @@ exports.base64urlEncode = base64urlEncode;
1237
1279
  exports.buildCurl = buildCurl;
1238
1280
  exports.buildCurlMultiline = buildCurlMultiline;
1239
1281
  exports.buildUrl = buildUrl;
1282
+ exports.computeJwkThumbprint = computeJwkThumbprint;
1240
1283
  exports.convertToCode = convertToCode;
1241
1284
  exports.decodeJwt = decodeJwt;
1242
1285
  exports.decodeUrlComponent = decodeUrlComponent;
@@ -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 HttpMethod, J as JwkSummary, o as JwksError, p as JwksParseResult, q as JwksResult, r as JwtAlgorithm, s as JwtDecodeError, t as JwtDecodeResult, u as JwtExpiry, v as JwtPart, w as JwtResult, x as JwtSignOptions, M as MetaTags, O as OgTags, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, y as TwitterTags, z as addParam, A as base64urlDecode, B as base64urlEncode, E as buildCurl, G as buildCurlMultiline, I as buildUrl, K as convertToCode, L as decodeJwt, N as decodeUrlComponent, Q as detectFormat, U as encodeUrlComponent, V as extractJsonPaths, W as formatJwtJson, X as formatResponse, Y as generateCors, Z as generateCspHeader, _ as generateFullHeader, $ as generateMetaHtml, a0 as getParam, a1 as getStats, a2 as isValidUrl, a3 as normalizeUrl, a4 as parseCspHeader, a5 as parseCurl, a6 as parseCurlCommand, a7 as parseJwks, a8 as parseMetaTags, a9 as parseUrl, aa as removeParam, ab as signJwt, ac as validateCorsConfig, ad as validateCspConfig, ae as validateOgTags } from '../api-Xl7OzIgq.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 HttpMethod, J as JwkSummary, o as JwkThumbprintErrorResult, p as JwkThumbprintHash, q as JwkThumbprintOutcome, r as JwkThumbprintResult, s as JwksError, t as JwksParseResult, u as JwksResult, v as JwtAlgorithm, w as JwtDecodeError, x as JwtDecodeResult, y as JwtExpiry, z as JwtPart, A as JwtResult, B as JwtSignOptions, M as MetaTags, O as OgTags, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, E as TwitterTags, G as addParam, I as base64urlDecode, K as base64urlEncode, L as buildCurl, N as buildCurlMultiline, Q as buildUrl, U as computeJwkThumbprint, V as convertToCode, W as decodeJwt, X as decodeUrlComponent, Y as detectFormat, Z as encodeUrlComponent, _ as extractJsonPaths, $ as formatJwtJson, a0 as formatResponse, a1 as generateCors, a2 as generateCspHeader, a3 as generateFullHeader, a4 as generateMetaHtml, a5 as getParam, a6 as getStats, a7 as isValidUrl, a8 as normalizeUrl, a9 as parseCspHeader, aa as parseCurl, ab as parseCurlCommand, ac as parseJwks, ad as parseMetaTags, ae as parseUrl, af as removeParam, ag as signJwt, ah as validateCorsConfig, ai as validateCspConfig, aj as validateOgTags } from '../api-DmTNE4c1.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 HttpMethod, J as JwkSummary, o as JwksError, p as JwksParseResult, q as JwksResult, r as JwtAlgorithm, s as JwtDecodeError, t as JwtDecodeResult, u as JwtExpiry, v as JwtPart, w as JwtResult, x as JwtSignOptions, M as MetaTags, O as OgTags, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, y as TwitterTags, z as addParam, A as base64urlDecode, B as base64urlEncode, E as buildCurl, G as buildCurlMultiline, I as buildUrl, K as convertToCode, L as decodeJwt, N as decodeUrlComponent, Q as detectFormat, U as encodeUrlComponent, V as extractJsonPaths, W as formatJwtJson, X as formatResponse, Y as generateCors, Z as generateCspHeader, _ as generateFullHeader, $ as generateMetaHtml, a0 as getParam, a1 as getStats, a2 as isValidUrl, a3 as normalizeUrl, a4 as parseCspHeader, a5 as parseCurl, a6 as parseCurlCommand, a7 as parseJwks, a8 as parseMetaTags, a9 as parseUrl, aa as removeParam, ab as signJwt, ac as validateCorsConfig, ad as validateCspConfig, ae as validateOgTags } from '../api-Xl7OzIgq.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 HttpMethod, J as JwkSummary, o as JwkThumbprintErrorResult, p as JwkThumbprintHash, q as JwkThumbprintOutcome, r as JwkThumbprintResult, s as JwksError, t as JwksParseResult, u as JwksResult, v as JwtAlgorithm, w as JwtDecodeError, x as JwtDecodeResult, y as JwtExpiry, z as JwtPart, A as JwtResult, B as JwtSignOptions, M as MetaTags, O as OgTags, P as ParsedUrl, R as ResponseFormat, S as SUPPORTED_LANGUAGES, T as TargetLanguage, E as TwitterTags, G as addParam, I as base64urlDecode, K as base64urlEncode, L as buildCurl, N as buildCurlMultiline, Q as buildUrl, U as computeJwkThumbprint, V as convertToCode, W as decodeJwt, X as decodeUrlComponent, Y as detectFormat, Z as encodeUrlComponent, _ as extractJsonPaths, $ as formatJwtJson, a0 as formatResponse, a1 as generateCors, a2 as generateCspHeader, a3 as generateFullHeader, a4 as generateMetaHtml, a5 as getParam, a6 as getStats, a7 as isValidUrl, a8 as normalizeUrl, a9 as parseCspHeader, aa as parseCurl, ab as parseCurlCommand, ac as parseJwks, ad as parseMetaTags, ae as parseUrl, af as removeParam, ag as signJwt, ah as validateCorsConfig, ai as validateCspConfig, aj as validateOgTags } from '../api-DmTNE4c1.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, convertToCode, decodeJwt, decodeUrlComponent, detectFormat, encodeUrlComponent, extractJsonPaths, formatJwtJson, formatResponse, generateCors, generateCspHeader, generateFullHeader, generateMetaHtml, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags } from '../chunk-Q3B3YWOA.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, generateMetaHtml, getParam, getStats, isValidUrl, normalizeUrl, parseCspHeader, parseCurl, parseCurlCommand, parseJwks, parseMetaTags, parseUrl, removeParam, signJwt, validateCorsConfig, validateCspConfig, validateOgTags } from '../chunk-52ZDKSIX.js';
2
2
  import '../chunk-MLKGABMK.js';
@@ -2497,6 +2497,47 @@ function detectFillerWords(text) {
2497
2497
  const density = totalWords > 0 ? Math.round(totalMatches / totalWords * 1e3) / 10 : 0;
2498
2498
  return { totalWords, totalMatches, fillerCount, hedgeCount, clicheCount, density, matches };
2499
2499
  }
2500
+ var MAX_STRING_DISTANCE_LENGTH = 5e3;
2501
+ function calculateStringDistance(a, b, options) {
2502
+ if (typeof a !== "string" || typeof b !== "string") {
2503
+ return { error: "Both a and b must be strings" };
2504
+ }
2505
+ if (a.length > MAX_STRING_DISTANCE_LENGTH || b.length > MAX_STRING_DISTANCE_LENGTH) {
2506
+ return { error: `Strings must be at most ${MAX_STRING_DISTANCE_LENGTH} characters` };
2507
+ }
2508
+ const mode = options?.mode ?? "levenshtein";
2509
+ const caseSensitive = options?.caseSensitive ?? true;
2510
+ const s1 = caseSensitive ? a : a.toLowerCase();
2511
+ const s2 = caseSensitive ? b : b.toLowerCase();
2512
+ const m = s1.length;
2513
+ const n = s2.length;
2514
+ const maxLength = Math.max(m, n);
2515
+ if (m === 0 || n === 0) {
2516
+ return { a, b, distance: maxLength, similarity: maxLength === 0 ? 1 : 0, maxLength, mode };
2517
+ }
2518
+ const dp = Array.from({ length: m + 1 }, () => new Array(n + 1).fill(0));
2519
+ for (let i = 0; i <= m; i++) dp[i][0] = i;
2520
+ for (let j = 0; j <= n; j++) dp[0][j] = j;
2521
+ for (let i = 1; i <= m; i++) {
2522
+ for (let j = 1; j <= n; j++) {
2523
+ const cost = s1[i - 1] === s2[j - 1] ? 0 : 1;
2524
+ dp[i][j] = Math.min(
2525
+ dp[i - 1][j] + 1,
2526
+ // deletion
2527
+ dp[i][j - 1] + 1,
2528
+ // insertion
2529
+ dp[i - 1][j - 1] + cost
2530
+ // substitution
2531
+ );
2532
+ if (mode === "damerau" && i > 1 && j > 1 && s1[i - 1] === s2[j - 2] && s1[i - 2] === s2[j - 1]) {
2533
+ dp[i][j] = Math.min(dp[i][j], dp[i - 2][j - 2] + 1);
2534
+ }
2535
+ }
2536
+ }
2537
+ const distance = dp[m][n];
2538
+ const similarity = maxLength === 0 ? 1 : Math.round((1 - distance / maxLength) * 1e4) / 1e4;
2539
+ return { a, b, distance, similarity, maxLength, mode };
2540
+ }
2500
2541
 
2501
2542
  exports.CASE_FORMATS = CASE_FORMATS;
2502
2543
  exports.DEFAULT_CONVERT_OPTIONS = DEFAULT_CONVERT_OPTIONS;
@@ -2507,6 +2548,7 @@ exports.addBorder = addBorder;
2507
2548
  exports.analyzeText = analyzeText;
2508
2549
  exports.applyOp = applyOp;
2509
2550
  exports.applyOps = applyOps;
2551
+ exports.calculateStringDistance = calculateStringDistance;
2510
2552
  exports.centerText = centerText;
2511
2553
  exports.convertAll = convertAll;
2512
2554
  exports.convertCase = convertCase;
@@ -1 +1 @@
1
- export { A as AsciiFont, a as AsciiOptions, C as CASE_FORMATS, b as CaseFormat, c as ConvertOptions, D as DEFAULT_CONVERT_OPTIONS, d as DiffFile, e as DiffHunk, f as DiffLine, g as DiffResult, h as DiffType, i as DiffViewerLine, E as ESCAPE_MODES, j as EscapeMode, F as FillerCategory, k as FillerMatch, l as FillerWordResult, L as LINE_OPS, m as LineOp, n as LineType, o as LoremUnit, M as MORSE_CODE, p as MarkdownResult, q as MorseOptions, P as ParsedDiff, r as ParsedTable, s as PassiveVoiceMatch, u as PassiveVoiceResult, v as PassiveVoiceSentence, R as ReadabilityResult, w as ReadabilityScore, S as SlugSeparator, T as TableOptions, x as TextAnalysis, W as WordCountResult, y as addBorder, z as analyzeText, B as applyOp, G as applyOps, H as centerText, I as convertAll, J as convertCase, K as countWords, N as csvToHtml, O as csvToMarkdown, Q as detectDelimiter, U as detectFillerWords, V as detectPassiveVoice, X as diffLines, Y as diffLinesSimple, Z as diffStats, _ as escapeAll, $ as escapeString, a0 as extractHeadings, a1 as formatReadingTime, a2 as generate, a3 as generateDiff, a4 as generateHtmlTable, a5 as generateMarkdownTable, a6 as generateParagraphs, a7 as generateSentences, a8 as generateWords, a9 as getAvailableFonts, aa as getMorseForChar, ab as getMorseTiming, ac as htmlToMarkdown, ad as isValidMorse, ae as markdownToHtml, af as morseToText, ag as numberToOrdinal, ah as numberToRoman, ai as numberToWords, aj as ordinalWords, ak as parseDiff, al as parseTableData, am as readabilityScore, an as renderMarkdown, ao as romanToNumber, ap as scoreReadability, aq as sentenceCount, ar as slugify, as as slugifyAll, at as syllableCount, au as textToAscii, av as textToMorse, aw as unescapeString, ax as wordFrequency } from '../text-DS70aMY5.cjs';
1
+ export { A as AsciiFont, a as AsciiOptions, C as CASE_FORMATS, b as CaseFormat, c as ConvertOptions, D as DEFAULT_CONVERT_OPTIONS, d as DiffFile, e as DiffHunk, f as DiffLine, g as DiffResult, h as DiffType, i as DiffViewerLine, E as ESCAPE_MODES, j as EscapeMode, F as FillerCategory, k as FillerMatch, l as FillerWordResult, L as LINE_OPS, m as LineOp, n as LineType, o as LoremUnit, M as MORSE_CODE, p as MarkdownResult, q as MorseOptions, P as ParsedDiff, r as ParsedTable, s as PassiveVoiceMatch, u as PassiveVoiceResult, v as PassiveVoiceSentence, R as ReadabilityResult, w as ReadabilityScore, S as SlugSeparator, x as StringDistanceMode, y as StringDistanceResult, T as TableOptions, z as TextAnalysis, W as WordCountResult, B as addBorder, G as analyzeText, H as applyOp, I as applyOps, J as calculateStringDistance, K as centerText, N as convertAll, O as convertCase, Q as countWords, U as csvToHtml, V as csvToMarkdown, X as detectDelimiter, Y as detectFillerWords, Z as detectPassiveVoice, _ as diffLines, $ as diffLinesSimple, a0 as diffStats, a1 as escapeAll, a2 as escapeString, a3 as extractHeadings, a4 as formatReadingTime, a5 as generate, a6 as generateDiff, a7 as generateHtmlTable, a8 as generateMarkdownTable, a9 as generateParagraphs, aa as generateSentences, ab as generateWords, ac as getAvailableFonts, ad as getMorseForChar, ae as getMorseTiming, af as htmlToMarkdown, ag as isValidMorse, ah as markdownToHtml, ai as morseToText, aj as numberToOrdinal, ak as numberToRoman, al as numberToWords, am as ordinalWords, an as parseDiff, ao as parseTableData, ap as readabilityScore, aq as renderMarkdown, ar as romanToNumber, as as scoreReadability, at as sentenceCount, au as slugify, av as slugifyAll, aw as syllableCount, ax as textToAscii, ay as textToMorse, az as unescapeString, aA as wordFrequency } from '../text-D1fySkCB.cjs';
@@ -1 +1 @@
1
- export { A as AsciiFont, a as AsciiOptions, C as CASE_FORMATS, b as CaseFormat, c as ConvertOptions, D as DEFAULT_CONVERT_OPTIONS, d as DiffFile, e as DiffHunk, f as DiffLine, g as DiffResult, h as DiffType, i as DiffViewerLine, E as ESCAPE_MODES, j as EscapeMode, F as FillerCategory, k as FillerMatch, l as FillerWordResult, L as LINE_OPS, m as LineOp, n as LineType, o as LoremUnit, M as MORSE_CODE, p as MarkdownResult, q as MorseOptions, P as ParsedDiff, r as ParsedTable, s as PassiveVoiceMatch, u as PassiveVoiceResult, v as PassiveVoiceSentence, R as ReadabilityResult, w as ReadabilityScore, S as SlugSeparator, T as TableOptions, x as TextAnalysis, W as WordCountResult, y as addBorder, z as analyzeText, B as applyOp, G as applyOps, H as centerText, I as convertAll, J as convertCase, K as countWords, N as csvToHtml, O as csvToMarkdown, Q as detectDelimiter, U as detectFillerWords, V as detectPassiveVoice, X as diffLines, Y as diffLinesSimple, Z as diffStats, _ as escapeAll, $ as escapeString, a0 as extractHeadings, a1 as formatReadingTime, a2 as generate, a3 as generateDiff, a4 as generateHtmlTable, a5 as generateMarkdownTable, a6 as generateParagraphs, a7 as generateSentences, a8 as generateWords, a9 as getAvailableFonts, aa as getMorseForChar, ab as getMorseTiming, ac as htmlToMarkdown, ad as isValidMorse, ae as markdownToHtml, af as morseToText, ag as numberToOrdinal, ah as numberToRoman, ai as numberToWords, aj as ordinalWords, ak as parseDiff, al as parseTableData, am as readabilityScore, an as renderMarkdown, ao as romanToNumber, ap as scoreReadability, aq as sentenceCount, ar as slugify, as as slugifyAll, at as syllableCount, au as textToAscii, av as textToMorse, aw as unescapeString, ax as wordFrequency } from '../text-DS70aMY5.js';
1
+ export { A as AsciiFont, a as AsciiOptions, C as CASE_FORMATS, b as CaseFormat, c as ConvertOptions, D as DEFAULT_CONVERT_OPTIONS, d as DiffFile, e as DiffHunk, f as DiffLine, g as DiffResult, h as DiffType, i as DiffViewerLine, E as ESCAPE_MODES, j as EscapeMode, F as FillerCategory, k as FillerMatch, l as FillerWordResult, L as LINE_OPS, m as LineOp, n as LineType, o as LoremUnit, M as MORSE_CODE, p as MarkdownResult, q as MorseOptions, P as ParsedDiff, r as ParsedTable, s as PassiveVoiceMatch, u as PassiveVoiceResult, v as PassiveVoiceSentence, R as ReadabilityResult, w as ReadabilityScore, S as SlugSeparator, x as StringDistanceMode, y as StringDistanceResult, T as TableOptions, z as TextAnalysis, W as WordCountResult, B as addBorder, G as analyzeText, H as applyOp, I as applyOps, J as calculateStringDistance, K as centerText, N as convertAll, O as convertCase, Q as countWords, U as csvToHtml, V as csvToMarkdown, X as detectDelimiter, Y as detectFillerWords, Z as detectPassiveVoice, _ as diffLines, $ as diffLinesSimple, a0 as diffStats, a1 as escapeAll, a2 as escapeString, a3 as extractHeadings, a4 as formatReadingTime, a5 as generate, a6 as generateDiff, a7 as generateHtmlTable, a8 as generateMarkdownTable, a9 as generateParagraphs, aa as generateSentences, ab as generateWords, ac as getAvailableFonts, ad as getMorseForChar, ae as getMorseTiming, af as htmlToMarkdown, ag as isValidMorse, ah as markdownToHtml, ai as morseToText, aj as numberToOrdinal, ak as numberToRoman, al as numberToWords, am as ordinalWords, an as parseDiff, ao as parseTableData, ap as readabilityScore, aq as renderMarkdown, ar as romanToNumber, as as scoreReadability, at as sentenceCount, au as slugify, av as slugifyAll, aw as syllableCount, ax as textToAscii, ay as textToMorse, az as unescapeString, aA as wordFrequency } from '../text-D1fySkCB.js';
@@ -1,2 +1,2 @@
1
- export { CASE_FORMATS, DEFAULT_CONVERT_OPTIONS, ESCAPE_MODES, LINE_OPS, MORSE_CODE, addBorder, analyzeText, applyOp, applyOps, centerText, convertAll, convertCase, countWords, csvToHtml, csvToMarkdown, detectDelimiter, detectFillerWords, detectPassiveVoice, diffLines, diffLinesSimple, diffStats, escapeAll, escapeString, extractHeadings, formatReadingTime, generate, generateDiff, generateHtmlTable, generateMarkdownTable, generateParagraphs, generateSentences, generateWords, getAvailableFonts, getMorseForChar, getMorseTiming, htmlToMarkdown, isValidMorse, markdownToHtml, morseToText, numberToOrdinal, numberToRoman, numberToWords, ordinalWords, parseDiff, parseTableData, readabilityScore, renderMarkdown, romanToNumber, scoreReadability, sentenceCount, slugify, slugifyAll, syllableCount, textToAscii, textToMorse, unescapeString, wordFrequency } from '../chunk-2I4O5YCT.js';
1
+ export { CASE_FORMATS, DEFAULT_CONVERT_OPTIONS, ESCAPE_MODES, LINE_OPS, MORSE_CODE, addBorder, analyzeText, applyOp, applyOps, calculateStringDistance, centerText, convertAll, convertCase, countWords, csvToHtml, csvToMarkdown, detectDelimiter, detectFillerWords, detectPassiveVoice, diffLines, diffLinesSimple, diffStats, escapeAll, escapeString, extractHeadings, formatReadingTime, generate, generateDiff, generateHtmlTable, generateMarkdownTable, generateParagraphs, generateSentences, generateWords, getAvailableFonts, getMorseForChar, getMorseTiming, htmlToMarkdown, isValidMorse, markdownToHtml, morseToText, numberToOrdinal, numberToRoman, numberToWords, ordinalWords, parseDiff, parseTableData, readabilityScore, renderMarkdown, romanToNumber, scoreReadability, sentenceCount, slugify, slugifyAll, syllableCount, textToAscii, textToMorse, unescapeString, wordFrequency } from '../chunk-AFEZ6N4A.js';
2
2
  import '../chunk-MLKGABMK.js';