lakutata 2.0.54 → 2.0.56

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 (118) hide show
  1. package/com/cacher.cjs +1 -1
  2. package/com/cacher.d.ts +1 -1
  3. package/com/cacher.mjs +1 -1
  4. package/com/docker.d.ts +1 -1
  5. package/com/entrypoint.cjs +29 -11
  6. package/com/entrypoint.d.ts +11 -182
  7. package/com/entrypoint.mjs +12 -0
  8. package/decorator/asst.d.ts +1 -1
  9. package/decorator/ctrl.cjs +15 -5
  10. package/decorator/ctrl.d.ts +112 -10
  11. package/decorator/ctrl.mjs +11 -1
  12. package/decorator/di.d.ts +2 -2
  13. package/decorator/dto.d.ts +3 -3
  14. package/decorator/orm.d.ts +1 -1
  15. package/helper.cjs +13 -11
  16. package/helper.d.ts +1 -1
  17. package/helper.mjs +3 -1
  18. package/lakutata.cjs +18 -6
  19. package/lakutata.d.ts +7 -8
  20. package/lakutata.mjs +12 -0
  21. package/orm.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/src/components/cacher/Cacher.cjs +1 -1
  24. package/src/components/cacher/Cacher.mjs +1 -1
  25. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +1 -1
  26. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +1 -1
  27. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +2 -2
  28. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +2 -2
  29. package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +2 -2
  30. package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +2 -2
  31. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +2 -2
  32. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +2 -2
  33. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +2 -2
  34. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +2 -2
  35. package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +2 -2
  36. package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +2 -2
  37. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +2 -2
  38. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +2 -2
  39. package/src/components/entrypoint/Entrypoint.cjs +1074 -973
  40. package/src/components/entrypoint/Entrypoint.mjs +884 -781
  41. package/src/components/entrypoint/exceptions/AccessDenyException.cjs +35 -0
  42. package/src/components/entrypoint/exceptions/AccessDenyException.mjs +29 -0
  43. package/src/components/entrypoint/exceptions/DuplicateActionNameException.cjs +34 -0
  44. package/src/components/entrypoint/exceptions/DuplicateActionNameException.mjs +28 -0
  45. package/src/components/entrypoint/lib/AccessControl.cjs +247 -0
  46. package/src/components/entrypoint/lib/AccessControl.mjs +241 -0
  47. package/src/components/entrypoint/lib/AccessControlRule.cjs +163 -0
  48. package/src/components/entrypoint/lib/AccessControlRule.mjs +157 -0
  49. package/src/decorators/ctrl/CLIAction.cjs +17 -10
  50. package/src/decorators/ctrl/CLIAction.mjs +17 -10
  51. package/src/decorators/ctrl/HTTPAction.cjs +18 -11
  52. package/src/decorators/ctrl/HTTPAction.mjs +16 -9
  53. package/src/decorators/ctrl/ServiceAction.cjs +15 -8
  54. package/src/decorators/ctrl/ServiceAction.mjs +16 -9
  55. package/src/decorators/ctrl/http/DELETE.cjs +13 -3
  56. package/src/decorators/ctrl/http/DELETE.mjs +13 -3
  57. package/src/decorators/ctrl/http/GET.cjs +13 -3
  58. package/src/decorators/ctrl/http/GET.mjs +13 -3
  59. package/src/decorators/ctrl/http/HEAD.cjs +13 -3
  60. package/src/decorators/ctrl/http/HEAD.mjs +13 -3
  61. package/src/decorators/ctrl/http/OPTIONS.cjs +13 -3
  62. package/src/decorators/ctrl/http/OPTIONS.mjs +13 -3
  63. package/src/decorators/ctrl/http/PATCH.cjs +13 -3
  64. package/src/decorators/ctrl/http/PATCH.mjs +13 -3
  65. package/src/decorators/ctrl/http/POST.cjs +13 -3
  66. package/src/decorators/ctrl/http/POST.mjs +13 -3
  67. package/src/decorators/ctrl/http/PUT.cjs +13 -3
  68. package/src/decorators/ctrl/http/PUT.mjs +13 -3
  69. package/src/lib/base/internal/ActionOptions.cjs +79 -0
  70. package/src/lib/base/internal/ActionOptions.mjs +73 -0
  71. package/src/lib/base/internal/ControllerEntrypoint.cjs +625 -53
  72. package/src/lib/base/internal/ControllerEntrypoint.mjs +640 -68
  73. package/src/lib/base/internal/GetActionDTOAndOptions.cjs +89 -0
  74. package/src/lib/base/internal/GetActionDTOAndOptions.mjs +83 -0
  75. package/src/lib/base/internal/StringifyPattern.cjs +69 -0
  76. package/src/lib/base/internal/StringifyPattern.mjs +63 -0
  77. package/src/lib/core/Application.cjs +29 -17
  78. package/src/lib/core/Application.mjs +33 -21
  79. package/src/lib/helpers/MD5.cjs +1 -1
  80. package/src/lib/helpers/MD5.mjs +1 -1
  81. package/src/lib/helpers/SHA1.cjs +1 -1
  82. package/src/lib/helpers/SHA1.mjs +1 -1
  83. package/src/lib/helpers/SHA256.cjs +1 -1
  84. package/src/lib/helpers/SHA256.mjs +1 -1
  85. package/src/lib/helpers/SortArray.cjs +18 -201
  86. package/src/lib/helpers/SortArray.mjs +17 -200
  87. package/vendor/Package.19.cjs +85 -90
  88. package/vendor/Package.19.mjs +1 -1
  89. package/vendor/Package.3.cjs +1 -1
  90. package/vendor/Package.3.mjs +1 -1
  91. package/vendor/Package.610.cjs +85 -103
  92. package/vendor/Package.610.mjs +80 -98
  93. package/vendor/Package.611.cjs +100 -121
  94. package/vendor/Package.611.mjs +97 -120
  95. package/vendor/Package.612.cjs +196 -0
  96. package/vendor/Package.612.mjs +180 -0
  97. package/vendor/Package.64.cjs +140 -4118
  98. package/vendor/Package.64.mjs +140 -4126
  99. package/vendor/Package.65.cjs +4142 -692
  100. package/vendor/Package.65.mjs +4151 -689
  101. package/vendor/Package.66.cjs +571 -535
  102. package/vendor/Package.66.mjs +586 -528
  103. package/vendor/Package.67.cjs +633 -96
  104. package/vendor/Package.67.mjs +619 -94
  105. package/vendor/Package.68.cjs +96 -294
  106. package/vendor/Package.68.mjs +95 -295
  107. package/vendor/Package.69.cjs +297 -113
  108. package/vendor/Package.69.mjs +285 -97
  109. package/vendor/TypeDef.10.d.ts +13 -2
  110. package/vendor/TypeDef.11.d.ts +6 -5
  111. package/vendor/TypeDef.12.d.ts +104 -4
  112. package/vendor/TypeDef.13.d.ts +315 -62
  113. package/vendor/TypeDef.3.d.ts +2 -2
  114. package/vendor/TypeDef.5.d.ts +1 -1
  115. package/vendor/TypeDef.7.d.ts +19 -10
  116. package/vendor/TypeDef.8.d.ts +2 -20
  117. package/vendor/TypeDef.9.d.ts +5 -2
  118. package/vendor/TypeDef.14.d.ts +0 -72
