@visulima/string 3.0.0 → 3.1.1
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 +21 -0
- package/LICENSE.md +55 -129
- package/README.md +2 -2
- package/dist/align-text.d.ts +29 -29
- package/dist/align-text.js +2 -2
- package/dist/case/camel-case.d.ts +16 -16
- package/dist/case/camel-case.js +1 -1
- package/dist/case/capital-case.d.ts +13 -13
- package/dist/case/capital-case.js +1 -1
- package/dist/case/constant-case.d.ts +13 -13
- package/dist/case/constant-case.js +1 -1
- package/dist/case/dot-case.d.ts +13 -13
- package/dist/case/dot-case.js +1 -1
- package/dist/case/flat-case.d.ts +11 -11
- package/dist/case/flat-case.js +1 -1
- package/dist/case/flip-case.d.ts +14 -14
- package/dist/case/flip-case.js +1 -1
- package/dist/case/identify-case.d.ts +14 -14
- package/dist/case/identify-case.js +1 -1
- package/dist/case/index.d.ts +7 -7
- package/dist/case/index.js +1 -1
- package/dist/case/kebab-case.d.ts +22 -22
- package/dist/case/kebab-case.js +1 -1
- package/dist/case/lower-first.d.ts +12 -12
- package/dist/case/lower-first.js +1 -1
- package/dist/case/no-case.d.ts +13 -13
- package/dist/case/no-case.js +1 -1
- package/dist/case/pascal-case.d.ts +16 -16
- package/dist/case/pascal-case.js +1 -1
- package/dist/case/pascal-snake-case.d.ts +13 -13
- package/dist/case/pascal-snake-case.js +1 -1
- package/dist/case/path-case.d.ts +13 -13
- package/dist/case/path-case.js +1 -1
- package/dist/case/sentence-case.d.ts +13 -13
- package/dist/case/sentence-case.js +1 -1
- package/dist/case/snake-case.d.ts +13 -13
- package/dist/case/snake-case.js +1 -1
- package/dist/case/split-by-case.d.ts +20 -20
- package/dist/case/split-by-case.js +1 -1
- package/dist/case/title-case.d.ts +11 -11
- package/dist/case/title-case.js +1 -1
- package/dist/case/train-case.d.ts +13 -13
- package/dist/case/train-case.js +1 -1
- package/dist/case/upper-first.d.ts +12 -12
- package/dist/case/upper-first.js +1 -1
- package/dist/closest-string.d.ts +28 -28
- package/dist/closest-string.js +1 -1
- package/dist/compare-similarity.d.ts +33 -33
- package/dist/compare-similarity.js +1 -1
- package/dist/count-occurrences.d.ts +6 -6
- package/dist/count-occurrences.js +1 -1
- package/dist/direction.d.ts +4 -4
- package/dist/direction.js +1 -1
- package/dist/east-asian-width.d.ts +25 -15
- package/dist/east-asian-width.js +1 -1
- package/dist/excerpt.d.ts +18 -18
- package/dist/excerpt.js +55 -44
- package/dist/get-string-truncated-width.d.ts +131 -131
- package/dist/get-string-truncated-width.js +1 -1
- package/dist/get-string-width.d.ts +56 -56
- package/dist/indent.d.ts +11 -8
- package/dist/indent.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/is-fullwidth-code-point.d.ts +4 -4
- package/dist/is-fullwidth-code-point.js +1 -1
- package/dist/levenshtein.d.ts +19 -19
- package/dist/levenshtein.js +1 -1
- package/dist/native-string-types.d.ts +212 -228
- package/dist/outdent.d.ts +64 -64
- package/dist/outdent.js +1 -1
- package/dist/packem_shared/{_isFullWidth-Dqc3MWgl.js → _isFullWidth-dWWDw5Is.js} +1 -1
- package/dist/packem_shared/ansi-state-tracker-BFhXTS-5.js +1 -0
- package/dist/packem_shared/closest-CSX4px2F.js +1 -0
- package/dist/packem_shared/constants-BGGeBKGT.js +1 -0
- package/dist/packem_shared/dedent-CDXp3nZQ.js +1 -0
- package/dist/packem_shared/eastAsianWidth-DACe9Ds2.js +1 -0
- package/dist/packem_shared/generate-cache-key-th9N8-CB.js +1 -0
- package/dist/packem_shared/indent-CY079Qyq.js +1 -0
- package/dist/packem_shared/joinSegments-9qx7xSy7.js +1 -0
- package/dist/packem_shared/{lru-cache-BtMSrYQJ.js → lru-cache-BD25OaEQ.js} +1 -1
- package/dist/packem_shared/normalize-german-eszett-DtW4F-Wg.js +1 -0
- package/dist/packem_shared/redent-lctoaAtw.js +1 -0
- package/dist/packem_shared/strip-vt-control-characters-vMeu7uFw.js +1 -0
- package/dist/packem_shared/types.d-CMNqA5bi.d.ts +402 -0
- package/dist/packem_shared/types.d-LgsTR37y.d.ts +360 -0
- package/dist/replace-string.d.ts +7 -7
- package/dist/replace-string.js +1 -1
- package/dist/slice.d.ts +38 -38
- package/dist/slice.js +1 -1
- package/dist/slugify.d.ts +9 -9
- package/dist/slugify.js +1 -1
- package/dist/test/utils.d.ts +14 -14
- package/dist/test/utils.js +11 -11
- package/dist/test/vitest.d.ts +2 -2
- package/dist/transliterate.d.ts +7 -7
- package/dist/transliterate.js +3 -3
- package/dist/truncate.d.ts +37 -37
- package/dist/truncate.js +1 -1
- package/dist/utilities.d.ts +23 -23
- package/dist/utilities.js +1 -1
- package/dist/word-similarity-sort.d.ts +32 -32
- package/dist/word-similarity-sort.js +1 -1
- package/dist/word-wrap.d.ts +33 -33
- package/dist/word-wrap.js +5 -7
- package/package.json +1 -1
- package/dist/packem_shared/closest-C6YDQs4m.js +0 -1
- package/dist/packem_shared/constants-aPzGW29R.js +0 -1
- package/dist/packem_shared/dedent-CPjAYUXh.js +0 -1
- package/dist/packem_shared/eastAsianWidth-DJV8Kqd-.js +0 -1
- package/dist/packem_shared/generate-cache-key-BqU1Cqwm.js +0 -1
- package/dist/packem_shared/indent-cz8WMI0e.js +0 -1
- package/dist/packem_shared/joinSegments-CaHT-45s.js +0 -1
- package/dist/packem_shared/normalize-german-eszett-hNMwtGjd.js +0 -1
- package/dist/packem_shared/redent-ByOoJ6fN.js +0 -1
- package/dist/packem_shared/types.d-CmNvyl4l.d.ts +0 -360
- package/dist/packem_shared/types.d-fhe030jX.d.ts +0 -402
package/dist/outdent.d.ts
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
declare const outdent: Outdent;
|
|
2
2
|
/**
|
|
3
|
-
* Represents the outdent function, which can be called as a template tag
|
|
4
|
-
* or as a function to create a new instance with specific options.
|
|
5
|
-
* It also includes a `.string()` method for processing regular strings.
|
|
6
|
-
*/
|
|
3
|
+
* Represents the outdent function, which can be called as a template tag
|
|
4
|
+
* or as a function to create a new instance with specific options.
|
|
5
|
+
* It also includes a `.string()` method for processing regular strings.
|
|
6
|
+
*/
|
|
7
7
|
interface Outdent {
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
* Remove indentation from a template literal.
|
|
10
|
+
* Tag function for template literals.
|
|
11
|
+
* @param strings The static string parts of the template literal.
|
|
12
|
+
* @param values The interpolated values.
|
|
13
|
+
* @returns The processed string with indentation removed.
|
|
14
|
+
*/
|
|
15
15
|
(strings: TemplateStringsArray, ...values: any[]): string;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
* Create and return a new Outdent instance with the given options.
|
|
18
|
+
* @param options Configuration options for the new instance.
|
|
19
|
+
* @returns A new Outdent function instance.
|
|
20
|
+
*/
|
|
21
21
|
(options: Options): Outdent;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* Remove indentation from a string
|
|
24
|
+
* @param string_ The raw string to process.
|
|
25
|
+
* @returns The processed string with indentation removed.
|
|
26
|
+
*/
|
|
27
27
|
string: (string_: string) => string;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Configuration options for the outdent function.
|
|
31
|
-
*/
|
|
30
|
+
* Configuration options for the outdent function.
|
|
31
|
+
*/
|
|
32
32
|
interface Options {
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
* Whether to cache processed template literals for better performance when
|
|
35
|
+
* using the same template multiple times.
|
|
36
|
+
*
|
|
37
|
+
* Enabling caching can significantly improve performance when the same template
|
|
38
|
+
* is used repeatedly, such as in loops or frequently called functions.
|
|
39
|
+
* @example
|
|
40
|
+
* // Create an outdent function with caching enabled (default)
|
|
41
|
+
* const dedent = outdent();
|
|
42
|
+
*
|
|
43
|
+
* // Create an outdent function with caching disabled
|
|
44
|
+
* const noCacheDedent = outdent({ cache: false });
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
47
|
cache?: boolean;
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
* Custom cache store to use instead of the default WeakMap.
|
|
50
|
+
* Must be a WeakMap instance.
|
|
51
|
+
*
|
|
52
|
+
* This allows you to provide your own WeakMap instance for caching,
|
|
53
|
+
* which can be useful for advanced use cases or for sharing cache
|
|
54
|
+
* between multiple outdent instances.
|
|
55
|
+
* @example
|
|
56
|
+
* // Create a custom cache
|
|
57
|
+
* const customCache = new WeakMap();
|
|
58
|
+
*
|
|
59
|
+
* // Create an outdent function with a custom cache
|
|
60
|
+
* const customCacheDedent = outdent({ cacheStore: customCache });
|
|
61
|
+
*/
|
|
62
62
|
cacheStore?: WeakMap<TemplateStringsArray, string[]>;
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
* Normalize all newlines in the template literal to this value.
|
|
65
|
+
*
|
|
66
|
+
* If `null`, newlines are left untouched.
|
|
67
|
+
*
|
|
68
|
+
* Newlines that get normalized are '\r\n', '\r', and '\n'.
|
|
69
|
+
*
|
|
70
|
+
* Newlines within interpolated values are *never* normalized.
|
|
71
|
+
*
|
|
72
|
+
* Although intended for normalizing to '\n' or '\r\n',
|
|
73
|
+
* you can also set to any string; for example ' '.
|
|
74
|
+
* @default null
|
|
75
|
+
*/
|
|
76
76
|
newline?: string | null;
|
|
77
77
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
* Whether to trim the leading newline in the template literal.
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
81
|
trimLeadingNewline?: boolean;
|
|
82
82
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
* Whether to trim the trailing newline in the template literal.
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
86
|
trimTrailingNewline?: boolean;
|
|
87
87
|
}
|
|
88
88
|
export { Options, Outdent, outdent };
|
package/dist/outdent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as
|
|
1
|
+
import{f as S,g as w,h as L,i as m,j as R,k as W}from"./packem_shared/constants-BGGeBKGT.js";const _=(e,n)=>Object.hasOwn(e,n),N=(e,n)=>Object.assign(e,n),g=(e,n,t)=>{if(e.length===0)return[];let r=0;const i=R.exec(e[0]);i&&(r=i[1].length);const l=String.raw`(\r\n|\r|\n).{0,${r}}`,s=new RegExp(l,"g"),c=n?e.slice(1):e,{newline:E,trimLeadingNewline:I,trimTrailingNewline:d}=t,o=typeof E=="string",f=c.length,h=Array.from({length:f});for(let u=0;u<f;u++){let a=c[u];a=a.replace(s,"$1"),u===0&&I&&(a=a.replace(S,"")),u===f-1&&d&&(a=a.replace(w,"")),o&&(a=a.replaceAll(W,E)),h[u]=a}return h},O=(e,n)=>{const t=Array.from({length:e.length+n.length});let r=0;const i=e.length;for(;r<i-1;r++)t[r*2]=e[r],t[r*2+1]=String(n[r]);return t[r*2]=e[r],t.join("")},p=e=>_(e,"raw")&&_(e,"length"),x=new WeakMap,T=e=>{const n=e.cache!==!1,t=n?e.cacheStore??x:void 0,r=e.newline!==void 0;function i(l,...s){if(p(l)){const c=l,E=s.length;if(c.length===1&&c[0]==="")return"";if(E===0){if(n&&t&&!r){const h=t.get(c);if(h)return h[0]}const f=g(c,!1,e);return n&&t&&t.set(c,f),f[0]}const d=(s[0]===i||s[0]===A)&&L.test(c[0])&&m.test(c[1]);let o;return n&&t&&!r&&(o=t.get(c)),o||(o=g(c,d,e),n&&t&&t.set(c,o)),O(o,d?s.slice(1):s)}return T(N(N({},e),l))}return N(i,{string(l){return l===""||!l?"":g([l],!1,e)[0]}})},A=T({cache:!0,newline:null,trimLeadingNewline:!0,trimTrailingNewline:!0}),C=A;export{C as outdent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],f=12288,m=65510,h=[12288,12288,65281,65376,65504,65510],w=8361,d=65518,C=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],M=32,c=10630,g=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],x=4352,b=262141,o=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],e=(t,a)=>{let r=0,n=Math.floor(t.length/2)-1;for(;r<=n;){const i=Math.floor((r+n)/2),s=i*2;if(a<t[s])n=i-1;else if(a>t[s+1])r=i+1;else return!0}return!1},u=19968,[R,F]=W(o);function W(t){let a=t[0],r=t[1];for(let n=0;n<t.length;n+=2){const i=t[n],s=t[n+1];if(u>=i&&u<=s)return[i,s];s-i>r-a&&(a=i,r=s)}return[a,r]}const E=t=>t<161||t>1114109?!1:e(l,t),S=t=>t<f||t>m?!1:e(h,t),j=t=>t<w||t>d?!1:e(C,t),k=t=>t<M||t>c?!1:e(g,t),p=t=>t>=R&&t<=F?!0:t<x||t>b?!1:e(o,t);function y(t){return E(t)?"ambiguous":S(t)?"fullwidth":j(t)?"halfwidth":k(t)?"narrow":p(t)?"wide":"neutral"}export{y as getCategory,E as isAmbiguous,S as isFullWidth,p as isWide};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const g=/^(?:\u001B\[|\u009B)([\d:;]*)m$/,c=new Map([[1,22],[2,22],[3,23],[4,24],[5,25],[6,25],[7,27],[8,28],[9,29],[21,24],[53,55]]),p=new Set(c.values()),l=i=>{const t=i.split(";"),e=[];for(let s=0;s<t.length;s+=1){const r=t[s];if(r.includes(":")){e.push([r]);continue}const o=r===""?0:Number.parseInt(r,10);if(o===38||o===48||o===58){const a=t[s+1];let n=0;a==="5"?n=2:a==="2"?n=4:a?.includes(":")&&(n=1),e.push(t.slice(s,s+1+n)),s+=n;continue}e.push([r])}return e},u=i=>{const t=i[0],e=t.indexOf(":"),s=e===-1?t:t.slice(0,e);return s===""?0:Number.parseInt(s,10)},v=i=>i===38||i>=30&&i<=37||i>=90&&i<=97,h=i=>i===48||i>=40&&i<=47||i>=100&&i<=107,d=i=>{const t=l(i);if(t.length!==1)return;const e=u(t[0]);return v(e)?"foreground":h(e)?"background":void 0};class f{activeForeground=void 0;activeBackground=void 0;activeUnderlineColor=void 0;activeAttributes=new Map;processEscape(t){const e=g.exec(t);if(e)for(const s of l(e[1])){const r=u(s);switch(r){case 0:{this.resetAll();break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}case 59:{this.activeUnderlineColor=void 0;break}default:this.applyParameter(r,`\x1B[${s.join(";")}m`)}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,this.activeUnderlineColor,...this.activeAttributes.values()].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const t=[...this.activeAttributes.keys()].toReversed().map(e=>`\x1B[${String(e)}m`);return this.activeUnderlineColor&&t.push("\x1B[59m"),this.activeForeground&&t.push("\x1B[39m"),this.activeBackground&&t.push("\x1B[49m"),t.join("")}resetAll(){this.activeForeground=void 0,this.activeBackground=void 0,this.activeUnderlineColor=void 0,this.activeAttributes.clear()}applyParameter(t,e){if(!((t===38||t===48||t===58)&&!e.includes(";")&&!e.includes(":")))if(v(t))this.activeForeground=e;else if(h(t))this.activeBackground=e;else if(t===58)this.activeUnderlineColor=e;else if(p.has(t))this.activeAttributes.delete(t);else{const s=c.get(t);s!==void 0&&this.activeAttributes.set(s,e)}}}export{f as A,d as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const g=new Uint32Array(65536),z=(n,o)=>{const l=n.length,h=o.length,r=1<<l-1;let c=-1,m=0,a=l,s=l;for(;s--;)g[n.charCodeAt(s)]|=1<<s;for(s=0;s<h;s++){let d=g[o.charCodeAt(s)];const v=d|m;d|=(d&c)+c^c,m|=~(d|c),c&=d,m&r&&a++,c&r&&a--,m=m<<1|1,c=c<<1|~(v|m),m&=v}for(s=l;s--;)g[n.charCodeAt(s)]=0;return a},j=(n,o)=>{const l=o.length,h=n.length,r=[],c=[],m=Math.ceil(l/32),a=Math.ceil(h/32);for(let t=0;t<m;t++)c[t]=-1,r[t]=0;let s=0;for(;s<a-1;s++){let t=0,i=-1;const C=s*32,A=Math.min(32,h)+C;for(let e=C;e<A;e++)g[n.charCodeAt(e)]|=1<<e;for(let e=0;e<l;e++){const x=g[o.charCodeAt(e)],p=c[e/32|0]>>>e&1,f=r[e/32|0]>>>e&1,_=x|t,w=((x|f)&i)+i^i|x|f;let u=t|~(w|i),q=i&w;u>>>31^p&&(c[e/32|0]^=1<<e),q>>>31^f&&(r[e/32|0]^=1<<e),u=u<<1|p,q=q<<1|f,i=q|~(_|u),t=u&_}for(let e=C;e<A;e++)g[n.charCodeAt(e)]=0}let d=0,v=-1;const k=s*32,M=Math.min(32,h-k)+k;for(let t=k;t<M;t++)g[n.charCodeAt(t)]|=1<<t;let y=h;for(let t=0;t<l;t++){const i=g[o.charCodeAt(t)],C=c[t/32|0]>>>t&1,A=r[t/32|0]>>>t&1,e=i|d,x=((i|A)&v)+v^v|i|A;let p=d|~(x|v),f=v&x;y+=p>>>h-1&1,y-=f>>>h-1&1,p>>>31^C&&(c[t/32|0]^=1<<t),f>>>31^A&&(r[t/32|0]^=1<<t),p=p<<1|C,f=f<<1|A,v=f|~(e|p),d=p&e}for(let t=k;t<M;t++)g[n.charCodeAt(t)]=0;return y},I=(n,o)=>{if(n.length<o.length){const l=o;o=n,n=l}return o.length===0?n.length:n.length<=32?z(n,o):j(n,o)},U=(n,o)=>{let l=1/0,h=0;for(let r=0;r<o.length;r++){const c=I(n,o[r]);c<l&&(l=c,h=r)}return o[h]};export{U as closest,I as distance};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=String.raw,E=n`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,t=()=>new RegExp(n`\p{RI}{2}|(?)${E}(?:\u200D${E})*`,"gu"),p=new Set(["\x1B",""]),a="\x07",c="]8;;",u=/[\u200B\uFEFF\u2060-\u2064]/g,e=/^[ \t]*(?:\r\n|\r|\n)/,_=/(?:\r\n|\r|\n)[ \t]*$/,r=/^(?:[\r\n]|$)/,A=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,o=/^[ \t]*[\r\n][ \t\r\n]*$/,S=/\r\n|\n|\r/g,i=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\)|\][^\u0007\u001B]{0,1000}(?:\u0007|\u001B\\))/g,I=/\u001B\[[\d;]*m[^\u001B]*(?:\u001B\[[\d;]*m|$)/g,g=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)[^\u001B]*\u001B\]8;;(?:\u0007|\u001B\\)/g,N=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,R=t(),L=/[-_./\s]+/g,T=/(\u001B\[[0-9;]*[a-z])/i,x=new RegExp("\\p{Script=Arabic}","u"),w=new RegExp("\\p{Script=Bengali}","u"),B=new RegExp("\\p{Script=Cyrillic}","u"),H=new RegExp("\\p{Script=Devanagari}","u"),G=new RegExp("\\p{Script=Ethiopic}","u"),O=new RegExp("\\p{Script=Greek}","u"),K=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),M=new RegExp("\\p{Script=Gujarati}","u"),C=new RegExp("\\p{Script=Gurmukhi}","u"),F=new RegExp("\\p{Script=Hangul}","u"),D=new RegExp("\\p{Script=Hebrew}","u"),l=new RegExp("\\p{Script=Hiragana}","u"),m=new RegExp("\\p{Script=Han}","u"),P=new RegExp("\\p{Script=Kannada}","u"),W=new RegExp("\\p{Script=Katakana}","u"),d=new RegExp("\\p{Script=Khmer}","u"),y=new RegExp("\\p{Script=Lao}","u"),U=new RegExp("\\p{Script=Latin}","u"),Y=new RegExp("\\p{Script=Malayalam}","u"),$=new RegExp("\\p{Script=Myanmar}","u"),h=new RegExp("\\p{Script=Oriya}","u"),k=new RegExp("\\p{Script=Sinhala}","u"),j=new RegExp("\\p{Script=Tamil}","u"),b=new RegExp("\\p{Script=Telugu}","u"),J=new RegExp("\\p{Script=Thai}","u"),V=new RegExp("\\p{Script=Tibetan}","u"),Z=/[\u02BB\u02BC\u0027]/u,f=s=>s.replace(R,"");export{M as A,C as B,P as C,j as D,b as E,Y as F,k as G,J as H,y as I,V as J,$ as K,G as L,d as M,h as N,p as O,c as P,a as Q,R,u as S,i as a,N as b,T as c,I as d,g as e,e as f,_ as g,o as h,r as i,A as j,S as k,B as l,U as m,O as n,K as o,Z as p,W as q,m as r,f as s,l as t,F as u,D as v,x as w,L as x,H as y,w as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function I(t){const n=t.match(/^[ \t]*(?=\S)/gm);if(!n)return t;let e=Number.POSITIVE_INFINITY;for(const r of n)e=Math.min(e,r.length);return e===0||e===Number.POSITIVE_INFINITY?t:t.replace(new RegExp(`^[ \\t]{${e}}`,"gm"),"")}function m(t){const n=t.replace(/^(?:[ \t]*\r?\n)+|(?:\r?\n[ \t]*)+$/g,"");return I(n)}export{m as dedent,I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isFullWidth as r,isWide as s,isAmbiguous as a,getCategory as u}from"./_isFullWidth-dWWDw5Is.js";function i(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function n(e){return i(e),u(e)}function p(e,{ambiguousAsWide:t=!1}={}){return i(e),r(e)||s(e)||t&&a(e)?2:1}export{r as _isFullWidth,s as _isWide,p as eastAsianWidth,n as eastAsianWidthType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=(a,e)=>`${a}::${e?.joiner??""}::${e?.locale??""}::${e?.knownAcronyms?.join(",")??""}::${e?.normalize?"true":"false"}::${e?.stripAnsi?"true":"false"}::${e?.stripEmoji?"true":"false"}::${e?.handleAnsi?"true":"false"}::${e?.handleEmoji?"true":"false"}`;export{r as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(t,e=1,o={}){const{indent:r=" ",includeEmptyLines:n=!1}=o;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(e===0)return t;const p=n?/^/gm:/^(?!\s*$)/gm;return t.replace(p,r.repeat(e))}export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l}from"./constants-BGGeBKGT.js";const c=(i,r)=>{const{length:f}=i;if(f===0)return"";if(f===1)return i[0];const t=[];let e="",n="";for(let u=0;u<f;u++){const s=i[u];if(l.test(s)){e?(t.push(e+n+s),e="",n=""):(t.length>0&&t.push(r),e=s);continue}e?(n&&(n+=r),n+=s):(t.length>0&&t.push(r),t.push(s))}return t.join("")};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class s{capacity;cache;constructor(e){this.capacity=e,this.cache=new Map}get(e){if(!this.cache.has(e))return;const c=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,c),c}has(e){return this.cache.has(e)}set(e,c){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const t=this.cache.keys().next().value;t!==void 0&&this.cache.delete(t)}this.cache.set(e,c)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}}export{s as
|
|
1
|
+
class s{capacity;cache;constructor(e){this.capacity=e,this.cache=new Map}get(e){if(!this.cache.has(e))return;const c=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,c),c}has(e){return this.cache.has(e)}set(e,c){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const t=this.cache.keys().next().value;t!==void 0&&this.cache.delete(t)}this.cache.set(e,c)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}}export{s as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/(?<![a-zß])SS(?![a-z])/g,n=a=>a.replaceAll(e,"ß");export{n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./indent-CY079Qyq.js";import i from"./dedent-CDXp3nZQ.js";function f(t,r=0,n={}){return e(i(t),r,n)}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))","g"),t=e=>{if(typeof e!="string")throw new TypeError(`The "value" argument must be of type string. Received ${typeof e}`);return e.replaceAll(r,"")};export{t as s};
|