@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.js CHANGED
@@ -1,23 +1,54 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
3
5
  var __typeError = (msg) => {
4
6
  throw TypeError(msg);
5
7
  };
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
10
  var __export = (target, all) => {
7
11
  for (var name in all)
8
12
  __defProp(target, name, { get: all[name], enumerable: true });
9
13
  };
10
- var __decorateClass = (decorators, target, key, kind) => {
11
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
13
- if (decorator = decorators[i])
14
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15
- if (kind && result) __defProp(target, key, result);
16
- return result;
14
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
15
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
16
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
17
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
18
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
19
+ var __runInitializers = (array, flags, self, value) => {
20
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
21
+ return value;
22
+ };
23
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
24
+ var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
25
+ var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
26
+ var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
27
+ var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
28
+ return __privateGet(this, extra);
29
+ }, set [name](x) {
30
+ return __privateSet(this, extra, x);
31
+ } }, name));
32
+ k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
33
+ for (var i = decorators.length - 1; i >= 0; i--) {
34
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
35
+ if (k) {
36
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
37
+ if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
38
+ if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
39
+ }
40
+ it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
41
+ if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
42
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
43
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
44
+ }
45
+ return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
17
46
  };
18
- var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
19
47
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
48
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
49
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
20
50
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
51
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
21
52
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
22
53
 
23
54
  // src/locale/i18n.ts
@@ -1655,91 +1686,279 @@ var Types = {
1655
1686
  */
1656
1687
  Any: 3
1657
1688
  };
1689
+
1690
+ // src/app-utility-proxy.ts
1691
+ import { isNullish } from "@aidc-toolkit/core";
1692
+
1693
+ // src/proxy.ts
1694
+ import {
1695
+ getLogger,
1696
+ LogLevels,
1697
+ omit
1698
+ } from "@aidc-toolkit/core";
1658
1699
  function expandParameterDescriptor(parameterDescriptor) {
1659
1700
  return !("extendsDescriptor" in parameterDescriptor) ? parameterDescriptor : {
1660
1701
  ...expandParameterDescriptor(parameterDescriptor.extendsDescriptor),
1661
1702
  ...parameterDescriptor
1662
1703
  };
1663
1704
  }