@@ -1,14 +1,16 @@
1
- import { ObjectConstructor as e } from "../../helpers/ObjectConstructor.mjs";
1
+ import { ObjectConstructor as t } from "../../helpers/ObjectConstructor.mjs";
2
2
 
3
- import { As as t } from "../../helpers/As.mjs";
3
+ import { As as e } from "../../helpers/As.mjs";
4
4
 
5
- import { ObjectParentConstructors as o } from "../../helpers/ObjectParentConstructors.mjs";
5
+ import { ObjectParentConstructors as n } from "../../helpers/ObjectParentConstructors.mjs";
6
6
 
7
7
  import { ObjectHash as r } from "../../helpers/ObjectHash.mjs";
8
8
 
9
- import { GetObjectNestingDepth as n } from "../../helpers/GetObjectNestingDepth.mjs";
9
+ import { GetObjectNestingDepth as o } from "../../helpers/GetObjectNestingDepth.mjs";
10
10
 
11
- import { InvalidActionPatternDepthException as a } from "../../../exceptions/InvalidActionPatternDepthException.mjs";
11
+ import { InvalidActionPatternDepthException as s } from "../../../exceptions/InvalidActionPatternDepthException.mjs";
12
+
13
+ import { StringifyPattern as c } from "./StringifyPattern.mjs";
12
14
 
13
15
  import "../../helpers/ObjectParentConstructor.mjs";
14
16
 
@@ -34,108 +36,678 @@ import "./CamelCase.mjs";
34
36
 
35
37
  import "../../helpers/NoCase.mjs";
36
38
 
37
- var c;
39
+ import "../../../../vendor/Package.64.mjs";
40
+
41
+ const f = "ffffffff-ffff-ffff-ffff-ffffffffffff";
42
+
43
+ const i = "00000000-0000-0000-0000-000000000000";
44
+
45
+ const a = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
46
+
47
+ function u(t) {
48
+ return typeof t === "string" && a.test(t);
49
+ }
50
+
51
+ function l(t) {
52
+ if (!u(t)) {
53
+ throw TypeError("Invalid UUID");
54
+ }
55
+ let e;
56
+ return Uint8Array.of((e = parseInt(t.slice(0, 8), 16)) >>> 24, e >>> 16 & 255, e >>> 8 & 255, e & 255, (e = parseInt(t.slice(9, 13), 16)) >>> 8, e & 255, (e = parseInt(t.slice(14, 18), 16)) >>> 8, e & 255, (e = parseInt(t.slice(19, 23), 16)) >>> 8, e & 255, (e = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, e / 4294967296 & 255, e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, e & 255);
57
+ }
58
+
59
+ const m = [];
60
+
61
+ for (let t = 0; t < 256; ++t) {
62
+ m.push((t + 256).toString(16).slice(1));
63
+ }
64
+
65
+ function p(t, e = 0) {
66
+ return (m[t[e + 0]] + m[t[e + 1]] + m[t[e + 2]] + m[t[e + 3]] + "-" + m[t[e + 4]] + m[t[e + 5]] + "-" + m[t[e + 6]] + m[t[e + 7]] + "-" + m[t[e + 8]] + m[t[e + 9]] + "-" + m[t[e + 10]] + m[t[e + 11]] + m[t[e + 12]] + m[t[e + 13]] + m[t[e + 14]] + m[t[e + 15]]).toLowerCase();
67
+ }
68
+
69
+ function d(t, e = 0) {
70
+ const n = p(t, e);
71
+ if (!u(n)) {
72
+ throw TypeError("Stringified UUID is invalid");
73
+ }
74
+ return n;
75
+ }
76
+
77
+ let h;
78
+
79
+ const g = new Uint8Array(16);
80
+
81
+ function w() {
82
+ if (!h) {
83
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
84
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
85
+ }
86
+ h = crypto.getRandomValues.bind(crypto);
87
+ }
88
+ return h(g);
89
+ }
90
+
91
+ const y = {};
38
92
 
