@aidc-toolkit/app-extension 1.0.27-beta → 1.0.31-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 (38) hide show
  1. package/dist/index.cjs +1115 -876
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +79 -241
  4. package/dist/index.d.ts +79 -241
  5. package/dist/index.js +1113 -869
  6. package/dist/index.js.map +1 -1
  7. package/package.json +5 -5
  8. package/src/app-extension.ts +5 -5
  9. package/src/app-utility-proxy.ts +18 -24
  10. package/src/descriptor.ts +29 -259
  11. package/src/generator/generator.ts +89 -131
  12. package/src/generator/index.ts +0 -1
  13. package/src/generator/locale-resources-generator.ts +39 -14
  14. package/src/gs1/character-set-proxy.ts +5 -5
  15. package/src/gs1/check-proxy.ts +35 -42
  16. package/src/gs1/gtin-creator-proxy.ts +58 -0
  17. package/src/gs1/gtin-descriptor.ts +29 -0
  18. package/src/gs1/gtin-validator-proxy.ts +161 -0
  19. package/src/gs1/identifier-creator-proxy.ts +227 -0
  20. package/src/gs1/identifier-validator-proxy.ts +87 -0
  21. package/src/gs1/index.ts +5 -1
  22. package/src/gs1/non-gtin-creator-proxy.ts +119 -0
  23. package/src/gs1/non-gtin-validator-proxy.ts +119 -0
  24. package/src/gs1/prefix-definition-descriptor.ts +18 -0
  25. package/src/gs1/prefix-manager-proxy.ts +42 -0
  26. package/src/index.ts +1 -0
  27. package/src/lib-proxy.ts +1 -1
  28. package/src/proxy.ts +526 -0
  29. package/src/utility/character-set-descriptor.ts +5 -5
  30. package/src/utility/character-set-proxy.ts +31 -47
  31. package/src/utility/reg-exp-proxy.ts +11 -15
  32. package/src/utility/string-descriptor.ts +2 -2
  33. package/src/utility/transformer-descriptor.ts +3 -3
  34. package/src/utility/transformer-proxy.ts +16 -26
  35. package/tsconfig-src.json +1 -4
  36. package/tsconfig.json +1 -0
  37. package/src/generator/descriptor.ts +0 -125
  38. package/src/gs1/identifier-proxy.ts +0 -826
package/dist/index.cjs CHANGED
@@ -5,9 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
8
9
  var __typeError = (msg) => {
9
10
  throw TypeError(msg);
10
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 });
11
14
  var __export = (target, all) => {
12
15
  for (var name in all)
13
16
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,17 +32,44 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
32
  mod
30
33
  ));
31
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
- var __decorateClass = (decorators, target, key, kind) => {
33
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
34
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
35
- if (decorator = decorators[i])
36
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
37
- if (kind && result) __defProp(target, key, result);
38
- return result;
39
- };
40
- var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
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
+ };
41
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));
42
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);
43
73
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
44
74
 
45
75
  // src/index.ts
@@ -56,16 +86,12 @@ __export(index_exports, {
56
86
  HexadecimalProxy: () => HexadecimalProxy,
57
87
  LibProxy: () => LibProxy,
58
88
  NumericProxy: () => NumericProxy,
59
- ProxyClass: () => ProxyClass,
60
- ProxyMethod: () => ProxyMethod,
61
- ProxyParameter: () => ProxyParameter,
62
89
  RegExpProxy: () => RegExpProxy,
63
90
  TransformerProxy: () => TransformerProxy,
64
91
  Types: () => Types,
65
92
  appExtensionNS: () => appExtensionNS,
66
93
  appExtensionResources: () => appExtensionResources,
67
94
  expandParameterDescriptor: () => expandParameterDescriptor,
68
- getClassDescriptorsMap: () => getClassDescriptorsMap,
69
95
  i18nAppExtensionInit: () => i18nAppExtensionInit,
70
96
  i18nextAppExtension: () => i18nextAppExtension
71
97
  });
