@aidc-toolkit/app-extension 1.0.31-beta → 1.0.33-beta

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.
Files changed (45) hide show
  1. package/dist/index.cjs +1 -3709
  2. package/dist/index.d.cts +607 -333
  3. package/dist/index.d.ts +607 -333
  4. package/dist/index.js +1 -3683
  5. package/package.json +12 -13
  6. package/src/app-extension.ts +141 -93
  7. package/src/app-helper-proxy.ts +326 -0
  8. package/src/descriptor.ts +75 -7
  9. package/src/generator/generator.ts +118 -96
  10. package/src/generator/locale-resources-generator.ts +56 -42
  11. package/src/gs1/character-set-proxy.ts +8 -8
  12. package/src/gs1/check-proxy.ts +26 -25
  13. package/src/gs1/gtin-creator-proxy.ts +14 -28
  14. package/src/gs1/gtin-descriptor.ts +2 -23
  15. package/src/gs1/gtin-validator-proxy.ts +45 -48
  16. package/src/gs1/identifier-creator-proxy.ts +63 -53
  17. package/src/gs1/identifier-descriptor.ts +15 -0
  18. package/src/gs1/identifier-type.ts +37 -0
  19. package/src/gs1/identifier-validator-proxy.ts +59 -27
  20. package/src/gs1/index.ts +8 -0
  21. package/src/gs1/non-gtin-creator-proxy.ts +22 -33
  22. package/src/gs1/non-gtin-validator-proxy.ts +22 -33
  23. package/src/gs1/prefix-definition-descriptor.ts +2 -2
  24. package/src/gs1/prefix-manager-proxy.ts +164 -9
  25. package/src/gs1/service-proxy.ts +57 -0
  26. package/src/gs1/variable-measure-proxy.ts +62 -0
  27. package/src/index.ts +6 -1
  28. package/src/lib-proxy.ts +112 -70
  29. package/src/locale/en/locale-resources.ts +173 -47
  30. package/src/locale/fr/locale-resources.ts +173 -47
  31. package/src/locale/i18n.ts +8 -10
  32. package/src/locale/i18next.d.ts +2 -0
  33. package/src/proxy.ts +140 -140
  34. package/src/streaming.ts +13 -0
  35. package/src/type.ts +8 -7
  36. package/src/utility/character-set-descriptor.ts +2 -2
  37. package/src/utility/character-set-proxy.ts +39 -38
  38. package/src/utility/reg-exp-proxy.ts +12 -11
  39. package/src/utility/string-descriptor.ts +2 -2
  40. package/src/utility/string-proxy.ts +7 -7
  41. package/src/utility/transformer-descriptor.ts +5 -5
  42. package/src/utility/transformer-proxy.ts +25 -18
  43. package/dist/index.cjs.map +0 -1
  44. package/dist/index.js.map +0 -1
  45. package/src/app-utility-proxy.ts +0 -273
