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