@@ -1706,91 +1732,275 @@ var Types = {
1706
1732
  */
1707
1733
  Any: 3
1708
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");
1709
1741
  function expandParameterDescriptor(parameterDescriptor) {
1710
1742
  return !("extendsDescriptor" in parameterDescriptor) ? parameterDescriptor : {
1711
1743
  ...expandParameterDescriptor(parameterDescriptor.extendsDescriptor),
1712
1744
  ...parameterDescriptor
1713
1745
  };
1714
1746
  }
1715
- var pendingParameterDescriptors = [];
1716
- var classMethodsDescriptorsMap = /* @__PURE__ */ new Map();
1717
- var classDescriptorsMap = /* @__PURE__ */ new Map();
1718
- function ProxyParameter(parameterDescriptor) {
1719
- return (_target, _propertyKey, parameterIndex) => {
1720
- pendingParameterDescriptors[parameterIndex] = parameterDescriptor;
1721
- };
1722
- }
1723
- function ProxyMethod(methodDescriptor) {
1724
- return (target, propertyKey, propertyDescriptor) => {
1725
- const declarationClassName = target.constructor.name;
1726
- if (typeof propertyDescriptor.value !== "function") {
1727
- throw new Error(`${declarationClassName}.${propertyKey} is not a method`);
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`);
1728
1800
  }
1729
- const parameterCount = propertyDescriptor.value.length - (!(methodDescriptor.requiresContext ?? false) ? 0 : 1);
1730
- let anyOptional = false;
1731
- for (let index = 0; index < parameterCount; index++) {
1732
- const parameterDescriptor = expandParameterDescriptor(pendingParameterDescriptors[index]);
1733
- if (typeof parameterDescriptor === "undefined") {
1734
- throw new Error(`Missing parameter descriptor at index ${index} of ${declarationClassName}.${propertyKey}`);
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`);
1735
1844
  }
1736
- if (!parameterDescriptor.isRequired) {
1737
- anyOptional = true;
1738
- } else if (anyOptional) {
1739
- throw new Error(`Parameter descriptor ${parameterDescriptor.name} at index ${index} of ${declarationClassName}.${propertyKey} is required but prior parameter descriptor ${pendingParameterDescriptors[index - 1].name} is optional`);
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}`);
1740
1851
  }
1741
- }
1742
- let methodDescriptors = classMethodsDescriptorsMap.get(declarationClassName);
1743
- if (methodDescriptors === void 0) {
1744
- methodDescriptors = [];
1745
- classMethodsDescriptorsMap.set(declarationClassName, methodDescriptors);
1746
- }
1747
- methodDescriptors.push({
1748
- name: propertyKey,
1749
- ...methodDescriptor,
1750
- parameterDescriptors: pendingParameterDescriptors
1751
- });
1752
- pendingParameterDescriptors = [];
1753
- };
1754
- }
1755
- function ProxyClass(classDescriptor = {}) {
1756
- return (classType) => {
1757
- const methodDescriptorsMap = /* @__PURE__ */ new Map();
1758
- function buildMethodDescriptorsMap(classType2) {
1759
- const baseClassType = Object.getPrototypeOf(classType2);
1760
- if (baseClassType !== LibProxy) {
1761
- buildMethodDescriptorsMap(baseClassType);
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 = [];
1762
1874
  }
1763
- const classMethodDescriptors = classMethodsDescriptorsMap.get(classType2.name);
1764
- if (classMethodDescriptors !== void 0) {
1765
- for (const classMethodDescriptor of classMethodDescriptors) {
1766
- methodDescriptorsMap.set(classMethodDescriptor.name, classMethodDescriptor);
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);
1767
1881
  }
1768
1882
  }
1769
- }
1770
- buildMethodDescriptorsMap(classType);
1771
- let methodDescriptors;
1772
- if (classDescriptor.replaceParameterDescriptors !== void 0) {
1773
- const replacementParameterDescriptorsMap = new Map(classDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, replaceParameterDescriptor.replacement]));
1774
- methodDescriptors = Array.from(methodDescriptorsMap.values()).map((methodDescriptor) => ({
1775
- ...methodDescriptor,
1776
- parameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(expandParameterDescriptor(parameterDescriptor).name) ?? parameterDescriptor)
1777
- }));
1778
- } else {
1779
- methodDescriptors = Array.from(methodDescriptorsMap.values());
1780
- }
1781
- classDescriptorsMap.set(classType.name, {
1782
- name: classType.name,
1783
- ...classDescriptor,
1784
- methodDescriptors
1785
- });
1786
- };
1787
- }
1788
- function getClassDescriptorsMap() {
1789
- return classDescriptorsMap;
1790
- }
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();
1791
2002
 
1792
2003
  // src/app-utility-proxy.ts
1793
- var import_core2 = require("@aidc-toolkit/core");
1794
2004
  var spillMatrix = {
1795
2005
  name: "spillMatrix",
1796
2006
  type: Types.Any,
@@ -1813,10 +2023,26 @@ var spillMaximumHeightParameterDescriptor = {
1813
2023
  sortOrder: 1,
1814
2024
  name: "spillMaximumHeight"
1815
2025
  };
1816
- var _AppUtilityProxy_instances, defaultMaximums_fn;
1817
- var AppUtilityProxy = class extends LibProxy {
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) {
1818
2043
  constructor() {
1819
2044
  super(...arguments);
2045
+ __runInitializers(_init, 5, this);
1820
2046
  __privateAdd(this, _AppUtilityProxy_instances);
1821
2047
  }
1822
2048
  version() {
@@ -1837,7 +2063,7 @@ var AppUtilityProxy = class extends LibProxy {
1837
2063
  if (hLength > 1 && hLength <= maximumArea) {
1838
2064
  let spillWidth = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.width);
1839
2065
  if (Number.isInteger(Math.log10(hLength))) {
1840
- const spillWidth10 = Math.pow(10, Math.floor(Math.log10(spillWidth)));
2066
+ const spillWidth10 = 10 ** Math.floor(Math.log10(spillWidth));
1841
2067
  if (hLength / spillWidth10 <= maximumDimensions.height) {
1842
2068
  spillWidth = spillWidth10;
1843
2069
  }
@@ -1870,7 +2096,7 @@ var AppUtilityProxy = class extends LibProxy {
1870
2096
  if (vLength > 1 && vLength <= maximumArea) {
1871
2097
  let spillHeight = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.height);
1872
2098
  if (Number.isInteger(Math.log10(vLength))) {
1873
- const spillHeight10 = Math.pow(10, Math.floor(Math.log10(spillHeight)));
2099
+ const spillHeight10 = 10 ** Math.floor(Math.log10(spillHeight));
1874
2100
  if (vLength / spillHeight10 <= maximumDimensions.width) {
1875
2101
  spillHeight = spillHeight10;
1876
2102
  }
@@ -1889,16 +2115,17 @@ var AppUtilityProxy = class extends LibProxy {
1889
2115
  return result;
1890
2116
  }
1891
2117
  };
2118
+ _init = __decoratorStart(_a);
1892
2119
  _AppUtilityProxy_instances = new WeakSet();
1893
2120
  defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1894
- if ((0, import_core2.isNullish)(invocationContext)) {
2121
+ if ((0, import_core3.isNullish)(invocationContext)) {
1895
2122
  throw new Error("Invocation context not provided by application");
1896
2123
  }
1897
2124
  const maximumWidth = maximumDimensions.width;
1898
2125
  const maximumHeight = maximumDimensions.height;
1899
2126
  let definedMaximumWidth;
1900
2127
  let definedMaximumHeight;
1901
- if ((0, import_core2.isNullish)(maximumWidth) || (0, import_core2.isNullish)(maximumHeight)) {
2128
+ if ((0, import_core3.isNullish)(maximumWidth) || (0, import_core3.isNullish)(maximumHeight)) {
1902
2129
  const sheetAddress = await this.appExtension.getSheetAddress(invocationContext);
1903
2130
  definedMaximumWidth = maximumWidth ?? await this.appExtension.maximumWidth() - sheetAddress.columnIndex;
1904
2131
  definedMaximumHeight = maximumHeight ?? await this.appExtension.maximumHeight() - sheetAddress.rowIndex;
@@ -1911,35 +2138,11 @@ defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1911
2138
  height: definedMaximumHeight
1912
2139
  };
1913
2140
  };
1914
- __decorateClass([
1915
- ProxyMethod({
1916
- type: Types.String,
1917
- isMatrix: false
1918
- })
1919
- ], AppUtilityProxy.prototype, "version", 1);
1920
- __decorateClass([
1921
- ProxyMethod({
1922
- requiresContext: true,
1923
- type: Types.Any,
1924
- isMatrix: true
1925
- }),
1926
- __decorateParam(0, ProxyParameter(spillMatrix)),
1927
- __decorateParam(1, ProxyParameter(spillMaximumWidthParameterDescriptor)),
1928
- __decorateParam(2, ProxyParameter(spillMaximumHeightParameterDescriptor))
1929
- ], AppUtilityProxy.prototype, "vSpill", 1);
1930
- __decorateClass([
1931
- ProxyMethod({
1932
- requiresContext: true,
1933
- type: Types.Any,
1934
- isMatrix: true
1935
- }),
1936
- __decorateParam(0, ProxyParameter(spillMatrix)),
1937
- __decorateParam(1, ProxyParameter(spillMaximumHeightParameterDescriptor)),
1938
- __decorateParam(2, ProxyParameter(spillMaximumWidthParameterDescriptor))
1939
- ], AppUtilityProxy.prototype, "hSpill", 1);
1940
- AppUtilityProxy = __decorateClass([
1941
- ProxyClass()
1942
- ], AppUtilityProxy);
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);
1943
2146
 
1944
2147
  // src/utility/index.ts
1945
2148
  var utility_exports = {};
@@ -1992,7 +2195,28 @@ var transformedValueParameterDescriptor = {
1992
2195
  extendsDescriptor: valueParameterDescriptor,
1993
2196
  name: "transformedValue"
1994
2197
  };
1995
- var TransformerProxy = class extends LibProxy {
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
+ }
1996
2220
  forward(domain, matrixValues, tweak) {
1997
2221
  const transformer = import_utility3.Transformer.get(domain, tweak ?? void 0);
1998
2222
  return this.mapMatrix(matrixValues, (value) => this.mapBigInt(transformer.forward(value)));
@@ -2006,40 +2230,12 @@ var TransformerProxy = class extends LibProxy {
2006
2230
  return this.mapMatrix(matrixTransformedValues, (transformedValue) => this.mapBigInt(transformer.reverse(transformedValue)));
2007
2231
  }
2008
2232
  };
2009
- __decorateClass([
2010
- ProxyMethod({
2011
- type: Types.Number,
2012
- isMatrix: true
2013
- }),
2014
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2015
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2016
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2017
- ], TransformerProxy.prototype, "forward", 1);
2018
- __decorateClass([
2019
- ProxyMethod({
2020
- infixBefore: "Sequence",
2021
- type: Types.Number,
2022
- isMatrix: true
2023
- }),
2024
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2025
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2026
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2027
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
2028
- ], TransformerProxy.prototype, "forwardSequence", 1);
2029
- __decorateClass([
2030
- ProxyMethod({
2031
- type: Types.Number,
2032
- isMatrix: true
2033
- }),
2034
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
2035
- __decorateParam(1, ProxyParameter(transformedValueParameterDescriptor)),
2036
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2037
- ], TransformerProxy.prototype, "reverse", 1);
2038
- TransformerProxy = __decorateClass([
2039
- ProxyClass({
2040
- methodInfix: "Transform"
2041
- })
2042
- ], TransformerProxy);
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);
2043
2239
 
2044
2240
  // src/utility/reg-exp-proxy.ts
2045
2241
  var import_utility4 = require("@aidc-toolkit/utility");
@@ -2081,7 +2277,23 @@ var errorMessageParameterDescriptor = {
2081
2277
  isMatrix: false,
2082
2278
  isRequired: false
2083
2279
  };
2084
- var RegExpProxy = class extends StringProxy {
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
+ }
2085
2297
  validate(regExp, matrixSs, errorMessage) {
2086
2298
  return this.validateString(new class extends import_utility4.RegExpValidator {
2087
2299
  createErrorMessage(s) {
@@ -2093,28 +2305,11 @@ var RegExpProxy = class extends StringProxy {
2093
2305
  return this.isValidString(this.validate(regExp, matrixSs, void 0));
2094
2306
  }
2095
2307
  };
2096
- __decorateClass([
2097
- ProxyMethod({
2098
- type: Types.String,
2099
- isMatrix: true
2100
- }),
2101
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2102
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor)),
2103
- __decorateParam(2, ProxyParameter(errorMessageParameterDescriptor))
2104
- ], RegExpProxy.prototype, "validate", 1);
2105
- __decorateClass([
2106
- ProxyMethod({
2107
- type: Types.Boolean,
2108
- isMatrix: true
2109
- }),
2110
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2111
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor))
2112
- ], RegExpProxy.prototype, "isValid", 1);
2113
- RegExpProxy = __decorateClass([
2114
- ProxyClass({
2115
- methodInfix: "RegExp"
2116
- })
2117
- ], RegExpProxy);
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);
2118
2313
 
2119
2314
  // src/utility/character-set-proxy.ts
2120
2315
  var import_utility5 = require("@aidc-toolkit/utility");
@@ -2158,14 +2353,25 @@ var valueForSParameterDescriptor = {
2158
2353
  extendsDescriptor: sParameterDescriptor,
2159
2354
  name: "valueForS"
2160
2355
  };
2161
- var CharacterSetValidatorProxy = class extends StringProxy {
2162
- #characterSetValidator;
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) {
2163
2367
  constructor(appExtension, characterSetValidator) {
2164
2368
  super(appExtension);
2165
- this.#characterSetValidator = characterSetValidator;
2369
+ __runInitializers(_init4, 5, this);
2370
+ __privateAdd(this, _characterSetValidator);
2371
+ __privateSet(this, _characterSetValidator, characterSetValidator);
2166
2372
  }
2167
2373
  validate(matrixSs, exclusion) {
2168
- return this.validateString(this.#characterSetValidator, matrixSs, {
2374
+ return this.validateString(__privateGet(this, _characterSetValidator), matrixSs, {
2169
2375
  exclusion: exclusion ?? void 0
2170
2376
  });
2171
2377
  }
@@ -2173,134 +2379,124 @@ var CharacterSetValidatorProxy = class extends StringProxy {
2173
2379
  return this.isValidString(this.validate(matrixSs, exclusion));
2174
2380
  }
2175
2381
  };
2176
- __decorateClass([
2177
- ProxyMethod({
2178
- type: Types.String,
2179
- isMatrix: true
2180
- }),
2181
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2182
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2183
- ], CharacterSetValidatorProxy.prototype, "validate", 1);
2184
- __decorateClass([
2185
- ProxyMethod({
2186
- type: Types.Boolean,
2187
- isMatrix: true
2188
- }),
2189
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2190
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2191
- ], CharacterSetValidatorProxy.prototype, "isValid", 1);
2192
- var CharacterSetCreatorProxy = class extends CharacterSetValidatorProxy {
2193
- #characterSetCreator;
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) {
2194
2404
  constructor(appExtension, characterSetCreator) {
2195
2405
  super(appExtension, characterSetCreator);
2196
- this.#characterSetCreator = characterSetCreator;
2406
+ __runInitializers(_init5, 5, this);
2407
+ __privateAdd(this, _characterSetCreator);
2408
+ __privateSet(this, _characterSetCreator, characterSetCreator);
2197
2409
  }
2198
2410
  create(length, matrixValues, exclusion, tweak) {
2199
2411
  const exclusionOrUndefined = exclusion ?? void 0;
2200
2412
  const tweakOrUndefined = tweak ?? void 0;
2201
- return this.mapMatrix(matrixValues, (value) => this.#characterSetCreator.create(length, value, exclusionOrUndefined, tweakOrUndefined));
2413
+ return this.mapMatrix(matrixValues, (value) => __privateGet(this, _characterSetCreator).create(length, value, exclusionOrUndefined, tweakOrUndefined));
2202
2414
  }
2203
2415
  createSequence(length, startValue, count, exclusion, tweak) {
2204
2416
  this.appExtension.validateSequenceCount(count);
2205
2417
  const exclusionOrUndefined = exclusion ?? void 0;
2206
2418
  const tweakOrUndefined = tweak ?? void 0;
2207
- return LibProxy.matrixResult(this.#characterSetCreator.create(length, new import_utility5.Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2419
+ return LibProxy.matrixResult(__privateGet(this, _characterSetCreator).create(length, new import_utility5.Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2208
2420
  }
2209
2421
  valueFor(matrixSs, exclusion, tweak) {
2210
2422
  const exclusionOrUndefined = exclusion ?? void 0;
2211
2423
  const tweakOrUndefined = tweak ?? void 0;
2212
- return this.mapMatrix(matrixSs, (s) => this.mapBigInt(this.#characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2213
- }
2214
- };
2215
- __decorateClass([
2216
- ProxyMethod({
2217
- type: Types.String,
2218
- isMatrix: true
2219
- }),
2220
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2221
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2222
- __decorateParam(2, ProxyParameter(exclusionNoneParameterDescriptor)),
2223
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
2224
- ], CharacterSetCreatorProxy.prototype, "create", 1);
2225
- __decorateClass([
2226
- ProxyMethod({
2227
- infixBefore: "Sequence",
2228
- type: Types.String,
2229
- isMatrix: true
2230
- }),
2231
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2232
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2233
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2234
- __decorateParam(3, ProxyParameter(exclusionNoneParameterDescriptor)),
2235
- __decorateParam(4, ProxyParameter(tweakParameterDescriptor))
2236
- ], CharacterSetCreatorProxy.prototype, "createSequence", 1);
2237
- __decorateClass([
2238
- ProxyMethod({
2239
- type: Types.Number,
2240
- isMatrix: true
2241
- }),
2242
- __decorateParam(0, ProxyParameter(valueForSParameterDescriptor)),
2243
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor)),
2244
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2245
- ], CharacterSetCreatorProxy.prototype, "valueFor", 1);
2246
- var NumericProxy = class extends CharacterSetCreatorProxy {
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) {
2247
2445
  constructor(appExtension) {
2248
2446
  super(appExtension, import_utility5.NUMERIC_CREATOR);
2249
2447
  }
2250
2448
  };
2251
- NumericProxy = __decorateClass([
2252
- ProxyClass({
2253
- methodInfix: "Numeric",
2254
- replaceParameterDescriptors: [
2255
- {
2256
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2257
- replacement: exclusionFirstZeroParameterDescriptor
2258
- }
2259
- ]
2260
- })
2261
- ], NumericProxy);
2262
- var HexadecimalProxy = class extends CharacterSetCreatorProxy {
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) {
2263
2463
  constructor(appExtension) {
2264
2464
  super(appExtension, import_utility5.HEXADECIMAL_CREATOR);
2265
2465
  }
2266
2466
  };
2267
- HexadecimalProxy = __decorateClass([
2268
- ProxyClass({
2269
- methodInfix: "Hexadecimal",
2270
- replaceParameterDescriptors: [
2271
- {
2272
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2273
- replacement: exclusionAnyParameterDescriptor
2274
- }
2275
- ]
2276
- })
2277
- ], HexadecimalProxy);
2278
- var AlphabeticProxy = class extends CharacterSetCreatorProxy {
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) {
2279
2475
  constructor(appExtension) {
2280
2476
  super(appExtension, import_utility5.ALPHABETIC_CREATOR);
2281
2477
  }
2282
2478
  };
2283
- AlphabeticProxy = __decorateClass([
2284
- ProxyClass({
2285
- methodInfix: "Alphabetic"
2286
- })
2287
- ], AlphabeticProxy);
2288
- var AlphanumericProxy = class extends CharacterSetCreatorProxy {
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) {
2289
2493
  constructor(appExtension) {
2290
2494
  super(appExtension, import_utility5.ALPHANUMERIC_CREATOR);
2291
2495
  }
2292
2496
  };
2293
- AlphanumericProxy = __decorateClass([
2294
- ProxyClass({
2295
- methodInfix: "Alphanumeric",
2296
- replaceParameterDescriptors: [
2297
- {
2298
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2299
- replacement: exclusionAnyParameterDescriptor
2300
- }
2301
- ]
2302
- })
2303
- ], AlphanumericProxy);
2497
+ _init9 = __decoratorStart(_a9);
2498
+ AlphanumericProxy = __decorateElement(_init9, 0, "AlphanumericProxy", _AlphanumericProxy_decorators, AlphanumericProxy);
2499
+ __runInitializers(_init9, 1, AlphanumericProxy);
2304
2500
 
2305
2501
  // src/gs1/index.ts
2306
2502
  var gs1_exports = {};
@@ -2341,51 +2537,57 @@ __export(gs1_exports, {
2341
2537
 
2342
2538
  // src/gs1/character-set-proxy.ts
2343
2539
  var import_gs12 = require("@aidc-toolkit/gs1");
2344
- var AI82Proxy = class extends CharacterSetCreatorProxy {
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) {
2345
2552
  constructor(appExtension) {
2346
2553
  super(appExtension, import_gs12.AI82_CREATOR);
2347
2554
  }
2348
2555
  };
2349
- AI82Proxy = __decorateClass([
2350
- ProxyClass({
2351
- namespace: "GS1",
2352
- methodInfix: "AI82",
2353
- replaceParameterDescriptors: [
2354
- {
2355
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2356
- replacement: exclusionAllNumericParameterDescriptor
2357
- }
2358
- ]
2359
- })
2360
- ], AI82Proxy);
2361
- var AI39Proxy = class extends CharacterSetCreatorProxy {
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) {
2362
2571
  constructor(appExtension) {
2363
2572
  super(appExtension, import_gs12.AI39_CREATOR);
2364
2573
  }
2365
2574
  };
2366
- AI39Proxy = __decorateClass([
2367
- ProxyClass({
2368
- namespace: "GS1",
2369
- methodInfix: "AI39",
2370
- replaceParameterDescriptors: [
2371
- {
2372
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2373
- replacement: exclusionAllNumericParameterDescriptor
2374
- }
2375
- ]
2376
- })
2377
- ], AI39Proxy);
2378
- var AI64Proxy = class extends CharacterSetValidatorProxy {
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) {
2379
2584
  constructor(appExtension) {
2380
2585
  super(appExtension, import_gs12.AI64_VALIDATOR);
2381
2586
  }
2382
2587
  };
2383
- AI64Proxy = __decorateClass([
2384
- ProxyClass({
2385
- namespace: "GS1",
2386
- methodInfix: "AI64"
2387
- })
2388
- ], AI64Proxy);
2588
+ _init12 = __decoratorStart(_a12);
2589
+ AI64Proxy = __decorateElement(_init12, 0, "AI64Proxy", _AI64Proxy_decorators, AI64Proxy);
2590
+ __runInitializers(_init12, 1, AI64Proxy);
2389
2591
 
2390
2592
  // src/gs1/check-proxy.ts
2391
2593
  var import_gs13 = require("@aidc-toolkit/gs1");
@@ -2423,7 +2625,42 @@ var ai82SWithCheckCharacterPairParameterDescriptor = {
2423
2625
  extendsDescriptor: ai82SParameterDescriptor,
2424
2626
  name: "ai82SWithCheckCharacterPair"
2425
2627
  };
2426
- var CheckProxy = class extends LibProxy {
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
+ }
2427
2664
  checkDigit(matrixSs) {
2428
2665
  return this.mapMatrix(matrixSs, (s) => (0, import_gs13.checkDigit)(s));
2429
2666
  }
@@ -2443,62 +2680,46 @@ var CheckProxy = class extends LibProxy {
2443
2680
  return this.mapMatrix(matrixSs, (s) => (0, import_gs13.hasValidCheckCharacterPair)(s));
2444
2681
  }
2445
2682
  };
2446
- __decorateClass([
2447
- ProxyMethod({
2448
- type: Types.String,
2449
- isMatrix: true
2450
- }),
2451
- __decorateParam(0, ProxyParameter(numericSParameterDescriptor))
2452
- ], CheckProxy.prototype, "checkDigit", 1);
2453
- __decorateClass([
2454
- ProxyMethod({
2455
- type: Types.String,
2456
- isMatrix: true
2457
- }),
2458
- __decorateParam(0, ProxyParameter(numericSWithCheckDigitParameterDescriptor))
2459
- ], CheckProxy.prototype, "hasValidCheckDigit", 1);
2460
- __decorateClass([
2461
- ProxyMethod({
2462
- type: Types.String,
2463
- isMatrix: true
2464
- }),
2465
- __decorateParam(0, ProxyParameter(numericSFourOrFiveDigitsParameterDescriptor))
2466
- ], CheckProxy.prototype, "priceOrWeightCheckDigit", 1);
2467
- __decorateClass([
2468
- ProxyMethod({
2469
- type: Types.String,
2470
- isMatrix: false
2471
- }),
2472
- __decorateParam(0, ProxyParameter({
2473
- ...numericSFourOrFiveDigitsParameterDescriptor,
2474
- isMatrix: false
2475
- })),
2476
- __decorateParam(1, ProxyParameter(checkDigitParameterDescriptor))
2477
- ], CheckProxy.prototype, "isValidPriceOrWeightCheckDigit", 1);
2478
- __decorateClass([
2479
- ProxyMethod({
2480
- type: Types.String,
2481
- isMatrix: true
2482
- }),
2483
- __decorateParam(0, ProxyParameter(ai82SParameterDescriptor))
2484
- ], CheckProxy.prototype, "checkCharacterPair", 1);
2485
- __decorateClass([
2486
- ProxyMethod({
2487
- type: Types.String,
2488
- isMatrix: true
2489
- }),
2490
- __decorateParam(0, ProxyParameter(ai82SWithCheckCharacterPairParameterDescriptor))
2491
- ], CheckProxy.prototype, "hasValidCheckCharacterPair", 1);
2492
- CheckProxy = __decorateClass([
2493
- ProxyClass({
2494
- namespace: "GS1"
2495
- })
2496
- ], CheckProxy);
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);
2497
2692
 
2498
- // src/gs1/identifier-proxy.ts
2499
- var import_core3 = require("@aidc-toolkit/core");
2693
+ // src/gs1/gtin-validator-proxy.ts
2500
2694
  var import_gs14 = require("@aidc-toolkit/gs1");
2501
- var import_utility7 = require("@aidc-toolkit/utility");
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
2502
2723
  var identifierParameterDescriptor = {
2503
2724
  name: "identifier",
2504
2725
  type: Types.String,
@@ -2520,18 +2741,27 @@ var IdentifierValidatorProxy = class extends StringProxy {
2520
2741
  return this.#validator;
2521
2742
  }
2522
2743
  };
2523
- var NumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
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
+ }
2524
2757
  validate(matrixIdentifiers) {
2525
2758
  return this.validateString(this.validator, matrixIdentifiers);
2526
2759
  }
2527
2760
  };
2528
- __decorateClass([
2529
- ProxyMethod({
2530
- type: Types.String,
2531
- isMatrix: true
2532
- }),
2533
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor))
2534
- ], NumericIdentifierValidatorProxy.prototype, "validate", 1);
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);
2535
2765
  var GTINValidatorProxy = class extends NumericIdentifierValidatorProxy {
2536
2766
  };
2537
2767
  var NonGTINNumericIdentifierValidatorProxy = class extends NumericIdentifierValidatorProxy {
@@ -2540,54 +2770,70 @@ var NonSerializableNumericIdentifierValidatorProxy = class extends NonGTINNumeri
2540
2770
  };
2541
2771
  var SerializableNumericIdentifierValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
2542
2772
  };
2543
- var NonNumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
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
+ }
2544
2786
  validate(matrixIdentifiers, exclusion) {
2545
2787
  return this.validateString(this.validator, matrixIdentifiers, {
2546
2788
  exclusion: exclusion ?? void 0
2547
2789
  });
2548
2790
  }
2549
2791
  };
2550
- __decorateClass([
2551
- ProxyMethod({
2552
- type: Types.String,
2553
- isMatrix: true
2554
- }),
2555
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor)),
2556
- __decorateParam(1, ProxyParameter(exclusionAllNumericParameterDescriptor))
2557
- ], NonNumericIdentifierValidatorProxy.prototype, "validate", 1);
2558
- var GTIN13ValidatorProxy = class extends GTINValidatorProxy {
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) {
2559
2804
  constructor(appExtension) {
2560
2805
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN13]);
2561
2806
  }
2562
2807
  };
2563
- GTIN13ValidatorProxy = __decorateClass([
2564
- ProxyClass({
2565
- namespace: "GS1",
2566
- methodInfix: "GTIN13"
2567
- })
2568
- ], GTIN13ValidatorProxy);
2569
- var GTIN12ValidatorProxy = class extends GTINValidatorProxy {
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) {
2570
2817
  constructor(appExtension) {
2571
2818
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN12]);
2572
2819
  }
2573
2820
  };
2574
- GTIN12ValidatorProxy = __decorateClass([
2575
- ProxyClass({
2576
- namespace: "GS1",
2577
- methodInfix: "GTIN12"
2578
- })
2579
- ], GTIN12ValidatorProxy);
2580
- var GTIN8ValidatorProxy = class extends GTINValidatorProxy {
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) {
2581
2830
  constructor(appExtension) {
2582
2831
  super(appExtension, import_gs14.IdentifierValidators.GTIN[import_gs14.GTINLengths.GTIN8]);
2583
2832
  }
2584
2833
  };
2585
- GTIN8ValidatorProxy = __decorateClass([
2586
- ProxyClass({
2587
- namespace: "GS1",
2588
- methodInfix: "GTIN8"
2589
- })
2590
- ], GTIN8ValidatorProxy);
2834
+ _init18 = __decoratorStart(_a18);
2835
+ GTIN8ValidatorProxy = __decorateElement(_init18, 0, "GTIN8ValidatorProxy", _GTIN8ValidatorProxy_decorators, GTIN8ValidatorProxy);
2836
+ __runInitializers(_init18, 1, GTIN8ValidatorProxy);
2591
2837
  var zeroSuppressibleGTIN12ParameterDescriptor = {
2592
2838
  extendsDescriptor: identifierParameterDescriptor,
2593
2839
  name: "zeroSuppressibleGTIN12"
@@ -2596,12 +2842,6 @@ var zeroSuppressedGTIN12ParameterDescriptor = {
2596
2842
  extendsDescriptor: identifierParameterDescriptor,
2597
2843
  name: "zeroSuppressedGTIN12"
2598
2844
  };
2599
- var indicatorDigitParameterDescriptor = {
2600
- name: "indicatorDigit",
2601
- type: Types.String,
2602
- isMatrix: false,
2603
- isRequired: true
2604
- };
2605
2845
  var convertGTINParameterDescriptor = {
2606
2846
  extendsDescriptor: identifierParameterDescriptor,
2607
2847
  name: "convertGTIN"
@@ -2624,31 +2864,49 @@ var validateGTIN14ParameterDescriptor = {
2624
2864
  extendsDescriptor: identifierParameterDescriptor,
2625
2865
  name: "validateGTIN14"
2626
2866
  };
2627
- var rcnFormatParameterDescriptor = {
2628
- name: "rcnFormat",
2629
- type: Types.String,
2630
- isMatrix: false,
2631
- isRequired: true
2632
- };
2633
2867
  var rcnParameterDescriptor = {
2634
2868
  name: "rcn",
2635
2869
  type: Types.String,
2636
2870
  isMatrix: true,
2637
2871
  isRequired: true
2638
2872
  };
2639
- var rcnItemReferenceParameterDescriptor = {
2640
- name: "rcnItemReference",
2641
- type: Types.Number,
2642
- isMatrix: false,
2643
- isRequired: true
2644
- };
2645
- var rcnPriceOrWeightParameterDescriptor = {
2646
- name: "rcnPriceOrWeight",
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({
2647
2902
  type: Types.Number,
2648
2903
  isMatrix: true,
2649
- isRequired: true
2650
- };
2651
- var GTINValidatorStaticProxy = class extends LibProxy {
2904
+ parameterDescriptors: [rcnFormatParameterDescriptor, rcnParameterDescriptor]
2905
+ })], _a19) {
2906
+ constructor() {
2907
+ super(...arguments);
2908
+ __runInitializers(_init19, 5, this);
2909
+ }
2652
2910
  zeroSuppressGTIN12(matrixGTIN12s) {
2653
2911
  return this.mapMatrix(matrixGTIN12s, (gtin12) => import_gs14.GTINValidator.zeroSuppress(gtin12));
2654
2912
  }
@@ -2679,184 +2937,164 @@ var GTINValidatorStaticProxy = class extends LibProxy {
2679
2937
  });
2680
2938
  }
2681
2939
  };
2682
- __decorateClass([
2683
- ProxyMethod({
2684
- type: Types.String,
2685
- isMatrix: true
2686
- }),
2687
- __decorateParam(0, ProxyParameter(zeroSuppressibleGTIN12ParameterDescriptor))
2688
- ], GTINValidatorStaticProxy.prototype, "zeroSuppressGTIN12", 1);
2689
- __decorateClass([
2690
- ProxyMethod({
2691
- type: Types.String,
2692
- isMatrix: true
2693
- }),
2694
- __decorateParam(0, ProxyParameter(zeroSuppressedGTIN12ParameterDescriptor))
2695
- ], GTINValidatorStaticProxy.prototype, "zeroExpandGTIN12", 1);
2696
- __decorateClass([
2697
- ProxyMethod({
2698
- type: Types.String,
2699
- isMatrix: true
2700
- }),
2701
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
2702
- __decorateParam(1, ProxyParameter(convertGTINParameterDescriptor))
2703
- ], GTINValidatorStaticProxy.prototype, "convertToGTIN14", 1);
2704
- __decorateClass([
2705
- ProxyMethod({
2706
- type: Types.String,
2707
- isMatrix: true
2708
- }),
2709
- __decorateParam(0, ProxyParameter(normalizeGTINParameterDescriptor))
2710
- ], GTINValidatorStaticProxy.prototype, "normalizeGTIN", 1);
2711
- __decorateClass([
2712
- ProxyMethod({
2713
- type: Types.String,
2714
- isMatrix: true
2715
- }),
2716
- __decorateParam(0, ProxyParameter(validateGTINParameterDescriptor)),
2717
- __decorateParam(1, ProxyParameter(gtinLevelParameterDescriptor))
2718
- ], GTINValidatorStaticProxy.prototype, "validateGTIN", 1);
2719
- __decorateClass([
2720
- ProxyMethod({
2721
- type: Types.String,
2722
- isMatrix: true
2723
- }),
2724
- __decorateParam(0, ProxyParameter(validateGTIN14ParameterDescriptor))
2725
- ], GTINValidatorStaticProxy.prototype, "validateGTIN14", 1);
2726
- __decorateClass([
2727
- ProxyMethod({
2728
- type: Types.Number,
2729
- isMatrix: true
2730
- }),
2731
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
2732
- __decorateParam(1, ProxyParameter(rcnParameterDescriptor))
2733
- ], GTINValidatorStaticProxy.prototype, "parseVariableMeasureRCN", 1);
2734
- GTINValidatorStaticProxy = __decorateClass([
2735
- ProxyClass({
2736
- namespace: "GS1"
2737
- })
2738
- ], GTINValidatorStaticProxy);
2739
- var GLNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
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) {
2740
2959
  constructor(appExtension) {
2741
- super(appExtension, import_gs14.IdentifierValidators.GLN);
2742
- }
2743
- };
2744
- GLNValidatorProxy = __decorateClass([
2745
- ProxyClass({
2746
- namespace: "GS1",
2747
- methodInfix: "GLN"
2748
- })
2749
- ], GLNValidatorProxy);
2750
- var SSCCValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
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) {
2751
2972
  constructor(appExtension) {
2752
- super(appExtension, import_gs14.IdentifierValidators.SSCC);
2753
- }
2754
- };
2755
- SSCCValidatorProxy = __decorateClass([
2756
- ProxyClass({
2757
- namespace: "GS1",
2758
- methodInfix: "SSCC"
2759
- })
2760
- ], SSCCValidatorProxy);
2761
- var GRAIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
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) {
2762
2985
  constructor(appExtension) {
2763
- super(appExtension, import_gs14.IdentifierValidators.GRAI);
2764
- }
2765
- };
2766
- GRAIValidatorProxy = __decorateClass([
2767
- ProxyClass({
2768
- namespace: "GS1",
2769
- methodInfix: "GRAI"
2770
- })
2771
- ], GRAIValidatorProxy);
2772
- var GIAIValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
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) {
2773
2998
  constructor(appExtension) {
2774
- super(appExtension, import_gs14.IdentifierValidators.GIAI);
2775
- }
2776
- };
2777
- GIAIValidatorProxy = __decorateClass([
2778
- ProxyClass({
2779
- namespace: "GS1",
2780
- methodInfix: "GIAI"
2781
- })
2782
- ], GIAIValidatorProxy);
2783
- var GSRNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
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) {
2784
3011
  constructor(appExtension) {
2785
- super(appExtension, import_gs14.IdentifierValidators.GSRN);
2786
- }
2787
- };
2788
- GSRNValidatorProxy = __decorateClass([
2789
- ProxyClass({
2790
- namespace: "GS1",
2791
- methodInfix: "GSRN"
2792
- })
2793
- ], GSRNValidatorProxy);
2794
- var GDTIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
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) {
2795
3024
  constructor(appExtension) {
2796
- super(appExtension, import_gs14.IdentifierValidators.GDTI);
2797
- }
2798
- };
2799
- GDTIValidatorProxy = __decorateClass([
2800
- ProxyClass({
2801
- namespace: "GS1",
2802
- methodInfix: "GDTI"
2803
- })
2804
- ], GDTIValidatorProxy);
2805
- var GINCValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
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) {
2806
3037
  constructor(appExtension) {
2807
- super(appExtension, import_gs14.IdentifierValidators.GINC);
2808
- }
2809
- };
2810
- GINCValidatorProxy = __decorateClass([
2811
- ProxyClass({
2812
- namespace: "GS1",
2813
- methodInfix: "GINC"
2814
- })
2815
- ], GINCValidatorProxy);
2816
- var GSINValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
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) {
2817
3050
  constructor(appExtension) {
2818
- super(appExtension, import_gs14.IdentifierValidators.GSIN);
2819
- }
2820
- };
2821
- GSINValidatorProxy = __decorateClass([
2822
- ProxyClass({
2823
- namespace: "GS1",
2824
- methodInfix: "GSIN"
2825
- })
2826
- ], GSINValidatorProxy);
2827
- var GCNValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
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) {
2828
3063
  constructor(appExtension) {
2829
- super(appExtension, import_gs14.IdentifierValidators.GCN);
2830
- }
2831
- };
2832
- GCNValidatorProxy = __decorateClass([
2833
- ProxyClass({
2834
- namespace: "GS1",
2835
- methodInfix: "GCN"
2836
- })
2837
- ], GCNValidatorProxy);
2838
- var CPIDValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
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) {
2839
3076
  constructor(appExtension) {
2840
- super(appExtension, import_gs14.IdentifierValidators.CPID);
2841
- }
2842
- };
2843
- CPIDValidatorProxy = __decorateClass([
2844
- ProxyClass({
2845
- namespace: "GS1",
2846
- methodInfix: "CPID"
2847
- })
2848
- ], CPIDValidatorProxy);
2849
- var GMNValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
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) {
2850
3089
  constructor(appExtension) {
2851
- super(appExtension, import_gs14.IdentifierValidators.GMN);
3090
+ super(appExtension, import_gs15.IdentifierValidators.GMN);
2852
3091
  }
2853
3092
  };
2854
- GMNValidatorProxy = __decorateClass([
2855
- ProxyClass({
2856
- namespace: "GS1",
2857
- methodInfix: "GMN"
2858
- })
2859
- ], GMNValidatorProxy);
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
2860
3098
  var prefixParameterDescriptor = {
2861
3099
  name: "prefix",
2862
3100
  type: Types.String,
@@ -2875,6 +3113,37 @@ var tweakFactorParameterDescriptor = {
2875
3113
  isMatrix: false,
2876
3114
  isRequired: false
2877
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
2878
3147
  var prefixDefinitionParameterDescriptor = {
2879
3148
  name: "prefixDefinition",
2880
3149
  type: Types.Any,
@@ -2889,27 +3158,10 @@ var prefixDefinitionAnyParameterDescriptor = {
2889
3158
  extendsDescriptor: prefixDefinitionParameterDescriptor,
2890
3159
  name: "prefixDefinitionAny"
2891
3160
  };
2892
- var PrefixManagerProxy = class extends LibProxy {
2893
- definePrefix(prefix, prefixType, tweakFactor) {
2894
- return [[prefix, prefixType, tweakFactor]];
2895
- }
2896
- };
2897
- __decorateClass([
2898
- ProxyMethod({
2899
- type: Types.Any,
2900
- isMatrix: true
2901
- }),
2902
- __decorateParam(0, ProxyParameter(prefixParameterDescriptor)),
2903
- __decorateParam(1, ProxyParameter(prefixTypeParameterDescriptor)),
2904
- __decorateParam(2, ProxyParameter(tweakFactorParameterDescriptor))
2905
- ], PrefixManagerProxy.prototype, "definePrefix", 1);
2906
- PrefixManagerProxy = __decorateClass([
2907
- ProxyClass({
2908
- namespace: "GS1"
2909
- })
2910
- ], PrefixManagerProxy);
3161
+
3162
+ // src/gs1/identifier-creator-proxy.ts
2911
3163
  var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
2912
- static #PREFIX_TYPES = [import_gs14.PrefixTypes.GS1CompanyPrefix, import_gs14.PrefixTypes.UPCCompanyPrefix, import_gs14.PrefixTypes.GS18Prefix];
3164
+ static #PREFIX_TYPES = [import_gs16.PrefixTypes.GS1CompanyPrefix, import_gs16.PrefixTypes.UPCCompanyPrefix, import_gs16.PrefixTypes.GS18Prefix];
2913
3165
  #getCreator;
2914
3166
  constructor(appExtension, getCreator) {
2915
3167
  super(appExtension);
@@ -2945,9 +3197,9 @@ var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
2945
3197
  if (prefixType === void 0) {
2946
3198
  throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.invalidPrefixType"));
2947
3199
  }
2948
- const prefixManager = import_gs14.PrefixManager.get(prefixType, prefix);
3200
+ const prefixManager = import_gs16.PrefixManager.get(prefixType, prefix);
2949
3201
  const tweakFactor = reducedPrefixDefinition[2];
2950
- if (!(0, import_core3.isNullish)(tweakFactor)) {
3202
+ if (!(0, import_core4.isNullish)(tweakFactor)) {
2951
3203
  if (typeof tweakFactor !== "number") {
2952
3204
  throw new RangeError(i18nextAppExtension.t("IdentifierCreatorProxy.tweakFactorMustBeNumber"));
2953
3205
  }
@@ -2964,7 +3216,28 @@ var sparseParameterDescriptor = {
2964
3216
  isMatrix: false,
2965
3217
  isRequired: false
2966
3218
  };
2967
- var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
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
+ }
2968
3241
  create(prefixDefinition, matrixValues, sparse) {
2969
3242
  const creator = this.getCreator(prefixDefinition);
2970
3243
  const sparseOrUndefined = sparse ?? void 0;
@@ -2980,33 +3253,12 @@ var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
2980
3253
  return LibProxy.matrixResult(creator.createAll());
2981
3254
  }
2982
3255
  };
2983
- __decorateClass([
2984
- ProxyMethod({
2985
- type: Types.String,
2986
- isMatrix: true
2987
- }),
2988
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2989
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2990
- __decorateParam(2, ProxyParameter(sparseParameterDescriptor))
2991
- ], NumericIdentifierCreatorProxy.prototype, "create", 1);
2992
- __decorateClass([
2993
- ProxyMethod({
2994
- infixBefore: "Sequence",
2995
- type: Types.String,
2996
- isMatrix: true
2997
- }),
2998
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2999
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
3000
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
3001
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3002
- ], NumericIdentifierCreatorProxy.prototype, "createSequence", 1);
3003
- __decorateClass([
3004
- ProxyMethod({
3005
- type: Types.String,
3006
- isMatrix: true
3007
- }),
3008
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor))
3009
- ], NumericIdentifierCreatorProxy.prototype, "createAll", 1);
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);
3010
3262
  var NonGTINNumericIdentifierCreatorProxy = class extends NumericIdentifierCreatorProxy {
3011
3263
  };
3012
3264
  var NonSerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
@@ -3026,58 +3278,93 @@ var serialComponentParameterDescriptor = {
3026
3278
  isMatrix: true,
3027
3279
  isRequired: true
3028
3280
  };
3029
- var SerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
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
+ }
3030
3298
  createSerialized(prefixDefinition, value, matrixSerialComponents, sparse) {
3031
3299
  const creator = this.getCreator(prefixDefinition);
3032
3300
  const sparseOrUndefined = sparse ?? void 0;
3033
3301
  return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.createSerialized(value, serialComponent, sparseOrUndefined));
3034
3302
  }
3035
3303
  concatenate(baseIdentifier, matrixSerialComponents) {
3036
- const creator = this.getCreator([[baseIdentifier.substring(0, !baseIdentifier.startsWith("0") ? import_gs14.PrefixValidator.GS1_COMPANY_PREFIX_MINIMUM_LENGTH : import_gs14.PrefixValidator.UPC_COMPANY_PREFIX_MINIMUM_LENGTH + 1), import_gs14.PrefixTypes.GS1CompanyPrefix]]);
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]]);
3037
3305
  return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.concatenate(baseIdentifier, serialComponent));
3038
3306
  }
3039
3307
  };
3040
- __decorateClass([
3041
- ProxyMethod({
3042
- type: Types.String,
3043
- isMatrix: true
3044
- }),
3045
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3046
- __decorateParam(1, ProxyParameter(singleValueParameterDescriptor)),
3047
- __decorateParam(2, ProxyParameter(serialComponentParameterDescriptor)),
3048
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3049
- ], SerializableNumericIdentifierCreatorProxy.prototype, "createSerialized", 1);
3050
- __decorateClass([
3051
- ProxyMethod({
3052
- type: Types.String,
3053
- isMatrix: true
3054
- }),
3055
- __decorateParam(0, ProxyParameter(baseIdentifierParameterDescriptor)),
3056
- __decorateParam(1, ProxyParameter(serialComponentParameterDescriptor))
3057
- ], SerializableNumericIdentifierCreatorProxy.prototype, "concatenate", 1);
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);
3058
3313
  var referenceParameterDescriptor = {
3059
3314
  name: "reference",
3060
3315
  type: Types.String,
3061
3316
  isMatrix: true,
3062
3317
  isRequired: true
3063
3318
  };
3064
- var NonNumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
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
+ }
3065
3332
  create(prefixDefinition, matrixReferences) {
3066
3333
  const creator = this.getCreator(prefixDefinition);
3067
3334
  return this.mapMatrix(matrixReferences, (reference) => creator.create(reference));
3068
3335
  }
3069
3336
  };
3070
- __decorateClass([
3071
- ProxyMethod({
3072
- type: Types.String,
3073
- isMatrix: true
3074
- }),
3075
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3076
- __decorateParam(1, ProxyParameter(referenceParameterDescriptor))
3077
- ], NonNumericIdentifierCreatorProxy.prototype, "create", 1);
3078
- var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
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) {
3079
3365
  constructor(appExtension) {
3080
3366
  super(appExtension, (prefixManager) => prefixManager.gtinCreator);
3367
+ __runInitializers(_init35, 5, this);
3081
3368
  }
3082
3369
  createGTIN14(indicatorDigit, prefixDefinition, matrixValues, sparse) {
3083
3370
  const creator = this.getCreator(prefixDefinition);
@@ -3085,166 +3372,162 @@ var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
3085
3372
  return this.mapMatrix(matrixValues, (value) => creator.createGTIN14(indicatorDigit, value, sparseOrUndefined));
3086
3373
  }
3087
3374
  createVariableMeasureRCN(format, itemReference, matrixPricesOrWeights) {
3088
- return this.mapMatrix(matrixPricesOrWeights, (priceOrWeight) => import_gs14.GTINCreator.createVariableMeasureRCN(format, itemReference, priceOrWeight));
3089
- }
3090
- };
3091
- __decorateClass([
3092
- ProxyMethod({
3093
- type: Types.String,
3094
- isMatrix: true,
3095
- ignoreInfix: true
3096
- }),
3097
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
3098
- __decorateParam(1, ProxyParameter(prefixDefinitionAnyParameterDescriptor)),
3099
- __decorateParam(2, ProxyParameter(valueParameterDescriptor)),
3100
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3101
- ], GTINCreatorProxy.prototype, "createGTIN14", 1);
3102
- __decorateClass([
3103
- ProxyMethod({
3104
- type: Types.String,
3105
- isMatrix: true,
3106
- ignoreInfix: true
3107
- }),
3108
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
3109
- __decorateParam(1, ProxyParameter(rcnItemReferenceParameterDescriptor)),
3110
- __decorateParam(2, ProxyParameter(rcnPriceOrWeightParameterDescriptor))
3111
- ], GTINCreatorProxy.prototype, "createVariableMeasureRCN", 1);
3112
- GTINCreatorProxy = __decorateClass([
3113
- ProxyClass({
3114
- namespace: "GS1",
3115
- methodInfix: "GTIN",
3116
- replaceParameterDescriptors: [
3117
- {
3118
- name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3119
- replacement: prefixDefinitionAnyParameterDescriptor
3120
- }
3121
- ]
3122
- })
3123
- ], GTINCreatorProxy);
3124
- var GLNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
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) {
3125
3391
  constructor(appExtension) {
3126
3392
  super(appExtension, (prefixManager) => prefixManager.glnCreator);
3127
3393
  }
3128
3394
  };
3129
- GLNCreatorProxy = __decorateClass([
3130
- ProxyClass({
3131
- namespace: "GS1",
3132
- methodInfix: "GLN"
3133
- })
3134
- ], GLNCreatorProxy);
3135
- var SSCCCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
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) {
3136
3404
  constructor(appExtension) {
3137
3405
  super(appExtension, (prefixManager) => prefixManager.ssccCreator);
3138
3406
  }
3139
3407
  };
3140
- SSCCCreatorProxy = __decorateClass([
3141
- ProxyClass({
3142
- namespace: "GS1",
3143
- methodInfix: "SSCC"
3144
- })
3145
- ], SSCCCreatorProxy);
3146
- var GRAICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
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) {
3147
3417
  constructor(appExtension) {
3148
3418
  super(appExtension, (prefixManager) => prefixManager.graiCreator);
3149
3419
  }
3150
3420
  };
3151
- GRAICreatorProxy = __decorateClass([
3152
- ProxyClass({
3153
- namespace: "GS1",
3154
- methodInfix: "GRAI"
3155
- })
3156
- ], GRAICreatorProxy);
3157
- var GIAICreatorProxy = class extends NonNumericIdentifierCreatorProxy {
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) {
3158
3430
  constructor(appExtension) {
3159
3431
  super(appExtension, (prefixManager) => prefixManager.giaiCreator);
3160
3432
  }
3161
3433
  };
3162
- GIAICreatorProxy = __decorateClass([
3163
- ProxyClass({
3164
- namespace: "GS1",
3165
- methodInfix: "GIAI"
3166
- })
3167
- ], GIAICreatorProxy);
3168
- var GSRNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
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) {
3169
3443
  constructor(appExtension) {
3170
3444
  super(appExtension, (prefixManager) => prefixManager.gsrnCreator);
3171
3445
  }
3172
3446
  };
3173
- GSRNCreatorProxy = __decorateClass([
3174
- ProxyClass({
3175
- namespace: "GS1",
3176
- methodInfix: "GSRN"
3177
- })
3178
- ], GSRNCreatorProxy);
3179
- var GDTICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
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) {
3180
3456
  constructor(appExtension) {
3181
3457
  super(appExtension, (prefixManager) => prefixManager.gdtiCreator);
3182
3458
  }
3183
3459
  };
3184
- GDTICreatorProxy = __decorateClass([
3185
- ProxyClass({
3186
- namespace: "GS1",
3187
- methodInfix: "GDTI"
3188
- })
3189
- ], GDTICreatorProxy);
3190
- var GINCCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
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) {
3191
3469
  constructor(appExtension) {
3192
3470
  super(appExtension, (prefixManager) => prefixManager.gincCreator);
3193
3471
  }
3194
3472
  };
3195
- GINCCreatorProxy = __decorateClass([
3196
- ProxyClass({
3197
- namespace: "GS1",
3198
- methodInfix: "GINC"
3199
- })
3200
- ], GINCCreatorProxy);
3201
- var GSINCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
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) {
3202
3482
  constructor(appExtension) {
3203
3483
  super(appExtension, (prefixManager) => prefixManager.gsinCreator);
3204
3484
  }
3205
3485
  };
3206
- GSINCreatorProxy = __decorateClass([
3207
- ProxyClass({
3208
- namespace: "GS1",
3209
- methodInfix: "GSIN"
3210
- })
3211
- ], GSINCreatorProxy);
3212
- var GCNCreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
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) {
3213
3495
  constructor(appExtension) {
3214
3496
  super(appExtension, (prefixManager) => prefixManager.gcnCreator);
3215
3497
  }
3216
3498
  };
3217
- GCNCreatorProxy = __decorateClass([
3218
- ProxyClass({
3219
- namespace: "GS1",
3220
- methodInfix: "GCN"
3221
- })
3222
- ], GCNCreatorProxy);
3223
- var CPIDCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
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) {
3224
3508
  constructor(appExtension) {
3225
3509
  super(appExtension, (prefixManager) => prefixManager.cpidCreator);
3226
3510
  }
3227
3511
  };
3228
- CPIDCreatorProxy = __decorateClass([
3229
- ProxyClass({
3230
- namespace: "GS1",
3231
- methodInfix: "CPID"
3232
- })
3233
- ], CPIDCreatorProxy);
3234
- var GMNCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
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) {
3235
3521
  constructor(appExtension) {
3236
3522
  super(appExtension, (prefixManager) => prefixManager.gmnCreator);
3237
3523
  }
3238
3524
  };
3239
- GMNCreatorProxy = __decorateClass([
3240
- ProxyClass({
3241
- namespace: "GS1",
3242
- methodInfix: "GMN"
3243
- })
3244
- ], GMNCreatorProxy);
3525
+ _init46 = __decoratorStart(_a46);
3526
+ GMNCreatorProxy = __decorateElement(_init46, 0, "GMNCreatorProxy", _GMNCreatorProxy_decorators, GMNCreatorProxy);
3527
+ __runInitializers(_init46, 1, GMNCreatorProxy);
3245
3528
 
3246
3529
  // src/generator/generator.ts
3247
- var import_core4 = require("@aidc-toolkit/core");
3530
+ var import_core5 = require("@aidc-toolkit/core");
3248
3531
  function registerProxies(..._proxies) {
3249
3532
  }
3250
3533
  registerProxies(AppUtilityProxy, utility_exports, gs1_exports);
@@ -3269,13 +3552,6 @@ var Generator = class _Generator {
3269
3552
  * Map of function localizations maps by namespace function name.
3270
3553
  */
3271
3554
  #functionLocalizationsMapsMap = /* @__PURE__ */ new Map();
3272
- /**
3273
- * Map of parameter localizations maps by namespace function parameter name.
3274
- */
3275
- #parameterLocalizationsMapsMap = /* @__PURE__ */ new Map();
3276
- /**
3277
- *
3278
- */
3279
3555
  /**
3280
3556
  * Constructor.
3281
3557
  *
@@ -3301,16 +3577,16 @@ var Generator = class _Generator {
3301
3577
  /**
3302
3578
  * Get function localization.
3303
3579
  *
3304
- * @param namespaceFunctionName
3305
- * Namespace function name.
3306
- *
3307
3580
  * @param locale
3308
3581
  * Locale.
3309
3582
  *
3583
+ * @param namespaceFunctionName
3584
+ * Namespace function name.
3585
+ *
3310
3586
  * @returns
3311
3587
  * Function localization.
3312
3588
  */
3313
- getFunctionLocalization(namespaceFunctionName, locale) {
3589
+ getFunctionLocalization(locale, namespaceFunctionName) {
3314
3590
  const functionLocalization = this.#functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
3315
3591
  if (functionLocalization === void 0) {
3316
3592
  throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
@@ -3320,119 +3596,86 @@ var Generator = class _Generator {
3320
3596
  /**
3321
3597
  * Get parameter localization.
3322
3598
  *
3599
+ * @param locale
3600
+ * Locale.
3601
+ *
3323
3602
  * @param namespaceFunctionName
3324
3603
  * Namespace function name.
3325
3604
  *
3326
3605
  * @param parameterName
3327
3606
  * Parameter name.
3328
3607
  *
3329
- * @param locale
3330
- * Locale.
3331
- *
3332
3608
  * @returns
3333
- * Function localization.
3609
+ * Parameter localization.
3334
3610
  */
3335
- getParameterLocalization(namespaceFunctionName, parameterName, locale) {
3336
- const parameterLocalization = this.#parameterLocalizationsMapsMap.get(`${namespaceFunctionName}.${parameterName}`)?.get(locale);
3611
+ getParameterLocalization(locale, namespaceFunctionName, parameterName) {
3612
+ const parameterLocalization = this.getFunctionLocalization(locale, namespaceFunctionName).parametersMap.get(parameterName);
3337
3613
  if (parameterLocalization === void 0) {
3338
3614
  throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
3339
3615
  }
3340
3616
  return parameterLocalization;
3341
3617
  }
3342
3618
  /**
3343
- * Generate localizations map.
3619
+ * Generate a localization.
3344
3620
  *
3345
3621
  * @template TLocalization
3346
3622
  * Localization type.
3347
3623
  *
3624
+ * @param locale
3625
+ * Locale.
3626
+ *
3348
3627
  * @param localizedKeyPrefix
3349
3628
  * Localized key prefix.
3350
3629
  *
3630
+ * @param namespacePrefix
3631
+ * Namespace prefix to be appended to name.
3632
+ *
3351
3633
  * @param localizationCallback
3352
3634
  * Callback to finalize localization.
3353
3635
  *
3354
3636
  * @returns
3355
- * Localization map.
3637
+ * Localization.
3356
3638
  */
3357
- #generateLocalizationsMap(localizedKeyPrefix, localizationCallback) {
3358
- return new Map(this.#locales.map((locale) => {
3359
- const lngOption = {
3360
- lng: locale
3361
- };
3362
- return [locale, localizationCallback(locale, {
3363
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3364
- name: i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption),
3365
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3366
- description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3367
- })];
3368
- }));
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
+ });
3369
3649
  }
3370
3650
  /**
3371
3651
  * Generate by processing individual imports.
3372
3652
  */
3373
3653
  async generate() {
3374
3654
  let success = false;
3375
- await i18nAppExtensionInit(import_core4.I18nEnvironments.CLI);
3655
+ await i18nAppExtensionInit(import_core5.I18nEnvironments.CLI);
3376
3656
  this.initialize();
3377
3657
  try {
3378
- for (const classDescriptor of getClassDescriptorsMap().values()) {
3658
+ for (const [_namespaceClassName, classDescriptor] of proxy.classDescriptorsMap.entries()) {
3379
3659
  const namespace = classDescriptor.namespace;
3380
3660
  const namespacePrefix = namespace === void 0 ? "" : `${namespace}.`;
3381
- const className = classDescriptor.name;
3382
- const methodInfix = classDescriptor.methodInfix;
3383
- const namespaceClassName = `${namespacePrefix}${className}`;
3384
- const classNameMatch = /^([A-Z]+[0-9]*|[A-Z][^A-Z.]*)([A-Z][^.]*|)\.?([A-Z].*|)$/.exec(namespaceClassName);
3385
- if (classNameMatch === null) {
3386
- throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
3387
- }
3388
- const proxyObjectDescriptor = {
3389
- namespace,
3390
- className,
3391
- namespaceClassName,
3392
- classDescriptor,
3393
- objectName: `${classNameMatch[1].toLowerCase()}${classNameMatch[2]}${classNameMatch[3]}`
3394
- };
3395
- this.createProxyObject(proxyObjectDescriptor);
3661
+ const namespacePath = namespace === void 0 ? "" : `${namespace}/`;
3662
+ this.createProxyObject(classDescriptor);
3396
3663
  for (const methodDescriptor of classDescriptor.methodDescriptors) {
3397
- const methodName = methodDescriptor.name;
3398
- const infixBefore = methodDescriptor.infixBefore;
3399
- let functionName;
3400
- if (methodInfix === void 0 || methodDescriptor.ignoreInfix === true) {
3401
- functionName = methodName;
3402
- } else if (infixBefore === void 0) {
3403
- functionName = `${methodName}${methodInfix}`;
3404
- } else {
3405
- const insertIndex = methodName.indexOf(infixBefore);
3406
- if (insertIndex === -1) {
3407
- throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
3408
- }
3409
- functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
3410
- }
3411
- const namespaceFunctionName = `${namespacePrefix}${functionName}`;
3412
- const functionLocalizationsMap = this.#generateLocalizationsMap(`Functions.${namespaceFunctionName}.`, (locale, localization) => ({
3413
- ...localization,
3414
- documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale === this.defaultLocale ? "" : `${locale}/`}${_Generator.#DOCUMENTATION_PATH}${namespace === void 0 ? "" : `${namespace}/`}${localization.name}.html`
3415
- }));
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
+ ));
3416
3677
  this.#functionLocalizationsMapsMap.set(namespaceFunctionName, functionLocalizationsMap);
