@geekmidas/constructs 3.1.0 → 4.0.1

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 (126) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/{AWSScheduledFunction-BnYDnzsF.d.mts → AWSScheduledFunction-COv8bB1v.d.mts} +2 -2
  3. package/dist/{AWSScheduledFunction-BnYDnzsF.d.mts.map → AWSScheduledFunction-COv8bB1v.d.mts.map} +1 -1
  4. package/dist/{AWSScheduledFunction-BRGjgD-i.mjs → AWSScheduledFunction-D-55GfwL.mjs} +3 -3
  5. package/dist/{AWSScheduledFunction-BRGjgD-i.mjs.map → AWSScheduledFunction-D-55GfwL.mjs.map} +1 -1
  6. package/dist/{AWSScheduledFunction-vjanLO3-.d.cts → AWSScheduledFunction-D9uCAd76.d.cts} +2 -2
  7. package/dist/{AWSScheduledFunction-vjanLO3-.d.cts.map → AWSScheduledFunction-D9uCAd76.d.cts.map} +1 -1
  8. package/dist/{AWSScheduledFunction-B3cHQSdp.cjs → AWSScheduledFunction-sWwZC9hg.cjs} +9 -9
  9. package/dist/{AWSScheduledFunction-B3cHQSdp.cjs.map → AWSScheduledFunction-sWwZC9hg.cjs.map} +1 -1
  10. package/dist/{Construct-DXfLPGwg.cjs → Construct-B14miJ6P.cjs} +42 -5
  11. package/dist/{Construct-DXfLPGwg.cjs.map → Construct-B14miJ6P.cjs.map} +1 -1
  12. package/dist/{Construct-CLIPPqUP.mjs → Construct-CdJY2DJS.mjs} +28 -3
  13. package/dist/{Construct-CLIPPqUP.mjs.map → Construct-CdJY2DJS.mjs.map} +1 -1
  14. package/dist/{Construct-BY0NBQLj.d.mts → Construct-D0n7QTaI.d.mts} +1 -1
  15. package/dist/{Construct-BY0NBQLj.d.mts.map → Construct-D0n7QTaI.d.mts.map} +1 -1
  16. package/dist/{Endpoint-BlMZIwBY.d.cts → Endpoint-CKGT5TgS.d.cts} +5 -5
  17. package/dist/Endpoint-CKGT5TgS.d.cts.map +1 -0
  18. package/dist/{Endpoint-4gVYt12g.d.mts → Endpoint-agNpJO38.d.mts} +6 -6
  19. package/dist/Endpoint-agNpJO38.d.mts.map +1 -0
  20. package/dist/{HonoEndpointAdaptor-6k-rI44C.mjs → HonoEndpointAdaptor-CWYBGVFQ.mjs} +4 -4
  21. package/dist/{HonoEndpointAdaptor-6k-rI44C.mjs.map → HonoEndpointAdaptor-CWYBGVFQ.mjs.map} +1 -1
  22. package/dist/{HonoEndpointAdaptor-CNIsjEw-.cjs → HonoEndpointAdaptor-C_2jaZ4k.cjs} +17 -17
  23. package/dist/{HonoEndpointAdaptor-CNIsjEw-.cjs.map → HonoEndpointAdaptor-C_2jaZ4k.cjs.map} +1 -1
  24. package/dist/{Subscriber-CjOHxO0l.d.mts → Subscriber-C0v9iOrI.d.mts} +2 -2
  25. package/dist/{Subscriber-CjOHxO0l.d.mts.map → Subscriber-C0v9iOrI.d.mts.map} +1 -1
  26. package/dist/adaptors/aws.cjs +12 -14
  27. package/dist/adaptors/aws.cjs.map +1 -1
  28. package/dist/adaptors/aws.d.cts +3 -3
  29. package/dist/adaptors/aws.d.mts +7 -7
  30. package/dist/adaptors/aws.mjs +6 -8
  31. package/dist/adaptors/aws.mjs.map +1 -1
  32. package/dist/adaptors/hono.cjs +6 -7
  33. package/dist/adaptors/hono.d.cts +2 -2
  34. package/dist/adaptors/hono.d.cts.map +1 -1
  35. package/dist/adaptors/hono.d.mts +4 -4
  36. package/dist/adaptors/hono.d.mts.map +1 -1
  37. package/dist/adaptors/hono.mjs +6 -7
  38. package/dist/adaptors/testing.cjs +12 -14
  39. package/dist/adaptors/testing.cjs.map +1 -1
  40. package/dist/adaptors/testing.d.cts +2 -2
  41. package/dist/adaptors/testing.d.mts +5 -5
  42. package/dist/adaptors/testing.mjs +6 -7
  43. package/dist/adaptors/testing.mjs.map +1 -1
  44. package/dist/crons/index.cjs +6 -7
  45. package/dist/crons/index.cjs.map +1 -1
  46. package/dist/crons/index.d.cts +2 -2
  47. package/dist/crons/index.d.mts +3 -3
  48. package/dist/crons/index.mjs +4 -5
  49. package/dist/crons/index.mjs.map +1 -1
  50. package/dist/endpoints/index.cjs +7 -9
  51. package/dist/endpoints/index.cjs.map +1 -1
  52. package/dist/endpoints/index.d.cts +4 -4
  53. package/dist/endpoints/index.d.mts +4 -4
  54. package/dist/endpoints/index.mjs +4 -6
  55. package/dist/endpoints/index.mjs.map +1 -1
  56. package/dist/functions/index.cjs +2 -2
  57. package/dist/functions/index.d.cts +1 -1
  58. package/dist/functions/index.d.mts +2 -2
  59. package/dist/functions/index.mjs +2 -2
  60. package/dist/{functions-BMR-1CIQ.mjs → functions-C9QhxXoP.mjs} +2 -3
  61. package/dist/{functions-BMR-1CIQ.mjs.map → functions-C9QhxXoP.mjs.map} +1 -1
  62. package/dist/{functions-_OAiwGYh.cjs → functions-cL1XwEHW.cjs} +10 -11
  63. package/dist/{functions-_OAiwGYh.cjs.map → functions-cL1XwEHW.cjs.map} +1 -1
  64. package/dist/{index-DoiHTgUQ.d.mts → index-C0XoazSK.d.mts} +2 -2
  65. package/dist/{index-DoiHTgUQ.d.mts.map → index-C0XoazSK.d.mts.map} +1 -1
  66. package/dist/{index-Dj3uvqCO.d.cts → index-Cg0m0uBN.d.cts} +5 -5
  67. package/dist/{index-Dj3uvqCO.d.cts.map → index-Cg0m0uBN.d.cts.map} +1 -1
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.d.mts +3 -3
  70. package/dist/index.mjs +1 -1
  71. package/dist/{lazyAccessors-D-UHg0YJ.mjs → lazyAccessors-Bnq67EHR.mjs} +834 -9
  72. package/dist/lazyAccessors-Bnq67EHR.mjs.map +1 -0
  73. package/dist/{lazyAccessors-B4rtX68K.cjs → lazyAccessors-DGqzwC-j.cjs} +842 -11
  74. package/dist/lazyAccessors-DGqzwC-j.cjs.map +1 -0
  75. package/dist/{processAudits-CPcACKCA.cjs → processAudits-BmjKsnF7.cjs} +3 -3
  76. package/dist/{processAudits-CPcACKCA.cjs.map → processAudits-BmjKsnF7.cjs.map} +1 -1
  77. package/dist/{processAudits-BEiSkgH3.mjs → processAudits-ySnizdMG.mjs} +1 -1
  78. package/dist/{processAudits-BEiSkgH3.mjs.map → processAudits-ySnizdMG.mjs.map} +1 -1
  79. package/dist/{publisher-CnpeMv-r.mjs → publisher-BrFOF847.mjs} +1 -1
  80. package/dist/{publisher-CnpeMv-r.mjs.map → publisher-BrFOF847.mjs.map} +1 -1
  81. package/dist/{publisher-BZgcrVPy.cjs → publisher-lFQleddL.cjs} +1 -1
  82. package/dist/{publisher-BZgcrVPy.cjs.map → publisher-lFQleddL.cjs.map} +1 -1
  83. package/dist/subscribers/index.cjs +2 -3
  84. package/dist/subscribers/index.cjs.map +1 -1
  85. package/dist/subscribers/index.d.mts +2 -2
  86. package/dist/subscribers/index.mjs +1 -1
  87. package/dist/{telemetry-Bp4DLvdQ.d.mts → telemetry-3vdxGn4q.d.mts} +1 -1
  88. package/dist/{telemetry-Bp4DLvdQ.d.mts.map → telemetry-3vdxGn4q.d.mts.map} +1 -1
  89. package/dist/{types-j0ti0JTY.d.mts → types-BDNGr7pv.d.mts} +1 -1
  90. package/dist/{types-j0ti0JTY.d.mts.map → types-BDNGr7pv.d.mts.map} +1 -1
  91. package/dist/types.d.mts +1 -1
  92. package/package.json +14 -39
  93. package/src/crons/AWSScheduledFunction.ts +1 -0
  94. package/src/endpoints/Endpoint.ts +16 -10
  95. package/src/endpoints/HonoEndpointAdaptor.ts +0 -1
  96. package/tsdown.config.ts +0 -2
  97. package/dist/Endpoint-4gVYt12g.d.mts.map +0 -1
  98. package/dist/Endpoint-BlMZIwBY.d.cts.map +0 -1
  99. package/dist/adaptors/middy.cjs +0 -120
  100. package/dist/adaptors/middy.cjs.map +0 -1
  101. package/dist/adaptors/middy.d.cts +0 -139
  102. package/dist/adaptors/middy.d.cts.map +0 -1
  103. package/dist/adaptors/middy.d.mts +0 -139
  104. package/dist/adaptors/middy.d.mts.map +0 -1
  105. package/dist/adaptors/middy.mjs +0 -118
  106. package/dist/adaptors/middy.mjs.map +0 -1
  107. package/dist/adaptors/trpc.cjs +0 -65
  108. package/dist/adaptors/trpc.cjs.map +0 -1
  109. package/dist/adaptors/trpc.d.cts +0 -85
  110. package/dist/adaptors/trpc.d.cts.map +0 -1
  111. package/dist/adaptors/trpc.d.mts +0 -85
  112. package/dist/adaptors/trpc.d.mts.map +0 -1
  113. package/dist/adaptors/trpc.mjs +0 -63
  114. package/dist/adaptors/trpc.mjs.map +0 -1
  115. package/dist/chunk-B4qE4VCv.mjs +0 -27
  116. package/dist/chunk-DWy1uDak.cjs +0 -39
  117. package/dist/lazyAccessors-B4rtX68K.cjs.map +0 -1
  118. package/dist/lazyAccessors-D-UHg0YJ.mjs.map +0 -1
  119. package/dist/lodash-CM4k4sZD.cjs +0 -836
  120. package/dist/lodash-CM4k4sZD.cjs.map +0 -1
  121. package/dist/lodash-DiUeLbQy.mjs +0 -831
  122. package/dist/lodash-DiUeLbQy.mjs.map +0 -1
  123. package/src/adaptors/__tests__/middy.spec.ts +0 -212
  124. package/src/adaptors/__tests__/trpc.spec.ts +0 -220
  125. package/src/adaptors/middy.ts +0 -225
  126. package/src/adaptors/trpc.ts +0 -192