39
- (function(e) {
40
- e["HTTP"] = "_$APMT_HTTP";
41
- e["CLI"] = "_$APMT_CLI";
42
- e["Service"] = "_$APMT_Service";
43
- })(c || (c = {}));
93
+ function U(t, e, n) {
94
+ let r;
95
+ const o = t?._v6 ?? false;
96
+ if (t) {
97
+ const e = Object.keys(t);
98
+ if (e.length === 1 && e[0] === "_v6") {
99
+ t = undefined;
100
+ }
101
+ }
102
+ if (t) {
103
+ r = I(t.random ?? t.rng?.() ?? w(), t.msecs, t.nsecs, t.clockseq, t.node, e, n);
104
+ } else {
105
+ const t = Date.now();
106
+ const s = w();
107
+ b(y, t, s);
108
+ r = I(s, y.msecs, y.nsecs, o ? undefined : y.clockseq, o ? undefined : y.node, e, n);
109
+ }
110
+ return e ?? p(r);
111
+ }
112
+
113
+ function b(t, e, n) {
114
+ t.msecs ??= -Infinity;
115
+ t.nsecs ??= 0;
116
+ if (e === t.msecs) {
117
+ t.nsecs++;
118
+ if (t.nsecs >= 1e4) {
119
+ t.node = undefined;
120
+ t.nsecs = 0;
121
+ }
122
+ } else if (e > t.msecs) {
123
+ t.nsecs = 0;
124
+ } else if (e < t.msecs) {
125
+ t.node = undefined;
126
+ }
127
+ if (!t.node) {
128
+ t.node = n.slice(10, 16);
129
+ t.node[0] |= 1;
130
+ t.clockseq = (n[8] << 8 | n[9]) & 16383;
131
+ }
132
+ t.msecs = e;
133
+ return t;
134
+ }
135
+
136
+ function I(t, e, n, r, o, s, c = 0) {
137
+ if (t.length < 16) {
138
+ throw new Error("Random bytes length must be >= 16");
139
+ }
140
+ if (!s) {
141
+ s = new Uint8Array(16);
142
+ c = 0;
143
+ } else {
144
+ if (c < 0 || c + 16 > s.length) {
145
+ throw new RangeError(`UUID byte range ${c}:${c + 15} is out of buffer bounds`);
146
+ }
147
+ }
148
+ e ??= Date.now();
149
+ n ??= 0;
150
+ r ??= (t[8] << 8 | t[9]) & 16383;
151
+ o ??= t.slice(10, 16);
152
+ e += 122192928e5;
153
+ const f = ((e & 268435455) * 1e4 + n) % 4294967296;
154
+ s[c++] = f >>> 24 & 255;
155
+ s[c++] = f >>> 16 & 255;
156
+ s[c++] = f >>> 8 & 255;
157
+ s[c++] = f & 255;
158
+ const i = e / 4294967296 * 1e4 & 268435455;
159
+ s[c++] = i >>> 8 & 255;
160
+ s[c++] = i & 255;
161
+ s[c++] = i >>> 24 & 15 | 16;
162
+ s[c++] = i >>> 16 & 255;
163
+ s[c++] = r >>> 8 | 128;
164
+ s[c++] = r & 255;
165
+ for (let t = 0; t < 6; ++t) {
166
+ s[c++] = o[t];
167
+ }
168
+ return s;
169
+ }
170
+
171
+ function A(t) {
172
+ const e = typeof t === "string" ? l(t) : t;
173
+ const n = T(e);
174
+ return typeof t === "string" ? p(n) : n;
175
+ }
44
176
 
