@oxog/strkit 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ersinkoc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,266 @@
1
+ # @oxog/strkit
2
+
3
+ The ultimate zero-dependency string manipulation toolkit for JavaScript/TypeScript.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@oxog/strkit.svg)](https://www.npmjs.com/package/@oxog/strkit)
6
+ [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@oxog/strkit)](https://bundlephobia.com/package/@oxog/strkit)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ ## Features
10
+
11
+ - **Zero Dependencies** - No external dependencies, everything implemented from scratch
12
+ - **115+ Methods** - Comprehensive string manipulation across 10 categories
13
+ - **4 API Styles** - Namespace, Direct Import, Chainable, and Prototype Extension
14
+ - **TypeScript First** - Full TypeScript support with strict mode
15
+ - **Tree-Shakeable** - Import only what you need
16
+ - **i18n Support** - 14 locales with locale-aware operations
17
+ - **Plugin Architecture** - Extend with custom plugins
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @oxog/strkit
23
+ ```
24
+
25
+ ```bash
26
+ yarn add @oxog/strkit
27
+ ```
28
+
29
+ ```bash
30
+ pnpm add @oxog/strkit
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ### Style 1: Namespace API
36
+
37
+ ```typescript
38
+ import { str } from '@oxog/strkit';
39
+
40
+ str.case.camel('hello world'); // 'helloWorld'
41
+ str.validate.email('test@test.com'); // true
42
+ str.similarity.levenshtein('cat', 'bat'); // 1
43
+ ```
44
+
45
+ ### Style 2: Direct Import (Tree-Shakeable)
46
+
47
+ ```typescript
48
+ import { camelCase, isEmail, levenshtein } from '@oxog/strkit';
49
+
50
+ camelCase('hello world'); // 'helloWorld'
51
+ isEmail('test@test.com'); // true
52
+ levenshtein('cat', 'bat'); // 1
53
+ ```
54
+
55
+ ### Style 3: Chainable API
56
+
57
+ ```typescript
58
+ import { S } from '@oxog/strkit';
59
+
60
+ S(' Hello World ')
61
+ .trim()
62
+ .camelCase()
63
+ .truncate(8)
64
+ .value; // 'helloW...'
65
+
66
+ // Immutable - each operation returns a new instance
67
+ const a = S('hello');
68
+ const b = a.upper();
69
+ console.log(a.value); // 'hello'
70
+ console.log(b.value); // 'HELLO'
71
+ ```
72
+
73
+ ### Style 4: Prototype Extension (Opt-in)
74
+
75
+ ```typescript
76
+ import '@oxog/strkit/extend';
77
+
78
+ 'hello world'.camelCase(); // 'helloWorld'
79
+ 'test@test.com'.isEmail(); // true
80
+ ```
81
+
82
+ ## Categories
83
+
84
+ ### Case Conversion
85
+
86
+ ```typescript
87
+ str.case.camel('hello world'); // 'helloWorld'
88
+ str.case.kebab('helloWorld'); // 'hello-world'
89
+ str.case.snake('helloWorld'); // 'hello_world'
90
+ str.case.pascal('hello world'); // 'HelloWorld'
91
+ str.case.title('hello world'); // 'Hello World'
92
+ str.case.constant('hello world'); // 'HELLO_WORLD'
93
+ str.case.upper('hello'); // 'HELLO'
94
+ str.case.lower('HELLO'); // 'hello'
95
+
96
+ // Locale support
97
+ str.case.upper('istanbul', { locale: 'tr' }); // 'İSTANBUL'
98
+ ```
99
+
100
+ ### Manipulation
101
+
102
+ ```typescript
103
+ str.manipulation.trim(' hello '); // 'hello'
104
+ str.manipulation.truncate('hello world', 8); // 'hello...'
105
+ str.manipulation.reverse('hello'); // 'olleh'
106
+ str.manipulation.wrap('hello', '"'); // '"hello"'
107
+ str.manipulation.between('<tag>', '<', '>'); // 'tag'
108
+ str.manipulation.before('hello@world', '@'); // 'hello'
109
+ str.manipulation.after('hello@world', '@'); // 'world'
110
+ ```
111
+
112
+ ### Validation
113
+
114
+ ```typescript
115
+ str.validate.email('test@example.com'); // true
116
+ str.validate.url('https://example.com'); // true
117
+ str.validate.uuid('550e8400-e29b-...'); // true
118
+ str.validate.ip('192.168.1.1'); // true
119
+ str.validate.creditCard('4111111111111111'); // true
120
+ str.validate.json('{"key":"value"}'); // true
121
+ ```
122
+
123
+ ### Sanitization
124
+
125
+ ```typescript
126
+ str.sanitize.slugify('Hello World!'); // 'hello-world'
127
+ str.sanitize.escapeHtml('<script>alert("xss")</script>');
128
+ // '&lt;script&gt;alert(&quot;xss&quot;)&lt;/script&gt;'
129
+ str.sanitize.stripHtml('<p>Hello <b>World</b></p>'); // 'Hello World'
130
+ str.sanitize.latinise('Héllo Wörld'); // 'Hello World'
131
+ ```
132
+
133
+ ### Formatting
134
+
135
+ ```typescript
136
+ str.format.template('Hello, {{name}}!', { name: 'World' });
137
+ // 'Hello, World!'
138
+
139
+ str.format.sprintf('%s has %d apples', 'John', 5);
140
+ // 'John has 5 apples'
141
+
142
+ str.format.mask('1234567890', '(###) ###-####');
143
+ // '(123) 456-7890'
144
+
145
+ str.format.ordinalize(1); // '1st'
146
+ str.format.ordinalize(2); // '2nd'
147
+ str.format.ordinalize(3); // '3rd'
148
+ ```
149
+
150
+ ### Similarity
151
+
152
+ ```typescript
153
+ str.similarity.levenshtein('kitten', 'sitting'); // 3
154
+ str.similarity.dice('night', 'nacht'); // 0.25
155
+ str.similarity.jaroWinkler('DWAYNE', 'DUANE'); // 0.84
156
+ str.similarity.lcs('ABCDGH', 'AEDFHR'); // 'ADH'
157
+
158
+ str.similarity.bestMatch('hello', ['hallo', 'hullo', 'hey']);
159
+ // { match: 'hallo', score: 0.8, index: 0 }
160
+ ```
161
+
162
+ ### Analysis
163
+
164
+ ```typescript
165
+ str.analysis.wordCount('Hello world'); // 2
166
+ str.analysis.charCount('Hello'); // 5
167
+ str.analysis.lineCount('a\nb\nc'); // 3
168
+ str.analysis.entropy('password'); // ~2.75
169
+ str.analysis.frequency('hello'); // { h: 1, e: 1, l: 2, o: 1 }
170
+ ```
171
+
172
+ ### Pluralization
173
+
174
+ ```typescript
175
+ str.plural.plural('apple'); // 'apples'
176
+ str.plural.plural('child'); // 'children'
177
+ str.plural.plural('apple', 5, true); // '5 apples'
178
+ str.plural.singular('apples'); // 'apple'
179
+ str.plural.isPlural('apples'); // true
180
+ ```
181
+
182
+ ### Diff
183
+
184
+ ```typescript
185
+ str.diff.diffChars('hello', 'hallo');
186
+ // [{ type: 'equal', value: 'h' }, { type: 'remove', value: 'e' },
187
+ // { type: 'add', value: 'a' }, { type: 'equal', value: 'llo' }]
188
+
189
+ str.diff.createPatch('file.txt', 'old', 'new');
190
+ // Unified diff format
191
+ ```
192
+
193
+ ### Search
194
+
195
+ ```typescript
196
+ str.search.contains('hello world', 'world'); // true
197
+ str.search.indexOf('hello', 'l'); // 2
198
+ str.search.countOccurrences('abracadabra', 'a'); // 5
199
+ str.search.positions('abracadabra', 'a'); // [0, 3, 5, 7, 10]
200
+ ```
201
+
202
+ ## i18n Support
203
+
204
+ ```typescript
205
+ import { setLocale, getLocale } from '@oxog/strkit';
206
+
207
+ setLocale('tr');
208
+ str.case.upper('istanbul'); // 'İSTANBUL'
209
+
210
+ // Per-operation locale
211
+ str.case.upper('istanbul', { locale: 'en' }); // 'ISTANBUL'
212
+ str.case.upper('istanbul', { locale: 'tr' }); // 'İSTANBUL'
213
+ ```
214
+
215
+ ### Supported Locales
216
+
217
+ - English (en) - default
218
+ - Turkish (tr)
219
+ - German (de)
220
+ - French (fr)
221
+ - Spanish (es)
222
+ - Portuguese (pt)
223
+ - Italian (it)
224
+ - Dutch (nl)
225
+ - Polish (pl)
226
+ - Russian (ru)
227
+ - Arabic (ar)
228
+ - Chinese (zh)
229
+ - Japanese (ja)
230
+ - Korean (ko)
231
+
232
+ ## Plugin System
233
+
234
+ ```typescript
235
+ import { registerPlugin } from '@oxog/strkit';
236
+
237
+ const myPlugin = {
238
+ name: 'myPlugin',
239
+ version: '1.0.0',
240
+ methods: {
241
+ reverse: (str) => str.split('').reverse().join(''),
242
+ },
243
+ };
244
+
245
+ registerPlugin(myPlugin);
246
+ ```
247
+
248
+ ## TypeScript
249
+
250
+ Full TypeScript support with strict mode enabled:
251
+
252
+ ```typescript
253
+ import { S, str, type StrKitChain, type DiffResult } from '@oxog/strkit';
254
+
255
+ const chain: StrKitChain = S('hello');
256
+ const result: DiffResult[] = str.diff.diffChars('a', 'b');
257
+ ```
258
+
259
+ ## License
260
+
261
+ MIT - see [LICENSE](LICENSE) for details.
262
+
263
+ ## Links
264
+
265
+ - [Documentation](https://strkit.oxog.dev)
266
+ - [GitHub Repository](https://github.com/ersinkoc/strkit)
@@ -0,0 +1,12 @@
1
+ var W={code:"en",name:"English",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{},numbers:{decimal:".",thousands:","},ordinals:{default:"th",rules:[[1,"st"],[2,"nd"],[3,"rd"],[e=>e%10===1&&e%100!==11,"st"],[e=>e%10===2&&e%100!==12,"nd"],[e=>e%10===3&&e%100!==13,"rd"]]}},K=class{constructor(){this.locales=new Map;this.currentLocale="en";this.register(W);}register(t){this.locales.set(t.code,t);}get(t){let r=t??this.currentLocale;return this.locales.get(r)??this.locales.get("en")??W}setLocale(t){if(!this.locales.has(t))throw new Error(`Locale '${t}' not found. Available locales: ${this.getAvailableLocales().join(", ")}`);this.currentLocale=t;}getLocale(){return this.currentLocale}getAvailableLocales(){return Array.from(this.locales.keys())}hasLocale(t){return this.locales.has(t)}},g=new K;function Ee(e){g.setLocale(e);}function Me(){return g.getLocale()}function Ke(e){g.register(e);}function ze(){return g.getAvailableLocales()}function C(e){return g.get(e)}var F={code:"en",name:"English",case:{upper:{},lower:{}},plural:{rules:[[/(s|ss|sh|ch|x|z)$/i,"$1es"],[/([^aeiou])y$/i,"$1ies"],[/(?:([^f])fe|([lrf])f)$/i,"$1$2ves"],[/(hero|potato|tomato|echo|embargo|torpedo|veto)$/i,"$1es"],[/$/,"s"]],irregulars:{child:"children",man:"men",woman:"women",person:"people",tooth:"teeth",foot:"feet",goose:"geese",mouse:"mice",ox:"oxen"},uncountables:["sheep","fish","deer","series","species","money","rice","information","equipment","news","aircraft"]},transliterate:{},numbers:{decimal:".",thousands:","},ordinals:{default:"th",rules:[[e=>e%10===1&&e%100!==11,"st"],[e=>e%10===2&&e%100!==12,"nd"],[e=>e%10===3&&e%100!==13,"rd"]]}};var D={code:"tr",name:"Turkish",case:{upper:{i:"\u0130",\u0131:"I"},lower:{\u0130:"i",I:"\u0131"}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{\u00E7:"c",\u00C7:"C",\u011F:"g",\u011E:"G",\u0131:"i",\u0130:"I",\u00F6:"o",\u00D6:"O",\u015F:"s",\u015E:"S",\u00FC:"u",\u00DC:"U"},numbers:{decimal:",",thousands:"."},ordinals:{default:".",rules:[]}};var N={code:"de",name:"German",case:{upper:{\u00DF:"SS"},lower:{}},plural:{rules:[[/e$/i,"en"],[/er$/i,"er"],[/el$/i,"el"],[/en$/i,"en"],[/$/,"e"]],irregulars:{},uncountables:[]},transliterate:{\u00E4:"ae",\u00C4:"Ae",\u00F6:"oe",\u00D6:"Oe",\u00FC:"ue",\u00DC:"Ue",\u00DF:"ss"},numbers:{decimal:",",thousands:"."},ordinals:{default:".",rules:[]}};var Z={code:"fr",name:"French",case:{upper:{},lower:{}},plural:{rules:[[/(s|x|z)$/i,"$1"],[/(au|eu)$/i,"$1x"],[/al$/i,"aux"],[/$/,"s"]],irregulars:{oeil:"yeux",ciel:"cieux"},uncountables:[]},transliterate:{\u00E0:"a",\u00E2:"a",\u00E4:"a",\u00C0:"A",\u00C2:"A",\u00C4:"A",\u00E9:"e",\u00E8:"e",\u00EA:"e",\u00EB:"e",\u00C9:"E",\u00C8:"E",\u00CA:"E",\u00CB:"E",\u00EE:"i",\u00EF:"i",\u00CE:"I",\u00CF:"I",\u00F4:"o",\u00F6:"o",\u00D4:"O",\u00D6:"O",\u00F9:"u",\u00FB:"u",\u00FC:"u",\u00D9:"U",\u00DB:"U",\u00DC:"U",\u00FF:"y",\u0178:"Y",\u00E7:"c",\u00C7:"C",\u0153:"oe",\u0152:"OE",\u00E6:"ae",\u00C6:"AE"},numbers:{decimal:",",thousands:" "},ordinals:{default:"e",rules:[[1,"er"]]}};var q={code:"es",name:"Spanish",case:{upper:{},lower:{}},plural:{rules:[[/(s|x|z)$/i,"$1es"],[/([aeiou])$/i,"$1s"],[/([^aeiou])$/i,"$1es"]],irregulars:{},uncountables:[]},transliterate:{\u00E1:"a",\u00C1:"A",\u00E9:"e",\u00C9:"E",\u00ED:"i",\u00CD:"I",\u00F3:"o",\u00D3:"O",\u00FA:"u",\u00DA:"U",\u00FC:"u",\u00DC:"U",\u00F1:"n",\u00D1:"N"},numbers:{decimal:",",thousands:"."},ordinals:{default:"o",rules:[[1,"o"]]}};var _={code:"pt",name:"Portuguese",case:{upper:{},lower:{}},plural:{rules:[[/ão$/i,"\xF5es"],[/al$/i,"ais"],[/el$/i,"\xE9is"],[/ol$/i,"\xF3is"],[/ul$/i,"uis"],[/m$/i,"ns"],[/r$/i,"res"],[/z$/i,"zes"],[/s$/i,"ses"],[/$/,"s"]],irregulars:{},uncountables:[]},transliterate:{\u00E1:"a",\u00C1:"A",\u00E0:"a",\u00C0:"A",\u00E2:"a",\u00C2:"A",\u00E3:"a",\u00C3:"A",\u00E9:"e",\u00C9:"E",\u00EA:"e",\u00CA:"E",\u00ED:"i",\u00CD:"I",\u00F3:"o",\u00D3:"O",\u00F4:"o",\u00D4:"O",\u00F5:"o",\u00D5:"O",\u00FA:"u",\u00DA:"U",\u00FC:"u",\u00DC:"U",\u00E7:"c",\u00C7:"C"},numbers:{decimal:",",thousands:"."},ordinals:{default:"o",rules:[]}};var T={code:"it",name:"Italian",case:{upper:{},lower:{}},plural:{rules:[[/a$/i,"e"],[/o$/i,"i"],[/e$/i,"i"],[/$/,"i"]],irregulars:{uomo:"uomini"},uncountables:[]},transliterate:{\u00E0:"a",\u00C0:"A",\u00E8:"e",\u00C8:"E",\u00E9:"e",\u00C9:"E",\u00EC:"i",\u00CC:"I",\u00F2:"o",\u00D2:"O",\u00F9:"u",\u00D9:"U"},numbers:{decimal:",",thousands:"."},ordinals:{default:"o",rules:[]}};var B={code:"nl",name:"Dutch",case:{upper:{},lower:{}},plural:{rules:[[/([aeiou])$/i,"$1s"],[/$/,"en"]],irregulars:{},uncountables:[]},transliterate:{\u00EB:"e",\u00CB:"E",\u00EF:"i",\u00CF:"I",\u00F6:"o",\u00D6:"O",\u00FC:"u",\u00DC:"U"},numbers:{decimal:",",thousands:"."},ordinals:{default:"e",rules:[]}};var H={code:"pl",name:"Polish",case:{upper:{},lower:{}},plural:{rules:[[/a$/i,"y"],[/$/,"y"]],irregulars:{},uncountables:[]},transliterate:{\u0105:"a",\u0104:"A",\u0107:"c",\u0106:"C",\u0119:"e",\u0118:"E",\u0142:"l",\u0141:"L",\u0144:"n",\u0143:"N",\u00F3:"o",\u00D3:"O",\u015B:"s",\u015A:"S",\u017A:"z",\u0179:"Z",\u017C:"z",\u017B:"Z"},numbers:{decimal:",",thousands:" "},ordinals:{default:".",rules:[]}};var Y={code:"ru",name:"Russian",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{\u0430:"a",\u0410:"A",\u0431:"b",\u0411:"B",\u0432:"v",\u0412:"V",\u0433:"g",\u0413:"G",\u0434:"d",\u0414:"D",\u0435:"e",\u0415:"E",\u0451:"yo",\u0401:"Yo",\u0436:"zh",\u0416:"Zh",\u0437:"z",\u0417:"Z",\u0438:"i",\u0418:"I",\u0439:"y",\u0419:"Y",\u043A:"k",\u041A:"K",\u043B:"l",\u041B:"L",\u043C:"m",\u041C:"M",\u043D:"n",\u041D:"N",\u043E:"o",\u041E:"O",\u043F:"p",\u041F:"P",\u0440:"r",\u0420:"R",\u0441:"s",\u0421:"S",\u0442:"t",\u0422:"T",\u0443:"u",\u0423:"U",\u0444:"f",\u0424:"F",\u0445:"kh",\u0425:"Kh",\u0446:"ts",\u0426:"Ts",\u0447:"ch",\u0427:"Ch",\u0448:"sh",\u0428:"Sh",\u0449:"shch",\u0429:"Shch",\u044A:"",\u042A:"",\u044B:"y",\u042B:"Y",\u044C:"",\u042C:"",\u044D:"e",\u042D:"E",\u044E:"yu",\u042E:"Yu",\u044F:"ya",\u042F:"Ya"},numbers:{decimal:",",thousands:" "},ordinals:{default:"-\u0439",rules:[]}};var G={code:"ar",name:"Arabic",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{\u0627:"a",\u0623:"a",\u0625:"i",\u0622:"aa",\u0628:"b",\u062A:"t",\u062B:"th",\u062C:"j",\u062D:"h",\u062E:"kh",\u062F:"d",\u0630:"dh",\u0631:"r",\u0632:"z",\u0633:"s",\u0634:"sh",\u0635:"s",\u0636:"d",\u0637:"t",\u0638:"z",\u0639:"a",\u063A:"gh",\u0641:"f",\u0642:"q",\u0643:"k",\u0644:"l",\u0645:"m",\u0646:"n",\u0647:"h",\u0648:"w",\u064A:"y",\u0629:"h",\u0649:"a",\u0621:"",\u0626:"y",\u0624:"w"},numbers:{decimal:".",thousands:","},ordinals:{default:"",rules:[]}};var J={code:"zh",name:"Chinese",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{},numbers:{decimal:".",thousands:","},ordinals:{default:"",rules:[]}};var X={code:"ja",name:"Japanese",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304A:"o",\u304B:"ka",\u304D:"ki",\u304F:"ku",\u3051:"ke",\u3053:"ko",\u3055:"sa",\u3057:"shi",\u3059:"su",\u305B:"se",\u305D:"so",\u305F:"ta",\u3061:"chi",\u3064:"tsu",\u3066:"te",\u3068:"to",\u306A:"na",\u306B:"ni",\u306C:"nu",\u306D:"ne",\u306E:"no",\u306F:"ha",\u3072:"hi",\u3075:"fu",\u3078:"he",\u307B:"ho",\u307E:"ma",\u307F:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u3089:"ra",\u308A:"ri",\u308B:"ru",\u308C:"re",\u308D:"ro",\u308F:"wa",\u3092:"wo",\u3093:"n",\u30A2:"a",\u30A4:"i",\u30A6:"u",\u30A8:"e",\u30AA:"o",\u30AB:"ka",\u30AD:"ki",\u30AF:"ku",\u30B1:"ke",\u30B3:"ko",\u30B5:"sa",\u30B7:"shi",\u30B9:"su",\u30BB:"se",\u30BD:"so",\u30BF:"ta",\u30C1:"chi",\u30C4:"tsu",\u30C6:"te",\u30C8:"to",\u30CA:"na",\u30CB:"ni",\u30CC:"nu",\u30CD:"ne",\u30CE:"no",\u30CF:"ha",\u30D2:"hi",\u30D5:"fu",\u30D8:"he",\u30DB:"ho",\u30DE:"ma",\u30DF:"mi",\u30E0:"mu",\u30E1:"me",\u30E2:"mo",\u30E4:"ya",\u30E6:"yu",\u30E8:"yo",\u30E9:"ra",\u30EA:"ri",\u30EB:"ru",\u30EC:"re",\u30ED:"ro",\u30EF:"wa",\u30F2:"wo",\u30F3:"n"},numbers:{decimal:".",thousands:","},ordinals:{default:"",rules:[]}};var V={code:"ko",name:"Korean",case:{upper:{},lower:{}},plural:{rules:[],irregulars:{},uncountables:[]},transliterate:{\u3131:"g",\u3134:"n",\u3137:"d",\u3139:"r",\u3141:"m",\u3142:"b",\u3145:"s",\u3147:"",\u3148:"j",\u314A:"ch",\u314B:"k",\u314C:"t",\u314D:"p",\u314E:"h",\u3132:"kk",\u3138:"tt",\u3143:"pp",\u3146:"ss",\u3149:"jj",\u314F:"a",\u3153:"eo",\u3157:"o",\u315C:"u",\u3161:"eu",\u3163:"i",\u3150:"ae",\u3154:"e",\u315A:"oe",\u315F:"wi",\u3151:"ya",\u3155:"yeo",\u315B:"yo",\u3160:"yu",\u3152:"yae",\u3156:"ye",\u3158:"wa",\u3159:"wae",\u315D:"wo",\u315E:"we",\u3162:"ui"},numbers:{decimal:".",thousands:","},ordinals:{default:"",rules:[]}};g.register(F);g.register(D);g.register(N);g.register(Z);g.register(q);g.register(_);g.register(T);g.register(B);g.register(H);g.register(Y);g.register(G);g.register(J);g.register(X);g.register(V);function b(e){return [...e]}function Q(e){return [...e].reverse().join("")}function x(e){return e?e.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/[-_./\\]/g," ").split(/\s+/).filter(Boolean):[]}function ee(e){return e.replace(/\s+/g," ").trim()}function A(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(e){let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);n<128?t+=1:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3;}return t}function L(e,t){if(!e)return "";let r=b(e);if(r.length===0)return "";let n=r[0],s=r.slice(1).join("");return t?n.toLocaleUpperCase(t)+s:n.toUpperCase()+s}function re(e,t){if(!e)return "";let r=b(e);if(r.length===0)return "";let n=r[0],s=r.slice(1).join("");return t?n.toLocaleLowerCase(t)+s:n.toLowerCase()+s}function ne(e,t){let r=t.split("."),n=e;for(let s of r){if(n==null||typeof n!="object")return;n=n[s];}return n}function z(e){let t=new Map,r=e.toLowerCase();for(let n=0;n<r.length-1;n++){let s=r.substring(n,n+2);t.set(s,(t.get(s)??0)+1);}return t}function I(e){return e.toLowerCase().split(/\s+/).filter(t=>t.length>0)}function mt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map((s,o)=>{let i=n?s.toLocaleLowerCase(n):s.toLowerCase();return o===0?i:L(i,n)}).join("")}function ht(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>n?s.toLocaleLowerCase(n):s.toLowerCase()).join("-")}function dt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>n?s.toLocaleLowerCase(n):s.toLowerCase()).join("_")}function xt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>{let o=n?s.toLocaleLowerCase(n):s.toLowerCase();return L(o,n)}).join("")}function yt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>{let o=n?s.toLocaleLowerCase(n):s.toLowerCase();return L(o,n)}).join(" ")}function bt(e,t){if(!e)return "";let r=t?.locale,n=r?e.toLocaleLowerCase(r):e.toLowerCase();return L(n,r)}function $t(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>n?s.toLocaleUpperCase(n):s.toUpperCase()).join("_")}function Lt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>n?s.toLocaleLowerCase(n):s.toLowerCase()).join(".")}function wt(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>n?s.toLocaleLowerCase(n):s.toLowerCase()).join("/")}function Ct(e,t){if(!e)return "";let r=x(e);if(r.length===0)return "";let n=t?.locale;return r.map(s=>{let o=n?s.toLocaleLowerCase(n):s.toLowerCase();return L(o,n)}).join("-")}function St(e,t){if(!e)return "";let r=t?.locale;return [...e].map(s=>{if(r){let a=s.toLocaleUpperCase(r),l=s.toLocaleLowerCase(r);return s===a?l:a}let o=s.toUpperCase(),i=s.toLowerCase();return s===o?i:o}).join("")}function At(e,t){if(!e)return "";let r=t?.locale;return r?e.toLocaleUpperCase(r):e.toUpperCase()}function Ot(e,t){if(!e)return "";let r=t?.locale;return r?e.toLocaleLowerCase(r):e.toLowerCase()}function vt(e,t){return e?L(e,t?.locale):""}function kt(e,t){return e?re(e,t?.locale):""}function Et(e,t){if(!e)return "";if(!t)return e.trim();let r=A(t),n=new RegExp(`^[${r}]+|[${r}]+$`,"g");return e.replace(n,"")}function Mt(e,t){if(!e)return "";if(!t)return e.trimStart();let r=A(t),n=new RegExp(`^[${r}]+`);return e.replace(n,"")}function Kt(e,t){if(!e)return "";if(!t)return e.trimEnd();let r=A(t),n=new RegExp(`[${r}]+$`);return e.replace(n,"")}function zt(e,t,r=" "){if(e||(e=""),e.length>=t)return e;let n=t-e.length,s=Math.floor(n/2),o=n-s;return r.repeat(s)+e+r.repeat(o)}function It(e,t,r=" "){return e||(e=""),e.length>=t?e:r.repeat(t-e.length)+e}function Ut(e,t,r=" "){return e||(e=""),e.length>=t?e:e+r.repeat(t-e.length)}function Pt(e,t){return !e||t<=0?"":e.repeat(t)}function Wt(e){return e?Q(e):""}function Ft(e,t,r){if(!e)return "";if(e.length<=t)return e;let n=r?.ellipsis??"...",s=r?.position??"end";if(t<=n.length)return n.slice(0,t);let o=t-n.length;switch(s){case "start":return n+e.slice(-o);case "middle":{let i=Math.ceil(o/2),a=Math.floor(o/2);return e.slice(0,i)+n+e.slice(-a)}default:return e.slice(0,o)+n}}function Dt(e,t,r){return e||(e=""),t+e+(r??t)}function Nt(e,t,r){if(!e)return "";let n=r??t;return e.startsWith(t)&&e.endsWith(n)?e.slice(t.length,-n.length||void 0):e}function Zt(e,t,r,n=""){if(!e)return n;let s=b(e);return s.splice(t,r,...b(n)),s.join("")}function qt(e,t,r){return e?t<=0?r+e:t>=e.length?e+r:e.slice(0,t)+r+e.slice(t):r}function _t(e,t,r){return e?(t<0&&(t=0),r<=0?e:e.slice(0,t)+e.slice(t+r)):""}function Tt(e,t,r){return e?e.replace(t,r):""}function Bt(e,t,r){if(!e)return "";if(typeof t=="string")return e.split(t).join(r);let n=t.flags.includes("g")?t.flags:t.flags+"g",s=new RegExp(t.source,n);return e.replace(s,r)}function Ht(e,t,r){if(!e)return "";let n=e.indexOf(t);if(n===-1)return "";let s=n+t.length,o=e.indexOf(r,s);return o===-1?"":e.slice(s,o)}function Yt(e,t){if(!e)return "";let r=e.indexOf(t);return r===-1?e:e.slice(0,r)}function Gt(e,t){if(!e)return "";let r=e.indexOf(t);return r===-1?"":e.slice(r+t.length)}function Jt(e,t){if(!e)return "";let r=e.lastIndexOf(t);return r===-1?e:e.slice(0,r)}function Xt(e,t){if(!e)return "";let r=e.lastIndexOf(t);return r===-1?"":e.slice(r+t.length)}function Vt(e,...t){return (e??"")+t.join("")}function Qt(e,...t){return t.join("")+(e??"")}function er(e,t){return t+(e??"")+t}function tr(e){return e?ee(e):""}function rr(e){return e?e.split(/\r?\n/):[]}function nr(e){return e?e.split(/\s+/).filter(Boolean):[]}function sr(e){return e?b(e):[]}function ir(e){if(!e||typeof e!="string"||!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e))return false;let r=e.indexOf("@"),n=e.slice(0,r),s=e.slice(r+1);return !(!n||!s||n.length>64||s.length>253||!s.includes("."))}function ar(e){if(!e||typeof e!="string")return false;try{let t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return false}}function lr(e,t){if(!e||typeof e!="string")return false;let r={1:/^[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,3:/^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,4:/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,5:/^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,any:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i},n=t!==void 0?r[t]:r.any;return n!==void 0&&n.test(e)}function ur(e){return ce(e)||fe(e)}function ce(e){if(!e||typeof e!="string")return false;let t=e.split(".");return t.length!==4?false:t.every(r=>{if(!/^\d+$/.test(r))return false;let n=parseInt(r,10);return n>=0&&n<=255&&r===n.toString()})}function fe(e){return !e||typeof e!="string"?false:/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9]))$/.test(e)}function cr(e){if(!e||typeof e!="string")return false;let t=e.replace(/[\s\-().]/g,"");return /^\+?[0-9]{7,15}$/.test(t)}function fr(e){if(!e||typeof e!="string")return false;let t=e.replace(/[\s-]/g,"");if(!/^\d{13,19}$/.test(t))return false;let r=0,n=false;for(let s=t.length-1;s>=0;s--){let o=parseInt(t[s],10);n&&(o*=2,o>9&&(o-=9)),r+=o,n=!n;}return r%10===0}function gr(e){return e===""||e===null||e===void 0}function pr(e){return e?/^\s*$/.test(e):true}function mr(e){return e?/^[a-zA-Z]+$/.test(e):false}function hr(e){return e?/^\d+$/.test(e):false}function dr(e){return e?/^[a-zA-Z0-9]+$/.test(e):false}function xr(e){if(!e)return false;let t=e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e;return /^[0-9a-fA-F]+$/.test(t)}function yr(e){if(!e)return false;let t=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,r=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}==|[A-Za-z0-9_-]{3}=)?$/;return t.test(e)||r.test(e)}function br(e){if(!e)return false;try{return JSON.parse(e),!0}catch{return false}}function $r(e){return !e||!/[a-zA-Z]/.test(e)?false:e===e.toUpperCase()}function Lr(e){return !e||!/[a-zA-Z]/.test(e)?false:e===e.toLowerCase()}function wr(e,t,r){return !e||!t?false:r?.caseSensitive===false?e.toLowerCase().includes(t.toLowerCase()):e.includes(t)}function Cr(e,t){return !e||t===void 0?false:e.startsWith(t)}function Sr(e,t){return !e||t===void 0?false:e.endsWith(t)}function Ar(e,t,r){return e===t?true:e==null||t===null||t===void 0?false:r?.caseSensitive===false?e.toLowerCase()===t.toLowerCase():e===t}function Or(e,t){return e?t.test(e):false}var ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},pe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`","&#x3D;":"=","&#39;":"'","&apos;":"'","&#47;":"/","&nbsp;":" "},me={\u00E1:"a",\u00C1:"A",\u00E9:"e",\u00C9:"E",\u00ED:"i",\u00CD:"I",\u00F3:"o",\u00D3:"O",\u00FA:"u",\u00DA:"U",\u00FD:"y",\u00DD:"Y",\u00E0:"a",\u00C0:"A",\u00E8:"e",\u00C8:"E",\u00EC:"i",\u00CC:"I",\u00F2:"o",\u00D2:"O",\u00F9:"u",\u00D9:"U",\u00E2:"a",\u00C2:"A",\u00EA:"e",\u00CA:"E",\u00EE:"i",\u00CE:"I",\u00F4:"o",\u00D4:"O",\u00FB:"u",\u00DB:"U",\u00E4:"a",\u00C4:"A",\u00EB:"e",\u00CB:"E",\u00EF:"i",\u00CF:"I",\u00F6:"o",\u00D6:"O",\u00FC:"u",\u00DC:"U",\u00FF:"y",\u0178:"Y",\u00E3:"a",\u00C3:"A",\u00F1:"n",\u00D1:"N",\u00F5:"o",\u00D5:"O",\u00E7:"c",\u00C7:"C",\u00DF:"ss",\u00E6:"ae",\u00C6:"AE",\u0153:"oe",\u0152:"OE",\u00F8:"o",\u00D8:"O",\u00E5:"a",\u00C5:"A",\u011F:"g",\u011E:"G",\u015F:"s",\u015E:"S",\u0131:"i",\u0130:"I",\u0105:"a",\u0104:"A",\u0107:"c",\u0106:"C",\u0119:"e",\u0118:"E",\u0142:"l",\u0141:"L",\u0144:"n",\u0143:"N",\u015B:"s",\u015A:"S",\u017A:"z",\u0179:"Z",\u017C:"z",\u017B:"Z",\u010D:"c",\u010C:"C",\u010F:"d",\u010E:"D",\u011B:"e",\u011A:"E",\u0148:"n",\u0147:"N",\u0159:"r",\u0158:"R",\u0161:"s",\u0160:"S",\u0165:"t",\u0164:"T",\u016F:"u",\u016E:"U",\u017E:"z",\u017D:"Z",\u0151:"o",\u0150:"O",\u0171:"u",\u0170:"U",\u0103:"a",\u0102:"A",\u0219:"s",\u0218:"S",\u021B:"t",\u021A:"T",\u00F0:"d",\u00D0:"D",\u00FE:"th",\u00DE:"Th",\u03B1:"a",\u03B2:"b",\u03B3:"g",\u03B4:"d",\u03B5:"e",\u03B6:"z",\u03B7:"h",\u03B8:"th",\u03B9:"i",\u03BA:"k",\u03BB:"l",\u03BC:"m",\u03BD:"n",\u03BE:"x",\u03BF:"o",\u03C0:"p",\u03C1:"r",\u03C3:"s",\u03C2:"s",\u03C4:"t",\u03C5:"y",\u03C6:"f",\u03C7:"ch",\u03C8:"ps",\u03C9:"o"};function Rr(e){return e?e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):""}function jr(e){return e?e.replace(/\\n/g,`
2
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\\/g,"\\"):""}function Er(e){return e?e.replace(/[&<>"'`=/]/g,t=>ge[t]??t):""}function Mr(e){if(!e)return "";let t=e.replace(/&#(\d+);/g,(r,n)=>String.fromCharCode(parseInt(n,10)));t=t.replace(/&#x([0-9a-fA-F]+);/g,(r,n)=>String.fromCharCode(parseInt(n,16)));for(let[r,n]of Object.entries(pe))t=t.split(r).join(n);return t}function se(e){return e?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):""}function Kr(e,t){if(!e)return "";let r=t?.separator??"-",n=t?.lowercase!==false,s=U(e);return n&&(s=t?.locale?s.toLocaleLowerCase(t.locale):s.toLowerCase()),s=s.replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,r).replace(new RegExp(`^${se(r)}+|${se(r)}+$`,"g"),""),t?.strict&&(s=s.replace(/[^a-z0-9-]/gi,"")),s}function zr(e){return e?e.replace(/[\x00-\x1f\x80-\x9f]/g,"").replace(/[<>:"/\\|?*]/g,"").replace(/^[\s.]+|[\s.]+$/g,"").replace(/\s+/g," ").slice(0,255):""}function he(e){return e?e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,"").replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/\s+/g," ").trim():""}function Ir(e,t){if(!e)return "";if(!t||t.length===0)return he(e);let r=t.map(n=>n.toLowerCase());return e.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(n,s)=>r.includes(s.toLowerCase())?n:"")}function Ur(e){return e?e.replace(/\s+/g," ").trim():""}function Pr(e){return e?e.normalize("NFC"):""}function U(e){if(!e)return "";let t="";for(let r of e)t+=me[r]??r;return t}function Wr(e,t){if(!e)return "";if(t){let r=C(t);if(r.transliterate&&Object.keys(r.transliterate).length>0){let n="";for(let s of e)n+=r.transliterate[s]??s;return U(n)}}return U(e)}function Zr(e,t,r){if(!e)return "";let n=r?.openDelimiter??"{{",s=r?.closeDelimiter??"}}",o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`${o}\\s*([\\w.]+)\\s*${i}`,"g");return e.replace(a,(l,u)=>{let c=ne(t,u);return c!==void 0?String(c):""})}function qr(e,...t){if(!e)return "";let r=0;return e.replace(/%([+\-0 #]*)(\d+)?(?:\.(\d+))?([sdifoxXbc%])/g,(n,s,o,i,a)=>{if(a==="%")return "%";let l=t[r++],u=o?parseInt(o,10):0,c=i?parseInt(i,10):void 0,p=s.includes("0"),d=s.includes("-"),h=s.includes("+"),w=s.includes(" "),f="";switch(a){case "s":{f=String(l??""),c!==void 0&&(f=f.slice(0,c));break}case "d":case "i":{let m=Math.trunc(Number(l)||0);f=(m<0?"-":h?"+":w?" ":"")+Math.abs(m).toString();break}case "f":{let m=Number(l)||0,$=m<0?"-":h?"+":w?" ":"",y=Math.abs(m);f=$+(c!==void 0?y.toFixed(c):y.toString());break}case "x":{let m=Math.trunc(Number(l)||0);f=Math.abs(m).toString(16);break}case "X":{let m=Math.trunc(Number(l)||0);f=Math.abs(m).toString(16).toUpperCase();break}case "o":{let m=Math.trunc(Number(l)||0);f=Math.abs(m).toString(8);break}case "b":{let m=Math.trunc(Number(l)||0);f=Math.abs(m).toString(2);break}case "c":{let m=typeof l=="number"?l:typeof l=="string"?l.charCodeAt(0):0;f=String.fromCharCode(m);break}default:f=String(l??"");}if(u>0&&f.length<u){let $=(p&&!d?"0":" ").repeat(u-f.length);p&&(f.startsWith("-")||f.startsWith("+")||f.startsWith(" "))?f=f[0]+$+f.slice(1):d?f=f+$:f=$+f;}return f})}function _r(e,t,r){if(!e||!t)return e??"";let n=r?.maskChar??"#",s=0,o="";for(let i of t)if(i===n)if(s<e.length)o+=e[s],s++;else break;else o+=i;return o}function Tr(e,t,r){if(!e||!t)return e??"";let n=r?.maskChar??"#",s="",o=0;for(let i=0;i<e.length&&o<t.length;i++){let a=t[o];a===n?(s+=e[i],o++):e[i]===a&&o++;}return s}function Br(e,t){let r=Math.abs(Math.floor(e));if(t){let o=C(t),{ordinals:i}=o;for(let[a,l]of i.rules)if(typeof a=="function"){if(a(r))return `${e}${l}`}else if(a===r)return `${e}${l}`;return `${e}${i.default}`}let n=r%10,s=r%100;if(s>=11&&s<=13)return `${e}th`;switch(n){case 1:return `${e}st`;case 2:return `${e}nd`;case 3:return `${e}rd`;default:return `${e}th`}}function Hr(e,t){let r=t?.locale??"en-US",n=t?.currency??"USD";try{let s=new Intl.NumberFormat(r,{style:"currency",currency:n}),o=s.format(e);if(t?.symbol){let a=s.formatToParts(e).find(l=>l.type==="currency");a&&(o=o.replace(a.value,t.symbol));}return o}catch{let s=C(r.split("-")[0]??"en"),o=de(e,{decimals:2,thousands:s.numbers.thousands,decimal:s.numbers.decimal});return `${t?.symbol??"$"}${o}`}}function de(e,t){let r=typeof e=="string"?parseFloat(e):e;if(isNaN(r))return String(e);let n=t?.decimals,s=t?.thousands??",",o=t?.decimal??".",i;n!==void 0?i=r.toFixed(n):i=r.toString();let[a,l]=i.split("."),u=(a??"").replace(/\B(?=(\d{3})+(?!\d))/g,s);return l!==void 0?u+o+l:u}function xe(e,t){if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let r=new Array(t.length+1),n=new Array(t.length+1);for(let s=0;s<=t.length;s++)r[s]=s;for(let s=1;s<=e.length;s++){n[0]=s;for(let o=1;o<=t.length;o++){let i=e[s-1]===t[o-1]?0:1;n[o]=Math.min((r[o]??0)+1,(n[o-1]??0)+1,(r[o-1]??0)+i);}[r,n]=[n,r];}return r[t.length]??0}function oe(e,t){if(e===t||e.length===0&&t.length===0)return 1;let r=Math.max(e.length,t.length);return r===0?1:1-xe(e,t)/r}function ye(e,t){if(e===t)return 1;if(e.length<2||t.length<2)return 0;let r=z(e),n=z(t),s=0,o=0;for(let[i,a]of r){o+=a;let l=n.get(i)??0;s+=Math.min(a,l);}for(let[,i]of n)o+=i;return o===0?0:2*s/o}function be(e,t){if(e===t)return 1;if(e.length===0||t.length===0)return 0;let r=Math.floor(Math.max(e.length,t.length)/2)-1,n=new Array(e.length).fill(false),s=new Array(t.length).fill(false),o=0,i=0;for(let c=0;c<e.length;c++){let p=Math.max(0,c-r),d=Math.min(c+r+1,t.length);for(let h=p;h<d;h++)if(!(s[h]||e[c]!==t[h])){n[c]=true,s[h]=true,o++;break}}if(o===0)return 0;let a=0;for(let c=0;c<e.length;c++)if(n[c]){for(;!s[a];)a++;e[c]!==t[a]&&i++,a++;}let l=(o/e.length+o/t.length+(o-i/2)/o)/3,u=0;for(let c=0;c<Math.min(4,e.length,t.length)&&e[c]===t[c];c++)u++;return l+u*.1*(1-l)}function $e(e,t){if(e.length!==t.length)throw new Error("Hamming distance requires strings of equal length");let r=0;for(let n=0;n<e.length;n++)e[n]!==t[n]&&r++;return r}function Le(e,t){let r=I(e),n=I(t);if(r.length===0&&n.length===0)return 1;if(r.length===0||n.length===0)return 0;let s=new Map,o=new Map;for(let p of r)s.set(p,(s.get(p)??0)+1);for(let p of n)o.set(p,(o.get(p)??0)+1);let i=0,a=0,l=0,u=new Set([...s.keys(),...o.keys()]);for(let p of u){let d=s.get(p)??0,h=o.get(p)??0;i+=d*h,a+=d*d,l+=h*h;}let c=Math.sqrt(a)*Math.sqrt(l);return c===0?0:i/c}function we(e,t){if(e.length===0||t.length===0)return "";let r=Array(e.length+1).fill(null).map(()=>Array(t.length+1).fill(0));for(let i=1;i<=e.length;i++)for(let a=1;a<=t.length;a++)e[i-1]===t[a-1]?r[i][a]=(r[i-1]?.[a-1]??0)+1:r[i][a]=Math.max(r[i-1]?.[a]??0,r[i]?.[a-1]??0);let n="",s=e.length,o=t.length;for(;s>0&&o>0;)e[s-1]===t[o-1]?(n=e[s-1]+n,s--,o--):(r[s-1]?.[o]??0)>(r[s]?.[o-1]??0)?s--:o--;return n}function Jr(e,t){return we(e,t).length}function ie(e,t,r){switch(r?.algorithm??"levenshtein"){case "levenshtein":return oe(e,t);case "dice":return ye(e,t);case "jaroWinkler":return be(e,t);case "hamming":return e.length!==t.length?0:1-$e(e,t)/e.length;case "cosine":return Le(e,t);default:return oe(e,t)}}function Xr(e,t,r){if(!t||t.length===0)return null;let n=-1,s=-1,o="";for(let a=0;a<t.length;a++){let l=t[a];if(l===void 0)continue;let u=ie(e,l,r);u>n&&(n=u,s=a,o=l);}if(s===-1)return null;let i=r?.threshold??0;return n<i?null:{match:o,score:n,index:s}}function Vr(e,t,r){if(!t||t.length===0)return [];let n=r?.threshold??0,s=[];for(let o=0;o<t.length;o++){let i=t[o];if(i===void 0)continue;let a=ie(e,i,r);a>=n&&s.push({match:i,score:a,index:o});}return s.sort((o,i)=>i.score-o.score)}function ae(e){return e?e.trim().split(/\s+/).filter(Boolean).length:0}function tn(e,t){if(!e)return 0;let r=e;return t?.ignoreSpaces&&(r=r.replace(/\s/g,"")),t?.ignoreNewlines&&(r=r.replace(/[\r\n]/g,"")),b(r).length}function rn(e){return e?e.split(/\r?\n/).length:0}function nn(e){return e?e.replace(/([.!?])\s*(?=[A-Z]|$)/g,"$1|").split("|").filter(r=>r.trim().length>0).length:0}function sn(e){return e?e.split(/\n\s*\n/).filter(r=>r.trim().length>0).length:0}function on(e){return e?te(e):0}function an(e){if(!e||e.length===0)return 0;let t=new Map;for(let s of e)t.set(s,(t.get(s)??0)+1);let r=e.length,n=0;for(let s of t.values()){let o=s/r;n-=o*Math.log2(o);}return n}function ln(e,t){if(!e)return {};let r=t?.type??"char",n={};if(r==="word"){let s=e.toLowerCase().split(/\s+/).filter(Boolean);for(let o of s)n[o]=(n[o]??0)+1;}else for(let s of e)n[s]=(n[s]??0)+1;return n}function un(e,t){if(!e)return 0;let r=t?.wordsPerMinute??200;return ae(e)/r}function cn(e,t){if(!e)return 0;let r=t?.wordsPerMinute??150;return ae(e)/r}var Ce=[[/(ax|test)is$/i,"$1es"],[/(octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)us$/i,"$1i"],[/(alias|status)$/i,"$1es"],[/^(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i,"$1i"],[/(addend|bacteri|curricul|dat|medi|memorand|millenni|ov|spectr|strat)um$/i,"$1a"],[/(criteri|phenomen)on$/i,"$1a"],[/(s|ss|sh|ch|x|z)$/i,"$1es"],[/([^aeiou])y$/i,"$1ies"],[/(?:([^f])fe|([lrf])f)$/i,"$1$2ves"],[/(hero|potato|tomato|echo|embargo|torpedo|veto|volcano|mosquito)$/i,"$1es"],[/$/,"s"]],Se=[[/ies$/i,"y"],[/(ss|sh|ch|x|z)es$/i,"$1"],[/ves$/i,"f"],[/([^aeiou])oes$/i,"$1o"],[/([ti])a$/i,"$1um"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i,"$1$2sis"],[/(^analy)ses$/i,"$1sis"],[/([^f])ves$/i,"$1fe"],[/(hive|tive|move)s$/i,"$1"],[/(alias|status)es$/i,"$1"],[/(ax|test)es$/i,"$1is"],[/(us)$/i,"$1"],[/(octop|vir)i$/i,"$1us"],[/(cris|ax|test)es$/i,"$1is"],[/s$/i,""]],O={child:"children",man:"men",woman:"women",person:"people",tooth:"teeth",foot:"feet",goose:"geese",mouse:"mice",ox:"oxen",die:"dice",criterion:"criteria",phenomenon:"phenomena",analysis:"analyses",basis:"bases",crisis:"crises",diagnosis:"diagnoses",hypothesis:"hypotheses",thesis:"theses",appendix:"appendices",index:"indices",matrix:"matrices",vertex:"vertices"},P=Object.fromEntries(Object.entries(O).map(([e,t])=>[t,e])),j=new Set(["sheep","fish","deer","series","species","money","rice","information","equipment","news","aircraft","bison","buffalo","moose","salmon","trout","swine","chassis","headquarters","pants","scissors","shorts","thanks","furniture","luggage","traffic","knowledge","offspring"]),le=[],v={},k={},S=new Set;function Ae(e,t,r,n){if(!e)return "";let s=e.toLowerCase();if(t===1)return r?`1 ${e}`:e;if(j.has(s)||S.has(s))return r?`${t??""} ${e}`.trim():e;if(v[s]){let o=R(e,v[s]);return r?`${t??""} ${o}`.trim():o}if(O[s]){let o=R(e,O[s]);return r?`${t??""} ${o}`.trim():o}for(let[o,i]of le)if(o.test(e)){let a=e.replace(o,i);return r?`${t??""} ${a}`.trim():a}for(let[o,i]of Ce)if(o.test(e)){let a=e.replace(o,i);return r?`${t??""} ${a}`.trim():a}return r?`${t??""} ${e}`.trim():e}function Oe(e,t){if(!e)return "";let r=e.toLowerCase();if(j.has(r)||S.has(r))return e;if(k[r])return R(e,k[r]);if(P[r])return R(e,P[r]);for(let[n,s]of Se)if(n.test(e))return e.replace(n,s);return e}function gn(e,t){if(!e)return false;let r=e.toLowerCase();return j.has(r)||S.has(r)||P[r]||k[r]?true:Oe(e)!==e}function pn(e,t){if(!e)return false;let r=e.toLowerCase();return j.has(r)||S.has(r)||O[r]||v[r]?true:Ae(e)!==e}function mn(e,t){le.unshift([e,t]);}function hn(e,t){v[e.toLowerCase()]=t,k[t.toLowerCase()]=e;}function dn(e){S.add(e.toLowerCase());}function R(e,t){return e===e.toUpperCase()?t.toUpperCase():e[0]===e[0]?.toUpperCase()?t.charAt(0).toUpperCase()+t.slice(1):t}function ve(e,t){return e===t?e?[{type:"equal",value:e}]:[]:e?t?E([...e],[...t]):[{type:"remove",value:e}]:t?[{type:"add",value:t}]:[]}function ke(e,t){if(e===t)return e?[{type:"equal",value:e}]:[];let r=i=>{let a=[],l="",u=false;for(let c of i)/\s/.test(c)?(u&&(a.push(l),l="",u=false),l+=c):(!u&&l&&(a.push(l),l=""),l+=c,u=true);return l&&a.push(l),a},n=r(e),s=r(t);return E(n,s).map(i=>({type:i.type,value:Array.isArray(i.value)?i.value.join(""):i.value}))}function Re(e,t){if(e===t)return e?[{type:"equal",value:e}]:[];let r=i=>{let a=[],l="";for(let u=0;u<i.length;u++)l+=i[u],(i[u]===`
3
+ `||u===i.length-1)&&(a.push(l),l="");return a},n=r(e),s=r(t);return E(n,s).map(i=>({type:i.type,value:Array.isArray(i.value)?i.value.join(""):i.value}))}function yn(e,t,r){switch(r?.granularity??"char"){case "word":return ke(e,t);case "line":return Re(e,t);default:return ve(e,t)}}function bn(e,t,r,n){let s=t.split(`
4
+ `),o=r.split(`
5
+ `),i=E(s,o),a=[],l=1,u=1,c=[],p=0,d=0,h=0,w=0,f=false,m=()=>{c.length>0&&(a.push(`@@ -${p},${h} +${d},${w} @@`),a.push(...c),c=[],f=false);};for(let y of i){let ue=Array.isArray(y.value)?y.value:[y.value];for(let M of ue)y.type==="equal"?(f&&(c.push(" "+M),h++,w++),l++,u++):y.type==="remove"?(f||(p=l,d=u,f=true),c.push("-"+M),h++,l++):y.type==="add"&&(f||(p=l,d=u,f=true),c.push("+"+M),w++,u++);}return m(),a.length===0?"":[...[`--- a/${e}`,`+++ b/${e}`],...a].join(`
6
+ `)}function $n(e,t){let r=e.split(`
7
+ `),n=t.split(`
8
+ `),s=0,o=[];for(let i=0;i<n.length;i++){let a=n[i];if(!a||a.startsWith("---")||a.startsWith("+++"))continue;let l=a.match(/@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@/);if(l){let u=parseInt(l[1],10)-1;for(;s<u;)o.push(r[s]),s++;continue}a.startsWith(" ")?(o.push(r[s]),s++):a.startsWith("-")?s++:a.startsWith("+")&&o.push(a.slice(1));}for(;s<r.length;)o.push(r[s]),s++;return o.join(`
9
+ `)}function Ln(e){return e.split(`
10
+ `).map(r=>r.startsWith("---")?r.replace("--- a/","--- b/"):r.startsWith("+++")?r.replace("+++ b/","+++ a/"):r.startsWith("-")&&!r.startsWith("---")?"+"+r.slice(1):r.startsWith("+")&&!r.startsWith("+++")?"-"+r.slice(1):r).join(`
11
+ `)}function E(e,t){let r=e.length,n=t.length;if(r===0&&n===0)return [];if(r===0)return [{type:"add",value:t.join("")}];if(n===0)return [{type:"remove",value:e.join("")}];let s=Array(r+1).fill(null).map(()=>Array(n+1).fill(0));for(let l=1;l<=r;l++)for(let u=1;u<=n;u++)e[l-1]===t[u-1]?s[l][u]=(s[l-1]?.[u-1]??0)+1:s[l][u]=Math.max(s[l-1]?.[u]??0,s[l]?.[u-1]??0);let o=[],i=r,a=n;for(;i>0||a>0;)i>0&&a>0&&e[i-1]===t[a-1]?(o.unshift({type:"equal",value:String(e[i-1])}),i--,a--):a>0&&(i===0||(s[i]?.[a-1]??0)>=(s[i-1]?.[a]??0))?(o.unshift({type:"add",value:String(t[a-1])}),a--):i>0&&(o.unshift({type:"remove",value:String(e[i-1])}),i--);return je(o)}function je(e){if(e.length===0)return [];let t=[],r={...e[0]};for(let n=1;n<e.length;n++){let s=e[n];s.type===r.type?r.value+=s.value:(t.push(r),r={...s});}return t.push(r),t}function Cn(e,t,r){return !e||t===void 0||t===null?false:t===""?true:r?.caseSensitive===false?e.toLowerCase().includes(t.toLowerCase()):e.includes(t)}function Sn(e,t){return !e||t===void 0||t===null?false:e.startsWith(t)}function An(e,t){return !e||t===void 0||t===null?false:e.endsWith(t)}function On(e,t,r){if(!e||t===void 0||t===null)return -1;let n=r?.fromIndex??0;return r?.caseSensitive===false?e.toLowerCase().indexOf(t.toLowerCase(),n):e.indexOf(t,n)}function vn(e,t,r){if(!e||t===void 0||t===null)return -1;let n=r?.fromIndex;return r?.caseSensitive===false?n!==void 0?e.toLowerCase().lastIndexOf(t.toLowerCase(),n):e.toLowerCase().lastIndexOf(t.toLowerCase()):n!==void 0?e.lastIndexOf(t,n):e.lastIndexOf(t)}function kn(e,t,r){if(!e||!t)return 0;let n=e,s=t;r?.caseSensitive===false&&(n=e.toLowerCase(),s=t.toLowerCase());let o=0,i=0;for(;(i=n.indexOf(s,i))!==-1;)o++,i+=s.length;return o}function Rn(e,t,r){if(!e||!t)return [];let n=e,s=t;r?.caseSensitive===false&&(n=e.toLowerCase(),s=t.toLowerCase());let o=[],i=0;for(;(i=n.indexOf(s,i))!==-1;)o.push(i),i+=s.length;return o}function jn(e,t){if(!e)return null;let r=e.match(t);return r?r[0]??null:null}function En(e,t){if(!e)return [];let r=t.flags.includes("g")?t.flags:t.flags+"g",n=new RegExp(t.source,r),s=[],o;for(;(o=n.exec(e))!==null;)s.push(o[0]),o.index===n.lastIndex&&n.lastIndex++;return s}function Mn(e,t){return e?e.match(t):null}function Kn(e,t){if(!e)return [];let r=t.flags.includes("g")?t.flags:t.flags+"g",n=new RegExp(t.source,r),s=[],o;for(;(o=n.exec(e))!==null;)s.push(o),o.index===n.lastIndex&&n.lastIndex++;return s}export{fe as $,on as $a,Pt as A,Ur as Aa,En as Ab,Wt as B,Pr as Ba,Mn as Bb,Ft as C,U as Ca,Kn as Cb,Dt as D,Wr as Da,Nt as E,Zr as Ea,Zt as F,qr as Fa,qt as G,_r as Ga,_t as H,Tr as Ha,Tt as I,Br as Ia,Bt as J,Hr as Ja,Ht as K,de as Ka,Yt as L,xe as La,Gt as M,oe as Ma,Jt as N,ye as Na,Xt as O,be as Oa,Vt as P,$e as Pa,Qt as Q,Le as Qa,er as R,we as Ra,tr as S,Jr as Sa,rr as T,ie as Ta,nr as U,Xr as Ua,sr as V,Vr as Va,ir as W,ae as Wa,ar as X,tn as Xa,lr as Y,rn as Ya,ur as Z,nn as Za,ce as _,sn as _a,g as a,cr as aa,an as ab,Ee as b,fr as ba,ln as bb,Me as c,gr as ca,un as cb,Ke as d,pr as da,cn as db,ze as e,mr as ea,Ae as eb,mt as f,hr as fa,Oe as fb,ht as g,dr as ga,gn as gb,dt as h,xr as ha,pn as hb,xt as i,yr as ia,mn as ib,yt as j,br as ja,hn as jb,bt as k,$r as ka,dn as kb,$t as l,Lr as la,ve as lb,Lt as m,wr as ma,ke as mb,wt as n,Cr as na,Re as nb,Ct as o,Sr as oa,yn as ob,St as p,Ar as pa,bn as pb,At as q,Or as qa,$n as qb,Ot as r,Rr as ra,Ln as rb,vt as s,jr as sa,Cn as sb,kt as t,Er as ta,Sn as tb,Et as u,Mr as ua,An as ub,Mt as v,se as va,On as vb,Kt as w,Kr as wa,vn as wb,zt as x,zr as xa,kn as xb,It as y,he as ya,Rn as yb,Ut as z,Ir as za,jn as zb};//# sourceMappingURL=chunk-NYBEYU46.mjs.map
12
+ //# sourceMappingURL=chunk-NYBEYU46.mjs.map