@@ -1,831 +0,0 @@
1
- import { __commonJS } from "./chunk-B4qE4VCv.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js
4
- var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js"(exports, module) {
5
- /**
6
- * lodash (Custom Build) <https://lodash.com/>
7
- * Build: `lodash modularize exports="npm" -o ./`
8
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
9
- * Released under MIT license <https://lodash.com/license>
10
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
11
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12
- */
13
- /** Used as the `TypeError` message for "Functions" methods. */
14
- var FUNC_ERROR_TEXT = "Expected a function";
15
- /** Used to stand-in for `undefined` hash values. */
16
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
17
- /** Used as references for various `Number` constants. */
18
- var INFINITY = Infinity, MAX_SAFE_INTEGER = 9007199254740991;
19
- /** `Object#toString` result references. */
20
- var funcTag = "[object Function]", genTag = "[object GeneratorFunction]", symbolTag = "[object Symbol]";
21
- /** Used to match property names within property paths. */
22
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
23
- /**
24
- * Used to match `RegExp`
25
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
26
- */
27
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
28
- /** Used to match backslashes in property paths. */
29
- var reEscapeChar = /\\(\\)?/g;
30
- /** Used to detect host constructors (Safari). */
31
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
32
- /** Used to detect unsigned integer values. */
33
- var reIsUint = /^(?:0|[1-9]\d*)$/;
34
- /** Detect free variable `global` from Node.js. */
35
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
36
- /** Detect free variable `self`. */
37
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
38
- /** Used as a reference to the global object. */
39
- var root = freeGlobal || freeSelf || Function("return this")();
40
- /**
41
- * Gets the value at `key` of `object`.
42
- *
43
- * @private
44
- * @param {Object} [object] The object to query.
45
- * @param {string} key The key of the property to get.
46
- * @returns {*} Returns the property value.
47
- */
48
- function getValue(object, key) {
49
- return object == null ? void 0 : object[key];
50
- }
51
- /**
52
- * Checks if `value` is a host object in IE < 9.
53
- *
54
- * @private
55
- * @param {*} value The value to check.
56
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
57
- */
58
- function isHostObject(value) {
59
- var result = false;
60
- if (value != null && typeof value.toString != "function") try {
61
- result = !!(value + "");
62
- } catch (e) {}
63
- return result;
64
- }
65
- /** Used for built-in method references. */
66
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
67
- /** Used to detect overreaching core-js shims. */
68
- var coreJsData = root["__core-js_shared__"];
69
- /** Used to detect methods masquerading as native. */
70
- var maskSrcKey = function() {
71
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
72
- return uid ? "Symbol(src)_1." + uid : "";
73
- }();
74
- /** Used to resolve the decompiled source of functions. */
75
- var funcToString = funcProto.toString;
76
- /** Used to check objects for own properties. */
77
- var hasOwnProperty = objectProto.hasOwnProperty;
78
- /**
79
- * Used to resolve the
80
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
81
- * of values.
82
- */
83
- var objectToString = objectProto.toString;
84
- /** Used to detect if a method is native. */
85
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
86
- /** Built-in value references. */
87
- var Symbol = root.Symbol, splice = arrayProto.splice;
88
- var Map = getNative(root, "Map"), nativeCreate = getNative(Object, "create");
89
- /** Used to convert symbols to primitives and strings. */
90
- var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
91
- /**
92
- * Creates a hash object.
93
- *
94
- * @private
95
- * @constructor
96
- * @param {Array} [entries] The key-value pairs to cache.
97
- */
98
- function Hash(entries) {
99
- var index = -1, length = entries ? entries.length : 0;
100
- this.clear();
101
- while (++index < length) {
102
- var entry = entries[index];
103
- this.set(entry[0], entry[1]);
104
- }
105
- }
106
- /**
107
- * Removes all key-value entries from the hash.
108
- *
109
- * @private
110
- * @name clear
111
- * @memberOf Hash
112
- */
113
- function hashClear() {
114
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
115
- }
116
- /**
117
- * Removes `key` and its value from the hash.
118
- *
119
- * @private
120
- * @name delete
121
- * @memberOf Hash
122
- * @param {Object} hash The hash to modify.
123
- * @param {string} key The key of the value to remove.
124
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
125
- */
126
- function hashDelete(key) {
127
- return this.has(key) && delete this.__data__[key];
128
- }
129
- /**
130
- * Gets the hash value for `key`.
131
- *
132
- * @private
133
- * @name get
134
- * @memberOf Hash
135
- * @param {string} key The key of the value to get.
136
- * @returns {*} Returns the entry value.
137
- */
138
- function hashGet(key) {
139
- var data = this.__data__;
140
- if (nativeCreate) {
141
- var result = data[key];
142
- return result === HASH_UNDEFINED ? void 0 : result;
143
- }
144
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
145
- }
146
- /**
147
- * Checks if a hash value for `key` exists.
148
- *
149
- * @private
150
- * @name has
151
- * @memberOf Hash
152
- * @param {string} key The key of the entry to check.
153
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
154
- */
155
- function hashHas(key) {
156
- var data = this.__data__;
157
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
158
- }
159
- /**
160
- * Sets the hash `key` to `value`.
161
- *
162
- * @private
163
- * @name set
164
- * @memberOf Hash
165
- * @param {string} key The key of the value to set.
166
- * @param {*} value The value to set.
167
- * @returns {Object} Returns the hash instance.
168
- */
169
- function hashSet(key, value) {
170
- var data = this.__data__;
171
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
172
- return this;
173
- }
174
- Hash.prototype.clear = hashClear;
175
- Hash.prototype["delete"] = hashDelete;
176
- Hash.prototype.get = hashGet;
177
- Hash.prototype.has = hashHas;
178
- Hash.prototype.set = hashSet;
179
- /**
180
- * Creates an list cache object.
181
- *
182
- * @private
183
- * @constructor
184
- * @param {Array} [entries] The key-value pairs to cache.
185
- */
186
- function ListCache(entries) {
187
- var index = -1, length = entries ? entries.length : 0;
188
- this.clear();
189
- while (++index < length) {
190
- var entry = entries[index];
191
- this.set(entry[0], entry[1]);
192
- }
193
- }
194
- /**
195
- * Removes all key-value entries from the list cache.
196
- *
197
- * @private
198
- * @name clear
199
- * @memberOf ListCache
200
- */
201
- function listCacheClear() {
202
- this.__data__ = [];
203
- }
204
- /**
205
- * Removes `key` and its value from the list cache.
206
- *
207
- * @private
208
- * @name delete
209
- * @memberOf ListCache
210
- * @param {string} key The key of the value to remove.
211
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
212
- */
213
- function listCacheDelete(key) {
214
- var data = this.__data__, index = assocIndexOf(data, key);
215
- if (index < 0) return false;
216
- var lastIndex = data.length - 1;
217
- if (index == lastIndex) data.pop();
218
- else splice.call(data, index, 1);
219
- return true;
220
- }
221
- /**
222
- * Gets the list cache value for `key`.
223
- *
224
- * @private
225
- * @name get
226
- * @memberOf ListCache
227
- * @param {string} key The key of the value to get.
228
- * @returns {*} Returns the entry value.
229
- */
230
- function listCacheGet(key) {
231
- var data = this.__data__, index = assocIndexOf(data, key);
232
- return index < 0 ? void 0 : data[index][1];
233
- }
234
- /**
235
- * Checks if a list cache value for `key` exists.
236
- *
237
- * @private
238
- * @name has
239
- * @memberOf ListCache
240
- * @param {string} key The key of the entry to check.
241
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
242
- */
243
- function listCacheHas(key) {
244
- return assocIndexOf(this.__data__, key) > -1;
245
- }
246
- /**
247
- * Sets the list cache `key` to `value`.
248
- *
249
- * @private
250
- * @name set
251
- * @memberOf ListCache
252
- * @param {string} key The key of the value to set.
253
- * @param {*} value The value to set.
254
- * @returns {Object} Returns the list cache instance.
255
- */
256
- function listCacheSet(key, value) {
257
- var data = this.__data__, index = assocIndexOf(data, key);
258
- if (index < 0) data.push([key, value]);
259
- else data[index][1] = value;
260
- return this;
261
- }
262
- ListCache.prototype.clear = listCacheClear;
263
- ListCache.prototype["delete"] = listCacheDelete;
264
- ListCache.prototype.get = listCacheGet;
265
- ListCache.prototype.has = listCacheHas;
266
- ListCache.prototype.set = listCacheSet;
267
- /**
268
- * Creates a map cache object to store key-value pairs.
269
- *
270
- * @private
271
- * @constructor
272
- * @param {Array} [entries] The key-value pairs to cache.
273
- */
274
- function MapCache(entries) {
275
- var index = -1, length = entries ? entries.length : 0;
276
- this.clear();
277
- while (++index < length) {
278
- var entry = entries[index];
279
- this.set(entry[0], entry[1]);
280
- }
281
- }
282
- /**
283
- * Removes all key-value entries from the map.
284
- *
285
- * @private
286
- * @name clear
287
- * @memberOf MapCache
288
- */
289
- function mapCacheClear() {
290
- this.__data__ = {
291
- "hash": new Hash(),
292
- "map": new (Map || ListCache)(),
293
- "string": new Hash()
294
- };
295
- }
296
- /**
297
- * Removes `key` and its value from the map.
298
- *
299
- * @private
300
- * @name delete
301
- * @memberOf MapCache
302
- * @param {string} key The key of the value to remove.
303
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
304
- */
305
- function mapCacheDelete(key) {
306
- return getMapData(this, key)["delete"](key);
307
- }
308
- /**
309
- * Gets the map value for `key`.
310
- *
311
- * @private
312
- * @name get
313
- * @memberOf MapCache
314
- * @param {string} key The key of the value to get.
315
- * @returns {*} Returns the entry value.
316
- */
317
- function mapCacheGet(key) {
318
- return getMapData(this, key).get(key);
319
- }
320
- /**
321
- * Checks if a map value for `key` exists.
322
- *
323
- * @private
324
- * @name has
325
- * @memberOf MapCache
326
- * @param {string} key The key of the entry to check.
327
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
328
- */
329
- function mapCacheHas(key) {
330
- return getMapData(this, key).has(key);
331
- }
332
- /**
333
- * Sets the map `key` to `value`.
334
- *
335
- * @private
336
- * @name set
337
- * @memberOf MapCache
338
- * @param {string} key The key of the value to set.
339
- * @param {*} value The value to set.
340
- * @returns {Object} Returns the map cache instance.
341
- */
342
- function mapCacheSet(key, value) {
343
- getMapData(this, key).set(key, value);
344
- return this;
345
- }
346
- MapCache.prototype.clear = mapCacheClear;
347
- MapCache.prototype["delete"] = mapCacheDelete;
348
- MapCache.prototype.get = mapCacheGet;
349
- MapCache.prototype.has = mapCacheHas;
350
- MapCache.prototype.set = mapCacheSet;
351
- /**
352
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
353
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
354
- * for equality comparisons.
355
- *
356
- * @private
357
- * @param {Object} object The object to modify.
358
- * @param {string} key The key of the property to assign.
359
- * @param {*} value The value to assign.
360
- */
361
- function assignValue(object, key, value) {
362
- var objValue = object[key];
363
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
364
- }
365
- /**
366
- * Gets the index at which the `key` is found in `array` of key-value pairs.
367
- *
368
- * @private
369
- * @param {Array} array The array to inspect.
370
- * @param {*} key The key to search for.
371
- * @returns {number} Returns the index of the matched value, else `-1`.
372
- */
373
- function assocIndexOf(array, key) {
374
- var length = array.length;
375
- while (length--) if (eq(array[length][0], key)) return length;
376
- return -1;
377
- }
378
- /**
379
- * The base implementation of `_.isNative` without bad shim checks.
380
- *
381
- * @private
382
- * @param {*} value The value to check.
383
- * @returns {boolean} Returns `true` if `value` is a native function,
384
- * else `false`.
385
- */
386
- function baseIsNative(value) {
387
- if (!isObject(value) || isMasked(value)) return false;
388
- var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
389
- return pattern.test(toSource(value));
390
- }
391
- /**
392
- * The base implementation of `_.set`.
393
- *
394
- * @private
395
- * @param {Object} object The object to modify.
396
- * @param {Array|string} path The path of the property to set.
397
- * @param {*} value The value to set.
398
- * @param {Function} [customizer] The function to customize path creation.
399
- * @returns {Object} Returns `object`.
400
- */
401
- function baseSet(object, path, value, customizer) {
402
- if (!isObject(object)) return object;
403
- path = isKey(path, object) ? [path] : castPath(path);
404
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
405
- while (nested != null && ++index < length) {
406
- var key = toKey(path[index]), newValue = value;
407
- if (index != lastIndex) {
408
- var objValue = nested[key];
409
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
410
- if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
411
- }
412
- assignValue(nested, key, newValue);
413
- nested = nested[key];
414
- }
415
- return object;
416
- }
417
- /**
418
- * The base implementation of `_.toString` which doesn't convert nullish
419
- * values to empty strings.
420
- *
421
- * @private
422
- * @param {*} value The value to process.
423
- * @returns {string} Returns the string.
424
- */
425
- function baseToString(value) {
426
- if (typeof value == "string") return value;
427
- if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
428
- var result = value + "";
429
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
430
- }
431
- /**
432
- * Casts `value` to a path array if it's not one.
433
- *
434
- * @private
435
- * @param {*} value The value to inspect.
436
- * @returns {Array} Returns the cast property path array.
437
- */
438
- function castPath(value) {
439
- return isArray(value) ? value : stringToPath(value);
440
- }
441
- /**
442
- * Gets the data for `map`.
443
- *
444
- * @private
445
- * @param {Object} map The map to query.
446
- * @param {string} key The reference key.
447
- * @returns {*} Returns the map data.
448
- */
449
- function getMapData(map, key) {
450
- var data = map.__data__;
451
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
452
- }
453
- /**
454
- * Gets the native function at `key` of `object`.
455
- *
456
- * @private
457
- * @param {Object} object The object to query.
458
- * @param {string} key The key of the method to get.
459
- * @returns {*} Returns the function if it's native, else `undefined`.
460
- */
461
- function getNative(object, key) {
462
- var value = getValue(object, key);
463
- return baseIsNative(value) ? value : void 0;
464
- }
465
- /**
466
- * Checks if `value` is a valid array-like index.
467
- *
468
- * @private
469
- * @param {*} value The value to check.
470
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
471
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
472
- */
473
- function isIndex(value, length) {
474
- length = length == null ? MAX_SAFE_INTEGER : length;
475
- return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
476
- }
477
- /**
478
- * Checks if `value` is a property name and not a property path.
479
- *
480
- * @private
481
- * @param {*} value The value to check.
482
- * @param {Object} [object] The object to query keys on.
483
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
484
- */
485
- function isKey(value, object) {
486
- if (isArray(value)) return false;
487
- var type = typeof value;
488
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
489
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
490
- }
491
- /**
492
- * Checks if `value` is suitable for use as unique object key.
493
- *
494
- * @private
495
- * @param {*} value The value to check.
496
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
497
- */
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
- /**
503
- * Checks if `func` has its source masked.
504
- *
505
- * @private
506
- * @param {Function} func The function to check.
507
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
508
- */
509
- function isMasked(func) {
510
- return !!maskSrcKey && maskSrcKey in func;
511
- }
512
- /**
513
- * Converts `string` to a property path array.
514
- *
515
- * @private
516
- * @param {string} string The string to convert.
517
- * @returns {Array} Returns the property path array.
518
- */
519
- var stringToPath = memoize(function(string) {
520
- string = toString(string);
521
- var result = [];
522
- if (reLeadingDot.test(string)) result.push("");
523
- string.replace(rePropName, function(match, number, quote, string$1) {
524
- result.push(quote ? string$1.replace(reEscapeChar, "$1") : number || match);
525
- });
526
- return result;
527
- });
528
- /**
529
- * Converts `value` to a string key if it's not a string or symbol.
530
- *
531
- * @private
532
- * @param {*} value The value to inspect.
533
- * @returns {string|symbol} Returns the key.
534
- */
535
- function toKey(value) {
536
- if (typeof value == "string" || isSymbol(value)) return value;
537
- var result = value + "";
538
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
539
- }
540
- /**
541
- * Converts `func` to its source code.
542
- *
543
- * @private
544
- * @param {Function} func The function to process.
545
- * @returns {string} Returns the source code.
546
- */
547
- function toSource(func) {
548
- if (func != null) {
549
- try {
550
- return funcToString.call(func);
551
- } catch (e) {}
552
- try {
553
- return func + "";
554
- } catch (e) {}
555
- }
556
- return "";
557
- }
558
- /**
559
- * Creates a function that memoizes the result of `func`. If `resolver` is
560
- * provided, it determines the cache key for storing the result based on the
561
- * arguments provided to the memoized function. By default, the first argument
562
- * provided to the memoized function is used as the map cache key. The `func`
563
- * is invoked with the `this` binding of the memoized function.
564
- *
565
- * **Note:** The cache is exposed as the `cache` property on the memoized
566
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
567
- * constructor with one whose instances implement the
568
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
569
- * method interface of `delete`, `get`, `has`, and `set`.
570
- *
571
- * @static
572
- * @memberOf _
573
- * @since 0.1.0
574
- * @category Function
575
- * @param {Function} func The function to have its output memoized.
576
- * @param {Function} [resolver] The function to resolve the cache key.
577
- * @returns {Function} Returns the new memoized function.
578
- * @example
579
- *
580
- * var object = { 'a': 1, 'b': 2 };
581
- * var other = { 'c': 3, 'd': 4 };
582
- *
583
- * var values = _.memoize(_.values);
584
- * values(object);
585
- * // => [1, 2]
586
- *
587
- * values(other);
588
- * // => [3, 4]
589
- *
590
- * object.a = 2;
591
- * values(object);
592
- * // => [1, 2]
593
- *
594
- * // Modify the result cache.
595
- * values.cache.set(object, ['a', 'b']);
596
- * values(object);
597
- * // => ['a', 'b']
598
- *
599
- * // Replace `_.memoize.Cache`.
600
- * _.memoize.Cache = WeakMap;
601
- */
602
- function memoize(func, resolver) {
603
- if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
604
- var memoized = function() {
605
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
606
- if (cache.has(key)) return cache.get(key);
607
- var result = func.apply(this, args);
608
- memoized.cache = cache.set(key, result);
609
- return result;
610
- };
611
- memoized.cache = new (memoize.Cache || MapCache)();
612
- return memoized;
613
- }
614
- memoize.Cache = MapCache;
615
- /**
616
- * Performs a
617
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
618
- * comparison between two values to determine if they are equivalent.
619
- *
620
- * @static
621
- * @memberOf _
622
- * @since 4.0.0
623
- * @category Lang
624
- * @param {*} value The value to compare.
625
- * @param {*} other The other value to compare.
626
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
627
- * @example
628
- *
629
- * var object = { 'a': 1 };
630
- * var other = { 'a': 1 };
631
- *
632
- * _.eq(object, object);
633
- * // => true
634
- *
635
- * _.eq(object, other);
636
- * // => false
637
- *
638
- * _.eq('a', 'a');
639
- * // => true
640
- *
641
- * _.eq('a', Object('a'));
642
- * // => false
643
- *
644
- * _.eq(NaN, NaN);
645
- * // => true
646
- */
647
- function eq(value, other) {
648
- return value === other || value !== value && other !== other;
649
- }
650
- /**
651
- * Checks if `value` is classified as an `Array` object.
652
- *
653
- * @static
654
- * @memberOf _
655
- * @since 0.1.0
656
- * @category Lang
657
- * @param {*} value The value to check.
658
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
659
- * @example
660
- *
661
- * _.isArray([1, 2, 3]);
662
- * // => true
663
- *
664
- * _.isArray(document.body.children);
665
- * // => false
666
- *
667
- * _.isArray('abc');
668
- * // => false
669
- *
670
- * _.isArray(_.noop);
671
- * // => false
672
- */
673
- var isArray = Array.isArray;
674
- /**
675
- * Checks if `value` is classified as a `Function` object.
676
- *
677
- * @static
678
- * @memberOf _
679
- * @since 0.1.0
680
- * @category Lang
681
- * @param {*} value The value to check.
682
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
683
- * @example
684
- *
685
- * _.isFunction(_);
686
- * // => true
687
- *
688
- * _.isFunction(/abc/);
689
- * // => false
690
- */
691
- function isFunction(value) {
692
- var tag = isObject(value) ? objectToString.call(value) : "";
693
- return tag == funcTag || tag == genTag;
694
- }
695
- /**
696
- * Checks if `value` is the
697
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
698
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
699
- *
700
- * @static
701
- * @memberOf _
702
- * @since 0.1.0
703
- * @category Lang
704
- * @param {*} value The value to check.
705
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
706
- * @example
707
- *
708
- * _.isObject({});
709
- * // => true
710
- *
711
- * _.isObject([1, 2, 3]);
712
- * // => true
713
- *
714
- * _.isObject(_.noop);
715
- * // => true
716
- *
717
- * _.isObject(null);
718
- * // => false
719
- */
720
- function isObject(value) {
721
- var type = typeof value;
722
- return !!value && (type == "object" || type == "function");
723
- }
724
- /**
725
- * Checks if `value` is object-like. A value is object-like if it's not `null`
726
- * and has a `typeof` result of "object".
727
- *
728
- * @static
729
- * @memberOf _
730
- * @since 4.0.0
731
- * @category Lang
732
- * @param {*} value The value to check.
733
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
734
- * @example
735
- *
736
- * _.isObjectLike({});
737
- * // => true
738
- *
739
- * _.isObjectLike([1, 2, 3]);
740
- * // => true
741
- *
742
- * _.isObjectLike(_.noop);
743
- * // => false
744
- *
745
- * _.isObjectLike(null);
746
- * // => false
747
- */
748
- function isObjectLike(value) {
749
- return !!value && typeof value == "object";
750
- }
751
- /**
752
- * Checks if `value` is classified as a `Symbol` primitive or object.
753
- *
754
- * @static
755
- * @memberOf _
756
- * @since 4.0.0
757
- * @category Lang
758
- * @param {*} value The value to check.
759
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
760
- * @example
761
- *
762
- * _.isSymbol(Symbol.iterator);
763
- * // => true
764
- *
765
- * _.isSymbol('abc');
766
- * // => false
767
- */
768
- function isSymbol(value) {
769
- return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
770
- }
771
- /**
772
- * Converts `value` to a string. An empty string is returned for `null`
773
- * and `undefined` values. The sign of `-0` is preserved.
774
- *
775
- * @static
776
- * @memberOf _
777
- * @since 4.0.0
778
- * @category Lang
779
- * @param {*} value The value to process.
780
- * @returns {string} Returns the string.
781
- * @example
782
- *
783
- * _.toString(null);
784
- * // => ''
785
- *
786
- * _.toString(-0);
787
- * // => '-0'
788
- *
789
- * _.toString([1, 2, 3]);
790
- * // => '1,2,3'
791
- */
792
- function toString(value) {
793
- return value == null ? "" : baseToString(value);
794
- }
795
- /**
796
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
797
- * it's created. Arrays are created for missing index properties while objects
798
- * are created for all other missing properties. Use `_.setWith` to customize
799
- * `path` creation.
800
- *
801
- * **Note:** This method mutates `object`.
802
- *
803
- * @static
804
- * @memberOf _
805
- * @since 3.7.0
806
- * @category Object
807
- * @param {Object} object The object to modify.
808
- * @param {Array|string} path The path of the property to set.
809
- * @param {*} value The value to set.
810
- * @returns {Object} Returns `object`.
811
- * @example
812
- *
813
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
814
- *
815
- * _.set(object, 'a[0].b.c', 4);
816
- * console.log(object.a[0].b.c);
817
- * // => 4
818
- *
819
- * _.set(object, ['x', '0', 'y', 'z'], 5);
820
- * console.log(object.x[0].y.z);
821
- * // => 5
822
- */
823
- function set(object, path, value) {
824
- return object == null ? object : baseSet(object, path, value);
825
- }
826
- module.exports = set;
827
- } });
828
-
829
- //#endregion
830
- export { require_lodash };
831
- //# sourceMappingURL=lodash-DiUeLbQy.mjs.map