package/dist/index.js CHANGED
@@ -1,3685 +1,4 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
5
- var __typeError = (msg) => {
6
- throw TypeError(msg);
7
- };
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
- var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
15
- var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
16
- var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
17
- var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
18
- var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
19
- var __runInitializers = (array, flags, self, value) => {
20
- for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
21
- return value;
22
- };
23
- var __decorateElement = (array, flags, name, decorators, target, extra) => {
24
- var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
25
- var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
26
- var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
27
- var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
28
- return __privateGet(this, extra);
29
- }, set [name](x) {
30
- return __privateSet(this, extra, x);
31
- } }, name));
32
- k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
33
- for (var i = decorators.length - 1; i >= 0; i--) {
34
- ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
35
- if (k) {
36
- ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
37
- if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
38
- if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
39
- }
40
- it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
41
- if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
42
- else if (typeof it !== "object" || it === null) __typeError("Object expected");
43
- else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
44
- }
45
- return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
46
- };
47
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
48
- var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
49
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
50
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
51
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
52
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
53
-
54
- // src/locale/i18n.ts
55
- import { i18nCoreInit } from "@aidc-toolkit/core";
56
- import { gs1Resources, i18nGS1Init } from "@aidc-toolkit/gs1";
57
- import { i18nUtilityInit, utilityResources } from "@aidc-toolkit/utility";
58
- import i18next from "i18next";
59
-
60
- // src/locale/en/locale-resources.ts
61
- var locale_resources_default = {
62
- AppExtension: {
63
- sequenceCountMustBeLessThanOrEqualTo: "Sequence count {{sequenceCount, number}} must be less than or equal to {{maximumSequenceCount, number}}"
64
- },
65
- Proxy: {
66
- vSpillMustBeHorizontalArray: "Input must be a horizontal array",
67
- hSpillMustBeVerticalArray: "Input must be a vertical array",
68
- matrixMustBeArray: "Input must be a one-dimensional array"
69
- },
70
- IdentifierCreatorProxy: {
71
- prefixDefinitionMustBeOneDimensional: "Prefix definition must be a one-dimensional matrix",
72
- prefixDefinitionMustHaveMaximumThreeElements: "Prefix definition must have a maximum of 3 elements",
73
- prefixMustBeString: "Prefix must be a string",
74
- prefixTypeMustBeNumber: "Prefix type must be a number in the range of 0 to {{maximumPrefixType, number}}",
75
- invalidPrefixType: "Invalid prefix type",
76
- tweakFactorMustBeNumber: "Tweak factor must be a number"
77
- },
78
- Parameters: {
79
- spillMatrix: {
80
- name: "matrix",
81
- description: "One-dimensional matrix to spill."
82
- },
83
- spillMaximumWidth: {
84
- name: "maximumWidth",
85
- description: "Maximum width into which to spill the matrix. If not provided, the remaining width is used."
86
- },
87
- spillMaximumHeight: {
88
- name: "maximumHeight",
89
- description: "Maximum height into which to spill the matrix. If not provided, the remaining height is used."
90
- },
91
- domain: {
92
- name: "domain",
93
- description: "Transformation domain. Valid input values are from zero to domain-1."
94
- },
95
- value: {
96
- name: "value",
97
- description: "Value to transform."
98
- },
99
- startValue: {
100
- name: "startValue",
101
- description: "Start value of a domain of values to transform."
102
- },
103
- count: {
104
- name: "count",
105
- description: "Count of values to transform. If positive, values transformed are startValue to startValue+count-1. If negative, values transformed are startValue down to startValue+count+1."
106
- },
107
- transformedValue: {
108
- name: "transformedValue",
109
- description: "Previous output value of a transformation."
110
- },
111
- tweak: {
112
- name: "tweak",
113
- description: "Value by which to tweak the transformation. If not provided or zero, the output is sequential. Otherwise, the output is encrypted in such a way as to appear random, masking the values used as inputs to the sequence."
114
- },
115
- regExp: {
116
- name: "regExp",
117
- description: "Regular expression against which to validate a string."
118
- },
119
- validateS: {
120
- name: "s",
121
- description: "String to validate."
122
- },
123
- valueForS: {
124
- name: "s",
125
- description: "String for which to determine the value."
126
- },
127
- errorMessage: {
128
- name: "errorMessage",
129
- description: "Custom error message to use if validation fails. If not provided, an internal error message is used."
130
- },
131
- exclusionNone: {
132
- name: "exclusion",
133
- description: "String values to exclude. The only valid value is 0 (no exclusions)."
134
- },
135
- exclusionFirstZero: {
136
- name: "exclusion",
137
- description: "String values to exclude. Valid values are 0 (no exclusions) and 1 (strings starting with 0 excluded)."
138
- },
139
- exclusionAllNumeric: {
140
- name: "exclusion",
141
- description: "String values to exclude. Valid values are 0 (no exclusions) and 2 (strings that are all numeric excluded)."
142
- },
143
- exclusionAny: {
144
- name: "exclusion",
145
- description: "String values to exclude. Valid values are 0 (no exclusions), 1 (strings starting with 0 excluded), and 2 (strings that are all numeric excluded)."
146
- },
147
- length: {
148
- name: "length",
149
- description: "Length of string to create."
150
- },
151
- numericS: {
152
- name: "s",
153
- description: "Numeric string."
154
- },
155
- numericSFourOrFiveDigits: {
156
- name: "s",
157
- description: "Four- or five-digit numeric string."
158
- },
159
- numericSWithCheckDigit: {
160
- name: "s",
161
- description: "Numeric string with check digit."
162
- },
163
- checkDigit: {
164
- name: "checkDigit",
165
- description: "Check digit."
166
- },
167
- ai82S: {
168
- name: "s",
169
- description: "GS1 AI encodable character set 82 string."
170
- },
171
- ai82SWithCheckCharacterPair: {
172
- name: "s",
173
- description: "GS1 AI encodable character set 82 string with check character pair."
174
- },
175
- validateIdentifier: {
176
- name: "identifier",
177
- description: "Identifier to validate."
178
- },
179
- zeroSuppressibleGTIN12: {
180
- name: "gtin12",
181
- description: "GTIN-12 for which to suppress zeros."
182
- },
183
- zeroSuppressedGTIN12: {
184
- name: "zeroSuppressedGTIN12",
185
- description: "Zero-suppressed GTIN-12 to expand."
186
- },
187
- convertGTIN: {
188
- name: "gtin",
189
- description: "GTIN to convert to GTIN-14."
190
- },
191
- normalizeGTIN: {
192
- name: "gtin",
193
- description: "GTIN to normalize."
194
- },
195
- validateGTIN: {
196
- name: "gtin",
197
- description: "GTIN to validate."
198
- },
199
- validateGTIN14: {
200
- name: "gtin14",
201
- description: "GTIN-14 to validate."
202
- },
203
- baseIdentifier: {
204
- name: "baseIdentifier",
205
- description: "Base identifier."
206
- },
207
- indicatorDigit: {
208
- name: "indicatorDigit",
209
- description: "Indicator digit."
210
- },
211
- gtinLevel: {
212
- name: "level",
213
- description: "Level at which to validate the GTIN. Valid values are 0 (any), 1 (retail consumer trade item), and 2 (other than retail consumer trade item level)."
214
- },
215
- rcnFormat: {
216
- name: "format",
217
- description: "Restricted Circulation Number format."
218
- },
219
- rcn: {
220
- name: "rcn",
221
- description: "Restricted Circulation Number to parse."
222
- },
223
- prefix: {
224
- name: "prefix",
225
- description: "Prefix."
226
- },
227
- prefixType: {
228
- name: "prefixType",
229
- description: "Prefix type. Valid values are 0 (GS1 Company Prefix), 1 (U.P.C. Company Prefix), and 2 (GS1 Prefix)."
230
- },
231
- tweakFactor: {
232
- name: "tweakFactor",
233
- description: "Tweak factor, used to support the creation of sparse identifiers. The default tweak factor is based on the GS1 Company Prefix, and is usually sufficient for obfuscation. This allows more control over the encryption when higher security is required."
234
- },
235
- prefixDefinitionAny: {
236
- name: "prefixDefinition",
237
- description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Any prefix type is supported."
238
- },
239
- prefixDefinitionGS1UPC: {
240
- name: "prefixDefinition",
241
- description: "Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to definePrefix. Only prefix types 0 (GS1 Company Prefix) and 1 (U.P.C. Company Prefix) are supported."
242
- },
243
- sparse: {
244
- name: "sparse",
245
- description: "If true, value is mapped to a sparse sequence resistant to discovery. Default is false."
246
- },
247
- rcnItemReference: {
248
- name: "itemReference",
249
- description: "Item reference."
250
- },
251
- rcnPriceOrWeight: {
252
- name: "priceOrWeight",
253
- description: "Price or weight (whole number only)."
254
- },
255
- serialComponent: {
256
- name: "serialComponent",
257
- description: "Serial component."
258
- },
259
- reference: {
260
- name: "reference",
261
- description: "Reference portion of identifier."
262
- }
263
- },
264
- Functions: {
265
- version: {
266
- name: "version",
267
- description: "Get the version of the AIDC Toolkit."
268
- },
269
- vSpill: {
270
- name: "vSpill",
271
- description: "Spill a horizontal array vertically to fit within a given maximum width and height."
272
- },
273
- hSpill: {
274
- name: "hSpill",
275
- description: "Spill a vertical array horizontally to fit within a given maximum height and width."
276
- },
277
- forwardTransform: {
278
- name: "forwardTransform",
279
- description: "Transform a value forward."
280
- },
281
- forwardTransformSequence: {
282
- name: "forwardTransformSequence",
283
- description: "Transform a sequence of values forward."
284
- },
285
- reverseTransform: {
286
- name: "reverseTransform",
287
- description: "Transform a value in reverse."
288
- },
289
- validateRegExp: {
290
- name: "validateRegExp",
291
- description: "Validate a string against a regular expression."
292
- },
293
- isValidRegExp: {
294
- name: "isValidRegExp",
295
- description: "Determine if a string is valid against a regular expression."
296
- },
297
- validateNumeric: {
298
- name: "validateNumeric",
299
- description: "Validate a numeric string."
300
- },
301
- isValidNumeric: {
302
- name: "isValidNumeric",
303
- description: "Determine if a string is numeric."
304
- },
305
- createNumeric: {
306
- name: "createNumeric",
307
- description: "Create a numeric string."
308
- },
309
- createNumericSequence: {
310
- name: "createNumericSequence",
311
- description: "Create a sequence of numeric strings."
312
- },
313
- valueForNumeric: {
314
- name: "valueForNumeric",
315
- description: "Get the value for a numeric string."
316
- },
317
- validateHexadecimal: {
318
- name: "validateHexadecimal",
319
- description: "Validate a hexadecimal string."
320
- },
321
- isValidHexadecimal: {
322
- name: "isValidHexadecimal",
323
- description: "Determine if a string is hexadecimal."
324
- },
325
- createHexadecimal: {
326
- name: "createHexadecimal",
327
- description: "Create a hexadecimal string."
328
- },
329
- createHexadecimalSequence: {
330
- name: "createHexadecimalSequence",
331
- description: "Create a sequence of hexadecimal strings."
332
- },
333
- valueForHexadecimal: {
334
- name: "valueForHexadecimal",
335
- description: "Get the value for a hexadecimal string."
336
- },
337
- validateAlphabetic: {
338
- name: "validateAlphabetic",
339
- description: "Validate an alphabetic string."
340
- },
341
- isValidAlphabetic: {
342
- name: "isValidAlphabetic",
343
- description: "Determine if a string is alphabetic."
344
- },
345
- createAlphabetic: {
346
- name: "createAlphabetic",
347
- description: "Create an alphabetic string."
348
- },
349
- createAlphabeticSequence: {
350
- name: "createAlphabeticSequence",
351
- description: "Create a sequence of alphabetic strings."
352
- },
353
- valueForAlphabetic: {
354
- name: "valueForAlphabetic",
355
- description: "Get the value for an alphabetic string."
356
- },
357
- validateAlphanumeric: {
358
- name: "validateAlphanumeric",
359
- description: "Validate an alphanumeric string."
360
- },
361
- isValidAlphanumeric: {
362
- name: "isValidAlphanumeric",
363
- description: "Determine if a string is alphanumeric."
364
- },
365
- createAlphanumeric: {
366
- name: "createAlphanumeric",
367
- description: "Create an alphanumeric string."
368
- },
369
- createAlphanumericSequence: {
370
- name: "createAlphanumericSequence",
371
- description: "Create a sequence of alphanumeric strings."
372
- },
373
- valueForAlphanumeric: {
374
- name: "valueForAlphanumeric",
375
- description: "Get the value for an alphanumeric string."
376
- },
377
- GS1: {
378
- validateAI82: {
379
- name: "validateAI82",
380
- description: "Validate a GS1 AI 82 encodable character set string."
381
- },
382
- isValidAI82: {
383
- name: "isValidAI82",
384
- description: "Determine if a string is GS1 AI 82 encodable character set."
385
- },
386
- createAI82: {
387
- name: "createAI82",
388
- description: "Create a GS1 AI 82 encodable character set string."
389
- },
390
- createAI82Sequence: {
391
- name: "createAI82Sequence",
392
- description: "Create a sequence of GS1 AI 82 encodable character set strings."
393
- },
394
- valueForAI82: {
395
- name: "valueForAI82",
396
- description: "Get the value for a GS1 AI 82 encodable character set string."
397
- },
398
- validateAI39: {
399
- name: "validateAI39",
400
- description: "Validate a GS1 AI 39 encodable character set string."
401
- },
402
- isValidAI39: {
403
- name: "isValidAI39",
404
- description: "Determine if a string is GS1 AI 39 encodable character set."
405
- },
406
- createAI39: {
407
- name: "createAI39",
408
- description: "Create a GS1 AI 39 encodable character set string."
409
- },
410
- createAI39Sequence: {
411
- name: "createAI39Sequence",
412
- description: "Create a sequence of GS1 AI 39 encodable character set strings."
413
- },
414
- valueForAI39: {
415
- name: "valueForAI39",
416
- description: "Get the value for a GS1 AI 39 encodable character set string."
417
- },
418
- validateAI64: {
419
- name: "validateAI64",
420
- description: "Validate a GS1 AI 64 encodable character set string."
421
- },
422
- isValidAI64: {
423
- name: "isValidAI64",
424
- description: "Determine if a string is GS1 AI 64 encodable character set."
425
- },
426
- checkDigit: {
427
- name: "checkDigit",
428
- description: "Calculate the check digit for a numeric string."
429
- },
430
- hasValidCheckDigit: {
431
- name: "hasValidCheckDigit",
432
- description: "Determine if a string has a valid check digit."
433
- },
434
- priceOrWeightCheckDigit: {
435
- name: "priceOrWeightCheckDigit",
436
- description: "Calculate the check digit for a price or weight."
437
- },
438
- isValidPriceOrWeightCheckDigit: {
439
- name: "isValidPriceOrWeightCheckDigit",
440
- description: "Determine if a price or weight check digit is valid."
441
- },
442
- checkCharacterPair: {
443
- name: "checkCharacterPair",
444
- description: "Calculate the check character pair for a GS1 AI 82 encodable character set string."
445
- },
446
- hasValidCheckCharacterPair: {
447
- name: "hasValidCheckCharacterPair",
448
- description: "Determine if a GS1 AI 82 encodable character set string has a valid check character pair."
449
- },
450
- validateGTIN13: {
451
- name: "validateGTIN13",
452
- description: "Validate a GTIN-13."
453
- },
454
- validateGTIN12: {
455
- name: "validateGTIN12",
456
- description: "Validate a GTIN-12."
457
- },
458
- validateGTIN8: {
459
- name: "validateGTIN8",
460
- description: "Validate a GTIN-8."
461
- },
462
- zeroSuppressGTIN12: {
463
- name: "zeroSuppressGTIN12",
464
- description: "Zero-suppress a GTIN-12."
465
- },
466
- zeroExpandGTIN12: {
467
- name: "zeroExpandGTIN12",
468
- description: "Expand a zero-suppressed GTIN-12."
469
- },
470
- convertToGTIN14: {
471
- name: "convertToGTIN14",
472
- description: "Convert a GTIN to GTIN-14."
473
- },
474
- normalizeGTIN: {
475
- name: "normalizeGTIN",
476
- description: "Normalize a GTIN."
477
- },
478
- validateGTIN: {
479
- name: "validateGTIN",
480
- description: "Validate any GTIN."
481
- },
482
- validateGTIN14: {
483
- name: "validateGTIN14",
484
- description: "Validate a GTIN-14."
485
- },
486
- parseVariableMeasureRCN: {
487
- name: "parseVariableMeasureRCN",
488
- description: "Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."
489
- },
490
- validateGLN: {
491
- name: "validateGLN",
492
- description: "Validate a GLN."
493
- },
494
- validateSSCC: {
495
- name: "validateSSCC",
496
- description: "Validate an SSCC."
497
- },
498
- validateGRAI: {
499
- name: "validateGRAI",
500
- description: "Validate a GRAI."
501
- },
502
- validateGIAI: {
503
- name: "validateGIAI",
504
- description: "Validate a GIAI."
505
- },
506
- validateGSRN: {
507
- name: "validateGSRN",
508
- description: "Validate a GSRN."
509
- },
510
- validateGDTI: {
511
- name: "validateGDTI",
512
- description: "Validate a GDTI."
513
- },
514
- validateGINC: {
515
- name: "validateGINC",
516
- description: "Validate a GINC."
517
- },
518
- validateGSIN: {
519
- name: "validateGSIN",
520
- description: "Validate a GSIN."
521
- },
522
- validateGCN: {
523
- name: "validateGCN",
524
- description: "Validate a GCN."
525
- },
526
- validateCPID: {
527
- name: "validateCPID",
528
- description: "Validate a CPID."
529
- },
530
- validateGMN: {
531
- name: "validateGMN",
532
- description: "Validate a GMN."
533
- },
534
- definePrefix: {
535
- name: "definePrefix",
536
- description: "Define a prefix for use in GS1 identifier creation functions."
537
- },
538
- createGTIN: {
539
- name: "createGTIN",
540
- description: "Create a GTIN."
541
- },
542
- createGTINSequence: {
543
- name: "createGTINSequence",
544
- description: "Create a sequence of GTINs."
545
- },
546
- createAllGTIN: {
547
- name: "createAllGTIN",
548
- description: "Create all GTINs for a prefix."
549
- },
550
- createGTIN14: {
551
- name: "createGTIN14",
552
- description: "Create a GTIN-14."
553
- },
554
- createVariableMeasureRCN: {
555
- name: "createVariableMeasureRCN",
556
- description: "Create a variable measure Restricted Circulation Number (RCN)."
557
- },
558
- createGLN: {
559
- name: "createGLN",
560
- description: "Create a GLN."
561
- },
562
- createGLNSequence: {
563
- name: "createGLNSequence",
564
- description: "Create a sequence of GLNs."
565
- },
566
- createAllGLN: {
567
- name: "createAllGLN",
568
- description: "Create all GLNs for a prefix."
569
- },
570
- createSSCC: {
571
- name: "createSSCC",
572
- description: "Create an SSCC."
573
- },
574
- createSSCCSequence: {
575
- name: "createSSCCSequence",
576
- description: "Create a sequence of SSCCs."
577
- },
578
- createAllSSCC: {
579
- name: "createAllSSCC",
580
- description: "Create all SSCCs for a prefix."
581
- },
582
- createGRAI: {
583
- name: "createGRAI",
584
- description: "Create a GRAI."
585
- },
586
- createGRAISequence: {
587
- name: "createGRAISequence",
588
- description: "Create a sequence of GRAIs."
589
- },
590
- createAllGRAI: {
591
- name: "createAllGRAI",
592
- description: "Create all GRAIs for a prefix."
593
- },
594
- createSerializedGRAI: {
595
- name: "createSerializedGRAI",
596
- description: "Create a serialized GRAI."
597
- },
598
- concatenateGRAI: {
599
- name: "concatenateGRAI",
600
- description: "Concatenate a base GRAI with a serial component."
601
- },
602
- createGIAI: {
603
- name: "createGIAI",
604
- description: "Create a GIAI."
605
- },
606
- createGSRN: {
607
- name: "createGSRN",
608
- description: "Create a GSRN."
609
- },
610
- createGSRNSequence: {
611
- name: "createGSRNSequence",
612
- description: "Create a sequence of GSRNs."
613
- },
614
- createAllGSRN: {
615
- name: "createAllGSRN",
616
- description: "Create all GSRNs for a prefix."
617
- },
618
- createGDTI: {
619
- name: "createGDTI",
620
- description: "Create a GDTI."
621
- },
622
- createGDTISequence: {
623
- name: "createGDTISequence",
624
- description: "Create a sequence of GDTIs."
625
- },
626
- createAllGDTI: {
627
- name: "createAllGDTI",
628
- description: "Create all GDTIs for a prefix."
629
- },
630
- createSerializedGDTI: {
631
- name: "createSerializedGDTI",
632
- description: "Create a serialized GDTI."
633
- },
634
- concatenateGDTI: {
635
- name: "concatenateGDTI",
636
- description: "Concatenate a base GDTI with a serial component."
637
- },
638
- createGINC: {
639
- name: "createGINC",
640
- description: "Create a GINC."
641
- },
642
- createGSIN: {
643
- name: "createGSIN",
644
- description: "Create a GSIN."
645
- },
646
- createGSINSequence: {
647
- name: "createGSINSequence",
648
- description: "Create a sequence of GSINs."
649
- },
650
- createAllGSIN: {
651
- name: "createAllGSIN",
652
- description: "Create all GSINs for a prefix."
653
- },
654
- createGCN: {
655
- name: "createGCN",
656
- description: "Create a GCN."
657
- },
658
- createGCNSequence: {
659
- name: "createGCNSequence",
660
- description: "Create a sequence of GCNs."
661
- },
662
- createAllGCN: {
663
- name: "createAllGCN",
664
- description: "Create all GCNs for a prefix."
665
- },
666
- createSerializedGCN: {
667
- name: "createSerializedGCN",
668
- description: "Create a serialized GCN."
669
- },
670
- concatenateGCN: {
671
- name: "concatenateGCN",
672
- description: "Concatenate a base GCN with a serial component."
673
- },
674
- createCPID: {
675
- name: "createCPID",
676
- description: "Create a CPID."
677
- },
678
- createGMN: {
679
- name: "createGMN",
680
- description: "Create a GMN."
681
- }
682
- }
683
- }
684
- };
685
-
686
- // src/locale/fr/locale-resources.ts
687
- var locale_resources_default2 = {
688
- AppExtension: {
689
- sequenceCountMustBeLessThanOrEqualTo: "Le nombre de s\xE9quences {{sequenceCount, number}} doit \xEAtre inf\xE9rieur ou \xE9gal \xE0 {{maximumSequenceCount, number}}"
690
- },
691
- Proxy: {
692
- vSpillMustBeHorizontalArray: "L'entr\xE9e doit \xEAtre un tableau horizontal",
693
- hSpillMustBeVerticalArray: "L'entr\xE9e doit \xEAtre un tableau vertical",
694
- matrixMustBeArray: "L'entr\xE9e doit \xEAtre un tableau unidimensionnel"
695
- },
696
- IdentifierCreatorProxy: {
697
- prefixDefinitionMustBeOneDimensional: "La d\xE9finition du pr\xE9fixe doit \xEAtre une matrice unidimensionnelle",
698
- prefixDefinitionMustHaveMaximumThreeElements: "La d\xE9finition du pr\xE9fixe doit comporter un maximum de 3 \xE9l\xE9ments",
699
- prefixMustBeString: "Le pr\xE9fixe doit \xEAtre une cha\xEEne",
700
- prefixTypeMustBeNumber: "Le type de pr\xE9fixe doit \xEAtre un nombre compris entre 0 et {{maximumPrefixType, number}}",
701
- invalidPrefixType: "Type de pr\xE9fixe invalide",
702
- tweakFactorMustBeNumber: "Le facteur de r\xE9glage doit \xEAtre un nombre"
703
- },
704
- Parameters: {
705
- spillMatrix: {
706
- name: "matrice",
707
- description: "Matrice unidimensionnelle \xE0 renverser."
708
- },
709
- spillMaximumWidth: {
710
- name: "largeurMaximale",
711
- description: "Largeur maximale dans laquelle d\xE9verser la matrice. Si non fournie, la largeur restante est utilis\xE9e."
712
- },
713
- spillMaximumHeight: {
714
- name: "hauteurMaximale",
715
- description: "Hauteur maximale dans laquelle d\xE9verser la matrice. Si non fournie, la hauteur restante est utilis\xE9e."
716
- },
717
- domain: {
718
- name: "domaine",
719
- description: "Domaine de transformation. Les valeurs d'entr\xE9e valides vont de z\xE9ro au domaine-1."
720
- },
721
- value: {
722
- name: "valeur",
723
- description: "Valeur \xE0 transformer."
724
- },
725
- startValue: {
726
- name: "valeurInitiale",
727
- description: "Valeur de d\xE9part d'un domaine de valeurs \xE0 transformer."
728
- },
729
- count: {
730
- name: "compte",
731
- description: "Nombre de valeurs \xE0 transformer. Si positive, les valeurs transform\xE9es vont de valeurInitiale ascendante \xE0 valeurInitiale+compte-1. Si n\xE9gative, les valeurs transform\xE9es vont de valeurInitiale descendant \xE0 valeurInitiale+compte+1."
732
- },
733
- transformedValue: {
734
- name: "valeurTransformee",
735
- description: "Valeur de sortie pr\xE9c\xE9dente d'une transformation."
736
- },
737
- tweak: {
738
- name: "reglage",
739
- description: "Valeur par laquelle r\xE9glager la transformation. Si non fourni ou nul, la sortie est s\xE9quentielle. Sinon, la sortie est crypt\xE9e de mani\xE8re \xE0 para\xEEtre al\xE9atoire, masquant les valeurs utilis\xE9es comme entr\xE9es de la s\xE9quence."
740
- },
741
- regExp: {
742
- name: "expReg",
743
- description: "Expression r\xE9guli\xE8re par rapport \xE0 laquelle valider une cha\xEEne."
744
- },
745
- validateS: {
746
- name: "c",
747
- description: "Cha\xEEne \xE0 valider."
748
- },
749
- valueForS: {
750
- name: "c",
751
- description: "Cha\xEEne pour laquelle d\xE9terminer la valeur."
752
- },
753
- errorMessage: {
754
- name: "messageDErreur",
755
- description: "Message d'erreur personnalis\xE9 \xE0 utiliser si la validation \xE9choue. S'il n'est pas fourni, un message d'erreur interne est utilis\xE9."
756
- },
757
- exclusionNone: {
758
- name: "exclusion",
759
- description: "Valeurs de cha\xEEne \xE0 exclure. La seule valeur valide est 0 (aucune exclusion)."
760
- },
761
- exclusionFirstZero: {
762
- name: "exclusion",
763
- description: "Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont 0 (aucune exclusion) et 1 (cha\xEEnes commen\xE7ant par 0 exclues)."
764
- },
765
- exclusionAllNumeric: {
766
- name: "exclusion",
767
- description: "Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont 0 (aucune exclusion) et 2 (cha\xEEnes enti\xE8rement num\xE9riques exclues)."
768
- },
769
- exclusionAny: {
770
- name: "exclusion",
771
- description: "Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont 0 (aucune exclusion), 1 (cha\xEEnes commen\xE7ant par 0 exclues) et 2 (cha\xEEnes toutes num\xE9riques exclues)."
772
- },
773
- length: {
774
- name: "longueur",
775
- description: "Longueur de cha\xEEne \xE0 cr\xE9er."
776
- },
777
- numericS: {
778
- name: "c",
779
- description: "Cha\xEEne num\xE9rique."
780
- },
781
- numericSFourOrFiveDigits: {
782
- name: "c",
783
- description: "Cha\xEEne num\xE9rique \xE0 quatre ou cinq chiffres."
784
- },
785
- numericSWithCheckDigit: {
786
- name: "c",
787
- description: "Cha\xEEne num\xE9rique avec chiffre de contr\xF4le."
788
- },
789
- checkDigit: {
790
- name: "chiffreDeControle",
791
- description: "Chiffre de contr\xF4le."
792
- },
793
- ai82S: {
794
- name: "c",
795
- description: "Cha\xEEne de caract\xE8res GS1 AI 82."
796
- },
797
- ai82SWithCheckCharacterPair: {
798
- name: "c",
799
- description: "Cha\xEEne de caract\xE8res GS1 AI 82 avec paire de caract\xE8res de contr\xF4le."
800
- },
801
- validateIdentifier: {
802
- name: "cleDIdentification",
803
- description: "Cl\xE9 d'identification \xE0 valider."
804
- },
805
- zeroSuppressibleGTIN12: {
806
- name: "gtin12",
807
- description: "GTIN-12 pour lequel supprimer les z\xE9ros."
808
- },
809
- zeroSuppressedGTIN12: {
810
- name: "gtin12SupprimeAZero",
811
- description: "GTIN-12 supprim\xE9 \xE0 z\xE9ro pour s'\xE9tendre."
812
- },
813
- convertGTIN: {
814
- name: "gtin",
815
- description: "GTIN \xE0 convertir en GTIN-14."
816
- },
817
- normalizeGTIN: {
818
- name: "gtin",
819
- description: "GTIN \xE0 normaliser."
820
- },
821
- validateGTIN: {
822
- name: "gtin",
823
- description: "GTIN \xE0 valider."
824
- },
825
- validateGTIN14: {
826
- name: "gtin14",
827
- description: "GTIN-14 \xE0 valider."
828
- },
829
- baseIdentifier: {
830
- name: "cleDIdentificationDeBase",
831
- description: "Cl\xE9 d'identification de base."
832
- },
833
- indicatorDigit: {
834
- name: "indicatorDigit",
835
- description: "Chiffre indicateur."
836
- },
837
- gtinLevel: {
838
- name: "niveau",
839
- description: "Niveau auquel valider le GTIN. Les valeurs valides sont 0 (n'importe lequel), 1 (article commercial de consommation au d\xE9tail) et 2 (autre que le niveau de l'article commercial de consommation au d\xE9tail)."
840
- },
841
- rcnFormat: {
842
- name: "format",
843
- description: "Format de num\xE9ro de diffusion restreinte."
844
- },
845
- rcn: {
846
- name: "rcn",
847
- description: "Num\xE9ro de diffusion restreint \xE0 analyser."
848
- },
849
- prefix: {
850
- name: "prefixe",
851
- description: "Pr\xE9fixe."
852
- },
853
- prefixType: {
854
- name: "typeDePr\xE9fixe",
855
- description: "Type de pr\xE9fixe. Les valeurs valides sont 0 (pr\xE9fixe d'entreprise GS1), 1 (pr\xE9fixe d'entreprise U.P.C.) et 2 (pr\xE9fixe GS1)."
856
- },
857
- tweakFactor: {
858
- name: "facteurDeReglage",
859
- description: "Facteur de r\xE9glage, utilis\xE9 pour prendre en charge la cr\xE9ation de cl\xE9s d'identification \xE9parses. Le facteur de r\xE9glage par d\xE9faut est bas\xE9 sur le pr\xE9fixe d'entreprise GS1 et est g\xE9n\xE9ralement suffisant pour l'obscurcissement. Cela permet un meilleur contr\xF4le du cryptage lorsqu'une s\xE9curit\xE9 plus \xE9lev\xE9e est requise."
860
- },
861
- prefixDefinitionAny: {
862
- name: "prefixeDefinition",
863
- description: "D\xE9finition de pr\xE9fixe, soit un pr\xE9fixe d'entreprise simple GS1 (sous forme de cha\xEEne), soit le r\xE9sultat d'un appel \xE0 definePrefix. Tout type de pr\xE9fixe est pris en charge."
864
- },
865
- prefixDefinitionGS1UPC: {
866
- name: "prefixeDefinition",
867
- description: "D\xE9finition de pr\xE9fixe, soit un pr\xE9fixe d'entreprise simple GS1 (sous forme de cha\xEEne), soit le r\xE9sultat d'un appel \xE0 definePrefix. Seuls les types de pr\xE9fixes 0 (pr\xE9fixe d'entreprise GS1) et 1 (pr\xE9fixe d'entreprise U.P.C.) sont pris en charge."
868
- },
869
- sparse: {
870
- name: "clairsemee",
871
- description: "Si cette valeur est vraie, la valeur est mapp\xE9e sur une s\xE9quence clairsem\xE9e r\xE9sistante \xE0 la d\xE9couverte. La valeur par d\xE9faut est faux."
872
- },
873
- rcnItemReference: {
874
- name: "referenceDArticle",
875
- description: "R\xE9f\xE9rence d'article."
876
- },
877
- rcnPriceOrWeight: {
878
- name: "prixOuPoids",
879
- description: "Prix ou poids (nombre entier uniquement)."
880
- },
881
- serialComponent: {
882
- name: "composanteSerie",
883
- description: "Composante s\xE9rie."
884
- },
885
- reference: {
886
- name: "reference",
887
- description: "Partie de r\xE9f\xE9rence de la cl\xE9 d'identification."
888
- }
889
- },
890
- Functions: {
891
- version: {
892
- name: "version",
893
- description: "Obtener la version de la bo\xEEte \xE0 outils AIDC."
894
- },
895
- vSpill: {
896
- name: "vDeverser",
897
- description: "D\xE9verser un tableau horizontal verticalement pour l'adapter \xE0 une largeur et une hauteur maximales donn\xE9es."
898
- },
899
- hSpill: {
900
- name: "hDeverser",
901
- description: "D\xE9verser un tableau vertical horizontalement pour l'adapter \xE0 une hauteur et une largeur maximales donn\xE9es."
902
- },
903
- forwardTransform: {
904
- name: "transformerAvant",
905
- description: "Transformer une valeur en avant."
906
- },
907
- forwardTransformSequence: {
908
- name: "transformerSequenceAvant",
909
- description: "Transformer une s\xE9quence de valeurs en avant."
910
- },
911
- reverseTransform: {
912
- name: "transformerArriere",
913
- description: "Transformer une valeur en arri\xE8re."
914
- },
915
- validateRegExp: {
916
- name: "validerExpReg",
917
- description: "Valider une cha\xEEne par rapport \xE0 une expression r\xE9guli\xE8re."
918
- },
919
- isValidRegExp: {
920
- name: "estValideExpReg",
921
- description: "D\xE9terminer si une cha\xEEne est valide par rapport \xE0 une expression r\xE9guli\xE8re."
922
- },
923
- validateNumeric: {
924
- name: "validerNumerique",
925
- description: "Valider une cha\xEEne num\xE9rique."
926
- },
927
- isValidNumeric: {
928
- name: "estValideNumerique",
929
- description: "D\xE9terminer si une cha\xEEne est num\xE9rique."
930
- },
931
- createNumeric: {
932
- name: "creerNumerique",
933
- description: "Cr\xE9er une cha\xEEne num\xE9rique."
934
- },
935
- createNumericSequence: {
936
- name: "creerSequenceNumerique",
937
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes num\xE9riques."
938
- },
939
- valueForNumeric: {
940
- name: "valeurDeNumerique",
941
- description: "Obtenir la valeur d'une cha\xEEne num\xE9rique."
942
- },
943
- validateHexadecimal: {
944
- name: "validerHexadecimale",
945
- description: "Valider une cha\xEEne hexad\xE9cimale."
946
- },
947
- isValidHexadecimal: {
948
- name: "estValideHexadecimale",
949
- description: "D\xE9terminer si une cha\xEEne est hexad\xE9cimale."
950
- },
951
- createHexadecimal: {
952
- name: "creerHexadecimale",
953
- description: "Cr\xE9er une cha\xEEne hexad\xE9cimale."
954
- },
955
- createHexadecimalSequence: {
956
- name: "creerSequenceHexadecimale",
957
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes hexad\xE9cimales."
958
- },
959
- valueForHexadecimal: {
960
- name: "valeurDeHexadecimale",
961
- description: "Obtenir la valeur d'une cha\xEEne hexad\xE9cimale."
962
- },
963
- validateAlphabetic: {
964
- name: "validerAlphabetique",
965
- description: "Valider une cha\xEEne alphab\xE9tique."
966
- },
967
- isValidAlphabetic: {
968
- name: "estValideAlphabetique",
969
- description: "D\xE9terminer si une cha\xEEne est alphab\xE9tique."
970
- },
971
- createAlphabetic: {
972
- name: "creerAlphabetique",
973
- description: "Cr\xE9er une cha\xEEne alphab\xE9tique."
974
- },
975
- createAlphabeticSequence: {
976
- name: "creerSequenceAlphabetique",
977
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes alphab\xE9tiques."
978
- },
979
- valueForAlphabetic: {
980
- name: "valeurDeAlphabetique",
981
- description: "Obtenir la valeur d'une cha\xEEne alphab\xE9tique."
982
- },
983
- validateAlphanumeric: {
984
- name: "validerAlphanumerique",
985
- description: "Valider une cha\xEEne alphanum\xE9rique."
986
- },
987
- isValidAlphanumeric: {
988
- name: "estValideAlphanumerique",
989
- description: "D\xE9terminer si une cha\xEEne est alphanum\xE9rique."
990
- },
991
- createAlphanumeric: {
992
- name: "creerAlphanumerique",
993
- description: "Cr\xE9er une cha\xEEne alphanum\xE9rique."
994
- },
995
- createAlphanumericSequence: {
996
- name: "creerSequenceAlphanumerique",
997
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes alphanum\xE9riques."
998
- },
999
- valueForAlphanumeric: {
1000
- name: "valeurDeAlphanumerique",
1001
- description: "Obtenir la valeur d'une cha\xEEne alphanum\xE9rique."
1002
- },
1003
- GS1: {
1004
- validateAI82: {
1005
- name: "validerAI82",
1006
- description: "Valider une cha\xEEne de caract\xE8res GS1 AI 82."
1007
- },
1008
- isValidAI82: {
1009
- name: "estValideAI82",
1010
- description: "D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 82."
1011
- },
1012
- createAI82: {
1013
- name: "creerAI82",
1014
- description: "Cr\xE9er une cha\xEEne de caract\xE8res GS1 AI 82."
1015
- },
1016
- createAI82Sequence: {
1017
- name: "creerSequenceAI82",
1018
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes de caract\xE8res GS1 AI 82."
1019
- },
1020
- valueForAI82: {
1021
- name: "valeurDeAI82",
1022
- description: "Obtenez la valeur d'une cha\xEEne de caract\xE8res GS1 AI 82."
1023
- },
1024
- validateAI39: {
1025
- name: "validerAI39",
1026
- description: "Valider une cha\xEEne de caract\xE8res GS1 AI 39."
1027
- },
1028
- isValidAI39: {
1029
- name: "estValideAI39",
1030
- description: "D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 39."
1031
- },
1032
- createAI39: {
1033
- name: "creerAI39",
1034
- description: "Cr\xE9er une cha\xEEne de caract\xE8res GS1 AI 39."
1035
- },
1036
- createAI39Sequence: {
1037
- name: "creerSequenceAI39",
1038
- description: "Cr\xE9er une s\xE9quence de cha\xEEnes de caract\xE8res GS1 AI 39."
1039
- },
1040
- valueForAI39: {
1041
- name: "valeurDeAI39",
1042
- description: "Obtenez la valeur d'une cha\xEEne de caract\xE8res GS1 AI 39."
1043
- },
1044
- validateAI64: {
1045
- name: "validerAI64",
1046
- description: "Valider une cha\xEEne de caract\xE8res GS1 AI 64."
1047
- },
1048
- isValidAI64: {
1049
- name: "estValideAI64",
1050
- description: "D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 64."
1051
- },
1052
- checkDigit: {
1053
- name: "chiffreDeControle",
1054
- description: "Calculer le chiffre de contr\xF4le pour une cha\xEEne num\xE9rique."
1055
- },
1056
- hasValidCheckDigit: {
1057
- name: "aChiffreDeControleValide",
1058
- description: "D\xE9terminer si une cha\xEEne a un chiffre de contr\xF4le valide."
1059
- },
1060
- priceOrWeightCheckDigit: {
1061
- name: "chiffreDeControlePrixOuPoids",
1062
- description: "Calculer le chiffre de contr\xF4le pour un prix ou un poids."
1063
- },
1064
- isValidPriceOrWeightCheckDigit: {
1065
- name: "estChiffreDeControlePrixOuPoidsValide",
1066
- description: "D\xE9terminer si un chiffre de contr\xF4le de prix ou de poids est valide."
1067
- },
1068
- checkCharacterPair: {
1069
- name: "paireDeCaracteresDeControle",
1070
- description: "Calculer la paire de caract\xE8res de contr\xF4le pour une cha\xEEne de caract\xE8res."
1071
- },
1072
- hasValidCheckCharacterPair: {
1073
- name: "aPaireDeCaracteresDeControleValide",
1074
- description: "D\xE9terminez si une cha\xEEne de caract\xE8res GS1 AI 82 a une paire de caract\xE8res de contr\xF4le valide."
1075
- },
1076
- validateGTIN13: {
1077
- name: "validerGTIN13",
1078
- description: "Valider un GTIN-13."
1079
- },
1080
- validateGTIN12: {
1081
- name: "validerGTIN12",
1082
- description: "Valider un GTIN-12."
1083
- },
1084
- validateGTIN8: {
1085
- name: "validerGTIN8",
1086
- description: "Valider un GTIN-8."
1087
- },
1088
- zeroSuppressGTIN12: {
1089
- name: "supprimerZeroGTIN12",
1090
- description: "Supprimer les z\xE9ros d'un GTIN-12."
1091
- },
1092
- zeroExpandGTIN12: {
1093
- name: "etendrerZeroGTIN12",
1094
- description: "\xC9tendrer un GTIN-12 supprim\xE9 \xE0 z\xE9ro."
1095
- },
1096
- convertToGTIN14: {
1097
- name: "convertirEnGTIN14",
1098
- description: "Convertir un GTIN en GTIN-14."
1099
- },
1100
- normalizeGTIN: {
1101
- name: "normalizeGTIN",
1102
- description: "Normaliser un GTIN."
1103
- },
1104
- validateGTIN: {
1105
- name: "validerGTIN",
1106
- description: "Validez n'importe quel GTIN."
1107
- },
1108
- validateGTIN14: {
1109
- name: "validerGTIN14",
1110
- description: "Valider un GTIN-14."
1111
- },
1112
- parseVariableMeasureRCN: {
1113
- name: "parseVariableMeasureRCN",
1114
- description: "Analyser un num\xE9ro de diffusion restreinte (RCN) \xE0 l'aide d'un format d'article commercial \xE0 mesure variable."
1115
- },
1116
- validateGLN: {
1117
- name: "validerGLN",
1118
- description: "Valider un GLN."
1119
- },
1120
- validateSSCC: {
1121
- name: "validerSSCC",
1122
- description: "Valider un SSCC."
1123
- },
1124
- validateGRAI: {
1125
- name: "validerGRAI",
1126
- description: "Valider un GRAI."
1127
- },
1128
- validateGIAI: {
1129
- name: "validerGIAI",
1130
- description: "Valider un GIAI."
1131
- },
1132
- validateGSRN: {
1133
- name: "validerGSRN",
1134
- description: "Valider un GSRN."
1135
- },
1136
- validateGDTI: {
1137
- name: "validerGDTI",
1138
- description: "Valider un GDTI."
1139
- },
1140
- validateGINC: {
1141
- name: "validerGINC",
1142
- description: "Valider un GINC."
1143
- },
1144
- validateGSIN: {
1145
- name: "validerGSIN",
1146
- description: "Valider un GSIN."
1147
- },
1148
- validateGCN: {
1149
- name: "validerGCN",
1150
- description: "Valider un GCN."
1151
- },
1152
- validateCPID: {
1153
- name: "validerCPID",
1154
- description: "Valider un CPID."
1155
- },
1156
- validateGMN: {
1157
- name: "validerGMN",
1158
- description: "Valider un GMN."
1159
- },
1160
- definePrefix: {
1161
- name: "definisserPrefixe",
1162
- description: "D\xE9finisser un pr\xE9fixe \xE0 utiliser dans les fonctions de cr\xE9ation de cl\xE9 d'identification GS1."
1163
- },
1164
- createGTIN: {
1165
- name: "creerGTIN",
1166
- description: "Cr\xE9er un GTIN."
1167
- },
1168
- createGTINSequence: {
1169
- name: "creerSequenceGTIN",
1170
- description: "Cr\xE9er un s\xE9quence de GTIN."
1171
- },
1172
- createAllGTIN: {
1173
- name: "creerTousGTIN",
1174
- description: "Cr\xE9ez tous les GTIN pour un pr\xE9fixe."
1175
- },
1176
- createGTIN14: {
1177
- name: "creerGTIN14",
1178
- description: "Cr\xE9er un GTIN-14."
1179
- },
1180
- createVariableMeasureRCN: {
1181
- name: "creerMesureVariableRCN",
1182
- description: "Cr\xE9er un num\xE9ro de diffusion restreinte (RCN) \xE0 l'aide d'un format d'article commercial \xE0 mesure variable."
1183
- },
1184
- createGLN: {
1185
- name: "creerGLN",
1186
- description: "Cr\xE9er un GLN."
1187
- },
1188
- createGLNSequence: {
1189
- name: "creerSequenceGLN",
1190
- description: "Cr\xE9er un s\xE9quence de GLN."
1191
- },
1192
- createAllGLN: {
1193
- name: "creerTousGLN",
1194
- description: "Cr\xE9ez tous les GLN pour un pr\xE9fixe."
1195
- },
1196
- createSSCC: {
1197
- name: "creerSSCC",
1198
- description: "Cr\xE9er un SSCC."
1199
- },
1200
- createSSCCSequence: {
1201
- name: "creerSequenceSSCC",
1202
- description: "Cr\xE9er un s\xE9quence de SSCC."
1203
- },
1204
- createAllSSCC: {
1205
- name: "creerTousSSCC",
1206
- description: "Cr\xE9ez tous les SSCC pour un pr\xE9fixe."
1207
- },
1208
- createGRAI: {
1209
- name: "creerGRAI",
1210
- description: "Cr\xE9er un GRAI."
1211
- },
1212
- createGRAISequence: {
1213
- name: "creerSequenceGRAI",
1214
- description: "Cr\xE9er un s\xE9quence de GRAI."
1215
- },
1216
- createAllGRAI: {
1217
- name: "creerTousGRAI",
1218
- description: "Cr\xE9ez tous les GRAI pour un pr\xE9fixe."
1219
- },
1220
- createSerializedGRAI: {
1221
- name: "creerGRAISerialise",
1222
- description: "Cr\xE9er un GRAI s\xE9rialis\xE9."
1223
- },
1224
- concatenateGRAI: {
1225
- name: "concatenerGRAI",
1226
- description: "Concat\xE9ner une base GRAI avec un composant s\xE9rie."
1227
- },
1228
- createGIAI: {
1229
- name: "creerGIAI",
1230
- description: "Cr\xE9er un GIAI."
1231
- },
1232
- createGSRN: {
1233
- name: "creerGSRN",
1234
- description: "Cr\xE9er un GSRN."
1235
- },
1236
- createGSRNSequence: {
1237
- name: "creerSequenceGSRN",
1238
- description: "Cr\xE9er un s\xE9quence de GSRN."
1239
- },
1240
- createAllGSRN: {
1241
- name: "creerTousGSRN",
1242
- description: "Cr\xE9ez tous les GSRN pour un pr\xE9fixe."
1243
- },
1244
- createGDTI: {
1245
- name: "creerGDTI",
1246
- description: "Cr\xE9er un GDTI."
1247
- },
1248
- createGDTISequence: {
1249
- name: "creerSequenceGDTI",
1250
- description: "Cr\xE9er un s\xE9quence de GDTI."
1251
- },
1252
- createAllGDTI: {
1253
- name: "creerTousGDTI",
1254
- description: "Cr\xE9ez tous les GDTI pour un pr\xE9fixe."
1255
- },
1256
- createSerializedGDTI: {
1257
- name: "creerGDTISerialise",
1258
- description: "Cr\xE9er un GDTI s\xE9rialis\xE9."
1259
- },
1260
- concatenateGDTI: {
1261
- name: "concatenerGDTI",
1262
- description: "Concat\xE9ner une base GDTI avec un composant s\xE9rie."
1263
- },
1264
- createGINC: {
1265
- name: "creerGINC",
1266
- description: "Cr\xE9er un GINC."
1267
- },
1268
- createGSIN: {
1269
- name: "creerGSIN",
1270
- description: "Cr\xE9er un GSIN."
1271
- },
1272
- createGSINSequence: {
1273
- name: "creerSequenceGSIN",
1274
- description: "Cr\xE9er un s\xE9quence de GSIN."
1275
- },
1276
- createAllGSIN: {
1277
- name: "creerTousGSIN",
1278
- description: "Cr\xE9ez tous les GSIN pour un pr\xE9fixe."
1279
- },
1280
- createGCN: {
1281
- name: "creerGCN",
1282
- description: "Cr\xE9er un GCN."
1283
- },
1284
- createGCNSequence: {
1285
- name: "creerSequenceGCN",
1286
- description: "Cr\xE9er un s\xE9quence de GCN."
1287
- },
1288
- createAllGCN: {
1289
- name: "creerTousGCN",
1290
- description: "Cr\xE9ez tous les GCN pour un pr\xE9fixe."
1291
- },
1292
- createSerializedGCN: {
1293
- name: "creerGCNSerialise",
1294
- description: "Cr\xE9er un GCN s\xE9rialis\xE9."
1295
- },
1296
- concatenateGCN: {
1297
- name: "concatenerGCN",
1298
- description: "Concat\xE9ner une base GCN avec un composant s\xE9rie."
1299
- },
1300
- createCPID: {
1301
- name: "creerCPID",
1302
- description: "Cr\xE9er un CPID."
1303
- },
1304
- createGMN: {
1305
- name: "creerGMN",
1306
- description: "Cr\xE9er un GMN."
1307
- }
1308
- }
1309
- }
1310
- };
1311
-
1312
- // src/locale/i18n.ts
1313
- var appExtensionNS = "aidct_app_extension";
1314
- var appExtensionResources = {
1315
- en: {
1316
- aidct_app_extension: locale_resources_default
1317
- },
1318
- fr: {
1319
- aidct_app_extension: locale_resources_default2
1320
- }
1321
- };
1322
- var i18nextAppExtension = i18next.createInstance();
1323
- async function i18nAppExtensionInit(environment, debug = false) {
1324
- await i18nUtilityInit(environment, debug);
1325
- await i18nGS1Init(environment, debug);
1326
- await i18nCoreInit(i18nextAppExtension, environment, debug, appExtensionNS, utilityResources, gs1Resources, appExtensionResources);
1327
- }
1328
-
1329
- // src/app-extension.ts
1330
- var AppExtension = class {
1331
- /**
1332
- * Application version.
1333
- */
1334
- #version;
1335
- /**
1336
- * Maximum sequence count supported by application.
1337
- */
1338
- #maximumSequenceCount;
1339
- /**
1340
- * If true, errors are reported through the throw/catch mechanism.
1341
- */
1342
- #throwError;
1343
- /**
1344
- * Maximum width supported by application.
1345
- */
1346
- #maximumWidth;
1347
- /**
1348
- * Maximum height supported by application.
1349
- */
1350
- #maximumHeight;
1351
- /**
1352
- * Constructor.
1353
- *
1354
- * @param version
1355
- * Application version.
1356
- *
1357
- * @param maximumSequenceCount
1358
- * Maximum sequence count supported by application.
1359
- *
1360
- * @param throwError
1361
- * If true, errors are reported through the throw/catch mechanism.
1362
- */
1363
- constructor(version, maximumSequenceCount, throwError) {
1364
- this.#version = version;
1365
- this.#maximumSequenceCount = maximumSequenceCount;
1366
- this.#throwError = throwError;
1367
- }
1368
- /**
1369
- * Get the version.
1370
- *
1371
- * @returns
1372
- * Version.
1373
- */
1374
- get version() {
1375
- return this.#version;
1376
- }
1377
- /**
1378
- * Determine if errors are reported through the throw/catch mechanism.
1379
- */
1380
- get throwError() {
1381
- return this.#throwError;
1382
- }
1383
- /**
1384
- * Get the maximum width supported by the application.
1385
- *
1386
- * @returns
1387
- * Maximum width supported by the application.
1388
- */
1389
- async maximumWidth() {
1390
- this.#maximumWidth ??= await this.getMaximumWidth();
1391
- return this.#maximumWidth;
1392
- }
1393
- /**
1394
- * Get the maximum height supported by the application.
1395
- *
1396
- * @returns
1397
- * Maximum height supported by the application.
1398
- */
1399
- async maximumHeight() {
1400
- this.#maximumHeight ??= await this.getMaximumHeight();
1401
- return this.#maximumHeight;
1402
- }
1403
- /**
1404
- * Validate a sequence count against the maximum supported by application.
1405
- *
1406
- * @param sequenceCount
1407
- * Sequence count.
1408
- */
1409
- validateSequenceCount(sequenceCount) {
1410
- const absoluteSequenceCount = Math.abs(sequenceCount);
1411
- if (absoluteSequenceCount > this.#maximumSequenceCount) {
1412
- throw new RangeError(i18nextAppExtension.t("AppExtension.sequenceCountMustBeLessThanOrEqualTo", {
1413
- sequenceCount: absoluteSequenceCount,
1414
- maximumSequenceCount: this.#maximumSequenceCount
1415
- }));
1416
- }
1417
- }
1418
- /**
1419
- * Bind a synchronous method and wrap it in a try/catch for comprehensive error handling.
1420
- *
1421
- * @template TMethod
1422
- * Method type.
1423
- *
1424
- * @param thisArg
1425
- * The value to be passed as the `this` parameter to the method.
1426
- *
1427
- * @param method
1428
- * Method to call.
1429
- *
1430
- * @returns
1431
- * Function wrapped around the method.
1432
- */
1433
- bindSync(thisArg, method) {
1434
- const boundMethod = method.bind(thisArg);
1435
- return (...args) => {
1436
- try {
1437
- return boundMethod(...args);
1438
- } catch (e) {
1439
- console.error(e);
1440
- this.handleError(e instanceof Error ? e.message : String(e));
1441
- }
1442
- };
1443
- }
1444
- /**
1445
- * Bind an asynchronous method and wrap it in a try/catch for comprehensive error handling.
1446
- *
1447
- * @template TMethod
1448
- * Method type.
1449
- *
1450
- * @param thisArg
1451
- * The value to be passed as the `this` parameter to the method.
1452
- *
1453
- * @param method
1454
- * Method to call.
1455
- *
1456
- * @returns
1457
- * Function wrapped around the method.
1458
- */
1459
- bindAsync(thisArg, method) {
1460
- const boundMethod = method.bind(thisArg);
1461
- return async (...args) => await boundMethod(...args).catch((e) => {
1462
- console.error(e);
1463
- this.handleError(e instanceof Error ? e.message : String(e));
1464
- });
1465
- }
1466
- };
1467
-
1468
- // src/lib-proxy.ts
1469
- import { mapIterable } from "@aidc-toolkit/utility";
1470
- var LibProxy = class {
1471
- /**
1472
- * Application extension.
1473
- */
1474
- #appExtension;
1475
- /**
1476
- * Constructor.
1477
- *
1478
- * @param appExtension
1479
- * Application extension.
1480
- */
1481
- constructor(appExtension) {
1482
- this.#appExtension = appExtension;
1483
- }
1484
- /**
1485
- * Get the application extension.
1486
- */
1487
- get appExtension() {
1488
- return this.#appExtension;
1489
- }
1490
- /**
1491
- * Map big integer to another type if necessary.
1492
- *
1493
- * @param value
1494
- * Big integer value to map.
1495
- *
1496
- * @returns
1497
- * Mapped big integer value.
1498
- */
1499
- mapBigInt(value) {
1500
- return this.#appExtension.mapBigInt(value);
1501
- }
1502
- /**
1503
- * Handle an error thrown by a function call.
1504
- *
1505
- * @param e
1506
- * Error.
1507
- *
1508
- * @returns
1509
- * Error if errors are not thrown.
1510
- */
1511
- #handleError(e) {
1512
- let result;
1513
- if (e instanceof RangeError) {
1514
- const error = this.#appExtension.mapRangeError(e);
1515
- if (this.#appExtension.throwError) {
1516
- throw error;
1517
- }
1518
- result = error;
1519
- } else {
1520
- throw e;
1521
- }
1522
- return result;
1523
- }
1524
- /**
1525
- * Do the callback for a simple return.
1526
- *
1527
- * @param value
1528
- * Value.
1529
- *
1530
- * @param callback
1531
- * Callback.
1532
- *
1533
- * @returns
1534
- * Callback result or error if errors are not thrown.
1535
- */
1536
- #doCallback(value, callback) {
1537
- let result;
1538
- try {
1539
- result = callback(value);
1540
- } catch (e) {
1541
- result = this.#handleError(e);
1542
- }
1543
- return result;
1544
- }
1545
- /**
1546
- * Map a matrix of values using a callback.
1547
- *
1548
- * @param matrixValues
1549
- * Matrix of values.
1550
- *
1551
- * @param callback
1552
- * Callback.
1553
- *
1554
- * @returns
1555
- * Matrix of callback results and errors if errors are not thrown.
1556
- */
1557
- mapMatrix(matrixValues, callback) {
1558
- return matrixValues.map((rowValues) => rowValues.map((value) => this.#doCallback(value, callback)));
1559
- }
1560
- /**
1561
- * Do the callback for an array return.
1562
- *
1563
- * @param value
1564
- * Value.
1565
- *
1566
- * @param callback
1567
- * Callback.
1568
- *
1569
- * @returns
1570
- * Callback result or error as array if errors are not thrown.
1571
- */
1572
- #doArrayCallback(value, callback) {
1573
- const result = this.#doCallback(value, callback);
1574
- return result instanceof Array ? result : [result];
1575
- }
1576
- /**
1577
- * Map a one-dimensional matrix of values using a callback.
1578
- *
1579
- * @param matrixValues
1580
- * Matrix of values.
1581
- *
1582
- * @param callback
1583
- * Callback.
1584
- *
1585
- * @returns
1586
- * Matrix of callback results and errors if errors are not thrown.
1587
- */
1588
- mapArray(matrixValues, callback) {
1589
- let matrixResultError;
1590
- if (matrixValues.length === 0) {
1591
- matrixResultError = [[]];
1592
- } else if (matrixValues.length === 1) {
1593
- matrixResultError = [];
1594
- matrixValues[0].forEach((value, columnIndex) => {
1595
- const arrayResultError = this.#doArrayCallback(value, callback);
1596
- arrayResultError.forEach((resultError, rowIndex) => {
1597
- if (matrixResultError.length <= rowIndex) {
1598
- matrixResultError.push([]);
1599
- }
1600
- matrixResultError[rowIndex][columnIndex] = resultError;
1601
- });
1602
- });
1603
- } else {
1604
- matrixResultError = matrixValues.map((rowValue) => {
1605
- let arrayResultError;
1606
- if (rowValue.length === 0) {
1607
- arrayResultError = [];
1608
- } else if (rowValue.length === 1) {
1609
- arrayResultError = this.#doArrayCallback(rowValue[0], callback);
1610
- } else {
1611
- arrayResultError = [this.#handleError(new RangeError(i18nextAppExtension.t("Proxy.matrixMustBeArray")))];
1612
- }
1613
- return arrayResultError;
1614
- });
1615
- }
1616
- return matrixResultError;
1617
- }
1618
- /**
1619
- * Map a matrix of values to a matrix of strings via a callback that either returns or throws a range error. If the
1620
- * callback returns, the result for that element is the empty string; otherwise, if it's a range error, the result
1621
- * for that element is the error message.
1622
- *
1623
- * @param matrixValues
1624
- * Matrix to map.
1625
- *
1626
- * @param callback
1627
- * Callback that either returns or throws an exception.
1628
- *
1629
- * @returns
1630
- * Matrix of strings.
1631
- *
1632
- * @template TValue
1633
- * Value type.
1634
- */
1635
- static mapMatrixRangeError(matrixValues, callback) {
1636
- return matrixValues.map((rowValues) => rowValues.map((value) => {
1637
- let result;
1638
- try {
1639
- callback(value);
1640
- result = "";
1641
- } catch (e) {
1642
- if (e instanceof RangeError) {
1643
- result = e.message;
1644
- } else {
1645
- throw e instanceof Error ? e : new Error("Unknown error", {
1646
- cause: e
1647
- });
1648
- }
1649
- }
1650
- return result;
1651
- }));
1652
- }
1653
- /**
1654
- * Convert an iterable result of a callback to a matrix result. Although the natural approach would be to map to a
1655
- * single-element array containing an array of *N* results (i.e., [[r0, r1, r2, ..., r*N*]]), this is rendered
1656
- * visually as a single row. The more readable approach is as a single column, so the mapping is to an *N*-element
1657
- * array of single-element result arrays (i.e., [[r0], [r1], [r2], ..., [r*N*]]).
1658
- *
1659
- * @param iterableResult
1660
- * Iterable result.
1661
- *
1662
- * @returns
1663
- * Matrix of callback results.
1664
- */
1665
- static matrixResult(iterableResult) {
1666
- return Array.from(mapIterable(iterableResult, (result) => [result]));
1667
- }
1668
- };
1669
-
1670
- // src/descriptor.ts
1671
- var Types = {
1672
- /**
1673
- * String.
1674
- */
1675
- String: 0,
1676
- /**
1677
- * Number or enumeration.
1678
- */
1679
- Number: 1,
1680
- /**
1681
- * Boolean.
1682
- */
1683
- Boolean: 2,
1684
- /**
1685
- * Any.
1686
- */
1687
- Any: 3
1688
- };
1689
-
1690
- // src/app-utility-proxy.ts
1691
- import { isNullish } from "@aidc-toolkit/core";
1692
-
1693
- // src/proxy.ts
1694
- import {
1695
- getLogger,
1696
- LogLevels,
1697
- omit
1698
- } from "@aidc-toolkit/core";
1699
- function expandParameterDescriptor(parameterDescriptor) {
1700
- return !("extendsDescriptor" in parameterDescriptor) ? parameterDescriptor : {
1701
- ...expandParameterDescriptor(parameterDescriptor.extendsDescriptor),
1702
- ...parameterDescriptor
1703
- };
1704
- }
1705
- var Proxy2 = class _Proxy {
1706
- /**
1707
- * Logger.
1708
- */
1709
- // TODO Add configuration parameter to output JSON.
1710
- // TODO Change this to LogLevels.Trace when configuration available.
1711
- #logger = getLogger(LogLevels.Info);
1712
- /**
1713
- * Abstract class descriptors map, keyed on declaration class name. Abstract classes are not used directly by target
1714
- * applications.
1715
- */
1716
- #abstractClassDescriptorsMap = /* @__PURE__ */ new Map();
1717
- /**
1718
- * Concrete class descriptors map, keyed on declaration class name.
1719
- */
1720
- #concreteClassDescriptorsMap = /* @__PURE__ */ new Map();
1721
- /**
1722
- * Interim object.
1723
- */
1724
- #interim = void 0;
1725
- /**
1726
- * Get the proper JSON representation of a value.
1727
- *
1728
- * @param value
1729
- * Value.
1730
- *
1731
- * @returns
1732
- * Replacement value.
1733
- */
1734
- static #jsonValue(value) {
1735
- let replacementValue;
1736
- switch (typeof value) {
1737
- case "string":
1738
- case "number":
1739
- case "boolean":
1740
- case "undefined":
1741
- replacementValue = value;
1742
- break;
1743
- case "bigint":
1744
- replacementValue = value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER ? Number(value) : value.toString(10);
1745
- break;
1746
- case "object":
1747
- if (value === null) {
1748
- replacementValue = value;
1749
- } else if (Array.isArray(value)) {
1750
- replacementValue = value.map((entry) => _Proxy.#jsonValue(entry));
1751
- } else {
1752
- replacementValue = Object.fromEntries(Object.entries(value).map(([k, v]) => [k, _Proxy.#jsonValue(v)]));
1753
- }
1754
- break;
1755
- case "symbol":
1756
- case "function":
1757
- throw new Error(`Unsupported ${typeof value} value type`);
1758
- }
1759
- return replacementValue;
1760
- }
1761
- /**
1762
- * Describe a proxy class.
1763
- *
1764
- * @template T
1765
- * Proxy class type.
1766
- *
1767
- * @template IsAbstract
1768
- * True if the proxy class is abstract.
1769
- *
1770
- * @template TConstructor
1771
- * Proxy class constructor type.
1772
- *
1773
- * @template TProxyClassConstructor
1774
- * Narrowed proxy class constructor type.
1775
- *
1776
- * @param isAbstract
1777
- * True if class is abstract.
1778
- *
1779
- * @param decoratorClassDescriptor
1780
- * Class descriptor.
1781
- *
1782
- * @returns
1783
- * Function with which to decorate the class.
1784
- */
1785
- describeClass(isAbstract, decoratorClassDescriptor = {}) {
1786
- const interimClassDescriptor = decoratorClassDescriptor.replaceParameterDescriptors === void 0 ? omit(decoratorClassDescriptor, "replaceParameterDescriptors") : {
1787
- ...decoratorClassDescriptor,
1788
- replaceParameterDescriptors: decoratorClassDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => ({
1789
- ...replaceParameterDescriptor,
1790
- replacement: expandParameterDescriptor(replaceParameterDescriptor.replacement)
1791
- }))
1792
- };
1793
- const interim = {
1794
- classDescriptor: interimClassDescriptor,
1795
- methodDescriptors: []
1796
- };
1797
- this.#interim = interim;
1798
- return (Target, context) => {
1799
- const name = context.name;
1800
- if (typeof name !== "string") {
1801
- throw new Error(`${String(name)} has an invalid name`);
1802
- }
1803
- const namespacePrefix = decoratorClassDescriptor.namespace === void 0 ? "" : `${decoratorClassDescriptor.namespace}.`;
1804
- const namespaceClassName = `${namespacePrefix}${name}`;
1805
- const abstractClassDescriptorsMap = this.#abstractClassDescriptorsMap;
1806
- const concreteClassDescriptorsMap = this.#concreteClassDescriptorsMap;
1807
- if (abstractClassDescriptorsMap.has(namespaceClassName) || concreteClassDescriptorsMap.has(namespaceClassName)) {
1808
- throw new Error(`Duplicate class ${namespaceClassName}`);
1809
- }
1810
- let baseClassType = Target;
1811
- let baseClassDescriptor;
1812
- do {
1813
- baseClassType = Object.getPrototypeOf(baseClassType);
1814
- const namespaceBaseClassName = `${namespacePrefix}${baseClassType.name}`;
1815
- baseClassDescriptor = abstractClassDescriptorsMap.get(namespaceBaseClassName) ?? abstractClassDescriptorsMap.get(baseClassType.name) ?? concreteClassDescriptorsMap.get(namespaceBaseClassName) ?? concreteClassDescriptorsMap.get(baseClassType.name);
1816
- } while (baseClassType !== LibProxy && baseClassDescriptor === void 0);
1817
- let interimMethodDescriptors;
1818
- if (baseClassDescriptor !== void 0) {
1819
- const baseClassMethodDescriptors = baseClassDescriptor.methodDescriptors;
1820
- const replaceParameterDescriptors = decoratorClassDescriptor.replaceParameterDescriptors;
1821
- if (replaceParameterDescriptors !== void 0) {
1822
- const replacementParameterDescriptorsMap = new Map(replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, expandParameterDescriptor(replaceParameterDescriptor.replacement)]));
1823
- interimMethodDescriptors = baseClassMethodDescriptors.map((baseClassMethodDescriptor) => ({
1824
- ...baseClassMethodDescriptor,
1825
- parameterDescriptors: baseClassMethodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(parameterDescriptor.name) ?? parameterDescriptor)
1826
- }));
1827
- } else {
1828
- interimMethodDescriptors = baseClassMethodDescriptors.slice();
1829
- }
1830
- } else {
1831
- interimMethodDescriptors = [];
1832
- }
1833
- for (const classInterimMethodDescriptor of interim.methodDescriptors) {
1834
- const existingIndex = interimMethodDescriptors.findIndex((interimMethodDescriptor) => interimMethodDescriptor.name === classInterimMethodDescriptor.name);
1835
- if (existingIndex !== -1) {
1836
- interimMethodDescriptors[existingIndex] = classInterimMethodDescriptor;
1837
- } else {
1838
- interimMethodDescriptors.push(classInterimMethodDescriptor);
1839
- }
1840
- }
1841
- const methodDescriptors = [];
1842
- const methodInfix = decoratorClassDescriptor.methodInfix;
1843
- for (const interimMethodDescriptor of interimMethodDescriptors) {
1844
- const methodName = interimMethodDescriptor.name;
1845
- const infixBefore = interimMethodDescriptor.infixBefore;
1846
- let functionName;
1847
- if (methodInfix === void 0 || interimMethodDescriptor.ignoreInfix === true) {
1848
- functionName = methodName;
1849
- } else if (infixBefore === void 0) {
1850
- functionName = `${methodName}${methodInfix}`;
1851
- } else {
1852
- const insertIndex = methodName.indexOf(infixBefore);
1853
- if (insertIndex === -1) {
1854
- throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
1855
- }
1856
- functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
1857
- }
1858
- const namespaceFunctionName = `${namespacePrefix}${functionName}`;
1859
- const methodDescriptor = {
1860
- ...interimMethodDescriptor,
1861
- functionName,
1862
- namespaceFunctionName
1863
- };
1864
- methodDescriptors.push(methodDescriptor);
1865
- }
1866
- const objectNameGroups = /^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\.?(?<className>[A-Z].*|)$/.exec(namespaceClassName)?.groups;
1867
- if (objectNameGroups === void 0) {
1868
- throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
1869
- }
1870
- const classDescriptor = {
1871
- name,
1872
- ...interimClassDescriptor,
1873
- namespaceClassName,
1874
- objectName: `${objectNameGroups["namespaceFirstWord"].toLowerCase()}${objectNameGroups["namespaceRemaining"]}${objectNameGroups["className"]}`,
1875
- methodDescriptors
1876
- };
1877
- (isAbstract ? abstractClassDescriptorsMap : concreteClassDescriptorsMap).set(namespaceClassName, classDescriptor);
1878
- const methodDescriptorsMap = /* @__PURE__ */ new Map();
1879
- for (const methodDescriptor of methodDescriptors) {
1880
- methodDescriptorsMap.set(methodDescriptor.name, methodDescriptor);
1881
- }
1882
- this.#interim = void 0;
1883
- const logger = this.#logger;
1884
- return class extends Target {
1885
- /**
1886
- * @inheritDoc
1887
- */
1888
- log(logLevel, methodName, args, result) {
1889
- const methodDescriptor = methodDescriptorsMap.get(methodName);
1890
- logger.log(logLevel, "", JSON.stringify({
1891
- namespace: decoratorClassDescriptor.namespace,
1892
- className: name,
1893
- methodName,
1894
- functionName: methodDescriptor.functionName,
1895
- parameters: methodDescriptor.parameterDescriptors.map((parameterDescriptor, index) => ({
1896
- name: parameterDescriptor.name,
1897
- value: args[index]
1898
- })),
1899
- result: _Proxy.#jsonValue(result)
1900
- }, null, 2));
1901
- }
1902
- };
1903
- };
1904
- }
1905
- /**
1906
- * Describe a proxy method.
1907
- *
1908
- * @template TFunction
1909
- * Function type.
1910
- *
1911
- * @param decoratorMethodDescriptor
1912
- * Method descriptor.
1913
- *
1914
- * @returns
1915
- * Function with which to decorate the method.
1916
- */
1917
- describeMethod(decoratorMethodDescriptor) {
1918
- return (target, context) => {
1919
- const name = context.name;
1920
- if (this.#interim === void 0 || typeof name !== "string" || context.static || context.private) {
1921
- throw new Error(`${String(name)} is not defined within a supported class, has an invalid name, is static, or is private`);
1922
- }
1923
- let anyOptional = false;
1924
- const parameterDescriptors = decoratorMethodDescriptor.parameterDescriptors.map((decoratorParameterDescriptor) => {
1925
- const parameterDescriptor = expandParameterDescriptor(decoratorParameterDescriptor);
1926
- if (!parameterDescriptor.isRequired) {
1927
- anyOptional = true;
1928
- } else if (anyOptional) {
1929
- throw new Error(`Parameter ${parameterDescriptor.name} descriptor of method ${name} is required but prior parameter descriptor is optional`);
1930
- }
1931
- return parameterDescriptor;
1932
- });
1933
- this.#interim.methodDescriptors.push({
1934
- name,
1935
- ...decoratorMethodDescriptor,
1936
- parameterDescriptors
1937
- });
1938
- return function methodProxy(...args) {
1939
- const targetLogger = this;
1940
- let result;
1941
- try {
1942
- result = target.call(this, ...args);
1943
- targetLogger.log(LogLevels.Info, name, args, result);
1944
- } catch (e) {
1945
- targetLogger.log(LogLevels.Error, name, args, e instanceof Error ? `${e.name}: ${e.message}` : `Unknown exception: ${String(e)}`);
1946
- throw e;
1947
- }
1948
- return result;
1949
- };
1950
- };
1951
- }
1952
- /**
1953
- * Get the class descriptors map.
1954
- */
1955
- get classDescriptorsMap() {
1956
- return this.#concreteClassDescriptorsMap;
1957
- }
1958
- };
1959
- var proxy = new Proxy2();
1960
-
1961
- // src/app-utility-proxy.ts
1962
- var spillMatrix = {
1963
- name: "spillMatrix",
1964
- type: Types.Any,
1965
- isMatrix: true,
1966
- isRequired: true
1967
- };
1968
- var spillMaximumParameterDescriptor = {
1969
- name: "spillMaximum",
1970
- type: Types.Number,
1971
- isMatrix: false,
1972
- isRequired: false
1973
- };
1974
- var spillMaximumWidthParameterDescriptor = {
1975
- extendsDescriptor: spillMaximumParameterDescriptor,
1976
- sortOrder: 0,
1977
- name: "spillMaximumWidth"
1978
- };
1979
- var spillMaximumHeightParameterDescriptor = {
1980
- extendsDescriptor: spillMaximumParameterDescriptor,
1981
- sortOrder: 1,
1982
- name: "spillMaximumHeight"
1983
- };
1984
- var _hSpill_dec, _vSpill_dec, _version_dec, _a, _AppUtilityProxy_decorators, _init, _AppUtilityProxy_instances, defaultMaximums_fn;
1985
- _AppUtilityProxy_decorators = [proxy.describeClass(false)];
1986
- var AppUtilityProxy = class extends (_a = LibProxy, _version_dec = [proxy.describeMethod({
1987
- type: Types.String,
1988
- isMatrix: false,
1989
- parameterDescriptors: []
1990
- })], _vSpill_dec = [proxy.describeMethod({
1991
- requiresContext: true,
1992
- type: Types.Any,
1993
- isMatrix: true,
1994
- parameterDescriptors: [spillMatrix, spillMaximumWidthParameterDescriptor, spillMaximumHeightParameterDescriptor]
1995
- })], _hSpill_dec = [proxy.describeMethod({
1996
- requiresContext: true,
1997
- type: Types.Any,
1998
- isMatrix: true,
1999
- parameterDescriptors: [spillMatrix, spillMaximumHeightParameterDescriptor, spillMaximumWidthParameterDescriptor]
2000
- })], _a) {
2001
- constructor() {
2002
- super(...arguments);
2003
- __runInitializers(_init, 5, this);
2004
- __privateAdd(this, _AppUtilityProxy_instances);
2005
- }
2006
- version() {
2007
- return this.appExtension.version;
2008
- }
2009
- async vSpill(hMatrixValues, maximumWidth, maximumHeight, invocationContext) {
2010
- let result;
2011
- if (hMatrixValues.length !== 1) {
2012
- throw new RangeError(i18nextAppExtension.t("Proxy.vSpillMustBeHorizontalArray"));
2013
- }
2014
- const maximumDimensions = await __privateMethod(this, _AppUtilityProxy_instances, defaultMaximums_fn).call(this, {
2015
- width: maximumWidth,
2016
- height: maximumHeight
2017
- }, invocationContext);
2018
- const hArrayValues = hMatrixValues[0];
2019
- const hLength = hArrayValues.length;
2020
- const maximumArea = maximumDimensions.width * maximumDimensions.height;
2021
- if (hLength > 1 && hLength <= maximumArea) {
2022
- let spillWidth = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.width);
2023
- if (Number.isInteger(Math.log10(hLength))) {
2024
- const spillWidth10 = 10 ** Math.floor(Math.log10(spillWidth));
2025
- if (hLength / spillWidth10 <= maximumDimensions.height) {
2026
- spillWidth = spillWidth10;
2027
- }
2028
- }
2029
- result = [];
2030
- let hStartIndex = 0;
2031
- do {
2032
- const hEndIndex = hStartIndex + spillWidth;
2033
- result.push(hArrayValues.slice(hStartIndex, hEndIndex));
2034
- hStartIndex = hEndIndex;
2035
- } while (hStartIndex < hLength);
2036
- } else {
2037
- result = hMatrixValues;
2038
- }
2039
- return result;
2040
- }
2041
- async hSpill(vMatrixValues, maximumHeight, maximumWidth, invocationContext) {
2042
- let result;
2043
- for (const hArrayValues of vMatrixValues) {
2044
- if (hArrayValues.length !== 1) {
2045
- throw new RangeError(i18nextAppExtension.t("Proxy.hSpillMustBeVerticalArray"));
2046
- }
2047
- }
2048
- const maximumDimensions = await __privateMethod(this, _AppUtilityProxy_instances, defaultMaximums_fn).call(this, {
2049
- width: maximumWidth,
2050
- height: maximumHeight
2051
- }, invocationContext);
2052
- const vLength = vMatrixValues.length;
2053
- const maximumArea = maximumDimensions.width * maximumDimensions.height;
2054
- if (vLength > 1 && vLength <= maximumArea) {
2055
- let spillHeight = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.height);
2056
- if (Number.isInteger(Math.log10(vLength))) {
2057
- const spillHeight10 = 10 ** Math.floor(Math.log10(spillHeight));
2058
- if (vLength / spillHeight10 <= maximumDimensions.width) {
2059
- spillHeight = spillHeight10;
2060
- }
2061
- }
2062
- result = [];
2063
- for (let rowIndex = 0; rowIndex < spillHeight; rowIndex++) {
2064
- const row = new Array();
2065
- for (let cellIndex = rowIndex; cellIndex < vLength; cellIndex++) {
2066
- row.push(vMatrixValues[cellIndex][0]);
2067
- }
2068
- result.push(row);
2069
- }
2070
- } else {
2071
- result = vMatrixValues;
2072
- }
2073
- return result;
2074
- }
2075
- };
2076
- _init = __decoratorStart(_a);
2077
- _AppUtilityProxy_instances = new WeakSet();
2078
- defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
2079
- if (isNullish(invocationContext)) {
2080
- throw new Error("Invocation context not provided by application");
2081
- }
2082
- const maximumWidth = maximumDimensions.width;
2083
- const maximumHeight = maximumDimensions.height;
2084
- let definedMaximumWidth;
2085
- let definedMaximumHeight;
2086
- if (isNullish(maximumWidth) || isNullish(maximumHeight)) {
2087
- const sheetAddress = await this.appExtension.getSheetAddress(invocationContext);
2088
- definedMaximumWidth = maximumWidth ?? await this.appExtension.maximumWidth() - sheetAddress.columnIndex;
2089
- definedMaximumHeight = maximumHeight ?? await this.appExtension.maximumHeight() - sheetAddress.rowIndex;
2090
- } else {
2091
- definedMaximumWidth = maximumWidth;
2092
- definedMaximumHeight = maximumHeight;
2093
- }
2094
- return {
2095
- width: definedMaximumWidth,
2096
- height: definedMaximumHeight
2097
- };
2098
- };
2099
- __decorateElement(_init, 1, "version", _version_dec, AppUtilityProxy);
2100
- __decorateElement(_init, 1, "vSpill", _vSpill_dec, AppUtilityProxy);
2101
- __decorateElement(_init, 1, "hSpill", _hSpill_dec, AppUtilityProxy);
2102
- AppUtilityProxy = __decorateElement(_init, 0, "AppUtilityProxy", _AppUtilityProxy_decorators, AppUtilityProxy);
2103
- __runInitializers(_init, 1, AppUtilityProxy);
2104
-
2105
- // src/utility/index.ts
2106
- var utility_exports = {};
2107
- __export(utility_exports, {
2108
- AlphabeticProxy: () => AlphabeticProxy,
2109
- AlphanumericProxy: () => AlphanumericProxy,
2110
- CharacterSetCreatorProxy: () => CharacterSetCreatorProxy,
2111
- CharacterSetValidatorProxy: () => CharacterSetValidatorProxy,
2112
- HexadecimalProxy: () => HexadecimalProxy,
2113
- NumericProxy: () => NumericProxy,
2114
- RegExpProxy: () => RegExpProxy,
2115
- TransformerProxy: () => TransformerProxy
2116
- });
2117
-
2118
- // src/utility/transformer-proxy.ts
2119
- import { mapIterable as mapIterable2, Sequence, Transformer } from "@aidc-toolkit/utility";
2120
-
2121
- // src/utility/transformer-descriptor.ts
2122
- var valueParameterDescriptor = {
2123
- name: "value",
2124
- type: Types.Number,
2125
- isMatrix: true,
2126
- isRequired: true
2127
- };
2128
- var startValueParameterDescriptor = {
2129
- extendsDescriptor: valueParameterDescriptor,
2130
- name: "startValue",
2131
- isMatrix: false
2132
- };
2133
- var countParameterDescriptor = {
2134
- extendsDescriptor: valueParameterDescriptor,
2135
- name: "count",
2136
- isMatrix: false
2137
- };
2138
- var tweakParameterDescriptor = {
2139
- name: "tweak",
2140
- type: Types.Number,
2141
- isMatrix: false,
2142
- isRequired: false
2143
- };
2144
-
2145
- // src/utility/transformer-proxy.ts
2146
- var domainParameterDescriptor = {
2147
- name: "domain",
2148
- type: Types.Number,
2149
- isMatrix: false,
2150
- isRequired: true
2151
- };
2152
- var transformedValueParameterDescriptor = {
2153
- extendsDescriptor: valueParameterDescriptor,
2154
- name: "transformedValue"
2155
- };
2156
- var _reverse_dec, _forwardSequence_dec, _forward_dec, _a2, _TransformerProxy_decorators, _init2;
2157
- _TransformerProxy_decorators = [proxy.describeClass(false, {
2158
- methodInfix: "Transform"
2159
- })];
2160
- var TransformerProxy = class extends (_a2 = LibProxy, _forward_dec = [proxy.describeMethod({
2161
- type: Types.Number,
2162
- isMatrix: true,
2163
- parameterDescriptors: [domainParameterDescriptor, valueParameterDescriptor, tweakParameterDescriptor]
2164
- })], _forwardSequence_dec = [proxy.describeMethod({
2165
- infixBefore: "Sequence",
2166
- type: Types.Number,
2167
- isMatrix: true,
2168
- parameterDescriptors: [domainParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, tweakParameterDescriptor]
2169
- })], _reverse_dec = [proxy.describeMethod({
2170
- type: Types.Number,
2171
- isMatrix: true,
2172
- parameterDescriptors: [domainParameterDescriptor, transformedValueParameterDescriptor, tweakParameterDescriptor]
2173
- })], _a2) {
2174
- constructor() {
2175
- super(...arguments);
2176
- __runInitializers(_init2, 5, this);
2177
- }
2178
- forward(domain, matrixValues, tweak) {
2179
- const transformer = Transformer.get(domain, tweak ?? void 0);
2180
- return this.mapMatrix(matrixValues, (value) => this.mapBigInt(transformer.forward(value)));
2181
- }
2182
- forwardSequence(domain, startValue, count, tweak) {
2183
- this.appExtension.validateSequenceCount(count);
2184
- return LibProxy.matrixResult(mapIterable2(Transformer.get(domain, tweak ?? void 0).forward(new Sequence(startValue, count)), (value) => this.mapBigInt(value)));
2185
- }
2186
- reverse(domain, matrixTransformedValues, tweak) {
2187
- const transformer = Transformer.get(domain, tweak ?? void 0);
2188
- return this.mapMatrix(matrixTransformedValues, (transformedValue) => this.mapBigInt(transformer.reverse(transformedValue)));
2189
- }
2190
- };
2191
- _init2 = __decoratorStart(_a2);
2192
- __decorateElement(_init2, 1, "forward", _forward_dec, TransformerProxy);
2193
- __decorateElement(_init2, 1, "forwardSequence", _forwardSequence_dec, TransformerProxy);
2194
- __decorateElement(_init2, 1, "reverse", _reverse_dec, TransformerProxy);
2195
- TransformerProxy = __decorateElement(_init2, 0, "TransformerProxy", _TransformerProxy_decorators, TransformerProxy);
2196
- __runInitializers(_init2, 1, TransformerProxy);
2197
-
2198
- // src/utility/reg-exp-proxy.ts
2199
- import { RegExpValidator } from "@aidc-toolkit/utility";
2200
-
2201
- // src/utility/string-descriptor.ts
2202
- var sParameterDescriptor = {
2203
- name: "s",
2204
- type: Types.String,
2205
- isMatrix: true,
2206
- isRequired: true
2207
- };
2208
- var validateSParameterDescriptor = {
2209
- extendsDescriptor: sParameterDescriptor,
2210
- name: "validateS"
2211
- };
2212
-
2213
- // src/utility/string-proxy.ts
2214
- var StringProxy = class extends LibProxy {
2215
- validateString(validator, matrixSs, validation) {
2216
- return LibProxy.mapMatrixRangeError(matrixSs, (s) => {
2217
- validator.validate(s, validation);
2218
- });
2219
- }
2220
- isValidString(matrixValidateResults) {
2221
- return this.mapMatrix(matrixValidateResults, (validateResult) => validateResult === "");
2222
- }
2223
- };
2224
-
2225
- // src/utility/reg-exp-proxy.ts
2226
- var regExpParameterDescriptor = {
2227
- name: "regExp",
2228
- type: Types.String,
2229
- isMatrix: false,
2230
- isRequired: true
2231
- };
2232
- var errorMessageParameterDescriptor = {
2233
- name: "errorMessage",
2234
- type: Types.String,
2235
- isMatrix: false,
2236
- isRequired: false
2237
- };
2238
- var _isValid_dec, _validate_dec, _a3, _RegExpProxy_decorators, _init3;
2239
- _RegExpProxy_decorators = [proxy.describeClass(false, {
2240
- methodInfix: "RegExp"
2241
- })];
2242
- var RegExpProxy = class extends (_a3 = StringProxy, _validate_dec = [proxy.describeMethod({
2243
- type: Types.String,
2244
- isMatrix: true,
2245
- parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor, errorMessageParameterDescriptor]
2246
- })], _isValid_dec = [proxy.describeMethod({
2247
- type: Types.Boolean,
2248
- isMatrix: true,
2249
- parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor]
2250
- })], _a3) {
2251
- constructor() {
2252
- super(...arguments);
2253
- __runInitializers(_init3, 5, this);
2254
- }
2255
- validate(regExp, matrixSs, errorMessage) {
2256
- return this.validateString(new class extends RegExpValidator {
2257
- createErrorMessage(s) {
2258
- return errorMessage ?? super.createErrorMessage(s);
2259
- }
2260
- }(new RegExp(regExp)), matrixSs);
2261
- }
2262
- isValid(regExp, matrixSs) {
2263
- return this.isValidString(this.validate(regExp, matrixSs, void 0));
2264
- }
2265
- };
2266
- _init3 = __decoratorStart(_a3);
2267
- __decorateElement(_init3, 1, "validate", _validate_dec, RegExpProxy);
2268
- __decorateElement(_init3, 1, "isValid", _isValid_dec, RegExpProxy);
2269
- RegExpProxy = __decorateElement(_init3, 0, "RegExpProxy", _RegExpProxy_decorators, RegExpProxy);
2270
- __runInitializers(_init3, 1, RegExpProxy);
2271
-
2272
- // src/utility/character-set-proxy.ts
2273
- import {
2274
- ALPHABETIC_CREATOR,
2275
- ALPHANUMERIC_CREATOR,
2276
- HEXADECIMAL_CREATOR,
2277
- NUMERIC_CREATOR,
2278
- Sequence as Sequence2
2279
- } from "@aidc-toolkit/utility";
2280
-
2281
- // src/utility/character-set-descriptor.ts
2282
- var exclusionParameterDescriptor = {
2283
- name: "exclusion",
2284
- type: Types.Number,
2285
- isMatrix: false,
2286
- isRequired: false
2287
- };
2288
- var exclusionNoneParameterDescriptor = {
2289
- extendsDescriptor: exclusionParameterDescriptor,
2290
- sortOrder: 0,
2291
- name: "exclusionNone"
2292
- };
2293
- var exclusionFirstZeroParameterDescriptor = {
2294
- extendsDescriptor: exclusionParameterDescriptor,
2295
- sortOrder: 1,
2296
- name: "exclusionFirstZero"
2297
- };
2298
- var exclusionAllNumericParameterDescriptor = {
2299
- extendsDescriptor: exclusionParameterDescriptor,
2300
- sortOrder: 2,
2301
- name: "exclusionAllNumeric"
2302
- };
2303
- var exclusionAnyParameterDescriptor = {
2304
- extendsDescriptor: exclusionParameterDescriptor,
2305
- sortOrder: 3,
2306
- name: "exclusionAny"
2307
- };
2308
-
2309
- // src/utility/character-set-proxy.ts
2310
- var lengthParameterDescriptor = {
2311
- name: "length",
2312
- type: Types.Number,
2313
- isMatrix: false,
2314
- isRequired: true
2315
- };
2316
- var valueForSParameterDescriptor = {
2317
- extendsDescriptor: sParameterDescriptor,
2318
- name: "valueForS"
2319
- };
2320
- var _isValid_dec2, _validate_dec2, _a4, _CharacterSetValidatorProxy_decorators, _characterSetValidator, _init4;
2321
- _CharacterSetValidatorProxy_decorators = [proxy.describeClass(true)];
2322
- var CharacterSetValidatorProxy = class extends (_a4 = StringProxy, _validate_dec2 = [proxy.describeMethod({
2323
- type: Types.String,
2324
- isMatrix: true,
2325
- parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2326
- })], _isValid_dec2 = [proxy.describeMethod({
2327
- type: Types.Boolean,
2328
- isMatrix: true,
2329
- parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2330
- })], _a4) {
2331
- constructor(appExtension, characterSetValidator) {
2332
- super(appExtension);
2333
- __runInitializers(_init4, 5, this);
2334
- __privateAdd(this, _characterSetValidator);
2335
- __privateSet(this, _characterSetValidator, characterSetValidator);
2336
- }
2337
- validate(matrixSs, exclusion) {
2338
- return this.validateString(__privateGet(this, _characterSetValidator), matrixSs, {
2339
- exclusion: exclusion ?? void 0
2340
- });
2341
- }
2342
- isValid(matrixSs, exclusion) {
2343
- return this.isValidString(this.validate(matrixSs, exclusion));
2344
- }
2345
- };
2346
- _init4 = __decoratorStart(_a4);
2347
- _characterSetValidator = new WeakMap();
2348
- __decorateElement(_init4, 1, "validate", _validate_dec2, CharacterSetValidatorProxy);
2349
- __decorateElement(_init4, 1, "isValid", _isValid_dec2, CharacterSetValidatorProxy);
2350
- CharacterSetValidatorProxy = __decorateElement(_init4, 0, "CharacterSetValidatorProxy", _CharacterSetValidatorProxy_decorators, CharacterSetValidatorProxy);
2351
- __runInitializers(_init4, 1, CharacterSetValidatorProxy);
2352
- var _valueFor_dec, _createSequence_dec, _create_dec, _a5, _CharacterSetCreatorProxy_decorators, _characterSetCreator, _init5;
2353
- _CharacterSetCreatorProxy_decorators = [proxy.describeClass(true)];
2354
- var CharacterSetCreatorProxy = class extends (_a5 = CharacterSetValidatorProxy, _create_dec = [proxy.describeMethod({
2355
- type: Types.String,
2356
- isMatrix: true,
2357
- parameterDescriptors: [lengthParameterDescriptor, valueParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2358
- })], _createSequence_dec = [proxy.describeMethod({
2359
- infixBefore: "Sequence",
2360
- type: Types.String,
2361
- isMatrix: true,
2362
- parameterDescriptors: [lengthParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2363
- })], _valueFor_dec = [proxy.describeMethod({
2364
- type: Types.Number,
2365
- isMatrix: true,
2366
- parameterDescriptors: [valueForSParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2367
- })], _a5) {
2368
- constructor(appExtension, characterSetCreator) {
2369
- super(appExtension, characterSetCreator);
2370
- __runInitializers(_init5, 5, this);
2371
- __privateAdd(this, _characterSetCreator);
2372
- __privateSet(this, _characterSetCreator, characterSetCreator);
2373
- }
2374
- create(length, matrixValues, exclusion, tweak) {
2375
- const exclusionOrUndefined = exclusion ?? void 0;
2376
- const tweakOrUndefined = tweak ?? void 0;
2377
- return this.mapMatrix(matrixValues, (value) => __privateGet(this, _characterSetCreator).create(length, value, exclusionOrUndefined, tweakOrUndefined));
2378
- }
2379
- createSequence(length, startValue, count, exclusion, tweak) {
2380
- this.appExtension.validateSequenceCount(count);
2381
- const exclusionOrUndefined = exclusion ?? void 0;
2382
- const tweakOrUndefined = tweak ?? void 0;
2383
- return LibProxy.matrixResult(__privateGet(this, _characterSetCreator).create(length, new Sequence2(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2384
- }
2385
- valueFor(matrixSs, exclusion, tweak) {
2386
- const exclusionOrUndefined = exclusion ?? void 0;
2387
- const tweakOrUndefined = tweak ?? void 0;
2388
- return this.mapMatrix(matrixSs, (s) => this.mapBigInt(__privateGet(this, _characterSetCreator).valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2389
- }
2390
- };
2391
- _init5 = __decoratorStart(_a5);
2392
- _characterSetCreator = new WeakMap();
2393
- __decorateElement(_init5, 1, "create", _create_dec, CharacterSetCreatorProxy);
2394
- __decorateElement(_init5, 1, "createSequence", _createSequence_dec, CharacterSetCreatorProxy);
2395
- __decorateElement(_init5, 1, "valueFor", _valueFor_dec, CharacterSetCreatorProxy);
2396
- CharacterSetCreatorProxy = __decorateElement(_init5, 0, "CharacterSetCreatorProxy", _CharacterSetCreatorProxy_decorators, CharacterSetCreatorProxy);
2397
- __runInitializers(_init5, 1, CharacterSetCreatorProxy);
2398
- var _NumericProxy_decorators, _init6, _a6;
2399
- _NumericProxy_decorators = [proxy.describeClass(false, {
2400
- methodInfix: "Numeric",
2401
- replaceParameterDescriptors: [
2402
- {
2403
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2404
- replacement: exclusionFirstZeroParameterDescriptor
2405
- }
2406
- ]
2407
- })];
2408
- var NumericProxy = class extends (_a6 = CharacterSetCreatorProxy) {
2409
- constructor(appExtension) {
2410
- super(appExtension, NUMERIC_CREATOR);
2411
- }
2412
- };
2413
- _init6 = __decoratorStart(_a6);
2414
- NumericProxy = __decorateElement(_init6, 0, "NumericProxy", _NumericProxy_decorators, NumericProxy);
2415
- __runInitializers(_init6, 1, NumericProxy);
2416
- var _HexadecimalProxy_decorators, _init7, _a7;
2417
- _HexadecimalProxy_decorators = [proxy.describeClass(false, {
2418
- methodInfix: "Hexadecimal",
2419
- replaceParameterDescriptors: [
2420
- {
2421
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2422
- replacement: exclusionAnyParameterDescriptor
2423
- }
2424
- ]
2425
- })];
2426
- var HexadecimalProxy = class extends (_a7 = CharacterSetCreatorProxy) {
2427
- constructor(appExtension) {
2428
- super(appExtension, HEXADECIMAL_CREATOR);
2429
- }
2430
- };
2431
- _init7 = __decoratorStart(_a7);
2432
- HexadecimalProxy = __decorateElement(_init7, 0, "HexadecimalProxy", _HexadecimalProxy_decorators, HexadecimalProxy);
2433
- __runInitializers(_init7, 1, HexadecimalProxy);
2434
- var _AlphabeticProxy_decorators, _init8, _a8;
2435
- _AlphabeticProxy_decorators = [proxy.describeClass(false, {
2436
- methodInfix: "Alphabetic"
2437
- })];
2438
- var AlphabeticProxy = class extends (_a8 = CharacterSetCreatorProxy) {
2439
- constructor(appExtension) {
2440
- super(appExtension, ALPHABETIC_CREATOR);
2441
- }
2442
- };
2443
- _init8 = __decoratorStart(_a8);
2444
- AlphabeticProxy = __decorateElement(_init8, 0, "AlphabeticProxy", _AlphabeticProxy_decorators, AlphabeticProxy);
2445
- __runInitializers(_init8, 1, AlphabeticProxy);
2446
- var _AlphanumericProxy_decorators, _init9, _a9;
2447
- _AlphanumericProxy_decorators = [proxy.describeClass(false, {
2448
- methodInfix: "Alphanumeric",
2449
- replaceParameterDescriptors: [
2450
- {
2451
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2452
- replacement: exclusionAnyParameterDescriptor
2453
- }
2454
- ]
2455
- })];
2456
- var AlphanumericProxy = class extends (_a9 = CharacterSetCreatorProxy) {
2457
- constructor(appExtension) {
2458
- super(appExtension, ALPHANUMERIC_CREATOR);
2459
- }
2460
- };
2461
- _init9 = __decoratorStart(_a9);
2462
- AlphanumericProxy = __decorateElement(_init9, 0, "AlphanumericProxy", _AlphanumericProxy_decorators, AlphanumericProxy);
2463
- __runInitializers(_init9, 1, AlphanumericProxy);
2464
-
2465
- // src/gs1/index.ts
2466
- var gs1_exports = {};
2467
- __export(gs1_exports, {
2468
- AI39Proxy: () => AI39Proxy,
2469
- AI64Proxy: () => AI64Proxy,
2470
- AI82Proxy: () => AI82Proxy,
2471
- CPIDCreatorProxy: () => CPIDCreatorProxy,
2472
- CPIDValidatorProxy: () => CPIDValidatorProxy,
2473
- CheckProxy: () => CheckProxy,
2474
- GCNCreatorProxy: () => GCNCreatorProxy,
2475
- GCNValidatorProxy: () => GCNValidatorProxy,
2476
- GDTICreatorProxy: () => GDTICreatorProxy,
2477
- GDTIValidatorProxy: () => GDTIValidatorProxy,
2478
- GIAICreatorProxy: () => GIAICreatorProxy,
2479
- GIAIValidatorProxy: () => GIAIValidatorProxy,
2480
- GINCCreatorProxy: () => GINCCreatorProxy,
2481
- GINCValidatorProxy: () => GINCValidatorProxy,
2482
- GLNCreatorProxy: () => GLNCreatorProxy,
2483
- GLNValidatorProxy: () => GLNValidatorProxy,
2484
- GMNCreatorProxy: () => GMNCreatorProxy,
2485
- GMNValidatorProxy: () => GMNValidatorProxy,
2486
- GRAICreatorProxy: () => GRAICreatorProxy,
2487
- GRAIValidatorProxy: () => GRAIValidatorProxy,
2488
- GSINCreatorProxy: () => GSINCreatorProxy,
2489
- GSINValidatorProxy: () => GSINValidatorProxy,
2490
- GSRNCreatorProxy: () => GSRNCreatorProxy,
2491
- GSRNValidatorProxy: () => GSRNValidatorProxy,
2492
- GTIN12ValidatorProxy: () => GTIN12ValidatorProxy,
2493
- GTIN13ValidatorProxy: () => GTIN13ValidatorProxy,
2494
- GTIN8ValidatorProxy: () => GTIN8ValidatorProxy,
2495
- GTINCreatorProxy: () => GTINCreatorProxy,
2496
- GTINValidatorStaticProxy: () => GTINValidatorStaticProxy,
2497
- PrefixManagerProxy: () => PrefixManagerProxy,
2498
- SSCCCreatorProxy: () => SSCCCreatorProxy,
2499
- SSCCValidatorProxy: () => SSCCValidatorProxy
2500
- });
2501
-
2502
- // src/gs1/character-set-proxy.ts
2503
- import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
2504
- var _AI82Proxy_decorators, _init10, _a10;
2505
- _AI82Proxy_decorators = [proxy.describeClass(false, {
2506
- namespace: "GS1",
2507
- methodInfix: "AI82",
2508
- replaceParameterDescriptors: [
2509
- {
2510
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2511
- replacement: exclusionAllNumericParameterDescriptor
2512
- }
2513
- ]
2514
- })];
2515
- var AI82Proxy = class extends (_a10 = CharacterSetCreatorProxy) {
2516
- constructor(appExtension) {
2517
- super(appExtension, AI82_CREATOR);
2518
- }
2519
- };
2520
- _init10 = __decoratorStart(_a10);
2521
- AI82Proxy = __decorateElement(_init10, 0, "AI82Proxy", _AI82Proxy_decorators, AI82Proxy);
2522
- __runInitializers(_init10, 1, AI82Proxy);
2523
- var _AI39Proxy_decorators, _init11, _a11;
2524
- _AI39Proxy_decorators = [proxy.describeClass(false, {
2525
- namespace: "GS1",
2526
- methodInfix: "AI39",
2527
- replaceParameterDescriptors: [
2528
- {
2529
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2530
- replacement: exclusionAllNumericParameterDescriptor
2531
- }
2532
- ]
2533
- })];
2534
- var AI39Proxy = class extends (_a11 = CharacterSetCreatorProxy) {
2535
- constructor(appExtension) {
2536
- super(appExtension, AI39_CREATOR);
2537
- }
2538
- };
2539
- _init11 = __decoratorStart(_a11);
2540
- AI39Proxy = __decorateElement(_init11, 0, "AI39Proxy", _AI39Proxy_decorators, AI39Proxy);
2541
- __runInitializers(_init11, 1, AI39Proxy);
2542
- var _AI64Proxy_decorators, _init12, _a12;
2543
- _AI64Proxy_decorators = [proxy.describeClass(false, {
2544
- namespace: "GS1",
2545
- methodInfix: "AI64"
2546
- })];
2547
- var AI64Proxy = class extends (_a12 = CharacterSetValidatorProxy) {
2548
- constructor(appExtension) {
2549
- super(appExtension, AI64_VALIDATOR);
2550
- }
2551
- };
2552
- _init12 = __decoratorStart(_a12);
2553
- AI64Proxy = __decorateElement(_init12, 0, "AI64Proxy", _AI64Proxy_decorators, AI64Proxy);
2554
- __runInitializers(_init12, 1, AI64Proxy);
2555
-
2556
- // src/gs1/check-proxy.ts
2557
- import {
2558
- checkCharacterPair,
2559
- checkDigit,
2560
- hasValidCheckCharacterPair,
2561
- hasValidCheckDigit,
2562
- isValidPriceOrWeightCheckDigit,
2563
- priceOrWeightCheckDigit
2564
- } from "@aidc-toolkit/gs1";
2565
- var checkSParameterDescriptor = {
2566
- name: "checkS",
2567
- type: Types.String,
2568
- isMatrix: true,
2569
- isRequired: true
2570
- };
2571
- var numericSParameterDescriptor = {
2572
- extendsDescriptor: checkSParameterDescriptor,
2573
- name: "numericS"
2574
- };
2575
- var numericSFourOrFiveDigitsParameterDescriptor = {
2576
- extendsDescriptor: numericSParameterDescriptor,
2577
- sortOrder: 0,
2578
- name: "numericSFourOrFiveDigits"
2579
- };
2580
- var numericSWithCheckDigitParameterDescriptor = {
2581
- extendsDescriptor: numericSParameterDescriptor,
2582
- sortOrder: 1,
2583
- name: "numericSWithCheckDigit"
2584
- };
2585
- var checkDigitParameterDescriptor = {
2586
- extendsDescriptor: numericSParameterDescriptor,
2587
- sortOrder: 2,
2588
- name: "checkDigit",
2589
- isMatrix: false
2590
- };
2591
- var ai82SParameterDescriptor = {
2592
- extendsDescriptor: checkSParameterDescriptor,
2593
- name: "ai82S"
2594
- };
2595
- var ai82SWithCheckCharacterPairParameterDescriptor = {
2596
- extendsDescriptor: ai82SParameterDescriptor,
2597
- name: "ai82SWithCheckCharacterPair"
2598
- };
2599
- var _hasValidCheckCharacterPair_dec, _checkCharacterPair_dec, _isValidPriceOrWeightCheckDigit_dec, _priceOrWeightCheckDigit_dec, _hasValidCheckDigit_dec, _checkDigit_dec, _a13, _CheckProxy_decorators, _init13;
2600
- _CheckProxy_decorators = [proxy.describeClass(false, {
2601
- namespace: "GS1"
2602
- })];
2603
- var CheckProxy = class extends (_a13 = LibProxy, _checkDigit_dec = [proxy.describeMethod({
2604
- type: Types.String,
2605
- isMatrix: true,
2606
- parameterDescriptors: [numericSParameterDescriptor]
2607
- })], _hasValidCheckDigit_dec = [proxy.describeMethod({
2608
- type: Types.String,
2609
- isMatrix: true,
2610
- parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]
2611
- })], _priceOrWeightCheckDigit_dec = [proxy.describeMethod({
2612
- type: Types.String,
2613
- isMatrix: true,
2614
- parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]
2615
- })], _isValidPriceOrWeightCheckDigit_dec = [proxy.describeMethod({
2616
- type: Types.String,
2617
- isMatrix: false,
2618
- parameterDescriptors: [{
2619
- ...numericSFourOrFiveDigitsParameterDescriptor,
2620
- isMatrix: false
2621
- }, checkDigitParameterDescriptor]
2622
- })], _checkCharacterPair_dec = [proxy.describeMethod({
2623
- type: Types.String,
2624
- isMatrix: true,
2625
- parameterDescriptors: [ai82SParameterDescriptor]
2626
- })], _hasValidCheckCharacterPair_dec = [proxy.describeMethod({
2627
- type: Types.String,
2628
- isMatrix: true,
2629
- parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]
2630
- })], _a13) {
2631
- constructor() {
2632
- super(...arguments);
2633
- __runInitializers(_init13, 5, this);
2634
- }
2635
- checkDigit(matrixSs) {
2636
- return this.mapMatrix(matrixSs, (s) => checkDigit(s));
2637
- }
2638
- hasValidCheckDigit(matrixSs) {
2639
- return this.mapMatrix(matrixSs, (s) => hasValidCheckDigit(s));
2640
- }
2641
- priceOrWeightCheckDigit(matrixSs) {
2642
- return this.mapMatrix(matrixSs, (s) => priceOrWeightCheckDigit(s));
2643
- }
2644
- isValidPriceOrWeightCheckDigit(s, checkDigit2) {
2645
- return isValidPriceOrWeightCheckDigit(s, checkDigit2);
2646
- }
2647
- checkCharacterPair(matrixSs) {
2648
- return this.mapMatrix(matrixSs, (s) => checkCharacterPair(s));
2649
- }
2650
- hasValidCheckCharacterPair(matrixSs) {
2651
- return this.mapMatrix(matrixSs, (s) => hasValidCheckCharacterPair(s));
2652
- }
2653
- };
2654
- _init13 = __decoratorStart(_a13);
2655
- __decorateElement(_init13, 1, "checkDigit", _checkDigit_dec, CheckProxy);
2656
- __decorateElement(_init13, 1, "hasValidCheckDigit", _hasValidCheckDigit_dec, CheckProxy);
2657
- __decorateElement(_init13, 1, "priceOrWeightCheckDigit", _priceOrWeightCheckDigit_dec, CheckProxy);
2658
- __decorateElement(_init13, 1, "isValidPriceOrWeightCheckDigit", _isValidPriceOrWeightCheckDigit_dec, CheckProxy);
2659
- __decorateElement(_init13, 1, "checkCharacterPair", _checkCharacterPair_dec, CheckProxy);
2660
- __decorateElement(_init13, 1, "hasValidCheckCharacterPair", _hasValidCheckCharacterPair_dec, CheckProxy);
2661
- CheckProxy = __decorateElement(_init13, 0, "CheckProxy", _CheckProxy_decorators, CheckProxy);
2662
- __runInitializers(_init13, 1, CheckProxy);
2663
-
2664
- // src/gs1/gtin-validator-proxy.ts
2665
- import { GTINLengths, GTINValidator, IdentifierValidators } from "@aidc-toolkit/gs1";
2666
-
2667
- // src/gs1/gtin-descriptor.ts
2668
- var indicatorDigitParameterDescriptor = {
2669
- name: "indicatorDigit",
2670
- type: Types.String,
2671
- isMatrix: false,
2672
- isRequired: true
2673
- };
2674
- var rcnFormatParameterDescriptor = {
2675
- name: "rcnFormat",
2676
- type: Types.String,
2677
- isMatrix: false,
2678
- isRequired: true
2679
- };
2680
- var rcnItemReferenceParameterDescriptor = {
2681
- name: "rcnItemReference",
2682
- type: Types.Number,
2683
- isMatrix: false,
2684
- isRequired: true
2685
- };
2686
- var rcnPriceOrWeightParameterDescriptor = {
2687
- name: "rcnPriceOrWeight",
2688
- type: Types.Number,
2689
- isMatrix: true,
2690
- isRequired: true
2691
- };
2692
-
2693
- // src/gs1/identifier-validator-proxy.ts
2694
- var identifierParameterDescriptor = {
2695
- name: "identifier",
2696
- type: Types.String,
2697
- isMatrix: true,
2698
- isRequired: true
2699
- };
2700
- var validateIdentifierParameterDescriptor = {
2701
- extendsDescriptor: identifierParameterDescriptor,
2702
- sortOrder: 0,
2703
- name: "validateIdentifier"
2704
- };
2705
- var IdentifierValidatorProxy = class extends StringProxy {
2706
- #validator;
2707
- constructor(appExtension, validator) {
2708
- super(appExtension);
2709
- this.#validator = validator;
2710
- }
2711
- get validator() {
2712
- return this.#validator;
2713
- }
2714
- };
2715
- var _validate_dec3, _a14, _NumericIdentifierValidatorProxy_decorators, _init14;
2716
- _NumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2717
- namespace: "GS1"
2718
- })];
2719
- var NumericIdentifierValidatorProxy = class extends (_a14 = IdentifierValidatorProxy, _validate_dec3 = [proxy.describeMethod({
2720
- type: Types.String,
2721
- isMatrix: true,
2722
- parameterDescriptors: [validateIdentifierParameterDescriptor]
2723
- })], _a14) {
2724
- constructor() {
2725
- super(...arguments);
2726
- __runInitializers(_init14, 5, this);
2727
- }
2728
- validate(matrixIdentifiers) {
2729
- return this.validateString(this.validator, matrixIdentifiers);
2730
- }
2731
- };
2732
- _init14 = __decoratorStart(_a14);
2733
- __decorateElement(_init14, 1, "validate", _validate_dec3, NumericIdentifierValidatorProxy);
2734
- NumericIdentifierValidatorProxy = __decorateElement(_init14, 0, "NumericIdentifierValidatorProxy", _NumericIdentifierValidatorProxy_decorators, NumericIdentifierValidatorProxy);
2735
- __runInitializers(_init14, 1, NumericIdentifierValidatorProxy);
2736
- var GTINValidatorProxy = class extends NumericIdentifierValidatorProxy {
2737
- };
2738
- var NonGTINNumericIdentifierValidatorProxy = class extends NumericIdentifierValidatorProxy {
2739
- };
2740
- var NonSerializableNumericIdentifierValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
2741
- };
2742
- var SerializableNumericIdentifierValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
2743
- };
2744
- var _validate_dec4, _a15, _NonNumericIdentifierValidatorProxy_decorators, _init15;
2745
- _NonNumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2746
- namespace: "GS1"
2747
- })];
2748
- var NonNumericIdentifierValidatorProxy = class extends (_a15 = IdentifierValidatorProxy, _validate_dec4 = [proxy.describeMethod({
2749
- type: Types.String,
2750
- isMatrix: true,
2751
- parameterDescriptors: [validateIdentifierParameterDescriptor, exclusionAllNumericParameterDescriptor]
2752
- })], _a15) {
2753
- constructor() {
2754
- super(...arguments);
2755
- __runInitializers(_init15, 5, this);
2756
- }
2757
- validate(matrixIdentifiers, exclusion) {
2758
- return this.validateString(this.validator, matrixIdentifiers, {
2759
- exclusion: exclusion ?? void 0
2760
- });
2761
- }
2762
- };
2763
- _init15 = __decoratorStart(_a15);
2764
- __decorateElement(_init15, 1, "validate", _validate_dec4, NonNumericIdentifierValidatorProxy);
2765
- NonNumericIdentifierValidatorProxy = __decorateElement(_init15, 0, "NonNumericIdentifierValidatorProxy", _NonNumericIdentifierValidatorProxy_decorators, NonNumericIdentifierValidatorProxy);
2766
- __runInitializers(_init15, 1, NonNumericIdentifierValidatorProxy);
2767
-
2768
- // src/gs1/gtin-validator-proxy.ts
2769
- var _GTIN13ValidatorProxy_decorators, _init16, _a16;
2770
- _GTIN13ValidatorProxy_decorators = [proxy.describeClass(false, {
2771
- namespace: "GS1",
2772
- methodInfix: "GTIN13"
2773
- })];
2774
- var GTIN13ValidatorProxy = class extends (_a16 = GTINValidatorProxy) {
2775
- constructor(appExtension) {
2776
- super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN13]);
2777
- }
2778
- };
2779
- _init16 = __decoratorStart(_a16);
2780
- GTIN13ValidatorProxy = __decorateElement(_init16, 0, "GTIN13ValidatorProxy", _GTIN13ValidatorProxy_decorators, GTIN13ValidatorProxy);
2781
- __runInitializers(_init16, 1, GTIN13ValidatorProxy);
2782
- var _GTIN12ValidatorProxy_decorators, _init17, _a17;
2783
- _GTIN12ValidatorProxy_decorators = [proxy.describeClass(false, {
2784
- namespace: "GS1",
2785
- methodInfix: "GTIN12"
2786
- })];
2787
- var GTIN12ValidatorProxy = class extends (_a17 = GTINValidatorProxy) {
2788
- constructor(appExtension) {
2789
- super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN12]);
2790
- }
2791
- };
2792
- _init17 = __decoratorStart(_a17);
2793
- GTIN12ValidatorProxy = __decorateElement(_init17, 0, "GTIN12ValidatorProxy", _GTIN12ValidatorProxy_decorators, GTIN12ValidatorProxy);
2794
- __runInitializers(_init17, 1, GTIN12ValidatorProxy);
2795
- var _GTIN8ValidatorProxy_decorators, _init18, _a18;
2796
- _GTIN8ValidatorProxy_decorators = [proxy.describeClass(false, {
2797
- namespace: "GS1",
2798
- methodInfix: "GTIN8"
2799
- })];
2800
- var GTIN8ValidatorProxy = class extends (_a18 = GTINValidatorProxy) {
2801
- constructor(appExtension) {
2802
- super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN8]);
2803
- }
2804
- };
2805
- _init18 = __decoratorStart(_a18);
2806
- GTIN8ValidatorProxy = __decorateElement(_init18, 0, "GTIN8ValidatorProxy", _GTIN8ValidatorProxy_decorators, GTIN8ValidatorProxy);
2807
- __runInitializers(_init18, 1, GTIN8ValidatorProxy);
2808
- var zeroSuppressibleGTIN12ParameterDescriptor = {
2809
- extendsDescriptor: identifierParameterDescriptor,
2810
- name: "zeroSuppressibleGTIN12"
2811
- };
2812
- var zeroSuppressedGTIN12ParameterDescriptor = {
2813
- extendsDescriptor: identifierParameterDescriptor,
2814
- name: "zeroSuppressedGTIN12"
2815
- };
2816
- var convertGTINParameterDescriptor = {
2817
- extendsDescriptor: identifierParameterDescriptor,
2818
- name: "convertGTIN"
2819
- };
2820
- var normalizeGTINParameterDescriptor = {
2821
- extendsDescriptor: identifierParameterDescriptor,
2822
- name: "normalizeGTIN"
2823
- };
2824
- var validateGTINParameterDescriptor = {
2825
- extendsDescriptor: identifierParameterDescriptor,
2826
- name: "validateGTIN"
2827
- };
2828
- var gtinLevelParameterDescriptor = {
2829
- name: "gtinLevel",
2830
- type: Types.Number,
2831
- isMatrix: false,
2832
- isRequired: false
2833
- };
2834
- var validateGTIN14ParameterDescriptor = {
2835
- extendsDescriptor: identifierParameterDescriptor,
2836
- name: "validateGTIN14"
2837
- };
2838
- var rcnParameterDescriptor = {
2839
- name: "rcn",
2840
- type: Types.String,
2841
- isMatrix: true,
2842
- isRequired: true
2843
- };
2844
- var _parseVariableMeasureRCN_dec, _validateGTIN14_dec, _validateGTIN_dec, _normalizeGTIN_dec, _convertToGTIN14_dec, _zeroExpandGTIN12_dec, _zeroSuppressGTIN12_dec, _a19, _GTINValidatorStaticProxy_decorators, _init19;
2845
- _GTINValidatorStaticProxy_decorators = [proxy.describeClass(false, {
2846
- namespace: "GS1"
2847
- })];
2848
- var GTINValidatorStaticProxy = class extends (_a19 = LibProxy, _zeroSuppressGTIN12_dec = [proxy.describeMethod({
2849
- type: Types.String,
2850
- isMatrix: true,
2851
- parameterDescriptors: [zeroSuppressibleGTIN12ParameterDescriptor]
2852
- })], _zeroExpandGTIN12_dec = [proxy.describeMethod({
2853
- type: Types.String,
2854
- isMatrix: true,
2855
- parameterDescriptors: [zeroSuppressedGTIN12ParameterDescriptor]
2856
- })], _convertToGTIN14_dec = [proxy.describeMethod({
2857
- type: Types.String,
2858
- isMatrix: true,
2859
- parameterDescriptors: [indicatorDigitParameterDescriptor, convertGTINParameterDescriptor]
2860
- })], _normalizeGTIN_dec = [proxy.describeMethod({
2861
- type: Types.String,
2862
- isMatrix: true,
2863
- parameterDescriptors: [normalizeGTINParameterDescriptor]
2864
- })], _validateGTIN_dec = [proxy.describeMethod({
2865
- type: Types.String,
2866
- isMatrix: true,
2867
- parameterDescriptors: [validateGTINParameterDescriptor, gtinLevelParameterDescriptor]
2868
- })], _validateGTIN14_dec = [proxy.describeMethod({
2869
- type: Types.String,
2870
- isMatrix: true,
2871
- parameterDescriptors: [validateGTIN14ParameterDescriptor]
2872
- })], _parseVariableMeasureRCN_dec = [proxy.describeMethod({
2873
- type: Types.Number,
2874
- isMatrix: true,
2875
- parameterDescriptors: [rcnFormatParameterDescriptor, rcnParameterDescriptor]
2876
- })], _a19) {
2877
- constructor() {
2878
- super(...arguments);
2879
- __runInitializers(_init19, 5, this);
2880
- }
2881
- zeroSuppressGTIN12(matrixGTIN12s) {
2882
- return this.mapMatrix(matrixGTIN12s, (gtin12) => GTINValidator.zeroSuppress(gtin12));
2883
- }
2884
- zeroExpandGTIN12(matrixZeroSuppressedGTIN12s) {
2885
- return this.mapMatrix(matrixZeroSuppressedGTIN12s, (zeroSuppressedGTIN12) => GTINValidator.zeroExpand(zeroSuppressedGTIN12));
2886
- }
2887
- convertToGTIN14(indicatorDigit, matrixGTINs) {
2888
- return this.mapMatrix(matrixGTINs, (gtin) => GTINValidator.convertToGTIN14(indicatorDigit, gtin));
2889
- }
2890
- normalizeGTIN(matrixGTINs) {
2891
- return this.mapMatrix(matrixGTINs, (gtin) => GTINValidator.normalize(gtin));
2892
- }
2893
- validateGTIN(matrixGTINs, gtinLevel) {
2894
- const gtinLevelOrUndefined = gtinLevel ?? void 0;
2895
- return LibProxy.mapMatrixRangeError(matrixGTINs, (gtin) => {
2896
- GTINValidator.validateAny(gtin, gtinLevelOrUndefined);
2897
- });
2898
- }
2899
- validateGTIN14(matrixGTIN14s) {
2900
- return LibProxy.mapMatrixRangeError(matrixGTIN14s, (gtin14) => {
2901
- GTINValidator.validateGTIN14(gtin14);
2902
- });
2903
- }
2904
- parseVariableMeasureRCN(format, matrixRCNs) {
2905
- return this.mapArray(matrixRCNs, (rcn) => {
2906
- const rcnReference = GTINValidator.parseVariableMeasureRCN(format, rcn);
2907
- return [rcnReference.itemReference, rcnReference.priceOrWeight];
2908
- });
2909
- }
2910
- };
2911
- _init19 = __decoratorStart(_a19);
2912
- __decorateElement(_init19, 1, "zeroSuppressGTIN12", _zeroSuppressGTIN12_dec, GTINValidatorStaticProxy);
2913
- __decorateElement(_init19, 1, "zeroExpandGTIN12", _zeroExpandGTIN12_dec, GTINValidatorStaticProxy);
2914
- __decorateElement(_init19, 1, "convertToGTIN14", _convertToGTIN14_dec, GTINValidatorStaticProxy);
2915
- __decorateElement(_init19, 1, "normalizeGTIN", _normalizeGTIN_dec, GTINValidatorStaticProxy);
2916
- __decorateElement(_init19, 1, "validateGTIN", _validateGTIN_dec, GTINValidatorStaticProxy);
2917
- __decorateElement(_init19, 1, "validateGTIN14", _validateGTIN14_dec, GTINValidatorStaticProxy);
2918
- __decorateElement(_init19, 1, "parseVariableMeasureRCN", _parseVariableMeasureRCN_dec, GTINValidatorStaticProxy);
2919
- GTINValidatorStaticProxy = __decorateElement(_init19, 0, "GTINValidatorStaticProxy", _GTINValidatorStaticProxy_decorators, GTINValidatorStaticProxy);
2920
- __runInitializers(_init19, 1, GTINValidatorStaticProxy);
2921
-
2922
- // src/gs1/non-gtin-validator-proxy.ts
2923
- import { IdentifierValidators as IdentifierValidators2 } from "@aidc-toolkit/gs1";
2924
- var _GLNValidatorProxy_decorators, _init20, _a20;
2925
- _GLNValidatorProxy_decorators = [proxy.describeClass(false, {
2926
- namespace: "GS1",
2927
- methodInfix: "GLN"
2928
- })];
2929
- var GLNValidatorProxy = class extends (_a20 = NonSerializableNumericIdentifierValidatorProxy) {
2930
- constructor(appExtension) {
2931
- super(appExtension, IdentifierValidators2.GLN);
2932
- }
2933
- };
2934
- _init20 = __decoratorStart(_a20);
2935
- GLNValidatorProxy = __decorateElement(_init20, 0, "GLNValidatorProxy", _GLNValidatorProxy_decorators, GLNValidatorProxy);
2936
- __runInitializers(_init20, 1, GLNValidatorProxy);
2937
- var _SSCCValidatorProxy_decorators, _init21, _a21;
2938
- _SSCCValidatorProxy_decorators = [proxy.describeClass(false, {
2939
- namespace: "GS1",
2940
- methodInfix: "SSCC"
2941
- })];
2942
- var SSCCValidatorProxy = class extends (_a21 = NonSerializableNumericIdentifierValidatorProxy) {
2943
- constructor(appExtension) {
2944
- super(appExtension, IdentifierValidators2.SSCC);
2945
- }
2946
- };
2947
- _init21 = __decoratorStart(_a21);
2948
- SSCCValidatorProxy = __decorateElement(_init21, 0, "SSCCValidatorProxy", _SSCCValidatorProxy_decorators, SSCCValidatorProxy);
2949
- __runInitializers(_init21, 1, SSCCValidatorProxy);
2950
- var _GRAIValidatorProxy_decorators, _init22, _a22;
2951
- _GRAIValidatorProxy_decorators = [proxy.describeClass(false, {
2952
- namespace: "GS1",
2953
- methodInfix: "GRAI"
2954
- })];
2955
- var GRAIValidatorProxy = class extends (_a22 = SerializableNumericIdentifierValidatorProxy) {
2956
- constructor(appExtension) {
2957
- super(appExtension, IdentifierValidators2.GRAI);
2958
- }
2959
- };
2960
- _init22 = __decoratorStart(_a22);
2961
- GRAIValidatorProxy = __decorateElement(_init22, 0, "GRAIValidatorProxy", _GRAIValidatorProxy_decorators, GRAIValidatorProxy);
2962
- __runInitializers(_init22, 1, GRAIValidatorProxy);
2963
- var _GIAIValidatorProxy_decorators, _init23, _a23;
2964
- _GIAIValidatorProxy_decorators = [proxy.describeClass(false, {
2965
- namespace: "GS1",
2966
- methodInfix: "GIAI"
2967
- })];
2968
- var GIAIValidatorProxy = class extends (_a23 = NonNumericIdentifierValidatorProxy) {
2969
- constructor(appExtension) {
2970
- super(appExtension, IdentifierValidators2.GIAI);
2971
- }
2972
- };
2973
- _init23 = __decoratorStart(_a23);
2974
- GIAIValidatorProxy = __decorateElement(_init23, 0, "GIAIValidatorProxy", _GIAIValidatorProxy_decorators, GIAIValidatorProxy);
2975
- __runInitializers(_init23, 1, GIAIValidatorProxy);
2976
- var _GSRNValidatorProxy_decorators, _init24, _a24;
2977
- _GSRNValidatorProxy_decorators = [proxy.describeClass(false, {
2978
- namespace: "GS1",
2979
- methodInfix: "GSRN"
2980
- })];
2981
- var GSRNValidatorProxy = class extends (_a24 = NonSerializableNumericIdentifierValidatorProxy) {
2982
- constructor(appExtension) {
2983
- super(appExtension, IdentifierValidators2.GSRN);
2984
- }
2985
- };
2986
- _init24 = __decoratorStart(_a24);
2987
- GSRNValidatorProxy = __decorateElement(_init24, 0, "GSRNValidatorProxy", _GSRNValidatorProxy_decorators, GSRNValidatorProxy);
2988
- __runInitializers(_init24, 1, GSRNValidatorProxy);
2989
- var _GDTIValidatorProxy_decorators, _init25, _a25;
2990
- _GDTIValidatorProxy_decorators = [proxy.describeClass(false, {
2991
- namespace: "GS1",
2992
- methodInfix: "GDTI"
2993
- })];
2994
- var GDTIValidatorProxy = class extends (_a25 = SerializableNumericIdentifierValidatorProxy) {
2995
- constructor(appExtension) {
2996
- super(appExtension, IdentifierValidators2.GDTI);
2997
- }
2998
- };
2999
- _init25 = __decoratorStart(_a25);
3000
- GDTIValidatorProxy = __decorateElement(_init25, 0, "GDTIValidatorProxy", _GDTIValidatorProxy_decorators, GDTIValidatorProxy);
3001
- __runInitializers(_init25, 1, GDTIValidatorProxy);
3002
- var _GINCValidatorProxy_decorators, _init26, _a26;
3003
- _GINCValidatorProxy_decorators = [proxy.describeClass(false, {
3004
- namespace: "GS1",
3005
- methodInfix: "GINC"
3006
- })];
3007
- var GINCValidatorProxy = class extends (_a26 = NonNumericIdentifierValidatorProxy) {
3008
- constructor(appExtension) {
3009
- super(appExtension, IdentifierValidators2.GINC);
3010
- }
3011
- };
3012
- _init26 = __decoratorStart(_a26);
3013
- GINCValidatorProxy = __decorateElement(_init26, 0, "GINCValidatorProxy", _GINCValidatorProxy_decorators, GINCValidatorProxy);
3014
- __runInitializers(_init26, 1, GINCValidatorProxy);
3015
- var _GSINValidatorProxy_decorators, _init27, _a27;
3016
- _GSINValidatorProxy_decorators = [proxy.describeClass(false, {
3017
- namespace: "GS1",
3018
- methodInfix: "GSIN"
3019
- })];
3020
- var GSINValidatorProxy = class extends (_a27 = NonSerializableNumericIdentifierValidatorProxy) {
3021
- constructor(appExtension) {
3022
- super(appExtension, IdentifierValidators2.GSIN);
3023
- }
3024
- };
3025
- _init27 = __decoratorStart(_a27);
3026
- GSINValidatorProxy = __decorateElement(_init27, 0, "GSINValidatorProxy", _GSINValidatorProxy_decorators, GSINValidatorProxy);
3027
- __runInitializers(_init27, 1, GSINValidatorProxy);
3028
- var _GCNValidatorProxy_decorators, _init28, _a28;
3029
- _GCNValidatorProxy_decorators = [proxy.describeClass(false, {
3030
- namespace: "GS1",
3031
- methodInfix: "GCN"
3032
- })];
3033
- var GCNValidatorProxy = class extends (_a28 = SerializableNumericIdentifierValidatorProxy) {
3034
- constructor(appExtension) {
3035
- super(appExtension, IdentifierValidators2.GCN);
3036
- }
3037
- };
3038
- _init28 = __decoratorStart(_a28);
3039
- GCNValidatorProxy = __decorateElement(_init28, 0, "GCNValidatorProxy", _GCNValidatorProxy_decorators, GCNValidatorProxy);
3040
- __runInitializers(_init28, 1, GCNValidatorProxy);
3041
- var _CPIDValidatorProxy_decorators, _init29, _a29;
3042
- _CPIDValidatorProxy_decorators = [proxy.describeClass(false, {
3043
- namespace: "GS1",
3044
- methodInfix: "CPID"
3045
- })];
3046
- var CPIDValidatorProxy = class extends (_a29 = NonNumericIdentifierValidatorProxy) {
3047
- constructor(appExtension) {
3048
- super(appExtension, IdentifierValidators2.CPID);
3049
- }
3050
- };
3051
- _init29 = __decoratorStart(_a29);
3052
- CPIDValidatorProxy = __decorateElement(_init29, 0, "CPIDValidatorProxy", _CPIDValidatorProxy_decorators, CPIDValidatorProxy);
3053
- __runInitializers(_init29, 1, CPIDValidatorProxy);
3054
- var _GMNValidatorProxy_decorators, _init30, _a30;
3055
- _GMNValidatorProxy_decorators = [proxy.describeClass(false, {
3056
- namespace: "GS1",
3057
- methodInfix: "GMN"
3058
- })];
3059
- var GMNValidatorProxy = class extends (_a30 = NonNumericIdentifierValidatorProxy) {
3060
- constructor(appExtension) {
3061
- super(appExtension, IdentifierValidators2.GMN);
3062
- }
3063
- };
3064
- _init30 = __decoratorStart(_a30);
3065
- GMNValidatorProxy = __decorateElement(_init30, 0, "GMNValidatorProxy", _GMNValidatorProxy_decorators, GMNValidatorProxy);
3066
- __runInitializers(_init30, 1, GMNValidatorProxy);
3067
-
3068
- // src/gs1/prefix-manager-proxy.ts
3069
- var prefixParameterDescriptor = {
3070
- name: "prefix",
3071
- type: Types.String,
3072
- isMatrix: false,
3073
- isRequired: true
3074
- };
3075
- var prefixTypeParameterDescriptor = {
3076
- name: "prefixType",
3077
- type: Types.Number,
3078
- isMatrix: false,
3079
- isRequired: false
3080
- };
3081
- var tweakFactorParameterDescriptor = {
3082
- name: "tweakFactor",
3083
- type: Types.Number,
3084
- isMatrix: false,
3085
- isRequired: false
3086
- };
3087
- var _definePrefix_dec, _a31, _PrefixManagerProxy_decorators, _init31;
3088
- _PrefixManagerProxy_decorators = [proxy.describeClass(false, {
3089
- namespace: "GS1"
3090
- })];
3091
- var PrefixManagerProxy = class extends (_a31 = LibProxy, _definePrefix_dec = [proxy.describeMethod({
3092
- type: Types.Any,
3093
- isMatrix: true,
3094
- parameterDescriptors: [prefixParameterDescriptor, prefixTypeParameterDescriptor, tweakFactorParameterDescriptor]
3095
- })], _a31) {
3096
- constructor() {
3097
- super(...arguments);
3098
- __runInitializers(_init31, 5, this);
3099
- }
3100
- definePrefix(prefix, prefixType, tweakFactor) {
3101
- return [[prefix, prefixType, tweakFactor]];
3102
- }
3103
- };
3104
- _init31 = __decoratorStart(_a31);
3105
- __decorateElement(_init31, 1, "definePrefix", _definePrefix_dec, PrefixManagerProxy);
3106
- PrefixManagerProxy = __decorateElement(_init31, 0, "PrefixManagerProxy", _PrefixManagerProxy_decorators, PrefixManagerProxy);
3107
- __runInitializers(_init31, 1, PrefixManagerProxy);
3108
-
3109
- // src/gs1/gtin-creator-proxy.ts
3110
- import { GTINCreator } from "@aidc-toolkit/gs1";
3111
-
3112
- // src/gs1/identifier-creator-proxy.ts
3113
- import { isNullish as isNullish2 } from "@aidc-toolkit/core";
3114
- import {
3115
- PrefixManager,
3116
- PrefixTypes,
3117
- PrefixValidator
3118
- } from "@aidc-toolkit/gs1";
3119
- import { Sequence as Sequence3 } from "@aidc-toolkit/utility";
3120
-
3121
- // src/gs1/prefix-definition-descriptor.ts
3122
- var prefixDefinitionParameterDescriptor = {
3123
- name: "prefixDefinition",
3124
- type: Types.Any,
3125
- isMatrix: true,
3126
- isRequired: true
3127
- };
3128
- var prefixDefinitionGS1UPCParameterDescriptor = {
3129
- extendsDescriptor: prefixDefinitionParameterDescriptor,
3130
- name: "prefixDefinitionGS1UPC"
3131
- };
3132
- var prefixDefinitionAnyParameterDescriptor = {
3133
- extendsDescriptor: prefixDefinitionParameterDescriptor,
3134
- name: "prefixDefinitionAny"
3135
- };
3136
-
3137
- // src/gs1/identifier-creator-proxy.ts
3138
- var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
3139
- static #PREFIX_TYPES = [PrefixTypes.GS1CompanyPrefix, PrefixTypes.UPCCompanyPrefix, PrefixTypes.GS18Prefix];
3140
- #getCreator;
3141
- constructor(appExtension, getCreator) {
3142
- super(appExtension);
3143
- this.#getCreator = getCreator;
3144
- }
3145
- getCreator(prefixDefinition) {
3146
- const reducedPrefixDefinition = prefixDefinition.length === 1 ? (
3147
- // Prefix definition is horizontal.
3148
- prefixDefinition[0]
3149
- ) : (
3150
- // Prefix definition is vertical.
3151
- prefixDefinition.map((prefixDefinitionRow) => {
3152
- if (prefixDefinitionRow.length !== 1) {
3153
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.prefixDefinitionMustBeOneDimensional"));
3154
- }
3155
- return prefixDefinitionRow[0];
3156
- })
3157
- );
3158
- if (reducedPrefixDefinition.length > 3) {
3159
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.prefixDefinitionMustHaveMaximumThreeElements"));
3160
- }
3161
- const prefix = reducedPrefixDefinition[0];
3162
- if (typeof prefix !== "string") {
3163
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.prefixMustBeString"));
3164
- }
3165
- const prefixTypeIndex = reducedPrefixDefinition[1] ?? 0;
3166
- if (typeof prefixTypeIndex !== "number" || prefixTypeIndex < 0 || prefixTypeIndex >= _IdentifierCreatorProxy.#PREFIX_TYPES.length) {
3167
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.prefixTypeMustBeNumber", {
3168
- maximumPrefixType: _IdentifierCreatorProxy.#PREFIX_TYPES.length - 1
3169
- }));
3170
- }
3171
- const prefixType = _IdentifierCreatorProxy.#PREFIX_TYPES[prefixTypeIndex];
3172
- if (prefixType === void 0) {
3173
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.invalidPrefixType"));
3174
- }
3175
- const prefixManager = PrefixManager.get(prefixType, prefix);
3176
- const tweakFactor = reducedPrefixDefinition[2];
3177
- if (!isNullish2(tweakFactor)) {
3178
- if (typeof tweakFactor !== "number") {
3179
- throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.tweakFactorMustBeNumber"));
3180
- }
3181
- prefixManager.tweakFactor = tweakFactor;
3182
- } else {
3183
- prefixManager.resetTweakFactor();
3184
- }
3185
- return this.#getCreator(prefixManager);
3186
- }
3187
- };
3188
- var sparseParameterDescriptor = {
3189
- name: "sparse",
3190
- type: Types.Boolean,
3191
- isMatrix: false,
3192
- isRequired: false
3193
- };
3194
- var _createAll_dec, _createSequence_dec2, _create_dec2, _a32, _NumericIdentifierCreatorProxy_decorators, _init32;
3195
- _NumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3196
- namespace: "GS1"
3197
- })];
3198
- var NumericIdentifierCreatorProxy = class extends (_a32 = IdentifierCreatorProxy, _create_dec2 = [proxy.describeMethod({
3199
- type: Types.String,
3200
- isMatrix: true,
3201
- parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3202
- })], _createSequence_dec2 = [proxy.describeMethod({
3203
- infixBefore: "Sequence",
3204
- type: Types.String,
3205
- isMatrix: true,
3206
- parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, sparseParameterDescriptor]
3207
- })], _createAll_dec = [proxy.describeMethod({
3208
- type: Types.String,
3209
- isMatrix: true,
3210
- parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor]
3211
- })], _a32) {
3212
- constructor() {
3213
- super(...arguments);
3214
- __runInitializers(_init32, 5, this);
3215
- }
3216
- create(prefixDefinition, matrixValues, sparse) {
3217
- const creator = this.getCreator(prefixDefinition);
3218
- const sparseOrUndefined = sparse ?? void 0;
3219
- return this.mapMatrix(matrixValues, (value) => creator.create(value, sparseOrUndefined));
3220
- }
3221
- createSequence(prefixDefinition, startValue, count, sparse) {
3222
- this.appExtension.validateSequenceCount(count);
3223
- return LibProxy.matrixResult(this.getCreator(prefixDefinition).create(new Sequence3(startValue, count), sparse ?? void 0));
3224
- }
3225
- createAll(prefixDefinition) {
3226
- const creator = this.getCreator(prefixDefinition);
3227
- this.appExtension.validateSequenceCount(creator.capacity);
3228
- return LibProxy.matrixResult(creator.createAll());
3229
- }
3230
- };
3231
- _init32 = __decoratorStart(_a32);
3232
- __decorateElement(_init32, 1, "create", _create_dec2, NumericIdentifierCreatorProxy);
3233
- __decorateElement(_init32, 1, "createSequence", _createSequence_dec2, NumericIdentifierCreatorProxy);
3234
- __decorateElement(_init32, 1, "createAll", _createAll_dec, NumericIdentifierCreatorProxy);
3235
- NumericIdentifierCreatorProxy = __decorateElement(_init32, 0, "NumericIdentifierCreatorProxy", _NumericIdentifierCreatorProxy_decorators, NumericIdentifierCreatorProxy);
3236
- __runInitializers(_init32, 1, NumericIdentifierCreatorProxy);
3237
- var NonGTINNumericIdentifierCreatorProxy = class extends NumericIdentifierCreatorProxy {
3238
- };
3239
- var NonSerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
3240
- };
3241
- var singleValueParameterDescriptor = {
3242
- extendsDescriptor: valueParameterDescriptor,
3243
- isMatrix: false
3244
- };
3245
- var baseIdentifierParameterDescriptor = {
3246
- extendsDescriptor: identifierParameterDescriptor,
3247
- name: "baseIdentifier",
3248
- isMatrix: false
3249
- };
3250
- var serialComponentParameterDescriptor = {
3251
- name: "serialComponent",
3252
- type: Types.String,
3253
- isMatrix: true,
3254
- isRequired: true
3255
- };
3256
- var _concatenate_dec, _createSerialized_dec, _a33, _SerializableNumericIdentifierCreatorProxy_decorators, _init33;
3257
- _SerializableNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3258
- namespace: "GS1"
3259
- })];
3260
- var SerializableNumericIdentifierCreatorProxy = class extends (_a33 = NonGTINNumericIdentifierCreatorProxy, _createSerialized_dec = [proxy.describeMethod({
3261
- type: Types.String,
3262
- isMatrix: true,
3263
- parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, singleValueParameterDescriptor, serialComponentParameterDescriptor, sparseParameterDescriptor]
3264
- })], _concatenate_dec = [proxy.describeMethod({
3265
- type: Types.String,
3266
- isMatrix: true,
3267
- parameterDescriptors: [baseIdentifierParameterDescriptor, serialComponentParameterDescriptor]
3268
- })], _a33) {
3269
- constructor() {
3270
- super(...arguments);
3271
- __runInitializers(_init33, 5, this);
3272
- }
3273
- createSerialized(prefixDefinition, value, matrixSerialComponents, sparse) {
3274
- const creator = this.getCreator(prefixDefinition);
3275
- const sparseOrUndefined = sparse ?? void 0;
3276
- return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.createSerialized(value, serialComponent, sparseOrUndefined));
3277
- }
3278
- concatenate(baseIdentifier, matrixSerialComponents) {
3279
- const creator = this.getCreator([[baseIdentifier.substring(0, !baseIdentifier.startsWith("0") ? PrefixValidator.GS1_COMPANY_PREFIX_MINIMUM_LENGTH : PrefixValidator.UPC_COMPANY_PREFIX_MINIMUM_LENGTH + 1), PrefixTypes.GS1CompanyPrefix]]);
3280
- return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.concatenate(baseIdentifier, serialComponent));
3281
- }
3282
- };
3283
- _init33 = __decoratorStart(_a33);
3284
- __decorateElement(_init33, 1, "createSerialized", _createSerialized_dec, SerializableNumericIdentifierCreatorProxy);
3285
- __decorateElement(_init33, 1, "concatenate", _concatenate_dec, SerializableNumericIdentifierCreatorProxy);
3286
- SerializableNumericIdentifierCreatorProxy = __decorateElement(_init33, 0, "SerializableNumericIdentifierCreatorProxy", _SerializableNumericIdentifierCreatorProxy_decorators, SerializableNumericIdentifierCreatorProxy);
3287
- __runInitializers(_init33, 1, SerializableNumericIdentifierCreatorProxy);
3288
- var referenceParameterDescriptor = {
3289
- name: "reference",
3290
- type: Types.String,
3291
- isMatrix: true,
3292
- isRequired: true
3293
- };
3294
- var _create_dec3, _a34, _NonNumericIdentifierCreatorProxy_decorators, _init34;
3295
- _NonNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3296
- namespace: "GS1"
3297
- })];
3298
- var NonNumericIdentifierCreatorProxy = class extends (_a34 = IdentifierCreatorProxy, _create_dec3 = [proxy.describeMethod({
3299
- type: Types.String,
3300
- isMatrix: true,
3301
- parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, referenceParameterDescriptor]
3302
- })], _a34) {
3303
- constructor() {
3304
- super(...arguments);
3305
- __runInitializers(_init34, 5, this);
3306
- }
3307
- create(prefixDefinition, matrixReferences) {
3308
- const creator = this.getCreator(prefixDefinition);
3309
- return this.mapMatrix(matrixReferences, (reference) => creator.create(reference));
3310
- }
3311
- };
3312
- _init34 = __decoratorStart(_a34);
3313
- __decorateElement(_init34, 1, "create", _create_dec3, NonNumericIdentifierCreatorProxy);
3314
- NonNumericIdentifierCreatorProxy = __decorateElement(_init34, 0, "NonNumericIdentifierCreatorProxy", _NonNumericIdentifierCreatorProxy_decorators, NonNumericIdentifierCreatorProxy);
3315
- __runInitializers(_init34, 1, NonNumericIdentifierCreatorProxy);
3316
-
3317
- // src/gs1/gtin-creator-proxy.ts
3318
- var _createVariableMeasureRCN_dec, _createGTIN14_dec, _a35, _GTINCreatorProxy_decorators, _init35;
3319
- _GTINCreatorProxy_decorators = [proxy.describeClass(false, {
3320
- namespace: "GS1",
3321
- methodInfix: "GTIN",
3322
- replaceParameterDescriptors: [
3323
- {
3324
- name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3325
- replacement: prefixDefinitionAnyParameterDescriptor
3326
- }
3327
- ]
3328
- })];
3329
- var GTINCreatorProxy = class extends (_a35 = NumericIdentifierCreatorProxy, _createGTIN14_dec = [proxy.describeMethod({
3330
- type: Types.String,
3331
- isMatrix: true,
3332
- ignoreInfix: true,
3333
- parameterDescriptors: [indicatorDigitParameterDescriptor, prefixDefinitionAnyParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3334
- })], _createVariableMeasureRCN_dec = [proxy.describeMethod({
3335
- type: Types.String,
3336
- isMatrix: true,
3337
- ignoreInfix: true,
3338
- parameterDescriptors: [rcnFormatParameterDescriptor, rcnItemReferenceParameterDescriptor, rcnPriceOrWeightParameterDescriptor]
3339
- })], _a35) {
3340
- constructor(appExtension) {
3341
- super(appExtension, (prefixManager) => prefixManager.gtinCreator);
3342
- __runInitializers(_init35, 5, this);
3343
- }
3344
- createGTIN14(indicatorDigit, prefixDefinition, matrixValues, sparse) {
3345
- const creator = this.getCreator(prefixDefinition);
3346
- const sparseOrUndefined = sparse ?? void 0;
3347
- return this.mapMatrix(matrixValues, (value) => creator.createGTIN14(indicatorDigit, value, sparseOrUndefined));
3348
- }
3349
- createVariableMeasureRCN(format, itemReference, matrixPricesOrWeights) {
3350
- return this.mapMatrix(matrixPricesOrWeights, (priceOrWeight) => GTINCreator.createVariableMeasureRCN(format, itemReference, priceOrWeight));
3351
- }
3352
- };
3353
- _init35 = __decoratorStart(_a35);
3354
- __decorateElement(_init35, 1, "createGTIN14", _createGTIN14_dec, GTINCreatorProxy);
3355
- __decorateElement(_init35, 1, "createVariableMeasureRCN", _createVariableMeasureRCN_dec, GTINCreatorProxy);
3356
- GTINCreatorProxy = __decorateElement(_init35, 0, "GTINCreatorProxy", _GTINCreatorProxy_decorators, GTINCreatorProxy);
3357
- __runInitializers(_init35, 1, GTINCreatorProxy);
3358
-
3359
- // src/gs1/non-gtin-creator-proxy.ts
3360
- var _GLNCreatorProxy_decorators, _init36, _a36;
3361
- _GLNCreatorProxy_decorators = [proxy.describeClass(false, {
3362
- namespace: "GS1",
3363
- methodInfix: "GLN"
3364
- })];
3365
- var GLNCreatorProxy = class extends (_a36 = NonSerializableNumericIdentifierCreatorProxy) {
3366
- constructor(appExtension) {
3367
- super(appExtension, (prefixManager) => prefixManager.glnCreator);
3368
- }
3369
- };
3370
- _init36 = __decoratorStart(_a36);
3371
- GLNCreatorProxy = __decorateElement(_init36, 0, "GLNCreatorProxy", _GLNCreatorProxy_decorators, GLNCreatorProxy);
3372
- __runInitializers(_init36, 1, GLNCreatorProxy);
3373
- var _SSCCCreatorProxy_decorators, _init37, _a37;
3374
- _SSCCCreatorProxy_decorators = [proxy.describeClass(false, {
3375
- namespace: "GS1",
3376
- methodInfix: "SSCC"
3377
- })];
3378
- var SSCCCreatorProxy = class extends (_a37 = NonSerializableNumericIdentifierCreatorProxy) {
3379
- constructor(appExtension) {
3380
- super(appExtension, (prefixManager) => prefixManager.ssccCreator);
3381
- }
3382
- };
3383
- _init37 = __decoratorStart(_a37);
3384
- SSCCCreatorProxy = __decorateElement(_init37, 0, "SSCCCreatorProxy", _SSCCCreatorProxy_decorators, SSCCCreatorProxy);
3385
- __runInitializers(_init37, 1, SSCCCreatorProxy);
3386
- var _GRAICreatorProxy_decorators, _init38, _a38;
3387
- _GRAICreatorProxy_decorators = [proxy.describeClass(false, {
3388
- namespace: "GS1",
3389
- methodInfix: "GRAI"
3390
- })];
3391
- var GRAICreatorProxy = class extends (_a38 = SerializableNumericIdentifierCreatorProxy) {
3392
- constructor(appExtension) {
3393
- super(appExtension, (prefixManager) => prefixManager.graiCreator);
3394
- }
3395
- };
3396
- _init38 = __decoratorStart(_a38);
3397
- GRAICreatorProxy = __decorateElement(_init38, 0, "GRAICreatorProxy", _GRAICreatorProxy_decorators, GRAICreatorProxy);
3398
- __runInitializers(_init38, 1, GRAICreatorProxy);
3399
- var _GIAICreatorProxy_decorators, _init39, _a39;
3400
- _GIAICreatorProxy_decorators = [proxy.describeClass(false, {
3401
- namespace: "GS1",
3402
- methodInfix: "GIAI"
3403
- })];
3404
- var GIAICreatorProxy = class extends (_a39 = NonNumericIdentifierCreatorProxy) {
3405
- constructor(appExtension) {
3406
- super(appExtension, (prefixManager) => prefixManager.giaiCreator);
3407
- }
3408
- };
3409
- _init39 = __decoratorStart(_a39);
3410
- GIAICreatorProxy = __decorateElement(_init39, 0, "GIAICreatorProxy", _GIAICreatorProxy_decorators, GIAICreatorProxy);
3411
- __runInitializers(_init39, 1, GIAICreatorProxy);
3412
- var _GSRNCreatorProxy_decorators, _init40, _a40;
3413
- _GSRNCreatorProxy_decorators = [proxy.describeClass(false, {
3414
- namespace: "GS1",
3415
- methodInfix: "GSRN"
3416
- })];
3417
- var GSRNCreatorProxy = class extends (_a40 = NonSerializableNumericIdentifierCreatorProxy) {
3418
- constructor(appExtension) {
3419
- super(appExtension, (prefixManager) => prefixManager.gsrnCreator);
3420
- }
3421
- };
3422
- _init40 = __decoratorStart(_a40);
3423
- GSRNCreatorProxy = __decorateElement(_init40, 0, "GSRNCreatorProxy", _GSRNCreatorProxy_decorators, GSRNCreatorProxy);
3424
- __runInitializers(_init40, 1, GSRNCreatorProxy);
3425
- var _GDTICreatorProxy_decorators, _init41, _a41;
3426
- _GDTICreatorProxy_decorators = [proxy.describeClass(false, {
3427
- namespace: "GS1",
3428
- methodInfix: "GDTI"
3429
- })];
3430
- var GDTICreatorProxy = class extends (_a41 = SerializableNumericIdentifierCreatorProxy) {
3431
- constructor(appExtension) {
3432
- super(appExtension, (prefixManager) => prefixManager.gdtiCreator);
3433
- }
3434
- };
3435
- _init41 = __decoratorStart(_a41);
3436
- GDTICreatorProxy = __decorateElement(_init41, 0, "GDTICreatorProxy", _GDTICreatorProxy_decorators, GDTICreatorProxy);
3437
- __runInitializers(_init41, 1, GDTICreatorProxy);
3438
- var _GINCCreatorProxy_decorators, _init42, _a42;
3439
- _GINCCreatorProxy_decorators = [proxy.describeClass(false, {
3440
- namespace: "GS1",
3441
- methodInfix: "GINC"
3442
- })];
3443
- var GINCCreatorProxy = class extends (_a42 = NonNumericIdentifierCreatorProxy) {
3444
- constructor(appExtension) {
3445
- super(appExtension, (prefixManager) => prefixManager.gincCreator);
3446
- }
3447
- };
3448
- _init42 = __decoratorStart(_a42);
3449
- GINCCreatorProxy = __decorateElement(_init42, 0, "GINCCreatorProxy", _GINCCreatorProxy_decorators, GINCCreatorProxy);
3450
- __runInitializers(_init42, 1, GINCCreatorProxy);
3451
- var _GSINCreatorProxy_decorators, _init43, _a43;
3452
- _GSINCreatorProxy_decorators = [proxy.describeClass(false, {
3453
- namespace: "GS1",
3454
- methodInfix: "GSIN"
3455
- })];
3456
- var GSINCreatorProxy = class extends (_a43 = NonSerializableNumericIdentifierCreatorProxy) {
3457
- constructor(appExtension) {
3458
- super(appExtension, (prefixManager) => prefixManager.gsinCreator);
3459
- }
3460
- };
3461
- _init43 = __decoratorStart(_a43);
3462
- GSINCreatorProxy = __decorateElement(_init43, 0, "GSINCreatorProxy", _GSINCreatorProxy_decorators, GSINCreatorProxy);
3463
- __runInitializers(_init43, 1, GSINCreatorProxy);
3464
- var _GCNCreatorProxy_decorators, _init44, _a44;
3465
- _GCNCreatorProxy_decorators = [proxy.describeClass(false, {
3466
- namespace: "GS1",
3467
- methodInfix: "GCN"
3468
- })];
3469
- var GCNCreatorProxy = class extends (_a44 = SerializableNumericIdentifierCreatorProxy) {
3470
- constructor(appExtension) {
3471
- super(appExtension, (prefixManager) => prefixManager.gcnCreator);
3472
- }
3473
- };
3474
- _init44 = __decoratorStart(_a44);
3475
- GCNCreatorProxy = __decorateElement(_init44, 0, "GCNCreatorProxy", _GCNCreatorProxy_decorators, GCNCreatorProxy);
3476
- __runInitializers(_init44, 1, GCNCreatorProxy);
3477
- var _CPIDCreatorProxy_decorators, _init45, _a45;
3478
- _CPIDCreatorProxy_decorators = [proxy.describeClass(false, {
3479
- namespace: "GS1",
3480
- methodInfix: "CPID"
3481
- })];
3482
- var CPIDCreatorProxy = class extends (_a45 = NonNumericIdentifierCreatorProxy) {
3483
- constructor(appExtension) {
3484
- super(appExtension, (prefixManager) => prefixManager.cpidCreator);
3485
- }
3486
- };
3487
- _init45 = __decoratorStart(_a45);
3488
- CPIDCreatorProxy = __decorateElement(_init45, 0, "CPIDCreatorProxy", _CPIDCreatorProxy_decorators, CPIDCreatorProxy);
3489
- __runInitializers(_init45, 1, CPIDCreatorProxy);
3490
- var _GMNCreatorProxy_decorators, _init46, _a46;
3491
- _GMNCreatorProxy_decorators = [proxy.describeClass(false, {
3492
- namespace: "GS1",
3493
- methodInfix: "GMN"
3494
- })];
3495
- var GMNCreatorProxy = class extends (_a46 = NonNumericIdentifierCreatorProxy) {
3496
- constructor(appExtension) {
3497
- super(appExtension, (prefixManager) => prefixManager.gmnCreator);
3498
- }
3499
- };
3500
- _init46 = __decoratorStart(_a46);
3501
- GMNCreatorProxy = __decorateElement(_init46, 0, "GMNCreatorProxy", _GMNCreatorProxy_decorators, GMNCreatorProxy);
3502
- __runInitializers(_init46, 1, GMNCreatorProxy);
3503
-
3504
- // src/generator/generator.ts
3505
- import { I18nEnvironments } from "@aidc-toolkit/core";
3506
- function registerProxies(..._proxies) {
3507
- }
3508
- registerProxies(AppUtilityProxy, utility_exports, gs1_exports);
3509
- var Generator = class _Generator {
3510
- /**
3511
- * Documentation base URL.
3512
- */
3513
- static #DOCUMENTATION_BASE_URL = "https://aidc-toolkit.com/";
3514
- /**
3515
- * Documentation path, optionally preceded by locale.
3516
- */
3517
- static #DOCUMENTATION_PATH = "app-extension/";
3518
- /**
3519
- * Locales.
3520
- */
3521
- #locales;
3522
- /**
3523
- * Default locale.
3524
- */
3525
- #defaultLocale;
3526
- /**
3527
- * Map of function localizations maps by namespace function name.
3528
- */
3529
- #functionLocalizationsMapsMap = /* @__PURE__ */ new Map();
3530
- /**
3531
- * Constructor.
3532
- *
3533
- * @param includeLocalizations
3534
- * Include localizations if true.
3535
- */
3536
- constructor(includeLocalizations = true) {
3537
- this.#locales = includeLocalizations ? Object.keys(appExtensionResources) : [];
3538
- this.#defaultLocale = this.#locales[0] ?? "";
3539
- }
3540
- /**
3541
- * Get the locales.
3542
- */
3543
- get locales() {
3544
- return this.#locales;
3545
- }
3546
- /**
3547
- * Get the default locale.
3548
- */
3549
- get defaultLocale() {
3550
- return this.#defaultLocale;
3551
- }
3552
- /**
3553
- * Get function localization.
3554
- *
3555
- * @param locale
3556
- * Locale.
3557
- *
3558
- * @param namespaceFunctionName
3559
- * Namespace function name.
3560
- *
3561
- * @returns
3562
- * Function localization.
3563
- */
3564
- getFunctionLocalization(locale, namespaceFunctionName) {
3565
- const functionLocalization = this.#functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
3566
- if (functionLocalization === void 0) {
3567
- throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
3568
- }
3569
- return functionLocalization;
3570
- }
3571
- /**
3572
- * Get parameter localization.
3573
- *
3574
- * @param locale
3575
- * Locale.
3576
- *
3577
- * @param namespaceFunctionName
3578
- * Namespace function name.
3579
- *
3580
- * @param parameterName
3581
- * Parameter name.
3582
- *
3583
- * @returns
3584
- * Parameter localization.
3585
- */
3586
- getParameterLocalization(locale, namespaceFunctionName, parameterName) {
3587
- const parameterLocalization = this.getFunctionLocalization(locale, namespaceFunctionName).parametersMap.get(parameterName);
3588
- if (parameterLocalization === void 0) {
3589
- throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
3590
- }
3591
- return parameterLocalization;
3592
- }
3593
- /**
3594
- * Generate a localization.
3595
- *
3596
- * @template TLocalization
3597
- * Localization type.
3598
- *
3599
- * @param locale
3600
- * Locale.
3601
- *
3602
- * @param localizedKeyPrefix
3603
- * Localized key prefix.
3604
- *
3605
- * @param namespacePrefix
3606
- * Namespace prefix to be appended to name.
3607
- *
3608
- * @param localizationCallback
3609
- * Callback to finalize localization.
3610
- *
3611
- * @returns
3612
- * Localization.
3613
- */
3614
- #generateLocalization(locale, localizedKeyPrefix, namespacePrefix, localizationCallback) {
3615
- const lngOption = {
3616
- lng: locale
3617
- };
3618
- return localizationCallback(locale, {
3619
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3620
- name: `${namespacePrefix}${i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption)}`,
3621
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3622
- description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3623
- });
3624
- }
3625
- /**
3626
- * Generate by processing individual imports.
3627
- */
3628
- async generate() {
3629
- let success = false;
3630
- await i18nAppExtensionInit(I18nEnvironments.CLI);
3631
- this.initialize();
3632
- try {
3633
- for (const [_namespaceClassName, classDescriptor] of proxy.classDescriptorsMap.entries()) {
3634
- const namespace = classDescriptor.namespace;
3635
- const namespacePrefix = namespace === void 0 ? "" : `${namespace}.`;
3636
- const namespacePath = namespace === void 0 ? "" : `${namespace}/`;
3637
- this.createProxyObject(classDescriptor);
3638
- for (const methodDescriptor of classDescriptor.methodDescriptors) {
3639
- const namespaceFunctionName = methodDescriptor.namespaceFunctionName;
3640
- const functionLocalizationsMap = new Map(this.#locales.map(
3641
- (locale) => [locale, this.#generateLocalization(locale, `Functions.${namespaceFunctionName}.`, namespacePrefix, (locale2, localization) => ({
3642
- ...localization,
3643
- documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale2 === this.defaultLocale ? "" : `${locale2}/`}${_Generator.#DOCUMENTATION_PATH}${namespacePath}${localization.name}.html`,
3644
- parametersMap: new Map(methodDescriptor.parameterDescriptors.map(
3645
- (parameterDescriptor) => (
3646
- // eslint-disable-next-line max-nested-callbacks -- Callback is empty.
3647
- [parameterDescriptor.name, this.#generateLocalization(locale2, `Parameters.${parameterDescriptor.name}.`, "", (_locale, localization2) => localization2)]
3648
- )
3649
- ))
3650
- }))]
3651
- ));
3652
- this.#functionLocalizationsMapsMap.set(namespaceFunctionName, functionLocalizationsMap);
3653
- this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);
3654
- }
3655
- }
3656
- success = true;
3657
- } finally {
3658
- await this.finalize(success);
3659
- }
3660
- }
3661
- };
3662
- export {
3663
- AlphabeticProxy,
3664
- AlphanumericProxy,
3665
- AppExtension,
3666
- AppUtilityProxy,
3667
- CharacterSetCreatorProxy,
3668
- CharacterSetValidatorProxy,
3669
- gs1_exports as GS1,
3670
- Generator,
3671
- HexadecimalProxy,
3672
- LibProxy,
3673
- NumericProxy,
3674
- RegExpProxy,
3675
- TransformerProxy,
3676
- Types,
3677
- appExtensionNS,
3678
- appExtensionResources,
3679
- expandParameterDescriptor,
3680
- i18nAppExtensionInit,
3681
- i18nextAppExtension
3682
- };
1
+ var po=Object.create;var jt=Object.defineProperty;var uo=Object.getOwnPropertyDescriptor;var Ti=(a,e)=>(e=Symbol[a])?e:Symbol.for("Symbol."+a),Ae=a=>{throw TypeError(a)};var mo=(a,e,t)=>e in a?jt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var gi=(a,e)=>jt(a,"name",{value:e,configurable:!0});var xi=(a,e)=>{for(var t in e)jt(a,t,{get:e[t],enumerable:!0})};var x=a=>[,,,po(a?.[Ti("metadata")]??null)],Ii=["class","method","getter","setter","accessor","field","value","get","set"],Gt=a=>a!==void 0&&typeof a!="function"?Ae("Function expected"):a,ho=(a,e,t,r,i)=>({kind:Ii[a],name:e,metadata:r,addInitializer:n=>t._?Ae("Already initialized"):i.push(Gt(n||null))}),fo=(a,e)=>mo(e,Ti("metadata"),a[3]),g=(a,e,t,r)=>{for(var i=0,n=a[e>>1],o=n&&n.length;i<o;i++)e&1?n[i].call(t):r=n[i].call(t,r);return r},u=(a,e,t,r,i,n)=>{var o,s,c,l,h,p=e&7,C=!!(e&8),T=!!(e&16),I=p>3?a.length+1:p?C?1:2:0,D=Ii[p+5],N=p>3&&(a[I-1]=[]),y=a[I]||(a[I]=[]),S=p&&(!T&&!C&&(i=i.prototype),p<5&&(p>3||!T)&&uo(p<4?i:{get[t](){return ce(this,n)},set[t](v){return Ce(this,n,v)}},t));p?T&&p<4&&gi(n,(p>2?"set ":p>1?"get ":"")+t):gi(i,t);for(var b=r.length-1;b>=0;b--)l=ho(p,t,c={},a[3],y),p&&(l.static=C,l.private=T,h=l.access={has:T?v=>go(i,v):v=>t in v},p^3&&(h.get=T?v=>(p^1?ce:Ee)(v,i,p^4?n:S.get):v=>v[t]),p>2&&(h.set=T?(v,w)=>Ce(v,i,w,p^4?n:S.set):(v,w)=>v[t]=w)),s=(0,r[b])(p?p<4?T?n:S[D]:p>4?void 0:{get:S.get,set:S.set}:i,l),c._=1,p^4||s===void 0?Gt(s)&&(p>4?N.unshift(s):p?T?n=s:S[D]=s:i=s):typeof s!="object"||s===null?Ae("Object expected"):(Gt(o=s.get)&&(S.get=o),Gt(o=s.set)&&(S.set=o),Gt(o=s.init)&&N.unshift(o));return p||fo(a,i),S&&jt(i,t,S),T?p^4?n:S:i};var lr=(a,e,t)=>e.has(a)||Ae("Cannot "+t),go=(a,e)=>Object(e)!==e?Ae('Cannot use the "in" operator on this value'):a.has(e),ce=(a,e,t)=>(lr(a,e,"read from private field"),t?t.call(a):e.get(a)),ue=(a,e,t)=>e.has(a)?Ae("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),Ce=(a,e,t,r)=>(lr(a,e,"write to private field"),r?r.call(a,t):e.set(a,t),t),Ee=(a,e,t)=>(lr(a,e,"access private method"),t);import{i18nCoreInit as Ao,i18nInit as Lo}from"@aidc-toolkit/core";import{i18nGS1Init as Po}from"@aidc-toolkit/gs1";import{i18nUtilityInit as Oo}from"@aidc-toolkit/utility";var E=a=>typeof a=="string",Rt=()=>{let a,e,t=new Promise((r,i)=>{a=r,e=i});return t.resolve=a,t.reject=e,t},Ci=a=>a==null?"":""+a,To=(a,e,t)=>{a.forEach(r=>{e[r]&&(t[r]=e[r])})},xo=/###/g,Ei=a=>a&&a.indexOf("###")>-1?a.replace(xo,"."):a,vi=a=>!a||E(a),Mt=(a,e,t)=>{let r=E(e)?e.split("."):e,i=0;for(;i<r.length-1;){if(vi(a))return{};let n=Ei(r[i]);!a[n]&&t&&(a[n]=new t),Object.prototype.hasOwnProperty.call(a,n)?a=a[n]:a={},++i}return vi(a)?{}:{obj:a,k:Ei(r[i])}},Si=(a,e,t)=>{let{obj:r,k:i}=Mt(a,e,Object);if(r!==void 0||e.length===1){r[i]=t;return}let n=e[e.length-1],o=e.slice(0,e.length-1),s=Mt(a,o,Object);for(;s.obj===void 0&&o.length;)n=`${o[o.length-1]}.${n}`,o=o.slice(0,o.length-1),s=Mt(a,o,Object),s?.obj&&typeof s.obj[`${s.k}.${n}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${n}`]=t},Io=(a,e,t,r)=>{let{obj:i,k:n}=Mt(a,e,Object);i[n]=i[n]||[],i[n].push(t)},Ut=(a,e)=>{let{obj:t,k:r}=Mt(a,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},Co=(a,e,t)=>{let r=Ut(a,t);return r!==void 0?r:Ut(e,t)},Ri=(a,e,t)=>{for(let r in e)r!=="__proto__"&&r!=="constructor"&&(r in a?E(a[r])||a[r]instanceof String||E(e[r])||e[r]instanceof String?t&&(a[r]=e[r]):Ri(a[r],e[r],t):a[r]=e[r]);return a},Le=a=>a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Eo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},vo=a=>E(a)?a.replace(/[&<>"'\/]/g,e=>Eo[e]):a,mr=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}},So=[" ",",","?","!",";"],yo=new mr(20),bo=(a,e,t)=>{e=e||"",t=t||"";let r=So.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(r.length===0)return!0;let i=yo.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`),n=!i.test(a);if(!n){let o=a.indexOf(t);o>0&&!i.test(a.substring(0,o))&&(n=!0)}return n},hr=(a,e,t=".")=>{if(!a)return;if(a[e])return Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0;let r=e.split(t),i=a;for(let n=0;n<r.length;){if(!i||typeof i!="object")return;let o,s="";for(let c=n;c<r.length;++c)if(c!==n&&(s+=t),s+=r[c],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<r.length-1)continue;n+=c-n+1;break}i=o}return i},At=a=>a?.replace("_","-"),Do={type:"logger",log(a){this.output("log",a)},warn(a){this.output("warn",a)},error(a){this.output("error",a)},output(a,e){console?.[a]?.apply?.(console,e)}},fr=class a{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Do,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,i){return i&&!this.debug?null:(E(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new a(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new a(this.logger,e)}},re=new fr,Pe=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);let i=this.observers[r].get(t)||0;this.observers[r].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,n])=>{for(let o=0;o<n;o++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,n])=>{for(let o=0;o<n;o++)i.apply(i,[e,...t])})}},Ht=class extends Pe{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,i={}){let n=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):E(r)&&n?s.push(...r.split(n)):s.push(r)));let c=Ut(this.data,s);return!c&&!t&&!r&&e.indexOf(".")>-1&&(e=s[0],t=s[1],r=s.slice(2).join(".")),c||!o||!E(r)?c:hr(this.data?.[e]?.[t],r,n)}addResource(e,t,r,i,n={silent:!1}){let o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,s=[e,t];r&&(s=s.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(s=e.split("."),i=t,t=s[1]),this.addNamespaces(t),Si(this.data,s,i),n.silent||this.emit("added",e,t,r,i)}addResources(e,t,r,i={silent:!1}){for(let n in r)(E(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});i.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,i,n,o={silent:!1,skipCopy:!1}){let s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),i=r,r=t,t=s[1]),this.addNamespaces(t);let c=Ut(this.data,s)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Ri(c,r,n):c={...c,...r},Si(this.data,s,c),o.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}},Mi={processors:{},addPostProcessor(a){this.processors[a.name]=a},handle(a,e,t,r,i){return a.forEach(n=>{e=this.processors[n]?.process(e,t,r,i)??e}),e}},Ai=Symbol("i18next/PATH_KEY");function No(){let a=[],e=Object.create(null),t;return e.get=(r,i)=>(t?.revoke?.(),i===Ai?a:(a.push(i),t=Proxy.revocable(r,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function gr(a,e){let{[Ai]:t}=a(No());return t.join(e?.keySeparator??".")}var yi={},pr=a=>!E(a)&&typeof a!="boolean"&&typeof a!="number",Kt=class a extends Pe{constructor(e,t={}){super(),To(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=re.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(e==null)return!1;let i=this.resolve(e,r);if(i?.res===void 0)return!1;let n=pr(i.res);return!(r.returnObjects===!1&&n)}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");let i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bo(e,r,i);if(o&&!s){let c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:E(n)?[n]:n};let l=e.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(i)}return{key:e,namespaces:E(n)?[n]:n}}translate(e,t,r){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=gr(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);let n=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:c}=this.extractFromKey(e[e.length-1],i),l=c[c.length-1],h=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;h===void 0&&(h=":");let p=i.lng||this.language,C=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return C?n?{res:`${l}${h}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${h}${s}`:n?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let T=this.resolve(e,i),I=T?.res,D=T?.usedKey||s,N=T?.exactUsedKey||s,y=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=i.count!==void 0&&!E(i.count),w=a.hasDefaultValue(i),W=v?this.pluralResolver.getSuffix(p,i.count,i):"",R=i.ordinal&&v?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",P=v&&!i.ordinal&&i.count===0,L=P&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${W}`]||i[`defaultValue${R}`]||i.defaultValue,G=I;b&&!I&&w&&(G=L);let de=pr(G),Dt=Object.prototype.toString.apply(G);if(b&&G&&de&&y.indexOf(Dt)<0&&!(E(S)&&Array.isArray(G))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,G,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return n?(T.res=V,T.usedParams=this.getUsedParamsDetails(i),T):V}if(o){let V=Array.isArray(G),_=V?[]:{},mi=V?N:D;for(let te in G)if(Object.prototype.hasOwnProperty.call(G,te)){let se=`${mi}${o}${te}`;w&&!I?_[te]=this.translate(se,{...i,defaultValue:pr(L)?L[te]:void 0,joinArrays:!1,ns:c}):_[te]=this.translate(se,{...i,joinArrays:!1,ns:c}),_[te]===se&&(_[te]=G[te])}I=_}}else if(b&&E(S)&&Array.isArray(I))I=I.join(S),I&&(I=this.extendTranslation(I,e,i,r));else{let V=!1,_=!1;!this.isValidLookup(I)&&w&&(V=!0,I=L),this.isValidLookup(I)||(_=!0,I=s);let te=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&_?void 0:I,se=w&&L!==I&&this.options.updateMissing;if(_||V||se){if(this.logger.log(se?"updateKey":"missingKey",p,l,s,se?L:I),o){let F=this.resolve(s,{...i,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Nt=[],Ft=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ft&&Ft[0])for(let F=0;F<Ft.length;F++)Nt.push(Ft[F]);else this.options.saveMissingTo==="all"?Nt=this.languageUtils.toResolveHierarchy(i.lng||this.language):Nt.push(i.lng||this.language);let hi=(F,Ie,wt)=>{let fi=w&&wt!==I?wt:te;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,Ie,fi,se,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,l,Ie,fi,se,i),this.emit("missingKey",F,l,Ie,I)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?Nt.forEach(F=>{let Ie=this.pluralResolver.getSuffixes(F,i);P&&i[`defaultValue${this.options.pluralSeparator}zero`]&&Ie.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ie.push(`${this.options.pluralSeparator}zero`),Ie.forEach(wt=>{hi([F],s+wt,i[`defaultValue${wt}`]||L)})}):hi(Nt,s,L))}I=this.extendTranslation(I,e,i,T,r),_&&I===s&&this.options.appendNamespaceToMissingKey&&(I=`${l}${h}${s}`),(_||V)&&this.options.parseMissingKeyHandler&&(I=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${h}${s}`:s,V?I:void 0,i))}return n?(T.res=I,T.usedParams=this.getUsedParamsDetails(i),T):I}extendTranslation(e,t,r,i,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let c=E(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),l;if(c){let p=e.match(this.interpolator.nestingRegexp);l=p&&p.length}let h=r.replace&&!E(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||i.usedLng,r),c){let p=e.match(this.interpolator.nestingRegexp),C=p&&p.length;l<C&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>n?.[0]===p[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):this.translate(...p,t),r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,s=E(o)?[o]:o;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=Mi.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,i,n,o,s;return E(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;let l=this.extractFromKey(c,t),h=l.key;i=h;let p=l.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let C=t.count!==void 0&&!E(t.count),T=C&&!t.ordinal&&t.count===0,I=t.context!==void 0&&(E(t.context)||typeof t.context=="number")&&t.context!=="",D=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(N=>{this.isValidLookup(r)||(s=N,!yi[`${D[0]}-${N}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(yi[`${D[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${D.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),D.forEach(y=>{if(this.isValidLookup(r))return;o=y;let S=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,h,y,N,t);else{let v;C&&(v=this.pluralResolver.getSuffix(y,t.count,t));let w=`${this.options.pluralSeparator}zero`,W=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(t.ordinal&&v.indexOf(W)===0&&S.push(h+v.replace(W,this.options.pluralSeparator)),S.push(h+v),T&&S.push(h+w)),I){let R=`${h}${this.options.contextSeparator||"_"}${t.context}`;S.push(R),C&&(t.ordinal&&v.indexOf(W)===0&&S.push(R+v.replace(W,this.options.pluralSeparator)),S.push(R+v),T&&S.push(R+w))}}let b;for(;b=S.pop();)this.isValidLookup(r)||(n=b,r=this.getResource(y,N,b,t))}))})}),{res:r,usedKey:i,exactUsedKey:n,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,i):this.resourceStore.getResource(e,t,r,i)}getUsedParamsDetails(e={}){let t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!E(e.replace),i=r?e.replace:e;if(r&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(let n of t)delete i[n]}return i}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}},Wt=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=re.create("languageUtils")}getScriptPartFromCode(e){if(e=At(e),!e||e.indexOf("-")<0)return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=At(e),!e||e.indexOf("-")<0)return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(E(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;let i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;let i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return t=i;let n=this.getLanguagePartFromCode(r);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(o=>{if(o===n)return o;if(!(o.indexOf("-")<0&&n.indexOf("-")<0)&&(o.indexOf("-")>0&&n.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===n||o.indexOf(n)===0&&n.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),E(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],n=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return E(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):E(e)&&n(this.formatLanguageCode(e)),r.forEach(o=>{i.indexOf(o)<0&&n(this.formatLanguageCode(o))}),i}},bi={zero:0,one:1,two:2,few:3,many:4,other:5},Di={select:a=>a===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Tr=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=re.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r=At(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:r,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let o;try{o=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Di;if(!e.match(/-|_/))return Di;let c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,t)}return this.pluralRulesCache[n]=o,o}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((i,n)=>bi[i]-bi[n]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,r={}){let i=this.getRule(e,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}},Ni=(a,e,t,r=".",i=!0)=>{let n=Co(a,e,t);return!n&&i&&E(t)&&(n=hr(a,t,r),n===void 0&&(n=hr(e,t,r))),n},dr=a=>a.replace(/\$/g,"$$$$"),_t=class{constructor(e={}){this.logger=re.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:i,prefix:n,prefixEscaped:o,suffix:s,suffixEscaped:c,formatSeparator:l,unescapeSuffix:h,unescapePrefix:p,nestingPrefix:C,nestingPrefixEscaped:T,nestingSuffix:I,nestingSuffixEscaped:D,nestingOptionsSeparator:N,maxReplaces:y,alwaysFormat:S}=e.interpolation;this.escape=t!==void 0?t:vo,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=n?Le(n):o||"{{",this.suffix=s?Le(s):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=C?Le(C):T||Le("$t("),this.nestingSuffix=I?Le(I):D||Le(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=y||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(t,r)=>t?.source===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,i){let n,o,s,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=T=>{if(T.indexOf(this.formatSeparator)<0){let y=Ni(t,c,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...t,interpolationkey:T}):y}let I=T.split(this.formatSeparator),D=I.shift().trim(),N=I.join(this.formatSeparator).trim();return this.format(Ni(t,c,D,this.options.keySeparator,this.options.ignoreJSONStructure),N,r,{...i,...t,interpolationkey:D})};this.resetRegExp();let h=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>dr(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?dr(this.escape(T)):dr(T)}].forEach(T=>{for(s=0;n=T.regex.exec(e);){let I=n[1].trim();if(o=l(I),o===void 0)if(typeof h=="function"){let N=h(e,n,i);o=E(N)?N:""}else if(i&&Object.prototype.hasOwnProperty.call(i,I))o="";else if(p){o=n[0];continue}else this.logger.warn(`missed to pass in variable ${I} for interpolating ${e}`),o="";else!E(o)&&!this.useRawValueToEscape&&(o=Ci(o));let D=T.safeValue(o);if(e=e.replace(n[0],D),p?(T.regex.lastIndex+=o.length,T.regex.lastIndex-=n[0].length):T.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t,r={}){let i,n,o,s=(c,l)=>{let h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;let p=c.split(new RegExp(`${h}[ ]*{`)),C=`{${p[1]}`;c=p[0],C=this.interpolate(C,o);let T=C.match(/'/g),I=C.match(/"/g);((T?.length??0)%2===0&&!I||I.length%2!==0)&&(C=C.replace(/'/g,'"'));try{o=JSON.parse(C),l&&(o={...l,...o})}catch(D){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,D),`${c}${h}${C}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(e);){let c=[];o={...r},o=o.replace&&!E(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(c=i[1].slice(l).split(this.formatSeparator).map(h=>h.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),n=t(s.call(this,i[1].trim(),o),o),n&&i[0]===e&&!E(n))return n;E(n)||(n=Ci(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),c.length&&(n=c.reduce((h,p)=>this.format(h,p,r.lng,{...r,interpolationkey:i[1].trim()}),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}},wo=a=>{let e=a.toLowerCase().trim(),t={};if(a.indexOf("(")>-1){let r=a.split("(");e=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){let[s,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),h=s.trim();t[h]||(t[h]=l),l==="false"&&(t[h]=!1),l==="true"&&(t[h]=!0),isNaN(l)||(t[h]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},wi=a=>{let e={};return(t,r,i)=>{let n=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(n={...n,[i.interpolationkey]:void 0});let o=r+JSON.stringify(n),s=e[o];return s||(s=a(At(r),i),e[o]=s),s(t)}},Go=a=>(e,t,r)=>a(At(t),r)(e),xr=class{constructor(e={}){this.logger=re.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?wi:Go;this.formats={number:r((i,n)=>{let o=new Intl.NumberFormat(i,{...n});return s=>o.format(s)}),currency:r((i,n)=>{let o=new Intl.NumberFormat(i,{...n,style:"currency"});return s=>o.format(s)}),datetime:r((i,n)=>{let o=new Intl.DateTimeFormat(i,{...n});return s=>o.format(s)}),relativetime:r((i,n)=>{let o=new Intl.RelativeTimeFormat(i,{...n});return s=>o.format(s,n.range||"day")}),list:r((i,n)=>{let o=new Intl.ListFormat(i,{...n});return s=>o.format(s)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=wi(t)}format(e,t,r,i={}){let n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(s=>s.indexOf(")")>-1)){let s=n.findIndex(c=>c.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,s)].join(this.formatSeparator)}return n.reduce((s,c)=>{let{formatName:l,formatOptions:h}=wo(c);if(this.formats[l]){let p=s;try{let C=i?.formatParams?.[i.interpolationkey]||{},T=C.locale||C.lng||i.locale||i.lng||r;p=this.formats[l](s,T,{...h,...i,...C})}catch(C){this.logger.warn(C)}return p}else this.logger.warn(`there was no format function for ${l}`);return s},e)}},Ro=(a,e)=>{a.pending[e]!==void 0&&(delete a.pending[e],a.pendingCount--)},Ir=class extends Pe{constructor(e,t,r,i={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=re.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(e,t,r,i){let n={},o={},s={},c={};return e.forEach(l=>{let h=!0;t.forEach(p=>{let C=`${l}|${p}`;!r.reload&&this.store.hasResourceBundle(l,p)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?o[C]===void 0&&(o[C]=!0):(this.state[C]=1,h=!1,o[C]===void 0&&(o[C]=!0),n[C]===void 0&&(n[C]=!0),c[p]===void 0&&(c[p]=!0)))}),h||(s[l]=!0)}),(Object.keys(n).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}loaded(e,t,r){let i=e.split("|"),n=i[0],o=i[1];t&&this.emit("failedLoading",n,o,t),!t&&r&&this.store.addResourceBundle(n,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let s={};this.queue.forEach(c=>{Io(c.loaded,[n],o),Ro(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{s[l]||(s[l]={});let h=c.loaded[l];h.length&&h.forEach(p=>{s[l][p]===void 0&&(s[l][p]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(c=>!c.done)}read(e,t,r,i=0,n=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:n,callback:o});return}this.readingCalls++;let s=(l,h)=>{if(this.readingCalls--,this.waitingReads.length>0){let p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(l&&h&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,i+1,n*2,o)},n);return}o(l,h)},c=this.backend[r].bind(this.backend);if(c.length===2){try{let l=c(e,t);l&&typeof l.then=="function"?l.then(h=>s(null,h)).catch(s):s(null,l)}catch(l){s(l)}return}return c(e,t,s)}prepareLoading(e,t,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();E(e)&&(e=this.languageUtils.toResolveHierarchy(e)),E(t)&&(t=[t]);let n=this.queueLoad(e,t,r,i);if(!n.toLoad.length)return n.pending.length||i(),null;n.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),i=r[0],n=r[1];this.read(i,n,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`,o),!o&&s&&this.logger.log(`${t}loaded namespace ${n} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,t,r,i,n,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){let c={...o,isUpdate:n},l=this.backend.create.bind(this.backend);if(l.length<6)try{let h;l.length===5?h=l(e,t,r,i,c):h=l(e,t,r,i),h&&typeof h.then=="function"?h.then(p=>s(null,p)).catch(s):s(null,h)}catch(h){s(h)}else l(e,t,r,i,s,c)}!e||!e[0]||this.store.addResource(e[0],t,r,i)}}},ur=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:a=>{let e={};if(typeof a[1]=="object"&&(e=a[1]),E(a[1])&&(e.defaultValue=a[1]),E(a[2])&&(e.tDescription=a[2]),typeof a[2]=="object"||typeof a[3]=="object"){let t=a[3]||a[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:a=>a,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Gi=a=>(E(a.ns)&&(a.ns=[a.ns]),E(a.fallbackLng)&&(a.fallbackLng=[a.fallbackLng]),E(a.fallbackNS)&&(a.fallbackNS=[a.fallbackNS]),a.supportedLngs?.indexOf?.("cimode")<0&&(a.supportedLngs=a.supportedLngs.concat(["cimode"])),typeof a.initImmediate=="boolean"&&(a.initAsync=a.initImmediate),a),zt=()=>{},Mo=a=>{Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(t=>{typeof a[t]=="function"&&(a[t]=a[t].bind(a))})},Cr=class a extends Pe{constructor(e={},t){if(super(),this.options=Gi(e),this.services={},this.logger=re,this.modules={external:[]},Mo(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(E(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));let r=ur();this.options={...r,...this.options,...Gi(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);let i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?re.init(i(this.modules.logger),this.options):re.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=xr;let h=new Wt(this.options);this.store=new Ht(this.options.resources,this.options);let p=this.services;p.logger=re,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new Tr(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(p.formatter=i(l),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new _t(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Ir(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(T,...I)=>{this.emit(T,...I)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Kt(this.services,this.options),this.translator.on("*",(T,...I)=>{this.emit(T,...I)}),this.modules.external.forEach(T=>{T.init&&T.init(this)})}if(this.format=this.options.interpolation.format,t||(t=zt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...h)=>this.store[l](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...h)=>(this.store[l](...h),this)});let s=Rt(),c=()=>{let l=(h,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(p),t(h,p)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),s}loadResources(e,t=zt){let r=t,i=E(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();let n=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&n.indexOf(l)<0&&n.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(n,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,t,r){let i=Rt();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=zt),this.services.backendConnector.reload(e,t,n=>{i.resolve(),r(n)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Mi.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){let r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=Rt();this.emit("languageChanging",e);let i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},n=(s,c)=>{c?this.isLanguageChangingTo===e&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,r.resolve((...l)=>this.t(...l)),t&&t(s,(...l)=>this.t(...l))},o=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);let c=E(s)?s:s&&s[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(E(s)?[s]:s);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,h=>{n(h,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,t,r){let i=(n,o,...s)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([n,o].concat(s)):c={...o},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);let l=this.options.keySeparator||".",h;return c.keyPrefix&&Array.isArray(n)?h=n.map(p=>(typeof p=="function"&&(p=gr(p,{...this.options,...o})),`${c.keyPrefix}${l}${p}`)):(typeof n=="function"&&(n=gr(n,{...this.options,...o})),h=c.keyPrefix?`${c.keyPrefix}${l}${n}`:n),this.t(h,c)};return E(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;let o=(s,c)=>{let l=this.services.backendConnector.state[`${s}|${c}`];return l===-1||l===0||l===2};if(t.precheck){let s=t.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!i||o(n,e)))}loadNamespaces(e,t){let r=Rt();return this.options.ns?(E(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=Rt();E(e)&&(e=[e]);let i=this.options.preload||[],n=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return n.length?(this.options.preload=i.concat(n),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let i=new Intl.Locale(e);if(i&&i.getTextInfo){let n=i.getTextInfo();if(n&&n.direction)return n.direction}}catch{}let t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new Wt(ur());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let r=new a(e,t);return r.createInstance=a.createInstance,r}cloneInstance(e={},t=zt){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},n=new a(i);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(s=>{n[s]=this[s]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},r){let s=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((h,p)=>(h[p]={...c[l][p]},h),c[l]),c),{});n.store=new Ht(s,i),n.services.resourceStore=n.store}if(e.interpolation){let c={...ur().interpolation,...this.options.interpolation,...e.interpolation},l={...i,interpolation:c};n.services.interpolator=new _t(l)}return n.translator=new Kt(n.services,i),n.translator.on("*",(s,...c)=>{n.emit(s,...c)}),n.init(i,t),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},O=Cr.createInstance(),bc=O.createInstance,Dc=O.dir,Nc=O.init,wc=O.loadResources,Gc=O.reloadResources,Rc=O.use,Mc=O.changeLanguage,Ac=O.getFixedT,Lc=O.t,Pc=O.exists,Oc=O.setDefaultNamespace,Bc=O.hasLoadedNamespace,kc=O.loadNamespaces,Vc=O.loadLanguages;var Li={AppExtension:{sequenceCountMustBeLessThanOrEqualTo:"Sequence count {{sequenceCount, number}} must be less than or equal to {{maximumSequenceCount, number}}"},Proxy:{matrixMustBeArray:"Input matrix must be one-dimensional"},Categories:{helper:"Helper",transformation:"Transformation",string:"String",GS1:{checkCharacter:"Check character",identifierValidation:"Identifier validation",identifierCreation:"Identifier creation",variableMeasure:"Variable measure",prefix:"Prefix",service:"Service"}},IdentifierCreatorProxy:{prefixDefinitionMustBeOneDimensional:"Prefix definition must be a one-dimensional matrix",prefixDefinitionMustHaveMaximumThreeElements:"Prefix definition must have a maximum of 3 elements",prefixMustBeString:"Prefix must be a string",prefixTypeMustBeNumber:"Prefix type must be a number in the range of 0 to {{maximumPrefixType, number}}",invalidPrefixType:"Invalid prefix type",tweakFactorMustBeNumber:"Tweak factor must be a number"},ServiceProxy:{invalidIdentifierType:'Invalid identifier type "{{identifierType}}"'},Parameters:{spillArray:{name:"array",description:"Array to spill."},spillMaximumWidth:{name:"maximumWidth",description:"Maximum width into which to spill the array. If not provided, the remaining sheet width is used."},spillMaximumHeight:{name:"maximumHeight",description:"Maximum height into which to spill the array. If not provided, the remaining sheet height is used."},domain:{name:"domain",description:"Transformation domain. Valid input values are from *0* to *domain-1*."},value:{name:"value",description:"Value to transform."},startValue:{name:"startValue",description:"Start value of a domain of values to transform."},count:{name:"count",description:"Count of values to transform. If positive, values transformed are *startValue* to *startValue+count-1*. If negative, values transformed are *startValue* down to *startValue+count+1*."},transformedValue:{name:"transformedValue",description:"Previous output value of a transformation."},tweak:{name:"tweak",description:"Value by which to tweak the transformation. If not provided or zero, the output is sequential. Otherwise, the output is encrypted in such a way as to appear random, masking the values used as inputs to the sequence."},regExp:{name:"regExp",description:"Regular expression against which to validate a string."},validateS:{name:"s",description:"String to validate."},valueForS:{name:"s",description:"String for which to determine the value."},errorMessage:{name:"errorMessage",description:"Custom error message to use if validation fails. If not provided, an internal error message is used."},exclusionNone:{name:"exclusion",description:"String values to exclude. The only valid value is *0* (no exclusions)."},exclusionFirstZero:{name:"exclusion",description:"String values to exclude. Valid values are *0* (no exclusions) and *1* (strings starting with 0 excluded)."},exclusionAllNumeric:{name:"exclusion",description:"String values to exclude. Valid values are *0* (no exclusions) and *2* (strings that are all numeric excluded)."},exclusionAny:{name:"exclusion",description:"String values to exclude. Valid values are *0* (no exclusions), *1* (strings starting with 0 excluded), and *2* (strings that are all numeric excluded)."},length:{name:"length",description:"Length of string to create."},numericS:{name:"s",description:"Numeric string."},numericSFourOrFiveDigits:{name:"s",description:"Four- or five-digit numeric string."},numericSWithCheckDigit:{name:"s",description:"Numeric string with check digit."},checkDigit:{name:"checkDigit",description:"Check digit."},ai82S:{name:"s",description:"GS1 AI encodable character set 82 string."},ai82SWithCheckCharacterPair:{name:"s",description:"GS1 AI encodable character set 82 string with check character pair."},validateIdentifier:{name:"identifier",description:"Identifier to validate."},splitIdentifier:{name:"splitIdentifier",description:"Identifier to split."},zeroSuppressibleGTIN12:{name:"gtin12",description:"GTIN-12 for which to suppress zeros."},zeroSuppressedGTIN12:{name:"zeroSuppressedGTIN12",description:"Zero-suppressed GTIN-12 to expand."},convertGTIN:{name:"gtin",description:"GTIN to convert to GTIN-14."},normalizeGTIN:{name:"gtin",description:"GTIN to normalize."},validateGTIN:{name:"gtin",description:"GTIN to validate."},validateGTIN14:{name:"gtin14",description:"GTIN-14 to validate."},gcpLengthIdentifier:{name:"identifier",description:"Identifier for which to get the GS1 Company Prefix length."},baseIdentifier:{name:"baseIdentifier",description:"Base identifier."},hyperlinkIdentifier:{name:"identifier",description:"Identifier for which to create hyperlink."},indicatorDigit:{name:"indicatorDigit",description:"Indicator digit."},gtinLevel:{name:"level",description:"Level at which to validate the GTIN. Valid values are *0* (any), *1* (retail consumer trade item), and *2* (other than retail consumer trade item level)."},prefix:{name:"prefix",description:"Prefix."},prefixType:{name:"prefixType",description:"Prefix type. Valid values are *0* (GS1 Company Prefix), *1* (U.P.C. Company Prefix), and *2* (GS1 Prefix)."},tweakFactor:{name:"tweakFactor",description:"Tweak factor, used to support the creation of sparse identifiers. The default tweak factor is based on the GS1 Company Prefix, and is usually sufficient for obfuscation. This allows more control over the encryption when higher security is required."},identifierType:{name:"identifierType",description:"Identifier type (GTIN, GLN, SSCC, ...)."},prefixDefinitionAny:{name:"prefixDefinition",description:"Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to *definePrefix*. Any prefix type is supported."},prefixDefinitionGS1UPC:{name:"prefixDefinition",description:"Prefix definition, either a simple GS1 Company Prefix (as a string) or the result of a call to *definePrefix*. Only prefix types *0* (GS1 Company Prefix) and *1* (U.P.C. Company Prefix) are supported."},sparse:{name:"sparse",description:"If true, value is mapped to a sparse sequence resistant to discovery. Default is false."},serialComponent:{name:"serialComponent",description:"Serial component."},reference:{name:"reference",description:"Reference portion of identifier."},rcnFormat:{name:"format",description:"Restricted Circulation Number format."},rcn:{name:"rcn",description:"Restricted Circulation Number to parse."},rcnItemReference:{name:"itemReference",description:"Item reference."},rcnPriceOrWeight:{name:"priceOrWeight",description:"Price or weight (whole number only)."},hyperlinkText:{name:"text",description:"Text for hyperlink. If not provided, the identifier is used."},hyperlinkDetails:{name:"details",description:"Details to display when hovering over hyperlink."}},Functions:{version:{name:"version",description:"Get the version of the AIDC Toolkit."},spill:{name:"spill",description:"Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width."},forwardTransform:{name:"forwardTransform",description:"Transform a value forward."},forwardTransformSequence:{name:"forwardTransformSequence",description:"Transform a sequence of values forward."},reverseTransform:{name:"reverseTransform",description:"Transform a value in reverse."},validateRegExp:{name:"validateRegExp",description:"Validate a string against a regular expression."},isValidRegExp:{name:"isValidRegExp",description:"Determine if a string is valid against a regular expression."},validateNumeric:{name:"validateNumeric",description:"Validate a numeric string."},isValidNumeric:{name:"isValidNumeric",description:"Determine if a string is numeric."},createNumeric:{name:"createNumeric",description:"Create a numeric string."},createNumericSequence:{name:"createNumericSequence",description:"Create a sequence of numeric strings."},valueForNumeric:{name:"valueForNumeric",description:"Get the value for a numeric string."},validateHexadecimal:{name:"validateHexadecimal",description:"Validate a hexadecimal string."},isValidHexadecimal:{name:"isValidHexadecimal",description:"Determine if a string is hexadecimal."},createHexadecimal:{name:"createHexadecimal",description:"Create a hexadecimal string."},createHexadecimalSequence:{name:"createHexadecimalSequence",description:"Create a sequence of hexadecimal strings."},valueForHexadecimal:{name:"valueForHexadecimal",description:"Get the value for a hexadecimal string."},validateAlphabetic:{name:"validateAlphabetic",description:"Validate an alphabetic string."},isValidAlphabetic:{name:"isValidAlphabetic",description:"Determine if a string is alphabetic."},createAlphabetic:{name:"createAlphabetic",description:"Create an alphabetic string."},createAlphabeticSequence:{name:"createAlphabeticSequence",description:"Create a sequence of alphabetic strings."},valueForAlphabetic:{name:"valueForAlphabetic",description:"Get the value for an alphabetic string."},validateAlphanumeric:{name:"validateAlphanumeric",description:"Validate an alphanumeric string."},isValidAlphanumeric:{name:"isValidAlphanumeric",description:"Determine if a string is alphanumeric."},createAlphanumeric:{name:"createAlphanumeric",description:"Create an alphanumeric string."},createAlphanumericSequence:{name:"createAlphanumericSequence",description:"Create a sequence of alphanumeric strings."},valueForAlphanumeric:{name:"valueForAlphanumeric",description:"Get the value for an alphanumeric string."},GS1:{validateAI82:{name:"validateAI82",description:"Validate a GS1 AI 82 encodable character set string."},isValidAI82:{name:"isValidAI82",description:"Determine if a string is GS1 AI 82 encodable character set."},createAI82:{name:"createAI82",description:"Create a GS1 AI 82 encodable character set string."},createAI82Sequence:{name:"createAI82Sequence",description:"Create a sequence of GS1 AI 82 encodable character set strings."},valueForAI82:{name:"valueForAI82",description:"Get the value for a GS1 AI 82 encodable character set string."},validateAI39:{name:"validateAI39",description:"Validate a GS1 AI 39 encodable character set string."},isValidAI39:{name:"isValidAI39",description:"Determine if a string is GS1 AI 39 encodable character set."},createAI39:{name:"createAI39",description:"Create a GS1 AI 39 encodable character set string."},createAI39Sequence:{name:"createAI39Sequence",description:"Create a sequence of GS1 AI 39 encodable character set strings."},valueForAI39:{name:"valueForAI39",description:"Get the value for a GS1 AI 39 encodable character set string."},validateAI64:{name:"validateAI64",description:"Validate a GS1 AI 64 encodable character set string."},isValidAI64:{name:"isValidAI64",description:"Determine if a string is GS1 AI 64 encodable character set."},checkDigit:{name:"checkDigit",description:"Calculate the check digit for a numeric string."},hasValidCheckDigit:{name:"hasValidCheckDigit",description:"Determine if a string has a valid check digit."},priceOrWeightCheckDigit:{name:"priceOrWeightCheckDigit",description:"Calculate the check digit for a price or weight."},isValidPriceOrWeightCheckDigit:{name:"isValidPriceOrWeightCheckDigit",description:"Determine if a price or weight check digit is valid."},checkCharacterPair:{name:"checkCharacterPair",description:"Calculate the check character pair for a GS1 AI 82 encodable character set string."},hasValidCheckCharacterPair:{name:"hasValidCheckCharacterPair",description:"Determine if a GS1 AI 82 encodable character set string has a valid check character pair."},validateGTIN13:{name:"validateGTIN13",description:"Validate a GTIN-13."},isValidGTIN13:{name:"isValidGTIN13",description:"Determine if a GTIN-13 is valid."},validateGTIN12:{name:"validateGTIN12",description:"Validate a GTIN-12."},isValidGTIN12:{name:"isValidGTIN12",description:"Determine if a GTIN-12 is valid."},validateGTIN8:{name:"validateGTIN8",description:"Validate a GTIN-8."},isValidGTIN8:{name:"isValidGTIN8",description:"Determine if a GTIN-8 is valid."},zeroSuppressGTIN12:{name:"zeroSuppressGTIN12",description:"Zero-suppress a GTIN-12."},zeroExpandGTIN12:{name:"zeroExpandGTIN12",description:"Expand a zero-suppressed GTIN-12."},convertToGTIN14:{name:"convertToGTIN14",description:"Convert a GTIN to GTIN-14."},normalizeGTIN:{name:"normalizeGTIN",description:"Normalize a GTIN."},validateGTIN:{name:"validateGTIN",description:"Validate a GTIN of any length."},isValidGTIN:{name:"isValidGTIN",description:"Determine if a GTIN of any length is valid."},validateGTIN14:{name:"validateGTIN14",description:"Validate a GTIN-14."},isValidGTIN14:{name:"isValidGTIN14",description:"Determine if a GTIN-14 is valid."},validateGLN:{name:"validateGLN",description:"Validate a GLN."},isValidGLN:{name:"isValidGLN",description:"Determine if a GLN is valid."},validateSSCC:{name:"validateSSCC",description:"Validate an SSCC."},isValidSSCC:{name:"isValidSSCC",description:"Determine if an SSCC is valid."},validateGRAI:{name:"validateGRAI",description:"Validate a GRAI."},isValidGRAI:{name:"isValidGRAI",description:"Determine if a GRAI is valid."},splitGRAI:{name:"splitGRAI",description:"Split a GRAI into its base identifier and serial component."},validateGIAI:{name:"validateGIAI",description:"Validate a GIAI."},isValidGIAI:{name:"isValidGIAI",description:"Determine if a GIAI is valid."},validateGSRN:{name:"validateGSRN",description:"Validate a GSRN."},isValidGSRN:{name:"isValidGSRN",description:"Determine if a GSRN is valid."},validateGDTI:{name:"validateGDTI",description:"Validate a GDTI."},isValidGDTI:{name:"isValidGDTI",description:"Determine if a GDTI is valid."},splitGDTI:{name:"splitGDTI",description:"Split a GDTI into its base identifier and serial component."},validateGINC:{name:"validateGINC",description:"Validate a GINC."},isValidGINC:{name:"isValidGINC",description:"Determine if a GINC is valid."},validateGSIN:{name:"validateGSIN",description:"Validate a GSIN."},isValidGSIN:{name:"isValidGSIN",description:"Determine if a GSIN is valid."},validateGCN:{name:"validateGCN",description:"Validate a GCN."},isValidGCN:{name:"isValidGCN",description:"Determine if a GCN is valid."},splitGCN:{name:"splitGCN",description:"Split a GCN into its base identifier and serial component."},validateCPID:{name:"validateCPID",description:"Validate a CPID."},isValidCPID:{name:"isValidCPID",description:"Determine if a CPID is valid."},validateGMN:{name:"validateGMN",description:"Validate a GMN."},isValidGMN:{name:"isValidGMN",description:"Determine if a GMN is valid."},definePrefix:{name:"definePrefix",description:"Define a prefix for use in GS1 identifier creation functions."},gcpLength:{name:"gcpLength",description:"Get the length of a GS1 Company Prefix for an identifier."},gcpLengthDateTime:{name:"gcpLengthDateTime",description:"Get the date and time the GS1 Company Prefix length data was last updated."},gcpLengthDisclaimer:{name:"gcpLengthDisclaimer",description:"Get the disclaimer for the GS1 Company Prefix length data."},createGTIN:{name:"createGTIN",description:"Create a GTIN."},createGTINSequence:{name:"createGTINSequence",description:"Create a sequence of GTINs."},createAllGTIN:{name:"createAllGTIN",description:"Create all GTINs for a prefix."},createGTIN14:{name:"createGTIN14",description:"Create a GTIN-14."},createGLN:{name:"createGLN",description:"Create a GLN."},createGLNSequence:{name:"createGLNSequence",description:"Create a sequence of GLNs."},createAllGLN:{name:"createAllGLN",description:"Create all GLNs for a prefix."},createSSCC:{name:"createSSCC",description:"Create an SSCC."},createSSCCSequence:{name:"createSSCCSequence",description:"Create a sequence of SSCCs."},createAllSSCC:{name:"createAllSSCC",description:"Create all SSCCs for a prefix."},createGRAI:{name:"createGRAI",description:"Create a GRAI."},createGRAISequence:{name:"createGRAISequence",description:"Create a sequence of GRAIs."},createAllGRAI:{name:"createAllGRAI",description:"Create all GRAIs for a prefix."},createSerializedGRAI:{name:"createSerializedGRAI",description:"Create a serialized GRAI."},concatenateGRAI:{name:"concatenateGRAI",description:"Concatenate a base GRAI with a serial component."},createGIAI:{name:"createGIAI",description:"Create a GIAI."},createGSRN:{name:"createGSRN",description:"Create a GSRN."},createGSRNSequence:{name:"createGSRNSequence",description:"Create a sequence of GSRNs."},createAllGSRN:{name:"createAllGSRN",description:"Create all GSRNs for a prefix."},createGDTI:{name:"createGDTI",description:"Create a GDTI."},createGDTISequence:{name:"createGDTISequence",description:"Create a sequence of GDTIs."},createAllGDTI:{name:"createAllGDTI",description:"Create all GDTIs for a prefix."},createSerializedGDTI:{name:"createSerializedGDTI",description:"Create a serialized GDTI."},concatenateGDTI:{name:"concatenateGDTI",description:"Concatenate a base GDTI with a serial component."},createGINC:{name:"createGINC",description:"Create a GINC."},createGSIN:{name:"createGSIN",description:"Create a GSIN."},createGSINSequence:{name:"createGSINSequence",description:"Create a sequence of GSINs."},createAllGSIN:{name:"createAllGSIN",description:"Create all GSINs for a prefix."},createGCN:{name:"createGCN",description:"Create a GCN."},createGCNSequence:{name:"createGCNSequence",description:"Create a sequence of GCNs."},createAllGCN:{name:"createAllGCN",description:"Create all GCNs for a prefix."},createSerializedGCN:{name:"createSerializedGCN",description:"Create a serialized GCN."},concatenateGCN:{name:"concatenateGCN",description:"Concatenate a base GCN with a serial component."},createCPID:{name:"createCPID",description:"Create a CPID."},createGMN:{name:"createGMN",description:"Create a GMN."},parseVariableMeasureRCN:{name:"parseVariableMeasureRCN",description:"Parse a Restricted Circulation Number (RCN) using a variable measure trade item format."},createVariableMeasureRCN:{name:"createVariableMeasureRCN",description:"Create a variable measure Restricted Circulation Number (RCN)."},verifiedByGS1:{name:"verifiedByGS1",description:"Create a Verified by GS1 hyperlink."}}}};var Pi={AppExtension:{sequenceCountMustBeLessThanOrEqualTo:"Le nombre de s\xE9quences {{sequenceCount, number}} doit \xEAtre inf\xE9rieur ou \xE9gal \xE0 {{maximumSequenceCount, number}}"},Proxy:{matrixMustBeArray:"La matrice d'entr\xE9e doit \xEAtre unidimensionnelle"},Categories:{helper:"Auxiliaire",transformation:"Transformation",string:"Cha\xEEne de caract\xE8res",GS1:{checkCharacter:"Caract\xE8re de contr\xF4le",identifierValidation:"Validation d'identifiants",identifierCreation:"Cr\xE9ation d'identifiants",variableMeasure:"Mesure variable",prefix:"Pr\xE9fixe",service:"Service"}},IdentifierCreatorProxy:{prefixDefinitionMustBeOneDimensional:"La d\xE9finition du pr\xE9fixe doit \xEAtre une matrice unidimensionnelle",prefixDefinitionMustHaveMaximumThreeElements:"La d\xE9finition du pr\xE9fixe doit comporter un maximum de 3 \xE9l\xE9ments",prefixMustBeString:"Le pr\xE9fixe doit \xEAtre une cha\xEEne",prefixTypeMustBeNumber:"Le type de pr\xE9fixe doit \xEAtre un nombre compris entre 0 et {{maximumPrefixType, number}}",invalidPrefixType:"Type de pr\xE9fixe invalide",tweakFactorMustBeNumber:"Le facteur de r\xE9glage doit \xEAtre un nombre"},ServiceProxy:{invalidIdentifierType:"Type d'identifiant invalide \xAB{{identifierType}}\xBB"},Parameters:{spillArray:{name:"tableau",description:"Tableau \xE0 renverser."},spillMaximumWidth:{name:"largeurMaximale",description:"Largeur maximale dans laquelle d\xE9verser le tableau. Si non fournie, la largeur restante de la feuille est utilis\xE9e."},spillMaximumHeight:{name:"hauteurMaximale",description:"Hauteur maximale dans laquelle d\xE9verser le tableau. Si non fournie, la hauteur restante de la feuille est utilis\xE9e."},domain:{name:"domaine",description:"Domaine de transformation. Les valeurs d'entr\xE9e valides vont de *0* au *domaine-1*."},value:{name:"valeur",description:"Valeur \xE0 transformer."},startValue:{name:"valeurInitiale",description:"Valeur de d\xE9part d'un domaine de valeurs \xE0 transformer."},count:{name:"compte",description:"Nombre de valeurs \xE0 transformer. Si positive, les valeurs transform\xE9es vont de *valeurInitiale* ascendante \xE0 *valeurInitiale+compte-1*. Si n\xE9gative, les valeurs transform\xE9es vont de *valeurInitiale* descendant \xE0 *valeurInitiale+compte+1*."},transformedValue:{name:"valeurTransformee",description:"Valeur de sortie pr\xE9c\xE9dente d'une transformation."},tweak:{name:"reglage",description:"Valeur par laquelle r\xE9glager la transformation. Si non fourni ou nul, la sortie est s\xE9quentielle. Sinon, la sortie est crypt\xE9e de mani\xE8re \xE0 para\xEEtre al\xE9atoire, masquant les valeurs utilis\xE9es comme entr\xE9es de la s\xE9quence."},regExp:{name:"expReg",description:"Expression r\xE9guli\xE8re par rapport \xE0 laquelle valider une cha\xEEne."},validateS:{name:"c",description:"Cha\xEEne \xE0 valider."},valueForS:{name:"c",description:"Cha\xEEne pour laquelle d\xE9terminer la valeur."},errorMessage:{name:"messageDErreur",description:"Message d'erreur personnalis\xE9 \xE0 utiliser si la validation \xE9choue. S'il n'est pas fourni, un message d'erreur interne est utilis\xE9."},exclusionNone:{name:"exclusion",description:"Valeurs de cha\xEEne \xE0 exclure. La seule valeur valide est *0* (aucune exclusion)."},exclusionFirstZero:{name:"exclusion",description:"Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont *0* (aucune exclusion) et *1* (cha\xEEnes commen\xE7ant par 0 exclues)."},exclusionAllNumeric:{name:"exclusion",description:"Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont *0* (aucune exclusion) et *2* (cha\xEEnes enti\xE8rement num\xE9riques exclues)."},exclusionAny:{name:"exclusion",description:"Valeurs de cha\xEEne \xE0 exclure. Les valeurs valides sont *0* (aucune exclusion), *1* (cha\xEEnes commen\xE7ant par 0 exclues) et *2* (cha\xEEnes toutes num\xE9riques exclues)."},length:{name:"longueur",description:"Longueur de cha\xEEne \xE0 cr\xE9er."},numericS:{name:"c",description:"Cha\xEEne num\xE9rique."},numericSFourOrFiveDigits:{name:"c",description:"Cha\xEEne num\xE9rique \xE0 quatre ou cinq chiffres."},numericSWithCheckDigit:{name:"c",description:"Cha\xEEne num\xE9rique avec chiffre de contr\xF4le."},checkDigit:{name:"chiffreDeControle",description:"Chiffre de contr\xF4le."},ai82S:{name:"c",description:"Cha\xEEne de caract\xE8res GS1 AI 82."},ai82SWithCheckCharacterPair:{name:"c",description:"Cha\xEEne de caract\xE8res GS1 AI 82 avec paire de caract\xE8res de contr\xF4le."},validateIdentifier:{name:"cleDIdentification",description:"Cl\xE9 d'identification \xE0 valider."},splitIdentifier:{name:"splitIdentifier",description:"Identifiant \xE0 diviser."},zeroSuppressibleGTIN12:{name:"gtin12",description:"GTIN-12 pour lequel supprimer les z\xE9ros."},zeroSuppressedGTIN12:{name:"gtin12SupprimeAZero",description:"GTIN-12 supprim\xE9 \xE0 z\xE9ro pour s'\xE9tendre."},convertGTIN:{name:"gtin",description:"GTIN \xE0 convertir en GTIN-14."},normalizeGTIN:{name:"gtin",description:"GTIN \xE0 normaliser."},validateGTIN:{name:"gtin",description:"GTIN \xE0 valider."},validateGTIN14:{name:"gtin14",description:"GTIN-14 \xE0 valider."},gcpLengthIdentifier:{name:"identifiant",description:"Identifiant pour lequel obtenir la longueur du pr\xE9fixe d'entreprise GS1."},baseIdentifier:{name:"cleDIdentificationDeBase",description:"Cl\xE9 d'identification de base."},hyperlinkIdentifier:{name:"identifiant",description:"Identifiant pour lequel cr\xE9er un lien hypertexte."},indicatorDigit:{name:"indicatorDigit",description:"Chiffre indicateur."},gtinLevel:{name:"niveau",description:"Niveau auquel valider le GTIN. Les valeurs valides sont *0* (n'importe lequel), *1* (article commercial de consommation au d\xE9tail) et *2* (autre que le niveau de l'article commercial de consommation au d\xE9tail)."},prefix:{name:"prefixe",description:"Pr\xE9fixe."},prefixType:{name:"typeDePr\xE9fixe",description:"Type de pr\xE9fixe. Les valeurs valides sont *0* (pr\xE9fixe d'entreprise GS1), *1* (pr\xE9fixe d'entreprise U.P.C.) et *2* (pr\xE9fixe GS1)."},tweakFactor:{name:"facteurDeReglage",description:"Facteur de r\xE9glage, utilis\xE9 pour prendre en charge la cr\xE9ation de cl\xE9s d'identification \xE9parses. Le facteur de r\xE9glage par d\xE9faut est bas\xE9 sur le pr\xE9fixe d'entreprise GS1 et est g\xE9n\xE9ralement suffisant pour l'obscurcissement. Cela permet un meilleur contr\xF4le du cryptage lorsqu'une s\xE9curit\xE9 plus \xE9lev\xE9e est requise."},identifierType:{name:"typeDIdentifiant",description:"Type d'identifiant (GTIN, GLN, SSCC, ...)."},prefixDefinitionAny:{name:"prefixeDefinition",description:"D\xE9finition de pr\xE9fixe, soit un pr\xE9fixe d'entreprise simple GS1 (sous forme de cha\xEEne), soit le r\xE9sultat d'un appel \xE0 *definisserPrefixe*. Tout type de pr\xE9fixe est pris en charge."},prefixDefinitionGS1UPC:{name:"prefixeDefinition",description:"D\xE9finition de pr\xE9fixe, soit un pr\xE9fixe d'entreprise simple GS1 (sous forme de cha\xEEne), soit le r\xE9sultat d'un appel \xE0 *definisserPrefixe*. Seuls les types de pr\xE9fixes *0* (pr\xE9fixe d'entreprise GS1) et *1* (pr\xE9fixe d'entreprise U.P.C.) sont pris en charge."},sparse:{name:"clairsemee",description:"Si cette valeur est vraie, la valeur est mapp\xE9e sur une s\xE9quence clairsem\xE9e r\xE9sistante \xE0 la d\xE9couverte. La valeur par d\xE9faut est faux."},serialComponent:{name:"composanteSerie",description:"Composante s\xE9rie."},reference:{name:"reference",description:"Partie de r\xE9f\xE9rence de la cl\xE9 d'identification."},rcnFormat:{name:"format",description:"Format de num\xE9ro de diffusion restreinte."},rcn:{name:"rcn",description:"Num\xE9ro de diffusion restreint \xE0 analyser."},rcnItemReference:{name:"referenceDArticle",description:"R\xE9f\xE9rence d'article."},rcnPriceOrWeight:{name:"prixOuPoids",description:"Prix ou poids (nombre entier uniquement)."},hyperlinkText:{name:"texte",description:"Texte du lien hypertexte. \xC0 d\xE9faut, l'identifiant est utilis\xE9."},hyperlinkDetails:{name:"details",description:"D\xE9tails \xE0 afficher au survol du lien hypertexte."}},Functions:{version:{name:"version",description:"Obtener la version de la bo\xEEte \xE0 outils AIDC."},spill:{name:"deverser",description:"D\xE9verser une matrice unidimensionnelle pour l'adapter \xE0 un rectangle dont la hauteur et la largeur maximales sont donn\xE9es."},forwardTransform:{name:"transformerAvant",description:"Transformer une valeur en avant."},forwardTransformSequence:{name:"transformerSequenceAvant",description:"Transformer une s\xE9quence de valeurs en avant."},reverseTransform:{name:"transformerArriere",description:"Transformer une valeur en arri\xE8re."},validateRegExp:{name:"validerExpReg",description:"Valider une cha\xEEne par rapport \xE0 une expression r\xE9guli\xE8re."},isValidRegExp:{name:"estValideExpReg",description:"D\xE9terminer si une cha\xEEne est valide par rapport \xE0 une expression r\xE9guli\xE8re."},validateNumeric:{name:"validerNumerique",description:"Valider une cha\xEEne num\xE9rique."},isValidNumeric:{name:"estValideNumerique",description:"D\xE9terminer si une cha\xEEne est num\xE9rique."},createNumeric:{name:"creerNumerique",description:"Cr\xE9er une cha\xEEne num\xE9rique."},createNumericSequence:{name:"creerSequenceNumerique",description:"Cr\xE9er une s\xE9quence de cha\xEEnes num\xE9riques."},valueForNumeric:{name:"valeurDeNumerique",description:"Obtenir la valeur d'une cha\xEEne num\xE9rique."},validateHexadecimal:{name:"validerHexadecimale",description:"Valider une cha\xEEne hexad\xE9cimale."},isValidHexadecimal:{name:"estValideHexadecimale",description:"D\xE9terminer si une cha\xEEne est hexad\xE9cimale."},createHexadecimal:{name:"creerHexadecimale",description:"Cr\xE9er une cha\xEEne hexad\xE9cimale."},createHexadecimalSequence:{name:"creerSequenceHexadecimale",description:"Cr\xE9er une s\xE9quence de cha\xEEnes hexad\xE9cimales."},valueForHexadecimal:{name:"valeurDeHexadecimale",description:"Obtenir la valeur d'une cha\xEEne hexad\xE9cimale."},validateAlphabetic:{name:"validerAlphabetique",description:"Valider une cha\xEEne alphab\xE9tique."},isValidAlphabetic:{name:"estValideAlphabetique",description:"D\xE9terminer si une cha\xEEne est alphab\xE9tique."},createAlphabetic:{name:"creerAlphabetique",description:"Cr\xE9er une cha\xEEne alphab\xE9tique."},createAlphabeticSequence:{name:"creerSequenceAlphabetique",description:"Cr\xE9er une s\xE9quence de cha\xEEnes alphab\xE9tiques."},valueForAlphabetic:{name:"valeurDeAlphabetique",description:"Obtenir la valeur d'une cha\xEEne alphab\xE9tique."},validateAlphanumeric:{name:"validerAlphanumerique",description:"Valider une cha\xEEne alphanum\xE9rique."},isValidAlphanumeric:{name:"estValideAlphanumerique",description:"D\xE9terminer si une cha\xEEne est alphanum\xE9rique."},createAlphanumeric:{name:"creerAlphanumerique",description:"Cr\xE9er une cha\xEEne alphanum\xE9rique."},createAlphanumericSequence:{name:"creerSequenceAlphanumerique",description:"Cr\xE9er une s\xE9quence de cha\xEEnes alphanum\xE9riques."},valueForAlphanumeric:{name:"valeurDeAlphanumerique",description:"Obtenir la valeur d'une cha\xEEne alphanum\xE9rique."},GS1:{validateAI82:{name:"validerAI82",description:"Valider une cha\xEEne de caract\xE8res GS1 AI 82."},isValidAI82:{name:"estValideAI82",description:"D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 82."},createAI82:{name:"creerAI82",description:"Cr\xE9er une cha\xEEne de caract\xE8res GS1 AI 82."},createAI82Sequence:{name:"creerSequenceAI82",description:"Cr\xE9er une s\xE9quence de cha\xEEnes de caract\xE8res GS1 AI 82."},valueForAI82:{name:"valeurDeAI82",description:"Obtenez la valeur d'une cha\xEEne de caract\xE8res GS1 AI 82."},validateAI39:{name:"validerAI39",description:"Valider une cha\xEEne de caract\xE8res GS1 AI 39."},isValidAI39:{name:"estValideAI39",description:"D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 39."},createAI39:{name:"creerAI39",description:"Cr\xE9er une cha\xEEne de caract\xE8res GS1 AI 39."},createAI39Sequence:{name:"creerSequenceAI39",description:"Cr\xE9er une s\xE9quence de cha\xEEnes de caract\xE8res GS1 AI 39."},valueForAI39:{name:"valeurDeAI39",description:"Obtenez la valeur d'une cha\xEEne de caract\xE8res GS1 AI 39."},validateAI64:{name:"validerAI64",description:"Valider une cha\xEEne de caract\xE8res GS1 AI 64."},isValidAI64:{name:"estValideAI64",description:"D\xE9terminer si une cha\xEEne est un jeu de caract\xE8res GS1 AI 64."},checkDigit:{name:"chiffreDeControle",description:"Calculer le chiffre de contr\xF4le pour une cha\xEEne num\xE9rique."},hasValidCheckDigit:{name:"aChiffreDeControleValide",description:"D\xE9terminer si une cha\xEEne a un chiffre de contr\xF4le valide."},priceOrWeightCheckDigit:{name:"chiffreDeControlePrixOuPoids",description:"Calculer le chiffre de contr\xF4le pour un prix ou un poids."},isValidPriceOrWeightCheckDigit:{name:"estChiffreDeControlePrixOuPoidsValide",description:"D\xE9terminer si un chiffre de contr\xF4le de prix ou de poids est valide."},checkCharacterPair:{name:"paireDeCaracteresDeControle",description:"Calculer la paire de caract\xE8res de contr\xF4le pour une cha\xEEne de caract\xE8res."},hasValidCheckCharacterPair:{name:"aPaireDeCaracteresDeControleValide",description:"D\xE9terminez si une cha\xEEne de caract\xE8res GS1 AI 82 a une paire de caract\xE8res de contr\xF4le valide."},validateGTIN13:{name:"validerGTIN13",description:"Valider un GTIN-13."},isValidGTIN13:{name:"estValideGTIN13",description:"D\xE9terminer si un GTIN-13 est valide."},validateGTIN12:{name:"validerGTIN12",description:"Valider un GTIN-12."},isValidGTIN12:{name:"estValideGTIN12",description:"D\xE9terminer si un GTIN-12 est valide."},validateGTIN8:{name:"validerGTIN8",description:"Valider un GTIN-8."},isValidGTIN8:{name:"estValideGTIN8",description:"D\xE9terminer si un GTIN-8 est valide."},zeroSuppressGTIN12:{name:"supprimerZeroGTIN12",description:"Supprimer les z\xE9ros d'un GTIN-12."},zeroExpandGTIN12:{name:"etendrerZeroGTIN12",description:"\xC9tendrer un GTIN-12 supprim\xE9 \xE0 z\xE9ro."},convertToGTIN14:{name:"convertirEnGTIN14",description:"Convertir un GTIN en GTIN-14."},normalizeGTIN:{name:"normalizeGTIN",description:"Normaliser un GTIN."},validateGTIN:{name:"validerGTIN",description:"Valider un GTIN de n'importe quelle longueur."},isValidGTIN:{name:"estValideGTIN",description:"D\xE9terminer si un GTIN, quelle que soit sa longueur, est valide."},validateGTIN14:{name:"validerGTIN14",description:"Valider un GTIN-14."},isValidGTIN14:{name:"estValideGTIN14",description:"D\xE9terminer si un GTIN-14 est valide."},validateGLN:{name:"validerGLN",description:"Valider un GLN."},isValidGLN:{name:"estValideGLN",description:"D\xE9terminer si un GLN est valide."},validateSSCC:{name:"validerSSCC",description:"Valider un SSCC."},isValidSSCC:{name:"estValideSSCC",description:"D\xE9terminer si un SSCC est valide."},validateGRAI:{name:"validerGRAI",description:"Valider un GRAI."},isValidGRAI:{name:"estValideGRAI",description:"D\xE9terminer si un GRAI est valide."},splitGRAI:{name:"splitGRAI",description:"S\xE9parer un GRAI en son identifiant de base et son composant s\xE9riel."},validateGIAI:{name:"validerGIAI",description:"Valider un GIAI."},isValidGIAI:{name:"estValideGIAI",description:"D\xE9terminer si un GIAI est valide."},validateGSRN:{name:"validerGSRN",description:"Valider un GSRN."},isValidGSRN:{name:"estValideGSRN",description:"D\xE9terminer si un GSRN est valide."},validateGDTI:{name:"validerGDTI",description:"Valider un GDTI."},isValidGDTI:{name:"estValideGDTI",description:"D\xE9terminer si un GDTI est valide."},splitGDTI:{name:"splitGDTI",description:"S\xE9parer un GDTI en son identifiant de base et son composant s\xE9riel."},validateGINC:{name:"validerGINC",description:"Valider un GINC."},isValidGINC:{name:"estValideGINC",description:"D\xE9terminer si un GINC est valide."},validateGSIN:{name:"validerGSIN",description:"Valider un GSIN."},isValidGSIN:{name:"estValideGSIN",description:"D\xE9terminer si un GSIN est valide."},validateGCN:{name:"validerGCN",description:"Valider un GCN."},isValidGCN:{name:"estValideGCN",description:"D\xE9terminer si un GCN est valide."},splitGCN:{name:"splitGCN",description:"S\xE9parer un GCN en son identifiant de base et son composant s\xE9riel."},validateCPID:{name:"validerCPID",description:"Valider un CPID."},isValidCPID:{name:"estValideCPID",description:"D\xE9terminer si un CPID est valide."},validateGMN:{name:"validerGMN",description:"Valider un GMN."},isValidGMN:{name:"estValideGMN",description:"D\xE9terminer si un GMN est valide."},definePrefix:{name:"definisserPrefixe",description:"D\xE9finisser un pr\xE9fixe \xE0 utiliser dans les fonctions de cr\xE9ation de cl\xE9 d'identification GS1."},gcpLength:{name:"longueurGCPDe",description:"Obtenez la longueur du pr\xE9fixe d'entreprise GS1 pour un identifiant."},gcpLengthDateTime:{name:"dateHeureLongueurGCP",description:"Obtenez la date et l'heure de la derni\xE8re mise \xE0 jour des donn\xE9es relatives \xE0 la longueur du pr\xE9fixe d'entreprise GS1."},gcpLengthDisclaimer:{name:"avertissementLongueurGCP",description:"Obtenez l'avertissement relatif aux donn\xE9es sur la longueur des pr\xE9fixes d'entreprise GS1."},createGTIN:{name:"creerGTIN",description:"Cr\xE9er un GTIN."},createGTINSequence:{name:"creerSequenceGTIN",description:"Cr\xE9er un s\xE9quence de GTIN."},createAllGTIN:{name:"creerTousGTIN",description:"Cr\xE9ez tous les GTIN pour un pr\xE9fixe."},createGTIN14:{name:"creerGTIN14",description:"Cr\xE9er un GTIN-14."},createGLN:{name:"creerGLN",description:"Cr\xE9er un GLN."},createGLNSequence:{name:"creerSequenceGLN",description:"Cr\xE9er un s\xE9quence de GLN."},createAllGLN:{name:"creerTousGLN",description:"Cr\xE9ez tous les GLN pour un pr\xE9fixe."},createSSCC:{name:"creerSSCC",description:"Cr\xE9er un SSCC."},createSSCCSequence:{name:"creerSequenceSSCC",description:"Cr\xE9er un s\xE9quence de SSCC."},createAllSSCC:{name:"creerTousSSCC",description:"Cr\xE9ez tous les SSCC pour un pr\xE9fixe."},createGRAI:{name:"creerGRAI",description:"Cr\xE9er un GRAI."},createGRAISequence:{name:"creerSequenceGRAI",description:"Cr\xE9er un s\xE9quence de GRAI."},createAllGRAI:{name:"creerTousGRAI",description:"Cr\xE9ez tous les GRAI pour un pr\xE9fixe."},createSerializedGRAI:{name:"creerGRAISerialise",description:"Cr\xE9er un GRAI s\xE9rialis\xE9."},concatenateGRAI:{name:"concatenerGRAI",description:"Concat\xE9ner une base GRAI avec un composant s\xE9rie."},createGIAI:{name:"creerGIAI",description:"Cr\xE9er un GIAI."},createGSRN:{name:"creerGSRN",description:"Cr\xE9er un GSRN."},createGSRNSequence:{name:"creerSequenceGSRN",description:"Cr\xE9er un s\xE9quence de GSRN."},createAllGSRN:{name:"creerTousGSRN",description:"Cr\xE9ez tous les GSRN pour un pr\xE9fixe."},createGDTI:{name:"creerGDTI",description:"Cr\xE9er un GDTI."},createGDTISequence:{name:"creerSequenceGDTI",description:"Cr\xE9er un s\xE9quence de GDTI."},createAllGDTI:{name:"creerTousGDTI",description:"Cr\xE9ez tous les GDTI pour un pr\xE9fixe."},createSerializedGDTI:{name:"creerGDTISerialise",description:"Cr\xE9er un GDTI s\xE9rialis\xE9."},concatenateGDTI:{name:"concatenerGDTI",description:"Concat\xE9ner une base GDTI avec un composant s\xE9rie."},createGINC:{name:"creerGINC",description:"Cr\xE9er un GINC."},createGSIN:{name:"creerGSIN",description:"Cr\xE9er un GSIN."},createGSINSequence:{name:"creerSequenceGSIN",description:"Cr\xE9er un s\xE9quence de GSIN."},createAllGSIN:{name:"creerTousGSIN",description:"Cr\xE9ez tous les GSIN pour un pr\xE9fixe."},createGCN:{name:"creerGCN",description:"Cr\xE9er un GCN."},createGCNSequence:{name:"creerSequenceGCN",description:"Cr\xE9er un s\xE9quence de GCN."},createAllGCN:{name:"creerTousGCN",description:"Cr\xE9ez tous les GCN pour un pr\xE9fixe."},createSerializedGCN:{name:"creerGCNSerialise",description:"Cr\xE9er un GCN s\xE9rialis\xE9."},concatenateGCN:{name:"concatenerGCN",description:"Concat\xE9ner une base GCN avec un composant s\xE9rie."},createCPID:{name:"creerCPID",description:"Cr\xE9er un CPID."},createGMN:{name:"creerGMN",description:"Cr\xE9er un GMN."},parseVariableMeasureRCN:{name:"parseVariableMeasureRCN",description:"Analyser un num\xE9ro de diffusion restreinte (RCN) \xE0 l'aide d'un format d'article commercial \xE0 mesure variable."},createVariableMeasureRCN:{name:"creerMesureVariableRCN",description:"Cr\xE9er un num\xE9ro de diffusion restreinte (RCN) \xE0 l'aide d'un format d'article commercial \xE0 mesure variable."},verifiedByGS1:{name:"verifiedByGS1",description:"Cr\xE9er un lien hypertexte \xABV\xE9rifi\xE9 par GS1\xBB."}}}};var Bo="aidct_app_extension",Er={en:{aidct_app_extension:Li},fr:{aidct_app_extension:Pi}},A=O.createInstance();async function Oi(a,e=!1){return Lo(A,a,e,Bo,Er,Ao,Oo,Po)}import{getLogger as ko,LogLevels as Bi,MemoryTransport as Vo}from"@aidc-toolkit/core";var ki=class a{static APPLICATION_NAME="AIDCToolkit";static VERSION_NAME=`${a.APPLICATION_NAME}.version`;static#e=120;static#t=100;#r;#i;#a;#n;#o;constructor(e,t,r){this.#r=e,this.#i=t,this.#a=r;let i=!e.includes("-");this.#n=ko(i?Bi.Info:Bi.Debug,{type:i?"hidden":"pretty"}),this.#o=new Vo(this.#n,a.#e,a.#t)}async initialize(){await this.getDocumentProperty(a.VERSION_NAME)!==this.#r&&await this.setDocumentProperty(a.VERSION_NAME,this.#r)}get version(){return this.#r}get throwError(){return this.#a}get logger(){return this.#n}get memoryTransport(){return this.#o}validateSequenceCount(e){let t=Math.abs(e);if(t>this.#i)throw new RangeError(A.t("AppExtension.sequenceCountMustBeLessThanOrEqualTo",{sequenceCount:t,maximumSequenceCount:this.#i}))}};import{mapIterable as qo}from"@aidc-toolkit/utility";var M=class{#e;constructor(e){this.#e=e}get appExtension(){return this.#e}mapBigInt(e){return this.#e.mapBigInt(e)}#t(e){let t;if(e instanceof RangeError){let r=this.#e.mapRangeError(e);if(this.#e.throwError)throw r;t=r}else t=this.appExtension.handleError(e instanceof Error?e.message:String(e));return t}singletonResult(e){let t;try{t=e()}catch(r){t=this.#t(r)}return t}matrixResult(e,t){return e.map(r=>r.map(i=>this.singletonResult(()=>t(i))))}isValidString(e){return e.map(t=>t.map(r=>(i=>i==="")(r)))}setUpMatrixResult(e,t,r){let i;try{i=t.map(n=>n.map(o=>this.singletonResult(()=>r(e(),o))))}catch(n){i=[[this.#t(n)]]}return i}#r(e,t){let r=this.singletonResult(()=>t(e));return r instanceof Array?r:[r]}arrayResult(e,t){let r;return e.length===0?r=[[]]:e.length===1?(r=[],e[0].forEach((i,n)=>{this.#r(i,t).forEach((s,c)=>{r.length<=c&&r.push([]),r[c][n]=s})})):r=e.map(i=>{let n;return i.length===0?n=[]:i.length===1?n=this.#r(i[0],t):n=[this.#t(new RangeError(A.t("Proxy.matrixMustBeArray")))],n}),r}matrixErrorResult(e,t){return e.map(r=>r.map(i=>{let n;try{t(i),n=""}catch(o){if(o instanceof RangeError)n=o.message;else throw o}return n}))}iterableResult(e){let t;try{t=Array.from(qo(e(),r=>[r]))}catch(r){t=[[this.#t(r)]]}return t}};var f={String:0,Number:1,Boolean:2,Any:3},m={Singleton:0,Array:1,Matrix:2,SingletonArray:3};import{isNullish as Lt,logLevelOf as Fo}from"@aidc-toolkit/core";import{loggableValue as Vi,omit as $o}from"@aidc-toolkit/core";function q(a){return"extendsDescriptor"in a?{...q(a.extendsDescriptor),...a}:a}var vr=class{#e=new Map;#t=new Map;#r=new Set;#i=void 0;describeClass(e,t={}){let r=t.replacementParameterDescriptors===void 0?$o(t,"replacementParameterDescriptors"):{...t,replacementParameterDescriptors:t.replacementParameterDescriptors.map(n=>({...n,replacement:q(n.replacement)}))},i={classDescriptor:r,methodDescriptors:[]};return this.#i=i,(n,o)=>{let s=o.name;if(s===void 0)throw new Error("Class has no name");let c=this.#e,l=this.#t,h=n,p=h,C;do p=Object.getPrototypeOf(p),C=c.get(p)??l.get(p);while(p!==M&&C===void 0);let T=r.namespace,I=r.category,D;if(C!==void 0){T??=C.namespace,I??=C.category;let R=C.methodDescriptors,P=t.replacementParameterDescriptors;if(P!==void 0){let L=new Map(P.map(G=>[G.name,q(G.replacement)]));D=R.map(G=>({...G,parameterDescriptors:G.parameterDescriptors.map(de=>L.get(de.name)??de)}))}else D=R.slice()}else D=[];let N=T===void 0?"":`${T}.`,y=`${N}${s}`;if(this.#r.has(y))throw new Error(`Duplicate class ${y}`);if(I===void 0)throw new Error(`Missing category for ${y}`);this.#r.add(y);for(let R of i.methodDescriptors){let P=D.findIndex(L=>L.name===R.name);P!==-1?D[P]=R:D.push(R)}let S=[],b=t.methodInfix;for(let R of D){let P=R.name,L=R.infixBefore,G;if(b===void 0||R.ignoreInfix===!0)G=P;else if(L===void 0)G=`${P}${b}`;else{let V=P.indexOf(L);if(V===-1)throw new Error(`Cannot find "${L}" in method ${P}`);G=`${P.substring(0,V)}${b}${P.substring(V)}`}let de=`${N}${G}`,Dt={...R,functionName:G,namespaceFunctionName:de};S.push(Dt)}let v=/^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\.?(?<className>[A-Z].*|)$/u.exec(y)?.groups;if(v===void 0)throw new Error(`${y} is not a valid namespace-qualified class name`);let w={...r,name:s,namespace:T,category:I,namespaceClassName:y,objectName:`${v.namespaceFirstWord.toLowerCase()}${v.namespaceRemaining}${v.className}`,methodDescriptors:S};(e?c:l).set(h,w);let W=new Map;for(let R of S)W.set(R.name,R);return this.#i=void 0,class extends n{get logger(){return this.appExtension.logger}callBuilder(R,P,L){return()=>{let G=W.get(R);return{namespace:T,className:s,methodName:R,functionName:G.functionName,parameters:G.parameterDescriptors.map((de,Dt)=>({name:de.name,value:Vi(P[Dt])})),result:Vi(L)}}}}}}describeMethod(e){return(t,r)=>{let i=r.name;if(this.#i===void 0)throw new Error(`Class for method ${String(i)} does not have a descriptor`);if(typeof i!="string"||r.static||r.private)throw new Error(`Method ${String(i)} has an invalid name, is static, or is private`);let n=!1,o=e.parameterDescriptors.map(s=>{let c=q(s),l=c.name;if(!c.isRequired)n=!0;else if(n)throw new Error(`Parameter ${l} descriptor of method ${i} is required but prior parameter descriptor is optional`);if((c.multiplicity===m.Array||c.multiplicity===m.Matrix)&&e.multiplicity!==m.Matrix)throw new Error(`Parameter ${l} descriptor of method ${i} is array or matrix but method descriptor is not matrix`);return c});return this.#i.methodDescriptors.push({...e,name:i,parameterDescriptors:o}),function(...c){let l=this,h;try{h=t.call(this,...c),e.isStream!==!0&&(h instanceof Promise?h=h.then(p=>(l.logger.trace(l.callBuilder(i,c,p)),p)).catch(p=>{throw l.logger.error(l.callBuilder(i,c,p)),p}):l.logger.trace(l.callBuilder(i,c,h)))}catch(p){throw l.logger.error(l.callBuilder(i,c,p)),p}return h}}}get classDescriptors(){return this.#t.values()}},d=new vr;var jo={name:"spillArray",type:f.Any,multiplicity:m.Array,isRequired:!0},Ui={name:"spillMaximum",type:f.Number,multiplicity:m.Singleton,isRequired:!1},zo={extendsDescriptor:Ui,sortOrder:0,name:"spillMaximumWidth"},Uo={extendsDescriptor:Ui,sortOrder:1,name:"spillMaximumHeight"},qi,$i,Fi,ji,zi,ve,Zt,Hi;zi=[d.describeClass(!1,{category:"helper"})];var ie=class extends(ji=M,Fi=[d.describeMethod({type:f.String,multiplicity:m.Singleton,parameterDescriptors:[]})],$i=[d.describeMethod({requiresContext:!0,type:f.Any,multiplicity:m.Matrix,parameterDescriptors:[jo,Uo,zo]})],qi=[d.describeMethod({type:f.String,isHidden:!0,isStream:!0,multiplicity:m.Array,parameterDescriptors:[{name:"logLevel",type:f.String,multiplicity:m.Singleton,isRequired:!1}]})],ji){constructor(){super(...arguments);g(ve,5,this);ue(this,Zt)}version(){return this.appExtension.version}async spill(t,r,i,n){let o,s=t.length,c=s!==0?t[0].length:0,l=this.singletonResult(()=>{if(s>1&&c>1)throw new RangeError(A.t("Proxy.matrixMustBeArray"));return!0});if(l===!0){let h=await Ee(this,Zt,Hi).call(this,{width:i,height:r},n),p=s===1,C=p?c:s,T=p?h.width:h.height,I=p?h.height:h.width,D=T*I;if(C>1&&C<=D){let N=Math.sqrt(C),y;if(Number.isInteger(Math.log10(C))){let b=10**Math.ceil(Math.log10(N));b>T&&(b/=10),b<=T&&C/b<=I&&(y=b)}y??=Math.max(Math.min(Math.ceil(N),T),Math.floor(C/I));let S=Math.ceil(C/y);if(o=[],p){let b=0;do{let v=b+y,w=t[0].slice(b,v);if(w.length<y){let W=w.length;w.length=y,w.fill("",W,y)}o.push(w),b=v}while(b<C)}else for(let b=0;b<y;b++){let v=[];for(let w=b;w<C;w+=y)v.push(t[w][0]);v.length<S&&(v[S-1]=""),o.push(v)}}else o=t}else o=[[l]];return o}loggerMessages(t,r){if(Lt(r))throw new Error("Streaming invocation context not provided by application");let i=this.appExtension,n=!1,o,s=i.setUpStreaming(r,()=>{n&&i.memoryTransport.removeNotificationCallback("loggerMessages"),o!==void 0&&(i.logger.settings.minLevel=o)});if(i.memoryTransport.addNotificationCallback("loggerMessages",(c,l)=>{s(this.iterableResult(()=>l))})){n=!0;let c;if(!Lt(t))try{c=Fo(t)}catch{}c!==void 0&&(o=i.logger.settings.minLevel,i.logger.settings.minLevel=c)}else s([["Only one logger messages call allowable per workbook"]])}};ve=x(ji),Zt=new WeakSet,Hi=async function(t,r){if(Lt(r))throw new Error("Invocation context not provided by application");let i=t.width,n=t.height,o,s;if(Lt(i)||Lt(n)){let c=await this.appExtension.getSheetAddress(r);o=i??this.appExtension.maximumWidth-c.columnIndex,s=n??this.appExtension.maximumHeight-c.rowIndex}else o=i,s=n;return{width:o,height:s}},u(ve,1,"version",Fi,ie),u(ve,1,"spill",$i,ie),u(ve,1,"loggerMessages",qi,ie),ie=u(ve,0,"AppHelperProxy",zi,ie),g(ve,1,ie);var Ar={};xi(Ar,{AlphabeticProxy:()=>ze,AlphanumericProxy:()=>Ue,CharacterSetCreatorProxy:()=>B,CharacterSetValidatorProxy:()=>J,HexadecimalProxy:()=>je,NumericProxy:()=>Fe,RegExpProxy:()=>he,TransformerProxy:()=>le});import{mapIterable as Ho,Sequence as Ko,Transformer as Sr}from"@aidc-toolkit/utility";var j={name:"value",type:f.Number,multiplicity:m.Matrix,isRequired:!0},Oe={extendsDescriptor:j,name:"startValue",multiplicity:m.Singleton},Be={extendsDescriptor:j,name:"count",multiplicity:m.Singleton},me={name:"tweak",type:f.Number,multiplicity:m.Singleton,isRequired:!1};var yr={name:"domain",type:f.Number,multiplicity:m.Singleton,isRequired:!0},Wo={extendsDescriptor:j,name:"transformedValue"},Ki,Wi,_i,Zi,Ji,Se;Ji=[d.describeClass(!1,{category:"transformation",methodInfix:"Transform"})];var le=class extends(Zi=M,_i=[d.describeMethod({type:f.Number,multiplicity:m.Matrix,parameterDescriptors:[yr,j,me]})],Wi=[d.describeMethod({infixBefore:"Sequence",type:f.Number,multiplicity:m.Array,parameterDescriptors:[yr,Oe,Be,me]})],Ki=[d.describeMethod({type:f.Number,multiplicity:m.Matrix,parameterDescriptors:[yr,Wo,me]})],Zi){constructor(){super(...arguments);g(Se,5,this)}forward(t,r,i){return this.setUpMatrixResult(()=>Sr.get(t,i??void 0),r,(n,o)=>this.mapBigInt(n.forward(o)))}forwardSequence(t,r,i,n){return this.iterableResult(()=>(this.appExtension.validateSequenceCount(i),Ho(Sr.get(t,n??void 0).forward(new Ko(r,i)),o=>this.mapBigInt(o))))}reverse(t,r,i){return this.setUpMatrixResult(()=>Sr.get(t,i??void 0),r,(n,o)=>this.mapBigInt(n.reverse(o)))}};Se=x(Zi),u(Se,1,"forward",_i,le),u(Se,1,"forwardSequence",Wi,le),u(Se,1,"reverse",Ki,le),le=u(Se,0,"TransformerProxy",Ji,le),g(Se,1,le);import{RegExpValidator as Zo}from"@aidc-toolkit/utility";var br={name:"s",type:f.String,multiplicity:m.Matrix,isRequired:!0},ke={extendsDescriptor:br,name:"validateS"};var Yi,Dr,_o;Yi=[d.describeClass(!0,{category:"string"})];var Z=class extends(_o=M){validateString(e,t,r){return this.matrixErrorResult(t,i=>{e.validate(i,r)})}};Dr=x(_o),Z=u(Dr,0,"StringProxy",Yi,Z),g(Dr,1,Z);var Qi={name:"regExp",type:f.String,multiplicity:m.Singleton,isRequired:!0},Jo={name:"errorMessage",type:f.String,multiplicity:m.Singleton,isRequired:!1},Xi,en,tn,rn,Ve;rn=[d.describeClass(!1,{methodInfix:"RegExp"})];var he=class extends(tn=Z,en=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Qi,ke,Jo]})],Xi=[d.describeMethod({type:f.Boolean,multiplicity:m.Matrix,parameterDescriptors:[Qi,ke]})],tn){constructor(){super(...arguments);g(Ve,5,this)}validate(t,r,i){return this.validateString(new class extends Zo{createErrorMessage(n){return i?.replace(/\{\{s\}\}/ug,n)??super.createErrorMessage(n)}}(new RegExp(t,"u")),r)}isValid(t,r){return this.isValidString(this.validate(t,r,void 0))}};Ve=x(tn),u(Ve,1,"validate",en,he),u(Ve,1,"isValid",Xi,he),he=u(Ve,0,"RegExpProxy",rn,he),g(Ve,1,he);import{ALPHABETIC_CREATOR as Yo,ALPHANUMERIC_CREATOR as Qo,HEXADECIMAL_CREATOR as Xo,NUMERIC_CREATOR as es,Sequence as ts}from"@aidc-toolkit/utility";var Jt={name:"exclusion",type:f.Number,multiplicity:m.Singleton,isRequired:!1},z={extendsDescriptor:Jt,sortOrder:0,name:"exclusionNone"},nn={extendsDescriptor:Jt,sortOrder:1,name:"exclusionFirstZero"},qe={extendsDescriptor:Jt,sortOrder:2,name:"exclusionAllNumeric"},Nr={extendsDescriptor:Jt,sortOrder:3,name:"exclusionAny"};var an={name:"length",type:f.Number,multiplicity:m.Singleton,isRequired:!0},rs={extendsDescriptor:br,name:"valueForS"},on,sn,cn,ln,Pt,$e;ln=[d.describeClass(!0)];var J=class extends(cn=Z,sn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[ke,z]})],on=[d.describeMethod({type:f.Boolean,multiplicity:m.Matrix,parameterDescriptors:[ke,z]})],cn){constructor(t,r){super(t);g($e,5,this);ue(this,Pt);Ce(this,Pt,r)}validate(t,r){return this.validateString(ce(this,Pt),t,{exclusion:r??void 0})}isValid(t,r){return this.isValidString(this.validate(t,r))}};$e=x(cn),Pt=new WeakMap,u($e,1,"validate",sn,J),u($e,1,"isValid",on,J),J=u($e,0,"CharacterSetValidatorProxy",ln,J),g($e,1,J);var pn,dn,un,mn,hn,be,ye;hn=[d.describeClass(!0)];var B=class extends(mn=J,un=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[an,j,z,me]})],dn=[d.describeMethod({infixBefore:"Sequence",type:f.String,multiplicity:m.Array,parameterDescriptors:[an,Oe,Be,z,me]})],pn=[d.describeMethod({type:f.Number,multiplicity:m.Matrix,parameterDescriptors:[rs,z,me]})],mn){constructor(t,r){super(t,r);g(ye,5,this);ue(this,be);Ce(this,be,r)}create(t,r,i,n){let o=i??void 0,s=n??void 0;return this.matrixResult(r,c=>ce(this,be).create(t,c,o,s))}createSequence(t,r,i,n,o){let s=n??void 0,c=o??void 0;return this.iterableResult(()=>(this.appExtension.validateSequenceCount(i),ce(this,be).create(t,new ts(r,i),s,c)))}valueFor(t,r,i){let n=r??void 0,o=i??void 0;return this.matrixResult(t,s=>this.mapBigInt(ce(this,be).valueFor(s,n,o)))}};ye=x(mn),be=new WeakMap,u(ye,1,"create",un,B),u(ye,1,"createSequence",dn,B),u(ye,1,"valueFor",pn,B),B=u(ye,0,"CharacterSetCreatorProxy",hn,B),g(ye,1,B);var fn,wr,is;fn=[d.describeClass(!1,{methodInfix:"Numeric",replacementParameterDescriptors:[{name:q(z).name,replacement:nn}]})];var Fe=class extends(is=B){constructor(e){super(e,es)}};wr=x(is),Fe=u(wr,0,"NumericProxy",fn,Fe),g(wr,1,Fe);var gn,Gr,ns;gn=[d.describeClass(!1,{methodInfix:"Hexadecimal",replacementParameterDescriptors:[{name:q(z).name,replacement:Nr}]})];var je=class extends(ns=B){constructor(e){super(e,Xo)}};Gr=x(ns),je=u(Gr,0,"HexadecimalProxy",gn,je),g(Gr,1,je);var Tn,Rr,as;Tn=[d.describeClass(!1,{methodInfix:"Alphabetic"})];var ze=class extends(as=B){constructor(e){super(e,Yo)}};Rr=x(as),ze=u(Rr,0,"AlphabeticProxy",Tn,ze),g(Rr,1,ze);var xn,Mr,os;xn=[d.describeClass(!1,{methodInfix:"Alphanumeric",replacementParameterDescriptors:[{name:q(z).name,replacement:Nr}]})];var Ue=class extends(os=B){constructor(e){super(e,Qo)}};Mr=x(os),Ue=u(Mr,0,"AlphanumericProxy",xn,Ue),g(Mr,1,Ue);var cr={};xi(cr,{AI39Proxy:()=>Ke,AI64Proxy:()=>We,AI82Proxy:()=>He,CPIDCreatorProxy:()=>St,CPIDValidatorProxy:()=>pt,CheckProxy:()=>U,GCNCreatorProxy:()=>vt,GCNValidatorProxy:()=>lt,GDTICreatorProxy:()=>It,GDTIValidatorProxy:()=>ot,GIAICreatorProxy:()=>Tt,GIAIValidatorProxy:()=>nt,GINCCreatorProxy:()=>Ct,GINCValidatorProxy:()=>st,GLNCreatorProxy:()=>ht,GLNValidatorProxy:()=>tt,GMNCreatorProxy:()=>yt,GMNValidatorProxy:()=>dt,GRAICreatorProxy:()=>gt,GRAIValidatorProxy:()=>it,GSINCreatorProxy:()=>Et,GSINValidatorProxy:()=>ct,GSRNCreatorProxy:()=>xt,GSRNValidatorProxy:()=>at,GTIN12ValidatorProxy:()=>Xe,GTIN13ValidatorProxy:()=>Qe,GTIN8ValidatorProxy:()=>et,GTINCreatorProxy:()=>Re,GTINValidatorStaticProxy:()=>$,PrefixManagerProxy:()=>oe,SSCCCreatorProxy:()=>ft,SSCCValidatorProxy:()=>rt,ServiceProxy:()=>Me,VariableMeasureProxy:()=>xe});import{AI39_CREATOR as ss,AI64_VALIDATOR as cs,AI82_CREATOR as ls}from"@aidc-toolkit/gs1";var In,Lr,ps;In=[d.describeClass(!1,{namespace:"GS1",methodInfix:"AI82",replacementParameterDescriptors:[{name:q(z).name,replacement:qe}]})];var He=class extends(ps=B){constructor(e){super(e,ls)}};Lr=x(ps),He=u(Lr,0,"AI82Proxy",In,He),g(Lr,1,He);var Cn,Pr,ds;Cn=[d.describeClass(!1,{namespace:"GS1",methodInfix:"AI39",replacementParameterDescriptors:[{name:q(z).name,replacement:qe}]})];var Ke=class extends(ds=B){constructor(e){super(e,ss)}};Pr=x(ds),Ke=u(Pr,0,"AI39Proxy",Cn,Ke),g(Pr,1,Ke);var En,Or,us;En=[d.describeClass(!1,{namespace:"GS1",methodInfix:"AI64"})];var We=class extends(us=J){constructor(e){super(e,cs)}};Or=x(us),We=u(Or,0,"AI64Proxy",En,We),g(Or,1,We);import{checkCharacterPair as ms,checkDigit as hs,hasValidCheckCharacterPair as fs,hasValidCheckDigit as gs,isValidPriceOrWeightCheckDigit as Ts,priceOrWeightCheckDigit as xs}from"@aidc-toolkit/gs1";var Mn={name:"checkS",type:f.String,multiplicity:m.Matrix,isRequired:!0},Yt={extendsDescriptor:Mn,name:"numericS"},vn={extendsDescriptor:Yt,sortOrder:0,name:"numericSFourOrFiveDigits"},Is={extendsDescriptor:Yt,sortOrder:1,name:"numericSWithCheckDigit"},Cs={extendsDescriptor:Yt,sortOrder:2,name:"checkDigit",multiplicity:m.Singleton},An={extendsDescriptor:Mn,name:"ai82S"},Es={extendsDescriptor:An,name:"ai82SWithCheckCharacterPair"},Sn,yn,bn,Dn,Nn,wn,Gn,Rn,ne;Rn=[d.describeClass(!1,{namespace:"GS1",category:"checkCharacter"})];var U=class extends(Gn=M,wn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Yt]})],Nn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Is]})],Dn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[vn]})],bn=[d.describeMethod({type:f.String,multiplicity:m.Singleton,parameterDescriptors:[{...vn,multiplicity:m.Singleton},Cs]})],yn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[An]})],Sn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Es]})],Gn){constructor(){super(...arguments);g(ne,5,this)}checkDigit(t){return this.matrixResult(t,r=>hs(r))}hasValidCheckDigit(t){return this.matrixResult(t,r=>gs(r))}priceOrWeightCheckDigit(t){return this.matrixResult(t,r=>xs(r))}isValidPriceOrWeightCheckDigit(t,r){return this.singletonResult(()=>Ts(t,r))}checkCharacterPair(t){return this.matrixResult(t,r=>ms(r))}hasValidCheckCharacterPair(t){return this.matrixResult(t,r=>fs(r))}};ne=x(Gn),u(ne,1,"checkDigit",wn,U),u(ne,1,"hasValidCheckDigit",Nn,U),u(ne,1,"priceOrWeightCheckDigit",Dn,U),u(ne,1,"isValidPriceOrWeightCheckDigit",bn,U),u(ne,1,"checkCharacterPair",yn,U),u(ne,1,"hasValidCheckCharacterPair",Sn,U),U=u(ne,0,"CheckProxy",Rn,U),g(ne,1,U);import{GTINLengths as $r,GTINValidator as Ye,IdentifierValidators as Fr}from"@aidc-toolkit/gs1";var Qt={name:"indicatorDigit",type:f.String,multiplicity:m.Singleton,isRequired:!0};var Xt={name:"identifierType",type:f.String,multiplicity:m.Singleton,isRequired:!0},k={name:"identifier",type:f.String,multiplicity:m.Matrix,isRequired:!0};var er={extendsDescriptor:k,sortOrder:0,name:"validateIdentifier"},vs={extendsDescriptor:k,sortOrder:1,name:"splitIdentifier",multiplicity:m.Array},Ln,Br,Ss;Ln=[d.describeClass(!0,{namespace:"GS1",category:"identifierValidation"})];var De=class extends(Ss=Z){#e;constructor(e,t){super(e),this.#e=t}get validator(){return this.#e}};Br=x(Ss),De=u(Br,0,"IdentifierValidatorProxy",Ln,De),g(Br,1,De);var Pn,On,Bn,kn,_e;kn=[d.describeClass(!0)];var pe=class extends(Bn=De,On=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[er]})],Pn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[er]})],Bn){constructor(){super(...arguments);g(_e,5,this)}validate(t){return this.validateString(this.validator,t)}isValid(t){return this.isValidString(this.validate(t))}};_e=x(Bn),u(_e,1,"validate",On,pe),u(_e,1,"isValid",Pn,pe),pe=u(_e,0,"NumericIdentifierValidatorProxy",kn,pe),g(_e,1,pe);var Je=class extends pe{},tr=class extends pe{},Ne=class extends tr{},Vn,qn,$n,Ot;$n=[d.describeClass(!0)];var ae=class extends(qn=tr,Vn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[vs]})],qn){constructor(){super(...arguments);g(Ot,5,this)}split(t){return this.arrayResult(t,r=>{let i=this.validator.split(r);return[i.baseIdentifier,i.serialComponent]})}};Ot=x(qn),u(Ot,1,"split",Vn,ae),ae=u(Ot,0,"SerializableNumericIdentifierValidatorProxy",$n,ae),g(Ot,1,ae);var Fn,jn,zn,Un,Ze;Un=[d.describeClass(!0)];var H=class extends(zn=De,jn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[er,qe]})],Fn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[er,qe]})],zn){constructor(){super(...arguments);g(Ze,5,this)}validate(t,r){return this.validateString(this.validator,t,{exclusion:r??void 0})}isValid(t,r){return this.isValidString(this.validate(t,r))}};Ze=x(zn),u(Ze,1,"validate",jn,H),u(Ze,1,"isValid",Fn,H),H=u(Ze,0,"NonNumericIdentifierValidatorProxy",Un,H),g(Ze,1,H);var _n,kr,ws;_n=[d.describeClass(!1,{methodInfix:"GTIN13"})];var Qe=class extends(ws=Je){constructor(e){super(e,Fr.GTIN[$r.GTIN13])}};kr=x(ws),Qe=u(kr,0,"GTIN13ValidatorProxy",_n,Qe),g(kr,1,Qe);var Zn,Vr,Gs;Zn=[d.describeClass(!1,{methodInfix:"GTIN12"})];var Xe=class extends(Gs=Je){constructor(e){super(e,Fr.GTIN[$r.GTIN12])}};Vr=x(Gs),Xe=u(Vr,0,"GTIN12ValidatorProxy",Zn,Xe),g(Vr,1,Xe);var Jn,qr,Rs;Jn=[d.describeClass(!1,{methodInfix:"GTIN8"})];var et=class extends(Rs=Je){constructor(e){super(e,Fr.GTIN[$r.GTIN8])}};qr=x(Rs),et=u(qr,0,"GTIN8ValidatorProxy",Jn,et),g(qr,1,et);var ys={extendsDescriptor:k,name:"zeroSuppressibleGTIN12"},bs={extendsDescriptor:k,name:"zeroSuppressedGTIN12"},Ds={extendsDescriptor:k,name:"convertGTIN"},Ns={extendsDescriptor:k,name:"normalizeGTIN"},Hn={extendsDescriptor:k,name:"validateGTIN"},Kn={name:"gtinLevel",type:f.Number,multiplicity:m.Singleton,isRequired:!1},Wn={extendsDescriptor:k,name:"validateGTIN14"},Yn,Qn,Xn,ea,ta,ra,ia,na,aa,oa,K;oa=[d.describeClass(!1,{namespace:"GS1",category:"identifierValidation"})];var $=class extends(aa=M,na=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[ys]})],ia=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[bs]})],ra=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Qt,Ds]})],ta=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Ns]})],ea=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Hn,Kn]})],Xn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Hn,Kn]})],Qn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Wn]})],Yn=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Wn]})],aa){constructor(){super(...arguments);g(K,5,this)}zeroSuppressGTIN12(t){return this.matrixResult(t,r=>Ye.zeroSuppress(r))}zeroExpandGTIN12(t){return this.matrixResult(t,r=>Ye.zeroExpand(r))}convertToGTIN14(t,r){return this.matrixResult(r,i=>Ye.convertToGTIN14(t,i))}normalizeGTIN(t){return this.matrixResult(t,r=>Ye.normalize(r))}validateGTIN(t,r){let i=r??void 0;return this.matrixErrorResult(t,n=>{Ye.validateAny(n,i)})}isValidGTIN(t,r){return this.isValidString(this.validateGTIN(t,r))}validateGTIN14(t){return this.matrixErrorResult(t,r=>{Ye.validateGTIN14(r)})}isValidGTIN14(t){return this.isValidString(this.validateGTIN14(t))}};K=x(aa),u(K,1,"zeroSuppressGTIN12",na,$),u(K,1,"zeroExpandGTIN12",ia,$),u(K,1,"convertToGTIN14",ra,$),u(K,1,"normalizeGTIN",ta,$),u(K,1,"validateGTIN",ea,$),u(K,1,"isValidGTIN",Xn,$),u(K,1,"validateGTIN14",Qn,$),u(K,1,"isValidGTIN14",Yn,$),$=u(K,0,"GTINValidatorStaticProxy",oa,$),g(K,1,$);import{IdentifierValidators as Y}from"@aidc-toolkit/gs1";var sa,jr,Ms;sa=[d.describeClass(!1,{methodInfix:"GLN"})];var tt=class extends(Ms=Ne){constructor(e){super(e,Y.GLN)}};jr=x(Ms),tt=u(jr,0,"GLNValidatorProxy",sa,tt),g(jr,1,tt);var ca,zr,As;ca=[d.describeClass(!1,{methodInfix:"SSCC"})];var rt=class extends(As=Ne){constructor(e){super(e,Y.SSCC)}};zr=x(As),rt=u(zr,0,"SSCCValidatorProxy",ca,rt),g(zr,1,rt);var la,Ur,Ls;la=[d.describeClass(!1,{methodInfix:"GRAI"})];var it=class extends(Ls=ae){constructor(e){super(e,Y.GRAI)}};Ur=x(Ls),it=u(Ur,0,"GRAIValidatorProxy",la,it),g(Ur,1,it);var pa,Hr,Ps;pa=[d.describeClass(!1,{methodInfix:"GIAI"})];var nt=class extends(Ps=H){constructor(e){super(e,Y.GIAI)}};Hr=x(Ps),nt=u(Hr,0,"GIAIValidatorProxy",pa,nt),g(Hr,1,nt);var da,Kr,Os;da=[d.describeClass(!1,{methodInfix:"GSRN"})];var at=class extends(Os=Ne){constructor(e){super(e,Y.GSRN)}};Kr=x(Os),at=u(Kr,0,"GSRNValidatorProxy",da,at),g(Kr,1,at);var ua,Wr,Bs;ua=[d.describeClass(!1,{methodInfix:"GDTI"})];var ot=class extends(Bs=ae){constructor(e){super(e,Y.GDTI)}};Wr=x(Bs),ot=u(Wr,0,"GDTIValidatorProxy",ua,ot),g(Wr,1,ot);var ma,_r,ks;ma=[d.describeClass(!1,{methodInfix:"GINC"})];var st=class extends(ks=H){constructor(e){super(e,Y.GINC)}};_r=x(ks),st=u(_r,0,"GINCValidatorProxy",ma,st),g(_r,1,st);var ha,Zr,Vs;ha=[d.describeClass(!1,{methodInfix:"GSIN"})];var ct=class extends(Vs=Ne){constructor(e){super(e,Y.GSIN)}};Zr=x(Vs),ct=u(Zr,0,"GSINValidatorProxy",ha,ct),g(Zr,1,ct);var fa,Jr,qs;fa=[d.describeClass(!1,{methodInfix:"GCN"})];var lt=class extends(qs=ae){constructor(e){super(e,Y.GCN)}};Jr=x(qs),lt=u(Jr,0,"GCNValidatorProxy",fa,lt),g(Jr,1,lt);var ga,Yr,$s;ga=[d.describeClass(!1,{methodInfix:"CPID"})];var pt=class extends($s=H){constructor(e){super(e,Y.CPID)}};Yr=x($s),pt=u(Yr,0,"CPIDValidatorProxy",ga,pt),g(Yr,1,pt);var Ta,Qr,Fs;Ta=[d.describeClass(!1,{methodInfix:"GMN"})];var dt=class extends(Fs=H){constructor(e){super(e,Y.GMN)}};Qr=x(Fs),dt=u(Qr,0,"GMNValidatorProxy",Ta,dt),g(Qr,1,dt);import{PrefixManager as ir,RemoteGCPLengthCache as Us}from"@aidc-toolkit/gs1";import{IdentifierTypes as js}from"@aidc-toolkit/gs1";function zs(a){return a in js}function rr(a){let e=a.toUpperCase();if(!zs(e))throw new RangeError(A.t("ServiceProxy.invalidIdentifierType",{identifierType:a}));return e}var Hs={name:"prefix",type:f.String,multiplicity:m.Singleton,isRequired:!0},Ks={name:"prefixType",type:f.Number,multiplicity:m.Singleton,isRequired:!1},Ws={name:"tweakFactor",type:f.Number,multiplicity:m.Singleton,isRequired:!1},_s={extendsDescriptor:k,name:"gcpLengthIdentifier"},Xr=class extends Us{#e;constructor(e){super(e.sharedAppDataStorage),this.#e=e.logger}get nextCheckDateTime(){return super.nextCheckDateTime.then(e=>(this.#e.debug(`GS1 Company Prefix length next check date/time ${e?.toISOString()}`),e))}get cacheDateTime(){return super.cacheDateTime.then(e=>(this.#e.debug(`GS1 Company Prefix length cache date/time ${e?.toISOString()}`),e))}get cacheData(){return super.cacheData.then(e=>(this.#e.debug("GS1 Company Prefix length cache data retrieved"),e))}get sourceDateTime(){return super.sourceDateTime.then(e=>(this.#e.debug(`GS1 Company Prefix source date/time ${e.toISOString()}`),e))}get sourceData(){return super.sourceData.then(e=>(this.#e.debug("GS1 Company Prefix length source data retrieved"),e))}async update(e,t,r){return super.update(e,t,r).then(()=>{this.#e.trace(`GS1 Company Prefix length saved to shared data with next check date/time ${e.toISOString()}`)})}},xa,Ia,Ca,Ea,va,Sa,Bt,fe,ut,nr;Sa=[d.describeClass(!1,{namespace:"GS1",category:"prefix"})];var oe=class extends(va=M,Ea=[d.describeMethod({type:f.Any,multiplicity:m.SingletonArray,parameterDescriptors:[Hs,Ks,Ws]})],Ca=[d.describeMethod({type:f.Number,multiplicity:m.Matrix,parameterDescriptors:[Xt,_s]})],Ia=[d.describeMethod({type:f.String,multiplicity:m.Singleton,parameterDescriptors:[]})],xa=[d.describeMethod({type:f.String,multiplicity:m.Singleton,parameterDescriptors:[]})],va){constructor(t){super(t);g(fe,5,this);ue(this,ut);ue(this,Bt);Ce(this,Bt,new Xr(t))}definePrefix(t,r,i){return[[t,r,i]]}async gcpLength(t,r){return Ee(this,ut,nr).call(this).then(()=>this.setUpMatrixResult(()=>rr(t),r,(i,n)=>ir.gcpLength(i,n)))}async gcpLengthDateTime(){return Ee(this,ut,nr).call(this).then(()=>this.singletonResult(()=>ir.gcpLengthDateTime().toISOString()))}async gcpLengthDisclaimer(){return Ee(this,ut,nr).call(this).then(()=>this.singletonResult(()=>ir.gcpLengthDisclaimer()))}};fe=x(va),Bt=new WeakMap,ut=new WeakSet,nr=async function(){return ir.loadGCPLengthData(ce(this,Bt)).catch(t=>{this.appExtension.logger.error("Load GS1 Company Prefix length data failed",t)})},u(fe,1,"definePrefix",Ea,oe),u(fe,1,"gcpLength",Ca,oe),u(fe,1,"gcpLengthDateTime",Ia,oe),u(fe,1,"gcpLengthDisclaimer",xa,oe),oe=u(fe,0,"PrefixManagerProxy",Sa,oe),g(fe,1,oe);import{isNullish as Zs}from"@aidc-toolkit/core";import{PrefixManager as Js,PrefixTypes as ar,PrefixValidator as ba}from"@aidc-toolkit/gs1";import{Sequence as Ys}from"@aidc-toolkit/utility";var ya={name:"prefixDefinition",type:f.Any,multiplicity:m.SingletonArray,isRequired:!0},ge={extendsDescriptor:ya,name:"prefixDefinitionGS1UPC"},ei={extendsDescriptor:ya,name:"prefixDefinitionAny"};var Na,ti,tc;Na=[d.describeClass(!0,{namespace:"GS1",category:"identifierCreation"})];var Te=class Te extends(tc=M){static#e=[ar.GS1CompanyPrefix,ar.UPCCompanyPrefix,ar.GS18Prefix];#t;constructor(e,t){super(e),this.#t=t}getCreator(e){let t=e.length===1?e[0]:e.map(c=>{if(c.length!==1)throw new RangeError(A.t("IdentifierCreatorProxy.prefixDefinitionMustBeOneDimensional"));return c[0]});if(t.length>3)throw new RangeError(A.t("IdentifierCreatorProxy.prefixDefinitionMustHaveMaximumThreeElements"));let r=t[0];if(typeof r!="string")throw new RangeError(A.t("IdentifierCreatorProxy.prefixMustBeString"));let i=t[1]??0;if(typeof i!="number"||i<0||i>=Te.#e.length)throw new RangeError(A.t("IdentifierCreatorProxy.prefixTypeMustBeNumber",{maximumPrefixType:Te.#e.length-1}));let n=Te.#e[i];if(n===void 0)throw new RangeError(A.t("IdentifierCreatorProxy.invalidPrefixType"));let o=Js.get(n,r),s=t[2];if(Zs(s))o.resetTweakFactor();else{if(typeof s!="number")throw new RangeError(A.t("IdentifierCreatorProxy.tweakFactorMustBeNumber"));o.tweakFactor=s}return this.#t(o)}};ti=x(tc),Te=u(ti,0,"IdentifierCreatorProxy",Na,Te),g(ti,1,Te);var or=Te,Vt={name:"sparse",type:f.Boolean,multiplicity:m.Singleton,isRequired:!1},wa,Ga,Ra,Ma,Aa,we;Aa=[d.describeClass(!0)];var Q=class extends(Ma=or,Ra=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[ge,j,Vt]})],Ga=[d.describeMethod({infixBefore:"Sequence",type:f.String,multiplicity:m.Array,parameterDescriptors:[ge,Oe,Be,Vt]})],wa=[d.describeMethod({type:f.String,multiplicity:m.Array,parameterDescriptors:[ge]})],Ma){constructor(){super(...arguments);g(we,5,this)}create(t,r,i){let n=i??void 0;return this.setUpMatrixResult(()=>this.getCreator(t),r,(o,s)=>o.create(s,n))}createSequence(t,r,i,n){return this.iterableResult(()=>(this.appExtension.validateSequenceCount(i),this.getCreator(t).create(new Ys(r,i),n??void 0)))}createAll(t){return this.iterableResult(()=>{let r=this.getCreator(t);return this.appExtension.validateSequenceCount(r.capacity),r.createAll()})}};we=x(Ma),u(we,1,"create",Ra,Q),u(we,1,"createSequence",Ga,Q),u(we,1,"createAll",wa,Q),Q=u(we,0,"NumericIdentifierCreatorProxy",Aa,Q),g(we,1,Q);var sr=class extends Q{},Ge=class extends sr{},Qs={extendsDescriptor:j,multiplicity:m.Singleton},Xs={extendsDescriptor:k,name:"baseIdentifier",multiplicity:m.Singleton},Da={name:"serialComponent",type:f.String,multiplicity:m.Matrix,isRequired:!0},La,Pa,Oa,Ba,mt;Ba=[d.describeClass(!0)];var X=class extends(Oa=sr,Pa=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[ge,Qs,Da,Vt]})],La=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[Xs,Da]})],Oa){constructor(){super(...arguments);g(mt,5,this)}createSerialized(t,r,i,n){let o=n??void 0;return this.setUpMatrixResult(()=>this.getCreator(t),i,(s,c)=>s.createSerialized(r,c,o))}concatenate(t,r){return this.setUpMatrixResult(()=>this.getCreator([[t.substring(0,t.startsWith("0")?ba.UPC_COMPANY_PREFIX_MINIMUM_LENGTH+1:ba.GS1_COMPANY_PREFIX_MINIMUM_LENGTH),ar.GS1CompanyPrefix]]),r,(i,n)=>i.concatenate(t,n))}};mt=x(Oa),u(mt,1,"createSerialized",Pa,X),u(mt,1,"concatenate",La,X),X=u(mt,0,"SerializableNumericIdentifierCreatorProxy",Ba,X),g(mt,1,X);var ec={name:"reference",type:f.String,multiplicity:m.Matrix,isRequired:!0},ka,Va,qa,kt;qa=[d.describeClass(!0)];var ee=class extends(Va=or,ka=[d.describeMethod({type:f.String,multiplicity:m.Matrix,parameterDescriptors:[ge,ec]})],Va){constructor(){super(...arguments);g(kt,5,this)}create(t,r){return this.setUpMatrixResult(()=>this.getCreator(t),r,(i,n)=>i.create(n))}};kt=x(Va),u(kt,1,"create",ka,ee),ee=u(kt,0,"NonNumericIdentifierCreatorProxy",qa,ee),g(kt,1,ee);var $a,Fa,ja,qt;ja=[d.describeClass(!1,{methodInfix:"GTIN",replacementParameterDescriptors:[{name:q(ge).name,replacement:ei}]})];var Re=class extends(Fa=Q,$a=[d.describeMethod({type:f.String,multiplicity:m.Matrix,ignoreInfix:!0,parameterDescriptors:[Qt,ei,j,Vt]})],Fa){constructor(t){super(t,r=>r.gtinCreator);g(qt,5,this)}createGTIN14(t,r,i,n){let o=n??void 0;return this.setUpMatrixResult(()=>this.getCreator(r),i,(s,c)=>s.createGTIN14(t,c,o))}};qt=x(Fa),u(qt,1,"createGTIN14",$a,Re),Re=u(qt,0,"GTINCreatorProxy",ja,Re),g(qt,1,Re);var za,ri,rc;za=[d.describeClass(!1,{methodInfix:"GLN"})];var ht=class extends(rc=Ge){constructor(e){super(e,t=>t.glnCreator)}};ri=x(rc),ht=u(ri,0,"GLNCreatorProxy",za,ht),g(ri,1,ht);var Ua,ii,ic;Ua=[d.describeClass(!1,{methodInfix:"SSCC"})];var ft=class extends(ic=Ge){constructor(e){super(e,t=>t.ssccCreator)}};ii=x(ic),ft=u(ii,0,"SSCCCreatorProxy",Ua,ft),g(ii,1,ft);var Ha,ni,nc;Ha=[d.describeClass(!1,{methodInfix:"GRAI"})];var gt=class extends(nc=X){constructor(e){super(e,t=>t.graiCreator)}};ni=x(nc),gt=u(ni,0,"GRAICreatorProxy",Ha,gt),g(ni,1,gt);var Ka,ai,ac;Ka=[d.describeClass(!1,{methodInfix:"GIAI"})];var Tt=class extends(ac=ee){constructor(e){super(e,t=>t.giaiCreator)}};ai=x(ac),Tt=u(ai,0,"GIAICreatorProxy",Ka,Tt),g(ai,1,Tt);var Wa,oi,oc;Wa=[d.describeClass(!1,{methodInfix:"GSRN"})];var xt=class extends(oc=Ge){constructor(e){super(e,t=>t.gsrnCreator)}};oi=x(oc),xt=u(oi,0,"GSRNCreatorProxy",Wa,xt),g(oi,1,xt);var _a,si,sc;_a=[d.describeClass(!1,{methodInfix:"GDTI"})];var It=class extends(sc=X){constructor(e){super(e,t=>t.gdtiCreator)}};si=x(sc),It=u(si,0,"GDTICreatorProxy",_a,It),g(si,1,It);var Za,ci,cc;Za=[d.describeClass(!1,{methodInfix:"GINC"})];var Ct=class extends(cc=ee){constructor(e){super(e,t=>t.gincCreator)}};ci=x(cc),Ct=u(ci,0,"GINCCreatorProxy",Za,Ct),g(ci,1,Ct);var Ja,li,lc;Ja=[d.describeClass(!1,{methodInfix:"GSIN"})];var Et=class extends(lc=Ge){constructor(e){super(e,t=>t.gsinCreator)}};li=x(lc),Et=u(li,0,"GSINCreatorProxy",Ja,Et),g(li,1,Et);var Ya,pi,pc;Ya=[d.describeClass(!1,{methodInfix:"GCN"})];var vt=class extends(pc=X){constructor(e){super(e,t=>t.gcnCreator)}};pi=x(pc),vt=u(pi,0,"GCNCreatorProxy",Ya,vt),g(pi,1,vt);var Qa,di,dc;Qa=[d.describeClass(!1,{methodInfix:"CPID"})];var St=class extends(dc=ee){constructor(e){super(e,t=>t.cpidCreator)}};di=x(dc),St=u(di,0,"CPIDCreatorProxy",Qa,St),g(di,1,St);var Xa,ui,uc;Xa=[d.describeClass(!1,{methodInfix:"GMN"})];var yt=class extends(uc=ee){constructor(e){super(e,t=>t.gmnCreator)}};ui=x(uc),yt=u(ui,0,"GMNCreatorProxy",Xa,yt),g(ui,1,yt);import{VariableMeasure as eo}from"@aidc-toolkit/gs1";var to={name:"rcnFormat",type:f.String,multiplicity:m.Singleton,isRequired:!0},mc={name:"rcn",type:f.String,multiplicity:m.Array,isRequired:!0},hc={name:"rcnItemReference",type:f.Number,multiplicity:m.Singleton,isRequired:!0},fc={name:"rcnPriceOrWeight",type:f.Number,multiplicity:m.Matrix,isRequired:!0},ro,io,no,ao,bt;ao=[d.describeClass(!1,{namespace:"GS1",category:"variableMeasure"})];var xe=class extends(no=M,io=[d.describeMethod({type:f.Number,multiplicity:m.Matrix,parameterDescriptors:[to,mc]})],ro=[d.describeMethod({type:f.String,multiplicity:m.Matrix,ignoreInfix:!0,parameterDescriptors:[to,hc,fc]})],no){constructor(){super(...arguments);g(bt,5,this)}parseVariableMeasureRCN(t,r){return this.arrayResult(r,i=>{let n=eo.parseRCN(t,i);return[n.itemReference,n.priceOrWeight]})}createVariableMeasureRCN(t,r,i){return this.matrixResult(i,n=>eo.createRCN(t,r,n))}};bt=x(no),u(bt,1,"parseVariableMeasureRCN",io,xe),u(bt,1,"createVariableMeasureRCN",ro,xe),xe=u(bt,0,"VariableMeasureProxy",ao,xe),g(bt,1,xe);import{isNullish as gc}from"@aidc-toolkit/core";import{verifiedByGS1 as Tc}from"@aidc-toolkit/gs1";var xc={extendsDescriptor:k,name:"hyperlinkIdentifier"},Ic={name:"hyperlinkText",type:f.String,multiplicity:m.Singleton,isRequired:!1},Cc={name:"hyperlinkDetails",type:f.String,multiplicity:m.Singleton,isRequired:!1},oo,so,co,$t;co=[d.describeClass(!1,{namespace:"GS1",category:"service"})];var Me=class extends(so=M,oo=[d.describeMethod({type:f.Any,multiplicity:m.Matrix,requiresContext:!0,parameterDescriptors:[Xt,xc,Ic,Cc]})],so){constructor(){super(...arguments);g($t,5,this)}async verifiedByGS1(t,r,i,n,o){if(gc(o))throw new Error("Invocation context not provided by application");return this.appExtension.mapHyperlinkResults(o,this.setUpMatrixResult(()=>rr(t),r,(s,c)=>Tc(s,c,i??void 0,n??void 0)))}};$t=x(so),u($t,1,"verifiedByGS1",oo,Me),Me=u($t,0,"ServiceProxy",co,Me),g($t,1,Me);import{getLogger as Ec,I18nEnvironments as vc}from"@aidc-toolkit/core";function Sc(...a){}Sc(ie,Ar,cr);var lo=class a{static#e="https://aidc-toolkit.com/";static#t="app-extension/";#r=Ec();#i;#a;constructor(e=!0){this.#i=e?Object.keys(Er):[],this.#a=this.#i[0]??""}get logger(){return this.#r}get locales(){return this.#i}get defaultLocale(){return this.#a}static#n(e,t,r){let i={lng:e,returnObjects:!0};return r(e,A.t(t,i))}async generate(){let e=!1;await Oi(vc.CLI),this.initialize();let t=new Map;for(let r of d.classDescriptors){let i=r.namespace,n=r.category,o=t.get(i);o===void 0&&(o=new Map,t.set(i,o));let s=o.get(n);s===void 0&&(s=[],o.set(n,s)),s.push(r)}try{for(let[r,i]of t){let n=r===void 0?"":`${r}.`,o=r===void 0?"":`${r}/`;this.createNamespace(r);for(let[s,c]of i){let l=`${n}${s}`,h=`Categories.${s}`,p=`Categories.${l}`,C=new Map(this.locales.map(T=>{let I={lng:T};return[T,A.t(A.exists(p,I)?p:h,I)]}));this.createCategory(r,s,C);for(let T of c){this.createProxyObject(T);for(let I of T.methodDescriptors){let D=new Map(this.locales.map(N=>[N,a.#n(N,`Functions.${I.namespaceFunctionName}`,(y,S)=>({...S,namespaceFunctionName:`${n}${S.name}`,documentationURL:`${a.#e}${y===this.defaultLocale?"":`${y}/`}${a.#t}${o}${S.name}.html`,parametersMap:new Map(I.parameterDescriptors.map(b=>[b.name,a.#n(y,`Parameters.${b.name}`,(v,w)=>w)]))}))]));this.createProxyFunction(T,I,D)}}}}e=!0}finally{await this.finalize(e)}}};export{ze as AlphabeticProxy,Ue as AlphanumericProxy,ki as AppExtension,ie as AppHelperProxy,B as CharacterSetCreatorProxy,J as CharacterSetValidatorProxy,cr as GS1,lo as Generator,je as HexadecimalProxy,M as LibProxy,m as Multiplicities,Fe as NumericProxy,he as RegExpProxy,le as TransformerProxy,f as Types,Bo as appExtensionNS,Er as appExtensionResourceBundle,q as expandParameterDescriptor,Oi as i18nAppExtensionInit,A as i18nextAppExtension};
3683
2
  /*!
3684
3
  * Copyright © 2024-2025 Dolphin Data Development Ltd. and AIDC Toolkit
3685
4
  * contributors
@@ -3696,4 +15,3 @@ export {
3696
15
  * See the License for the specific language governing permissions and
3697
16
  * limitations under the License.
3698
17
  */
3699
- //# sourceMappingURL=index.js.map