@cloudnux/aws-cloud-provider 0.1.0

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.
@@ -0,0 +1,1633 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/router/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ createRouter: () => createRouter
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+
37
+ // ../../../node_modules/lodash-es/_freeGlobal.js
38
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
39
+ var freeGlobal_default = freeGlobal;
40
+
41
+ // ../../../node_modules/lodash-es/_root.js
42
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
43
+ var root = freeGlobal_default || freeSelf || Function("return this")();
44
+ var root_default = root;
45
+
46
+ // ../../../node_modules/lodash-es/_Symbol.js
47
+ var Symbol2 = root_default.Symbol;
48
+ var Symbol_default = Symbol2;
49
+
50
+ // ../../../node_modules/lodash-es/_getRawTag.js
51
+ var objectProto = Object.prototype;
52
+ var hasOwnProperty = objectProto.hasOwnProperty;
53
+ var nativeObjectToString = objectProto.toString;
54
+ var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
55
+ function getRawTag(value) {
56
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
57
+ try {
58
+ value[symToStringTag] = void 0;
59
+ var unmasked = true;
60
+ } catch (e) {
61
+ }
62
+ var result = nativeObjectToString.call(value);
63
+ if (unmasked) {
64
+ if (isOwn) {
65
+ value[symToStringTag] = tag;
66
+ } else {
67
+ delete value[symToStringTag];
68
+ }
69
+ }
70
+ return result;
71
+ }
72
+ var getRawTag_default = getRawTag;
73
+
74
+ // ../../../node_modules/lodash-es/_objectToString.js
75
+ var objectProto2 = Object.prototype;
76
+ var nativeObjectToString2 = objectProto2.toString;
77
+ function objectToString(value) {
78
+ return nativeObjectToString2.call(value);
79
+ }
80
+ var objectToString_default = objectToString;
81
+
82
+ // ../../../node_modules/lodash-es/_baseGetTag.js
83
+ var nullTag = "[object Null]";
84
+ var undefinedTag = "[object Undefined]";
85
+ var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
86
+ function baseGetTag(value) {
87
+ if (value == null) {
88
+ return value === void 0 ? undefinedTag : nullTag;
89
+ }
90
+ return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
91
+ }
92
+ var baseGetTag_default = baseGetTag;
93
+
94
+ // ../../../node_modules/lodash-es/isObjectLike.js
95
+ function isObjectLike(value) {
96
+ return value != null && typeof value == "object";
97
+ }
98
+ var isObjectLike_default = isObjectLike;
99
+
100
+ // ../../../node_modules/lodash-es/isSymbol.js
101
+ var symbolTag = "[object Symbol]";
102
+ function isSymbol(value) {
103
+ return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
104
+ }
105
+ var isSymbol_default = isSymbol;
106
+
107
+ // ../../../node_modules/lodash-es/_arrayMap.js
108
+ function arrayMap(array2, iteratee) {
109
+ var index = -1, length = array2 == null ? 0 : array2.length, result = Array(length);
110
+ while (++index < length) {
111
+ result[index] = iteratee(array2[index], index, array2);
112
+ }
113
+ return result;
114
+ }
115
+ var arrayMap_default = arrayMap;
116
+
117
+ // ../../../node_modules/lodash-es/isArray.js
118
+ var isArray = Array.isArray;
119
+ var isArray_default = isArray;
120
+
121
+ // ../../../node_modules/lodash-es/_baseToString.js
122
+ var INFINITY = 1 / 0;
123
+ var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
124
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
125
+ function baseToString(value) {
126
+ if (typeof value == "string") {
127
+ return value;
128
+ }
129
+ if (isArray_default(value)) {
130
+ return arrayMap_default(value, baseToString) + "";
131
+ }
132
+ if (isSymbol_default(value)) {
133
+ return symbolToString ? symbolToString.call(value) : "";
134
+ }
135
+ var result = value + "";
136
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
137
+ }
138
+ var baseToString_default = baseToString;
139
+
140
+ // ../../../node_modules/lodash-es/_trimmedEndIndex.js
141
+ var reWhitespace = /\s/;
142
+ function trimmedEndIndex(string) {
143
+ var index = string.length;
144
+ while (index-- && reWhitespace.test(string.charAt(index))) {
145
+ }
146
+ return index;
147
+ }
148
+ var trimmedEndIndex_default = trimmedEndIndex;
149
+
150
+ // ../../../node_modules/lodash-es/_baseTrim.js
151
+ var reTrimStart = /^\s+/;
152
+ function baseTrim(string) {
153
+ return string ? string.slice(0, trimmedEndIndex_default(string) + 1).replace(reTrimStart, "") : string;
154
+ }
155
+ var baseTrim_default = baseTrim;
156
+
157
+ // ../../../node_modules/lodash-es/isObject.js
158
+ function isObject(value) {
159
+ var type = typeof value;
160
+ return value != null && (type == "object" || type == "function");
161
+ }
162
+ var isObject_default = isObject;
163
+
164
+ // ../../../node_modules/lodash-es/isFunction.js
165
+ var asyncTag = "[object AsyncFunction]";
166
+ var funcTag = "[object Function]";
167
+ var genTag = "[object GeneratorFunction]";
168
+ var proxyTag = "[object Proxy]";
169
+ function isFunction(value) {
170
+ if (!isObject_default(value)) {
171
+ return false;
172
+ }
173
+ var tag = baseGetTag_default(value);
174
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
175
+ }
176
+ var isFunction_default = isFunction;
177
+
178
+ // ../../../node_modules/lodash-es/_coreJsData.js
179
+ var coreJsData = root_default["__core-js_shared__"];
180
+ var coreJsData_default = coreJsData;
181
+
182
+ // ../../../node_modules/lodash-es/_isMasked.js
183
+ var maskSrcKey = function() {
184
+ var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
185
+ return uid ? "Symbol(src)_1." + uid : "";
186
+ }();
187
+ function isMasked(func) {
188
+ return !!maskSrcKey && maskSrcKey in func;
189
+ }
190
+ var isMasked_default = isMasked;
191
+
192
+ // ../../../node_modules/lodash-es/_toSource.js
193
+ var funcProto = Function.prototype;
194
+ var funcToString = funcProto.toString;
195
+ function toSource(func) {
196
+ if (func != null) {
197
+ try {
198
+ return funcToString.call(func);
199
+ } catch (e) {
200
+ }
201
+ try {
202
+ return func + "";
203
+ } catch (e) {
204
+ }
205
+ }
206
+ return "";
207
+ }
208
+ var toSource_default = toSource;
209
+
210
+ // ../../../node_modules/lodash-es/_baseIsNative.js
211
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
212
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
213
+ var funcProto2 = Function.prototype;
214
+ var objectProto3 = Object.prototype;
215
+ var funcToString2 = funcProto2.toString;
216
+ var hasOwnProperty2 = objectProto3.hasOwnProperty;
217
+ var reIsNative = RegExp(
218
+ "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
219
+ );
220
+ function baseIsNative(value) {
221
+ if (!isObject_default(value) || isMasked_default(value)) {
222
+ return false;
223
+ }
224
+ var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
225
+ return pattern.test(toSource_default(value));
226
+ }
227
+ var baseIsNative_default = baseIsNative;
228
+
229
+ // ../../../node_modules/lodash-es/_getValue.js
230
+ function getValue(object, key) {
231
+ return object == null ? void 0 : object[key];
232
+ }
233
+ var getValue_default = getValue;
234
+
235
+ // ../../../node_modules/lodash-es/_getNative.js
236
+ function getNative(object, key) {
237
+ var value = getValue_default(object, key);
238
+ return baseIsNative_default(value) ? value : void 0;
239
+ }
240
+ var getNative_default = getNative;
241
+
242
+ // ../../../node_modules/lodash-es/_baseFindIndex.js
243
+ function baseFindIndex(array2, predicate, fromIndex, fromRight) {
244
+ var length = array2.length, index = fromIndex + (fromRight ? 1 : -1);
245
+ while (fromRight ? index-- : ++index < length) {
246
+ if (predicate(array2[index], index, array2)) {
247
+ return index;
248
+ }
249
+ }
250
+ return -1;
251
+ }
252
+ var baseFindIndex_default = baseFindIndex;
253
+
254
+ // ../../../node_modules/lodash-es/_baseIsNaN.js
255
+ function baseIsNaN(value) {
256
+ return value !== value;
257
+ }
258
+ var baseIsNaN_default = baseIsNaN;
259
+
260
+ // ../../../node_modules/lodash-es/_strictIndexOf.js
261
+ function strictIndexOf(array2, value, fromIndex) {
262
+ var index = fromIndex - 1, length = array2.length;
263
+ while (++index < length) {
264
+ if (array2[index] === value) {
265
+ return index;
266
+ }
267
+ }
268
+ return -1;
269
+ }
270
+ var strictIndexOf_default = strictIndexOf;
271
+
272
+ // ../../../node_modules/lodash-es/_baseIndexOf.js
273
+ function baseIndexOf(array2, value, fromIndex) {
274
+ return value === value ? strictIndexOf_default(array2, value, fromIndex) : baseFindIndex_default(array2, baseIsNaN_default, fromIndex);
275
+ }
276
+ var baseIndexOf_default = baseIndexOf;
277
+
278
+ // ../../../node_modules/lodash-es/_isIndex.js
279
+ var MAX_SAFE_INTEGER = 9007199254740991;
280
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
281
+ function isIndex(value, length) {
282
+ var type = typeof value;
283
+ length = length == null ? MAX_SAFE_INTEGER : length;
284
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
285
+ }
286
+ var isIndex_default = isIndex;
287
+
288
+ // ../../../node_modules/lodash-es/eq.js
289
+ function eq(value, other) {
290
+ return value === other || value !== value && other !== other;
291
+ }
292
+ var eq_default = eq;
293
+
294
+ // ../../../node_modules/lodash-es/isLength.js
295
+ var MAX_SAFE_INTEGER2 = 9007199254740991;
296
+ function isLength(value) {
297
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
298
+ }
299
+ var isLength_default = isLength;
300
+
301
+ // ../../../node_modules/lodash-es/_baseIsArguments.js
302
+ var argsTag = "[object Arguments]";
303
+ function baseIsArguments(value) {
304
+ return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
305
+ }
306
+ var baseIsArguments_default = baseIsArguments;
307
+
308
+ // ../../../node_modules/lodash-es/isArguments.js
309
+ var objectProto4 = Object.prototype;
310
+ var hasOwnProperty3 = objectProto4.hasOwnProperty;
311
+ var propertyIsEnumerable = objectProto4.propertyIsEnumerable;
312
+ var isArguments = baseIsArguments_default(/* @__PURE__ */ function() {
313
+ return arguments;
314
+ }()) ? baseIsArguments_default : function(value) {
315
+ return isObjectLike_default(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
316
+ };
317
+ var isArguments_default = isArguments;
318
+
319
+ // ../../../node_modules/lodash-es/_isKey.js
320
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
321
+ var reIsPlainProp = /^\w*$/;
322
+ function isKey(value, object) {
323
+ if (isArray_default(value)) {
324
+ return false;
325
+ }
326
+ var type = typeof value;
327
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
328
+ return true;
329
+ }
330
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
331
+ }
332
+ var isKey_default = isKey;
333
+
334
+ // ../../../node_modules/lodash-es/_nativeCreate.js
335
+ var nativeCreate = getNative_default(Object, "create");
336
+ var nativeCreate_default = nativeCreate;
337
+
338
+ // ../../../node_modules/lodash-es/_hashClear.js
339
+ function hashClear() {
340
+ this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
341
+ this.size = 0;
342
+ }
343
+ var hashClear_default = hashClear;
344
+
345
+ // ../../../node_modules/lodash-es/_hashDelete.js
346
+ function hashDelete(key) {
347
+ var result = this.has(key) && delete this.__data__[key];
348
+ this.size -= result ? 1 : 0;
349
+ return result;
350
+ }
351
+ var hashDelete_default = hashDelete;
352
+
353
+ // ../../../node_modules/lodash-es/_hashGet.js
354
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
355
+ var objectProto5 = Object.prototype;
356
+ var hasOwnProperty4 = objectProto5.hasOwnProperty;
357
+ function hashGet(key) {
358
+ var data = this.__data__;
359
+ if (nativeCreate_default) {
360
+ var result = data[key];
361
+ return result === HASH_UNDEFINED ? void 0 : result;
362
+ }
363
+ return hasOwnProperty4.call(data, key) ? data[key] : void 0;
364
+ }
365
+ var hashGet_default = hashGet;
366
+
367
+ // ../../../node_modules/lodash-es/_hashHas.js
368
+ var objectProto6 = Object.prototype;
369
+ var hasOwnProperty5 = objectProto6.hasOwnProperty;
370
+ function hashHas(key) {
371
+ var data = this.__data__;
372
+ return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty5.call(data, key);
373
+ }
374
+ var hashHas_default = hashHas;
375
+
376
+ // ../../../node_modules/lodash-es/_hashSet.js
377
+ var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
378
+ function hashSet(key, value) {
379
+ var data = this.__data__;
380
+ this.size += this.has(key) ? 0 : 1;
381
+ data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
382
+ return this;
383
+ }
384
+ var hashSet_default = hashSet;
385
+
386
+ // ../../../node_modules/lodash-es/_Hash.js
387
+ function Hash(entries) {
388
+ var index = -1, length = entries == null ? 0 : entries.length;
389
+ this.clear();
390
+ while (++index < length) {
391
+ var entry = entries[index];
392
+ this.set(entry[0], entry[1]);
393
+ }
394
+ }
395
+ Hash.prototype.clear = hashClear_default;
396
+ Hash.prototype["delete"] = hashDelete_default;
397
+ Hash.prototype.get = hashGet_default;
398
+ Hash.prototype.has = hashHas_default;
399
+ Hash.prototype.set = hashSet_default;
400
+ var Hash_default = Hash;
401
+
402
+ // ../../../node_modules/lodash-es/_listCacheClear.js
403
+ function listCacheClear() {
404
+ this.__data__ = [];
405
+ this.size = 0;
406
+ }
407
+ var listCacheClear_default = listCacheClear;
408
+
409
+ // ../../../node_modules/lodash-es/_assocIndexOf.js
410
+ function assocIndexOf(array2, key) {
411
+ var length = array2.length;
412
+ while (length--) {
413
+ if (eq_default(array2[length][0], key)) {
414
+ return length;
415
+ }
416
+ }
417
+ return -1;
418
+ }
419
+ var assocIndexOf_default = assocIndexOf;
420
+
421
+ // ../../../node_modules/lodash-es/_listCacheDelete.js
422
+ var arrayProto = Array.prototype;
423
+ var splice = arrayProto.splice;
424
+ function listCacheDelete(key) {
425
+ var data = this.__data__, index = assocIndexOf_default(data, key);
426
+ if (index < 0) {
427
+ return false;
428
+ }
429
+ var lastIndex = data.length - 1;
430
+ if (index == lastIndex) {
431
+ data.pop();
432
+ } else {
433
+ splice.call(data, index, 1);
434
+ }
435
+ --this.size;
436
+ return true;
437
+ }
438
+ var listCacheDelete_default = listCacheDelete;
439
+
440
+ // ../../../node_modules/lodash-es/_listCacheGet.js
441
+ function listCacheGet(key) {
442
+ var data = this.__data__, index = assocIndexOf_default(data, key);
443
+ return index < 0 ? void 0 : data[index][1];
444
+ }
445
+ var listCacheGet_default = listCacheGet;
446
+
447
+ // ../../../node_modules/lodash-es/_listCacheHas.js
448
+ function listCacheHas(key) {
449
+ return assocIndexOf_default(this.__data__, key) > -1;
450
+ }
451
+ var listCacheHas_default = listCacheHas;
452
+
453
+ // ../../../node_modules/lodash-es/_listCacheSet.js
454
+ function listCacheSet(key, value) {
455
+ var data = this.__data__, index = assocIndexOf_default(data, key);
456
+ if (index < 0) {
457
+ ++this.size;
458
+ data.push([key, value]);
459
+ } else {
460
+ data[index][1] = value;
461
+ }
462
+ return this;
463
+ }
464
+ var listCacheSet_default = listCacheSet;
465
+
466
+ // ../../../node_modules/lodash-es/_ListCache.js
467
+ function ListCache(entries) {
468
+ var index = -1, length = entries == null ? 0 : entries.length;
469
+ this.clear();
470
+ while (++index < length) {
471
+ var entry = entries[index];
472
+ this.set(entry[0], entry[1]);
473
+ }
474
+ }
475
+ ListCache.prototype.clear = listCacheClear_default;
476
+ ListCache.prototype["delete"] = listCacheDelete_default;
477
+ ListCache.prototype.get = listCacheGet_default;
478
+ ListCache.prototype.has = listCacheHas_default;
479
+ ListCache.prototype.set = listCacheSet_default;
480
+ var ListCache_default = ListCache;
481
+
482
+ // ../../../node_modules/lodash-es/_Map.js
483
+ var Map2 = getNative_default(root_default, "Map");
484
+ var Map_default = Map2;
485
+
486
+ // ../../../node_modules/lodash-es/_mapCacheClear.js
487
+ function mapCacheClear() {
488
+ this.size = 0;
489
+ this.__data__ = {
490
+ "hash": new Hash_default(),
491
+ "map": new (Map_default || ListCache_default)(),
492
+ "string": new Hash_default()
493
+ };
494
+ }
495
+ var mapCacheClear_default = mapCacheClear;
496
+
497
+ // ../../../node_modules/lodash-es/_isKeyable.js
498
+ function isKeyable(value) {
499
+ var type = typeof value;
500
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
501
+ }
502
+ var isKeyable_default = isKeyable;
503
+
504
+ // ../../../node_modules/lodash-es/_getMapData.js
505
+ function getMapData(map, key) {
506
+ var data = map.__data__;
507
+ return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
508
+ }
509
+ var getMapData_default = getMapData;
510
+
511
+ // ../../../node_modules/lodash-es/_mapCacheDelete.js
512
+ function mapCacheDelete(key) {
513
+ var result = getMapData_default(this, key)["delete"](key);
514
+ this.size -= result ? 1 : 0;
515
+ return result;
516
+ }
517
+ var mapCacheDelete_default = mapCacheDelete;
518
+
519
+ // ../../../node_modules/lodash-es/_mapCacheGet.js
520
+ function mapCacheGet(key) {
521
+ return getMapData_default(this, key).get(key);
522
+ }
523
+ var mapCacheGet_default = mapCacheGet;
524
+
525
+ // ../../../node_modules/lodash-es/_mapCacheHas.js
526
+ function mapCacheHas(key) {
527
+ return getMapData_default(this, key).has(key);
528
+ }
529
+ var mapCacheHas_default = mapCacheHas;
530
+
531
+ // ../../../node_modules/lodash-es/_mapCacheSet.js
532
+ function mapCacheSet(key, value) {
533
+ var data = getMapData_default(this, key), size = data.size;
534
+ data.set(key, value);
535
+ this.size += data.size == size ? 0 : 1;
536
+ return this;
537
+ }
538
+ var mapCacheSet_default = mapCacheSet;
539
+
540
+ // ../../../node_modules/lodash-es/_MapCache.js
541
+ function MapCache(entries) {
542
+ var index = -1, length = entries == null ? 0 : entries.length;
543
+ this.clear();
544
+ while (++index < length) {
545
+ var entry = entries[index];
546
+ this.set(entry[0], entry[1]);
547
+ }
548
+ }
549
+ MapCache.prototype.clear = mapCacheClear_default;
550
+ MapCache.prototype["delete"] = mapCacheDelete_default;
551
+ MapCache.prototype.get = mapCacheGet_default;
552
+ MapCache.prototype.has = mapCacheHas_default;
553
+ MapCache.prototype.set = mapCacheSet_default;
554
+ var MapCache_default = MapCache;
555
+
556
+ // ../../../node_modules/lodash-es/memoize.js
557
+ var FUNC_ERROR_TEXT = "Expected a function";
558
+ function memoize(func, resolver) {
559
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
560
+ throw new TypeError(FUNC_ERROR_TEXT);
561
+ }
562
+ var memoized = function() {
563
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
564
+ if (cache.has(key)) {
565
+ return cache.get(key);
566
+ }
567
+ var result = func.apply(this, args);
568
+ memoized.cache = cache.set(key, result) || cache;
569
+ return result;
570
+ };
571
+ memoized.cache = new (memoize.Cache || MapCache_default)();
572
+ return memoized;
573
+ }
574
+ memoize.Cache = MapCache_default;
575
+ var memoize_default = memoize;
576
+
577
+ // ../../../node_modules/lodash-es/_memoizeCapped.js
578
+ var MAX_MEMOIZE_SIZE = 500;
579
+ function memoizeCapped(func) {
580
+ var result = memoize_default(func, function(key) {
581
+ if (cache.size === MAX_MEMOIZE_SIZE) {
582
+ cache.clear();
583
+ }
584
+ return key;
585
+ });
586
+ var cache = result.cache;
587
+ return result;
588
+ }
589
+ var memoizeCapped_default = memoizeCapped;
590
+
591
+ // ../../../node_modules/lodash-es/_stringToPath.js
592
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
593
+ var reEscapeChar = /\\(\\)?/g;
594
+ var stringToPath = memoizeCapped_default(function(string) {
595
+ var result = [];
596
+ if (string.charCodeAt(0) === 46) {
597
+ result.push("");
598
+ }
599
+ string.replace(rePropName, function(match, number, quote, subString) {
600
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
601
+ });
602
+ return result;
603
+ });
604
+ var stringToPath_default = stringToPath;
605
+
606
+ // ../../../node_modules/lodash-es/toString.js
607
+ function toString(value) {
608
+ return value == null ? "" : baseToString_default(value);
609
+ }
610
+ var toString_default = toString;
611
+
612
+ // ../../../node_modules/lodash-es/_castPath.js
613
+ function castPath(value, object) {
614
+ if (isArray_default(value)) {
615
+ return value;
616
+ }
617
+ return isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value));
618
+ }
619
+ var castPath_default = castPath;
620
+
621
+ // ../../../node_modules/lodash-es/_toKey.js
622
+ var INFINITY2 = 1 / 0;
623
+ function toKey(value) {
624
+ if (typeof value == "string" || isSymbol_default(value)) {
625
+ return value;
626
+ }
627
+ var result = value + "";
628
+ return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
629
+ }
630
+ var toKey_default = toKey;
631
+
632
+ // ../../../node_modules/lodash-es/_baseSlice.js
633
+ function baseSlice(array2, start, end) {
634
+ var index = -1, length = array2.length;
635
+ if (start < 0) {
636
+ start = -start > length ? 0 : length + start;
637
+ }
638
+ end = end > length ? length : end;
639
+ if (end < 0) {
640
+ end += length;
641
+ }
642
+ length = start > end ? 0 : end - start >>> 0;
643
+ start >>>= 0;
644
+ var result = Array(length);
645
+ while (++index < length) {
646
+ result[index] = array2[index + start];
647
+ }
648
+ return result;
649
+ }
650
+ var baseSlice_default = baseSlice;
651
+
652
+ // ../../../node_modules/lodash-es/_castSlice.js
653
+ function castSlice(array2, start, end) {
654
+ var length = array2.length;
655
+ end = end === void 0 ? length : end;
656
+ return !start && end >= length ? array2 : baseSlice_default(array2, start, end);
657
+ }
658
+ var castSlice_default = castSlice;
659
+
660
+ // ../../../node_modules/lodash-es/_hasUnicode.js
661
+ var rsAstralRange = "\\ud800-\\udfff";
662
+ var rsComboMarksRange = "\\u0300-\\u036f";
663
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
664
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
665
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
666
+ var rsVarRange = "\\ufe0e\\ufe0f";
667
+ var rsZWJ = "\\u200d";
668
+ var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
669
+ function hasUnicode(string) {
670
+ return reHasUnicode.test(string);
671
+ }
672
+ var hasUnicode_default = hasUnicode;
673
+
674
+ // ../../../node_modules/lodash-es/_asciiToArray.js
675
+ function asciiToArray(string) {
676
+ return string.split("");
677
+ }
678
+ var asciiToArray_default = asciiToArray;
679
+
680
+ // ../../../node_modules/lodash-es/_unicodeToArray.js
681
+ var rsAstralRange2 = "\\ud800-\\udfff";
682
+ var rsComboMarksRange2 = "\\u0300-\\u036f";
683
+ var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
684
+ var rsComboSymbolsRange2 = "\\u20d0-\\u20ff";
685
+ var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
686
+ var rsVarRange2 = "\\ufe0e\\ufe0f";
687
+ var rsAstral = "[" + rsAstralRange2 + "]";
688
+ var rsCombo = "[" + rsComboRange2 + "]";
689
+ var rsFitz = "\\ud83c[\\udffb-\\udfff]";
690
+ var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
691
+ var rsNonAstral = "[^" + rsAstralRange2 + "]";
692
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
693
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
694
+ var rsZWJ2 = "\\u200d";
695
+ var reOptMod = rsModifier + "?";
696
+ var rsOptVar = "[" + rsVarRange2 + "]?";
697
+ var rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
698
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
699
+ var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
700
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
701
+ function unicodeToArray(string) {
702
+ return string.match(reUnicode) || [];
703
+ }
704
+ var unicodeToArray_default = unicodeToArray;
705
+
706
+ // ../../../node_modules/lodash-es/_stringToArray.js
707
+ function stringToArray(string) {
708
+ return hasUnicode_default(string) ? unicodeToArray_default(string) : asciiToArray_default(string);
709
+ }
710
+ var stringToArray_default = stringToArray;
711
+
712
+ // ../../../node_modules/lodash-es/_hasPath.js
713
+ function hasPath(object, path, hasFunc) {
714
+ path = castPath_default(path, object);
715
+ var index = -1, length = path.length, result = false;
716
+ while (++index < length) {
717
+ var key = toKey_default(path[index]);
718
+ if (!(result = object != null && hasFunc(object, key))) {
719
+ break;
720
+ }
721
+ object = object[key];
722
+ }
723
+ if (result || ++index != length) {
724
+ return result;
725
+ }
726
+ length = object == null ? 0 : object.length;
727
+ return !!length && isLength_default(length) && isIndex_default(key, length) && (isArray_default(object) || isArguments_default(object));
728
+ }
729
+ var hasPath_default = hasPath;
730
+
731
+ // ../../../node_modules/lodash-es/_baseHas.js
732
+ var objectProto7 = Object.prototype;
733
+ var hasOwnProperty6 = objectProto7.hasOwnProperty;
734
+ function baseHas(object, key) {
735
+ return object != null && hasOwnProperty6.call(object, key);
736
+ }
737
+ var baseHas_default = baseHas;
738
+
739
+ // ../../../node_modules/lodash-es/has.js
740
+ function has(object, path) {
741
+ return object != null && hasPath_default(object, path, baseHas_default);
742
+ }
743
+ var has_default = has;
744
+
745
+ // ../../../node_modules/lodash-es/_charsEndIndex.js
746
+ function charsEndIndex(strSymbols, chrSymbols) {
747
+ var index = strSymbols.length;
748
+ while (index-- && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) {
749
+ }
750
+ return index;
751
+ }
752
+ var charsEndIndex_default = charsEndIndex;
753
+
754
+ // ../../../node_modules/lodash-es/_charsStartIndex.js
755
+ function charsStartIndex(strSymbols, chrSymbols) {
756
+ var index = -1, length = strSymbols.length;
757
+ while (++index < length && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) {
758
+ }
759
+ return index;
760
+ }
761
+ var charsStartIndex_default = charsStartIndex;
762
+
763
+ // ../../../node_modules/lodash-es/trim.js
764
+ function trim(string, chars, guard) {
765
+ string = toString_default(string);
766
+ if (string && (guard || chars === void 0)) {
767
+ return baseTrim_default(string);
768
+ }
769
+ if (!string || !(chars = baseToString_default(chars))) {
770
+ return string;
771
+ }
772
+ var strSymbols = stringToArray_default(string), chrSymbols = stringToArray_default(chars), start = charsStartIndex_default(strSymbols, chrSymbols), end = charsEndIndex_default(strSymbols, chrSymbols) + 1;
773
+ return castSlice_default(strSymbols, start, end).join("");
774
+ }
775
+ var trim_default = trim;
776
+
777
+ // ../../utils/src/config/env.ts
778
+ function _env(key, defaultValue) {
779
+ return has_default(process.env, key) ? process.env[key] ?? "" : defaultValue ?? "";
780
+ }
781
+ function int(key, defaultValue) {
782
+ if (!has_default(process.env, key)) {
783
+ return defaultValue ?? 0;
784
+ }
785
+ const value = process.env[key] ?? "0";
786
+ return parseInt(value, 10);
787
+ }
788
+ function float(key, defaultValue) {
789
+ if (!has_default(process.env, key)) {
790
+ return defaultValue ?? 0;
791
+ }
792
+ const value = process.env[key] ?? "0";
793
+ return parseFloat(value);
794
+ }
795
+ function bool(key, defaultValue) {
796
+ if (!has_default(process.env, key)) {
797
+ return defaultValue ?? false;
798
+ }
799
+ const value = process.env[key];
800
+ return value === "true";
801
+ }
802
+ function json(key, defaultValue) {
803
+ if (!has_default(process.env, key)) {
804
+ return defaultValue ?? {};
805
+ }
806
+ const value = process.env[key] ?? "{}";
807
+ try {
808
+ return JSON.parse(value);
809
+ } catch (error) {
810
+ throw new Error(`Invalid json environment variable ${key}: ${error.message}`);
811
+ }
812
+ }
813
+ function array(key, defaultValue) {
814
+ if (!has_default(process.env, key)) {
815
+ return defaultValue ?? [];
816
+ }
817
+ let value = process.env[key] ?? "";
818
+ if (value.startsWith("[") && value.endsWith("]")) {
819
+ value = value.substring(1, value.length - 1);
820
+ }
821
+ return value.split(",").map((v) => {
822
+ return trim_default(trim_default(v, " "), '"');
823
+ });
824
+ }
825
+ function date(key, defaultValue) {
826
+ if (!has_default(process.env, key)) {
827
+ return defaultValue ?? /* @__PURE__ */ new Date();
828
+ }
829
+ const value = process.env[key] ?? Date();
830
+ return new Date(value);
831
+ }
832
+ var utils = {
833
+ int,
834
+ float,
835
+ bool,
836
+ json,
837
+ array,
838
+ date,
839
+ /**
840
+ * Gets a value from env that matches oneOf provided values
841
+ * @param {string} key
842
+ * @param {string[]} expectedValues
843
+ * @param {string|undefined} defaultValue
844
+ * @returns {string|undefined}
845
+ */
846
+ oneOf(key, expectedValues, defaultValue) {
847
+ if (!expectedValues) {
848
+ throw new Error(`env.oneOf requires expectedValues`);
849
+ }
850
+ if (defaultValue && !expectedValues.includes(defaultValue)) {
851
+ throw new Error(`env.oneOf requires defaultValue to be included in expectedValues`);
852
+ }
853
+ const rawValue = env(key, defaultValue);
854
+ return expectedValues.includes(rawValue) ? rawValue : defaultValue ?? "";
855
+ }
856
+ };
857
+ var env = Object.assign(_env, utils);
858
+
859
+ // ../../../node_modules/chalk/source/vendor/ansi-styles/index.js
860
+ var ANSI_BACKGROUND_OFFSET = 10;
861
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
862
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
863
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
864
+ var styles = {
865
+ modifier: {
866
+ reset: [0, 0],
867
+ // 21 isn't widely supported and 22 does the same thing
868
+ bold: [1, 22],
869
+ dim: [2, 22],
870
+ italic: [3, 23],
871
+ underline: [4, 24],
872
+ overline: [53, 55],
873
+ inverse: [7, 27],
874
+ hidden: [8, 28],
875
+ strikethrough: [9, 29]
876
+ },
877
+ color: {
878
+ black: [30, 39],
879
+ red: [31, 39],
880
+ green: [32, 39],
881
+ yellow: [33, 39],
882
+ blue: [34, 39],
883
+ magenta: [35, 39],
884
+ cyan: [36, 39],
885
+ white: [37, 39],
886
+ // Bright color
887
+ blackBright: [90, 39],
888
+ gray: [90, 39],
889
+ // Alias of `blackBright`
890
+ grey: [90, 39],
891
+ // Alias of `blackBright`
892
+ redBright: [91, 39],
893
+ greenBright: [92, 39],
894
+ yellowBright: [93, 39],
895
+ blueBright: [94, 39],
896
+ magentaBright: [95, 39],
897
+ cyanBright: [96, 39],
898
+ whiteBright: [97, 39]
899
+ },
900
+ bgColor: {
901
+ bgBlack: [40, 49],
902
+ bgRed: [41, 49],
903
+ bgGreen: [42, 49],
904
+ bgYellow: [43, 49],
905
+ bgBlue: [44, 49],
906
+ bgMagenta: [45, 49],
907
+ bgCyan: [46, 49],
908
+ bgWhite: [47, 49],
909
+ // Bright color
910
+ bgBlackBright: [100, 49],
911
+ bgGray: [100, 49],
912
+ // Alias of `bgBlackBright`
913
+ bgGrey: [100, 49],
914
+ // Alias of `bgBlackBright`
915
+ bgRedBright: [101, 49],
916
+ bgGreenBright: [102, 49],
917
+ bgYellowBright: [103, 49],
918
+ bgBlueBright: [104, 49],
919
+ bgMagentaBright: [105, 49],
920
+ bgCyanBright: [106, 49],
921
+ bgWhiteBright: [107, 49]
922
+ }
923
+ };
924
+ var modifierNames = Object.keys(styles.modifier);
925
+ var foregroundColorNames = Object.keys(styles.color);
926
+ var backgroundColorNames = Object.keys(styles.bgColor);
927
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
928
+ function assembleStyles() {
929
+ const codes = /* @__PURE__ */ new Map();
930
+ for (const [groupName, group] of Object.entries(styles)) {
931
+ for (const [styleName, style] of Object.entries(group)) {
932
+ styles[styleName] = {
933
+ open: `\x1B[${style[0]}m`,
934
+ close: `\x1B[${style[1]}m`
935
+ };
936
+ group[styleName] = styles[styleName];
937
+ codes.set(style[0], style[1]);
938
+ }
939
+ Object.defineProperty(styles, groupName, {
940
+ value: group,
941
+ enumerable: false
942
+ });
943
+ }
944
+ Object.defineProperty(styles, "codes", {
945
+ value: codes,
946
+ enumerable: false
947
+ });
948
+ styles.color.close = "\x1B[39m";
949
+ styles.bgColor.close = "\x1B[49m";
950
+ styles.color.ansi = wrapAnsi16();
951
+ styles.color.ansi256 = wrapAnsi256();
952
+ styles.color.ansi16m = wrapAnsi16m();
953
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
954
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
955
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
956
+ Object.defineProperties(styles, {
957
+ rgbToAnsi256: {
958
+ value(red, green, blue) {
959
+ if (red === green && green === blue) {
960
+ if (red < 8) {
961
+ return 16;
962
+ }
963
+ if (red > 248) {
964
+ return 231;
965
+ }
966
+ return Math.round((red - 8) / 247 * 24) + 232;
967
+ }
968
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
969
+ },
970
+ enumerable: false
971
+ },
972
+ hexToRgb: {
973
+ value(hex) {
974
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
975
+ if (!matches) {
976
+ return [0, 0, 0];
977
+ }
978
+ let [colorString] = matches;
979
+ if (colorString.length === 3) {
980
+ colorString = [...colorString].map((character) => character + character).join("");
981
+ }
982
+ const integer = Number.parseInt(colorString, 16);
983
+ return [
984
+ /* eslint-disable no-bitwise */
985
+ integer >> 16 & 255,
986
+ integer >> 8 & 255,
987
+ integer & 255
988
+ /* eslint-enable no-bitwise */
989
+ ];
990
+ },
991
+ enumerable: false
992
+ },
993
+ hexToAnsi256: {
994
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
995
+ enumerable: false
996
+ },
997
+ ansi256ToAnsi: {
998
+ value(code) {
999
+ if (code < 8) {
1000
+ return 30 + code;
1001
+ }
1002
+ if (code < 16) {
1003
+ return 90 + (code - 8);
1004
+ }
1005
+ let red;
1006
+ let green;
1007
+ let blue;
1008
+ if (code >= 232) {
1009
+ red = ((code - 232) * 10 + 8) / 255;
1010
+ green = red;
1011
+ blue = red;
1012
+ } else {
1013
+ code -= 16;
1014
+ const remainder = code % 36;
1015
+ red = Math.floor(code / 36) / 5;
1016
+ green = Math.floor(remainder / 6) / 5;
1017
+ blue = remainder % 6 / 5;
1018
+ }
1019
+ const value = Math.max(red, green, blue) * 2;
1020
+ if (value === 0) {
1021
+ return 30;
1022
+ }
1023
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1024
+ if (value === 2) {
1025
+ result += 60;
1026
+ }
1027
+ return result;
1028
+ },
1029
+ enumerable: false
1030
+ },
1031
+ rgbToAnsi: {
1032
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
1033
+ enumerable: false
1034
+ },
1035
+ hexToAnsi: {
1036
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
1037
+ enumerable: false
1038
+ }
1039
+ });
1040
+ return styles;
1041
+ }
1042
+ var ansiStyles = assembleStyles();
1043
+ var ansi_styles_default = ansiStyles;
1044
+
1045
+ // ../../../node_modules/chalk/source/vendor/supports-color/index.js
1046
+ var import_node_process = __toESM(require("process"), 1);
1047
+ var import_node_os = __toESM(require("os"), 1);
1048
+ var import_node_tty = __toESM(require("tty"), 1);
1049
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
1050
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1051
+ const position = argv.indexOf(prefix + flag);
1052
+ const terminatorPosition = argv.indexOf("--");
1053
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1054
+ }
1055
+ var { env: env2 } = import_node_process.default;
1056
+ var flagForceColor;
1057
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1058
+ flagForceColor = 0;
1059
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1060
+ flagForceColor = 1;
1061
+ }
1062
+ function envForceColor() {
1063
+ if ("FORCE_COLOR" in env2) {
1064
+ if (env2.FORCE_COLOR === "true") {
1065
+ return 1;
1066
+ }
1067
+ if (env2.FORCE_COLOR === "false") {
1068
+ return 0;
1069
+ }
1070
+ return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
1071
+ }
1072
+ }
1073
+ function translateLevel(level) {
1074
+ if (level === 0) {
1075
+ return false;
1076
+ }
1077
+ return {
1078
+ level,
1079
+ hasBasic: true,
1080
+ has256: level >= 2,
1081
+ has16m: level >= 3
1082
+ };
1083
+ }
1084
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1085
+ const noFlagForceColor = envForceColor();
1086
+ if (noFlagForceColor !== void 0) {
1087
+ flagForceColor = noFlagForceColor;
1088
+ }
1089
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
1090
+ if (forceColor === 0) {
1091
+ return 0;
1092
+ }
1093
+ if (sniffFlags) {
1094
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1095
+ return 3;
1096
+ }
1097
+ if (hasFlag("color=256")) {
1098
+ return 2;
1099
+ }
1100
+ }
1101
+ if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
1102
+ return 1;
1103
+ }
1104
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
1105
+ return 0;
1106
+ }
1107
+ const min = forceColor || 0;
1108
+ if (env2.TERM === "dumb") {
1109
+ return min;
1110
+ }
1111
+ if (import_node_process.default.platform === "win32") {
1112
+ const osRelease = import_node_os.default.release().split(".");
1113
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1114
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1115
+ }
1116
+ return 1;
1117
+ }
1118
+ if ("CI" in env2) {
1119
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) {
1120
+ return 3;
1121
+ }
1122
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
1123
+ return 1;
1124
+ }
1125
+ return min;
1126
+ }
1127
+ if ("TEAMCITY_VERSION" in env2) {
1128
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
1129
+ }
1130
+ if (env2.COLORTERM === "truecolor") {
1131
+ return 3;
1132
+ }
1133
+ if (env2.TERM === "xterm-kitty") {
1134
+ return 3;
1135
+ }
1136
+ if ("TERM_PROGRAM" in env2) {
1137
+ const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1138
+ switch (env2.TERM_PROGRAM) {
1139
+ case "iTerm.app": {
1140
+ return version >= 3 ? 3 : 2;
1141
+ }
1142
+ case "Apple_Terminal": {
1143
+ return 2;
1144
+ }
1145
+ }
1146
+ }
1147
+ if (/-256(color)?$/i.test(env2.TERM)) {
1148
+ return 2;
1149
+ }
1150
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
1151
+ return 1;
1152
+ }
1153
+ if ("COLORTERM" in env2) {
1154
+ return 1;
1155
+ }
1156
+ return min;
1157
+ }
1158
+ function createSupportsColor(stream, options = {}) {
1159
+ const level = _supportsColor(stream, {
1160
+ streamIsTTY: stream && stream.isTTY,
1161
+ ...options
1162
+ });
1163
+ return translateLevel(level);
1164
+ }
1165
+ var supportsColor = {
1166
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
1167
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
1168
+ };
1169
+ var supports_color_default = supportsColor;
1170
+
1171
+ // ../../../node_modules/chalk/source/utilities.js
1172
+ function stringReplaceAll(string, substring, replacer) {
1173
+ let index = string.indexOf(substring);
1174
+ if (index === -1) {
1175
+ return string;
1176
+ }
1177
+ const substringLength = substring.length;
1178
+ let endIndex = 0;
1179
+ let returnValue = "";
1180
+ do {
1181
+ returnValue += string.slice(endIndex, index) + substring + replacer;
1182
+ endIndex = index + substringLength;
1183
+ index = string.indexOf(substring, endIndex);
1184
+ } while (index !== -1);
1185
+ returnValue += string.slice(endIndex);
1186
+ return returnValue;
1187
+ }
1188
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1189
+ let endIndex = 0;
1190
+ let returnValue = "";
1191
+ do {
1192
+ const gotCR = string[index - 1] === "\r";
1193
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1194
+ endIndex = index + 1;
1195
+ index = string.indexOf("\n", endIndex);
1196
+ } while (index !== -1);
1197
+ returnValue += string.slice(endIndex);
1198
+ return returnValue;
1199
+ }
1200
+
1201
+ // ../../../node_modules/chalk/source/index.js
1202
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
1203
+ var GENERATOR = Symbol("GENERATOR");
1204
+ var STYLER = Symbol("STYLER");
1205
+ var IS_EMPTY = Symbol("IS_EMPTY");
1206
+ var levelMapping = [
1207
+ "ansi",
1208
+ "ansi",
1209
+ "ansi256",
1210
+ "ansi16m"
1211
+ ];
1212
+ var styles2 = /* @__PURE__ */ Object.create(null);
1213
+ var applyOptions = (object, options = {}) => {
1214
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1215
+ throw new Error("The `level` option should be an integer from 0 to 3");
1216
+ }
1217
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1218
+ object.level = options.level === void 0 ? colorLevel : options.level;
1219
+ };
1220
+ var chalkFactory = (options) => {
1221
+ const chalk2 = (...strings) => strings.join(" ");
1222
+ applyOptions(chalk2, options);
1223
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
1224
+ return chalk2;
1225
+ };
1226
+ function createChalk(options) {
1227
+ return chalkFactory(options);
1228
+ }
1229
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
1230
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
1231
+ styles2[styleName] = {
1232
+ get() {
1233
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
1234
+ Object.defineProperty(this, styleName, { value: builder });
1235
+ return builder;
1236
+ }
1237
+ };
1238
+ }
1239
+ styles2.visible = {
1240
+ get() {
1241
+ const builder = createBuilder(this, this[STYLER], true);
1242
+ Object.defineProperty(this, "visible", { value: builder });
1243
+ return builder;
1244
+ }
1245
+ };
1246
+ var getModelAnsi = (model, level, type, ...arguments_) => {
1247
+ if (model === "rgb") {
1248
+ if (level === "ansi16m") {
1249
+ return ansi_styles_default[type].ansi16m(...arguments_);
1250
+ }
1251
+ if (level === "ansi256") {
1252
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
1253
+ }
1254
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
1255
+ }
1256
+ if (model === "hex") {
1257
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
1258
+ }
1259
+ return ansi_styles_default[type][model](...arguments_);
1260
+ };
1261
+ var usedModels = ["rgb", "hex", "ansi256"];
1262
+ for (const model of usedModels) {
1263
+ styles2[model] = {
1264
+ get() {
1265
+ const { level } = this;
1266
+ return function(...arguments_) {
1267
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
1268
+ return createBuilder(this, styler, this[IS_EMPTY]);
1269
+ };
1270
+ }
1271
+ };
1272
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1273
+ styles2[bgModel] = {
1274
+ get() {
1275
+ const { level } = this;
1276
+ return function(...arguments_) {
1277
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
1278
+ return createBuilder(this, styler, this[IS_EMPTY]);
1279
+ };
1280
+ }
1281
+ };
1282
+ }
1283
+ var proto = Object.defineProperties(() => {
1284
+ }, {
1285
+ ...styles2,
1286
+ level: {
1287
+ enumerable: true,
1288
+ get() {
1289
+ return this[GENERATOR].level;
1290
+ },
1291
+ set(level) {
1292
+ this[GENERATOR].level = level;
1293
+ }
1294
+ }
1295
+ });
1296
+ var createStyler = (open, close, parent) => {
1297
+ let openAll;
1298
+ let closeAll;
1299
+ if (parent === void 0) {
1300
+ openAll = open;
1301
+ closeAll = close;
1302
+ } else {
1303
+ openAll = parent.openAll + open;
1304
+ closeAll = close + parent.closeAll;
1305
+ }
1306
+ return {
1307
+ open,
1308
+ close,
1309
+ openAll,
1310
+ closeAll,
1311
+ parent
1312
+ };
1313
+ };
1314
+ var createBuilder = (self2, _styler, _isEmpty) => {
1315
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1316
+ Object.setPrototypeOf(builder, proto);
1317
+ builder[GENERATOR] = self2;
1318
+ builder[STYLER] = _styler;
1319
+ builder[IS_EMPTY] = _isEmpty;
1320
+ return builder;
1321
+ };
1322
+ var applyStyle = (self2, string) => {
1323
+ if (self2.level <= 0 || !string) {
1324
+ return self2[IS_EMPTY] ? "" : string;
1325
+ }
1326
+ let styler = self2[STYLER];
1327
+ if (styler === void 0) {
1328
+ return string;
1329
+ }
1330
+ const { openAll, closeAll } = styler;
1331
+ if (string.includes("\x1B")) {
1332
+ while (styler !== void 0) {
1333
+ string = stringReplaceAll(string, styler.close, styler.open);
1334
+ styler = styler.parent;
1335
+ }
1336
+ }
1337
+ const lfIndex = string.indexOf("\n");
1338
+ if (lfIndex !== -1) {
1339
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1340
+ }
1341
+ return openAll + string + closeAll;
1342
+ };
1343
+ Object.defineProperties(createChalk.prototype, styles2);
1344
+ var chalk = createChalk();
1345
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
1346
+ var source_default = chalk;
1347
+
1348
+ // ../../utils/src/logging/index.ts
1349
+ var import_os = require("os");
1350
+
1351
+ // ../../utils/src/logging/types.ts
1352
+ var logLevels = {
1353
+ fatal: -1,
1354
+ error: 0,
1355
+ warn: 1,
1356
+ info: 2,
1357
+ debug: 3
1358
+ };
1359
+
1360
+ // ../../utils/src/logging/error-to-string.ts
1361
+ var errorToString = (error) => {
1362
+ if (error === null) return "Null error";
1363
+ if (error === void 0) return "Undefined error";
1364
+ if (error instanceof Error) {
1365
+ return [
1366
+ `Name: ${error.name}`,
1367
+ `Message: ${error.message}`,
1368
+ `Stack: ${error.stack || "No stack trace available"}`,
1369
+ // Handle additional properties that might exist on custom errors
1370
+ ...Object.entries(error).filter(([key]) => !["name", "message", "stack"].includes(key)).map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
1371
+ ].join("\n");
1372
+ }
1373
+ if (typeof error === "string") return error;
1374
+ if (typeof error === "object") {
1375
+ try {
1376
+ return JSON.stringify(error, null, 2);
1377
+ } catch {
1378
+ return `[Object that cannot be stringified: ${Object.prototype.toString.call(error)}]`;
1379
+ }
1380
+ }
1381
+ return String(error);
1382
+ };
1383
+
1384
+ // ../../utils/src/logging/index.ts
1385
+ var currentLogLevel = env.int("LOG_LEVEL", logLevels.info);
1386
+ var logger = {
1387
+ fatal: (message, meta) => {
1388
+ if (currentLogLevel >= logLevels.fatal) {
1389
+ console.error(
1390
+ `[${(/* @__PURE__ */ new Date()).toTimeString()}]`,
1391
+ `${source_default.bgRed.white(" fatal ")}${import_os.EOL}`,
1392
+ errorToString(message),
1393
+ meta ? `${import_os.EOL}${JSON.stringify(meta, null, 2)}` : ""
1394
+ );
1395
+ }
1396
+ },
1397
+ error: (message, meta) => {
1398
+ if (currentLogLevel >= logLevels.error) {
1399
+ console.error(
1400
+ `[${(/* @__PURE__ */ new Date()).toTimeString()}]`,
1401
+ `${source_default.bgRed.white(" error ")}${import_os.EOL}`,
1402
+ errorToString(message),
1403
+ meta ? `${import_os.EOL}${JSON.stringify(meta, null, 2)}` : ""
1404
+ );
1405
+ }
1406
+ },
1407
+ warn: (message, meta) => {
1408
+ if (currentLogLevel >= logLevels.warn) {
1409
+ console.warn(
1410
+ `[${(/* @__PURE__ */ new Date()).toTimeString()}]`,
1411
+ `${source_default.bgYellow.black(" warn ")}${import_os.EOL}`,
1412
+ errorToString(message),
1413
+ meta ? `${import_os.EOL}${JSON.stringify(meta, null, 2)}` : ""
1414
+ );
1415
+ }
1416
+ },
1417
+ info: (message, meta) => {
1418
+ if (currentLogLevel >= logLevels.info) {
1419
+ console.info(
1420
+ `[${(/* @__PURE__ */ new Date()).toTimeString()}]`,
1421
+ `${source_default.bgBlue.white(" info ")}${import_os.EOL}`,
1422
+ message,
1423
+ meta ? `${import_os.EOL}${JSON.stringify(meta, null, 2)}` : ""
1424
+ );
1425
+ }
1426
+ },
1427
+ debug: (message, meta) => {
1428
+ if (currentLogLevel >= logLevels.debug) {
1429
+ console.debug(
1430
+ `[${(/* @__PURE__ */ new Date()).toTimeString()}]`,
1431
+ `${source_default.bgWhite.black(" debug ")}${import_os.EOL}`,
1432
+ message,
1433
+ meta ? `${import_os.EOL}${JSON.stringify(meta, null, 2)}` : ""
1434
+ );
1435
+ }
1436
+ }
1437
+ };
1438
+
1439
+ // src/router/index.ts
1440
+ function createRouter() {
1441
+ const routes = [];
1442
+ function detectEventType(event) {
1443
+ if ("requestContext" in event && "http" in event.requestContext) {
1444
+ return "http";
1445
+ }
1446
+ if ("source" in event && event.source === "aws.events") {
1447
+ return "schedule";
1448
+ }
1449
+ if ("Records" in event) {
1450
+ return "event";
1451
+ }
1452
+ return "unknown";
1453
+ }
1454
+ function getEventSourceInfo(event) {
1455
+ if ("Records" in event && event.Records?.[0]?.eventSource === "aws:sqs") {
1456
+ const record = event.Records[0];
1457
+ const queueArn = record.eventSourceARN;
1458
+ const queueName = queueArn.split(":").pop();
1459
+ return {
1460
+ type: "sqs",
1461
+ name: queueName,
1462
+ arn: queueArn
1463
+ };
1464
+ }
1465
+ if ("Records" in event && event.Records?.[0]?.EventSource === "aws:sns") {
1466
+ const record = event.Records[0];
1467
+ const topicArn = record.Sns.TopicArn;
1468
+ const topicName = topicArn.split(":").pop();
1469
+ return {
1470
+ type: "sns",
1471
+ name: topicName,
1472
+ arn: topicArn
1473
+ };
1474
+ }
1475
+ if ("Records" in event && event.Records?.[0]?.eventSource === "aws:s3") {
1476
+ const record = event.Records[0];
1477
+ const bucketName = record.s3.bucket.name;
1478
+ const bucketArn = record.s3.bucket.arn;
1479
+ return {
1480
+ type: "s3",
1481
+ name: bucketName,
1482
+ arn: bucketArn
1483
+ };
1484
+ }
1485
+ if ("Records" in event && event.Records?.[0]?.eventSource === "aws:dynamodb") {
1486
+ const record = event.Records[0];
1487
+ const tableArn = record.eventSourceARN;
1488
+ const tableName = tableArn.split("/")[1];
1489
+ return {
1490
+ type: "dynamodb",
1491
+ name: tableName,
1492
+ arn: tableArn
1493
+ };
1494
+ }
1495
+ if ("source" in event && "detail-type" in event) {
1496
+ return {
1497
+ type: "eventbridge",
1498
+ name: event.source,
1499
+ arn: event.source
1500
+ };
1501
+ }
1502
+ if ("Records" in event && event.Records?.[0]?.eventSource === "aws:kinesis") {
1503
+ const record = event.Records[0];
1504
+ const streamArn = record.eventSourceARN;
1505
+ const streamName = streamArn.split("/").pop();
1506
+ return {
1507
+ type: "kinesis",
1508
+ name: streamName,
1509
+ arn: streamArn
1510
+ };
1511
+ }
1512
+ return {
1513
+ type: "unknown",
1514
+ name: "unknown"
1515
+ };
1516
+ }
1517
+ async function handleHttpEvent(event, context, routes2) {
1518
+ const method = event.requestContext.http.method;
1519
+ const routeKey = event.routeKey.split(" ")[1].toLowerCase();
1520
+ for (const route of routes2) {
1521
+ logger.debug("[http] method", { method, routeKey, route });
1522
+ if (route.type === "http" && route.method === method && route.routeKey === routeKey) {
1523
+ try {
1524
+ const result = await route.handler(event, context);
1525
+ return result;
1526
+ } catch (error) {
1527
+ return {
1528
+ statusCode: 500,
1529
+ body: JSON.stringify({
1530
+ error: "Internal Server Error",
1531
+ message: error instanceof Error ? error.message : "Unknown error"
1532
+ })
1533
+ };
1534
+ }
1535
+ }
1536
+ }
1537
+ return {
1538
+ statusCode: 404,
1539
+ body: JSON.stringify({ error: "Not Found" })
1540
+ };
1541
+ }
1542
+ async function handleScheduleEvent(event, context, routes2) {
1543
+ const ndx = event.resources[0].lastIndexOf("/");
1544
+ const name = event.resources[0].substring(ndx + 1, event.resources[0].length);
1545
+ for (const route of routes2) {
1546
+ if (route.type === "schedule" && route.name === name) {
1547
+ try {
1548
+ return await route.handler(event, context);
1549
+ } catch (error) {
1550
+ throw error;
1551
+ }
1552
+ }
1553
+ }
1554
+ throw new Error("No schedule handler found");
1555
+ }
1556
+ async function handleEventBrokerEvent(event, context, routes2) {
1557
+ const eventSourceInfo = getEventSourceInfo(event);
1558
+ for (const route of routes2) {
1559
+ if (route.type === "event" && eventSourceInfo.type === route.sourceType && eventSourceInfo.name === route.source) {
1560
+ const eventMessage = event;
1561
+ try {
1562
+ return await Promise.all(eventMessage.Records.map((record) => {
1563
+ return route.handler(record, context);
1564
+ }));
1565
+ } catch (error) {
1566
+ throw error;
1567
+ }
1568
+ }
1569
+ }
1570
+ throw new Error("No event handler found");
1571
+ }
1572
+ return {
1573
+ // Register HTTP route
1574
+ http(method, route, handler) {
1575
+ routes.push({
1576
+ type: "http",
1577
+ method,
1578
+ routeKey: route,
1579
+ handler
1580
+ });
1581
+ },
1582
+ // Register schedule route
1583
+ schedule(name, pattern, handler) {
1584
+ routes.push({
1585
+ type: "schedule",
1586
+ name,
1587
+ pattern,
1588
+ handler
1589
+ });
1590
+ },
1591
+ // Register event route SNS / SQS / EventBridge
1592
+ event(source, sourceType, handler, filter) {
1593
+ routes.push({
1594
+ type: "event",
1595
+ source,
1596
+ sourceType,
1597
+ filter,
1598
+ handler
1599
+ });
1600
+ },
1601
+ async run(event, context) {
1602
+ const eventType = detectEventType(event);
1603
+ switch (eventType) {
1604
+ case "http":
1605
+ return await handleHttpEvent(event, context, routes);
1606
+ case "schedule":
1607
+ return await handleScheduleEvent(event, context, routes);
1608
+ case "event":
1609
+ return await handleEventBrokerEvent(event, context, routes);
1610
+ default:
1611
+ throw new Error(`Unsupported event type: ${eventType}`);
1612
+ }
1613
+ }
1614
+ };
1615
+ }
1616
+ // Annotate the CommonJS export names for ESM import in node:
1617
+ 0 && (module.exports = {
1618
+ createRouter
1619
+ });
1620
+ /*! Bundled license information:
1621
+
1622
+ lodash-es/lodash.js:
1623
+ (**
1624
+ * @license
1625
+ * Lodash (Custom Build) <https://lodash.com/>
1626
+ * Build: `lodash modularize exports="es" -o ./`
1627
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1628
+ * Released under MIT license <https://lodash.com/license>
1629
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1630
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1631
+ *)
1632
+ */
1633
+ //# sourceMappingURL=index.js.map