1664
- var pendingParameterDescriptors = [];
1665
- var classMethodsDescriptorsMap = /* @__PURE__ */ new Map();
1666
- var classDescriptorsMap = /* @__PURE__ */ new Map();
1667
- function ProxyParameter(parameterDescriptor) {
1668
- return (_target, _propertyKey, parameterIndex) => {
1669
- pendingParameterDescriptors[parameterIndex] = parameterDescriptor;
1670
- };
1671
- }
1672
- function ProxyMethod(methodDescriptor) {
1673
- return (target, propertyKey, propertyDescriptor) => {
1674
- const declarationClassName = target.constructor.name;
1675
- if (typeof propertyDescriptor.value !== "function") {
1676
- throw new Error(`${declarationClassName}.${propertyKey} is not a method`);
1705
+ var Proxy2 = class _Proxy {
1706
+ /**
1707
+ * Logger.
1708
+ */
1709
+ // TODO Add configuration parameter to output JSON.
1710
+ // TODO Change this to LogLevels.Trace when configuration available.
1711
+ #logger = getLogger(LogLevels.Info);
1712
+ /**
1713
+ * Abstract class descriptors map, keyed on declaration class name. Abstract classes are not used directly by target
1714
+ * applications.
1715
+ */
1716
+ #abstractClassDescriptorsMap = /* @__PURE__ */ new Map();
1717
+ /**
1718
+ * Concrete class descriptors map, keyed on declaration class name.
1719
+ */
1720
+ #concreteClassDescriptorsMap = /* @__PURE__ */ new Map();
1721
+ /**
1722
+ * Interim object.
1723
+ */
1724
+ #interim = void 0;
1725
+ /**
1726
+ * Get the proper JSON representation of a value.
1727
+ *
1728
+ * @param value
1729
+ * Value.
1730
+ *
1731
+ * @returns
1732
+ * Replacement value.
1733
+ */
1734
+ static #jsonValue(value) {
1735
+ let replacementValue;
1736
+ switch (typeof value) {
1737
+ case "string":
1738
+ case "number":
1739
+ case "boolean":
1740
+ case "undefined":
1741
+ replacementValue = value;
1742
+ break;
1743
+ case "bigint":
1744
+ replacementValue = value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER ? Number(value) : value.toString(10);
1745
+ break;
1746
+ case "object":
1747
+ if (value === null) {
1748
+ replacementValue = value;
1749
+ } else if (Array.isArray(value)) {
1750
+ replacementValue = value.map((entry) => _Proxy.#jsonValue(entry));
1751
+ } else {
1752
+ replacementValue = Object.fromEntries(Object.entries(value).map(([k, v]) => [k, _Proxy.#jsonValue(v)]));
1753
+ }
1754
+ break;
1755
+ case "symbol":
1756
+ case "function":
1757
+ throw new Error(`Unsupported ${typeof value} value type`);
1677
1758
  }
1678
- const parameterCount = propertyDescriptor.value.length - (!(methodDescriptor.requiresContext ?? false) ? 0 : 1);
1679
- let anyOptional = false;
1680
- for (let index = 0; index < parameterCount; index++) {
1681
- const parameterDescriptor = expandParameterDescriptor(pendingParameterDescriptors[index]);
1682
- if (typeof parameterDescriptor === "undefined") {
1683
- throw new Error(`Missing parameter descriptor at index ${index} of ${declarationClassName}.${propertyKey}`);
1759
+ return replacementValue;
1760
+ }
1761
+ /**
1762
+ * Describe a proxy class.
1763
+ *
1764
+ * @template T
1765
+ * Proxy class type.
1766
+ *
1767
+ * @template IsAbstract
1768
+ * True if the proxy class is abstract.
1769
+ *
1770
+ * @template TConstructor
1771
+ * Proxy class constructor type.
1772
+ *
1773
+ * @template TProxyClassConstructor
1774
+ * Narrowed proxy class constructor type.
1775
+ *
1776
+ * @param isAbstract
1777
+ * True if class is abstract.
1778
+ *
1779
+ * @param decoratorClassDescriptor
1780
+ * Class descriptor.
1781
+ *
1782
+ * @returns
1783
+ * Function with which to decorate the class.
1784
+ */
1785
+ describeClass(isAbstract, decoratorClassDescriptor = {}) {
1786
+ const interimClassDescriptor = decoratorClassDescriptor.replaceParameterDescriptors === void 0 ? omit(decoratorClassDescriptor, "replaceParameterDescriptors") : {
1787
+ ...decoratorClassDescriptor,
1788
+ replaceParameterDescriptors: decoratorClassDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => ({
1789
+ ...replaceParameterDescriptor,
1790
+ replacement: expandParameterDescriptor(replaceParameterDescriptor.replacement)
1791
+ }))
1792
+ };
1793
+ const interim = {
1794
+ classDescriptor: interimClassDescriptor,
1795
+ methodDescriptors: []
1796
+ };
1797
+ this.#interim = interim;
1798
+ return (Target, context) => {
1799
+ const name = context.name;
1800
+ if (typeof name !== "string") {
1801
+ throw new Error(`${String(name)} has an invalid name`);
1684
1802
  }
1685
- if (!parameterDescriptor.isRequired) {
1686
- anyOptional = true;
1687
- } else if (anyOptional) {
1688
- 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`);
1803
+ const namespacePrefix = decoratorClassDescriptor.namespace === void 0 ? "" : `${decoratorClassDescriptor.namespace}.`;
1804
+ const namespaceClassName = `${namespacePrefix}${name}`;
1805
+ const abstractClassDescriptorsMap = this.#abstractClassDescriptorsMap;
1806
+ const concreteClassDescriptorsMap = this.#concreteClassDescriptorsMap;
1807
+ if (abstractClassDescriptorsMap.has(namespaceClassName) || concreteClassDescriptorsMap.has(namespaceClassName)) {
1808
+ throw new Error(`Duplicate class ${namespaceClassName}`);
1689
1809
  }
1690
- }
1691
- let methodDescriptors = classMethodsDescriptorsMap.get(declarationClassName);
1692
- if (methodDescriptors === void 0) {
1693
- methodDescriptors = [];
1694
- classMethodsDescriptorsMap.set(declarationClassName, methodDescriptors);
1695
- }
1696
- methodDescriptors.push({
1697
- name: propertyKey,
1698
- ...methodDescriptor,
1699
- parameterDescriptors: pendingParameterDescriptors
1700
- });
1701
- pendingParameterDescriptors = [];
1702
- };
1703
- }
1704
- function ProxyClass(classDescriptor = {}) {
1705
- return (classType) => {
1706
- const methodDescriptorsMap = /* @__PURE__ */ new Map();
1707
- function buildMethodDescriptorsMap(classType2) {
1708
- const baseClassType = Object.getPrototypeOf(classType2);
1709
- if (baseClassType !== LibProxy) {
1710
- buildMethodDescriptorsMap(baseClassType);
1810
+ let baseClassType = Target;
1811
+ let baseClassDescriptor;
1812
+ do {
1813
+ baseClassType = Object.getPrototypeOf(baseClassType);
1814
+ const namespaceBaseClassName = `${namespacePrefix}${baseClassType.name}`;
1815
+ baseClassDescriptor = abstractClassDescriptorsMap.get(namespaceBaseClassName) ?? abstractClassDescriptorsMap.get(baseClassType.name) ?? concreteClassDescriptorsMap.get(namespaceBaseClassName) ?? concreteClassDescriptorsMap.get(baseClassType.name);
1816
+ } while (baseClassType !== LibProxy && baseClassDescriptor === void 0);
1817
+ let interimMethodDescriptors;
1818
+ if (baseClassDescriptor !== void 0) {
1819
+ const baseClassMethodDescriptors = baseClassDescriptor.methodDescriptors;
1820
+ const replaceParameterDescriptors = decoratorClassDescriptor.replaceParameterDescriptors;
1821
+ if (replaceParameterDescriptors !== void 0) {
1822
+ const replacementParameterDescriptorsMap = new Map(replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, expandParameterDescriptor(replaceParameterDescriptor.replacement)]));
1823
+ interimMethodDescriptors = baseClassMethodDescriptors.map((baseClassMethodDescriptor) => ({
1824
+ ...baseClassMethodDescriptor,
1825
+ parameterDescriptors: baseClassMethodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(parameterDescriptor.name) ?? parameterDescriptor)
1826
+ }));
1827
+ } else {
1828
+ interimMethodDescriptors = baseClassMethodDescriptors.slice();
1829
+ }
1830
+ } else {
1831
+ interimMethodDescriptors = [];
1711
1832
  }
1712
- const classMethodDescriptors = classMethodsDescriptorsMap.get(classType2.name);
1713
- if (classMethodDescriptors !== void 0) {
1714
- for (const classMethodDescriptor of classMethodDescriptors) {
1715
- methodDescriptorsMap.set(classMethodDescriptor.name, classMethodDescriptor);
1833
+ for (const classInterimMethodDescriptor of interim.methodDescriptors) {
1834
+ const existingIndex = interimMethodDescriptors.findIndex((interimMethodDescriptor) => interimMethodDescriptor.name === classInterimMethodDescriptor.name);
1835
+ if (existingIndex !== -1) {
1836
+ interimMethodDescriptors[existingIndex] = classInterimMethodDescriptor;
1837
+ } else {
1838
+ interimMethodDescriptors.push(classInterimMethodDescriptor);
1716
1839
  }
1717
1840
  }
1718
- }
1719
- buildMethodDescriptorsMap(classType);
1720
- let methodDescriptors;
1721
- if (classDescriptor.replaceParameterDescriptors !== void 0) {
1722
- const replacementParameterDescriptorsMap = new Map(classDescriptor.replaceParameterDescriptors.map((replaceParameterDescriptor) => [replaceParameterDescriptor.name, replaceParameterDescriptor.replacement]));
1723
- methodDescriptors = Array.from(methodDescriptorsMap.values()).map((methodDescriptor) => ({
1724
- ...methodDescriptor,
1725
- parameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => replacementParameterDescriptorsMap.get(expandParameterDescriptor(parameterDescriptor).name) ?? parameterDescriptor)
1726
- }));
1727
- } else {
1728
- methodDescriptors = Array.from(methodDescriptorsMap.values());
1729
- }
1730
- classDescriptorsMap.set(classType.name, {
1731
- name: classType.name,
1732
- ...classDescriptor,
1733
- methodDescriptors
1734
- });
1735
- };
1736
- }
1737
- function getClassDescriptorsMap() {
1738
- return classDescriptorsMap;
1739
- }
1841
+ const methodDescriptors = [];
1842
+ const methodInfix = decoratorClassDescriptor.methodInfix;
1843
+ for (const interimMethodDescriptor of interimMethodDescriptors) {
1844
+ const methodName = interimMethodDescriptor.name;
1845
+ const infixBefore = interimMethodDescriptor.infixBefore;
1846
+ let functionName;
1847
+ if (methodInfix === void 0 || interimMethodDescriptor.ignoreInfix === true) {
1848
+ functionName = methodName;
1849
+ } else if (infixBefore === void 0) {
1850
+ functionName = `${methodName}${methodInfix}`;
1851
+ } else {
1852
+ const insertIndex = methodName.indexOf(infixBefore);
1853
+ if (insertIndex === -1) {
1854
+ throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
1855
+ }
1856
+ functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
1857
+ }
1858
+ const namespaceFunctionName = `${namespacePrefix}${functionName}`;
1859
+ const methodDescriptor = {
1860
+ ...interimMethodDescriptor,
1861
+ functionName,
1862
+ namespaceFunctionName
1863
+ };
1864
+ methodDescriptors.push(methodDescriptor);
1865
+ }
1866
+ const objectNameGroups = /^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\.?(?<className>[A-Z].*|)$/.exec(namespaceClassName)?.groups;
1867
+ if (objectNameGroups === void 0) {
1868
+ throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
1869
+ }
1870
+ const classDescriptor = {
1871
+ name,
1872
+ ...interimClassDescriptor,
1873
+ namespaceClassName,
1874
+ objectName: `${objectNameGroups["namespaceFirstWord"].toLowerCase()}${objectNameGroups["namespaceRemaining"]}${objectNameGroups["className"]}`,
1875
+ methodDescriptors
1876
+ };
1877
+ (isAbstract ? abstractClassDescriptorsMap : concreteClassDescriptorsMap).set(namespaceClassName, classDescriptor);
1878
+ const methodDescriptorsMap = /* @__PURE__ */ new Map();
1879
+ for (const methodDescriptor of methodDescriptors) {
1880
+ methodDescriptorsMap.set(methodDescriptor.name, methodDescriptor);
1881
+ }
1882
+ this.#interim = void 0;
1883
+ const logger = this.#logger;
1884
+ return class extends Target {
1885
+ /**
1886
+ * @inheritDoc
1887
+ */
1888
+ log(logLevel, methodName, args, result) {
1889
+ const methodDescriptor = methodDescriptorsMap.get(methodName);
1890
+ logger.log(logLevel, "", JSON.stringify({
1891
+ namespace: decoratorClassDescriptor.namespace,
1892
+ className: name,
1893
+ methodName,
1894
+ functionName: methodDescriptor.functionName,
1895
+ parameters: methodDescriptor.parameterDescriptors.map((parameterDescriptor, index) => ({
1896
+ name: parameterDescriptor.name,
1897
+ value: args[index]
1898
+ })),
1899
+ result: _Proxy.#jsonValue(result)
1900
+ }, null, 2));
1901
+ }
1902
+ };
1903
+ };
1904
+ }
1905
+ /**
1906
+ * Describe a proxy method.
1907
+ *
1908
+ * @template TFunction
1909
+ * Function type.
1910
+ *
1911
+ * @param decoratorMethodDescriptor
1912
+ * Method descriptor.
1913
+ *
1914
+ * @returns
1915
+ * Function with which to decorate the method.
1916
+ */
1917
+ describeMethod(decoratorMethodDescriptor) {
1918
+ return (target, context) => {
1919
+ const name = context.name;
1920
+ if (this.#interim === void 0 || typeof name !== "string" || context.static || context.private) {
1921
+ throw new Error(`${String(name)} is not defined within a supported class, has an invalid name, is static, or is private`);
1922
+ }
1923
+ let anyOptional = false;
1924
+ const parameterDescriptors = decoratorMethodDescriptor.parameterDescriptors.map((decoratorParameterDescriptor) => {
1925
+ const parameterDescriptor = expandParameterDescriptor(decoratorParameterDescriptor);
1926
+ if (!parameterDescriptor.isRequired) {
1927
+ anyOptional = true;
1928
+ } else if (anyOptional) {
1929
+ throw new Error(`Parameter ${parameterDescriptor.name} descriptor of method ${name} is required but prior parameter descriptor is optional`);
1930
+ }
1931
+ return parameterDescriptor;
1932
+ });
1933
+ this.#interim.methodDescriptors.push({
1934
+ name,
1935
+ ...decoratorMethodDescriptor,
1936
+ parameterDescriptors
1937
+ });
1938
+ return function methodProxy(...args) {
1939
+ const targetLogger = this;
1940
+ let result;
1941
+ try {
1942
+ result = target.call(this, ...args);
1943
+ targetLogger.log(LogLevels.Info, name, args, result);
1944
+ } catch (e) {
1945
+ targetLogger.log(LogLevels.Error, name, args, e instanceof Error ? `${e.name}: ${e.message}` : `Unknown exception: ${String(e)}`);
1946
+ throw e;
1947
+ }
1948
+ return result;
1949
+ };
1950
+ };
1951
+ }
1952
+ /**
1953
+ * Get the class descriptors map.
1954
+ */
1955
+ get classDescriptorsMap() {
1956
+ return this.#concreteClassDescriptorsMap;
1957
+ }
1958
+ };
1959
+ var proxy = new Proxy2();
1740
1960
 
1741
1961
  // src/app-utility-proxy.ts
1742
- import { isNullish } from "@aidc-toolkit/core";
1743
1962
  var spillMatrix = {
1744
1963
  name: "spillMatrix",
1745
1964
  type: Types.Any,
@@ -1762,10 +1981,26 @@ var spillMaximumHeightParameterDescriptor = {
1762
1981
  sortOrder: 1,
1763
1982
  name: "spillMaximumHeight"
1764
1983
  };
1765
- var _AppUtilityProxy_instances, defaultMaximums_fn;
1766
- var AppUtilityProxy = class extends LibProxy {
1984
+ var _hSpill_dec, _vSpill_dec, _version_dec, _a, _AppUtilityProxy_decorators, _init, _AppUtilityProxy_instances, defaultMaximums_fn;
1985
+ _AppUtilityProxy_decorators = [proxy.describeClass(false)];
1986
+ var AppUtilityProxy = class extends (_a = LibProxy, _version_dec = [proxy.describeMethod({
1987
+ type: Types.String,
1988
+ isMatrix: false,
1989
+ parameterDescriptors: []
1990
+ })], _vSpill_dec = [proxy.describeMethod({
1991
+ requiresContext: true,
1992
+ type: Types.Any,
1993
+ isMatrix: true,
1994
+ parameterDescriptors: [spillMatrix, spillMaximumWidthParameterDescriptor, spillMaximumHeightParameterDescriptor]
1995
+ })], _hSpill_dec = [proxy.describeMethod({
1996
+ requiresContext: true,
1997
+ type: Types.Any,
1998
+ isMatrix: true,
1999
+ parameterDescriptors: [spillMatrix, spillMaximumHeightParameterDescriptor, spillMaximumWidthParameterDescriptor]
2000
+ })], _a) {
1767
2001
  constructor() {
1768
2002
  super(...arguments);
2003
+ __runInitializers(_init, 5, this);
1769
2004
  __privateAdd(this, _AppUtilityProxy_instances);
1770
2005
  }
1771
2006
  version() {
@@ -1786,7 +2021,7 @@ var AppUtilityProxy = class extends LibProxy {
1786
2021
  if (hLength > 1 && hLength <= maximumArea) {
1787
2022
  let spillWidth = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.width);
1788
2023
  if (Number.isInteger(Math.log10(hLength))) {
1789
- const spillWidth10 = Math.pow(10, Math.floor(Math.log10(spillWidth)));
2024
+ const spillWidth10 = 10 ** Math.floor(Math.log10(spillWidth));
1790
2025
  if (hLength / spillWidth10 <= maximumDimensions.height) {
1791
2026
  spillWidth = spillWidth10;
1792
2027
  }
@@ -1819,7 +2054,7 @@ var AppUtilityProxy = class extends LibProxy {
1819
2054
  if (vLength > 1 && vLength <= maximumArea) {
1820
2055
  let spillHeight = Math.min(Math.ceil(Math.sqrt(maximumArea)), maximumDimensions.height);
1821
2056
  if (Number.isInteger(Math.log10(vLength))) {
1822
- const spillHeight10 = Math.pow(10, Math.floor(Math.log10(spillHeight)));
2057
+ const spillHeight10 = 10 ** Math.floor(Math.log10(spillHeight));
1823
2058
  if (vLength / spillHeight10 <= maximumDimensions.width) {
1824
2059
  spillHeight = spillHeight10;
1825
2060
  }
@@ -1838,6 +2073,7 @@ var AppUtilityProxy = class extends LibProxy {
1838
2073
  return result;
1839
2074
  }
1840
2075
  };
2076
+ _init = __decoratorStart(_a);
1841
2077
  _AppUtilityProxy_instances = new WeakSet();
1842
2078
  defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1843
2079
  if (isNullish(invocationContext)) {
@@ -1860,35 +2096,11 @@ defaultMaximums_fn = async function(maximumDimensions, invocationContext) {
1860
2096
  height: definedMaximumHeight
1861
2097
  };
1862
2098
  };
1863
- __decorateClass([
1864
- ProxyMethod({
1865
- type: Types.String,
1866
- isMatrix: false
1867
- })
1868
- ], AppUtilityProxy.prototype, "version", 1);
1869
- __decorateClass([
1870
- ProxyMethod({
1871
- requiresContext: true,
1872
- type: Types.Any,
1873
- isMatrix: true
1874
- }),
1875
- __decorateParam(0, ProxyParameter(spillMatrix)),
1876
- __decorateParam(1, ProxyParameter(spillMaximumWidthParameterDescriptor)),
1877
- __decorateParam(2, ProxyParameter(spillMaximumHeightParameterDescriptor))
1878
- ], AppUtilityProxy.prototype, "vSpill", 1);
1879
- __decorateClass([
1880
- ProxyMethod({
1881
- requiresContext: true,
1882
- type: Types.Any,
1883
- isMatrix: true
1884
- }),
1885
- __decorateParam(0, ProxyParameter(spillMatrix)),
1886
- __decorateParam(1, ProxyParameter(spillMaximumHeightParameterDescriptor)),
1887
- __decorateParam(2, ProxyParameter(spillMaximumWidthParameterDescriptor))
1888
- ], AppUtilityProxy.prototype, "hSpill", 1);
1889
- AppUtilityProxy = __decorateClass([
1890
- ProxyClass()
1891
- ], AppUtilityProxy);
2099
+ __decorateElement(_init, 1, "version", _version_dec, AppUtilityProxy);
2100
+ __decorateElement(_init, 1, "vSpill", _vSpill_dec, AppUtilityProxy);
2101
+ __decorateElement(_init, 1, "hSpill", _hSpill_dec, AppUtilityProxy);
2102
+ AppUtilityProxy = __decorateElement(_init, 0, "AppUtilityProxy", _AppUtilityProxy_decorators, AppUtilityProxy);
2103
+ __runInitializers(_init, 1, AppUtilityProxy);
1892
2104
 
1893
2105
  // src/utility/index.ts
1894
2106
  var utility_exports = {};
@@ -1941,7 +2153,28 @@ var transformedValueParameterDescriptor = {
1941
2153
  extendsDescriptor: valueParameterDescriptor,
1942
2154
  name: "transformedValue"
1943
2155
  };
1944
- var TransformerProxy = class extends LibProxy {
2156
+ var _reverse_dec, _forwardSequence_dec, _forward_dec, _a2, _TransformerProxy_decorators, _init2;
2157
+ _TransformerProxy_decorators = [proxy.describeClass(false, {
2158
+ methodInfix: "Transform"
2159
+ })];
2160
+ var TransformerProxy = class extends (_a2 = LibProxy, _forward_dec = [proxy.describeMethod({
2161
+ type: Types.Number,
2162
+ isMatrix: true,
2163
+ parameterDescriptors: [domainParameterDescriptor, valueParameterDescriptor, tweakParameterDescriptor]
2164
+ })], _forwardSequence_dec = [proxy.describeMethod({
2165
+ infixBefore: "Sequence",
2166
+ type: Types.Number,
2167
+ isMatrix: true,
2168
+ parameterDescriptors: [domainParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, tweakParameterDescriptor]
2169
+ })], _reverse_dec = [proxy.describeMethod({
2170
+ type: Types.Number,
2171
+ isMatrix: true,
2172
+ parameterDescriptors: [domainParameterDescriptor, transformedValueParameterDescriptor, tweakParameterDescriptor]
2173
+ })], _a2) {
2174
+ constructor() {
2175
+ super(...arguments);
2176
+ __runInitializers(_init2, 5, this);
2177
+ }
1945
2178
  forward(domain, matrixValues, tweak) {
1946
2179
  const transformer = Transformer.get(domain, tweak ?? void 0);
1947
2180
  return this.mapMatrix(matrixValues, (value) => this.mapBigInt(transformer.forward(value)));
@@ -1955,40 +2188,12 @@ var TransformerProxy = class extends LibProxy {
1955
2188
  return this.mapMatrix(matrixTransformedValues, (transformedValue) => this.mapBigInt(transformer.reverse(transformedValue)));
1956
2189
  }
1957
2190
  };
1958
- __decorateClass([
1959
- ProxyMethod({
1960
- type: Types.Number,
1961
- isMatrix: true
1962
- }),
1963
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
1964
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
1965
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
1966
- ], TransformerProxy.prototype, "forward", 1);
1967
- __decorateClass([
1968
- ProxyMethod({
1969
- infixBefore: "Sequence",
1970
- type: Types.Number,
1971
- isMatrix: true
1972
- }),
1973
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
1974
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
1975
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
1976
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
1977
- ], TransformerProxy.prototype, "forwardSequence", 1);
1978
- __decorateClass([
1979
- ProxyMethod({
1980
- type: Types.Number,
1981
- isMatrix: true
1982
- }),
1983
- __decorateParam(0, ProxyParameter(domainParameterDescriptor)),
1984
- __decorateParam(1, ProxyParameter(transformedValueParameterDescriptor)),
1985
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
1986
- ], TransformerProxy.prototype, "reverse", 1);
1987
- TransformerProxy = __decorateClass([
1988
- ProxyClass({
1989
- methodInfix: "Transform"
1990
- })
1991
- ], TransformerProxy);
2191
+ _init2 = __decoratorStart(_a2);
2192
+ __decorateElement(_init2, 1, "forward", _forward_dec, TransformerProxy);
2193
+ __decorateElement(_init2, 1, "forwardSequence", _forwardSequence_dec, TransformerProxy);
2194
+ __decorateElement(_init2, 1, "reverse", _reverse_dec, TransformerProxy);
2195
+ TransformerProxy = __decorateElement(_init2, 0, "TransformerProxy", _TransformerProxy_decorators, TransformerProxy);
2196
+ __runInitializers(_init2, 1, TransformerProxy);
1992
2197
 
1993
2198
  // src/utility/reg-exp-proxy.ts
1994
2199
  import { RegExpValidator } from "@aidc-toolkit/utility";
@@ -2030,7 +2235,23 @@ var errorMessageParameterDescriptor = {
2030
2235
  isMatrix: false,
2031
2236
  isRequired: false
2032
2237
  };
2033
- var RegExpProxy = class extends StringProxy {
2238
+ var _isValid_dec, _validate_dec, _a3, _RegExpProxy_decorators, _init3;
2239
+ _RegExpProxy_decorators = [proxy.describeClass(false, {
2240
+ methodInfix: "RegExp"
2241
+ })];
2242
+ var RegExpProxy = class extends (_a3 = StringProxy, _validate_dec = [proxy.describeMethod({
2243
+ type: Types.String,
2244
+ isMatrix: true,
2245
+ parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor, errorMessageParameterDescriptor]
2246
+ })], _isValid_dec = [proxy.describeMethod({
2247
+ type: Types.Boolean,
2248
+ isMatrix: true,
2249
+ parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor]
2250
+ })], _a3) {
2251
+ constructor() {
2252
+ super(...arguments);
2253
+ __runInitializers(_init3, 5, this);
2254
+ }
2034
2255
  validate(regExp, matrixSs, errorMessage) {
2035
2256
  return this.validateString(new class extends RegExpValidator {
2036
2257
  createErrorMessage(s) {
@@ -2042,28 +2263,11 @@ var RegExpProxy = class extends StringProxy {
2042
2263
  return this.isValidString(this.validate(regExp, matrixSs, void 0));
2043
2264
  }
2044
2265
  };
2045
- __decorateClass([
2046
- ProxyMethod({
2047
- type: Types.String,
2048
- isMatrix: true
2049
- }),
2050
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2051
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor)),
2052
- __decorateParam(2, ProxyParameter(errorMessageParameterDescriptor))
2053
- ], RegExpProxy.prototype, "validate", 1);
2054
- __decorateClass([
2055
- ProxyMethod({
2056
- type: Types.Boolean,
2057
- isMatrix: true
2058
- }),
2059
- __decorateParam(0, ProxyParameter(regExpParameterDescriptor)),
2060
- __decorateParam(1, ProxyParameter(validateSParameterDescriptor))
2061
- ], RegExpProxy.prototype, "isValid", 1);
2062
- RegExpProxy = __decorateClass([
2063
- ProxyClass({
2064
- methodInfix: "RegExp"
2065
- })
2066
- ], RegExpProxy);
2266
+ _init3 = __decoratorStart(_a3);
2267
+ __decorateElement(_init3, 1, "validate", _validate_dec, RegExpProxy);
2268
+ __decorateElement(_init3, 1, "isValid", _isValid_dec, RegExpProxy);
2269
+ RegExpProxy = __decorateElement(_init3, 0, "RegExpProxy", _RegExpProxy_decorators, RegExpProxy);
2270
+ __runInitializers(_init3, 1, RegExpProxy);
2067
2271
 
2068
2272
  // src/utility/character-set-proxy.ts
2069
2273
  import {
@@ -2113,14 +2317,25 @@ var valueForSParameterDescriptor = {
2113
2317
  extendsDescriptor: sParameterDescriptor,
2114
2318
  name: "valueForS"
2115
2319
  };
2116
- var CharacterSetValidatorProxy = class extends StringProxy {
2117
- #characterSetValidator;
2320
+ var _isValid_dec2, _validate_dec2, _a4, _CharacterSetValidatorProxy_decorators, _characterSetValidator, _init4;
2321
+ _CharacterSetValidatorProxy_decorators = [proxy.describeClass(true)];
2322
+ var CharacterSetValidatorProxy = class extends (_a4 = StringProxy, _validate_dec2 = [proxy.describeMethod({
2323
+ type: Types.String,
2324
+ isMatrix: true,
2325
+ parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2326
+ })], _isValid_dec2 = [proxy.describeMethod({
2327
+ type: Types.Boolean,
2328
+ isMatrix: true,
2329
+ parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
2330
+ })], _a4) {
2118
2331
  constructor(appExtension, characterSetValidator) {
2119
2332
  super(appExtension);
2120
- this.#characterSetValidator = characterSetValidator;
2333
+ __runInitializers(_init4, 5, this);
2334
+ __privateAdd(this, _characterSetValidator);
2335
+ __privateSet(this, _characterSetValidator, characterSetValidator);
2121
2336
  }
2122
2337
  validate(matrixSs, exclusion) {
2123
- return this.validateString(this.#characterSetValidator, matrixSs, {
2338
+ return this.validateString(__privateGet(this, _characterSetValidator), matrixSs, {
2124
2339
  exclusion: exclusion ?? void 0
2125
2340
  });
2126
2341
  }
@@ -2128,134 +2343,124 @@ var CharacterSetValidatorProxy = class extends StringProxy {
2128
2343
  return this.isValidString(this.validate(matrixSs, exclusion));
2129
2344
  }
2130
2345
  };
2131
- __decorateClass([
2132
- ProxyMethod({
2133
- type: Types.String,
2134
- isMatrix: true
2135
- }),
2136
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2137
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2138
- ], CharacterSetValidatorProxy.prototype, "validate", 1);
2139
- __decorateClass([
2140
- ProxyMethod({
2141
- type: Types.Boolean,
2142
- isMatrix: true
2143
- }),
2144
- __decorateParam(0, ProxyParameter(validateSParameterDescriptor)),
2145
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor))
2146
- ], CharacterSetValidatorProxy.prototype, "isValid", 1);
2147
- var CharacterSetCreatorProxy = class extends CharacterSetValidatorProxy {
2148
- #characterSetCreator;
2346
+ _init4 = __decoratorStart(_a4);
2347
+ _characterSetValidator = new WeakMap();
2348
+ __decorateElement(_init4, 1, "validate", _validate_dec2, CharacterSetValidatorProxy);
2349
+ __decorateElement(_init4, 1, "isValid", _isValid_dec2, CharacterSetValidatorProxy);
2350
+ CharacterSetValidatorProxy = __decorateElement(_init4, 0, "CharacterSetValidatorProxy", _CharacterSetValidatorProxy_decorators, CharacterSetValidatorProxy);
2351
+ __runInitializers(_init4, 1, CharacterSetValidatorProxy);
2352
+ var _valueFor_dec, _createSequence_dec, _create_dec, _a5, _CharacterSetCreatorProxy_decorators, _characterSetCreator, _init5;
2353
+ _CharacterSetCreatorProxy_decorators = [proxy.describeClass(true)];
2354
+ var CharacterSetCreatorProxy = class extends (_a5 = CharacterSetValidatorProxy, _create_dec = [proxy.describeMethod({
2355
+ type: Types.String,
2356
+ isMatrix: true,
2357
+ parameterDescriptors: [lengthParameterDescriptor, valueParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2358
+ })], _createSequence_dec = [proxy.describeMethod({
2359
+ infixBefore: "Sequence",
2360
+ type: Types.String,
2361
+ isMatrix: true,
2362
+ parameterDescriptors: [lengthParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2363
+ })], _valueFor_dec = [proxy.describeMethod({
2364
+ type: Types.Number,
2365
+ isMatrix: true,
2366
+ parameterDescriptors: [valueForSParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
2367
+ })], _a5) {
2149
2368
  constructor(appExtension, characterSetCreator) {
2150
2369
  super(appExtension, characterSetCreator);
2151
- this.#characterSetCreator = characterSetCreator;
2370
+ __runInitializers(_init5, 5, this);
2371
+ __privateAdd(this, _characterSetCreator);
2372
+ __privateSet(this, _characterSetCreator, characterSetCreator);
2152
2373
  }
2153
2374
  create(length, matrixValues, exclusion, tweak) {
2154
2375
  const exclusionOrUndefined = exclusion ?? void 0;
2155
2376
  const tweakOrUndefined = tweak ?? void 0;
2156
- return this.mapMatrix(matrixValues, (value) => this.#characterSetCreator.create(length, value, exclusionOrUndefined, tweakOrUndefined));
2377
+ return this.mapMatrix(matrixValues, (value) => __privateGet(this, _characterSetCreator).create(length, value, exclusionOrUndefined, tweakOrUndefined));
2157
2378
  }
2158
2379
  createSequence(length, startValue, count, exclusion, tweak) {
2159
2380
  this.appExtension.validateSequenceCount(count);
2160
2381
  const exclusionOrUndefined = exclusion ?? void 0;
2161
2382
  const tweakOrUndefined = tweak ?? void 0;
2162
- return LibProxy.matrixResult(this.#characterSetCreator.create(length, new Sequence2(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2383
+ return LibProxy.matrixResult(__privateGet(this, _characterSetCreator).create(length, new Sequence2(startValue, count), exclusionOrUndefined, tweakOrUndefined));
2163
2384
  }
2164
2385
  valueFor(matrixSs, exclusion, tweak) {
2165
2386
  const exclusionOrUndefined = exclusion ?? void 0;
2166
2387
  const tweakOrUndefined = tweak ?? void 0;
2167
- return this.mapMatrix(matrixSs, (s) => this.mapBigInt(this.#characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2168
- }
2169
- };
2170
- __decorateClass([
2171
- ProxyMethod({
2172
- type: Types.String,
2173
- isMatrix: true
2174
- }),
2175
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2176
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2177
- __decorateParam(2, ProxyParameter(exclusionNoneParameterDescriptor)),
2178
- __decorateParam(3, ProxyParameter(tweakParameterDescriptor))
2179
- ], CharacterSetCreatorProxy.prototype, "create", 1);
2180
- __decorateClass([
2181
- ProxyMethod({
2182
- infixBefore: "Sequence",
2183
- type: Types.String,
2184
- isMatrix: true
2185
- }),
2186
- __decorateParam(0, ProxyParameter(lengthParameterDescriptor)),
2187
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2188
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2189
- __decorateParam(3, ProxyParameter(exclusionNoneParameterDescriptor)),
2190
- __decorateParam(4, ProxyParameter(tweakParameterDescriptor))
2191
- ], CharacterSetCreatorProxy.prototype, "createSequence", 1);
2192
- __decorateClass([
2193
- ProxyMethod({
2194
- type: Types.Number,
2195
- isMatrix: true
2196
- }),
2197
- __decorateParam(0, ProxyParameter(valueForSParameterDescriptor)),
2198
- __decorateParam(1, ProxyParameter(exclusionNoneParameterDescriptor)),
2199
- __decorateParam(2, ProxyParameter(tweakParameterDescriptor))
2200
- ], CharacterSetCreatorProxy.prototype, "valueFor", 1);
2201
- var NumericProxy = class extends CharacterSetCreatorProxy {
2388
+ return this.mapMatrix(matrixSs, (s) => this.mapBigInt(__privateGet(this, _characterSetCreator).valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
2389
+ }
2390
+ };
2391
+ _init5 = __decoratorStart(_a5);
2392
+ _characterSetCreator = new WeakMap();
2393
+ __decorateElement(_init5, 1, "create", _create_dec, CharacterSetCreatorProxy);
2394
+ __decorateElement(_init5, 1, "createSequence", _createSequence_dec, CharacterSetCreatorProxy);
2395
+ __decorateElement(_init5, 1, "valueFor", _valueFor_dec, CharacterSetCreatorProxy);
2396
+ CharacterSetCreatorProxy = __decorateElement(_init5, 0, "CharacterSetCreatorProxy", _CharacterSetCreatorProxy_decorators, CharacterSetCreatorProxy);
2397
+ __runInitializers(_init5, 1, CharacterSetCreatorProxy);
2398
+ var _NumericProxy_decorators, _init6, _a6;
2399
+ _NumericProxy_decorators = [proxy.describeClass(false, {
2400
+ methodInfix: "Numeric",
2401
+ replaceParameterDescriptors: [
2402
+ {
2403
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2404
+ replacement: exclusionFirstZeroParameterDescriptor
2405
+ }
2406
+ ]
2407
+ })];
2408
+ var NumericProxy = class extends (_a6 = CharacterSetCreatorProxy) {
2202
2409
  constructor(appExtension) {
2203
2410
  super(appExtension, NUMERIC_CREATOR);
2204
2411
  }
2205
2412
  };
2206
- NumericProxy = __decorateClass([
2207
- ProxyClass({
2208
- methodInfix: "Numeric",
2209
- replaceParameterDescriptors: [
2210
- {
2211
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2212
- replacement: exclusionFirstZeroParameterDescriptor
2213
- }
2214
- ]
2215
- })
2216
- ], NumericProxy);
2217
- var HexadecimalProxy = class extends CharacterSetCreatorProxy {
2413
+ _init6 = __decoratorStart(_a6);
2414
+ NumericProxy = __decorateElement(_init6, 0, "NumericProxy", _NumericProxy_decorators, NumericProxy);
2415
+ __runInitializers(_init6, 1, NumericProxy);
2416
+ var _HexadecimalProxy_decorators, _init7, _a7;
2417
+ _HexadecimalProxy_decorators = [proxy.describeClass(false, {
2418
+ methodInfix: "Hexadecimal",
2419
+ replaceParameterDescriptors: [
2420
+ {
2421
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2422
+ replacement: exclusionAnyParameterDescriptor
2423
+ }
2424
+ ]
2425
+ })];
2426
+ var HexadecimalProxy = class extends (_a7 = CharacterSetCreatorProxy) {
2218
2427
  constructor(appExtension) {
2219
2428
  super(appExtension, HEXADECIMAL_CREATOR);
2220
2429
  }
2221
2430
  };
2222
- HexadecimalProxy = __decorateClass([
2223
- ProxyClass({
2224
- methodInfix: "Hexadecimal",
2225
- replaceParameterDescriptors: [
2226
- {
2227
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2228
- replacement: exclusionAnyParameterDescriptor
2229
- }
2230
- ]
2231
- })
2232
- ], HexadecimalProxy);
2233
- var AlphabeticProxy = class extends CharacterSetCreatorProxy {
2431
+ _init7 = __decoratorStart(_a7);
2432
+ HexadecimalProxy = __decorateElement(_init7, 0, "HexadecimalProxy", _HexadecimalProxy_decorators, HexadecimalProxy);
2433
+ __runInitializers(_init7, 1, HexadecimalProxy);
2434
+ var _AlphabeticProxy_decorators, _init8, _a8;
2435
+ _AlphabeticProxy_decorators = [proxy.describeClass(false, {
2436
+ methodInfix: "Alphabetic"
2437
+ })];
2438
+ var AlphabeticProxy = class extends (_a8 = CharacterSetCreatorProxy) {
2234
2439
  constructor(appExtension) {
2235
2440
  super(appExtension, ALPHABETIC_CREATOR);
2236
2441
  }
2237
2442
  };
2238
- AlphabeticProxy = __decorateClass([
2239
- ProxyClass({
2240
- methodInfix: "Alphabetic"
2241
- })
2242
- ], AlphabeticProxy);
2243
- var AlphanumericProxy = class extends CharacterSetCreatorProxy {
2443
+ _init8 = __decoratorStart(_a8);
2444
+ AlphabeticProxy = __decorateElement(_init8, 0, "AlphabeticProxy", _AlphabeticProxy_decorators, AlphabeticProxy);
2445
+ __runInitializers(_init8, 1, AlphabeticProxy);
2446
+ var _AlphanumericProxy_decorators, _init9, _a9;
2447
+ _AlphanumericProxy_decorators = [proxy.describeClass(false, {
2448
+ methodInfix: "Alphanumeric",
2449
+ replaceParameterDescriptors: [
2450
+ {
2451
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2452
+ replacement: exclusionAnyParameterDescriptor
2453
+ }
2454
+ ]
2455
+ })];
2456
+ var AlphanumericProxy = class extends (_a9 = CharacterSetCreatorProxy) {
2244
2457
  constructor(appExtension) {
2245
2458
  super(appExtension, ALPHANUMERIC_CREATOR);
2246
2459
  }
2247
2460
  };
2248
- AlphanumericProxy = __decorateClass([
2249
- ProxyClass({
2250
- methodInfix: "Alphanumeric",
2251
- replaceParameterDescriptors: [
2252
- {
2253
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2254
- replacement: exclusionAnyParameterDescriptor
2255
- }
2256
- ]
2257
- })
2258
- ], AlphanumericProxy);
2461
+ _init9 = __decoratorStart(_a9);
2462
+ AlphanumericProxy = __decorateElement(_init9, 0, "AlphanumericProxy", _AlphanumericProxy_decorators, AlphanumericProxy);
2463
+ __runInitializers(_init9, 1, AlphanumericProxy);
2259
2464
 
2260
2465
  // src/gs1/index.ts
2261
2466
  var gs1_exports = {};
@@ -2296,51 +2501,57 @@ __export(gs1_exports, {
2296
2501
 
2297
2502
  // src/gs1/character-set-proxy.ts
2298
2503
  import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
2299
- var AI82Proxy = class extends CharacterSetCreatorProxy {
2504
+ var _AI82Proxy_decorators, _init10, _a10;
2505
+ _AI82Proxy_decorators = [proxy.describeClass(false, {
2506
+ namespace: "GS1",
2507
+ methodInfix: "AI82",
2508
+ replaceParameterDescriptors: [
2509
+ {
2510
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2511
+ replacement: exclusionAllNumericParameterDescriptor
2512
+ }
2513
+ ]
2514
+ })];
2515
+ var AI82Proxy = class extends (_a10 = CharacterSetCreatorProxy) {
2300
2516
  constructor(appExtension) {
2301
2517
  super(appExtension, AI82_CREATOR);
2302
2518
  }
2303
2519
  };
2304
- AI82Proxy = __decorateClass([
2305
- ProxyClass({
2306
- namespace: "GS1",
2307
- methodInfix: "AI82",
2308
- replaceParameterDescriptors: [
2309
- {
2310
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2311
- replacement: exclusionAllNumericParameterDescriptor
2312
- }
2313
- ]
2314
- })
2315
- ], AI82Proxy);
2316
- var AI39Proxy = class extends CharacterSetCreatorProxy {
2520
+ _init10 = __decoratorStart(_a10);
2521
+ AI82Proxy = __decorateElement(_init10, 0, "AI82Proxy", _AI82Proxy_decorators, AI82Proxy);
2522
+ __runInitializers(_init10, 1, AI82Proxy);
2523
+ var _AI39Proxy_decorators, _init11, _a11;
2524
+ _AI39Proxy_decorators = [proxy.describeClass(false, {
2525
+ namespace: "GS1",
2526
+ methodInfix: "AI39",
2527
+ replaceParameterDescriptors: [
2528
+ {
2529
+ name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2530
+ replacement: exclusionAllNumericParameterDescriptor
2531
+ }
2532
+ ]
2533
+ })];
2534
+ var AI39Proxy = class extends (_a11 = CharacterSetCreatorProxy) {
2317
2535
  constructor(appExtension) {
2318
2536
  super(appExtension, AI39_CREATOR);
2319
2537
  }
2320
2538
  };
2321
- AI39Proxy = __decorateClass([
2322
- ProxyClass({
2323
- namespace: "GS1",
2324
- methodInfix: "AI39",
2325
- replaceParameterDescriptors: [
2326
- {
2327
- name: expandParameterDescriptor(exclusionNoneParameterDescriptor).name,
2328
- replacement: exclusionAllNumericParameterDescriptor
2329
- }
2330
- ]
2331
- })
2332
- ], AI39Proxy);
2333
- var AI64Proxy = class extends CharacterSetValidatorProxy {
2539
+ _init11 = __decoratorStart(_a11);
2540
+ AI39Proxy = __decorateElement(_init11, 0, "AI39Proxy", _AI39Proxy_decorators, AI39Proxy);
2541
+ __runInitializers(_init11, 1, AI39Proxy);
2542
+ var _AI64Proxy_decorators, _init12, _a12;
2543
+ _AI64Proxy_decorators = [proxy.describeClass(false, {
2544
+ namespace: "GS1",
2545
+ methodInfix: "AI64"
2546
+ })];
2547
+ var AI64Proxy = class extends (_a12 = CharacterSetValidatorProxy) {
2334
2548
  constructor(appExtension) {
2335
2549
  super(appExtension, AI64_VALIDATOR);
2336
2550
  }
2337
2551
  };
2338
- AI64Proxy = __decorateClass([
2339
- ProxyClass({
2340
- namespace: "GS1",
2341
- methodInfix: "AI64"
2342
- })
2343
- ], AI64Proxy);
2552
+ _init12 = __decoratorStart(_a12);
2553
+ AI64Proxy = __decorateElement(_init12, 0, "AI64Proxy", _AI64Proxy_decorators, AI64Proxy);
2554
+ __runInitializers(_init12, 1, AI64Proxy);
2344
2555
 
2345
2556
  // src/gs1/check-proxy.ts
2346
2557
  import {
@@ -2385,7 +2596,42 @@ var ai82SWithCheckCharacterPairParameterDescriptor = {
2385
2596
  extendsDescriptor: ai82SParameterDescriptor,
2386
2597
  name: "ai82SWithCheckCharacterPair"
2387
2598
  };
2388
- var CheckProxy = class extends LibProxy {
2599
+ var _hasValidCheckCharacterPair_dec, _checkCharacterPair_dec, _isValidPriceOrWeightCheckDigit_dec, _priceOrWeightCheckDigit_dec, _hasValidCheckDigit_dec, _checkDigit_dec, _a13, _CheckProxy_decorators, _init13;
2600
+ _CheckProxy_decorators = [proxy.describeClass(false, {
2601
+ namespace: "GS1"
2602
+ })];
2603
+ var CheckProxy = class extends (_a13 = LibProxy, _checkDigit_dec = [proxy.describeMethod({
2604
+ type: Types.String,
2605
+ isMatrix: true,
2606
+ parameterDescriptors: [numericSParameterDescriptor]
2607
+ })], _hasValidCheckDigit_dec = [proxy.describeMethod({
2608
+ type: Types.String,
2609
+ isMatrix: true,
2610
+ parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]
2611
+ })], _priceOrWeightCheckDigit_dec = [proxy.describeMethod({
2612
+ type: Types.String,
2613
+ isMatrix: true,
2614
+ parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]
2615
+ })], _isValidPriceOrWeightCheckDigit_dec = [proxy.describeMethod({
2616
+ type: Types.String,
2617
+ isMatrix: false,
2618
+ parameterDescriptors: [{
2619
+ ...numericSFourOrFiveDigitsParameterDescriptor,
2620
+ isMatrix: false
2621
+ }, checkDigitParameterDescriptor]
2622
+ })], _checkCharacterPair_dec = [proxy.describeMethod({
2623
+ type: Types.String,
2624
+ isMatrix: true,
2625
+ parameterDescriptors: [ai82SParameterDescriptor]
2626
+ })], _hasValidCheckCharacterPair_dec = [proxy.describeMethod({
2627
+ type: Types.String,
2628
+ isMatrix: true,
2629
+ parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]
2630
+ })], _a13) {
2631
+ constructor() {
2632
+ super(...arguments);
2633
+ __runInitializers(_init13, 5, this);
2634
+ }
2389
2635
  checkDigit(matrixSs) {
2390
2636
  return this.mapMatrix(matrixSs, (s) => checkDigit(s));
2391
2637
  }
@@ -2405,70 +2651,46 @@ var CheckProxy = class extends LibProxy {
2405
2651
  return this.mapMatrix(matrixSs, (s) => hasValidCheckCharacterPair(s));
2406
2652
  }
2407
2653
  };
2408
- __decorateClass([
2409
- ProxyMethod({
2410
- type: Types.String,
2411
- isMatrix: true
2412
- }),
2413
- __decorateParam(0, ProxyParameter(numericSParameterDescriptor))
2414
- ], CheckProxy.prototype, "checkDigit", 1);
2415
- __decorateClass([
2416
- ProxyMethod({
2417
- type: Types.String,
2418
- isMatrix: true
2419
- }),
2420
- __decorateParam(0, ProxyParameter(numericSWithCheckDigitParameterDescriptor))
2421
- ], CheckProxy.prototype, "hasValidCheckDigit", 1);
2422
- __decorateClass([
2423
- ProxyMethod({
2424
- type: Types.String,
2425
- isMatrix: true
2426
- }),
2427
- __decorateParam(0, ProxyParameter(numericSFourOrFiveDigitsParameterDescriptor))
2428
- ], CheckProxy.prototype, "priceOrWeightCheckDigit", 1);
2429
- __decorateClass([
2430
- ProxyMethod({
2431
- type: Types.String,
2432
- isMatrix: false
2433
- }),
2434
- __decorateParam(0, ProxyParameter({
2435
- ...numericSFourOrFiveDigitsParameterDescriptor,
2436
- isMatrix: false
2437
- })),
2438
- __decorateParam(1, ProxyParameter(checkDigitParameterDescriptor))
2439
- ], CheckProxy.prototype, "isValidPriceOrWeightCheckDigit", 1);
2440
- __decorateClass([
2441
- ProxyMethod({
2442
- type: Types.String,
2443
- isMatrix: true
2444
- }),
2445
- __decorateParam(0, ProxyParameter(ai82SParameterDescriptor))
2446
- ], CheckProxy.prototype, "checkCharacterPair", 1);
2447
- __decorateClass([
2448
- ProxyMethod({
2449
- type: Types.String,
2450
- isMatrix: true
2451
- }),
2452
- __decorateParam(0, ProxyParameter(ai82SWithCheckCharacterPairParameterDescriptor))
2453
- ], CheckProxy.prototype, "hasValidCheckCharacterPair", 1);
2454
- CheckProxy = __decorateClass([
2455
- ProxyClass({
2456
- namespace: "GS1"
2457
- })
2458
- ], CheckProxy);
2654
+ _init13 = __decoratorStart(_a13);
2655
+ __decorateElement(_init13, 1, "checkDigit", _checkDigit_dec, CheckProxy);
2656
+ __decorateElement(_init13, 1, "hasValidCheckDigit", _hasValidCheckDigit_dec, CheckProxy);
2657
+ __decorateElement(_init13, 1, "priceOrWeightCheckDigit", _priceOrWeightCheckDigit_dec, CheckProxy);
2658
+ __decorateElement(_init13, 1, "isValidPriceOrWeightCheckDigit", _isValidPriceOrWeightCheckDigit_dec, CheckProxy);
2659
+ __decorateElement(_init13, 1, "checkCharacterPair", _checkCharacterPair_dec, CheckProxy);
2660
+ __decorateElement(_init13, 1, "hasValidCheckCharacterPair", _hasValidCheckCharacterPair_dec, CheckProxy);
2661
+ CheckProxy = __decorateElement(_init13, 0, "CheckProxy", _CheckProxy_decorators, CheckProxy);
2662
+ __runInitializers(_init13, 1, CheckProxy);
2459
2663
 
2460
- // src/gs1/identifier-proxy.ts
2461
- import { isNullish as isNullish2 } from "@aidc-toolkit/core";
2462
- import {
2463
- GTINCreator,
2464
- GTINLengths,
2465
- GTINValidator,
2466
- IdentifierValidators,
2467
- PrefixManager,
2468
- PrefixTypes,
2469
- PrefixValidator
2470
- } from "@aidc-toolkit/gs1";
2471
- import { Sequence as Sequence3 } from "@aidc-toolkit/utility";
2664
+ // src/gs1/gtin-validator-proxy.ts
2665
+ import { GTINLengths, GTINValidator, IdentifierValidators } from "@aidc-toolkit/gs1";
2666
+
2667
+ // src/gs1/gtin-descriptor.ts
2668
+ var indicatorDigitParameterDescriptor = {
2669
+ name: "indicatorDigit",
2670
+ type: Types.String,
2671
+ isMatrix: false,
2672
+ isRequired: true
2673
+ };
2674
+ var rcnFormatParameterDescriptor = {
2675
+ name: "rcnFormat",
2676
+ type: Types.String,
2677
+ isMatrix: false,
2678
+ isRequired: true
2679
+ };
2680
+ var rcnItemReferenceParameterDescriptor = {
2681
+ name: "rcnItemReference",
2682
+ type: Types.Number,
2683
+ isMatrix: false,
2684
+ isRequired: true
2685
+ };
2686
+ var rcnPriceOrWeightParameterDescriptor = {
2687
+ name: "rcnPriceOrWeight",
2688
+ type: Types.Number,
2689
+ isMatrix: true,
2690
+ isRequired: true
2691
+ };
2692
+
2693
+ // src/gs1/identifier-validator-proxy.ts
2472
2694
  var identifierParameterDescriptor = {
2473
2695
  name: "identifier",
2474
2696
  type: Types.String,
@@ -2490,18 +2712,27 @@ var IdentifierValidatorProxy = class extends StringProxy {
2490
2712
  return this.#validator;
2491
2713
  }
2492
2714
  };
2493
- var NumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
2715
+ var _validate_dec3, _a14, _NumericIdentifierValidatorProxy_decorators, _init14;
2716
+ _NumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2717
+ namespace: "GS1"
2718
+ })];
2719
+ var NumericIdentifierValidatorProxy = class extends (_a14 = IdentifierValidatorProxy, _validate_dec3 = [proxy.describeMethod({
2720
+ type: Types.String,
2721
+ isMatrix: true,
2722
+ parameterDescriptors: [validateIdentifierParameterDescriptor]
2723
+ })], _a14) {
2724
+ constructor() {
2725
+ super(...arguments);
2726
+ __runInitializers(_init14, 5, this);
2727
+ }
2494
2728
  validate(matrixIdentifiers) {
2495
2729
  return this.validateString(this.validator, matrixIdentifiers);
2496
2730
  }
2497
2731
  };
2498
- __decorateClass([
2499
- ProxyMethod({
2500
- type: Types.String,
2501
- isMatrix: true
2502
- }),
2503
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor))
2504
- ], NumericIdentifierValidatorProxy.prototype, "validate", 1);
2732
+ _init14 = __decoratorStart(_a14);
2733
+ __decorateElement(_init14, 1, "validate", _validate_dec3, NumericIdentifierValidatorProxy);
2734
+ NumericIdentifierValidatorProxy = __decorateElement(_init14, 0, "NumericIdentifierValidatorProxy", _NumericIdentifierValidatorProxy_decorators, NumericIdentifierValidatorProxy);
2735
+ __runInitializers(_init14, 1, NumericIdentifierValidatorProxy);
2505
2736
  var GTINValidatorProxy = class extends NumericIdentifierValidatorProxy {
2506
2737
  };
2507
2738
  var NonGTINNumericIdentifierValidatorProxy = class extends NumericIdentifierValidatorProxy {
@@ -2510,54 +2741,70 @@ var NonSerializableNumericIdentifierValidatorProxy = class extends NonGTINNumeri
2510
2741
  };
2511
2742
  var SerializableNumericIdentifierValidatorProxy = class extends NonGTINNumericIdentifierValidatorProxy {
2512
2743
  };
2513
- var NonNumericIdentifierValidatorProxy = class extends IdentifierValidatorProxy {
2744
+ var _validate_dec4, _a15, _NonNumericIdentifierValidatorProxy_decorators, _init15;
2745
+ _NonNumericIdentifierValidatorProxy_decorators = [proxy.describeClass(true, {
2746
+ namespace: "GS1"
2747
+ })];
2748
+ var NonNumericIdentifierValidatorProxy = class extends (_a15 = IdentifierValidatorProxy, _validate_dec4 = [proxy.describeMethod({
2749
+ type: Types.String,
2750
+ isMatrix: true,
2751
+ parameterDescriptors: [validateIdentifierParameterDescriptor, exclusionAllNumericParameterDescriptor]
2752
+ })], _a15) {
2753
+ constructor() {
2754
+ super(...arguments);
2755
+ __runInitializers(_init15, 5, this);
2756
+ }
2514
2757
  validate(matrixIdentifiers, exclusion) {
2515
2758
  return this.validateString(this.validator, matrixIdentifiers, {
2516
2759
  exclusion: exclusion ?? void 0
2517
2760
  });
2518
2761
  }
2519
2762
  };
2520
- __decorateClass([
2521
- ProxyMethod({
2522
- type: Types.String,
2523
- isMatrix: true
2524
- }),
2525
- __decorateParam(0, ProxyParameter(validateIdentifierParameterDescriptor)),
2526
- __decorateParam(1, ProxyParameter(exclusionAllNumericParameterDescriptor))
2527
- ], NonNumericIdentifierValidatorProxy.prototype, "validate", 1);
2528
- var GTIN13ValidatorProxy = class extends GTINValidatorProxy {
2763
+ _init15 = __decoratorStart(_a15);
2764
+ __decorateElement(_init15, 1, "validate", _validate_dec4, NonNumericIdentifierValidatorProxy);
2765
+ NonNumericIdentifierValidatorProxy = __decorateElement(_init15, 0, "NonNumericIdentifierValidatorProxy", _NonNumericIdentifierValidatorProxy_decorators, NonNumericIdentifierValidatorProxy);
2766
+ __runInitializers(_init15, 1, NonNumericIdentifierValidatorProxy);
2767
+
2768
+ // src/gs1/gtin-validator-proxy.ts
2769
+ var _GTIN13ValidatorProxy_decorators, _init16, _a16;
2770
+ _GTIN13ValidatorProxy_decorators = [proxy.describeClass(false, {
2771
+ namespace: "GS1",
2772
+ methodInfix: "GTIN13"
2773
+ })];
2774
+ var GTIN13ValidatorProxy = class extends (_a16 = GTINValidatorProxy) {
2529
2775
  constructor(appExtension) {
2530
2776
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN13]);
2531
2777
  }
2532
2778
  };
2533
- GTIN13ValidatorProxy = __decorateClass([
2534
- ProxyClass({
2535
- namespace: "GS1",
2536
- methodInfix: "GTIN13"
2537
- })
2538
- ], GTIN13ValidatorProxy);
2539
- var GTIN12ValidatorProxy = class extends GTINValidatorProxy {
2779
+ _init16 = __decoratorStart(_a16);
2780
+ GTIN13ValidatorProxy = __decorateElement(_init16, 0, "GTIN13ValidatorProxy", _GTIN13ValidatorProxy_decorators, GTIN13ValidatorProxy);
2781
+ __runInitializers(_init16, 1, GTIN13ValidatorProxy);
2782
+ var _GTIN12ValidatorProxy_decorators, _init17, _a17;
2783
+ _GTIN12ValidatorProxy_decorators = [proxy.describeClass(false, {
2784
+ namespace: "GS1",
2785
+ methodInfix: "GTIN12"
2786
+ })];
2787
+ var GTIN12ValidatorProxy = class extends (_a17 = GTINValidatorProxy) {
2540
2788
  constructor(appExtension) {
2541
2789
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN12]);
2542
2790
  }
2543
2791
  };
2544
- GTIN12ValidatorProxy = __decorateClass([
2545
- ProxyClass({
2546
- namespace: "GS1",
2547
- methodInfix: "GTIN12"
2548
- })
2549
- ], GTIN12ValidatorProxy);
2550
- var GTIN8ValidatorProxy = class extends GTINValidatorProxy {
2792
+ _init17 = __decoratorStart(_a17);
2793
+ GTIN12ValidatorProxy = __decorateElement(_init17, 0, "GTIN12ValidatorProxy", _GTIN12ValidatorProxy_decorators, GTIN12ValidatorProxy);
2794
+ __runInitializers(_init17, 1, GTIN12ValidatorProxy);
2795
+ var _GTIN8ValidatorProxy_decorators, _init18, _a18;
2796
+ _GTIN8ValidatorProxy_decorators = [proxy.describeClass(false, {
2797
+ namespace: "GS1",
2798
+ methodInfix: "GTIN8"
2799
+ })];
2800
+ var GTIN8ValidatorProxy = class extends (_a18 = GTINValidatorProxy) {
2551
2801
  constructor(appExtension) {
2552
2802
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN8]);
2553
2803
  }
2554
2804
  };
2555
- GTIN8ValidatorProxy = __decorateClass([
2556
- ProxyClass({
2557
- namespace: "GS1",
2558
- methodInfix: "GTIN8"
2559
- })
2560
- ], GTIN8ValidatorProxy);
2805
+ _init18 = __decoratorStart(_a18);
2806
+ GTIN8ValidatorProxy = __decorateElement(_init18, 0, "GTIN8ValidatorProxy", _GTIN8ValidatorProxy_decorators, GTIN8ValidatorProxy);
2807
+ __runInitializers(_init18, 1, GTIN8ValidatorProxy);
2561
2808
  var zeroSuppressibleGTIN12ParameterDescriptor = {
2562
2809
  extendsDescriptor: identifierParameterDescriptor,
2563
2810
  name: "zeroSuppressibleGTIN12"
@@ -2566,12 +2813,6 @@ var zeroSuppressedGTIN12ParameterDescriptor = {
2566
2813
  extendsDescriptor: identifierParameterDescriptor,
2567
2814
  name: "zeroSuppressedGTIN12"
2568
2815
  };
2569
- var indicatorDigitParameterDescriptor = {
2570
- name: "indicatorDigit",
2571
- type: Types.String,
2572
- isMatrix: false,
2573
- isRequired: true
2574
- };
2575
2816
  var convertGTINParameterDescriptor = {
2576
2817
  extendsDescriptor: identifierParameterDescriptor,
2577
2818
  name: "convertGTIN"
@@ -2594,31 +2835,49 @@ var validateGTIN14ParameterDescriptor = {
2594
2835
  extendsDescriptor: identifierParameterDescriptor,
2595
2836
  name: "validateGTIN14"
2596
2837
  };
2597
- var rcnFormatParameterDescriptor = {
2598
- name: "rcnFormat",
2599
- type: Types.String,
2600
- isMatrix: false,
2601
- isRequired: true
2602
- };
2603
2838
  var rcnParameterDescriptor = {
2604
2839
  name: "rcn",
2605
2840
  type: Types.String,
2606
2841
  isMatrix: true,
2607
2842
  isRequired: true
2608
2843
  };
2609
- var rcnItemReferenceParameterDescriptor = {
2610
- name: "rcnItemReference",
2611
- type: Types.Number,
2612
- isMatrix: false,
2613
- isRequired: true
2614
- };
2615
- var rcnPriceOrWeightParameterDescriptor = {
2616
- name: "rcnPriceOrWeight",
2844
+ var _parseVariableMeasureRCN_dec, _validateGTIN14_dec, _validateGTIN_dec, _normalizeGTIN_dec, _convertToGTIN14_dec, _zeroExpandGTIN12_dec, _zeroSuppressGTIN12_dec, _a19, _GTINValidatorStaticProxy_decorators, _init19;
2845
+ _GTINValidatorStaticProxy_decorators = [proxy.describeClass(false, {
2846
+ namespace: "GS1"
2847
+ })];
2848
+ var GTINValidatorStaticProxy = class extends (_a19 = LibProxy, _zeroSuppressGTIN12_dec = [proxy.describeMethod({
2849
+ type: Types.String,
2850
+ isMatrix: true,
2851
+ parameterDescriptors: [zeroSuppressibleGTIN12ParameterDescriptor]
2852
+ })], _zeroExpandGTIN12_dec = [proxy.describeMethod({
2853
+ type: Types.String,
2854
+ isMatrix: true,
2855
+ parameterDescriptors: [zeroSuppressedGTIN12ParameterDescriptor]
2856
+ })], _convertToGTIN14_dec = [proxy.describeMethod({
2857
+ type: Types.String,
2858
+ isMatrix: true,
2859
+ parameterDescriptors: [indicatorDigitParameterDescriptor, convertGTINParameterDescriptor]
2860
+ })], _normalizeGTIN_dec = [proxy.describeMethod({
2861
+ type: Types.String,
2862
+ isMatrix: true,
2863
+ parameterDescriptors: [normalizeGTINParameterDescriptor]
2864
+ })], _validateGTIN_dec = [proxy.describeMethod({
2865
+ type: Types.String,
2866
+ isMatrix: true,
2867
+ parameterDescriptors: [validateGTINParameterDescriptor, gtinLevelParameterDescriptor]
2868
+ })], _validateGTIN14_dec = [proxy.describeMethod({
2869
+ type: Types.String,
2870
+ isMatrix: true,
2871
+ parameterDescriptors: [validateGTIN14ParameterDescriptor]
2872
+ })], _parseVariableMeasureRCN_dec = [proxy.describeMethod({
2617
2873
  type: Types.Number,
2618
2874
  isMatrix: true,
2619
- isRequired: true
2620
- };
2621
- var GTINValidatorStaticProxy = class extends LibProxy {
2875
+ parameterDescriptors: [rcnFormatParameterDescriptor, rcnParameterDescriptor]
2876
+ })], _a19) {
2877
+ constructor() {
2878
+ super(...arguments);
2879
+ __runInitializers(_init19, 5, this);
2880
+ }
2622
2881
  zeroSuppressGTIN12(matrixGTIN12s) {
2623
2882
  return this.mapMatrix(matrixGTIN12s, (gtin12) => GTINValidator.zeroSuppress(gtin12));
2624
2883
  }
@@ -2649,184 +2908,164 @@ var GTINValidatorStaticProxy = class extends LibProxy {
2649
2908
  });
2650
2909
  }
2651
2910
  };
2652
- __decorateClass([
2653
- ProxyMethod({
2654
- type: Types.String,
2655
- isMatrix: true
2656
- }),
2657
- __decorateParam(0, ProxyParameter(zeroSuppressibleGTIN12ParameterDescriptor))
2658
- ], GTINValidatorStaticProxy.prototype, "zeroSuppressGTIN12", 1);
2659
- __decorateClass([
2660
- ProxyMethod({
2661
- type: Types.String,
2662
- isMatrix: true
2663
- }),
2664
- __decorateParam(0, ProxyParameter(zeroSuppressedGTIN12ParameterDescriptor))
2665
- ], GTINValidatorStaticProxy.prototype, "zeroExpandGTIN12", 1);
2666
- __decorateClass([
2667
- ProxyMethod({
2668
- type: Types.String,
2669
- isMatrix: true
2670
- }),
2671
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
2672
- __decorateParam(1, ProxyParameter(convertGTINParameterDescriptor))
2673
- ], GTINValidatorStaticProxy.prototype, "convertToGTIN14", 1);
2674
- __decorateClass([
2675
- ProxyMethod({
2676
- type: Types.String,
2677
- isMatrix: true
2678
- }),
2679
- __decorateParam(0, ProxyParameter(normalizeGTINParameterDescriptor))
2680
- ], GTINValidatorStaticProxy.prototype, "normalizeGTIN", 1);
2681
- __decorateClass([
2682
- ProxyMethod({
2683
- type: Types.String,
2684
- isMatrix: true
2685
- }),
2686
- __decorateParam(0, ProxyParameter(validateGTINParameterDescriptor)),
2687
- __decorateParam(1, ProxyParameter(gtinLevelParameterDescriptor))
2688
- ], GTINValidatorStaticProxy.prototype, "validateGTIN", 1);
2689
- __decorateClass([
2690
- ProxyMethod({
2691
- type: Types.String,
2692
- isMatrix: true
2693
- }),
2694
- __decorateParam(0, ProxyParameter(validateGTIN14ParameterDescriptor))
2695
- ], GTINValidatorStaticProxy.prototype, "validateGTIN14", 1);
2696
- __decorateClass([
2697
- ProxyMethod({
2698
- type: Types.Number,
2699
- isMatrix: true
2700
- }),
2701
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
2702
- __decorateParam(1, ProxyParameter(rcnParameterDescriptor))
2703
- ], GTINValidatorStaticProxy.prototype, "parseVariableMeasureRCN", 1);
2704
- GTINValidatorStaticProxy = __decorateClass([
2705
- ProxyClass({
2706
- namespace: "GS1"
2707
- })
2708
- ], GTINValidatorStaticProxy);
2709
- var GLNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2911
+ _init19 = __decoratorStart(_a19);
2912
+ __decorateElement(_init19, 1, "zeroSuppressGTIN12", _zeroSuppressGTIN12_dec, GTINValidatorStaticProxy);
2913
+ __decorateElement(_init19, 1, "zeroExpandGTIN12", _zeroExpandGTIN12_dec, GTINValidatorStaticProxy);
2914
+ __decorateElement(_init19, 1, "convertToGTIN14", _convertToGTIN14_dec, GTINValidatorStaticProxy);
2915
+ __decorateElement(_init19, 1, "normalizeGTIN", _normalizeGTIN_dec, GTINValidatorStaticProxy);
2916
+ __decorateElement(_init19, 1, "validateGTIN", _validateGTIN_dec, GTINValidatorStaticProxy);
2917
+ __decorateElement(_init19, 1, "validateGTIN14", _validateGTIN14_dec, GTINValidatorStaticProxy);
2918
+ __decorateElement(_init19, 1, "parseVariableMeasureRCN", _parseVariableMeasureRCN_dec, GTINValidatorStaticProxy);
2919
+ GTINValidatorStaticProxy = __decorateElement(_init19, 0, "GTINValidatorStaticProxy", _GTINValidatorStaticProxy_decorators, GTINValidatorStaticProxy);
2920
+ __runInitializers(_init19, 1, GTINValidatorStaticProxy);
2921
+
2922
+ // src/gs1/non-gtin-validator-proxy.ts
2923
+ import { IdentifierValidators as IdentifierValidators2 } from "@aidc-toolkit/gs1";
2924
+ var _GLNValidatorProxy_decorators, _init20, _a20;
2925
+ _GLNValidatorProxy_decorators = [proxy.describeClass(false, {
2926
+ namespace: "GS1",
2927
+ methodInfix: "GLN"
2928
+ })];
2929
+ var GLNValidatorProxy = class extends (_a20 = NonSerializableNumericIdentifierValidatorProxy) {
2710
2930
  constructor(appExtension) {
2711
- super(appExtension, IdentifierValidators.GLN);
2712
- }
2713
- };
2714
- GLNValidatorProxy = __decorateClass([
2715
- ProxyClass({
2716
- namespace: "GS1",
2717
- methodInfix: "GLN"
2718
- })
2719
- ], GLNValidatorProxy);
2720
- var SSCCValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2931
+ super(appExtension, IdentifierValidators2.GLN);
2932
+ }
2933
+ };
2934
+ _init20 = __decoratorStart(_a20);
2935
+ GLNValidatorProxy = __decorateElement(_init20, 0, "GLNValidatorProxy", _GLNValidatorProxy_decorators, GLNValidatorProxy);
2936
+ __runInitializers(_init20, 1, GLNValidatorProxy);
2937
+ var _SSCCValidatorProxy_decorators, _init21, _a21;
2938
+ _SSCCValidatorProxy_decorators = [proxy.describeClass(false, {
2939
+ namespace: "GS1",
2940
+ methodInfix: "SSCC"
2941
+ })];
2942
+ var SSCCValidatorProxy = class extends (_a21 = NonSerializableNumericIdentifierValidatorProxy) {
2721
2943
  constructor(appExtension) {
2722
- super(appExtension, IdentifierValidators.SSCC);
2723
- }
2724
- };
2725
- SSCCValidatorProxy = __decorateClass([
2726
- ProxyClass({
2727
- namespace: "GS1",
2728
- methodInfix: "SSCC"
2729
- })
2730
- ], SSCCValidatorProxy);
2731
- var GRAIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
2944
+ super(appExtension, IdentifierValidators2.SSCC);
2945
+ }
2946
+ };
2947
+ _init21 = __decoratorStart(_a21);
2948
+ SSCCValidatorProxy = __decorateElement(_init21, 0, "SSCCValidatorProxy", _SSCCValidatorProxy_decorators, SSCCValidatorProxy);
2949
+ __runInitializers(_init21, 1, SSCCValidatorProxy);
2950
+ var _GRAIValidatorProxy_decorators, _init22, _a22;
2951
+ _GRAIValidatorProxy_decorators = [proxy.describeClass(false, {
2952
+ namespace: "GS1",
2953
+ methodInfix: "GRAI"
2954
+ })];
2955
+ var GRAIValidatorProxy = class extends (_a22 = SerializableNumericIdentifierValidatorProxy) {
2732
2956
  constructor(appExtension) {
2733
- super(appExtension, IdentifierValidators.GRAI);
2734
- }
2735
- };
2736
- GRAIValidatorProxy = __decorateClass([
2737
- ProxyClass({
2738
- namespace: "GS1",
2739
- methodInfix: "GRAI"
2740
- })
2741
- ], GRAIValidatorProxy);
2742
- var GIAIValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
2957
+ super(appExtension, IdentifierValidators2.GRAI);
2958
+ }
2959
+ };
2960
+ _init22 = __decoratorStart(_a22);
2961
+ GRAIValidatorProxy = __decorateElement(_init22, 0, "GRAIValidatorProxy", _GRAIValidatorProxy_decorators, GRAIValidatorProxy);
2962
+ __runInitializers(_init22, 1, GRAIValidatorProxy);
2963
+ var _GIAIValidatorProxy_decorators, _init23, _a23;
2964
+ _GIAIValidatorProxy_decorators = [proxy.describeClass(false, {
2965
+ namespace: "GS1",
2966
+ methodInfix: "GIAI"
2967
+ })];
2968
+ var GIAIValidatorProxy = class extends (_a23 = NonNumericIdentifierValidatorProxy) {
2743
2969
  constructor(appExtension) {
2744
- super(appExtension, IdentifierValidators.GIAI);
2745
- }
2746
- };
2747
- GIAIValidatorProxy = __decorateClass([
2748
- ProxyClass({
2749
- namespace: "GS1",
2750
- methodInfix: "GIAI"
2751
- })
2752
- ], GIAIValidatorProxy);
2753
- var GSRNValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
2970
+ super(appExtension, IdentifierValidators2.GIAI);
2971
+ }
2972
+ };
2973
+ _init23 = __decoratorStart(_a23);
2974
+ GIAIValidatorProxy = __decorateElement(_init23, 0, "GIAIValidatorProxy", _GIAIValidatorProxy_decorators, GIAIValidatorProxy);
2975
+ __runInitializers(_init23, 1, GIAIValidatorProxy);
2976
+ var _GSRNValidatorProxy_decorators, _init24, _a24;
2977
+ _GSRNValidatorProxy_decorators = [proxy.describeClass(false, {
2978
+ namespace: "GS1",
2979
+ methodInfix: "GSRN"
2980
+ })];
2981
+ var GSRNValidatorProxy = class extends (_a24 = NonSerializableNumericIdentifierValidatorProxy) {
2754
2982
  constructor(appExtension) {
2755
- super(appExtension, IdentifierValidators.GSRN);
2756
- }
2757
- };
2758
- GSRNValidatorProxy = __decorateClass([
2759
- ProxyClass({
2760
- namespace: "GS1",
2761
- methodInfix: "GSRN"
2762
- })
2763
- ], GSRNValidatorProxy);
2764
- var GDTIValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
2983
+ super(appExtension, IdentifierValidators2.GSRN);
2984
+ }
2985
+ };
2986
+ _init24 = __decoratorStart(_a24);
2987
+ GSRNValidatorProxy = __decorateElement(_init24, 0, "GSRNValidatorProxy", _GSRNValidatorProxy_decorators, GSRNValidatorProxy);
2988
+ __runInitializers(_init24, 1, GSRNValidatorProxy);
2989
+ var _GDTIValidatorProxy_decorators, _init25, _a25;
2990
+ _GDTIValidatorProxy_decorators = [proxy.describeClass(false, {
2991
+ namespace: "GS1",
2992
+ methodInfix: "GDTI"
2993
+ })];
2994
+ var GDTIValidatorProxy = class extends (_a25 = SerializableNumericIdentifierValidatorProxy) {
2765
2995
  constructor(appExtension) {
2766
- super(appExtension, IdentifierValidators.GDTI);
2767
- }
2768
- };
2769
- GDTIValidatorProxy = __decorateClass([
2770
- ProxyClass({
2771
- namespace: "GS1",
2772
- methodInfix: "GDTI"
2773
- })
2774
- ], GDTIValidatorProxy);
2775
- var GINCValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
2996
+ super(appExtension, IdentifierValidators2.GDTI);
2997
+ }
2998
+ };
2999
+ _init25 = __decoratorStart(_a25);
3000
+ GDTIValidatorProxy = __decorateElement(_init25, 0, "GDTIValidatorProxy", _GDTIValidatorProxy_decorators, GDTIValidatorProxy);
3001
+ __runInitializers(_init25, 1, GDTIValidatorProxy);
3002
+ var _GINCValidatorProxy_decorators, _init26, _a26;
3003
+ _GINCValidatorProxy_decorators = [proxy.describeClass(false, {
3004
+ namespace: "GS1",
3005
+ methodInfix: "GINC"
3006
+ })];
3007
+ var GINCValidatorProxy = class extends (_a26 = NonNumericIdentifierValidatorProxy) {
2776
3008
  constructor(appExtension) {
2777
- super(appExtension, IdentifierValidators.GINC);
2778
- }
2779
- };
2780
- GINCValidatorProxy = __decorateClass([
2781
- ProxyClass({
2782
- namespace: "GS1",
2783
- methodInfix: "GINC"
2784
- })
2785
- ], GINCValidatorProxy);
2786
- var GSINValidatorProxy = class extends NonSerializableNumericIdentifierValidatorProxy {
3009
+ super(appExtension, IdentifierValidators2.GINC);
3010
+ }
3011
+ };
3012
+ _init26 = __decoratorStart(_a26);
3013
+ GINCValidatorProxy = __decorateElement(_init26, 0, "GINCValidatorProxy", _GINCValidatorProxy_decorators, GINCValidatorProxy);
3014
+ __runInitializers(_init26, 1, GINCValidatorProxy);
3015
+ var _GSINValidatorProxy_decorators, _init27, _a27;
3016
+ _GSINValidatorProxy_decorators = [proxy.describeClass(false, {
3017
+ namespace: "GS1",
3018
+ methodInfix: "GSIN"
3019
+ })];
3020
+ var GSINValidatorProxy = class extends (_a27 = NonSerializableNumericIdentifierValidatorProxy) {
2787
3021
  constructor(appExtension) {
2788
- super(appExtension, IdentifierValidators.GSIN);
2789
- }
2790
- };
2791
- GSINValidatorProxy = __decorateClass([
2792
- ProxyClass({
2793
- namespace: "GS1",
2794
- methodInfix: "GSIN"
2795
- })
2796
- ], GSINValidatorProxy);
2797
- var GCNValidatorProxy = class extends SerializableNumericIdentifierValidatorProxy {
3022
+ super(appExtension, IdentifierValidators2.GSIN);
3023
+ }
3024
+ };
3025
+ _init27 = __decoratorStart(_a27);
3026
+ GSINValidatorProxy = __decorateElement(_init27, 0, "GSINValidatorProxy", _GSINValidatorProxy_decorators, GSINValidatorProxy);
3027
+ __runInitializers(_init27, 1, GSINValidatorProxy);
3028
+ var _GCNValidatorProxy_decorators, _init28, _a28;
3029
+ _GCNValidatorProxy_decorators = [proxy.describeClass(false, {
3030
+ namespace: "GS1",
3031
+ methodInfix: "GCN"
3032
+ })];
3033
+ var GCNValidatorProxy = class extends (_a28 = SerializableNumericIdentifierValidatorProxy) {
2798
3034
  constructor(appExtension) {
2799
- super(appExtension, IdentifierValidators.GCN);
2800
- }
2801
- };
2802
- GCNValidatorProxy = __decorateClass([
2803
- ProxyClass({
2804
- namespace: "GS1",
2805
- methodInfix: "GCN"
2806
- })
2807
- ], GCNValidatorProxy);
2808
- var CPIDValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
3035
+ super(appExtension, IdentifierValidators2.GCN);
3036
+ }
3037
+ };
3038
+ _init28 = __decoratorStart(_a28);
3039
+ GCNValidatorProxy = __decorateElement(_init28, 0, "GCNValidatorProxy", _GCNValidatorProxy_decorators, GCNValidatorProxy);
3040
+ __runInitializers(_init28, 1, GCNValidatorProxy);
3041
+ var _CPIDValidatorProxy_decorators, _init29, _a29;
3042
+ _CPIDValidatorProxy_decorators = [proxy.describeClass(false, {
3043
+ namespace: "GS1",
3044
+ methodInfix: "CPID"
3045
+ })];
3046
+ var CPIDValidatorProxy = class extends (_a29 = NonNumericIdentifierValidatorProxy) {
2809
3047
  constructor(appExtension) {
2810
- super(appExtension, IdentifierValidators.CPID);
2811
- }
2812
- };
2813
- CPIDValidatorProxy = __decorateClass([
2814
- ProxyClass({
2815
- namespace: "GS1",
2816
- methodInfix: "CPID"
2817
- })
2818
- ], CPIDValidatorProxy);
2819
- var GMNValidatorProxy = class extends NonNumericIdentifierValidatorProxy {
3048
+ super(appExtension, IdentifierValidators2.CPID);
3049
+ }
3050
+ };
3051
+ _init29 = __decoratorStart(_a29);
3052
+ CPIDValidatorProxy = __decorateElement(_init29, 0, "CPIDValidatorProxy", _CPIDValidatorProxy_decorators, CPIDValidatorProxy);
3053
+ __runInitializers(_init29, 1, CPIDValidatorProxy);
3054
+ var _GMNValidatorProxy_decorators, _init30, _a30;
3055
+ _GMNValidatorProxy_decorators = [proxy.describeClass(false, {
3056
+ namespace: "GS1",
3057
+ methodInfix: "GMN"
3058
+ })];
3059
+ var GMNValidatorProxy = class extends (_a30 = NonNumericIdentifierValidatorProxy) {
2820
3060
  constructor(appExtension) {
2821
- super(appExtension, IdentifierValidators.GMN);
3061
+ super(appExtension, IdentifierValidators2.GMN);
2822
3062
  }
2823
3063
  };
2824
- GMNValidatorProxy = __decorateClass([
2825
- ProxyClass({
2826
- namespace: "GS1",
2827
- methodInfix: "GMN"
2828
- })
2829
- ], GMNValidatorProxy);
3064
+ _init30 = __decoratorStart(_a30);
3065
+ GMNValidatorProxy = __decorateElement(_init30, 0, "GMNValidatorProxy", _GMNValidatorProxy_decorators, GMNValidatorProxy);
3066
+ __runInitializers(_init30, 1, GMNValidatorProxy);
3067
+
3068
+ // src/gs1/prefix-manager-proxy.ts
2830
3069
  var prefixParameterDescriptor = {
2831
3070
  name: "prefix",
2832
3071
  type: Types.String,
@@ -2845,6 +3084,41 @@ var tweakFactorParameterDescriptor = {
2845
3084
  isMatrix: false,
2846
3085
  isRequired: false
2847
3086
  };
3087
+ var _definePrefix_dec, _a31, _PrefixManagerProxy_decorators, _init31;
3088
+ _PrefixManagerProxy_decorators = [proxy.describeClass(false, {
3089
+ namespace: "GS1"
3090
+ })];
3091
+ var PrefixManagerProxy = class extends (_a31 = LibProxy, _definePrefix_dec = [proxy.describeMethod({
3092
+ type: Types.Any,
3093
+ isMatrix: true,
3094
+ parameterDescriptors: [prefixParameterDescriptor, prefixTypeParameterDescriptor, tweakFactorParameterDescriptor]
3095
+ })], _a31) {
3096
+ constructor() {
3097
+ super(...arguments);
3098
+ __runInitializers(_init31, 5, this);
3099
+ }
3100
+ definePrefix(prefix, prefixType, tweakFactor) {
3101
+ return [[prefix, prefixType, tweakFactor]];
3102
+ }
3103
+ };
3104
+ _init31 = __decoratorStart(_a31);
3105
+ __decorateElement(_init31, 1, "definePrefix", _definePrefix_dec, PrefixManagerProxy);
3106
+ PrefixManagerProxy = __decorateElement(_init31, 0, "PrefixManagerProxy", _PrefixManagerProxy_decorators, PrefixManagerProxy);
3107
+ __runInitializers(_init31, 1, PrefixManagerProxy);
3108
+
3109
+ // src/gs1/gtin-creator-proxy.ts
3110
+ import { GTINCreator } from "@aidc-toolkit/gs1";
3111
+
3112
+ // src/gs1/identifier-creator-proxy.ts
3113
+ import { isNullish as isNullish2 } from "@aidc-toolkit/core";
3114
+ import {
3115
+ PrefixManager,
3116
+ PrefixTypes,
3117
+ PrefixValidator
3118
+ } from "@aidc-toolkit/gs1";
3119
+ import { Sequence as Sequence3 } from "@aidc-toolkit/utility";
3120
+
3121
+ // src/gs1/prefix-definition-descriptor.ts
2848
3122
  var prefixDefinitionParameterDescriptor = {
2849
3123
  name: "prefixDefinition",
2850
3124
  type: Types.Any,
@@ -2859,25 +3133,8 @@ var prefixDefinitionAnyParameterDescriptor = {
2859
3133
  extendsDescriptor: prefixDefinitionParameterDescriptor,
2860
3134
  name: "prefixDefinitionAny"
2861
3135
  };
2862
- var PrefixManagerProxy = class extends LibProxy {
2863
- definePrefix(prefix, prefixType, tweakFactor) {
2864
- return [[prefix, prefixType, tweakFactor]];
2865
- }
2866
- };
2867
- __decorateClass([
2868
- ProxyMethod({
2869
- type: Types.Any,
2870
- isMatrix: true
2871
- }),
2872
- __decorateParam(0, ProxyParameter(prefixParameterDescriptor)),
2873
- __decorateParam(1, ProxyParameter(prefixTypeParameterDescriptor)),
2874
- __decorateParam(2, ProxyParameter(tweakFactorParameterDescriptor))
2875
- ], PrefixManagerProxy.prototype, "definePrefix", 1);
2876
- PrefixManagerProxy = __decorateClass([
2877
- ProxyClass({
2878
- namespace: "GS1"
2879
- })
2880
- ], PrefixManagerProxy);
3136
+
3137
+ // src/gs1/identifier-creator-proxy.ts
2881
3138
  var IdentifierCreatorProxy = class _IdentifierCreatorProxy extends LibProxy {
2882
3139
  static #PREFIX_TYPES = [PrefixTypes.GS1CompanyPrefix, PrefixTypes.UPCCompanyPrefix, PrefixTypes.GS18Prefix];
2883
3140
  #getCreator;
@@ -2934,7 +3191,28 @@ var sparseParameterDescriptor = {
2934
3191
  isMatrix: false,
2935
3192
  isRequired: false
2936
3193
  };
2937
- var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
3194
+ var _createAll_dec, _createSequence_dec2, _create_dec2, _a32, _NumericIdentifierCreatorProxy_decorators, _init32;
3195
+ _NumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3196
+ namespace: "GS1"
3197
+ })];
3198
+ var NumericIdentifierCreatorProxy = class extends (_a32 = IdentifierCreatorProxy, _create_dec2 = [proxy.describeMethod({
3199
+ type: Types.String,
3200
+ isMatrix: true,
3201
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3202
+ })], _createSequence_dec2 = [proxy.describeMethod({
3203
+ infixBefore: "Sequence",
3204
+ type: Types.String,
3205
+ isMatrix: true,
3206
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, sparseParameterDescriptor]
3207
+ })], _createAll_dec = [proxy.describeMethod({
3208
+ type: Types.String,
3209
+ isMatrix: true,
3210
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor]
3211
+ })], _a32) {
3212
+ constructor() {
3213
+ super(...arguments);
3214
+ __runInitializers(_init32, 5, this);
3215
+ }
2938
3216
  create(prefixDefinition, matrixValues, sparse) {
2939
3217
  const creator = this.getCreator(prefixDefinition);
2940
3218
  const sparseOrUndefined = sparse ?? void 0;
@@ -2950,33 +3228,12 @@ var NumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
2950
3228
  return LibProxy.matrixResult(creator.createAll());
2951
3229
  }
2952
3230
  };
2953
- __decorateClass([
2954
- ProxyMethod({
2955
- type: Types.String,
2956
- isMatrix: true
2957
- }),
2958
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2959
- __decorateParam(1, ProxyParameter(valueParameterDescriptor)),
2960
- __decorateParam(2, ProxyParameter(sparseParameterDescriptor))
2961
- ], NumericIdentifierCreatorProxy.prototype, "create", 1);
2962
- __decorateClass([
2963
- ProxyMethod({
2964
- infixBefore: "Sequence",
2965
- type: Types.String,
2966
- isMatrix: true
2967
- }),
2968
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
2969
- __decorateParam(1, ProxyParameter(startValueParameterDescriptor)),
2970
- __decorateParam(2, ProxyParameter(countParameterDescriptor)),
2971
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
2972
- ], NumericIdentifierCreatorProxy.prototype, "createSequence", 1);
2973
- __decorateClass([
2974
- ProxyMethod({
2975
- type: Types.String,
2976
- isMatrix: true
2977
- }),
2978
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor))
2979
- ], NumericIdentifierCreatorProxy.prototype, "createAll", 1);
3231
+ _init32 = __decoratorStart(_a32);
3232
+ __decorateElement(_init32, 1, "create", _create_dec2, NumericIdentifierCreatorProxy);
3233
+ __decorateElement(_init32, 1, "createSequence", _createSequence_dec2, NumericIdentifierCreatorProxy);
3234
+ __decorateElement(_init32, 1, "createAll", _createAll_dec, NumericIdentifierCreatorProxy);
3235
+ NumericIdentifierCreatorProxy = __decorateElement(_init32, 0, "NumericIdentifierCreatorProxy", _NumericIdentifierCreatorProxy_decorators, NumericIdentifierCreatorProxy);
3236
+ __runInitializers(_init32, 1, NumericIdentifierCreatorProxy);
2980
3237
  var NonGTINNumericIdentifierCreatorProxy = class extends NumericIdentifierCreatorProxy {
2981
3238
  };
2982
3239
  var NonSerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
@@ -2996,7 +3253,23 @@ var serialComponentParameterDescriptor = {
2996
3253
  isMatrix: true,
2997
3254
  isRequired: true
2998
3255
  };
2999
- var SerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIdentifierCreatorProxy {
3256
+ var _concatenate_dec, _createSerialized_dec, _a33, _SerializableNumericIdentifierCreatorProxy_decorators, _init33;
3257
+ _SerializableNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3258
+ namespace: "GS1"
3259
+ })];
3260
+ var SerializableNumericIdentifierCreatorProxy = class extends (_a33 = NonGTINNumericIdentifierCreatorProxy, _createSerialized_dec = [proxy.describeMethod({
3261
+ type: Types.String,
3262
+ isMatrix: true,
3263
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, singleValueParameterDescriptor, serialComponentParameterDescriptor, sparseParameterDescriptor]
3264
+ })], _concatenate_dec = [proxy.describeMethod({
3265
+ type: Types.String,
3266
+ isMatrix: true,
3267
+ parameterDescriptors: [baseIdentifierParameterDescriptor, serialComponentParameterDescriptor]
3268
+ })], _a33) {
3269
+ constructor() {
3270
+ super(...arguments);
3271
+ __runInitializers(_init33, 5, this);
3272
+ }
3000
3273
  createSerialized(prefixDefinition, value, matrixSerialComponents, sparse) {
3001
3274
  const creator = this.getCreator(prefixDefinition);
3002
3275
  const sparseOrUndefined = sparse ?? void 0;
@@ -3007,47 +3280,66 @@ var SerializableNumericIdentifierCreatorProxy = class extends NonGTINNumericIden
3007
3280
  return this.mapMatrix(matrixSerialComponents, (serialComponent) => creator.concatenate(baseIdentifier, serialComponent));
3008
3281
  }
3009
3282
  };
3010
- __decorateClass([
3011
- ProxyMethod({
3012
- type: Types.String,
3013
- isMatrix: true
3014
- }),
3015
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3016
- __decorateParam(1, ProxyParameter(singleValueParameterDescriptor)),
3017
- __decorateParam(2, ProxyParameter(serialComponentParameterDescriptor)),
3018
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3019
- ], SerializableNumericIdentifierCreatorProxy.prototype, "createSerialized", 1);
3020
- __decorateClass([
3021
- ProxyMethod({
3022
- type: Types.String,
3023
- isMatrix: true
3024
- }),
3025
- __decorateParam(0, ProxyParameter(baseIdentifierParameterDescriptor)),
3026
- __decorateParam(1, ProxyParameter(serialComponentParameterDescriptor))
3027
- ], SerializableNumericIdentifierCreatorProxy.prototype, "concatenate", 1);
3283
+ _init33 = __decoratorStart(_a33);
3284
+ __decorateElement(_init33, 1, "createSerialized", _createSerialized_dec, SerializableNumericIdentifierCreatorProxy);
3285
+ __decorateElement(_init33, 1, "concatenate", _concatenate_dec, SerializableNumericIdentifierCreatorProxy);
3286
+ SerializableNumericIdentifierCreatorProxy = __decorateElement(_init33, 0, "SerializableNumericIdentifierCreatorProxy", _SerializableNumericIdentifierCreatorProxy_decorators, SerializableNumericIdentifierCreatorProxy);
3287
+ __runInitializers(_init33, 1, SerializableNumericIdentifierCreatorProxy);
3028
3288
  var referenceParameterDescriptor = {
3029
3289
  name: "reference",
3030
3290
  type: Types.String,
3031
3291
  isMatrix: true,
3032
3292
  isRequired: true
3033
3293
  };
3034
- var NonNumericIdentifierCreatorProxy = class extends IdentifierCreatorProxy {
3294
+ var _create_dec3, _a34, _NonNumericIdentifierCreatorProxy_decorators, _init34;
3295
+ _NonNumericIdentifierCreatorProxy_decorators = [proxy.describeClass(true, {
3296
+ namespace: "GS1"
3297
+ })];
3298
+ var NonNumericIdentifierCreatorProxy = class extends (_a34 = IdentifierCreatorProxy, _create_dec3 = [proxy.describeMethod({
3299
+ type: Types.String,
3300
+ isMatrix: true,
3301
+ parameterDescriptors: [prefixDefinitionGS1UPCParameterDescriptor, referenceParameterDescriptor]
3302
+ })], _a34) {
3303
+ constructor() {
3304
+ super(...arguments);
3305
+ __runInitializers(_init34, 5, this);
3306
+ }
3035
3307
  create(prefixDefinition, matrixReferences) {
3036
3308
  const creator = this.getCreator(prefixDefinition);
3037
3309
  return this.mapMatrix(matrixReferences, (reference) => creator.create(reference));
3038
3310
  }
3039
3311
  };
3040
- __decorateClass([
3041
- ProxyMethod({
3042
- type: Types.String,
3043
- isMatrix: true
3044
- }),
3045
- __decorateParam(0, ProxyParameter(prefixDefinitionGS1UPCParameterDescriptor)),
3046
- __decorateParam(1, ProxyParameter(referenceParameterDescriptor))
3047
- ], NonNumericIdentifierCreatorProxy.prototype, "create", 1);
3048
- var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
3312
+ _init34 = __decoratorStart(_a34);
3313
+ __decorateElement(_init34, 1, "create", _create_dec3, NonNumericIdentifierCreatorProxy);
3314
+ NonNumericIdentifierCreatorProxy = __decorateElement(_init34, 0, "NonNumericIdentifierCreatorProxy", _NonNumericIdentifierCreatorProxy_decorators, NonNumericIdentifierCreatorProxy);
3315
+ __runInitializers(_init34, 1, NonNumericIdentifierCreatorProxy);
3316
+
3317
+ // src/gs1/gtin-creator-proxy.ts
3318
+ var _createVariableMeasureRCN_dec, _createGTIN14_dec, _a35, _GTINCreatorProxy_decorators, _init35;
3319
+ _GTINCreatorProxy_decorators = [proxy.describeClass(false, {
3320
+ namespace: "GS1",
3321
+ methodInfix: "GTIN",
3322
+ replaceParameterDescriptors: [
3323
+ {
3324
+ name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3325
+ replacement: prefixDefinitionAnyParameterDescriptor
3326
+ }
3327
+ ]
3328
+ })];
3329
+ var GTINCreatorProxy = class extends (_a35 = NumericIdentifierCreatorProxy, _createGTIN14_dec = [proxy.describeMethod({
3330
+ type: Types.String,
3331
+ isMatrix: true,
3332
+ ignoreInfix: true,
3333
+ parameterDescriptors: [indicatorDigitParameterDescriptor, prefixDefinitionAnyParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
3334
+ })], _createVariableMeasureRCN_dec = [proxy.describeMethod({
3335
+ type: Types.String,
3336
+ isMatrix: true,
3337
+ ignoreInfix: true,
3338
+ parameterDescriptors: [rcnFormatParameterDescriptor, rcnItemReferenceParameterDescriptor, rcnPriceOrWeightParameterDescriptor]
3339
+ })], _a35) {
3049
3340
  constructor(appExtension) {
3050
3341
  super(appExtension, (prefixManager) => prefixManager.gtinCreator);
3342
+ __runInitializers(_init35, 5, this);
3051
3343
  }
3052
3344
  createGTIN14(indicatorDigit, prefixDefinition, matrixValues, sparse) {
3053
3345
  const creator = this.getCreator(prefixDefinition);
@@ -3058,160 +3350,156 @@ var GTINCreatorProxy = class extends NumericIdentifierCreatorProxy {
3058
3350
  return this.mapMatrix(matrixPricesOrWeights, (priceOrWeight) => GTINCreator.createVariableMeasureRCN(format, itemReference, priceOrWeight));
3059
3351
  }
3060
3352
  };
3061
- __decorateClass([
3062
- ProxyMethod({
3063
- type: Types.String,
3064
- isMatrix: true,
3065
- ignoreInfix: true
3066
- }),
3067
- __decorateParam(0, ProxyParameter(indicatorDigitParameterDescriptor)),
3068
- __decorateParam(1, ProxyParameter(prefixDefinitionAnyParameterDescriptor)),
3069
- __decorateParam(2, ProxyParameter(valueParameterDescriptor)),
3070
- __decorateParam(3, ProxyParameter(sparseParameterDescriptor))
3071
- ], GTINCreatorProxy.prototype, "createGTIN14", 1);
3072
- __decorateClass([
3073
- ProxyMethod({
3074
- type: Types.String,
3075
- isMatrix: true,
3076
- ignoreInfix: true
3077
- }),
3078
- __decorateParam(0, ProxyParameter(rcnFormatParameterDescriptor)),
3079
- __decorateParam(1, ProxyParameter(rcnItemReferenceParameterDescriptor)),
3080
- __decorateParam(2, ProxyParameter(rcnPriceOrWeightParameterDescriptor))
3081
- ], GTINCreatorProxy.prototype, "createVariableMeasureRCN", 1);
3082
- GTINCreatorProxy = __decorateClass([
3083
- ProxyClass({
3084
- namespace: "GS1",
3085
- methodInfix: "GTIN",
3086
- replaceParameterDescriptors: [
3087
- {
3088
- name: expandParameterDescriptor(prefixDefinitionGS1UPCParameterDescriptor).name,
3089
- replacement: prefixDefinitionAnyParameterDescriptor
3090
- }
3091
- ]
3092
- })
3093
- ], GTINCreatorProxy);
3094
- var GLNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3353
+ _init35 = __decoratorStart(_a35);
3354
+ __decorateElement(_init35, 1, "createGTIN14", _createGTIN14_dec, GTINCreatorProxy);
3355
+ __decorateElement(_init35, 1, "createVariableMeasureRCN", _createVariableMeasureRCN_dec, GTINCreatorProxy);
3356
+ GTINCreatorProxy = __decorateElement(_init35, 0, "GTINCreatorProxy", _GTINCreatorProxy_decorators, GTINCreatorProxy);
3357
+ __runInitializers(_init35, 1, GTINCreatorProxy);
3358
+
3359
+ // src/gs1/non-gtin-creator-proxy.ts
3360
+ var _GLNCreatorProxy_decorators, _init36, _a36;
3361
+ _GLNCreatorProxy_decorators = [proxy.describeClass(false, {
3362
+ namespace: "GS1",
3363
+ methodInfix: "GLN"
3364
+ })];
3365
+ var GLNCreatorProxy = class extends (_a36 = NonSerializableNumericIdentifierCreatorProxy) {
3095
3366
  constructor(appExtension) {
3096
3367
  super(appExtension, (prefixManager) => prefixManager.glnCreator);
3097
3368
  }
3098
3369
  };
3099
- GLNCreatorProxy = __decorateClass([
3100
- ProxyClass({
3101
- namespace: "GS1",
3102
- methodInfix: "GLN"
3103
- })
3104
- ], GLNCreatorProxy);
3105
- var SSCCCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3370
+ _init36 = __decoratorStart(_a36);
3371
+ GLNCreatorProxy = __decorateElement(_init36, 0, "GLNCreatorProxy", _GLNCreatorProxy_decorators, GLNCreatorProxy);
3372
+ __runInitializers(_init36, 1, GLNCreatorProxy);
3373
+ var _SSCCCreatorProxy_decorators, _init37, _a37;
3374
+ _SSCCCreatorProxy_decorators = [proxy.describeClass(false, {
3375
+ namespace: "GS1",
3376
+ methodInfix: "SSCC"
3377
+ })];
3378
+ var SSCCCreatorProxy = class extends (_a37 = NonSerializableNumericIdentifierCreatorProxy) {
3106
3379
  constructor(appExtension) {
3107
3380
  super(appExtension, (prefixManager) => prefixManager.ssccCreator);
3108
3381
  }
3109
3382
  };
3110
- SSCCCreatorProxy = __decorateClass([
3111
- ProxyClass({
3112
- namespace: "GS1",
3113
- methodInfix: "SSCC"
3114
- })
3115
- ], SSCCCreatorProxy);
3116
- var GRAICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3383
+ _init37 = __decoratorStart(_a37);
3384
+ SSCCCreatorProxy = __decorateElement(_init37, 0, "SSCCCreatorProxy", _SSCCCreatorProxy_decorators, SSCCCreatorProxy);
3385
+ __runInitializers(_init37, 1, SSCCCreatorProxy);
3386
+ var _GRAICreatorProxy_decorators, _init38, _a38;
3387
+ _GRAICreatorProxy_decorators = [proxy.describeClass(false, {
3388
+ namespace: "GS1",
3389
+ methodInfix: "GRAI"
3390
+ })];
3391
+ var GRAICreatorProxy = class extends (_a38 = SerializableNumericIdentifierCreatorProxy) {
3117
3392
  constructor(appExtension) {
3118
3393
  super(appExtension, (prefixManager) => prefixManager.graiCreator);
3119
3394
  }
3120
3395
  };
3121
- GRAICreatorProxy = __decorateClass([
3122
- ProxyClass({
3123
- namespace: "GS1",
3124
- methodInfix: "GRAI"
3125
- })
3126
- ], GRAICreatorProxy);
3127
- var GIAICreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3396
+ _init38 = __decoratorStart(_a38);
3397
+ GRAICreatorProxy = __decorateElement(_init38, 0, "GRAICreatorProxy", _GRAICreatorProxy_decorators, GRAICreatorProxy);
3398
+ __runInitializers(_init38, 1, GRAICreatorProxy);
3399
+ var _GIAICreatorProxy_decorators, _init39, _a39;
3400
+ _GIAICreatorProxy_decorators = [proxy.describeClass(false, {
3401
+ namespace: "GS1",
3402
+ methodInfix: "GIAI"
3403
+ })];
3404
+ var GIAICreatorProxy = class extends (_a39 = NonNumericIdentifierCreatorProxy) {
3128
3405
  constructor(appExtension) {
3129
3406
  super(appExtension, (prefixManager) => prefixManager.giaiCreator);
3130
3407
  }
3131
3408
  };
3132
- GIAICreatorProxy = __decorateClass([
3133
- ProxyClass({
3134
- namespace: "GS1",
3135
- methodInfix: "GIAI"
3136
- })
3137
- ], GIAICreatorProxy);
3138
- var GSRNCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3409
+ _init39 = __decoratorStart(_a39);
3410
+ GIAICreatorProxy = __decorateElement(_init39, 0, "GIAICreatorProxy", _GIAICreatorProxy_decorators, GIAICreatorProxy);
3411
+ __runInitializers(_init39, 1, GIAICreatorProxy);
3412
+ var _GSRNCreatorProxy_decorators, _init40, _a40;
3413
+ _GSRNCreatorProxy_decorators = [proxy.describeClass(false, {
3414
+ namespace: "GS1",
3415
+ methodInfix: "GSRN"
3416
+ })];
3417
+ var GSRNCreatorProxy = class extends (_a40 = NonSerializableNumericIdentifierCreatorProxy) {
3139
3418
  constructor(appExtension) {
3140
3419
  super(appExtension, (prefixManager) => prefixManager.gsrnCreator);
3141
3420
  }
3142
3421
  };
3143
- GSRNCreatorProxy = __decorateClass([
3144
- ProxyClass({
3145
- namespace: "GS1",
3146
- methodInfix: "GSRN"
3147
- })
3148
- ], GSRNCreatorProxy);
3149
- var GDTICreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3422
+ _init40 = __decoratorStart(_a40);
3423
+ GSRNCreatorProxy = __decorateElement(_init40, 0, "GSRNCreatorProxy", _GSRNCreatorProxy_decorators, GSRNCreatorProxy);
3424
+ __runInitializers(_init40, 1, GSRNCreatorProxy);
3425
+ var _GDTICreatorProxy_decorators, _init41, _a41;
3426
+ _GDTICreatorProxy_decorators = [proxy.describeClass(false, {
3427
+ namespace: "GS1",
3428
+ methodInfix: "GDTI"
3429
+ })];
3430
+ var GDTICreatorProxy = class extends (_a41 = SerializableNumericIdentifierCreatorProxy) {
3150
3431
  constructor(appExtension) {
3151
3432
  super(appExtension, (prefixManager) => prefixManager.gdtiCreator);
3152
3433
  }
3153
3434
  };
3154
- GDTICreatorProxy = __decorateClass([
3155
- ProxyClass({
3156
- namespace: "GS1",
3157
- methodInfix: "GDTI"
3158
- })
3159
- ], GDTICreatorProxy);
3160
- var GINCCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3435
+ _init41 = __decoratorStart(_a41);
3436
+ GDTICreatorProxy = __decorateElement(_init41, 0, "GDTICreatorProxy", _GDTICreatorProxy_decorators, GDTICreatorProxy);
3437
+ __runInitializers(_init41, 1, GDTICreatorProxy);
3438
+ var _GINCCreatorProxy_decorators, _init42, _a42;
3439
+ _GINCCreatorProxy_decorators = [proxy.describeClass(false, {
3440
+ namespace: "GS1",
3441
+ methodInfix: "GINC"
3442
+ })];
3443
+ var GINCCreatorProxy = class extends (_a42 = NonNumericIdentifierCreatorProxy) {
3161
3444
  constructor(appExtension) {
3162
3445
  super(appExtension, (prefixManager) => prefixManager.gincCreator);
3163
3446
  }
3164
3447
  };
3165
- GINCCreatorProxy = __decorateClass([
3166
- ProxyClass({
3167
- namespace: "GS1",
3168
- methodInfix: "GINC"
3169
- })
3170
- ], GINCCreatorProxy);
3171
- var GSINCreatorProxy = class extends NonSerializableNumericIdentifierCreatorProxy {
3448
+ _init42 = __decoratorStart(_a42);
3449
+ GINCCreatorProxy = __decorateElement(_init42, 0, "GINCCreatorProxy", _GINCCreatorProxy_decorators, GINCCreatorProxy);
3450
+ __runInitializers(_init42, 1, GINCCreatorProxy);
3451
+ var _GSINCreatorProxy_decorators, _init43, _a43;
3452
+ _GSINCreatorProxy_decorators = [proxy.describeClass(false, {
3453
+ namespace: "GS1",
3454
+ methodInfix: "GSIN"
3455
+ })];
3456
+ var GSINCreatorProxy = class extends (_a43 = NonSerializableNumericIdentifierCreatorProxy) {
3172
3457
  constructor(appExtension) {
3173
3458
  super(appExtension, (prefixManager) => prefixManager.gsinCreator);
3174
3459
  }
3175
3460
  };
3176
- GSINCreatorProxy = __decorateClass([
3177
- ProxyClass({
3178
- namespace: "GS1",
3179
- methodInfix: "GSIN"
3180
- })
3181
- ], GSINCreatorProxy);
3182
- var GCNCreatorProxy = class extends SerializableNumericIdentifierCreatorProxy {
3461
+ _init43 = __decoratorStart(_a43);
3462
+ GSINCreatorProxy = __decorateElement(_init43, 0, "GSINCreatorProxy", _GSINCreatorProxy_decorators, GSINCreatorProxy);
3463
+ __runInitializers(_init43, 1, GSINCreatorProxy);
3464
+ var _GCNCreatorProxy_decorators, _init44, _a44;
3465
+ _GCNCreatorProxy_decorators = [proxy.describeClass(false, {
3466
+ namespace: "GS1",
3467
+ methodInfix: "GCN"
3468
+ })];
3469
+ var GCNCreatorProxy = class extends (_a44 = SerializableNumericIdentifierCreatorProxy) {
3183
3470
  constructor(appExtension) {
3184
3471
  super(appExtension, (prefixManager) => prefixManager.gcnCreator);
3185
3472
  }
3186
3473
  };
3187
- GCNCreatorProxy = __decorateClass([
3188
- ProxyClass({
3189
- namespace: "GS1",
3190
- methodInfix: "GCN"
3191
- })
3192
- ], GCNCreatorProxy);
3193
- var CPIDCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3474
+ _init44 = __decoratorStart(_a44);
3475
+ GCNCreatorProxy = __decorateElement(_init44, 0, "GCNCreatorProxy", _GCNCreatorProxy_decorators, GCNCreatorProxy);
3476
+ __runInitializers(_init44, 1, GCNCreatorProxy);
3477
+ var _CPIDCreatorProxy_decorators, _init45, _a45;
3478
+ _CPIDCreatorProxy_decorators = [proxy.describeClass(false, {
3479
+ namespace: "GS1",
3480
+ methodInfix: "CPID"
3481
+ })];
3482
+ var CPIDCreatorProxy = class extends (_a45 = NonNumericIdentifierCreatorProxy) {
3194
3483
  constructor(appExtension) {
3195
3484
  super(appExtension, (prefixManager) => prefixManager.cpidCreator);
3196
3485
  }
3197
3486
  };
3198
- CPIDCreatorProxy = __decorateClass([
3199
- ProxyClass({
3200
- namespace: "GS1",
3201
- methodInfix: "CPID"
3202
- })
3203
- ], CPIDCreatorProxy);
3204
- var GMNCreatorProxy = class extends NonNumericIdentifierCreatorProxy {
3487
+ _init45 = __decoratorStart(_a45);
3488
+ CPIDCreatorProxy = __decorateElement(_init45, 0, "CPIDCreatorProxy", _CPIDCreatorProxy_decorators, CPIDCreatorProxy);
3489
+ __runInitializers(_init45, 1, CPIDCreatorProxy);
3490
+ var _GMNCreatorProxy_decorators, _init46, _a46;
3491
+ _GMNCreatorProxy_decorators = [proxy.describeClass(false, {
3492
+ namespace: "GS1",
3493
+ methodInfix: "GMN"
3494
+ })];
3495
+ var GMNCreatorProxy = class extends (_a46 = NonNumericIdentifierCreatorProxy) {
3205
3496
  constructor(appExtension) {
3206
3497
  super(appExtension, (prefixManager) => prefixManager.gmnCreator);
3207
3498
  }
3208
3499
  };
3209
- GMNCreatorProxy = __decorateClass([
3210
- ProxyClass({
3211
- namespace: "GS1",
3212
- methodInfix: "GMN"
3213
- })
3214
- ], GMNCreatorProxy);
3500
+ _init46 = __decoratorStart(_a46);
3501
+ GMNCreatorProxy = __decorateElement(_init46, 0, "GMNCreatorProxy", _GMNCreatorProxy_decorators, GMNCreatorProxy);
3502
+ __runInitializers(_init46, 1, GMNCreatorProxy);
3215
3503
 
3216
3504
  // src/generator/generator.ts
3217
3505
  import { I18nEnvironments } from "@aidc-toolkit/core";
@@ -3239,13 +3527,6 @@ var Generator = class _Generator {
3239
3527
  * Map of function localizations maps by namespace function name.
3240
3528
  */
3241
3529
  #functionLocalizationsMapsMap = /* @__PURE__ */ new Map();
3242
- /**
3243
- * Map of parameter localizations maps by namespace function parameter name.
3244
- */
3245
- #parameterLocalizationsMapsMap = /* @__PURE__ */ new Map();
3246
- /**
3247
- *
3248
- */
3249
3530
  /**
3250
3531
  * Constructor.
3251
3532
  *
@@ -3271,16 +3552,16 @@ var Generator = class _Generator {
3271
3552
  /**
3272
3553
  * Get function localization.
3273
3554
  *
3274
- * @param namespaceFunctionName
3275
- * Namespace function name.
3276
- *
3277
3555
  * @param locale
3278
3556
  * Locale.
3279
3557
  *
3558
+ * @param namespaceFunctionName
3559
+ * Namespace function name.
3560
+ *
3280
3561
  * @returns
3281
3562
  * Function localization.
3282
3563
  */
3283
- getFunctionLocalization(namespaceFunctionName, locale) {
3564
+ getFunctionLocalization(locale, namespaceFunctionName) {
3284
3565
  const functionLocalization = this.#functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
3285
3566
  if (functionLocalization === void 0) {
3286
3567
  throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
@@ -3290,52 +3571,56 @@ var Generator = class _Generator {
3290
3571
  /**
3291
3572
  * Get parameter localization.
3292
3573
  *
3574
+ * @param locale
3575
+ * Locale.
3576
+ *
3293
3577
  * @param namespaceFunctionName
3294
3578
  * Namespace function name.
3295
3579
  *
3296
3580
  * @param parameterName
3297
3581
  * Parameter name.
3298
3582
  *
3299
- * @param locale
3300
- * Locale.
3301
- *
3302
3583
  * @returns
3303
- * Function localization.
3584
+ * Parameter localization.
3304
3585
  */
3305
- getParameterLocalization(namespaceFunctionName, parameterName, locale) {
3306
- const parameterLocalization = this.#parameterLocalizationsMapsMap.get(`${namespaceFunctionName}.${parameterName}`)?.get(locale);
3586
+ getParameterLocalization(locale, namespaceFunctionName, parameterName) {
3587
+ const parameterLocalization = this.getFunctionLocalization(locale, namespaceFunctionName).parametersMap.get(parameterName);
3307
3588
  if (parameterLocalization === void 0) {
3308
3589
  throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
3309
3590
  }
3310
3591
  return parameterLocalization;
3311
3592
  }
3312
3593
  /**
3313
- * Generate localizations map.
3594
+ * Generate a localization.
3314
3595
  *
3315
3596
  * @template TLocalization
3316
3597
  * Localization type.
3317
3598
  *
3599
+ * @param locale
3600
+ * Locale.
3601
+ *
3318
3602
  * @param localizedKeyPrefix
3319
3603
  * Localized key prefix.
3320
3604
  *
3605
+ * @param namespacePrefix
3606
+ * Namespace prefix to be appended to name.
3607
+ *
3321
3608
  * @param localizationCallback
3322
3609
  * Callback to finalize localization.
3323
3610
  *
3324
3611
  * @returns
3325
- * Localization map.
3612
+ * Localization.
3326
3613
  */
3327
- #generateLocalizationsMap(localizedKeyPrefix, localizationCallback) {
3328
- return new Map(this.#locales.map((locale) => {
3329
- const lngOption = {
3330
- lng: locale
3331
- };
3332
- return [locale, localizationCallback(locale, {
3333
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3334
- name: i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption),
3335
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3336
- description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3337
- })];
3338
- }));
3614
+ #generateLocalization(locale, localizedKeyPrefix, namespacePrefix, localizationCallback) {
3615
+ const lngOption = {
3616
+ lng: locale
3617
+ };
3618
+ return localizationCallback(locale, {
3619
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3620
+ name: `${namespacePrefix}${i18nextAppExtension.t(`${localizedKeyPrefix}name`, lngOption)}`,
3621
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
3622
+ description: i18nextAppExtension.t(`${localizedKeyPrefix}description`, lngOption)
3623
+ });
3339
3624
  }
3340
3625
  /**
3341
3626
  * Generate by processing individual imports.
@@ -3345,64 +3630,27 @@ var Generator = class _Generator {
3345
3630
  await i18nAppExtensionInit(I18nEnvironments.CLI);
3346
3631
  this.initialize();
3347
3632
  try {
3348
- for (const classDescriptor of getClassDescriptorsMap().values()) {
3633
+ for (const [_namespaceClassName, classDescriptor] of proxy.classDescriptorsMap.entries()) {
3349
3634
  const namespace = classDescriptor.namespace;
3350
3635
  const namespacePrefix = namespace === void 0 ? "" : `${namespace}.`;
3351
- const className = classDescriptor.name;
3352
- const methodInfix = classDescriptor.methodInfix;
3353
- const namespaceClassName = `${namespacePrefix}${className}`;
3354
- const classNameMatch = /^([A-Z]+[0-9]*|[A-Z][^A-Z.]*)([A-Z][^.]*|)\.?([A-Z].*|)$/.exec(namespaceClassName);
3355
- if (classNameMatch === null) {
3356
- throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
3357
- }
3358
- const proxyObjectDescriptor = {
3359
- namespace,
3360
- className,
3361
- namespaceClassName,
3362
- classDescriptor,
3363
- objectName: `${classNameMatch[1].toLowerCase()}${classNameMatch[2]}${classNameMatch[3]}`
3364
- };
3365
- this.createProxyObject(proxyObjectDescriptor);
3636
+ const namespacePath = namespace === void 0 ? "" : `${namespace}/`;
3637
+ this.createProxyObject(classDescriptor);
3366
3638
  for (const methodDescriptor of classDescriptor.methodDescriptors) {
3367
- const methodName = methodDescriptor.name;
3368
- const infixBefore = methodDescriptor.infixBefore;
3369
- let functionName;
3370
- if (methodInfix === void 0 || methodDescriptor.ignoreInfix === true) {
3371
- functionName = methodName;
3372
- } else if (infixBefore === void 0) {
3373
- functionName = `${methodName}${methodInfix}`;
3374
- } else {
3375
- const insertIndex = methodName.indexOf(infixBefore);
3376
- if (insertIndex === -1) {
3377
- throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
3378
- }
3379
- functionName = `${methodName.substring(0, insertIndex)}${methodInfix}${methodName.substring(insertIndex)}`;
3380
- }
3381
- const namespaceFunctionName = `${namespacePrefix}${functionName}`;
3382
- const functionLocalizationsMap = this.#generateLocalizationsMap(`Functions.${namespaceFunctionName}.`, (locale, localization) => ({
3383
- ...localization,
3384
- documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale === this.defaultLocale ? "" : `${locale}/`}${_Generator.#DOCUMENTATION_PATH}${namespace === void 0 ? "" : `${namespace}/`}${localization.name}.html`
3385
- }));
3639
+ const namespaceFunctionName = methodDescriptor.namespaceFunctionName;
3640
+ const functionLocalizationsMap = new Map(this.#locales.map(
3641
+ (locale) => [locale, this.#generateLocalization(locale, `Functions.${namespaceFunctionName}.`, namespacePrefix, (locale2, localization) => ({
3642
+ ...localization,
3643
+ documentationURL: `${_Generator.#DOCUMENTATION_BASE_URL}${locale2 === this.defaultLocale ? "" : `${locale2}/`}${_Generator.#DOCUMENTATION_PATH}${namespacePath}${localization.name}.html`,
3644
+ parametersMap: new Map(methodDescriptor.parameterDescriptors.map(
3645
+ (parameterDescriptor) => (
3646
+ // eslint-disable-next-line max-nested-callbacks -- Callback is empty.
3647
+ [parameterDescriptor.name, this.#generateLocalization(locale2, `Parameters.${parameterDescriptor.name}.`, "", (_locale, localization2) => localization2)]
3648
+ )
3649
+ ))
3650
+ }))]
3651
+ ));
3386
3652
  this.#functionLocalizationsMapsMap.set(namespaceFunctionName, functionLocalizationsMap);
3387
- this.createProxyFunction({
3388
- ...proxyObjectDescriptor,
3389
- functionName,
3390
- namespaceFunctionName,
3391
- localizationsMap: functionLocalizationsMap,
3392
- proxyParameterDescriptors: methodDescriptor.parameterDescriptors.map((parameterDescriptor) => {
3393
- const expandedParameterDescriptor = expandParameterDescriptor(parameterDescriptor);
3394
- const parameterName = expandedParameterDescriptor.name;
3395
- const parameterLocalizationsMap = this.#generateLocalizationsMap(`Parameters.${parameterName}.`, (_locale, localization) => localization);
3396
- this.#parameterLocalizationsMapsMap.set(`${namespaceFunctionName}.${parameterName}`, parameterLocalizationsMap);
3397
- return {
3398
- namespace,
3399
- parameterName,
3400
- localizationsMap: parameterLocalizationsMap,
3401
- parameterDescriptor: expandedParameterDescriptor
3402
- };
3403
- }),
3404
- methodDescriptor
3405
- });
3653
+ this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);
3406
3654
  }
3407
3655
  }
3408
3656
  success = true;
@@ -3423,16 +3671,12 @@ export {
3423
3671
  HexadecimalProxy,
3424
3672
  LibProxy,
3425
3673
  NumericProxy,
3426
- ProxyClass,
3427
- ProxyMethod,
3428
- ProxyParameter,
3429
3674
  RegExpProxy,
3430
3675
  TransformerProxy,
3431
3676
  Types,
3432
3677
  appExtensionNS,
3433
3678
  appExtensionResources,
3434
3679
  expandParameterDescriptor,
3435
- getClassDescriptorsMap,
3436
3680
  i18nAppExtensionInit,
3437
3681
  i18nextAppExtension
3438
3682
  };