45
- const s = Symbol("COMPONENT.CTRL.MAP");
177
+ function T(t) {
178
+ return Uint8Array.of((t[6] & 15) << 4 | t[7] >> 4 & 15, (t[7] & 15) << 4 | (t[4] & 240) >> 4, (t[4] & 15) << 4 | (t[5] & 240) >> 4, (t[5] & 15) << 4 | (t[0] & 240) >> 4, (t[0] & 15) << 4 | (t[1] & 240) >> 4, (t[1] & 15) << 4 | (t[2] & 240) >> 4, 96 | t[2] & 15, t[3], t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]);
179
+ }
180
+
181
+ function j(t) {
182
+ const e = C(t);
183
+ const n = v(e, t.length * 8);
184
+ return M(n);
185
+ }
186
+
187
+ function M(t) {
188
+ const e = new Uint8Array(t.length * 4);
189
+ for (let n = 0; n < t.length * 4; n++) {
190
+ e[n] = t[n >> 2] >>> n % 4 * 8 & 255;
191
+ }
192
+ return e;
193
+ }
194
+
195
+ function P(t) {
196
+ return (t + 64 >>> 9 << 4) + 14 + 1;
197
+ }
198
+
199
+ function v(t, e) {
200
+ const n = new Uint32Array(P(e)).fill(0);
201
+ n.set(t);
202
+ n[e >> 5] |= 128 << e % 32;
203
+ n[n.length - 1] = e;
204
+ t = n;
205
+ let r = 1732584193;
206
+ let o = -271733879;
207
+ let s = -1732584194;
208
+ let c = 271733878;
209
+ for (let e = 0; e < t.length; e += 16) {
210
+ const n = r;
211
+ const f = o;
212
+ const i = s;
213
+ const a = c;
214
+ r = R(r, o, s, c, t[e], 7, -680876936);
215
+ c = R(c, r, o, s, t[e + 1], 12, -389564586);
216
+ s = R(s, c, r, o, t[e + 2], 17, 606105819);
217
+ o = R(o, s, c, r, t[e + 3], 22, -1044525330);
218
+ r = R(r, o, s, c, t[e + 4], 7, -176418897);
219
+ c = R(c, r, o, s, t[e + 5], 12, 1200080426);
220
+ s = R(s, c, r, o, t[e + 6], 17, -1473231341);
221
+ o = R(o, s, c, r, t[e + 7], 22, -45705983);
222
+ r = R(r, o, s, c, t[e + 8], 7, 1770035416);
223
+ c = R(c, r, o, s, t[e + 9], 12, -1958414417);
224
+ s = R(s, c, r, o, t[e + 10], 17, -42063);
225
+ o = R(o, s, c, r, t[e + 11], 22, -1990404162);
226
+ r = R(r, o, s, c, t[e + 12], 7, 1804603682);
227
+ c = R(c, r, o, s, t[e + 13], 12, -40341101);
228
+ s = R(s, c, r, o, t[e + 14], 17, -1502002290);
229
+ o = R(o, s, c, r, t[e + 15], 22, 1236535329);
230
+ r = $(r, o, s, c, t[e + 1], 5, -165796510);
231
+ c = $(c, r, o, s, t[e + 6], 9, -1069501632);
232
+ s = $(s, c, r, o, t[e + 11], 14, 643717713);
233
+ o = $(o, s, c, r, t[e], 20, -373897302);
234
+ r = $(r, o, s, c, t[e + 5], 5, -701558691);
235
+ c = $(c, r, o, s, t[e + 10], 9, 38016083);
236
+ s = $(s, c, r, o, t[e + 15], 14, -660478335);
237
+ o = $(o, s, c, r, t[e + 4], 20, -405537848);
238
+ r = $(r, o, s, c, t[e + 9], 5, 568446438);
239
+ c = $(c, r, o, s, t[e + 14], 9, -1019803690);
240
+ s = $(s, c, r, o, t[e + 3], 14, -187363961);
241
+ o = $(o, s, c, r, t[e + 8], 20, 1163531501);
242
+ r = $(r, o, s, c, t[e + 13], 5, -1444681467);
243
+ c = $(c, r, o, s, t[e + 2], 9, -51403784);
244
+ s = $(s, c, r, o, t[e + 7], 14, 1735328473);
245
+ o = $(o, s, c, r, t[e + 12], 20, -1926607734);
246
+ r = L(r, o, s, c, t[e + 5], 4, -378558);
247
+ c = L(c, r, o, s, t[e + 8], 11, -2022574463);
248
+ s = L(s, c, r, o, t[e + 11], 16, 1839030562);
249
+ o = L(o, s, c, r, t[e + 14], 23, -35309556);
250
+ r = L(r, o, s, c, t[e + 1], 4, -1530992060);
251
+ c = L(c, r, o, s, t[e + 4], 11, 1272893353);
252
+ s = L(s, c, r, o, t[e + 7], 16, -155497632);
253
+ o = L(o, s, c, r, t[e + 10], 23, -1094730640);
254
+ r = L(r, o, s, c, t[e + 13], 4, 681279174);
255
+ c = L(c, r, o, s, t[e], 11, -358537222);
256
+ s = L(s, c, r, o, t[e + 3], 16, -722521979);
257
+ o = L(o, s, c, r, t[e + 6], 23, 76029189);
258
+ r = L(r, o, s, c, t[e + 9], 4, -640364487);
259
+ c = L(c, r, o, s, t[e + 12], 11, -421815835);
260
+ s = L(s, c, r, o, t[e + 15], 16, 530742520);
261
+ o = L(o, s, c, r, t[e + 2], 23, -995338651);
262
+ r = O(r, o, s, c, t[e], 6, -198630844);
263
+ c = O(c, r, o, s, t[e + 7], 10, 1126891415);
264
+ s = O(s, c, r, o, t[e + 14], 15, -1416354905);
265
+ o = O(o, s, c, r, t[e + 5], 21, -57434055);
266
+ r = O(r, o, s, c, t[e + 12], 6, 1700485571);
267
+ c = O(c, r, o, s, t[e + 3], 10, -1894986606);
268
+ s = O(s, c, r, o, t[e + 10], 15, -1051523);
269
+ o = O(o, s, c, r, t[e + 1], 21, -2054922799);
270
+ r = O(r, o, s, c, t[e + 8], 6, 1873313359);
271
+ c = O(c, r, o, s, t[e + 15], 10, -30611744);
272
+ s = O(s, c, r, o, t[e + 6], 15, -1560198380);
273
+ o = O(o, s, c, r, t[e + 13], 21, 1309151649);
274
+ r = O(r, o, s, c, t[e + 4], 6, -145523070);
275
+ c = O(c, r, o, s, t[e + 11], 10, -1120210379);
276
+ s = O(s, c, r, o, t[e + 2], 15, 718787259);
277
+ o = O(o, s, c, r, t[e + 9], 21, -343485551);
278
+ r = E(r, n);
279
+ o = E(o, f);
280
+ s = E(s, i);
281
+ c = E(c, a);
282
+ }
283
+ return Uint32Array.of(r, o, s, c);
284
+ }
285
+
286
+ function C(t) {
287
+ if (t.length === 0) {
288
+ return new Uint32Array;
289
+ }
290
+ const e = new Uint32Array(P(t.length * 8)).fill(0);
291
+ for (let n = 0; n < t.length; n++) {
292
+ e[n >> 2] |= (t[n] & 255) << n % 4 * 8;
293
+ }
294
+ return e;
295
+ }
296
+
297
+ function E(t, e) {
298
+ const n = (t & 65535) + (e & 65535);
299
+ const r = (t >> 16) + (e >> 16) + (n >> 16);
300
+ return r << 16 | n & 65535;
301
+ }
302
+
303
+ function S(t, e) {
304
+ return t << e | t >>> 32 - e;
305
+ }
306
+
307
+ function D(t, e, n, r, o, s) {
308
+ return E(S(E(E(e, t), E(r, s)), o), n);
309
+ }
310
+
311
+ function R(t, e, n, r, o, s, c) {
312
+ return D(e & n | ~e & r, t, e, o, s, c);
313
+ }
314
+
315
+ function $(t, e, n, r, o, s, c) {
316
+ return D(e & r | n & ~r, t, e, o, s, c);
317
+ }
318
+
319
+ function L(t, e, n, r, o, s, c) {
320
+ return D(e ^ n ^ r, t, e, o, s, c);
321
+ }
322
+
323
+ function O(t, e, n, r, o, s, c) {
324
+ return D(n ^ (e | ~r), t, e, o, s, c);
325
+ }
46
326
 
