@temperlang/std 0.0.6 → 0.1.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/regex.js CHANGED
@@ -1,46 +1,46 @@
1
1
  import {
2
- InterfaceType as InterfaceType_94, compiledRegexCompileFormatted as compiledRegexCompileFormatted_95, compiledRegexCompiledFound as compiledRegexCompiledFound_96, compiledRegexCompiledFind as compiledRegexCompiledFind_97, compiledRegexCompiledReplace as compiledRegexCompiledReplace_98, eqGeneric as eqGeneric_99, regexFormatterPushCodeTo as regexFormatterPushCodeTo_100, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_101, gtGeneric as gtGeneric_102, listify as listify_3, listJoin as listJoin_2, listBuilderAdd as listBuilderAdd_0, strCat as strCat_9, stringCodePoints as stringCodePoints_74, ltGeneric as ltGeneric_6, listGet as listGet_7, eqGeneric as eqGeneric_70, intToString as intToString_73, neGeneric as neGeneric_72, requireInstanceOf as requireInstanceOf__211, bubbleException as bubbleException__213, requireIsSafeInteger as requireIsSafeInteger__282
2
+ InterfaceType as InterfaceType_65, requireInstanceOf as requireInstanceOf__178, requireIsSafeInteger as requireIsSafeInteger__253, compiledRegexCompileFormatted as compiledRegexCompileFormatted_139, compiledRegexCompiledFound as compiledRegexCompiledFound_143, compiledRegexCompiledFind as compiledRegexCompiledFind_146, compiledRegexCompiledReplace as compiledRegexCompiledReplace_151, eqGeneric as eqGeneric_180, regexFormatterPushCodeTo as regexFormatterPushCodeTo_194, stringCodePoints as stringCodePoints_201, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_218, intToString as intToString_252, listify as listify_42, listJoin as listJoin_24, listBuilderAdd as listBuilderAdd_4, strCat as strCat_57, listGet as listGet_53
3
3
  } from "@temperlang/core";