3417
- this.createProxyFunction({
3418
- ...proxyObjectDescriptor,
3419
- functionName,
3420
- namespaceFunctionName,
3421
- localizationsMap: functionLocalizationsMap,
3422
- proxyParameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => {
3423
- const expandedParameterDescriptor = expandParameterDescriptor(parameterDescriptor);
3424
- const parameterName = expandedParameterDescriptor.name;
3425
- const parameterLocalizationsMap = this.#generateLocalizationsMap(`Parameters.${parameterName}.`, (_locale, localization) => localization);
3426
- this.#parameterLocalizationsMapsMap.set(`${namespaceFunctionName}.${parameterName}`, parameterLocalizationsMap);
3427
- return {
3428
- namespace,
3429
- parameterName,
3430
- localizationsMap: parameterLocalizationsMap,
3431
- parameterDescriptor: expandedParameterDescriptor
3432
- };
3433
- }),
3434
- methodDescriptor
3435
- });
3678
+ this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);
3436
3679
  }
3437
3680
  }
3438
3681
  success = true;
@@ -3454,16 +3697,12 @@ var Generator = class _Generator {
3454
3697
  HexadecimalProxy,
3455
3698
  LibProxy,
3456
3699
  NumericProxy,
3457
- ProxyClass,
3458
- ProxyMethod,
3459
- ProxyParameter,
3460
3700
  RegExpProxy,
3461
3701
  TransformerProxy,
3462
3702
  Types,
3463
3703
  appExtensionNS,
3464
3704
  appExtensionResources,
3465
3705
  expandParameterDescriptor,
3466
- getClassDescriptorsMap,
3467
3706
  i18nAppExtensionInit,
3468
3707
  i18nextAppExtension
3469
3708
  });