47
- function m(e) {
48
- const t = n(e);
49
- if (t > 2) throw new a("The maximum nesting depth of ActionPattern objects cannot be greater than 2 levels. The current nesting depth of the object is {0} levels", [ t ]);
327
+ function _(t) {
328
+ t = unescape(encodeURIComponent(t));
329
+ const e = new Uint8Array(t.length);
330
+ for (let n = 0; n < t.length; ++n) {
331
+ e[n] = t.charCodeAt(n);
332
+ }
50
333
  return e;
51
334
  }
52
335
 
53
- function i(e, r) {
54
- const n = new Map;
55
- o(r).forEach((t => {
56
- const o = Reflect.getOwnMetadata(`${e}_MAP`, t) || new Map;
57
- o.forEach(((e, t) => n.set(t, e)));
336
+ const H = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
337
+
338
+ const k = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
339
+
340
+ function q(t, e, n, r, o, s) {
341
+ const c = typeof n === "string" ? _(n) : n;
342
+ const f = typeof r === "string" ? l(r) : r;
343
+ if (typeof r === "string") {
344
+ r = l(r);
345
+ }
346
+ if (r?.length !== 16) {
347
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
348
+ }
349
+ let i = new Uint8Array(16 + c.length);
350
+ i.set(f);
351
+ i.set(c, f.length);
352
+ i = e(i);
353
+ i[6] = i[6] & 15 | t;
354
+ i[8] = i[8] & 63 | 128;
355
+ if (o) {
356
+ s = s || 0;
357
+ for (let t = 0; t < 16; ++t) {
358
+ o[s + t] = i[t];
359
+ }
360
+ return o;
361
+ }
362
+ return p(i);
363
+ }
364
+
365
+ function N(t, e, n, r) {
366
+ return q(48, j, t, e, n, r);
367
+ }
368
+
369
+ N.DNS = H;
370
+
371
+ N.URL = k;
372
+
373
+ const x = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
374
+
375
+ const J = {
376
+ randomUUID: x
377
+ };
378
+
379
+ function V(t, e, n) {
380
+ t = t || {};
381
+ const r = t.random ?? t.rng?.() ?? w();
382
+ if (r.length < 16) {
383
+ throw new Error("Random bytes length must be >= 16");
384
+ }
385
+ r[6] = r[6] & 15 | 64;
386
+ r[8] = r[8] & 63 | 128;
387
+ if (e) {
388
+ n = n || 0;
389
+ if (n < 0 || n + 16 > e.length) {
390
+ throw new RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
391
+ }
392
+ for (let t = 0; t < 16; ++t) {
393
+ e[n + t] = r[t];
394
+ }
395
+ return e;
396
+ }
397
+ return p(r);
398
+ }
399
+
400
+ function B(t, e, n) {
401
+ if (J.randomUUID && !e && !t) {
402
+ return J.randomUUID();
403
+ }
404
+ return V(t, e, n);
405
+ }
406
+
407
+ function G(t, e, n, r) {
408
+ switch (t) {
409
+ case 0:
410
+ return e & n ^ ~e & r;
411
+
412
+ case 1:
413
+ return e ^ n ^ r;
414
+
415
+ case 2:
416
+ return e & n ^ e & r ^ n & r;
417
+
418
+ case 3:
419
+ return e ^ n ^ r;
420
+ }
421
+ }
422
+
423
+ function W(t, e) {
424
+ return t << e | t >>> 32 - e;
425
+ }
426
+
427
+ function z(t) {
428
+ const e = [ 1518500249, 1859775393, 2400959708, 3395469782 ];
429
+ const n = [ 1732584193, 4023233417, 2562383102, 271733878, 3285377520 ];
430
+ const r = new Uint8Array(t.length + 1);
431
+ r.set(t);
432
+ r[t.length] = 128;
433
+ t = r;
434
+ const o = t.length / 4 + 2;
435
+ const s = Math.ceil(o / 16);
436
+ const c = new Array(s);
437
+ for (let e = 0; e < s; ++e) {
438
+ const n = new Uint32Array(16);
439
+ for (let r = 0; r < 16; ++r) {
440
+ n[r] = t[e * 64 + r * 4] << 24 | t[e * 64 + r * 4 + 1] << 16 | t[e * 64 + r * 4 + 2] << 8 | t[e * 64 + r * 4 + 3];
441
+ }
442
+ c[e] = n;
443
+ }
444
+ c[s - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32);
445
+ c[s - 1][14] = Math.floor(c[s - 1][14]);
446
+ c[s - 1][15] = (t.length - 1) * 8 & 4294967295;
447
+ for (let t = 0; t < s; ++t) {
448
+ const r = new Uint32Array(80);
449
+ for (let e = 0; e < 16; ++e) {
450
+ r[e] = c[t][e];
451
+ }
452
+ for (let t = 16; t < 80; ++t) {
453
+ r[t] = W(r[t - 3] ^ r[t - 8] ^ r[t - 14] ^ r[t - 16], 1);
454
+ }
455
+ let o = n[0];
456
+ let s = n[1];
457
+ let f = n[2];
458
+ let i = n[3];
459
+ let a = n[4];
460
+ for (let t = 0; t < 80; ++t) {
461
+ const n = Math.floor(t / 20);
462
+ const c = W(o, 5) + G(n, s, f, i) + a + e[n] + r[t] >>> 0;
463
+ a = i;
464
+ i = f;
465
+ f = W(s, 30) >>> 0;
466
+ s = o;
467
+ o = c;
468
+ }
469
+ n[0] = n[0] + o >>> 0;
470
+ n[1] = n[1] + s >>> 0;
471
+ n[2] = n[2] + f >>> 0;
472
+ n[3] = n[3] + i >>> 0;
473
+ n[4] = n[4] + a >>> 0;
474
+ }
475
+ return Uint8Array.of(n[0] >> 24, n[0] >> 16, n[0] >> 8, n[0], n[1] >> 24, n[1] >> 16, n[1] >> 8, n[1], n[2] >> 24, n[2] >> 16, n[2] >> 8, n[2], n[3] >> 24, n[3] >> 16, n[3] >> 8, n[3], n[4] >> 24, n[4] >> 16, n[4] >> 8, n[4]);
476
+ }
477
+
478
+ function F(t, e, n, r) {
479
+ return q(80, z, t, e, n, r);
480
+ }
481
+
482
+ F.DNS = H;
483
+
484
+ F.URL = k;
485
+
486
+ function K(t, e, n) {
487
+ t ??= {};
488
+ n ??= 0;
489
+ let r = U({
490
+ ...t,
491
+ _v6: true
492
+ }, new Uint8Array(16));
493
+ r = A(r);
494
+ if (e) {
495
+ for (let t = 0; t < 16; t++) {
496
+ e[n + t] = r[t];
497
+ }
498
+ return e;
499
+ }
500
+ return p(r);
501
+ }
502
+
503
+ function Q(t) {
504
+ const e = typeof t === "string" ? l(t) : t;
505
+ const n = X(e);
506
+ return typeof t === "string" ? p(n) : n;
507
+ }
508
+
509
+ function X(t) {
510
+ return Uint8Array.of((t[3] & 15) << 4 | t[4] >> 4 & 15, (t[4] & 15) << 4 | (t[5] & 240) >> 4, (t[5] & 15) << 4 | t[6] & 15, t[7], (t[1] & 15) << 4 | (t[2] & 240) >> 4, (t[2] & 15) << 4 | (t[3] & 240) >> 4, 16 | (t[0] & 240) >> 4, (t[0] & 15) << 4 | (t[1] & 240) >> 4, t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]);
511
+ }
512
+
513
+ const Y = {};
514
+
515
+ function Z(t, e, n) {
516
+ let r;
517
+ if (t) {
518
+ r = et(t.random ?? t.rng?.() ?? w(), t.msecs, t.seq, e, n);
519
+ } else {
520
+ const t = Date.now();
521
+ const o = w();
522
+ tt(Y, t, o);
523
+ r = et(o, Y.msecs, Y.seq, e, n);
524
+ }
525
+ return e ?? p(r);
526
+ }
527
+
528
+ function tt(t, e, n) {
529
+ t.msecs ??= -Infinity;
530
+ t.seq ??= 0;
531
+ if (e > t.msecs) {
532
+ t.seq = n[6] << 23 | n[7] << 16 | n[8] << 8 | n[9];
533
+ t.msecs = e;
534
+ } else {
535
+ t.seq = t.seq + 1 | 0;
536
+ if (t.seq === 0) {
537
+ t.msecs++;
538
+ }
539
+ }
540
+ return t;
541
+ }
542
+
543
+ function et(t, e, n, r, o = 0) {
544
+ if (t.length < 16) {
545
+ throw new Error("Random bytes length must be >= 16");
546
+ }
547
+ if (!r) {
548
+ r = new Uint8Array(16);
549
+ o = 0;
550
+ } else {
551
+ if (o < 0 || o + 16 > r.length) {
552
+ throw new RangeError(`UUID byte range ${o}:${o + 15} is out of buffer bounds`);
553
+ }
554
+ }
555
+ e ??= Date.now();
556
+ n ??= t[6] * 127 << 24 | t[7] << 16 | t[8] << 8 | t[9];
557
+ r[o++] = e / 1099511627776 & 255;
558
+ r[o++] = e / 4294967296 & 255;
559
+ r[o++] = e / 16777216 & 255;
560
+ r[o++] = e / 65536 & 255;
561
+ r[o++] = e / 256 & 255;
562
+ r[o++] = e & 255;
563
+ r[o++] = 112 | n >>> 28 & 15;
564
+ r[o++] = n >>> 20 & 255;
565
+ r[o++] = 128 | n >>> 14 & 63;
566
+ r[o++] = n >>> 6 & 255;
567
+ r[o++] = n << 2 & 255 | t[10] & 3;
568
+ r[o++] = t[11];
569
+ r[o++] = t[12];
570
+ r[o++] = t[13];
571
+ r[o++] = t[14];
572
+ r[o++] = t[15];
573
+ return r;
574
+ }
575
+
576
+ function nt(t) {
577
+ if (!u(t)) {
578
+ throw TypeError("Invalid UUID");
579
+ }
580
+ return parseInt(t.slice(14, 15), 16);
581
+ }
582
+
583
+ var rt;
584
+
585
+ (function(t) {
586
+ t["HTTP"] = "_$APMT_HTTP";
587
+ t["CLI"] = "_$APMT_CLI";
588
+ t["Service"] = "_$APMT_Service";
589
+ })(rt || (rt = {}));
590
+
591
+ const ot = Symbol("COMPONENT.CTRL.MAP");
592
+
593
+ function st(n, r, o, s) {
594
+ const c = `${e(t(n)).className}:${r}`;
595
+ const f = F(`${c}:${s}`, i);
596
+ const a = o.name ? o.name : c;
597
+ const u = o.description ? o.description : "";
598
+ return {
599
+ id: f,
600
+ acl: !!o.acl,
601
+ action: c,
602
+ name: a,
603
+ description: u,
604
+ groups: o.groups ? o.groups : [],
605
+ rule: o.rule
606
+ };
607
+ }
608
+
609
+ function ct(t) {
610
+ const e = o(t);
611
+ if (e > 2) throw new s("The maximum nesting depth of ActionPattern objects cannot be greater than 2 levels. The current nesting depth of the object is {0} levels", [ e ]);
612
+ return t;
613
+ }
614
+
615
+ function ft(t, r) {
616
+ const o = new Map;
617
+ n(r).forEach((e => {
618
+ const n = Reflect.getOwnMetadata(`${t}_MAP`, e) || new Map;
619
+ n.forEach(((t, e) => o.set(e, t)));
58
620
  }));
59
- t(Reflect.getOwnMetadata(`${e}_MAP`, r) || new Map).forEach(((e, t) => n.set(t, e)));
60
- return n;
621
+ e(Reflect.getOwnMetadata(`${t}_MAP`, r) || new Map).forEach(((t, e) => o.set(e, t)));
622
+ return o;
61
623
  }
62
624
 
63
- function p(e, t, o, n) {
64
- o = m(o);
65
- const a = i(e, t);
66
- a.set(r(o), {
67
- pattern: o,
68
- details: n
625
+ function it(t, e, n, o) {
626
+ n = ct(n);
627
+ const s = ft(t, e);
628
+ s.set(r(n), {
629
+ pattern: n,
630
+ details: o
69
631
  });
70
- Reflect.defineMetadata(`${e}_MAP`, a, t);
632
+ Reflect.defineMetadata(`${t}_MAP`, s, e);
71
633
  }
72
634
 
73
- function h(e, t) {
74
- const o = Reflect.getOwnMetadata(s, e) || {
635
+ function at(t, e) {
636
+ const n = Reflect.getOwnMetadata(ot, t) || {
75
637
  CLI: new Map,
76
638
  HTTP: new Map,
77
639
  Service: new Map
78
640
  };
79
- i(c.CLI, t).forEach(((e, t) => o.CLI.set(t, e)));
80
- i(c.HTTP, t).forEach(((e, t) => o.HTTP.set(t, e)));
81
- i(c.Service, t).forEach(((e, t) => o.Service.set(t, e)));
82
- Reflect.defineMetadata(s, o, e);
641
+ ft(rt.CLI, e).forEach(((t, e) => n.CLI.set(e, t)));
642
+ ft(rt.HTTP, e).forEach(((t, e) => n.HTTP.set(e, t)));
643
+ ft(rt.Service, e).forEach(((t, e) => n.Service.set(e, t)));
644
+ Reflect.defineMetadata(ot, n, t);
83
645
  }
84
646
 
85
- function f(e) {
86
- const t = Reflect.getOwnMetadata(s, e) || {
647
+ function ut(t) {
648
+ const e = Reflect.getOwnMetadata(ot, t) || {
87
649
  CLI: new Map,
88
650
  HTTP: new Map,
89
651
  Service: new Map
90
652
  };
91
- const o = {
653
+ const n = {
92
654
  CLI: new Map,
93
655
  HTTP: new Map,
94
656
  Service: new Map
95
657
  };
96
- t.CLI.forEach((e => o.CLI.set(e.pattern, e.details)));
97
- t.HTTP.forEach((e => o.HTTP.set(e.pattern, e.details)));
98
- t.Service.forEach((e => o.Service.set(e.pattern, e.details)));
99
- return o;
658
+ e.CLI.forEach((t => n.CLI.set(t.pattern, t.details)));
659
+ e.HTTP.forEach((t => n.HTTP.set(t.pattern, t.details)));
660
+ e.Service.forEach((t => n.Service.set(t.pattern, t.details)));
661
+ return n;
100
662
  }
101
663
 
102
- function T(o, r, n, a, s) {
664
+ function lt(n, r, o, s, c, f) {
103
665
  r.forEach((r => {
104
- const m = {
105
- route: o,
666
+ const i = {
667
+ route: n,
106
668
  method: r
107
669
  };
108
- p(c.HTTP, t(e(n)), m, {
109
- pattern: m,
110
- constructor: t(e(n)),
111
- method: a,
112
- dtoConstructor: s,
113
- jsonSchema: s.toJsonSchema()
670
+ const a = st(o, s, f, n);
671
+ it(rt.HTTP, e(t(o)), i, {
672
+ ...a,
673
+ pattern: i,
674
+ constructor: e(t(o)),
675
+ method: s,
676
+ dtoConstructor: c,
677
+ jsonSchema: c.toJsonSchema(),
678
+ getActionInfo: () => a
114
679
  });
115
680
  }));
116
681
  }
117
682
 
118
- function d(o, r, n, a) {
119
- const s = {
120
- command: o
683
+ function mt(n, r, o, s, c) {
684
+ const f = {
685
+ command: n
121
686
  };
122
- p(c.CLI, t(e(r)), s, {
123
- pattern: s,
124
- constructor: t(e(r)),
125
- method: n,
126
- dtoConstructor: a,
127
- jsonSchema: a.toJsonSchema()
687
+ const i = st(r, o, c, n);
688
+ it(rt.CLI, e(t(r)), f, {
689
+ ...i,
690
+ pattern: f,
691
+ constructor: e(t(r)),
692
+ method: o,
693
+ dtoConstructor: s,
694
+ jsonSchema: s.toJsonSchema(),
695
+ getActionInfo: () => i
128
696
  });
129
697
  }
130
698
 
131
- function j(o, r, n, a) {
132
- p(c.Service, t(e(r)), o, {
133
- pattern: o,
134
- constructor: t(e(r)),
135
- method: n,
136
- dtoConstructor: a,
137
- jsonSchema: a.toJsonSchema()
699
+ function pt(n, r, o, s, f) {
700
+ const i = c(n);
701
+ const a = st(r, o, f, i);
702
+ it(rt.Service, e(t(r)), n, {
703
+ ...a,
704
+ pattern: n,
705
+ constructor: e(t(r)),
706
+ method: o,
707
+ dtoConstructor: s,
708
+ jsonSchema: s.toJsonSchema(),
709
+ getActionInfo: () => a
138
710
  });
139
711
  }
140
712
 
141
- export { c as ActionPatternManagerType, h as BindControllerToComponent, f as GetComponentControllerActionMap, d as RegisterCLIAction, p as RegisterControllerActionPattern, T as RegisterHTTPAction, j as RegisterServiceAction };
713
+ export { rt as ActionPatternManagerType, at as BindControllerToComponent, ut as GetComponentControllerActionMap, mt as RegisterCLIAction, it as RegisterControllerActionPattern, lt as RegisterHTTPAction, pt as RegisterServiceAction };