4
- function methodCompiled103() {
4
+ function methodCompiled66() {
5
5
  return new CompiledRegex(this);
6
6
  }
7
- function methodFound104(text_105) {
8
- return this.compiled().found(text_105);
7
+ function methodFound67(text_68) {
8
+ return this.compiled().found(text_68);
9
9
  }
10
- function methodFind106(text_107) {
11
- return this.compiled().find(text_107);
10
+ function methodFind69(text_70) {
11
+ return this.compiled().find(text_70);
12
12
  }
13
- function methodReplace108(text_109, format_110) {
14
- return this.compiled().replace(text_109, format_110);
13
+ function methodReplace71(text_72, format_73) {
14
+ return this.compiled().replace(text_72, format_73);
15
15
  }
16
16
  /**
17
17
  * @typedef {{
18
- * compiled: () => CompiledRegex, found: (text_105: string) => boolean, find: (text_107: string) => Map<string, Group>, replace: (text_109: string, format_110: (arg0: Map<string, Group>) => string) => string
18
+ * compiled: () => CompiledRegex, found: (text_68: string) => boolean, find: (text_70: string) => Map<string, Group>, replace: (text_72: string, format_73: (arg0: Map<string, Group>) => string) => string
19
19
  * }}
20
20
  * Regex
21
21
  */
22
- export const Regex = new InterfaceType_94("Regex", [["m", "compiled", methodCompiled103], ["m", "found", methodFound104], ["m", "find", methodFind106], ["m", "replace", methodReplace108]], [], 1);
22
+ export const Regex = new InterfaceType_65("Regex", [["m", "compiled", methodCompiled66], ["m", "found", methodFound67], ["m", "find", methodFind69], ["m", "replace", methodReplace71]], [], 1);
23
23
  export class Capture {
24
24
  /** @type {string} */
25
- #name_111;
25
+ #name_74;
26
26
  /** @type {Regex} */
27
- #item_112;
27
+ #item_75;
28
28
  /**
29
- * @param {string} name_113
30
- * @param {Regex} item_114
29
+ * @param {string} name_76
30
+ * @param {Regex} item_77
31
31
  */
32
- constructor(name_113, item_114) {
33
- this.#name_111 = name_113;
34
- this.#item_112 = item_114;
32
+ constructor(name_76, item_77) {
33
+ this.#name_74 = name_76;
34
+ this.#item_75 = item_77;
35
35
  return;
36
36
  }
37
37
  /** @returns {string} */
38
38
  get name() {
39
- return this.#name_111;
39
+ return this.#name_74;
40
40
  }
41
41
  /** @returns {Regex} */
42
42
  get item() {
43
- return this.#item_112;
43
+ return this.#item_75;
44
44
  }
45
45
  };
46
46
  Regex.implementedBy(Capture);
@@ -48,18 +48,18 @@ Regex.implementedBy(Capture);
48
48
  * @typedef {{}}
49
49
  * CodePart
50
50
  */
51
- export const CodePart = new InterfaceType_94("CodePart", [], [Regex], 2);
51
+ export const CodePart = new InterfaceType_65("CodePart", [], [Regex], 2);
52
52
  export class CodePoints {
53
53
  /** @type {string} */
54
- #value_117;
55
- /** @param {string} value_118 */
56
- constructor(value_118) {
57
- this.#value_117 = value_118;
54
+ #value_80;
55
+ /** @param {string} value_81 */
56
+ constructor(value_81) {
57
+ this.#value_80 = value_81;
58
58
  return;
59
59
  }
60
60
  /** @returns {string} */
61
61
  get value() {
62
- return this.#value_117;
62
+ return this.#value_80;
63
63
  }
64
64
  };
65
65
  CodePart.implementedBy(CodePoints);
@@ -67,426 +67,426 @@ CodePart.implementedBy(CodePoints);
67
67
  * @typedef {{}}
68
68
  * Special
69
69
  */
70
- export const Special = new InterfaceType_94("Special", [], [Regex], 2);
70
+ export const Special = new InterfaceType_65("Special", [], [Regex], 2);
71
71
  /**
72
72
  * @typedef {{}}
73
73
  * SpecialSet
74
74
  */
75
- export const SpecialSet = new InterfaceType_94("SpecialSet", [], [CodePart, Special], 3);
75
+ export const SpecialSet = new InterfaceType_65("SpecialSet", [], [CodePart, Special], 3);
76
76
  export class CodeRange {
77
77
  /** @type {number} */
78
- #min_120;
78
+ #min_83;
79
79
  /** @type {number} */
80
- #max_121;
80
+ #max_84;
81
81
  /**
82
- * @param {number} min_122
83
- * @param {number} max_123
82
+ * @param {number} min_85
83
+ * @param {number} max_86
84
84
  */
85
- constructor(min_122, max_123) {
86
- this.#min_120 = min_122;
87
- this.#max_121 = max_123;
85
+ constructor(min_85, max_86) {
86
+ this.#min_83 = min_85;
87
+ this.#max_84 = max_86;
88
88
  return;
89
89
  }
90
90
  /** @returns {number} */
91
91
  get min() {
92
- return this.#min_120;
92
+ return this.#min_83;
93
93
  }
94
94
  /** @returns {number} */
95
95
  get max() {
96
- return this.#max_121;
96
+ return this.#max_84;
97
97
  }
98
98
  };
99
99
  CodePart.implementedBy(CodeRange);
100
100
  export class CodeSet {
101
101
  /** @type {Array<CodePart>} */
102
- #items_126;
102
+ #items_89;
103
103
  /** @type {boolean} */
104
- #negated_127;
104
+ #negated_90;
105
105
  /**
106
- * @param {Array<CodePart>} items_128
107
- * @param {boolean} negated_129
106
+ * @param {Array<CodePart>} items_91
107
+ * @param {boolean} negated_92
108
108
  */
109
- constructor(items_128, negated_129) {
110
- if (!(negated_129 !== void 0)) {
111
- negated_129 = false;
109
+ constructor(items_91, negated_92) {
110
+ if (!(negated_92 !== void 0)) {
111
+ negated_92 = false;
112
112
  }
113
- this.#items_126 = items_128;
114
- this.#negated_127 = negated_129;
113
+ this.#items_89 = items_91;
114
+ this.#negated_90 = negated_92;
115
115
  return;
116
116
  }
117
117
  /** @returns {Array<CodePart>} */
118
118
  get items() {
119
- return this.#items_126;
119
+ return this.#items_89;
120
120
  }
121
121
  /** @returns {boolean} */
122
122
  get negated() {
123
- return this.#negated_127;
123
+ return this.#negated_90;
124
124
  }
125
125
  };
126
126
  Regex.implementedBy(CodeSet);
127
127
  export class Or {
128
128
  /** @type {Array<Regex>} */
129
- #items_132;
130
- /** @param {Array<Regex>} items_133 */
131
- constructor(items_133) {
132
- this.#items_132 = items_133;
129
+ #items_95;
130
+ /** @param {Array<Regex>} items_96 */
131
+ constructor(items_96) {
132
+ this.#items_95 = items_96;
133
133
  return;
134
134
  }
135
135
  /** @returns {Array<Regex>} */
136
136
  get items() {
137
- return this.#items_132;
137
+ return this.#items_95;
138
138
  }
139
139
  };
140
140
  Regex.implementedBy(Or);
141
141
  export class Repeat {
142
142
  /** @type {Regex} */
143
- #item_135;
143
+ #item_98;
144
144
  /** @type {number} */
145
- #min_136;
145
+ #min_99;
146
146
  /** @type {number | null} */
147
- #max_137;
147
+ #max_100;
148
148
  /** @type {boolean} */
149
- #reluctant_138;
149
+ #reluctant_101;
150
150
  /**
151
- * @param {Regex} item_139
152
- * @param {number} min_140
153
- * @param {number | null} max_141
154
- * @param {boolean} reluctant_142
151
+ * @param {Regex} item_102
152
+ * @param {number} min_103
153
+ * @param {number | null} max_104
154
+ * @param {boolean} reluctant_105
155
155
  */
156
- constructor(item_139, min_140, max_141, reluctant_142) {
157
- if (!(reluctant_142 !== void 0)) {
158
- reluctant_142 = false;
156
+ constructor(item_102, min_103, max_104, reluctant_105) {
157
+ if (!(reluctant_105 !== void 0)) {
158
+ reluctant_105 = false;
159
159
  }
160
- this.#item_135 = item_139;
161
- this.#min_136 = min_140;
162
- this.#max_137 = max_141;
163
- this.#reluctant_138 = reluctant_142;
160
+ this.#item_98 = item_102;
161
+ this.#min_99 = min_103;
162
+ this.#max_100 = max_104;
163
+ this.#reluctant_101 = reluctant_105;
164
164
  return;
165
165
  }
166
166
  /** @returns {Regex} */
167
167
  get item() {
168
- return this.#item_135;
168
+ return this.#item_98;
169
169
  }
170
170
  /** @returns {number} */
171
171
  get min() {
172
- return this.#min_136;
172
+ return this.#min_99;
173
173
  }
174
174
  /** @returns {number | null} */
175
175
  get max() {
176
- return this.#max_137;
176
+ return this.#max_100;
177
177
  }
178
178
  /** @returns {boolean} */
179
179
  get reluctant() {
180
- return this.#reluctant_138;
180
+ return this.#reluctant_101;
181
181
  }
182
182
  };
183
183
  Regex.implementedBy(Repeat);
184
184
  export class Sequence {
185
185
  /** @type {Array<Regex>} */
186
- #items_147;
187
- /** @param {Array<Regex>} items_148 */
188
- constructor(items_148) {
189
- this.#items_147 = items_148;
186
+ #items_110;
187
+ /** @param {Array<Regex>} items_111 */
188
+ constructor(items_111) {
189
+ this.#items_110 = items_111;
190
190
  return;
191
191
  }
192
192
  /** @returns {Array<Regex>} */
193
193
  get items() {
194
- return this.#items_147;
194
+ return this.#items_110;
195
195
  }
196
196
  };
197
197
  Regex.implementedBy(Sequence);
198
198
  export class Group {
199
199
  /** @type {string} */
200
- #name_150;
200
+ #name_113;
201
201
  /** @type {string} */
202
- #value_151;
202
+ #value_114;
203
203
  /** @type {number} */
204
- #codePointsBegin_152;
204
+ #codePointsBegin_115;
205
205
  /**
206
- * @param {string} name_153
207
- * @param {string} value_154
208
- * @param {number} codePointsBegin_155
206
+ * @param {string} name_116
207
+ * @param {string} value_117
208
+ * @param {number} codePointsBegin_118
209
209
  */
210
- constructor(name_153, value_154, codePointsBegin_155) {
211
- this.#name_150 = name_153;
212
- this.#value_151 = value_154;
213
- this.#codePointsBegin_152 = codePointsBegin_155;
210
+ constructor(name_116, value_117, codePointsBegin_118) {
211
+ this.#name_113 = name_116;
212
+ this.#value_114 = value_117;
213
+ this.#codePointsBegin_115 = codePointsBegin_118;
214
214
  return;
215
215
  }
216
216
  /** @returns {string} */
217
217
  get name() {
218
- return this.#name_150;
218
+ return this.#name_113;
219
219
  }
220
220
  /** @returns {string} */
221
221
  get value() {
222
- return this.#value_151;
222
+ return this.#value_114;
223
223
  }
224
224
  /** @returns {number} */
225
225
  get codePointsBegin() {
226
- return this.#codePointsBegin_152;
226
+ return this.#codePointsBegin_115;
227
227
  }
228
228
  };
229
- class RegexRefs_159 {
229
+ class RegexRefs_122 {
230
230
  /** @type {CodePoints} */
231
- #codePoints_160;
231
+ #codePoints_123;
232
232
  /** @type {Group} */
233
- #group_161;
233
+ #group_124;
234
234
  /** @type {Or} */
235
- #orObject_162;
235
+ #orObject_125;
236
236
  /**
237
- * @param {CodePoints} codePoints_163
238
- * @param {Group} group_164
239
- * @param {Or} orObject_165
237
+ * @param {CodePoints} codePoints_126
238
+ * @param {Group} group_127
239
+ * @param {Or} orObject_128
240
240
  */
241
- constructor(codePoints_163, group_164, orObject_165) {
242
- let t_166;
243
- let t_167;
244
- let t_168;
245
- if (!(codePoints_163 !== void 0)) {
246
- t_166 = new CodePoints("");
247
- codePoints_163 = t_166;
241
+ constructor(codePoints_126, group_127, orObject_128) {
242
+ let t_129;
243
+ let t_130;
244
+ let t_131;
245
+ if (!(codePoints_126 !== void 0)) {
246
+ t_129 = new CodePoints("");
247
+ codePoints_126 = t_129;
248
248
  }
249
- if (!(group_164 !== void 0)) {
250
- t_167 = new Group("", "", 0);
251
- group_164 = t_167;
249
+ if (!(group_127 !== void 0)) {
250
+ t_130 = new Group("", "", 0);
251
+ group_127 = t_130;
252
252
  }
253
- if (!(orObject_165 !== void 0)) {
254
- t_168 = new Or(listify_3());
255
- orObject_165 = t_168;
253
+ if (!(orObject_128 !== void 0)) {
254
+ t_131 = new Or(listify_42());
255
+ orObject_128 = t_131;
256
256
  }
257
- this.#codePoints_160 = codePoints_163;
258
- this.#group_161 = group_164;
259
- this.#orObject_162 = orObject_165;
257
+ this.#codePoints_123 = codePoints_126;
258
+ this.#group_124 = group_127;
259
+ this.#orObject_125 = orObject_128;
260
260
  return;
261
261
  }
262
262
  /** @returns {CodePoints} */
263
263
  get codePoints() {
264
- return this.#codePoints_160;
264
+ return this.#codePoints_123;
265
265
  }
266
266
  /** @returns {Group} */
267
267
  get group() {
268
- return this.#group_161;
268
+ return this.#group_124;
269
269
  }
270
270
  /** @returns {Or} */
271
271
  get orObject() {
272
- return this.#orObject_162;
272
+ return this.#orObject_125;
273
273
  }
274
274
  }
275
275
  export class CompiledRegex {
276
276
  /** @type {Regex} */
277
- #data_172;
278
- /** @param {Regex} data_173 */
279
- constructor(data_173) {
280
- this.#data_172 = data_173;
281
- let t_174 = this.format();
282
- let t_175 = compiledRegexCompileFormatted_95(this, t_174);
283
- this.#compiled_176 = t_175;
277
+ #data_135;
278
+ /** @param {Regex} data_136 */
279
+ constructor(data_136) {
280
+ this.#data_135 = data_136;
281
+ let t_137 = this.format();
282
+ let t_138 = compiledRegexCompileFormatted_139(this, t_137);
283
+ this.#compiled_140 = t_138;
284
284
  return;
285
285
  }
286
286
  /**
287
- * @param {string} text_178
287
+ * @param {string} text_142
288
288
  * @returns {boolean}
289
289
  */
290
- found(text_178) {
291
- return compiledRegexCompiledFound_96(this, this.#compiled_176, text_178);
290
+ found(text_142) {
291
+ return compiledRegexCompiledFound_143(this, this.#compiled_140, text_142);
292
292
  }
293
293
  /**
294
- * @param {string} text_180
294
+ * @param {string} text_145
295
295
  * @returns {Map<string, Group>}
296
296
  */
297
- find(text_180) {
298
- return compiledRegexCompiledFind_97(this, this.#compiled_176, text_180, regexRefs_181);
297
+ find(text_145) {
298
+ return compiledRegexCompiledFind_146(this, this.#compiled_140, text_145, regexRefs_147);
299
299
  }
300
300
  /**
301
- * @param {string} text_183
302
- * @param {(arg0: Map<string, Group>) => string} format_184
301
+ * @param {string} text_149
302
+ * @param {(arg0: Map<string, Group>) => string} format_150
303
303
  * @returns {string}
304
304
  */
305
- replace(text_183, format_184) {
306
- return compiledRegexCompiledReplace_98(this, this.#compiled_176, text_183, format_184, regexRefs_181);
305
+ replace(text_149, format_150) {
306
+ return compiledRegexCompiledReplace_151(this, this.#compiled_140, text_149, format_150, regexRefs_147);
307
307
  }
308
308
  /** @type {unknown} */
309
- #compiled_176;
309
+ #compiled_140;
310
310
  /** @returns {string} */
311
311
  format() {
312
- return new RegexFormatter_186().format(this.#data_172);
312
+ return new RegexFormatter_153().format(this.#data_135);
313
313
  }
314
314
  /** @returns {Regex} */
315
315
  get data() {
316
- return this.#data_172;
316
+ return this.#data_135;
317
317
  }
318
318
  };
319
- class RegexFormatter_186 {
319
+ class RegexFormatter_153 {
320
320
  /** @type {Array<string>} */
321
- #out_188;
321
+ #out_155;
322
322
  /**
323
- * @param {Regex} regex_190
323
+ * @param {Regex} regex_157
324
324
  * @returns {string}
325
325
  */
326
- format(regex_190) {
327
- this.pushRegex(regex_190);
328
- let t_191 = this.#out_188;
329
- function fn_192(x_193) {
330
- return x_193;
326
+ format(regex_157) {
327
+ this.pushRegex(regex_157);
328
+ let t_158 = this.#out_155;
329
+ function fn_159(x_160) {
330
+ return x_160;
331
331
  }
332
- return listJoin_2(t_191, "", fn_192);
332
+ return listJoin_24(t_158, "", fn_159);
333
333
  }
334
- /** @param {Regex} regex_195 */
335
- pushRegex(regex_195) {
336
- let return_196;
337
- let t_197;
338
- let t_198;
339
- let t_199;
340
- let t_200;
341
- let t_201;
342
- let t_202;
343
- let t_203;
344
- let t_204;
345
- let t_205;
346
- let t_206;
347
- let t_207;
348
- let t_208;
349
- let t_209;
350
- let t_210;
334
+ /** @param {Regex} regex_162 */
335
+ pushRegex(regex_162) {
336
+ let return_163;
337
+ let t_164;
338
+ let t_165;
339
+ let t_166;
340
+ let t_167;
341
+ let t_168;
342
+ let t_169;
343
+ let t_170;
344
+ let t_171;
345
+ let t_172;
346
+ let t_173;
347
+ let t_174;
348
+ let t_175;
349
+ let t_176;
350
+ let t_177;
351
351
  try {
352
- requireInstanceOf__211(regex_195, Capture);
353
- t_197 = true;
352
+ requireInstanceOf__178(regex_162, Capture);
353
+ t_164 = true;
354
354
  } catch {
355
- t_197 = false;
355
+ t_164 = false;
356
356
  }
357
- s__1238_212: {
358
- if (t_197) {
357
+ s__1259_179: {
358
+ if (t_164) {
359
359
  try {
360
- t_198 = requireInstanceOf__211(regex_195, Capture);
360
+ t_165 = requireInstanceOf__178(regex_162, Capture);
361
361
  } catch {
362
- break s__1238_212;
362
+ break s__1259_179;
363
363
  }
364
- this.pushCapture(t_198);
364
+ this.pushCapture(t_165);
365
365
  } else {
366
366
  try {
367
- requireInstanceOf__211(regex_195, CodePoints);
368
- t_199 = true;
367
+ requireInstanceOf__178(regex_162, CodePoints);
368
+ t_166 = true;
369
369
  } catch {
370
- t_199 = false;
370
+ t_166 = false;
371
371
  }
372
- if (t_199) {
372
+ if (t_166) {
373
373
  try {
374
- t_200 = requireInstanceOf__211(regex_195, CodePoints);
374
+ t_167 = requireInstanceOf__178(regex_162, CodePoints);
375
375
  } catch {
376
- break s__1238_212;
376
+ break s__1259_179;
377
377
  }
378
- this.pushCodePoints(t_200, false);
378
+ this.pushCodePoints(t_167, false);
379
379
  } else {
380
380
  try {
381
- requireInstanceOf__211(regex_195, CodeRange);
382
- t_201 = true;
381
+ requireInstanceOf__178(regex_162, CodeRange);
382
+ t_168 = true;
383
383
  } catch {
384
- t_201 = false;
384
+ t_168 = false;
385
385
  }
386
- if (t_201) {
386
+ if (t_168) {
387
387
  try {
388
- t_202 = requireInstanceOf__211(regex_195, CodeRange);
388
+ t_169 = requireInstanceOf__178(regex_162, CodeRange);
389
389
  } catch {
390
- break s__1238_212;
390
+ break s__1259_179;
391
391
  }
392
- this.pushCodeRange(t_202);
392
+ this.pushCodeRange(t_169);
393
393
  } else {
394
394
  try {
395
- requireInstanceOf__211(regex_195, CodeSet);
396
- t_203 = true;
395
+ requireInstanceOf__178(regex_162, CodeSet);
396
+ t_170 = true;
397
397
  } catch {
398
- t_203 = false;
398
+ t_170 = false;
399
399
  }
400
- if (t_203) {
400
+ if (t_170) {
401
401
  try {
402
- t_204 = requireInstanceOf__211(regex_195, CodeSet);
402
+ t_171 = requireInstanceOf__178(regex_162, CodeSet);
403
403
  } catch {
404
- break s__1238_212;
404
+ break s__1259_179;
405
405
  }
406
- this.pushCodeSet(t_204);
406
+ this.pushCodeSet(t_171);
407
407
  } else {
408
408
  try {
409
- requireInstanceOf__211(regex_195, Or);
410
- t_205 = true;
409
+ requireInstanceOf__178(regex_162, Or);
410
+ t_172 = true;
411
411
  } catch {
412
- t_205 = false;
412
+ t_172 = false;
413
413
  }
414
- if (t_205) {
414
+ if (t_172) {
415
415
  try {
416
- t_206 = requireInstanceOf__211(regex_195, Or);
416
+ t_173 = requireInstanceOf__178(regex_162, Or);
417
417
  } catch {
418
- break s__1238_212;
418
+ break s__1259_179;
419
419
  }
420
- this.pushOr(t_206);
420
+ this.pushOr(t_173);
421
421
  } else {
422
422
  try {
423
- requireInstanceOf__211(regex_195, Repeat);
424
- t_207 = true;
423
+ requireInstanceOf__178(regex_162, Repeat);
424
+ t_174 = true;
425
425
  } catch {
426
- t_207 = false;
426
+ t_174 = false;
427
427
  }
428
- if (t_207) {
428
+ if (t_174) {
429
429
  try {
430
- t_208 = requireInstanceOf__211(regex_195, Repeat);
430
+ t_175 = requireInstanceOf__178(regex_162, Repeat);
431
431
  } catch {
432
- break s__1238_212;
432
+ break s__1259_179;
433
433
  }
434
- this.pushRepeat(t_208);
434
+ this.pushRepeat(t_175);
435
435
  } else {
436
436
  try {
437
- requireInstanceOf__211(regex_195, Sequence);
438
- t_209 = true;
437
+ requireInstanceOf__178(regex_162, Sequence);
438
+ t_176 = true;
439
439
  } catch {
440
- t_209 = false;
440
+ t_176 = false;
441
441
  }
442
- if (t_209) {
442
+ if (t_176) {
443
443
  try {
444
- t_210 = requireInstanceOf__211(regex_195, Sequence);
444
+ t_177 = requireInstanceOf__178(regex_162, Sequence);
445
445
  } catch {
446
- break s__1238_212;
446
+ break s__1259_179;
447
447
  }
448
- this.pushSequence(t_210);
449
- } else if (eqGeneric_99(regex_195, Begin)) {
448
+ this.pushSequence(t_177);
449
+ } else if (eqGeneric_180(regex_162, Begin)) {
450
450
  try {
451
- listBuilderAdd_0(this.#out_188, "^");
451
+ listBuilderAdd_4(this.#out_155, "^");
452
452
  } catch {
453
- break s__1238_212;
453
+ break s__1259_179;
454
454
  }
455
- } else if (eqGeneric_99(regex_195, Dot)) {
455
+ } else if (eqGeneric_180(regex_162, Dot)) {
456
456
  try {
457
- listBuilderAdd_0(this.#out_188, ".");
457
+ listBuilderAdd_4(this.#out_155, ".");
458
458
  } catch {
459
- break s__1238_212;
459
+ break s__1259_179;
460
460
  }
461
- } else if (eqGeneric_99(regex_195, End)) {
461
+ } else if (eqGeneric_180(regex_162, End)) {
462
462
  try {
463
- listBuilderAdd_0(this.#out_188, "\u0024");
463
+ listBuilderAdd_4(this.#out_155, "\u0024");
464
464
  } catch {
465
- break s__1238_212;
465
+ break s__1259_179;
466
466
  }
467
- } else if (eqGeneric_99(regex_195, WordBoundary)) {
467
+ } else if (eqGeneric_180(regex_162, WordBoundary)) {
468
468
  try {
469
- listBuilderAdd_0(this.#out_188, "\\b");
469
+ listBuilderAdd_4(this.#out_155, "\\b");
470
470
  } catch {
471
- break s__1238_212;
471
+ break s__1259_179;
472
472
  }
473
- } else if (eqGeneric_99(regex_195, Digit)) {
473
+ } else if (eqGeneric_180(regex_162, Digit)) {
474
474
  try {
475
- listBuilderAdd_0(this.#out_188, "\\d");
475
+ listBuilderAdd_4(this.#out_155, "\\d");
476
476
  } catch {
477
- break s__1238_212;
477
+ break s__1259_179;
478
478
  }
479
- } else if (eqGeneric_99(regex_195, Space)) {
479
+ } else if (eqGeneric_180(regex_162, Space)) {
480
480
  try {
481
- listBuilderAdd_0(this.#out_188, "\\s");
481
+ listBuilderAdd_4(this.#out_155, "\\s");
482
482
  } catch {
483
- break s__1238_212;
483
+ break s__1259_179;
484
484
  }
485
- } else if (eqGeneric_99(regex_195, Word)) {
485
+ } else if (eqGeneric_180(regex_162, Word)) {
486
486
  try {
487
- listBuilderAdd_0(this.#out_188, "\\w");
487
+ listBuilderAdd_4(this.#out_155, "\\w");
488
488
  } catch {
489
- break s__1238_212;
489
+ break s__1259_179;
490
490
  }
491
491
  } else {
492
492
  void 0;
@@ -497,330 +497,330 @@ class RegexFormatter_186 {
497
497
  }
498
498
  }
499
499
  }
500
- return_196 = void 0;
501
- return return_196;
500
+ return_163 = void 0;
501
+ return return_163;
502
502
  }
503
- throw bubbleException__213;
503
+ throw Error();
504
504
  }
505
- /** @param {Capture} capture_215 */
506
- pushCapture(capture_215) {
507
- let return_216;
508
- let t_217;
509
- let t_218;
510
- let t_219;
505
+ /** @param {Capture} capture_182 */
506
+ pushCapture(capture_182) {
507
+ let return_183;
508
+ let t_184;
509
+ let t_185;
510
+ let t_186;
511
511
  {
512
- listBuilderAdd_0(this.#out_188, "(");
513
- t_219 = this.#out_188;
514
- t_217 = capture_215.name;
515
- this.pushCaptureName(t_219, t_217);
516
- t_218 = capture_215.item;
517
- this.pushRegex(t_218);
518
- listBuilderAdd_0(this.#out_188, ")");
519
- return_216 = void 0;
512
+ listBuilderAdd_4(this.#out_155, "(");
513
+ t_186 = this.#out_155;
514
+ t_184 = capture_182.name;
515
+ this.pushCaptureName(t_186, t_184);
516
+ t_185 = capture_182.item;
517
+ this.pushRegex(t_185);
518
+ listBuilderAdd_4(this.#out_155, ")");
519
+ return_183 = void 0;
520
520
  }
521
- return return_216;
521
+ return return_183;
522
522
  }
523
523
  /**
524
- * @param {Array<string>} out_221
525
- * @param {string} name_222
524
+ * @param {Array<string>} out_188
525
+ * @param {string} name_189
526
526
  */
527
- pushCaptureName(out_221, name_222) {
528
- let return_223;
527
+ pushCaptureName(out_188, name_189) {
528
+ let return_190;
529
529
  {
530
- listBuilderAdd_0(out_221, strCat_9("?\u003c", name_222, "\u003e"));
531
- return_223 = void 0;
530
+ listBuilderAdd_4(out_188, strCat_57("?\u003c", name_189, "\u003e"));
531
+ return_190 = void 0;
532
532
  }
533
- return return_223;
533
+ return return_190;
534
534
  }
535
535
  /**
536
- * @param {number} code_225
537
- * @param {boolean} insideCodeSet_226
536
+ * @param {number} code_192
537
+ * @param {boolean} insideCodeSet_193
538
538
  */
539
- pushCode(code_225, insideCodeSet_226) {
540
- regexFormatterPushCodeTo_100(this, this.#out_188, code_225, insideCodeSet_226);
539
+ pushCode(code_192, insideCodeSet_193) {
540
+ regexFormatterPushCodeTo_194(this, this.#out_155, code_192, insideCodeSet_193);
541
541
  return;
542
542
  }
543
543
  /**
544
- * @param {CodePoints} codePoints_228
545
- * @param {boolean} insideCodeSet_229
544
+ * @param {CodePoints} codePoints_196
545
+ * @param {boolean} insideCodeSet_197
546
546
  */
547
- pushCodePoints(codePoints_228, insideCodeSet_229) {
548
- let t_230;
549
- let t_231;
550
- let t_232 = stringCodePoints_74(codePoints_228.value);
551
- let slice_233 = t_232;
547
+ pushCodePoints(codePoints_196, insideCodeSet_197) {
548
+ let t_198;
549
+ let t_199;
550
+ let t_200 = stringCodePoints_201(codePoints_196.value);
551
+ let slice_202 = t_200;
552
552
  while (true) {
553
- if (! slice_233.isEmpty) {
554
- t_230 = slice_233.read();
555
- this.pushCode(t_230, insideCodeSet_229);
556
- t_231 = slice_233.advance(1);
557
- slice_233 = t_231;
553
+ if (! slice_202.isEmpty) {
554
+ t_198 = slice_202.read();
555
+ this.pushCode(t_198, insideCodeSet_197);
556
+ t_199 = slice_202.advance(1);
557
+ slice_202 = t_199;
558
558
  } else {
559
559
  break;
560
560
  }
561
561
  }
562
562
  return;
563
563
  }
564
- /** @param {CodeRange} codeRange_235 */
565
- pushCodeRange(codeRange_235) {
566
- let return_236;
564
+ /** @param {CodeRange} codeRange_204 */
565
+ pushCodeRange(codeRange_204) {
566
+ let return_205;
567
567
  {
568
- listBuilderAdd_0(this.#out_188, "[");
569
- this.pushCodeRangeUnwrapped(codeRange_235);
570
- listBuilderAdd_0(this.#out_188, "]");
571
- return_236 = void 0;
568
+ listBuilderAdd_4(this.#out_155, "[");
569
+ this.pushCodeRangeUnwrapped(codeRange_204);
570
+ listBuilderAdd_4(this.#out_155, "]");
571
+ return_205 = void 0;
572
572
  }
573
- return return_236;
573
+ return return_205;
574
574
  }
575
- /** @param {CodeRange} codeRange_238 */
576
- pushCodeRangeUnwrapped(codeRange_238) {
577
- let return_239;
578
- let t_240;
579
- let t_241 = codeRange_238.min;
580
- this.pushCode(t_241, true);
575
+ /** @param {CodeRange} codeRange_207 */
576
+ pushCodeRangeUnwrapped(codeRange_207) {
577
+ let return_208;
578
+ let t_209;
579
+ let t_210 = codeRange_207.min;
580
+ this.pushCode(t_210, true);
581
581
  {
582
- listBuilderAdd_0(this.#out_188, "-");
583
- t_240 = codeRange_238.max;
584
- this.pushCode(t_240, true);
585
- return_239 = void 0;
582
+ listBuilderAdd_4(this.#out_155, "-");
583
+ t_209 = codeRange_207.max;
584
+ this.pushCode(t_209, true);
585
+ return_208 = void 0;
586
586
  }
587
- return return_239;
587
+ return return_208;
588
588
  }
589
- /** @param {CodeSet} codeSet_243 */
590
- pushCodeSet(codeSet_243) {
591
- let t_244;
592
- let t_245;
593
- let t_246;
594
- let t_247;
595
- const adjusted_248 = regexFormatterAdjustCodeSet_101(this, codeSet_243, regexRefs_181);
589
+ /** @param {CodeSet} codeSet_212 */
590
+ pushCodeSet(codeSet_212) {
591
+ let t_213;
592
+ let t_214;
593
+ let t_215;
594
+ let t_216;
595
+ const adjusted_217 = regexFormatterAdjustCodeSet_218(this, codeSet_212, regexRefs_147);
596
596
  try {
597
- requireInstanceOf__211(adjusted_248, CodeSet);
598
- t_245 = true;
597
+ requireInstanceOf__178(adjusted_217, CodeSet);
598
+ t_214 = true;
599
599
  } catch {
600
- t_245 = false;
600
+ t_214 = false;
601
601
  }
602
- s__1242_249: {
603
- if (t_245) {
604
- s__1243_250: {
602
+ s__1264_219: {
603
+ if (t_214) {
604
+ s__1265_220: {
605
605
  try {
606
- t_246 = requireInstanceOf__211(adjusted_248, CodeSet);
607
- listBuilderAdd_0(this.#out_188, "[");
606
+ t_215 = requireInstanceOf__178(adjusted_217, CodeSet);
607
+ listBuilderAdd_4(this.#out_155, "[");
608
608
  } catch {
609
- break s__1243_250;
609
+ break s__1265_220;
610
610
  }
611
- if (t_246.negated) {
611
+ if (t_215.negated) {
612
612
  try {
613
- listBuilderAdd_0(this.#out_188, "^");
613
+ listBuilderAdd_4(this.#out_155, "^");
614
614
  } catch {
615
- break s__1243_250;
615
+ break s__1265_220;
616
616
  }
617
617
  } else {
618
618
  void 0;
619
619
  }
620
- let i_251 = 0;
620
+ let i_221 = 0;
621
621
  while (true) {
622
- t_244 = t_246.items.length;
623
- if (ltGeneric_6(i_251, t_244)) {
622
+ t_213 = t_215.items.length;
623
+ if (i_221 < t_213) {
624
624
  try {
625
- t_247 = listGet_7(t_246.items, i_251);
625
+ t_216 = listGet_53(t_215.items, i_221);
626
626
  } catch {
627
- break s__1243_250;
627
+ break s__1265_220;
628
628
  }
629
- this.pushCodeSetItem(t_247);
630
- i_251 = i_251 + 1;
629
+ this.pushCodeSetItem(t_216);
630
+ i_221 = i_221 + 1;
631
631
  } else {
632
632
  break;
633
633
  }
634
634
  }
635
635
  try {
636
- listBuilderAdd_0(this.#out_188, "]");
637
- break s__1242_249;
636
+ listBuilderAdd_4(this.#out_155, "]");
637
+ break s__1264_219;
638
638
  } catch {
639
639
  }
640
640
  }
641
- throw bubbleException__213;
641
+ throw Error();
642
642
  }
643
- this.pushRegex(adjusted_248);
643
+ this.pushRegex(adjusted_217);
644
644
  }
645
645
  return;
646
646
  }
647
- /** @param {CodePart} codePart_253 */
648
- pushCodeSetItem(codePart_253) {
649
- let return_254;
650
- let t_255;
651
- let t_256;
652
- let t_257;
653
- let t_258;
654
- let t_259;
655
- let t_260;
647
+ /** @param {CodePart} codePart_223 */
648
+ pushCodeSetItem(codePart_223) {
649
+ let return_224;
650
+ let t_225;
651
+ let t_226;
652
+ let t_227;
653
+ let t_228;
654
+ let t_229;
655
+ let t_230;
656
656
  try {
657
- requireInstanceOf__211(codePart_253, CodePoints);
658
- t_255 = true;
657
+ requireInstanceOf__178(codePart_223, CodePoints);
658
+ t_225 = true;
659
659
  } catch {
660
- t_255 = false;
660
+ t_225 = false;
661
661
  }
662
- s__1247_261: {
663
- if (t_255) {
662
+ s__1269_231: {
663
+ if (t_225) {
664
664
  try {
665
- t_256 = requireInstanceOf__211(codePart_253, CodePoints);
665
+ t_226 = requireInstanceOf__178(codePart_223, CodePoints);
666
666
  } catch {
667
- break s__1247_261;
667
+ break s__1269_231;
668
668
  }
669
- this.pushCodePoints(t_256, true);
669
+ this.pushCodePoints(t_226, true);
670
670
  } else {
671
671
  try {
672
- requireInstanceOf__211(codePart_253, CodeRange);
673
- t_257 = true;
672
+ requireInstanceOf__178(codePart_223, CodeRange);
673
+ t_227 = true;
674
674
  } catch {
675
- t_257 = false;
675
+ t_227 = false;
676
676
  }
677
- if (t_257) {
677
+ if (t_227) {
678
678
  try {
679
- t_258 = requireInstanceOf__211(codePart_253, CodeRange);
679
+ t_228 = requireInstanceOf__178(codePart_223, CodeRange);
680
680
  } catch {
681
- break s__1247_261;
681
+ break s__1269_231;
682
682
  }
683
- this.pushCodeRangeUnwrapped(t_258);
683
+ this.pushCodeRangeUnwrapped(t_228);
684
684
  } else {
685
685
  try {
686
- requireInstanceOf__211(codePart_253, SpecialSet);
687
- t_259 = true;
686
+ requireInstanceOf__178(codePart_223, SpecialSet);
687
+ t_229 = true;
688
688
  } catch {
689
- t_259 = false;
689
+ t_229 = false;
690
690
  }
691
- if (t_259) {
691
+ if (t_229) {
692
692
  try {
693
- t_260 = requireInstanceOf__211(codePart_253, SpecialSet);
693
+ t_230 = requireInstanceOf__178(codePart_223, SpecialSet);
694
694
  } catch {
695
- break s__1247_261;
695
+ break s__1269_231;
696
696
  }
697
- this.pushRegex(t_260);
697
+ this.pushRegex(t_230);
698
698
  } else {
699
699
  void 0;
700
700
  }
701
701
  }
702
702
  }
703
- return_254 = void 0;
704
- return return_254;
703
+ return_224 = void 0;
704
+ return return_224;
705
705
  }
706
- throw bubbleException__213;
706
+ throw Error();
707
707
  }
708
- /** @param {Or} or_263 */
709
- pushOr(or_263) {
710
- let t_264;
711
- let t_265;
712
- let t_266;
713
- s__1249_267: if (! ! or_263.items.length) {
714
- s__1250_268: {
708
+ /** @param {Or} or_233 */
709
+ pushOr(or_233) {
710
+ let t_234;
711
+ let t_235;
712
+ let t_236;
713
+ s__1271_237: if (! ! or_233.items.length) {
714
+ s__1272_238: {
715
715
  try {
716
- listBuilderAdd_0(this.#out_188, "(?:");
717
- t_265 = listGet_7(or_263.items, 0);
716
+ listBuilderAdd_4(this.#out_155, "(?:");
717
+ t_235 = listGet_53(or_233.items, 0);
718
718
  } catch {
719
- break s__1250_268;
719
+ break s__1272_238;
720
720
  }
721
- this.pushRegex(t_265);
722
- let i_269 = 1;
721
+ this.pushRegex(t_235);
722
+ let i_239 = 1;
723
723
  while (true) {
724
- t_264 = or_263.items.length;
725
- if (ltGeneric_6(i_269, t_264)) {
724
+ t_234 = or_233.items.length;
725
+ if (i_239 < t_234) {
726
726
  try {
727
- listBuilderAdd_0(this.#out_188, "|");
728
- t_266 = listGet_7(or_263.items, i_269);
727
+ listBuilderAdd_4(this.#out_155, "|");
728
+ t_236 = listGet_53(or_233.items, i_239);
729
729
  } catch {
730
730
  break;
731
731
  }
732
- this.pushRegex(t_266);
733
- i_269 = i_269 + 1;
732
+ this.pushRegex(t_236);
733
+ i_239 = i_239 + 1;
734
734
  } else {
735
735
  try {
736
- listBuilderAdd_0(this.#out_188, ")");
736
+ listBuilderAdd_4(this.#out_155, ")");
737
737
  } catch {
738
- break s__1250_268;
738
+ break s__1272_238;
739
739
  }
740
- break s__1249_267;
740
+ break s__1271_237;
741
741
  }
742
742
  }
743
743
  }
744
- throw bubbleException__213;
744
+ throw Error();
745
745
  }
746
746
  return;
747
747
  }
748
- /** @param {Repeat} repeat_271 */
749
- pushRepeat(repeat_271) {
750
- let return_272;
751
- let t_273;
752
- let t_274;
753
- let t_275;
754
- let t_276;
755
- let t_277;
756
- let t_278;
757
- s__1253_279: {
758
- let min_280;
759
- let max_281;
748
+ /** @param {Repeat} repeat_241 */
749
+ pushRepeat(repeat_241) {
750
+ let return_242;
751
+ let t_243;
752
+ let t_244;
753
+ let t_245;
754
+ let t_246;
755
+ let t_247;
756
+ let t_248;
757
+ s__1275_249: {
758
+ let min_250;
759
+ let max_251;
760
760
  try {
761
- listBuilderAdd_0(this.#out_188, "(?:");
762
- t_273 = repeat_271.item;
763
- this.pushRegex(t_273);
764
- listBuilderAdd_0(this.#out_188, ")");
765
- min_280 = repeat_271.min;
766
- max_281 = repeat_271.max;
761
+ listBuilderAdd_4(this.#out_155, "(?:");
762
+ t_243 = repeat_241.item;
763
+ this.pushRegex(t_243);
764
+ listBuilderAdd_4(this.#out_155, ")");
765
+ min_250 = repeat_241.min;
766
+ max_251 = repeat_241.max;
767
767
  } catch {
768
- break s__1253_279;
768
+ break s__1275_249;
769
769
  }
770
- if (eqGeneric_70(min_280, 0)) {
771
- t_274 = eqGeneric_70(max_281, 1);
770
+ if (min_250 === 0) {
771
+ t_244 = max_251 === 1;
772
772
  } else {
773
- t_274 = false;
773
+ t_244 = false;
774
774
  }
775
- if (t_274) {
775
+ if (t_244) {
776
776
  try {
777
- listBuilderAdd_0(this.#out_188, "?");
777
+ listBuilderAdd_4(this.#out_155, "?");
778
778
  } catch {
779
- break s__1253_279;
779
+ break s__1275_249;
780
780
  }
781
781
  } else {
782
- if (eqGeneric_70(min_280, 0)) {
783
- t_275 = eqGeneric_70(max_281, null);
782
+ if (min_250 === 0) {
783
+ t_245 = max_251 === null;
784
784
  } else {
785
- t_275 = false;
785
+ t_245 = false;
786
786
  }
787
- if (t_275) {
787
+ if (t_245) {
788
788
  try {
789
- listBuilderAdd_0(this.#out_188, "*");
789
+ listBuilderAdd_4(this.#out_155, "*");
790
790
  } catch {
791
- break s__1253_279;
791
+ break s__1275_249;
792
792
  }
793
793
  } else {
794
- if (eqGeneric_70(min_280, 1)) {
795
- t_276 = eqGeneric_70(max_281, null);
794
+ if (min_250 === 1) {
795
+ t_246 = max_251 === null;
796
796
  } else {
797
- t_276 = false;
797
+ t_246 = false;
798
798
  }
799
- if (t_276) {
799
+ if (t_246) {
800
800
  try {
801
- listBuilderAdd_0(this.#out_188, "+");
801
+ listBuilderAdd_4(this.#out_155, "+");
802
802
  } catch {
803
- break s__1253_279;
803
+ break s__1275_249;
804
804
  }
805
805
  } else {
806
806
  try {
807
- listBuilderAdd_0(this.#out_188, strCat_9("{", intToString_73(min_280)));
807
+ listBuilderAdd_4(this.#out_155, strCat_57("{", intToString_252(min_250)));
808
808
  } catch {
809
- break s__1253_279;
809
+ break s__1275_249;
810
810
  }
811
- if (neGeneric_72(min_280, max_281)) {
811
+ if (min_250 !== max_251) {
812
812
  try {
813
- listBuilderAdd_0(this.#out_188, ",");
813
+ listBuilderAdd_4(this.#out_155, ",");
814
814
  } catch {
815
- break s__1253_279;
815
+ break s__1275_249;
816
816
  }
817
- if (neGeneric_72(max_281, null)) {
818
- t_278 = this.#out_188;
817
+ if (max_251 !== null) {
818
+ t_248 = this.#out_155;
819
819
  try {
820
- t_277 = requireIsSafeInteger__282(max_281);
821
- listBuilderAdd_0(t_278, intToString_73(t_277));
820
+ t_247 = requireIsSafeInteger__253(max_251);
821
+ listBuilderAdd_4(t_248, intToString_252(t_247));
822
822
  } catch {
823
- break s__1253_279;
823
+ break s__1275_249;
824
824
  }
825
825
  } else {
826
826
  void 0;
@@ -829,244 +829,244 @@ class RegexFormatter_186 {
829
829
  void 0;
830
830
  }
831
831
  try {
832
- listBuilderAdd_0(this.#out_188, "}");
832
+ listBuilderAdd_4(this.#out_155, "}");
833
833
  } catch {
834
- break s__1253_279;
834
+ break s__1275_249;
835
835
  }
836
836
  }
837
837
  }
838
838
  }
839
- if (repeat_271.reluctant) {
839
+ if (repeat_241.reluctant) {
840
840
  try {
841
- listBuilderAdd_0(this.#out_188, "?");
841
+ listBuilderAdd_4(this.#out_155, "?");
842
842
  } catch {
843
- break s__1253_279;
843
+ break s__1275_249;
844
844
  }
845
845
  } else {
846
846
  void 0;
847
847
  }
848
- return_272 = void 0;
849
- return return_272;
848
+ return_242 = void 0;
849
+ return return_242;
850
850
  }
851
- throw bubbleException__213;
851
+ throw Error();
852
852
  }
853
- /** @param {Sequence} sequence_284 */
854
- pushSequence(sequence_284) {
855
- let return_285;
856
- let t_286;
857
- let t_287;
858
- let i_288 = 0;
859
- s__1255_289: {
853
+ /** @param {Sequence} sequence_255 */
854
+ pushSequence(sequence_255) {
855
+ let return_256;
856
+ let t_257;
857
+ let t_258;
858
+ let i_259 = 0;
859
+ s__1278_260: {
860
860
  while (true) {
861
- t_286 = sequence_284.items.length;
862
- if (ltGeneric_6(i_288, t_286)) {
861
+ t_257 = sequence_255.items.length;
862
+ if (i_259 < t_257) {
863
863
  try {
864
- t_287 = listGet_7(sequence_284.items, i_288);
864
+ t_258 = listGet_53(sequence_255.items, i_259);
865
865
  } catch {
866
866
  break;
867
867
  }
868
- this.pushRegex(t_287);
869
- i_288 = i_288 + 1;
868
+ this.pushRegex(t_258);
869
+ i_259 = i_259 + 1;
870
870
  } else {
871
- return_285 = void 0;
872
- break s__1255_289;
871
+ return_256 = void 0;
872
+ break s__1278_260;
873
873
  }
874
874
  }
875
- throw bubbleException__213;
875
+ throw Error();
876
876
  }
877
- return return_285;
877
+ return return_256;
878
878
  }
879
879
  /**
880
- * @param {CodePart} codePart_291
880
+ * @param {CodePart} codePart_262
881
881
  * @returns {number | null}
882
882
  */
883
- maxCode(codePart_291) {
884
- let return_292;
885
- let t_293;
886
- let t_294;
887
- let t_295;
888
- let t_296;
889
- let t_297;
890
- let t_298;
891
- let t_299;
892
- let t_300;
893
- let t_301;
894
- let t_302;
883
+ maxCode(codePart_262) {
884
+ let return_263;
885
+ let t_264;
886
+ let t_265;
887
+ let t_266;
888
+ let t_267;
889
+ let t_268;
890
+ let t_269;
891
+ let t_270;
892
+ let t_271;
893
+ let t_272;
894
+ let t_273;
895
895
  try {
896
- requireInstanceOf__211(codePart_291, CodePoints);
897
- t_299 = true;
896
+ requireInstanceOf__178(codePart_262, CodePoints);
897
+ t_270 = true;
898
898
  } catch {
899
- t_299 = false;
899
+ t_270 = false;
900
900
  }
901
- s__1257_303: {
902
- if (t_299) {
901
+ s__1280_274: {
902
+ if (t_270) {
903
903
  try {
904
- t_300 = requireInstanceOf__211(codePart_291, CodePoints);
904
+ t_271 = requireInstanceOf__178(codePart_262, CodePoints);
905
905
  } catch {
906
- break s__1257_303;
906
+ break s__1280_274;
907
907
  }
908
- const value_304 = t_300.value;
909
- if (! value_304) {
910
- return_292 = null;
908
+ const value_275 = t_271.value;
909
+ if (! value_275) {
910
+ return_263 = null;
911
911
  } else {
912
- let max_305 = 0;
913
- t_293 = stringCodePoints_74(value_304);
914
- let slice_306 = t_293;
912
+ let max_276 = 0;
913
+ t_264 = stringCodePoints_201(value_275);
914
+ let slice_277 = t_264;
915
915
  while (true) {
916
- if (! slice_306.isEmpty) {
917
- const next_307 = slice_306.read();
918
- if (gtGeneric_102(next_307, max_305)) {
919
- max_305 = next_307;
916
+ if (! slice_277.isEmpty) {
917
+ const next_278 = slice_277.read();
918
+ if (next_278 > max_276) {
919
+ max_276 = next_278;
920
920
  } else {
921
921
  void 0;
922
922
  }
923
- t_294 = slice_306.advance(1);
924
- slice_306 = t_294;
923
+ t_265 = slice_277.advance(1);
924
+ slice_277 = t_265;
925
925
  } else {
926
926
  break;
927
927
  }
928
928
  }
929
- return_292 = max_305;
929
+ return_263 = max_276;
930
930
  }
931
931
  } else {
932
932
  try {
933
- requireInstanceOf__211(codePart_291, CodeRange);
934
- t_301 = true;
933
+ requireInstanceOf__178(codePart_262, CodeRange);
934
+ t_272 = true;
935
935
  } catch {
936
- t_301 = false;
936
+ t_272 = false;
937
937
  }
938
- if (t_301) {
938
+ if (t_272) {
939
939
  try {
940
- t_302 = requireInstanceOf__211(codePart_291, CodeRange);
941
- t_295 = t_302.max;
942
- return_292 = t_295;
940
+ t_273 = requireInstanceOf__178(codePart_262, CodeRange);
941
+ t_266 = t_273.max;
942
+ return_263 = t_266;
943
943
  } catch {
944
- break s__1257_303;
944
+ break s__1280_274;
945
945
  }
946
- } else if (eqGeneric_99(codePart_291, Digit)) {
947
- t_296 = stringCodePoints_74("9").read();
946
+ } else if (eqGeneric_180(codePart_262, Digit)) {
947
+ t_267 = stringCodePoints_201("9").read();
948
948
  try {
949
- return_292 = t_296;
949
+ return_263 = t_267;
950
950
  } catch {
951
- break s__1257_303;
951
+ break s__1280_274;
952
952
  }
953
- } else if (eqGeneric_99(codePart_291, Space)) {
954
- t_297 = stringCodePoints_74(" ").read();
953
+ } else if (eqGeneric_180(codePart_262, Space)) {
954
+ t_268 = stringCodePoints_201(" ").read();
955
955
  try {
956
- return_292 = t_297;
956
+ return_263 = t_268;
957
957
  } catch {
958
- break s__1257_303;
958
+ break s__1280_274;
959
959
  }
960
- } else if (eqGeneric_99(codePart_291, Word)) {
961
- t_298 = stringCodePoints_74("z").read();
960
+ } else if (eqGeneric_180(codePart_262, Word)) {
961
+ t_269 = stringCodePoints_201("z").read();
962
962
  try {
963
- return_292 = t_298;
963
+ return_263 = t_269;
964
964
  } catch {
965
- break s__1257_303;
965
+ break s__1280_274;
966
966
  }
967
967
  } else {
968
- return_292 = null;
968
+ return_263 = null;
969
969
  }
970
970
  }
971
- return return_292;
971
+ return return_263;
972
972
  }
973
- throw bubbleException__213;
973
+ throw Error();
974
974
  }
975
- /** @param {Array<string>} out_308 */
976
- constructor(out_308) {
977
- let t_309;
978
- if (!(out_308 !== void 0)) {
979
- t_309 = [];
980
- out_308 = t_309;
975
+ /** @param {Array<string>} out_279 */
976
+ constructor(out_279) {
977
+ let t_280;
978
+ if (!(out_279 !== void 0)) {
979
+ t_280 = [];
980
+ out_279 = t_280;
981
981
  }
982
- this.#out_188 = out_308;
982
+ this.#out_155 = out_279;
983
983
  return;
984
984
  }
985
985
  }
986
- class Begin_310 {
986
+ class Begin_281 {
987
987
  constructor() {
988
988
  return;
989
989
  }
990
990
  }
991
- Special.implementedBy(Begin_310);
992
- /** @type {Begin_310} */
993
- export const Begin = new Begin_310();
994
- class Dot_311 {
991
+ Special.implementedBy(Begin_281);
992
+ /** @type {Special} */
993
+ export const Begin = new Begin_281();
994
+ class Dot_282 {
995
995
  constructor() {
996
996
  return;
997
997
  }
998
998
  }
999
- Special.implementedBy(Dot_311);
1000
- /** @type {Dot_311} */
1001
- export const Dot = new Dot_311();
1002
- class End_312 {
999
+ Special.implementedBy(Dot_282);
1000
+ /** @type {Special} */
1001
+ export const Dot = new Dot_282();
1002
+ class End_283 {
1003
1003
  constructor() {
1004
1004
  return;
1005
1005
  }
1006
1006
  }
1007
- Special.implementedBy(End_312);
1008
- /** @type {End_312} */
1009
- export const End = new End_312();
1010
- class WordBoundary_313 {
1007
+ Special.implementedBy(End_283);
1008
+ /** @type {Special} */
1009
+ export const End = new End_283();
1010
+ class WordBoundary_284 {
1011
1011
  constructor() {
1012
1012
  return;
1013
1013
  }
1014
1014
  }
1015
- Special.implementedBy(WordBoundary_313);
1016
- /** @type {WordBoundary_313} */
1017
- export const WordBoundary = new WordBoundary_313();
1018
- class Digit_314 {
1015
+ Special.implementedBy(WordBoundary_284);
1016
+ /** @type {Special} */
1017
+ export const WordBoundary = new WordBoundary_284();
1018
+ class Digit_285 {
1019
1019
  constructor() {
1020
1020
  return;
1021
1021
  }
1022
1022
  }
1023
- SpecialSet.implementedBy(Digit_314);
1024
- /** @type {Digit_314} */
1025
- export const Digit = new Digit_314();
1026
- class Space_315 {
1023
+ SpecialSet.implementedBy(Digit_285);
1024
+ /** @type {SpecialSet} */
1025
+ export const Digit = new Digit_285();
1026
+ class Space_286 {
1027
1027
  constructor() {
1028
1028
  return;
1029
1029
  }
1030
1030
  }
1031
- SpecialSet.implementedBy(Space_315);
1032
- /** @type {Space_315} */
1033
- export const Space = new Space_315();
1034
- class Word_316 {
1031
+ SpecialSet.implementedBy(Space_286);
1032
+ /** @type {SpecialSet} */
1033
+ export const Space = new Space_286();
1034
+ class Word_287 {
1035
1035
  constructor() {
1036
1036
  return;
1037
1037
  }
1038
1038
  }
1039
- SpecialSet.implementedBy(Word_316);
1040
- /** @type {Word_316} */
1041
- export const Word = new Word_316();
1039
+ SpecialSet.implementedBy(Word_287);
1040
+ /** @type {SpecialSet} */
1041
+ export const Word = new Word_287();
1042
1042
  /**
1043
- * @param {Regex} item_317
1043
+ * @param {Regex} item_288
1044
1044
  * @returns {Regex}
1045
1045
  */
1046
- export function entire(item_317) {
1047
- return new Sequence(listify_3(Begin, item_317, End));
1046
+ export function entire(item_288) {
1047
+ return new Sequence(listify_42(Begin, item_288, End));
1048
1048
  };
1049
1049
  /**
1050
- * @param {Regex} item_318
1051
- * @param {boolean} reluctant_319
1050
+ * @param {Regex} item_289
1051
+ * @param {boolean} reluctant_290
1052
1052
  * @returns {Repeat}
1053
1053
  */
1054
- export function oneOrMore(item_318, reluctant_319) {
1055
- if (!(reluctant_319 !== void 0)) {
1056
- reluctant_319 = false;
1054
+ export function oneOrMore(item_289, reluctant_290) {
1055
+ if (!(reluctant_290 !== void 0)) {
1056
+ reluctant_290 = false;
1057
1057
  }
1058
- return new Repeat(item_318, 1, null, reluctant_319);
1058
+ return new Repeat(item_289, 1, null, reluctant_290);
1059
1059
  };
1060
1060
  /**
1061
- * @param {Regex} item_320
1062
- * @param {boolean} reluctant_321
1061
+ * @param {Regex} item_291
1062
+ * @param {boolean} reluctant_292
1063
1063
  * @returns {Repeat}
1064
1064
  */
1065
- export function optional(item_320, reluctant_321) {
1066
- if (!(reluctant_321 !== void 0)) {
1067
- reluctant_321 = false;
1065
+ export function optional(item_291, reluctant_292) {
1066
+ if (!(reluctant_292 !== void 0)) {
1067
+ reluctant_292 = false;
1068
1068
  }
1069
- return new Repeat(item_320, 0, 1, reluctant_321);
1069
+ return new Repeat(item_291, 0, 1, reluctant_292);
1070
1070
  };
1071
- /** @type {RegexRefs_159} */
1072
- const regexRefs_181 = new RegexRefs_159();
1071
+ /** @type {RegexRefs_122} */
1072
+ const regexRefs_147 = new RegexRefs_122();