@dbml/cli 8.3.0-alpha.0 → 8.3.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.
- package/lib/index.js +1910 -415
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -6,8 +7,8 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
9
|
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys
|
|
10
|
-
key = keys
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
11
12
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
13
|
get: ((k) => from[k]).bind(null, key),
|
|
13
14
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -19,12 +20,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
20
|
value: mod,
|
|
20
21
|
enumerable: true
|
|
21
22
|
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
22
24
|
let commander = require("commander");
|
|
23
25
|
commander = __toESM(commander);
|
|
24
26
|
let path = require("path");
|
|
25
27
|
path = __toESM(path);
|
|
26
|
-
let
|
|
27
|
-
let
|
|
28
|
+
let _dbml_connector = require("@dbml/connector");
|
|
29
|
+
let _dbml_core = require("@dbml/core");
|
|
28
30
|
let chalk = require("chalk");
|
|
29
31
|
chalk = __toESM(chalk);
|
|
30
32
|
let figures = require("figures");
|
|
@@ -32,69 +34,55 @@ figures = __toESM(figures);
|
|
|
32
34
|
let winston = require("winston");
|
|
33
35
|
let fs = require("fs");
|
|
34
36
|
fs = __toESM(fs);
|
|
35
|
-
let
|
|
37
|
+
let _dbml_parse = require("@dbml/parse");
|
|
36
38
|
let node_fs = require("node:fs");
|
|
37
|
-
const $schema = "https://json.schemastore.org/package";
|
|
38
|
-
const name = "@dbml/cli";
|
|
39
|
-
const version = "8.3.0-alpha.0";
|
|
40
|
-
const description = "";
|
|
41
|
-
const main = "lib/index.js";
|
|
42
|
-
const license = "Apache-2.0";
|
|
43
|
-
const scripts = {
|
|
44
|
-
"test": "vitest run",
|
|
45
|
-
"test:watch": "vitest watch",
|
|
46
|
-
"coverage": "vitest --coverage",
|
|
47
|
-
"build": "rm -rf ./lib && tsc --noEmit && vite build",
|
|
48
|
-
"dev": "vite build --watch",
|
|
49
|
-
"prepublish": "npm run build",
|
|
50
|
-
"lint": "eslint .",
|
|
51
|
-
"lint:fix": "eslint --fix ."
|
|
52
|
-
};
|
|
53
|
-
const publishConfig = { "access": "public" };
|
|
54
|
-
const bin = {
|
|
55
|
-
"dbml2sql": "bin/dbml2sql.js",
|
|
56
|
-
"sql2dbml": "bin/sql2dbml.js",
|
|
57
|
-
"db2dbml": "bin/db2dbml.js"
|
|
58
|
-
};
|
|
59
|
-
const author = "Holistics <dev@holistics.io>";
|
|
60
|
-
const homepage = "https://dbml.dbdiagram.io";
|
|
61
|
-
const repository = "https://github.com/holistics/dbml/tree/master/packages/dbml-cli";
|
|
62
|
-
const keywords = ["dbml", "dbml-cli"];
|
|
63
|
-
const dependencies = {
|
|
64
|
-
"@babel/cli": "^7.21.0",
|
|
65
|
-
"@dbml/connector": "^8.3.0-alpha.0",
|
|
66
|
-
"@dbml/core": "^8.3.0-alpha.0",
|
|
67
|
-
"@dbml/parse": "^8.3.0-alpha.0",
|
|
68
|
-
"bluebird": "^3.5.5",
|
|
69
|
-
"chalk": "^2.4.2",
|
|
70
|
-
"commander": "^2.20.0",
|
|
71
|
-
"esm": "^3.2.25",
|
|
72
|
-
"figures": "^3.2.0",
|
|
73
|
-
"lodash-es": "^4.17.15",
|
|
74
|
-
"pegjs-require-import": "^0.0.2",
|
|
75
|
-
"strip-ansi": "^5.2.0",
|
|
76
|
-
"winston": "^3.2.1"
|
|
77
|
-
};
|
|
78
|
-
const gitHead = "75cec6fdf26767726449c7c7b370797b8379c4bc";
|
|
79
|
-
const engines = { "node": ">=18" };
|
|
80
39
|
var package_default = {
|
|
81
|
-
$schema,
|
|
82
|
-
name,
|
|
83
|
-
version,
|
|
40
|
+
$schema: "https://json.schemastore.org/package",
|
|
41
|
+
name: "@dbml/cli",
|
|
42
|
+
version: "8.3.0",
|
|
84
43
|
description: "",
|
|
85
|
-
main,
|
|
86
|
-
license,
|
|
87
|
-
scripts
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
44
|
+
main: "lib/index.js",
|
|
45
|
+
license: "Apache-2.0",
|
|
46
|
+
scripts: {
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"test:watch": "vitest watch",
|
|
49
|
+
"coverage": "vitest --coverage",
|
|
50
|
+
"build": "rm -rf ./lib && tsc --noEmit && vite build",
|
|
51
|
+
"dev": "vite build --watch",
|
|
52
|
+
"prepublish": "npm run build",
|
|
53
|
+
"lint": "eslint .",
|
|
54
|
+
"lint:fix": "eslint --fix ."
|
|
55
|
+
},
|
|
56
|
+
publishConfig: { "access": "public" },
|
|
57
|
+
bin: {
|
|
58
|
+
"dbml2sql": "bin/dbml2sql.js",
|
|
59
|
+
"sql2dbml": "bin/sql2dbml.js",
|
|
60
|
+
"db2dbml": "bin/db2dbml.js"
|
|
61
|
+
},
|
|
62
|
+
author: "Holistics <dev@holistics.io>",
|
|
63
|
+
homepage: "https://dbml.dbdiagram.io",
|
|
64
|
+
repository: "https://github.com/holistics/dbml/tree/master/packages/dbml-cli",
|
|
65
|
+
keywords: ["dbml", "dbml-cli"],
|
|
66
|
+
dependencies: {
|
|
67
|
+
"@babel/cli": "^7.21.0",
|
|
68
|
+
"@dbml/connector": "^8.3.0",
|
|
69
|
+
"@dbml/core": "^8.3.0",
|
|
70
|
+
"@dbml/parse": "^8.3.0",
|
|
71
|
+
"bluebird": "^3.5.5",
|
|
72
|
+
"chalk": "^2.4.2",
|
|
73
|
+
"commander": "^2.20.0",
|
|
74
|
+
"esm": "^3.2.25",
|
|
75
|
+
"figures": "^3.2.0",
|
|
76
|
+
"lodash-es": "^4.17.15",
|
|
77
|
+
"pegjs-require-import": "^0.0.2",
|
|
78
|
+
"strip-ansi": "^5.2.0",
|
|
79
|
+
"winston": "^3.2.1"
|
|
80
|
+
},
|
|
81
|
+
gitHead: "d1c00c334882b0221bd3966a17e098d86611bec2",
|
|
82
|
+
engines: { "node": ">=18" }
|
|
97
83
|
};
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/helpers/logger.ts
|
|
98
86
|
var { combine, timestamp, printf } = winston.format;
|
|
99
87
|
var consoleFormat = printf((info) => {
|
|
100
88
|
const { level, message } = info;
|
|
@@ -113,23 +101,26 @@ var fileFormat = printf((info) => {
|
|
|
113
101
|
}
|
|
114
102
|
return logContent;
|
|
115
103
|
});
|
|
116
|
-
|
|
104
|
+
var consoleLogger = (0, winston.createLogger)({
|
|
117
105
|
format: combine(consoleFormat),
|
|
118
106
|
transports: [new winston.transports.Console({ level: "error" })]
|
|
119
107
|
});
|
|
120
|
-
|
|
108
|
+
var fileLogger = (0, winston.createLogger)({
|
|
121
109
|
format: combine(timestamp(), winston.format.uncolorize(), fileFormat),
|
|
122
110
|
transports: [new winston.transports.File({
|
|
123
111
|
filename: "dbml-error.log",
|
|
124
112
|
level: "error"
|
|
125
113
|
})]
|
|
126
114
|
});
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/cli/outputPlugins/outputConsolePlugin.ts
|
|
127
117
|
var OutputConsolePlugin = class {
|
|
128
118
|
static write(content) {
|
|
129
119
|
console.log(content);
|
|
130
120
|
}
|
|
131
121
|
};
|
|
132
|
-
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/cli/outputPlugins/outputFilePlugin.ts
|
|
133
124
|
var OutputFilePlugin = class {
|
|
134
125
|
constructor(filePath, header) {
|
|
135
126
|
this.filePath = filePath;
|
|
@@ -147,18 +138,41 @@ var OutputFilePlugin = class {
|
|
|
147
138
|
this.stream.write(content);
|
|
148
139
|
}
|
|
149
140
|
};
|
|
150
|
-
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../../node_modules/lodash-es/_freeGlobal.js
|
|
143
|
+
/** Detect free variable `global` from Node.js. */
|
|
151
144
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
152
|
-
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region ../../node_modules/lodash-es/_root.js
|
|
147
|
+
/** Detect free variable `self`. */
|
|
153
148
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
154
|
-
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
/** Used as a reference to the global object. */
|
|
150
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region ../../node_modules/lodash-es/_Symbol.js
|
|
153
|
+
/** Built-in value references. */
|
|
154
|
+
var Symbol$1 = root.Symbol;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ../../node_modules/lodash-es/_getRawTag.js
|
|
157
|
+
/** Used for built-in method references. */
|
|
158
158
|
var objectProto$3 = Object.prototype;
|
|
159
|
+
/** Used to check objects for own properties. */
|
|
159
160
|
var hasOwnProperty$9 = objectProto$3.hasOwnProperty;
|
|
161
|
+
/**
|
|
162
|
+
* Used to resolve the
|
|
163
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
164
|
+
* of values.
|
|
165
|
+
*/
|
|
160
166
|
var nativeObjectToString$1 = objectProto$3.toString;
|
|
161
|
-
|
|
167
|
+
/** Built-in value references. */
|
|
168
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
169
|
+
/**
|
|
170
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
171
|
+
*
|
|
172
|
+
* @private
|
|
173
|
+
* @param {*} value The value to query.
|
|
174
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
175
|
+
*/
|
|
162
176
|
function getRawTag(value) {
|
|
163
177
|
var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
164
178
|
try {
|
|
@@ -170,73 +184,267 @@ function getRawTag(value) {
|
|
|
170
184
|
else delete value[symToStringTag$1];
|
|
171
185
|
return result;
|
|
172
186
|
}
|
|
173
|
-
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region ../../node_modules/lodash-es/_objectToString.js
|
|
189
|
+
/**
|
|
190
|
+
* Used to resolve the
|
|
191
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
192
|
+
* of values.
|
|
193
|
+
*/
|
|
174
194
|
var nativeObjectToString = Object.prototype.toString;
|
|
195
|
+
/**
|
|
196
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
197
|
+
*
|
|
198
|
+
* @private
|
|
199
|
+
* @param {*} value The value to convert.
|
|
200
|
+
* @returns {string} Returns the converted string.
|
|
201
|
+
*/
|
|
175
202
|
function objectToString(value) {
|
|
176
203
|
return nativeObjectToString.call(value);
|
|
177
204
|
}
|
|
178
|
-
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region ../../node_modules/lodash-es/_baseGetTag.js
|
|
207
|
+
/** `Object#toString` result references. */
|
|
179
208
|
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
180
|
-
|
|
209
|
+
/** Built-in value references. */
|
|
210
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
211
|
+
/**
|
|
212
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
213
|
+
*
|
|
214
|
+
* @private
|
|
215
|
+
* @param {*} value The value to query.
|
|
216
|
+
* @returns {string} Returns the `toStringTag`.
|
|
217
|
+
*/
|
|
181
218
|
function baseGetTag(value) {
|
|
182
219
|
if (value == null) return value === void 0 ? undefinedTag : nullTag;
|
|
183
|
-
return symToStringTag && symToStringTag in Object(value) ?
|
|
184
|
-
}
|
|
185
|
-
|
|
220
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region ../../node_modules/lodash-es/isObjectLike.js
|
|
224
|
+
/**
|
|
225
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
226
|
+
* and has a `typeof` result of "object".
|
|
227
|
+
*
|
|
228
|
+
* @static
|
|
229
|
+
* @memberOf _
|
|
230
|
+
* @since 4.0.0
|
|
231
|
+
* @category Lang
|
|
232
|
+
* @param {*} value The value to check.
|
|
233
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
234
|
+
* @example
|
|
235
|
+
*
|
|
236
|
+
* _.isObjectLike({});
|
|
237
|
+
* // => true
|
|
238
|
+
*
|
|
239
|
+
* _.isObjectLike([1, 2, 3]);
|
|
240
|
+
* // => true
|
|
241
|
+
*
|
|
242
|
+
* _.isObjectLike(_.noop);
|
|
243
|
+
* // => false
|
|
244
|
+
*
|
|
245
|
+
* _.isObjectLike(null);
|
|
246
|
+
* // => false
|
|
247
|
+
*/
|
|
186
248
|
function isObjectLike(value) {
|
|
187
249
|
return value != null && typeof value == "object";
|
|
188
250
|
}
|
|
189
|
-
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region ../../node_modules/lodash-es/isSymbol.js
|
|
253
|
+
/** `Object#toString` result references. */
|
|
190
254
|
var symbolTag$1 = "[object Symbol]";
|
|
255
|
+
/**
|
|
256
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
257
|
+
*
|
|
258
|
+
* @static
|
|
259
|
+
* @memberOf _
|
|
260
|
+
* @since 4.0.0
|
|
261
|
+
* @category Lang
|
|
262
|
+
* @param {*} value The value to check.
|
|
263
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
264
|
+
* @example
|
|
265
|
+
*
|
|
266
|
+
* _.isSymbol(Symbol.iterator);
|
|
267
|
+
* // => true
|
|
268
|
+
*
|
|
269
|
+
* _.isSymbol('abc');
|
|
270
|
+
* // => false
|
|
271
|
+
*/
|
|
191
272
|
function isSymbol(value) {
|
|
192
|
-
return typeof value == "symbol" ||
|
|
193
|
-
}
|
|
194
|
-
|
|
273
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region ../../node_modules/lodash-es/_arrayMap.js
|
|
277
|
+
/**
|
|
278
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
279
|
+
* shorthands.
|
|
280
|
+
*
|
|
281
|
+
* @private
|
|
282
|
+
* @param {Array} [array] The array to iterate over.
|
|
283
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
284
|
+
* @returns {Array} Returns the new mapped array.
|
|
285
|
+
*/
|
|
195
286
|
function arrayMap(array, iteratee) {
|
|
196
287
|
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
197
288
|
while (++index < length) result[index] = iteratee(array[index], index, array);
|
|
198
289
|
return result;
|
|
199
290
|
}
|
|
200
|
-
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region ../../node_modules/lodash-es/isArray.js
|
|
293
|
+
/**
|
|
294
|
+
* Checks if `value` is classified as an `Array` object.
|
|
295
|
+
*
|
|
296
|
+
* @static
|
|
297
|
+
* @memberOf _
|
|
298
|
+
* @since 0.1.0
|
|
299
|
+
* @category Lang
|
|
300
|
+
* @param {*} value The value to check.
|
|
301
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
302
|
+
* @example
|
|
303
|
+
*
|
|
304
|
+
* _.isArray([1, 2, 3]);
|
|
305
|
+
* // => true
|
|
306
|
+
*
|
|
307
|
+
* _.isArray(document.body.children);
|
|
308
|
+
* // => false
|
|
309
|
+
*
|
|
310
|
+
* _.isArray('abc');
|
|
311
|
+
* // => false
|
|
312
|
+
*
|
|
313
|
+
* _.isArray(_.noop);
|
|
314
|
+
* // => false
|
|
315
|
+
*/
|
|
201
316
|
var isArray = Array.isArray;
|
|
202
|
-
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region ../../node_modules/lodash-es/_baseToString.js
|
|
319
|
+
/** Used as references for various `Number` constants. */
|
|
203
320
|
var INFINITY$1 = Infinity;
|
|
204
|
-
|
|
321
|
+
/** Used to convert symbols to primitives and strings. */
|
|
322
|
+
var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
|
|
323
|
+
/**
|
|
324
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
325
|
+
* values to empty strings.
|
|
326
|
+
*
|
|
327
|
+
* @private
|
|
328
|
+
* @param {*} value The value to process.
|
|
329
|
+
* @returns {string} Returns the string.
|
|
330
|
+
*/
|
|
205
331
|
function baseToString(value) {
|
|
206
332
|
if (typeof value == "string") return value;
|
|
207
|
-
if (
|
|
208
|
-
if (
|
|
333
|
+
if (isArray(value)) return arrayMap(value, baseToString) + "";
|
|
334
|
+
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
209
335
|
var result = value + "";
|
|
210
336
|
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
211
337
|
}
|
|
212
|
-
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region ../../node_modules/lodash-es/isObject.js
|
|
340
|
+
/**
|
|
341
|
+
* Checks if `value` is the
|
|
342
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
343
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
344
|
+
*
|
|
345
|
+
* @static
|
|
346
|
+
* @memberOf _
|
|
347
|
+
* @since 0.1.0
|
|
348
|
+
* @category Lang
|
|
349
|
+
* @param {*} value The value to check.
|
|
350
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
351
|
+
* @example
|
|
352
|
+
*
|
|
353
|
+
* _.isObject({});
|
|
354
|
+
* // => true
|
|
355
|
+
*
|
|
356
|
+
* _.isObject([1, 2, 3]);
|
|
357
|
+
* // => true
|
|
358
|
+
*
|
|
359
|
+
* _.isObject(_.noop);
|
|
360
|
+
* // => true
|
|
361
|
+
*
|
|
362
|
+
* _.isObject(null);
|
|
363
|
+
* // => false
|
|
364
|
+
*/
|
|
213
365
|
function isObject(value) {
|
|
214
366
|
var type = typeof value;
|
|
215
367
|
return value != null && (type == "object" || type == "function");
|
|
216
368
|
}
|
|
217
|
-
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region ../../node_modules/lodash-es/identity.js
|
|
371
|
+
/**
|
|
372
|
+
* This method returns the first argument it receives.
|
|
373
|
+
*
|
|
374
|
+
* @static
|
|
375
|
+
* @since 0.1.0
|
|
376
|
+
* @memberOf _
|
|
377
|
+
* @category Util
|
|
378
|
+
* @param {*} value Any value.
|
|
379
|
+
* @returns {*} Returns `value`.
|
|
380
|
+
* @example
|
|
381
|
+
*
|
|
382
|
+
* var object = { 'a': 1 };
|
|
383
|
+
*
|
|
384
|
+
* console.log(_.identity(object) === object);
|
|
385
|
+
* // => true
|
|
386
|
+
*/
|
|
218
387
|
function identity(value) {
|
|
219
388
|
return value;
|
|
220
389
|
}
|
|
221
|
-
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region ../../node_modules/lodash-es/isFunction.js
|
|
392
|
+
/** `Object#toString` result references. */
|
|
222
393
|
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
394
|
+
/**
|
|
395
|
+
* Checks if `value` is classified as a `Function` object.
|
|
396
|
+
*
|
|
397
|
+
* @static
|
|
398
|
+
* @memberOf _
|
|
399
|
+
* @since 0.1.0
|
|
400
|
+
* @category Lang
|
|
401
|
+
* @param {*} value The value to check.
|
|
402
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
403
|
+
* @example
|
|
404
|
+
*
|
|
405
|
+
* _.isFunction(_);
|
|
406
|
+
* // => true
|
|
407
|
+
*
|
|
408
|
+
* _.isFunction(/abc/);
|
|
409
|
+
* // => false
|
|
410
|
+
*/
|
|
223
411
|
function isFunction(value) {
|
|
224
|
-
if (!
|
|
225
|
-
var tag =
|
|
412
|
+
if (!isObject(value)) return false;
|
|
413
|
+
var tag = baseGetTag(value);
|
|
226
414
|
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
227
415
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../node_modules/lodash-es/_coreJsData.js
|
|
418
|
+
/** Used to detect overreaching core-js shims. */
|
|
419
|
+
var coreJsData = root["__core-js_shared__"];
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region ../../node_modules/lodash-es/_isMasked.js
|
|
422
|
+
/** Used to detect methods masquerading as native. */
|
|
231
423
|
var maskSrcKey = function() {
|
|
232
|
-
var uid = /[^.]+$/.exec(
|
|
424
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
233
425
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
234
426
|
}();
|
|
427
|
+
/**
|
|
428
|
+
* Checks if `func` has its source masked.
|
|
429
|
+
*
|
|
430
|
+
* @private
|
|
431
|
+
* @param {Function} func The function to check.
|
|
432
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
433
|
+
*/
|
|
235
434
|
function isMasked(func) {
|
|
236
435
|
return !!maskSrcKey && maskSrcKey in func;
|
|
237
436
|
}
|
|
238
|
-
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region ../../node_modules/lodash-es/_toSource.js
|
|
439
|
+
/** Used to resolve the decompiled source of functions. */
|
|
239
440
|
var funcToString$1 = Function.prototype.toString;
|
|
441
|
+
/**
|
|
442
|
+
* Converts `func` to its source code.
|
|
443
|
+
*
|
|
444
|
+
* @private
|
|
445
|
+
* @param {Function} func The function to convert.
|
|
446
|
+
* @returns {string} Returns the source code.
|
|
447
|
+
*/
|
|
240
448
|
function toSource(func) {
|
|
241
449
|
if (func != null) {
|
|
242
450
|
try {
|
|
@@ -248,103 +456,346 @@ function toSource(func) {
|
|
|
248
456
|
}
|
|
249
457
|
return "";
|
|
250
458
|
}
|
|
251
|
-
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region ../../node_modules/lodash-es/_baseIsNative.js
|
|
461
|
+
/**
|
|
462
|
+
* Used to match `RegExp`
|
|
463
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
464
|
+
*/
|
|
252
465
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
466
|
+
/** Used to detect host constructors (Safari). */
|
|
253
467
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
468
|
+
/** Used for built-in method references. */
|
|
254
469
|
var funcProto = Function.prototype, objectProto$2 = Object.prototype;
|
|
470
|
+
/** Used to resolve the decompiled source of functions. */
|
|
255
471
|
var funcToString = funcProto.toString;
|
|
472
|
+
/** Used to check objects for own properties. */
|
|
256
473
|
var hasOwnProperty$8 = objectProto$2.hasOwnProperty;
|
|
474
|
+
/** Used to detect if a method is native. */
|
|
257
475
|
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
476
|
+
/**
|
|
477
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
478
|
+
*
|
|
479
|
+
* @private
|
|
480
|
+
* @param {*} value The value to check.
|
|
481
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
482
|
+
* else `false`.
|
|
483
|
+
*/
|
|
258
484
|
function baseIsNative(value) {
|
|
259
|
-
if (!
|
|
260
|
-
return (
|
|
261
|
-
}
|
|
262
|
-
|
|
485
|
+
if (!isObject(value) || isMasked(value)) return false;
|
|
486
|
+
return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region ../../node_modules/lodash-es/_getValue.js
|
|
490
|
+
/**
|
|
491
|
+
* Gets the value at `key` of `object`.
|
|
492
|
+
*
|
|
493
|
+
* @private
|
|
494
|
+
* @param {Object} [object] The object to query.
|
|
495
|
+
* @param {string} key The key of the property to get.
|
|
496
|
+
* @returns {*} Returns the property value.
|
|
497
|
+
*/
|
|
263
498
|
function getValue(object, key) {
|
|
264
499
|
return object == null ? void 0 : object[key];
|
|
265
500
|
}
|
|
266
|
-
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region ../../node_modules/lodash-es/_getNative.js
|
|
503
|
+
/**
|
|
504
|
+
* Gets the native function at `key` of `object`.
|
|
505
|
+
*
|
|
506
|
+
* @private
|
|
507
|
+
* @param {Object} object The object to query.
|
|
508
|
+
* @param {string} key The key of the method to get.
|
|
509
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
510
|
+
*/
|
|
267
511
|
function getNative(object, key) {
|
|
268
|
-
var value =
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
var
|
|
512
|
+
var value = getValue(object, key);
|
|
513
|
+
return baseIsNative(value) ? value : void 0;
|
|
514
|
+
}
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region ../../node_modules/lodash-es/_WeakMap.js
|
|
517
|
+
var WeakMap = getNative(root, "WeakMap");
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region ../../node_modules/lodash-es/_isIndex.js
|
|
520
|
+
/** Used as references for various `Number` constants. */
|
|
274
521
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
522
|
+
/** Used to detect unsigned integer values. */
|
|
275
523
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
524
|
+
/**
|
|
525
|
+
* Checks if `value` is a valid array-like index.
|
|
526
|
+
*
|
|
527
|
+
* @private
|
|
528
|
+
* @param {*} value The value to check.
|
|
529
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
530
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
531
|
+
*/
|
|
276
532
|
function isIndex(value, length) {
|
|
277
533
|
var type = typeof value;
|
|
278
534
|
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
279
535
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
280
536
|
}
|
|
281
|
-
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region ../../node_modules/lodash-es/eq.js
|
|
539
|
+
/**
|
|
540
|
+
* Performs a
|
|
541
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
542
|
+
* comparison between two values to determine if they are equivalent.
|
|
543
|
+
*
|
|
544
|
+
* @static
|
|
545
|
+
* @memberOf _
|
|
546
|
+
* @since 4.0.0
|
|
547
|
+
* @category Lang
|
|
548
|
+
* @param {*} value The value to compare.
|
|
549
|
+
* @param {*} other The other value to compare.
|
|
550
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
551
|
+
* @example
|
|
552
|
+
*
|
|
553
|
+
* var object = { 'a': 1 };
|
|
554
|
+
* var other = { 'a': 1 };
|
|
555
|
+
*
|
|
556
|
+
* _.eq(object, object);
|
|
557
|
+
* // => true
|
|
558
|
+
*
|
|
559
|
+
* _.eq(object, other);
|
|
560
|
+
* // => false
|
|
561
|
+
*
|
|
562
|
+
* _.eq('a', 'a');
|
|
563
|
+
* // => true
|
|
564
|
+
*
|
|
565
|
+
* _.eq('a', Object('a'));
|
|
566
|
+
* // => false
|
|
567
|
+
*
|
|
568
|
+
* _.eq(NaN, NaN);
|
|
569
|
+
* // => true
|
|
570
|
+
*/
|
|
282
571
|
function eq(value, other) {
|
|
283
572
|
return value === other || value !== value && other !== other;
|
|
284
573
|
}
|
|
285
|
-
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region ../../node_modules/lodash-es/isLength.js
|
|
576
|
+
/** Used as references for various `Number` constants. */
|
|
286
577
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
578
|
+
/**
|
|
579
|
+
* Checks if `value` is a valid array-like length.
|
|
580
|
+
*
|
|
581
|
+
* **Note:** This method is loosely based on
|
|
582
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
583
|
+
*
|
|
584
|
+
* @static
|
|
585
|
+
* @memberOf _
|
|
586
|
+
* @since 4.0.0
|
|
587
|
+
* @category Lang
|
|
588
|
+
* @param {*} value The value to check.
|
|
589
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
590
|
+
* @example
|
|
591
|
+
*
|
|
592
|
+
* _.isLength(3);
|
|
593
|
+
* // => true
|
|
594
|
+
*
|
|
595
|
+
* _.isLength(Number.MIN_VALUE);
|
|
596
|
+
* // => false
|
|
597
|
+
*
|
|
598
|
+
* _.isLength(Infinity);
|
|
599
|
+
* // => false
|
|
600
|
+
*
|
|
601
|
+
* _.isLength('3');
|
|
602
|
+
* // => false
|
|
603
|
+
*/
|
|
287
604
|
function isLength(value) {
|
|
288
605
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
289
606
|
}
|
|
290
|
-
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region ../../node_modules/lodash-es/isArrayLike.js
|
|
609
|
+
/**
|
|
610
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
611
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
612
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
613
|
+
*
|
|
614
|
+
* @static
|
|
615
|
+
* @memberOf _
|
|
616
|
+
* @since 4.0.0
|
|
617
|
+
* @category Lang
|
|
618
|
+
* @param {*} value The value to check.
|
|
619
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
620
|
+
* @example
|
|
621
|
+
*
|
|
622
|
+
* _.isArrayLike([1, 2, 3]);
|
|
623
|
+
* // => true
|
|
624
|
+
*
|
|
625
|
+
* _.isArrayLike(document.body.children);
|
|
626
|
+
* // => true
|
|
627
|
+
*
|
|
628
|
+
* _.isArrayLike('abc');
|
|
629
|
+
* // => true
|
|
630
|
+
*
|
|
631
|
+
* _.isArrayLike(_.noop);
|
|
632
|
+
* // => false
|
|
633
|
+
*/
|
|
291
634
|
function isArrayLike(value) {
|
|
292
|
-
return value != null &&
|
|
635
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
293
636
|
}
|
|
294
|
-
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region ../../node_modules/lodash-es/_isPrototype.js
|
|
639
|
+
/** Used for built-in method references. */
|
|
295
640
|
var objectProto$1 = Object.prototype;
|
|
641
|
+
/**
|
|
642
|
+
* Checks if `value` is likely a prototype object.
|
|
643
|
+
*
|
|
644
|
+
* @private
|
|
645
|
+
* @param {*} value The value to check.
|
|
646
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
647
|
+
*/
|
|
296
648
|
function isPrototype(value) {
|
|
297
649
|
var Ctor = value && value.constructor;
|
|
298
650
|
return value === (typeof Ctor == "function" && Ctor.prototype || objectProto$1);
|
|
299
651
|
}
|
|
300
|
-
|
|
652
|
+
//#endregion
|
|
653
|
+
//#region ../../node_modules/lodash-es/_baseTimes.js
|
|
654
|
+
/**
|
|
655
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
656
|
+
* or max array length checks.
|
|
657
|
+
*
|
|
658
|
+
* @private
|
|
659
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
660
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
661
|
+
* @returns {Array} Returns the array of results.
|
|
662
|
+
*/
|
|
301
663
|
function baseTimes(n, iteratee) {
|
|
302
664
|
var index = -1, result = Array(n);
|
|
303
665
|
while (++index < n) result[index] = iteratee(index);
|
|
304
666
|
return result;
|
|
305
667
|
}
|
|
306
|
-
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region ../../node_modules/lodash-es/_baseIsArguments.js
|
|
670
|
+
/** `Object#toString` result references. */
|
|
307
671
|
var argsTag$2 = "[object Arguments]";
|
|
672
|
+
/**
|
|
673
|
+
* The base implementation of `_.isArguments`.
|
|
674
|
+
*
|
|
675
|
+
* @private
|
|
676
|
+
* @param {*} value The value to check.
|
|
677
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
678
|
+
*/
|
|
308
679
|
function baseIsArguments(value) {
|
|
309
|
-
return
|
|
680
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$2;
|
|
310
681
|
}
|
|
311
|
-
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region ../../node_modules/lodash-es/isArguments.js
|
|
684
|
+
/** Used for built-in method references. */
|
|
312
685
|
var objectProto = Object.prototype;
|
|
686
|
+
/** Used to check objects for own properties. */
|
|
313
687
|
var hasOwnProperty$7 = objectProto.hasOwnProperty;
|
|
688
|
+
/** Built-in value references. */
|
|
314
689
|
var propertyIsEnumerable$1 = objectProto.propertyIsEnumerable;
|
|
315
|
-
|
|
690
|
+
/**
|
|
691
|
+
* Checks if `value` is likely an `arguments` object.
|
|
692
|
+
*
|
|
693
|
+
* @static
|
|
694
|
+
* @memberOf _
|
|
695
|
+
* @since 0.1.0
|
|
696
|
+
* @category Lang
|
|
697
|
+
* @param {*} value The value to check.
|
|
698
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
699
|
+
* else `false`.
|
|
700
|
+
* @example
|
|
701
|
+
*
|
|
702
|
+
* _.isArguments(function() { return arguments; }());
|
|
703
|
+
* // => true
|
|
704
|
+
*
|
|
705
|
+
* _.isArguments([1, 2, 3]);
|
|
706
|
+
* // => false
|
|
707
|
+
*/
|
|
708
|
+
var isArguments = baseIsArguments(function() {
|
|
316
709
|
return arguments;
|
|
317
|
-
}()) ?
|
|
318
|
-
return
|
|
710
|
+
}()) ? baseIsArguments : function(value) {
|
|
711
|
+
return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
319
712
|
};
|
|
320
|
-
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region ../../node_modules/lodash-es/stubFalse.js
|
|
715
|
+
/**
|
|
716
|
+
* This method returns `false`.
|
|
717
|
+
*
|
|
718
|
+
* @static
|
|
719
|
+
* @memberOf _
|
|
720
|
+
* @since 4.13.0
|
|
721
|
+
* @category Util
|
|
722
|
+
* @returns {boolean} Returns `false`.
|
|
723
|
+
* @example
|
|
724
|
+
*
|
|
725
|
+
* _.times(2, _.stubFalse);
|
|
726
|
+
* // => [false, false]
|
|
727
|
+
*/
|
|
321
728
|
function stubFalse() {
|
|
322
729
|
return false;
|
|
323
730
|
}
|
|
324
|
-
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region ../../node_modules/lodash-es/isBuffer.js
|
|
733
|
+
/** Detect free variable `exports`. */
|
|
325
734
|
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
735
|
+
/** Detect free variable `module`. */
|
|
326
736
|
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
327
|
-
|
|
328
|
-
var
|
|
329
|
-
|
|
737
|
+
/** Built-in value references. */
|
|
738
|
+
var Buffer$1 = freeModule$1 && freeModule$1.exports === freeExports$1 ? root.Buffer : void 0;
|
|
739
|
+
/**
|
|
740
|
+
* Checks if `value` is a buffer.
|
|
741
|
+
*
|
|
742
|
+
* @static
|
|
743
|
+
* @memberOf _
|
|
744
|
+
* @since 4.3.0
|
|
745
|
+
* @category Lang
|
|
746
|
+
* @param {*} value The value to check.
|
|
747
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
748
|
+
* @example
|
|
749
|
+
*
|
|
750
|
+
* _.isBuffer(new Buffer(2));
|
|
751
|
+
* // => true
|
|
752
|
+
*
|
|
753
|
+
* _.isBuffer(new Uint8Array(2));
|
|
754
|
+
* // => false
|
|
755
|
+
*/
|
|
756
|
+
var isBuffer = (Buffer$1 ? Buffer$1.isBuffer : void 0) || stubFalse;
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region ../../node_modules/lodash-es/_baseIsTypedArray.js
|
|
759
|
+
/** `Object#toString` result references. */
|
|
330
760
|
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$3 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
331
761
|
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
762
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
332
763
|
var typedArrayTags = {};
|
|
333
764
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
334
765
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$3] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$3] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
766
|
+
/**
|
|
767
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
768
|
+
*
|
|
769
|
+
* @private
|
|
770
|
+
* @param {*} value The value to check.
|
|
771
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
772
|
+
*/
|
|
335
773
|
function baseIsTypedArray(value) {
|
|
336
|
-
return
|
|
337
|
-
}
|
|
338
|
-
|
|
774
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
775
|
+
}
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region ../../node_modules/lodash-es/_baseUnary.js
|
|
778
|
+
/**
|
|
779
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
780
|
+
*
|
|
781
|
+
* @private
|
|
782
|
+
* @param {Function} func The function to cap arguments for.
|
|
783
|
+
* @returns {Function} Returns the new capped function.
|
|
784
|
+
*/
|
|
339
785
|
function baseUnary(func) {
|
|
340
786
|
return function(value) {
|
|
341
787
|
return func(value);
|
|
342
788
|
};
|
|
343
789
|
}
|
|
344
|
-
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region ../../node_modules/lodash-es/_nodeUtil.js
|
|
792
|
+
/** Detect free variable `exports`. */
|
|
345
793
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
794
|
+
/** Detect free variable `module`. */
|
|
346
795
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
347
|
-
|
|
796
|
+
/** Detect free variable `process` from Node.js. */
|
|
797
|
+
var freeProcess = freeModule && freeModule.exports === freeExports && freeGlobal.process;
|
|
798
|
+
/** Used to access faster Node.js helpers. */
|
|
348
799
|
var nodeUtil = function() {
|
|
349
800
|
try {
|
|
350
801
|
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
@@ -352,83 +803,232 @@ var nodeUtil = function() {
|
|
|
352
803
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
353
804
|
} catch (e) {}
|
|
354
805
|
}();
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
var
|
|
358
|
-
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region ../../node_modules/lodash-es/isTypedArray.js
|
|
808
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
809
|
+
/**
|
|
810
|
+
* Checks if `value` is classified as a typed array.
|
|
811
|
+
*
|
|
812
|
+
* @static
|
|
813
|
+
* @memberOf _
|
|
814
|
+
* @since 3.0.0
|
|
815
|
+
* @category Lang
|
|
816
|
+
* @param {*} value The value to check.
|
|
817
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
818
|
+
* @example
|
|
819
|
+
*
|
|
820
|
+
* _.isTypedArray(new Uint8Array);
|
|
821
|
+
* // => true
|
|
822
|
+
*
|
|
823
|
+
* _.isTypedArray([]);
|
|
824
|
+
* // => false
|
|
825
|
+
*/
|
|
826
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region ../../node_modules/lodash-es/_arrayLikeKeys.js
|
|
829
|
+
/** Used to check objects for own properties. */
|
|
359
830
|
var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
|
|
831
|
+
/**
|
|
832
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
833
|
+
*
|
|
834
|
+
* @private
|
|
835
|
+
* @param {*} value The value to query.
|
|
836
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
837
|
+
* @returns {Array} Returns the array of property names.
|
|
838
|
+
*/
|
|
360
839
|
function arrayLikeKeys(value, inherited) {
|
|
361
|
-
var isArr =
|
|
362
|
-
for (var key in value) if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") ||
|
|
840
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
841
|
+
for (var key in value) if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
|
|
363
842
|
return result;
|
|
364
843
|
}
|
|
365
|
-
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region ../../node_modules/lodash-es/_overArg.js
|
|
846
|
+
/**
|
|
847
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
848
|
+
*
|
|
849
|
+
* @private
|
|
850
|
+
* @param {Function} func The function to wrap.
|
|
851
|
+
* @param {Function} transform The argument transform.
|
|
852
|
+
* @returns {Function} Returns the new function.
|
|
853
|
+
*/
|
|
366
854
|
function overArg(func, transform) {
|
|
367
855
|
return function(arg) {
|
|
368
856
|
return func(transform(arg));
|
|
369
857
|
};
|
|
370
858
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
var
|
|
859
|
+
//#endregion
|
|
860
|
+
//#region ../../node_modules/lodash-es/_nativeKeys.js
|
|
861
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
862
|
+
//#endregion
|
|
863
|
+
//#region ../../node_modules/lodash-es/_baseKeys.js
|
|
864
|
+
/** Used to check objects for own properties. */
|
|
374
865
|
var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
|
|
866
|
+
/**
|
|
867
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
868
|
+
*
|
|
869
|
+
* @private
|
|
870
|
+
* @param {Object} object The object to query.
|
|
871
|
+
* @returns {Array} Returns the array of property names.
|
|
872
|
+
*/
|
|
375
873
|
function baseKeys(object) {
|
|
376
|
-
if (!
|
|
874
|
+
if (!isPrototype(object)) return nativeKeys(object);
|
|
377
875
|
var result = [];
|
|
378
876
|
for (var key in Object(object)) if (hasOwnProperty$5.call(object, key) && key != "constructor") result.push(key);
|
|
379
877
|
return result;
|
|
380
878
|
}
|
|
381
|
-
|
|
879
|
+
//#endregion
|
|
880
|
+
//#region ../../node_modules/lodash-es/keys.js
|
|
881
|
+
/**
|
|
882
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
883
|
+
*
|
|
884
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
885
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
886
|
+
* for more details.
|
|
887
|
+
*
|
|
888
|
+
* @static
|
|
889
|
+
* @since 0.1.0
|
|
890
|
+
* @memberOf _
|
|
891
|
+
* @category Object
|
|
892
|
+
* @param {Object} object The object to query.
|
|
893
|
+
* @returns {Array} Returns the array of property names.
|
|
894
|
+
* @example
|
|
895
|
+
*
|
|
896
|
+
* function Foo() {
|
|
897
|
+
* this.a = 1;
|
|
898
|
+
* this.b = 2;
|
|
899
|
+
* }
|
|
900
|
+
*
|
|
901
|
+
* Foo.prototype.c = 3;
|
|
902
|
+
*
|
|
903
|
+
* _.keys(new Foo);
|
|
904
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
905
|
+
*
|
|
906
|
+
* _.keys('hi');
|
|
907
|
+
* // => ['0', '1']
|
|
908
|
+
*/
|
|
382
909
|
function keys(object) {
|
|
383
|
-
return
|
|
910
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
384
911
|
}
|
|
385
|
-
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region ../../node_modules/lodash-es/_isKey.js
|
|
914
|
+
/** Used to match property names within property paths. */
|
|
386
915
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
916
|
+
/**
|
|
917
|
+
* Checks if `value` is a property name and not a property path.
|
|
918
|
+
*
|
|
919
|
+
* @private
|
|
920
|
+
* @param {*} value The value to check.
|
|
921
|
+
* @param {Object} [object] The object to query keys on.
|
|
922
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
923
|
+
*/
|
|
387
924
|
function isKey(value, object) {
|
|
388
|
-
if (
|
|
925
|
+
if (isArray(value)) return false;
|
|
389
926
|
var type = typeof value;
|
|
390
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null ||
|
|
927
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
|
|
391
928
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
392
929
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
var
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region ../../node_modules/lodash-es/_nativeCreate.js
|
|
932
|
+
var nativeCreate = getNative(Object, "create");
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region ../../node_modules/lodash-es/_hashClear.js
|
|
935
|
+
/**
|
|
936
|
+
* Removes all key-value entries from the hash.
|
|
937
|
+
*
|
|
938
|
+
* @private
|
|
939
|
+
* @name clear
|
|
940
|
+
* @memberOf Hash
|
|
941
|
+
*/
|
|
396
942
|
function hashClear() {
|
|
397
|
-
this.__data__ =
|
|
943
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
398
944
|
this.size = 0;
|
|
399
945
|
}
|
|
400
|
-
|
|
946
|
+
//#endregion
|
|
947
|
+
//#region ../../node_modules/lodash-es/_hashDelete.js
|
|
948
|
+
/**
|
|
949
|
+
* Removes `key` and its value from the hash.
|
|
950
|
+
*
|
|
951
|
+
* @private
|
|
952
|
+
* @name delete
|
|
953
|
+
* @memberOf Hash
|
|
954
|
+
* @param {Object} hash The hash to modify.
|
|
955
|
+
* @param {string} key The key of the value to remove.
|
|
956
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
957
|
+
*/
|
|
401
958
|
function hashDelete(key) {
|
|
402
959
|
var result = this.has(key) && delete this.__data__[key];
|
|
403
960
|
this.size -= result ? 1 : 0;
|
|
404
961
|
return result;
|
|
405
962
|
}
|
|
406
|
-
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region ../../node_modules/lodash-es/_hashGet.js
|
|
965
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
407
966
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
967
|
+
/** Used to check objects for own properties. */
|
|
408
968
|
var hasOwnProperty$4 = Object.prototype.hasOwnProperty;
|
|
969
|
+
/**
|
|
970
|
+
* Gets the hash value for `key`.
|
|
971
|
+
*
|
|
972
|
+
* @private
|
|
973
|
+
* @name get
|
|
974
|
+
* @memberOf Hash
|
|
975
|
+
* @param {string} key The key of the value to get.
|
|
976
|
+
* @returns {*} Returns the entry value.
|
|
977
|
+
*/
|
|
409
978
|
function hashGet(key) {
|
|
410
979
|
var data = this.__data__;
|
|
411
|
-
if (
|
|
980
|
+
if (nativeCreate) {
|
|
412
981
|
var result = data[key];
|
|
413
982
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
414
983
|
}
|
|
415
984
|
return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
|
|
416
985
|
}
|
|
417
|
-
|
|
986
|
+
//#endregion
|
|
987
|
+
//#region ../../node_modules/lodash-es/_hashHas.js
|
|
988
|
+
/** Used to check objects for own properties. */
|
|
418
989
|
var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
|
990
|
+
/**
|
|
991
|
+
* Checks if a hash value for `key` exists.
|
|
992
|
+
*
|
|
993
|
+
* @private
|
|
994
|
+
* @name has
|
|
995
|
+
* @memberOf Hash
|
|
996
|
+
* @param {string} key The key of the entry to check.
|
|
997
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
998
|
+
*/
|
|
419
999
|
function hashHas(key) {
|
|
420
1000
|
var data = this.__data__;
|
|
421
|
-
return
|
|
1001
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
|
|
422
1002
|
}
|
|
423
|
-
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region ../../node_modules/lodash-es/_hashSet.js
|
|
1005
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
424
1006
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
1007
|
+
/**
|
|
1008
|
+
* Sets the hash `key` to `value`.
|
|
1009
|
+
*
|
|
1010
|
+
* @private
|
|
1011
|
+
* @name set
|
|
1012
|
+
* @memberOf Hash
|
|
1013
|
+
* @param {string} key The key of the value to set.
|
|
1014
|
+
* @param {*} value The value to set.
|
|
1015
|
+
* @returns {Object} Returns the hash instance.
|
|
1016
|
+
*/
|
|
425
1017
|
function hashSet(key, value) {
|
|
426
1018
|
var data = this.__data__;
|
|
427
1019
|
this.size += this.has(key) ? 0 : 1;
|
|
428
|
-
data[key] =
|
|
1020
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
429
1021
|
return this;
|
|
430
1022
|
}
|
|
431
|
-
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region ../../node_modules/lodash-es/_Hash.js
|
|
1025
|
+
/**
|
|
1026
|
+
* Creates a hash object.
|
|
1027
|
+
*
|
|
1028
|
+
* @private
|
|
1029
|
+
* @constructor
|
|
1030
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1031
|
+
*/
|
|
432
1032
|
function Hash(entries) {
|
|
433
1033
|
var index = -1, length = entries == null ? 0 : entries.length;
|
|
434
1034
|
this.clear();
|
|
@@ -437,51 +1037,118 @@ function Hash(entries) {
|
|
|
437
1037
|
this.set(entry[0], entry[1]);
|
|
438
1038
|
}
|
|
439
1039
|
}
|
|
440
|
-
Hash.prototype.clear =
|
|
441
|
-
Hash.prototype["delete"] =
|
|
442
|
-
Hash.prototype.get =
|
|
443
|
-
Hash.prototype.has =
|
|
444
|
-
Hash.prototype.set =
|
|
445
|
-
|
|
1040
|
+
Hash.prototype.clear = hashClear;
|
|
1041
|
+
Hash.prototype["delete"] = hashDelete;
|
|
1042
|
+
Hash.prototype.get = hashGet;
|
|
1043
|
+
Hash.prototype.has = hashHas;
|
|
1044
|
+
Hash.prototype.set = hashSet;
|
|
1045
|
+
//#endregion
|
|
1046
|
+
//#region ../../node_modules/lodash-es/_listCacheClear.js
|
|
1047
|
+
/**
|
|
1048
|
+
* Removes all key-value entries from the list cache.
|
|
1049
|
+
*
|
|
1050
|
+
* @private
|
|
1051
|
+
* @name clear
|
|
1052
|
+
* @memberOf ListCache
|
|
1053
|
+
*/
|
|
446
1054
|
function listCacheClear() {
|
|
447
1055
|
this.__data__ = [];
|
|
448
1056
|
this.size = 0;
|
|
449
1057
|
}
|
|
450
|
-
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region ../../node_modules/lodash-es/_assocIndexOf.js
|
|
1060
|
+
/**
|
|
1061
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1062
|
+
*
|
|
1063
|
+
* @private
|
|
1064
|
+
* @param {Array} array The array to inspect.
|
|
1065
|
+
* @param {*} key The key to search for.
|
|
1066
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1067
|
+
*/
|
|
451
1068
|
function assocIndexOf(array, key) {
|
|
452
1069
|
var length = array.length;
|
|
453
|
-
while (length--) if (
|
|
1070
|
+
while (length--) if (eq(array[length][0], key)) return length;
|
|
454
1071
|
return -1;
|
|
455
1072
|
}
|
|
456
|
-
|
|
1073
|
+
//#endregion
|
|
1074
|
+
//#region ../../node_modules/lodash-es/_listCacheDelete.js
|
|
1075
|
+
/** Built-in value references. */
|
|
457
1076
|
var splice = Array.prototype.splice;
|
|
1077
|
+
/**
|
|
1078
|
+
* Removes `key` and its value from the list cache.
|
|
1079
|
+
*
|
|
1080
|
+
* @private
|
|
1081
|
+
* @name delete
|
|
1082
|
+
* @memberOf ListCache
|
|
1083
|
+
* @param {string} key The key of the value to remove.
|
|
1084
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1085
|
+
*/
|
|
458
1086
|
function listCacheDelete(key) {
|
|
459
|
-
var data = this.__data__, index =
|
|
1087
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
460
1088
|
if (index < 0) return false;
|
|
461
1089
|
if (index == data.length - 1) data.pop();
|
|
462
1090
|
else splice.call(data, index, 1);
|
|
463
1091
|
--this.size;
|
|
464
1092
|
return true;
|
|
465
1093
|
}
|
|
466
|
-
|
|
1094
|
+
//#endregion
|
|
1095
|
+
//#region ../../node_modules/lodash-es/_listCacheGet.js
|
|
1096
|
+
/**
|
|
1097
|
+
* Gets the list cache value for `key`.
|
|
1098
|
+
*
|
|
1099
|
+
* @private
|
|
1100
|
+
* @name get
|
|
1101
|
+
* @memberOf ListCache
|
|
1102
|
+
* @param {string} key The key of the value to get.
|
|
1103
|
+
* @returns {*} Returns the entry value.
|
|
1104
|
+
*/
|
|
467
1105
|
function listCacheGet(key) {
|
|
468
|
-
var data = this.__data__, index =
|
|
1106
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
469
1107
|
return index < 0 ? void 0 : data[index][1];
|
|
470
1108
|
}
|
|
471
|
-
|
|
1109
|
+
//#endregion
|
|
1110
|
+
//#region ../../node_modules/lodash-es/_listCacheHas.js
|
|
1111
|
+
/**
|
|
1112
|
+
* Checks if a list cache value for `key` exists.
|
|
1113
|
+
*
|
|
1114
|
+
* @private
|
|
1115
|
+
* @name has
|
|
1116
|
+
* @memberOf ListCache
|
|
1117
|
+
* @param {string} key The key of the entry to check.
|
|
1118
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1119
|
+
*/
|
|
472
1120
|
function listCacheHas(key) {
|
|
473
|
-
return
|
|
474
|
-
}
|
|
475
|
-
|
|
1121
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
1122
|
+
}
|
|
1123
|
+
//#endregion
|
|
1124
|
+
//#region ../../node_modules/lodash-es/_listCacheSet.js
|
|
1125
|
+
/**
|
|
1126
|
+
* Sets the list cache `key` to `value`.
|
|
1127
|
+
*
|
|
1128
|
+
* @private
|
|
1129
|
+
* @name set
|
|
1130
|
+
* @memberOf ListCache
|
|
1131
|
+
* @param {string} key The key of the value to set.
|
|
1132
|
+
* @param {*} value The value to set.
|
|
1133
|
+
* @returns {Object} Returns the list cache instance.
|
|
1134
|
+
*/
|
|
476
1135
|
function listCacheSet(key, value) {
|
|
477
|
-
var data = this.__data__, index =
|
|
1136
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
478
1137
|
if (index < 0) {
|
|
479
1138
|
++this.size;
|
|
480
1139
|
data.push([key, value]);
|
|
481
1140
|
} else data[index][1] = value;
|
|
482
1141
|
return this;
|
|
483
1142
|
}
|
|
484
|
-
|
|
1143
|
+
//#endregion
|
|
1144
|
+
//#region ../../node_modules/lodash-es/_ListCache.js
|
|
1145
|
+
/**
|
|
1146
|
+
* Creates an list cache object.
|
|
1147
|
+
*
|
|
1148
|
+
* @private
|
|
1149
|
+
* @constructor
|
|
1150
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1151
|
+
*/
|
|
485
1152
|
function ListCache(entries) {
|
|
486
1153
|
var index = -1, length = entries == null ? 0 : entries.length;
|
|
487
1154
|
this.clear();
|
|
@@ -490,54 +1157,129 @@ function ListCache(entries) {
|
|
|
490
1157
|
this.set(entry[0], entry[1]);
|
|
491
1158
|
}
|
|
492
1159
|
}
|
|
493
|
-
ListCache.prototype.clear =
|
|
494
|
-
ListCache.prototype["delete"] =
|
|
495
|
-
ListCache.prototype.get =
|
|
496
|
-
ListCache.prototype.has =
|
|
497
|
-
ListCache.prototype.set =
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
var
|
|
1160
|
+
ListCache.prototype.clear = listCacheClear;
|
|
1161
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
1162
|
+
ListCache.prototype.get = listCacheGet;
|
|
1163
|
+
ListCache.prototype.has = listCacheHas;
|
|
1164
|
+
ListCache.prototype.set = listCacheSet;
|
|
1165
|
+
//#endregion
|
|
1166
|
+
//#region ../../node_modules/lodash-es/_Map.js
|
|
1167
|
+
var Map = getNative(root, "Map");
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region ../../node_modules/lodash-es/_mapCacheClear.js
|
|
1170
|
+
/**
|
|
1171
|
+
* Removes all key-value entries from the map.
|
|
1172
|
+
*
|
|
1173
|
+
* @private
|
|
1174
|
+
* @name clear
|
|
1175
|
+
* @memberOf MapCache
|
|
1176
|
+
*/
|
|
501
1177
|
function mapCacheClear() {
|
|
502
1178
|
this.size = 0;
|
|
503
1179
|
this.__data__ = {
|
|
504
|
-
"hash": new
|
|
505
|
-
"map": new (
|
|
506
|
-
"string": new
|
|
1180
|
+
"hash": new Hash(),
|
|
1181
|
+
"map": new (Map || ListCache)(),
|
|
1182
|
+
"string": new Hash()
|
|
507
1183
|
};
|
|
508
1184
|
}
|
|
509
|
-
|
|
1185
|
+
//#endregion
|
|
1186
|
+
//#region ../../node_modules/lodash-es/_isKeyable.js
|
|
1187
|
+
/**
|
|
1188
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
1189
|
+
*
|
|
1190
|
+
* @private
|
|
1191
|
+
* @param {*} value The value to check.
|
|
1192
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1193
|
+
*/
|
|
510
1194
|
function isKeyable(value) {
|
|
511
1195
|
var type = typeof value;
|
|
512
1196
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
513
1197
|
}
|
|
514
|
-
|
|
1198
|
+
//#endregion
|
|
1199
|
+
//#region ../../node_modules/lodash-es/_getMapData.js
|
|
1200
|
+
/**
|
|
1201
|
+
* Gets the data for `map`.
|
|
1202
|
+
*
|
|
1203
|
+
* @private
|
|
1204
|
+
* @param {Object} map The map to query.
|
|
1205
|
+
* @param {string} key The reference key.
|
|
1206
|
+
* @returns {*} Returns the map data.
|
|
1207
|
+
*/
|
|
515
1208
|
function getMapData(map, key) {
|
|
516
1209
|
var data = map.__data__;
|
|
517
|
-
return
|
|
518
|
-
}
|
|
519
|
-
|
|
1210
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1211
|
+
}
|
|
1212
|
+
//#endregion
|
|
1213
|
+
//#region ../../node_modules/lodash-es/_mapCacheDelete.js
|
|
1214
|
+
/**
|
|
1215
|
+
* Removes `key` and its value from the map.
|
|
1216
|
+
*
|
|
1217
|
+
* @private
|
|
1218
|
+
* @name delete
|
|
1219
|
+
* @memberOf MapCache
|
|
1220
|
+
* @param {string} key The key of the value to remove.
|
|
1221
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1222
|
+
*/
|
|
520
1223
|
function mapCacheDelete(key) {
|
|
521
|
-
var result =
|
|
1224
|
+
var result = getMapData(this, key)["delete"](key);
|
|
522
1225
|
this.size -= result ? 1 : 0;
|
|
523
1226
|
return result;
|
|
524
1227
|
}
|
|
525
|
-
|
|
1228
|
+
//#endregion
|
|
1229
|
+
//#region ../../node_modules/lodash-es/_mapCacheGet.js
|
|
1230
|
+
/**
|
|
1231
|
+
* Gets the map value for `key`.
|
|
1232
|
+
*
|
|
1233
|
+
* @private
|
|
1234
|
+
* @name get
|
|
1235
|
+
* @memberOf MapCache
|
|
1236
|
+
* @param {string} key The key of the value to get.
|
|
1237
|
+
* @returns {*} Returns the entry value.
|
|
1238
|
+
*/
|
|
526
1239
|
function mapCacheGet(key) {
|
|
527
|
-
return
|
|
528
|
-
}
|
|
529
|
-
|
|
1240
|
+
return getMapData(this, key).get(key);
|
|
1241
|
+
}
|
|
1242
|
+
//#endregion
|
|
1243
|
+
//#region ../../node_modules/lodash-es/_mapCacheHas.js
|
|
1244
|
+
/**
|
|
1245
|
+
* Checks if a map value for `key` exists.
|
|
1246
|
+
*
|
|
1247
|
+
* @private
|
|
1248
|
+
* @name has
|
|
1249
|
+
* @memberOf MapCache
|
|
1250
|
+
* @param {string} key The key of the entry to check.
|
|
1251
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1252
|
+
*/
|
|
530
1253
|
function mapCacheHas(key) {
|
|
531
|
-
return
|
|
532
|
-
}
|
|
533
|
-
|
|
1254
|
+
return getMapData(this, key).has(key);
|
|
1255
|
+
}
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region ../../node_modules/lodash-es/_mapCacheSet.js
|
|
1258
|
+
/**
|
|
1259
|
+
* Sets the map `key` to `value`.
|
|
1260
|
+
*
|
|
1261
|
+
* @private
|
|
1262
|
+
* @name set
|
|
1263
|
+
* @memberOf MapCache
|
|
1264
|
+
* @param {string} key The key of the value to set.
|
|
1265
|
+
* @param {*} value The value to set.
|
|
1266
|
+
* @returns {Object} Returns the map cache instance.
|
|
1267
|
+
*/
|
|
534
1268
|
function mapCacheSet(key, value) {
|
|
535
|
-
var data =
|
|
1269
|
+
var data = getMapData(this, key), size = data.size;
|
|
536
1270
|
data.set(key, value);
|
|
537
1271
|
this.size += data.size == size ? 0 : 1;
|
|
538
1272
|
return this;
|
|
539
1273
|
}
|
|
540
|
-
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region ../../node_modules/lodash-es/_MapCache.js
|
|
1276
|
+
/**
|
|
1277
|
+
* Creates a map cache object to store key-value pairs.
|
|
1278
|
+
*
|
|
1279
|
+
* @private
|
|
1280
|
+
* @constructor
|
|
1281
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1282
|
+
*/
|
|
541
1283
|
function MapCache(entries) {
|
|
542
1284
|
var index = -1, length = entries == null ? 0 : entries.length;
|
|
543
1285
|
this.clear();
|
|
@@ -546,13 +1288,59 @@ function MapCache(entries) {
|
|
|
546
1288
|
this.set(entry[0], entry[1]);
|
|
547
1289
|
}
|
|
548
1290
|
}
|
|
549
|
-
MapCache.prototype.clear =
|
|
550
|
-
MapCache.prototype["delete"] =
|
|
551
|
-
MapCache.prototype.get =
|
|
552
|
-
MapCache.prototype.has =
|
|
553
|
-
MapCache.prototype.set =
|
|
554
|
-
|
|
1291
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
1292
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
1293
|
+
MapCache.prototype.get = mapCacheGet;
|
|
1294
|
+
MapCache.prototype.has = mapCacheHas;
|
|
1295
|
+
MapCache.prototype.set = mapCacheSet;
|
|
1296
|
+
//#endregion
|
|
1297
|
+
//#region ../../node_modules/lodash-es/memoize.js
|
|
1298
|
+
/** Error message constants. */
|
|
555
1299
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1300
|
+
/**
|
|
1301
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1302
|
+
* provided, it determines the cache key for storing the result based on the
|
|
1303
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
1304
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
1305
|
+
* is invoked with the `this` binding of the memoized function.
|
|
1306
|
+
*
|
|
1307
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1308
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1309
|
+
* constructor with one whose instances implement the
|
|
1310
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1311
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1312
|
+
*
|
|
1313
|
+
* @static
|
|
1314
|
+
* @memberOf _
|
|
1315
|
+
* @since 0.1.0
|
|
1316
|
+
* @category Function
|
|
1317
|
+
* @param {Function} func The function to have its output memoized.
|
|
1318
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1319
|
+
* @returns {Function} Returns the new memoized function.
|
|
1320
|
+
* @example
|
|
1321
|
+
*
|
|
1322
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
1323
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
1324
|
+
*
|
|
1325
|
+
* var values = _.memoize(_.values);
|
|
1326
|
+
* values(object);
|
|
1327
|
+
* // => [1, 2]
|
|
1328
|
+
*
|
|
1329
|
+
* values(other);
|
|
1330
|
+
* // => [3, 4]
|
|
1331
|
+
*
|
|
1332
|
+
* object.a = 2;
|
|
1333
|
+
* values(object);
|
|
1334
|
+
* // => [1, 2]
|
|
1335
|
+
*
|
|
1336
|
+
* // Modify the result cache.
|
|
1337
|
+
* values.cache.set(object, ['a', 'b']);
|
|
1338
|
+
* values(object);
|
|
1339
|
+
* // => ['a', 'b']
|
|
1340
|
+
*
|
|
1341
|
+
* // Replace `_.memoize.Cache`.
|
|
1342
|
+
* _.memoize.Cache = WeakMap;
|
|
1343
|
+
*/
|
|
556
1344
|
function memoize(func, resolver) {
|
|
557
1345
|
if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
558
1346
|
var memoized = function() {
|
|
@@ -562,24 +1350,44 @@ function memoize(func, resolver) {
|
|
|
562
1350
|
memoized.cache = cache.set(key, result) || cache;
|
|
563
1351
|
return result;
|
|
564
1352
|
};
|
|
565
|
-
memoized.cache = new (memoize.Cache ||
|
|
1353
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
566
1354
|
return memoized;
|
|
567
1355
|
}
|
|
568
|
-
memoize.Cache =
|
|
569
|
-
|
|
1356
|
+
memoize.Cache = MapCache;
|
|
1357
|
+
//#endregion
|
|
1358
|
+
//#region ../../node_modules/lodash-es/_memoizeCapped.js
|
|
1359
|
+
/** Used as the maximum memoize cache size. */
|
|
570
1360
|
var MAX_MEMOIZE_SIZE = 500;
|
|
1361
|
+
/**
|
|
1362
|
+
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1363
|
+
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1364
|
+
*
|
|
1365
|
+
* @private
|
|
1366
|
+
* @param {Function} func The function to have its output memoized.
|
|
1367
|
+
* @returns {Function} Returns the new memoized function.
|
|
1368
|
+
*/
|
|
571
1369
|
function memoizeCapped(func) {
|
|
572
|
-
var result =
|
|
1370
|
+
var result = memoize(func, function(key) {
|
|
573
1371
|
if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
|
|
574
1372
|
return key;
|
|
575
1373
|
});
|
|
576
1374
|
var cache = result.cache;
|
|
577
1375
|
return result;
|
|
578
1376
|
}
|
|
579
|
-
|
|
1377
|
+
//#endregion
|
|
1378
|
+
//#region ../../node_modules/lodash-es/_stringToPath.js
|
|
1379
|
+
/** Used to match property names within property paths. */
|
|
580
1380
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1381
|
+
/** Used to match backslashes in property paths. */
|
|
581
1382
|
var reEscapeChar = /\\(\\)?/g;
|
|
582
|
-
|
|
1383
|
+
/**
|
|
1384
|
+
* Converts `string` to a property path array.
|
|
1385
|
+
*
|
|
1386
|
+
* @private
|
|
1387
|
+
* @param {string} string The string to convert.
|
|
1388
|
+
* @returns {Array} Returns the property path array.
|
|
1389
|
+
*/
|
|
1390
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
583
1391
|
var result = [];
|
|
584
1392
|
if (string.charCodeAt(0) === 46) result.push("");
|
|
585
1393
|
string.replace(rePropName, function(match, number, quote, subString) {
|
|
@@ -587,93 +1395,259 @@ var stringToPath = _memoizeCapped_default(function(string) {
|
|
|
587
1395
|
});
|
|
588
1396
|
return result;
|
|
589
1397
|
});
|
|
590
|
-
|
|
1398
|
+
//#endregion
|
|
1399
|
+
//#region ../../node_modules/lodash-es/toString.js
|
|
1400
|
+
/**
|
|
1401
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
1402
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
1403
|
+
*
|
|
1404
|
+
* @static
|
|
1405
|
+
* @memberOf _
|
|
1406
|
+
* @since 4.0.0
|
|
1407
|
+
* @category Lang
|
|
1408
|
+
* @param {*} value The value to convert.
|
|
1409
|
+
* @returns {string} Returns the converted string.
|
|
1410
|
+
* @example
|
|
1411
|
+
*
|
|
1412
|
+
* _.toString(null);
|
|
1413
|
+
* // => ''
|
|
1414
|
+
*
|
|
1415
|
+
* _.toString(-0);
|
|
1416
|
+
* // => '-0'
|
|
1417
|
+
*
|
|
1418
|
+
* _.toString([1, 2, 3]);
|
|
1419
|
+
* // => '1,2,3'
|
|
1420
|
+
*/
|
|
591
1421
|
function toString(value) {
|
|
592
|
-
return value == null ? "" :
|
|
593
|
-
}
|
|
594
|
-
|
|
1422
|
+
return value == null ? "" : baseToString(value);
|
|
1423
|
+
}
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region ../../node_modules/lodash-es/_castPath.js
|
|
1426
|
+
/**
|
|
1427
|
+
* Casts `value` to a path array if it's not one.
|
|
1428
|
+
*
|
|
1429
|
+
* @private
|
|
1430
|
+
* @param {*} value The value to inspect.
|
|
1431
|
+
* @param {Object} [object] The object to query keys on.
|
|
1432
|
+
* @returns {Array} Returns the cast property path array.
|
|
1433
|
+
*/
|
|
595
1434
|
function castPath(value, object) {
|
|
596
|
-
if (
|
|
597
|
-
return
|
|
1435
|
+
if (isArray(value)) return value;
|
|
1436
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
598
1437
|
}
|
|
599
|
-
|
|
1438
|
+
//#endregion
|
|
1439
|
+
//#region ../../node_modules/lodash-es/_toKey.js
|
|
1440
|
+
/** Used as references for various `Number` constants. */
|
|
600
1441
|
var INFINITY = Infinity;
|
|
1442
|
+
/**
|
|
1443
|
+
* Converts `value` to a string key if it's not a string or symbol.
|
|
1444
|
+
*
|
|
1445
|
+
* @private
|
|
1446
|
+
* @param {*} value The value to inspect.
|
|
1447
|
+
* @returns {string|symbol} Returns the key.
|
|
1448
|
+
*/
|
|
601
1449
|
function toKey(value) {
|
|
602
|
-
if (typeof value == "string" ||
|
|
1450
|
+
if (typeof value == "string" || isSymbol(value)) return value;
|
|
603
1451
|
var result = value + "";
|
|
604
1452
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
605
1453
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
1454
|
+
//#endregion
|
|
1455
|
+
//#region ../../node_modules/lodash-es/_baseGet.js
|
|
1456
|
+
/**
|
|
1457
|
+
* The base implementation of `_.get` without support for default values.
|
|
1458
|
+
*
|
|
1459
|
+
* @private
|
|
1460
|
+
* @param {Object} object The object to query.
|
|
1461
|
+
* @param {Array|string} path The path of the property to get.
|
|
1462
|
+
* @returns {*} Returns the resolved value.
|
|
1463
|
+
*/
|
|
1464
|
+
function baseGet(object, path) {
|
|
1465
|
+
path = castPath(path, object);
|
|
1466
|
+
var index = 0, length = path.length;
|
|
1467
|
+
while (object != null && index < length) object = object[toKey(path[index++])];
|
|
611
1468
|
return index && index == length ? object : void 0;
|
|
612
1469
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
1470
|
+
//#endregion
|
|
1471
|
+
//#region ../../node_modules/lodash-es/get.js
|
|
1472
|
+
/**
|
|
1473
|
+
* Gets the value at `path` of `object`. If the resolved value is
|
|
1474
|
+
* `undefined`, the `defaultValue` is returned in its place.
|
|
1475
|
+
*
|
|
1476
|
+
* @static
|
|
1477
|
+
* @memberOf _
|
|
1478
|
+
* @since 3.7.0
|
|
1479
|
+
* @category Object
|
|
1480
|
+
* @param {Object} object The object to query.
|
|
1481
|
+
* @param {Array|string} path The path of the property to get.
|
|
1482
|
+
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1483
|
+
* @returns {*} Returns the resolved value.
|
|
1484
|
+
* @example
|
|
1485
|
+
*
|
|
1486
|
+
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1487
|
+
*
|
|
1488
|
+
* _.get(object, 'a[0].b.c');
|
|
1489
|
+
* // => 3
|
|
1490
|
+
*
|
|
1491
|
+
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1492
|
+
* // => 3
|
|
1493
|
+
*
|
|
1494
|
+
* _.get(object, 'a.b.c', 'default');
|
|
1495
|
+
* // => 'default'
|
|
1496
|
+
*/
|
|
1497
|
+
function get(object, path, defaultValue) {
|
|
1498
|
+
var result = object == null ? void 0 : baseGet(object, path);
|
|
616
1499
|
return result === void 0 ? defaultValue : result;
|
|
617
1500
|
}
|
|
618
|
-
|
|
1501
|
+
//#endregion
|
|
1502
|
+
//#region ../../node_modules/lodash-es/_arrayPush.js
|
|
1503
|
+
/**
|
|
1504
|
+
* Appends the elements of `values` to `array`.
|
|
1505
|
+
*
|
|
1506
|
+
* @private
|
|
1507
|
+
* @param {Array} array The array to modify.
|
|
1508
|
+
* @param {Array} values The values to append.
|
|
1509
|
+
* @returns {Array} Returns `array`.
|
|
1510
|
+
*/
|
|
619
1511
|
function arrayPush(array, values) {
|
|
620
1512
|
var index = -1, length = values.length, offset = array.length;
|
|
621
1513
|
while (++index < length) array[offset + index] = values[index];
|
|
622
1514
|
return array;
|
|
623
1515
|
}
|
|
624
|
-
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region ../../node_modules/lodash-es/_arrayReduce.js
|
|
1518
|
+
/**
|
|
1519
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
1520
|
+
* iteratee shorthands.
|
|
1521
|
+
*
|
|
1522
|
+
* @private
|
|
1523
|
+
* @param {Array} [array] The array to iterate over.
|
|
1524
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
1525
|
+
* @param {*} [accumulator] The initial value.
|
|
1526
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
1527
|
+
* the initial value.
|
|
1528
|
+
* @returns {*} Returns the accumulated value.
|
|
1529
|
+
*/
|
|
625
1530
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
626
1531
|
var index = -1, length = array == null ? 0 : array.length;
|
|
627
1532
|
if (initAccum && length) accumulator = array[++index];
|
|
628
1533
|
while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
|
|
629
1534
|
return accumulator;
|
|
630
1535
|
}
|
|
631
|
-
|
|
1536
|
+
//#endregion
|
|
1537
|
+
//#region ../../node_modules/lodash-es/_stackClear.js
|
|
1538
|
+
/**
|
|
1539
|
+
* Removes all key-value entries from the stack.
|
|
1540
|
+
*
|
|
1541
|
+
* @private
|
|
1542
|
+
* @name clear
|
|
1543
|
+
* @memberOf Stack
|
|
1544
|
+
*/
|
|
632
1545
|
function stackClear() {
|
|
633
|
-
this.__data__ = new
|
|
1546
|
+
this.__data__ = new ListCache();
|
|
634
1547
|
this.size = 0;
|
|
635
1548
|
}
|
|
636
|
-
|
|
1549
|
+
//#endregion
|
|
1550
|
+
//#region ../../node_modules/lodash-es/_stackDelete.js
|
|
1551
|
+
/**
|
|
1552
|
+
* Removes `key` and its value from the stack.
|
|
1553
|
+
*
|
|
1554
|
+
* @private
|
|
1555
|
+
* @name delete
|
|
1556
|
+
* @memberOf Stack
|
|
1557
|
+
* @param {string} key The key of the value to remove.
|
|
1558
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1559
|
+
*/
|
|
637
1560
|
function stackDelete(key) {
|
|
638
1561
|
var data = this.__data__, result = data["delete"](key);
|
|
639
1562
|
this.size = data.size;
|
|
640
1563
|
return result;
|
|
641
1564
|
}
|
|
642
|
-
|
|
1565
|
+
//#endregion
|
|
1566
|
+
//#region ../../node_modules/lodash-es/_stackGet.js
|
|
1567
|
+
/**
|
|
1568
|
+
* Gets the stack value for `key`.
|
|
1569
|
+
*
|
|
1570
|
+
* @private
|
|
1571
|
+
* @name get
|
|
1572
|
+
* @memberOf Stack
|
|
1573
|
+
* @param {string} key The key of the value to get.
|
|
1574
|
+
* @returns {*} Returns the entry value.
|
|
1575
|
+
*/
|
|
643
1576
|
function stackGet(key) {
|
|
644
1577
|
return this.__data__.get(key);
|
|
645
1578
|
}
|
|
646
|
-
|
|
1579
|
+
//#endregion
|
|
1580
|
+
//#region ../../node_modules/lodash-es/_stackHas.js
|
|
1581
|
+
/**
|
|
1582
|
+
* Checks if a stack value for `key` exists.
|
|
1583
|
+
*
|
|
1584
|
+
* @private
|
|
1585
|
+
* @name has
|
|
1586
|
+
* @memberOf Stack
|
|
1587
|
+
* @param {string} key The key of the entry to check.
|
|
1588
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1589
|
+
*/
|
|
647
1590
|
function stackHas(key) {
|
|
648
1591
|
return this.__data__.has(key);
|
|
649
1592
|
}
|
|
650
|
-
|
|
1593
|
+
//#endregion
|
|
1594
|
+
//#region ../../node_modules/lodash-es/_stackSet.js
|
|
1595
|
+
/** Used as the size to enable large array optimizations. */
|
|
651
1596
|
var LARGE_ARRAY_SIZE = 200;
|
|
1597
|
+
/**
|
|
1598
|
+
* Sets the stack `key` to `value`.
|
|
1599
|
+
*
|
|
1600
|
+
* @private
|
|
1601
|
+
* @name set
|
|
1602
|
+
* @memberOf Stack
|
|
1603
|
+
* @param {string} key The key of the value to set.
|
|
1604
|
+
* @param {*} value The value to set.
|
|
1605
|
+
* @returns {Object} Returns the stack cache instance.
|
|
1606
|
+
*/
|
|
652
1607
|
function stackSet(key, value) {
|
|
653
1608
|
var data = this.__data__;
|
|
654
|
-
if (data instanceof
|
|
1609
|
+
if (data instanceof ListCache) {
|
|
655
1610
|
var pairs = data.__data__;
|
|
656
|
-
if (!
|
|
1611
|
+
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
657
1612
|
pairs.push([key, value]);
|
|
658
1613
|
this.size = ++data.size;
|
|
659
1614
|
return this;
|
|
660
1615
|
}
|
|
661
|
-
data = this.__data__ = new
|
|
1616
|
+
data = this.__data__ = new MapCache(pairs);
|
|
662
1617
|
}
|
|
663
1618
|
data.set(key, value);
|
|
664
1619
|
this.size = data.size;
|
|
665
1620
|
return this;
|
|
666
1621
|
}
|
|
667
|
-
|
|
1622
|
+
//#endregion
|
|
1623
|
+
//#region ../../node_modules/lodash-es/_Stack.js
|
|
1624
|
+
/**
|
|
1625
|
+
* Creates a stack cache object to store key-value pairs.
|
|
1626
|
+
*
|
|
1627
|
+
* @private
|
|
1628
|
+
* @constructor
|
|
1629
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1630
|
+
*/
|
|
668
1631
|
function Stack(entries) {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
Stack.prototype
|
|
673
|
-
Stack.prototype
|
|
674
|
-
Stack.prototype.
|
|
675
|
-
Stack.prototype.
|
|
676
|
-
|
|
1632
|
+
var data = this.__data__ = new ListCache(entries);
|
|
1633
|
+
this.size = data.size;
|
|
1634
|
+
}
|
|
1635
|
+
Stack.prototype.clear = stackClear;
|
|
1636
|
+
Stack.prototype["delete"] = stackDelete;
|
|
1637
|
+
Stack.prototype.get = stackGet;
|
|
1638
|
+
Stack.prototype.has = stackHas;
|
|
1639
|
+
Stack.prototype.set = stackSet;
|
|
1640
|
+
//#endregion
|
|
1641
|
+
//#region ../../node_modules/lodash-es/_arrayFilter.js
|
|
1642
|
+
/**
|
|
1643
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
1644
|
+
* iteratee shorthands.
|
|
1645
|
+
*
|
|
1646
|
+
* @private
|
|
1647
|
+
* @param {Array} [array] The array to iterate over.
|
|
1648
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
1649
|
+
* @returns {Array} Returns the new filtered array.
|
|
1650
|
+
*/
|
|
677
1651
|
function arrayFilter(array, predicate) {
|
|
678
1652
|
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
679
1653
|
while (++index < length) {
|
|
@@ -682,42 +1656,103 @@ function arrayFilter(array, predicate) {
|
|
|
682
1656
|
}
|
|
683
1657
|
return result;
|
|
684
1658
|
}
|
|
685
|
-
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region ../../node_modules/lodash-es/stubArray.js
|
|
1661
|
+
/**
|
|
1662
|
+
* This method returns a new empty array.
|
|
1663
|
+
*
|
|
1664
|
+
* @static
|
|
1665
|
+
* @memberOf _
|
|
1666
|
+
* @since 4.13.0
|
|
1667
|
+
* @category Util
|
|
1668
|
+
* @returns {Array} Returns the new empty array.
|
|
1669
|
+
* @example
|
|
1670
|
+
*
|
|
1671
|
+
* var arrays = _.times(2, _.stubArray);
|
|
1672
|
+
*
|
|
1673
|
+
* console.log(arrays);
|
|
1674
|
+
* // => [[], []]
|
|
1675
|
+
*
|
|
1676
|
+
* console.log(arrays[0] === arrays[1]);
|
|
1677
|
+
* // => false
|
|
1678
|
+
*/
|
|
686
1679
|
function stubArray() {
|
|
687
1680
|
return [];
|
|
688
1681
|
}
|
|
689
|
-
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region ../../node_modules/lodash-es/_getSymbols.js
|
|
1684
|
+
/** Built-in value references. */
|
|
690
1685
|
var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
691
1686
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
692
|
-
|
|
1687
|
+
/**
|
|
1688
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
1689
|
+
*
|
|
1690
|
+
* @private
|
|
1691
|
+
* @param {Object} object The object to query.
|
|
1692
|
+
* @returns {Array} Returns the array of symbols.
|
|
1693
|
+
*/
|
|
1694
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
693
1695
|
if (object == null) return [];
|
|
694
1696
|
object = Object(object);
|
|
695
|
-
return
|
|
1697
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
696
1698
|
return propertyIsEnumerable.call(object, symbol);
|
|
697
1699
|
});
|
|
698
1700
|
};
|
|
699
|
-
|
|
1701
|
+
//#endregion
|
|
1702
|
+
//#region ../../node_modules/lodash-es/_baseGetAllKeys.js
|
|
1703
|
+
/**
|
|
1704
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
1705
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
1706
|
+
* symbols of `object`.
|
|
1707
|
+
*
|
|
1708
|
+
* @private
|
|
1709
|
+
* @param {Object} object The object to query.
|
|
1710
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
1711
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
1712
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
1713
|
+
*/
|
|
700
1714
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
701
1715
|
var result = keysFunc(object);
|
|
702
|
-
return
|
|
703
|
-
}
|
|
704
|
-
|
|
1716
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1717
|
+
}
|
|
1718
|
+
//#endregion
|
|
1719
|
+
//#region ../../node_modules/lodash-es/_getAllKeys.js
|
|
1720
|
+
/**
|
|
1721
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
1722
|
+
*
|
|
1723
|
+
* @private
|
|
1724
|
+
* @param {Object} object The object to query.
|
|
1725
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
1726
|
+
*/
|
|
705
1727
|
function getAllKeys(object) {
|
|
706
|
-
return
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
var
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
var
|
|
714
|
-
|
|
1728
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
1729
|
+
}
|
|
1730
|
+
//#endregion
|
|
1731
|
+
//#region ../../node_modules/lodash-es/_DataView.js
|
|
1732
|
+
var DataView = getNative(root, "DataView");
|
|
1733
|
+
//#endregion
|
|
1734
|
+
//#region ../../node_modules/lodash-es/_Promise.js
|
|
1735
|
+
var Promise$1 = getNative(root, "Promise");
|
|
1736
|
+
//#endregion
|
|
1737
|
+
//#region ../../node_modules/lodash-es/_Set.js
|
|
1738
|
+
var Set = getNative(root, "Set");
|
|
1739
|
+
//#endregion
|
|
1740
|
+
//#region ../../node_modules/lodash-es/_getTag.js
|
|
1741
|
+
/** `Object#toString` result references. */
|
|
715
1742
|
var mapTag$2 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$2 = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
716
1743
|
var dataViewTag$1 = "[object DataView]";
|
|
717
|
-
|
|
718
|
-
var
|
|
719
|
-
|
|
720
|
-
|
|
1744
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
1745
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
1746
|
+
/**
|
|
1747
|
+
* Gets the `toStringTag` of `value`.
|
|
1748
|
+
*
|
|
1749
|
+
* @private
|
|
1750
|
+
* @param {*} value The value to query.
|
|
1751
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1752
|
+
*/
|
|
1753
|
+
var getTag = baseGetTag;
|
|
1754
|
+
if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag$1 || Map && getTag(new Map()) != mapTag$2 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$2 || WeakMap && getTag(new WeakMap()) != weakMapTag) getTag = function(value) {
|
|
1755
|
+
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
721
1756
|
if (ctorString) switch (ctorString) {
|
|
722
1757
|
case dataViewCtorString: return dataViewTag$1;
|
|
723
1758
|
case mapCtorString: return mapTag$2;
|
|
@@ -728,44 +1763,113 @@ if (_DataView_default && getTag(new _DataView_default(/* @__PURE__ */ new ArrayB
|
|
|
728
1763
|
return result;
|
|
729
1764
|
};
|
|
730
1765
|
var _getTag_default = getTag;
|
|
731
|
-
|
|
732
|
-
|
|
1766
|
+
//#endregion
|
|
1767
|
+
//#region ../../node_modules/lodash-es/_Uint8Array.js
|
|
1768
|
+
/** Built-in value references. */
|
|
1769
|
+
var Uint8Array$1 = root.Uint8Array;
|
|
1770
|
+
//#endregion
|
|
1771
|
+
//#region ../../node_modules/lodash-es/_setCacheAdd.js
|
|
1772
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
733
1773
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1774
|
+
/**
|
|
1775
|
+
* Adds `value` to the array cache.
|
|
1776
|
+
*
|
|
1777
|
+
* @private
|
|
1778
|
+
* @name add
|
|
1779
|
+
* @memberOf SetCache
|
|
1780
|
+
* @alias push
|
|
1781
|
+
* @param {*} value The value to cache.
|
|
1782
|
+
* @returns {Object} Returns the cache instance.
|
|
1783
|
+
*/
|
|
734
1784
|
function setCacheAdd(value) {
|
|
735
1785
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
736
1786
|
return this;
|
|
737
1787
|
}
|
|
738
|
-
|
|
1788
|
+
//#endregion
|
|
1789
|
+
//#region ../../node_modules/lodash-es/_setCacheHas.js
|
|
1790
|
+
/**
|
|
1791
|
+
* Checks if `value` is in the array cache.
|
|
1792
|
+
*
|
|
1793
|
+
* @private
|
|
1794
|
+
* @name has
|
|
1795
|
+
* @memberOf SetCache
|
|
1796
|
+
* @param {*} value The value to search for.
|
|
1797
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
1798
|
+
*/
|
|
739
1799
|
function setCacheHas(value) {
|
|
740
1800
|
return this.__data__.has(value);
|
|
741
1801
|
}
|
|
742
|
-
|
|
1802
|
+
//#endregion
|
|
1803
|
+
//#region ../../node_modules/lodash-es/_SetCache.js
|
|
1804
|
+
/**
|
|
1805
|
+
*
|
|
1806
|
+
* Creates an array cache object to store unique values.
|
|
1807
|
+
*
|
|
1808
|
+
* @private
|
|
1809
|
+
* @constructor
|
|
1810
|
+
* @param {Array} [values] The values to cache.
|
|
1811
|
+
*/
|
|
743
1812
|
function SetCache(values) {
|
|
744
1813
|
var index = -1, length = values == null ? 0 : values.length;
|
|
745
|
-
this.__data__ = new
|
|
1814
|
+
this.__data__ = new MapCache();
|
|
746
1815
|
while (++index < length) this.add(values[index]);
|
|
747
1816
|
}
|
|
748
|
-
SetCache.prototype.add = SetCache.prototype.push =
|
|
749
|
-
SetCache.prototype.has =
|
|
750
|
-
|
|
1817
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1818
|
+
SetCache.prototype.has = setCacheHas;
|
|
1819
|
+
//#endregion
|
|
1820
|
+
//#region ../../node_modules/lodash-es/_arraySome.js
|
|
1821
|
+
/**
|
|
1822
|
+
* A specialized version of `_.some` for arrays without support for iteratee
|
|
1823
|
+
* shorthands.
|
|
1824
|
+
*
|
|
1825
|
+
* @private
|
|
1826
|
+
* @param {Array} [array] The array to iterate over.
|
|
1827
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
1828
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
1829
|
+
* else `false`.
|
|
1830
|
+
*/
|
|
751
1831
|
function arraySome(array, predicate) {
|
|
752
1832
|
var index = -1, length = array == null ? 0 : array.length;
|
|
753
1833
|
while (++index < length) if (predicate(array[index], index, array)) return true;
|
|
754
1834
|
return false;
|
|
755
1835
|
}
|
|
756
|
-
|
|
1836
|
+
//#endregion
|
|
1837
|
+
//#region ../../node_modules/lodash-es/_cacheHas.js
|
|
1838
|
+
/**
|
|
1839
|
+
* Checks if a `cache` value for `key` exists.
|
|
1840
|
+
*
|
|
1841
|
+
* @private
|
|
1842
|
+
* @param {Object} cache The cache to query.
|
|
1843
|
+
* @param {string} key The key of the entry to check.
|
|
1844
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1845
|
+
*/
|
|
757
1846
|
function cacheHas(cache, key) {
|
|
758
1847
|
return cache.has(key);
|
|
759
1848
|
}
|
|
760
|
-
|
|
1849
|
+
//#endregion
|
|
1850
|
+
//#region ../../node_modules/lodash-es/_equalArrays.js
|
|
1851
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
761
1852
|
var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
|
|
1853
|
+
/**
|
|
1854
|
+
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
1855
|
+
* partial deep comparisons.
|
|
1856
|
+
*
|
|
1857
|
+
* @private
|
|
1858
|
+
* @param {Array} array The array to compare.
|
|
1859
|
+
* @param {Array} other The other array to compare.
|
|
1860
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
1861
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
1862
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
1863
|
+
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
1864
|
+
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
1865
|
+
*/
|
|
762
1866
|
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
763
1867
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
|
|
764
1868
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
|
|
765
1869
|
var arrStacked = stack.get(array);
|
|
766
1870
|
var othStacked = stack.get(other);
|
|
767
1871
|
if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
|
|
768
|
-
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new
|
|
1872
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
|
769
1873
|
stack.set(array, other);
|
|
770
1874
|
stack.set(other, array);
|
|
771
1875
|
while (++index < arrLength) {
|
|
@@ -777,8 +1881,8 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
|
777
1881
|
break;
|
|
778
1882
|
}
|
|
779
1883
|
if (seen) {
|
|
780
|
-
if (!
|
|
781
|
-
if (!
|
|
1884
|
+
if (!arraySome(other, function(othValue, othIndex) {
|
|
1885
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
|
|
782
1886
|
})) {
|
|
783
1887
|
result = false;
|
|
784
1888
|
break;
|
|
@@ -792,7 +1896,15 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
|
792
1896
|
stack["delete"](other);
|
|
793
1897
|
return result;
|
|
794
1898
|
}
|
|
795
|
-
|
|
1899
|
+
//#endregion
|
|
1900
|
+
//#region ../../node_modules/lodash-es/_mapToArray.js
|
|
1901
|
+
/**
|
|
1902
|
+
* Converts `map` to its key-value pairs.
|
|
1903
|
+
*
|
|
1904
|
+
* @private
|
|
1905
|
+
* @param {Object} map The map to convert.
|
|
1906
|
+
* @returns {Array} Returns the key-value pairs.
|
|
1907
|
+
*/
|
|
796
1908
|
function mapToArray(map) {
|
|
797
1909
|
var index = -1, result = Array(map.size);
|
|
798
1910
|
map.forEach(function(value, key) {
|
|
@@ -800,7 +1912,15 @@ function mapToArray(map) {
|
|
|
800
1912
|
});
|
|
801
1913
|
return result;
|
|
802
1914
|
}
|
|
803
|
-
|
|
1915
|
+
//#endregion
|
|
1916
|
+
//#region ../../node_modules/lodash-es/_setToArray.js
|
|
1917
|
+
/**
|
|
1918
|
+
* Converts `set` to an array of its values.
|
|
1919
|
+
*
|
|
1920
|
+
* @private
|
|
1921
|
+
* @param {Object} set The set to convert.
|
|
1922
|
+
* @returns {Array} Returns the values.
|
|
1923
|
+
*/
|
|
804
1924
|
function setToArray(set) {
|
|
805
1925
|
var index = -1, result = Array(set.size);
|
|
806
1926
|
set.forEach(function(value) {
|
|
@@ -808,11 +1928,32 @@ function setToArray(set) {
|
|
|
808
1928
|
});
|
|
809
1929
|
return result;
|
|
810
1930
|
}
|
|
811
|
-
|
|
1931
|
+
//#endregion
|
|
1932
|
+
//#region ../../node_modules/lodash-es/_equalByTag.js
|
|
1933
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
812
1934
|
var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
|
|
1935
|
+
/** `Object#toString` result references. */
|
|
813
1936
|
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
|
|
814
1937
|
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
815
|
-
|
|
1938
|
+
/** Used to convert symbols to primitives and strings. */
|
|
1939
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
1940
|
+
/**
|
|
1941
|
+
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
1942
|
+
* the same `toStringTag`.
|
|
1943
|
+
*
|
|
1944
|
+
* **Note:** This function only supports comparing values with tags of
|
|
1945
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
1946
|
+
*
|
|
1947
|
+
* @private
|
|
1948
|
+
* @param {Object} object The object to compare.
|
|
1949
|
+
* @param {Object} other The other object to compare.
|
|
1950
|
+
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
1951
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
1952
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
1953
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
1954
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
1955
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
1956
|
+
*/
|
|
816
1957
|
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
817
1958
|
switch (tag) {
|
|
818
1959
|
case dataViewTag:
|
|
@@ -820,36 +1961,52 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
820
1961
|
object = object.buffer;
|
|
821
1962
|
other = other.buffer;
|
|
822
1963
|
case arrayBufferTag:
|
|
823
|
-
if (object.byteLength != other.byteLength || !equalFunc(new
|
|
1964
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) return false;
|
|
824
1965
|
return true;
|
|
825
1966
|
case boolTag:
|
|
826
1967
|
case dateTag:
|
|
827
|
-
case numberTag: return
|
|
1968
|
+
case numberTag: return eq(+object, +other);
|
|
828
1969
|
case errorTag: return object.name == other.name && object.message == other.message;
|
|
829
1970
|
case regexpTag:
|
|
830
1971
|
case stringTag: return object == other + "";
|
|
831
|
-
case mapTag$1: var convert =
|
|
1972
|
+
case mapTag$1: var convert = mapToArray;
|
|
832
1973
|
case setTag$1:
|
|
833
1974
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
|
|
834
|
-
convert || (convert =
|
|
1975
|
+
convert || (convert = setToArray);
|
|
835
1976
|
if (object.size != other.size && !isPartial) return false;
|
|
836
1977
|
var stacked = stack.get(object);
|
|
837
1978
|
if (stacked) return stacked == other;
|
|
838
1979
|
bitmask |= COMPARE_UNORDERED_FLAG$2;
|
|
839
1980
|
stack.set(object, other);
|
|
840
|
-
var result =
|
|
1981
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
841
1982
|
stack["delete"](object);
|
|
842
1983
|
return result;
|
|
843
1984
|
case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
844
1985
|
}
|
|
845
1986
|
return false;
|
|
846
1987
|
}
|
|
847
|
-
|
|
1988
|
+
//#endregion
|
|
1989
|
+
//#region ../../node_modules/lodash-es/_equalObjects.js
|
|
1990
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
848
1991
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
1992
|
+
/** Used to check objects for own properties. */
|
|
849
1993
|
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
1994
|
+
/**
|
|
1995
|
+
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
1996
|
+
* partial deep comparisons.
|
|
1997
|
+
*
|
|
1998
|
+
* @private
|
|
1999
|
+
* @param {Object} object The object to compare.
|
|
2000
|
+
* @param {Object} other The other object to compare.
|
|
2001
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
2002
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
2003
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
2004
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
2005
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
2006
|
+
*/
|
|
850
2007
|
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
851
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps =
|
|
852
|
-
if (objLength !=
|
|
2008
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length;
|
|
2009
|
+
if (objLength != getAllKeys(other).length && !isPartial) return false;
|
|
853
2010
|
var index = objLength;
|
|
854
2011
|
while (index--) {
|
|
855
2012
|
var key = objProps[index];
|
|
@@ -880,44 +2037,89 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
880
2037
|
stack["delete"](other);
|
|
881
2038
|
return result;
|
|
882
2039
|
}
|
|
883
|
-
|
|
2040
|
+
//#endregion
|
|
2041
|
+
//#region ../../node_modules/lodash-es/_baseIsEqualDeep.js
|
|
2042
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
884
2043
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
2044
|
+
/** `Object#toString` result references. */
|
|
885
2045
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
2046
|
+
/** Used to check objects for own properties. */
|
|
886
2047
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
2048
|
+
/**
|
|
2049
|
+
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
2050
|
+
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
2051
|
+
* references to be compared.
|
|
2052
|
+
*
|
|
2053
|
+
* @private
|
|
2054
|
+
* @param {Object} object The object to compare.
|
|
2055
|
+
* @param {Object} other The other object to compare.
|
|
2056
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
2057
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
2058
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
2059
|
+
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
2060
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
2061
|
+
*/
|
|
887
2062
|
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
888
|
-
var objIsArr =
|
|
2063
|
+
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : _getTag_default(object), othTag = othIsArr ? arrayTag : _getTag_default(other);
|
|
889
2064
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
890
2065
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
891
2066
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
892
|
-
if (isSameTag &&
|
|
893
|
-
if (!
|
|
2067
|
+
if (isSameTag && isBuffer(object)) {
|
|
2068
|
+
if (!isBuffer(other)) return false;
|
|
894
2069
|
objIsArr = true;
|
|
895
2070
|
objIsObj = false;
|
|
896
2071
|
}
|
|
897
2072
|
if (isSameTag && !objIsObj) {
|
|
898
|
-
stack || (stack = new
|
|
899
|
-
return objIsArr ||
|
|
2073
|
+
stack || (stack = new Stack());
|
|
2074
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
900
2075
|
}
|
|
901
2076
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
902
2077
|
var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
|
|
903
2078
|
if (objIsWrapped || othIsWrapped) {
|
|
904
2079
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
905
|
-
stack || (stack = new
|
|
2080
|
+
stack || (stack = new Stack());
|
|
906
2081
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
907
2082
|
}
|
|
908
2083
|
}
|
|
909
2084
|
if (!isSameTag) return false;
|
|
910
|
-
stack || (stack = new
|
|
911
|
-
return
|
|
912
|
-
}
|
|
913
|
-
|
|
2085
|
+
stack || (stack = new Stack());
|
|
2086
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
2087
|
+
}
|
|
2088
|
+
//#endregion
|
|
2089
|
+
//#region ../../node_modules/lodash-es/_baseIsEqual.js
|
|
2090
|
+
/**
|
|
2091
|
+
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
2092
|
+
* and tracks traversed objects.
|
|
2093
|
+
*
|
|
2094
|
+
* @private
|
|
2095
|
+
* @param {*} value The value to compare.
|
|
2096
|
+
* @param {*} other The other value to compare.
|
|
2097
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
2098
|
+
* 1 - Unordered comparison
|
|
2099
|
+
* 2 - Partial comparison
|
|
2100
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
2101
|
+
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
2102
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2103
|
+
*/
|
|
914
2104
|
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
915
2105
|
if (value === other) return true;
|
|
916
|
-
if (value == null || other == null || !
|
|
917
|
-
return
|
|
2106
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
|
|
2107
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
918
2108
|
}
|
|
919
|
-
|
|
2109
|
+
//#endregion
|
|
2110
|
+
//#region ../../node_modules/lodash-es/_baseIsMatch.js
|
|
2111
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
920
2112
|
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
2113
|
+
/**
|
|
2114
|
+
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
2115
|
+
*
|
|
2116
|
+
* @private
|
|
2117
|
+
* @param {Object} object The object to inspect.
|
|
2118
|
+
* @param {Object} source The object of property values to match.
|
|
2119
|
+
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
2120
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
2121
|
+
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
2122
|
+
*/
|
|
921
2123
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
922
2124
|
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
923
2125
|
if (object == null) return !length;
|
|
@@ -932,99 +2134,245 @@ function baseIsMatch(object, source, matchData, customizer) {
|
|
|
932
2134
|
if (noCustomizer && data[2]) {
|
|
933
2135
|
if (objValue === void 0 && !(key in object)) return false;
|
|
934
2136
|
} else {
|
|
935
|
-
var stack = new
|
|
2137
|
+
var stack = new Stack();
|
|
936
2138
|
if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
937
|
-
if (!(result === void 0 ?
|
|
2139
|
+
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) return false;
|
|
938
2140
|
}
|
|
939
2141
|
}
|
|
940
2142
|
return true;
|
|
941
2143
|
}
|
|
942
|
-
|
|
2144
|
+
//#endregion
|
|
2145
|
+
//#region ../../node_modules/lodash-es/_isStrictComparable.js
|
|
2146
|
+
/**
|
|
2147
|
+
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
2148
|
+
*
|
|
2149
|
+
* @private
|
|
2150
|
+
* @param {*} value The value to check.
|
|
2151
|
+
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
2152
|
+
* equality comparisons, else `false`.
|
|
2153
|
+
*/
|
|
943
2154
|
function isStrictComparable(value) {
|
|
944
|
-
return value === value && !
|
|
945
|
-
}
|
|
946
|
-
|
|
2155
|
+
return value === value && !isObject(value);
|
|
2156
|
+
}
|
|
2157
|
+
//#endregion
|
|
2158
|
+
//#region ../../node_modules/lodash-es/_getMatchData.js
|
|
2159
|
+
/**
|
|
2160
|
+
* Gets the property names, values, and compare flags of `object`.
|
|
2161
|
+
*
|
|
2162
|
+
* @private
|
|
2163
|
+
* @param {Object} object The object to query.
|
|
2164
|
+
* @returns {Array} Returns the match data of `object`.
|
|
2165
|
+
*/
|
|
947
2166
|
function getMatchData(object) {
|
|
948
|
-
var result =
|
|
2167
|
+
var result = keys(object), length = result.length;
|
|
949
2168
|
while (length--) {
|
|
950
2169
|
var key = result[length], value = object[key];
|
|
951
2170
|
result[length] = [
|
|
952
2171
|
key,
|
|
953
2172
|
value,
|
|
954
|
-
|
|
2173
|
+
isStrictComparable(value)
|
|
955
2174
|
];
|
|
956
2175
|
}
|
|
957
2176
|
return result;
|
|
958
2177
|
}
|
|
959
|
-
|
|
2178
|
+
//#endregion
|
|
2179
|
+
//#region ../../node_modules/lodash-es/_matchesStrictComparable.js
|
|
2180
|
+
/**
|
|
2181
|
+
* A specialized version of `matchesProperty` for source values suitable
|
|
2182
|
+
* for strict equality comparisons, i.e. `===`.
|
|
2183
|
+
*
|
|
2184
|
+
* @private
|
|
2185
|
+
* @param {string} key The key of the property to get.
|
|
2186
|
+
* @param {*} srcValue The value to match.
|
|
2187
|
+
* @returns {Function} Returns the new spec function.
|
|
2188
|
+
*/
|
|
960
2189
|
function matchesStrictComparable(key, srcValue) {
|
|
961
2190
|
return function(object) {
|
|
962
2191
|
if (object == null) return false;
|
|
963
2192
|
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
964
2193
|
};
|
|
965
2194
|
}
|
|
966
|
-
|
|
2195
|
+
//#endregion
|
|
2196
|
+
//#region ../../node_modules/lodash-es/_baseMatches.js
|
|
2197
|
+
/**
|
|
2198
|
+
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
2199
|
+
*
|
|
2200
|
+
* @private
|
|
2201
|
+
* @param {Object} source The object of property values to match.
|
|
2202
|
+
* @returns {Function} Returns the new spec function.
|
|
2203
|
+
*/
|
|
967
2204
|
function baseMatches(source) {
|
|
968
|
-
var matchData =
|
|
969
|
-
if (matchData.length == 1 && matchData[0][2]) return
|
|
2205
|
+
var matchData = getMatchData(source);
|
|
2206
|
+
if (matchData.length == 1 && matchData[0][2]) return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
970
2207
|
return function(object) {
|
|
971
|
-
return object === source ||
|
|
2208
|
+
return object === source || baseIsMatch(object, source, matchData);
|
|
972
2209
|
};
|
|
973
2210
|
}
|
|
974
|
-
|
|
2211
|
+
//#endregion
|
|
2212
|
+
//#region ../../node_modules/lodash-es/_baseHasIn.js
|
|
2213
|
+
/**
|
|
2214
|
+
* The base implementation of `_.hasIn` without support for deep paths.
|
|
2215
|
+
*
|
|
2216
|
+
* @private
|
|
2217
|
+
* @param {Object} [object] The object to query.
|
|
2218
|
+
* @param {Array|string} key The key to check.
|
|
2219
|
+
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
2220
|
+
*/
|
|
975
2221
|
function baseHasIn(object, key) {
|
|
976
2222
|
return object != null && key in Object(object);
|
|
977
2223
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
2224
|
+
//#endregion
|
|
2225
|
+
//#region ../../node_modules/lodash-es/_hasPath.js
|
|
2226
|
+
/**
|
|
2227
|
+
* Checks if `path` exists on `object`.
|
|
2228
|
+
*
|
|
2229
|
+
* @private
|
|
2230
|
+
* @param {Object} object The object to query.
|
|
2231
|
+
* @param {Array|string} path The path to check.
|
|
2232
|
+
* @param {Function} hasFunc The function to check properties.
|
|
2233
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
2234
|
+
*/
|
|
2235
|
+
function hasPath(object, path, hasFunc) {
|
|
2236
|
+
path = castPath(path, object);
|
|
2237
|
+
var index = -1, length = path.length, result = false;
|
|
982
2238
|
while (++index < length) {
|
|
983
|
-
var key =
|
|
2239
|
+
var key = toKey(path[index]);
|
|
984
2240
|
if (!(result = object != null && hasFunc(object, key))) break;
|
|
985
2241
|
object = object[key];
|
|
986
2242
|
}
|
|
987
2243
|
if (result || ++index != length) return result;
|
|
988
2244
|
length = object == null ? 0 : object.length;
|
|
989
|
-
return !!length &&
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
2245
|
+
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
2246
|
+
}
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region ../../node_modules/lodash-es/hasIn.js
|
|
2249
|
+
/**
|
|
2250
|
+
* Checks if `path` is a direct or inherited property of `object`.
|
|
2251
|
+
*
|
|
2252
|
+
* @static
|
|
2253
|
+
* @memberOf _
|
|
2254
|
+
* @since 4.0.0
|
|
2255
|
+
* @category Object
|
|
2256
|
+
* @param {Object} object The object to query.
|
|
2257
|
+
* @param {Array|string} path The path to check.
|
|
2258
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
2259
|
+
* @example
|
|
2260
|
+
*
|
|
2261
|
+
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
2262
|
+
*
|
|
2263
|
+
* _.hasIn(object, 'a');
|
|
2264
|
+
* // => true
|
|
2265
|
+
*
|
|
2266
|
+
* _.hasIn(object, 'a.b');
|
|
2267
|
+
* // => true
|
|
2268
|
+
*
|
|
2269
|
+
* _.hasIn(object, ['a', 'b']);
|
|
2270
|
+
* // => true
|
|
2271
|
+
*
|
|
2272
|
+
* _.hasIn(object, 'b');
|
|
2273
|
+
* // => false
|
|
2274
|
+
*/
|
|
2275
|
+
function hasIn(object, path) {
|
|
2276
|
+
return object != null && hasPath(object, path, baseHasIn);
|
|
2277
|
+
}
|
|
2278
|
+
//#endregion
|
|
2279
|
+
//#region ../../node_modules/lodash-es/_baseMatchesProperty.js
|
|
2280
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
996
2281
|
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
997
|
-
|
|
998
|
-
|
|
2282
|
+
/**
|
|
2283
|
+
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
2284
|
+
*
|
|
2285
|
+
* @private
|
|
2286
|
+
* @param {string} path The path of the property to get.
|
|
2287
|
+
* @param {*} srcValue The value to match.
|
|
2288
|
+
* @returns {Function} Returns the new spec function.
|
|
2289
|
+
*/
|
|
2290
|
+
function baseMatchesProperty(path, srcValue) {
|
|
2291
|
+
if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
|
|
999
2292
|
return function(object) {
|
|
1000
|
-
var objValue =
|
|
1001
|
-
return objValue === void 0 && objValue === srcValue ?
|
|
2293
|
+
var objValue = get(object, path);
|
|
2294
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1002
2295
|
};
|
|
1003
2296
|
}
|
|
1004
|
-
|
|
2297
|
+
//#endregion
|
|
2298
|
+
//#region ../../node_modules/lodash-es/_baseProperty.js
|
|
2299
|
+
/**
|
|
2300
|
+
* The base implementation of `_.property` without support for deep paths.
|
|
2301
|
+
*
|
|
2302
|
+
* @private
|
|
2303
|
+
* @param {string} key The key of the property to get.
|
|
2304
|
+
* @returns {Function} Returns the new accessor function.
|
|
2305
|
+
*/
|
|
1005
2306
|
function baseProperty(key) {
|
|
1006
2307
|
return function(object) {
|
|
1007
2308
|
return object == null ? void 0 : object[key];
|
|
1008
2309
|
};
|
|
1009
2310
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
2311
|
+
//#endregion
|
|
2312
|
+
//#region ../../node_modules/lodash-es/_basePropertyDeep.js
|
|
2313
|
+
/**
|
|
2314
|
+
* A specialized version of `baseProperty` which supports deep paths.
|
|
2315
|
+
*
|
|
2316
|
+
* @private
|
|
2317
|
+
* @param {Array|string} path The path of the property to get.
|
|
2318
|
+
* @returns {Function} Returns the new accessor function.
|
|
2319
|
+
*/
|
|
2320
|
+
function basePropertyDeep(path) {
|
|
1012
2321
|
return function(object) {
|
|
1013
|
-
return
|
|
2322
|
+
return baseGet(object, path);
|
|
1014
2323
|
};
|
|
1015
2324
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
2325
|
+
//#endregion
|
|
2326
|
+
//#region ../../node_modules/lodash-es/property.js
|
|
2327
|
+
/**
|
|
2328
|
+
* Creates a function that returns the value at `path` of a given object.
|
|
2329
|
+
*
|
|
2330
|
+
* @static
|
|
2331
|
+
* @memberOf _
|
|
2332
|
+
* @since 2.4.0
|
|
2333
|
+
* @category Util
|
|
2334
|
+
* @param {Array|string} path The path of the property to get.
|
|
2335
|
+
* @returns {Function} Returns the new accessor function.
|
|
2336
|
+
* @example
|
|
2337
|
+
*
|
|
2338
|
+
* var objects = [
|
|
2339
|
+
* { 'a': { 'b': 2 } },
|
|
2340
|
+
* { 'a': { 'b': 1 } }
|
|
2341
|
+
* ];
|
|
2342
|
+
*
|
|
2343
|
+
* _.map(objects, _.property('a.b'));
|
|
2344
|
+
* // => [2, 1]
|
|
2345
|
+
*
|
|
2346
|
+
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
2347
|
+
* // => [1, 2]
|
|
2348
|
+
*/
|
|
2349
|
+
function property(path) {
|
|
2350
|
+
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
2351
|
+
}
|
|
2352
|
+
//#endregion
|
|
2353
|
+
//#region ../../node_modules/lodash-es/_baseIteratee.js
|
|
2354
|
+
/**
|
|
2355
|
+
* The base implementation of `_.iteratee`.
|
|
2356
|
+
*
|
|
2357
|
+
* @private
|
|
2358
|
+
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
2359
|
+
* @returns {Function} Returns the iteratee.
|
|
2360
|
+
*/
|
|
1021
2361
|
function baseIteratee(value) {
|
|
1022
2362
|
if (typeof value == "function") return value;
|
|
1023
|
-
if (value == null) return
|
|
1024
|
-
if (typeof value == "object") return
|
|
1025
|
-
return
|
|
1026
|
-
}
|
|
1027
|
-
|
|
2363
|
+
if (value == null) return identity;
|
|
2364
|
+
if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
2365
|
+
return property(value);
|
|
2366
|
+
}
|
|
2367
|
+
//#endregion
|
|
2368
|
+
//#region ../../node_modules/lodash-es/_createBaseFor.js
|
|
2369
|
+
/**
|
|
2370
|
+
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
2371
|
+
*
|
|
2372
|
+
* @private
|
|
2373
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2374
|
+
* @returns {Function} Returns the new base function.
|
|
2375
|
+
*/
|
|
1028
2376
|
function createBaseFor(fromRight) {
|
|
1029
2377
|
return function(object, iteratee, keysFunc) {
|
|
1030
2378
|
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
@@ -1035,49 +2383,177 @@ function createBaseFor(fromRight) {
|
|
|
1035
2383
|
return object;
|
|
1036
2384
|
};
|
|
1037
2385
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
2386
|
+
//#endregion
|
|
2387
|
+
//#region ../../node_modules/lodash-es/_baseFor.js
|
|
2388
|
+
/**
|
|
2389
|
+
* The base implementation of `baseForOwn` which iterates over `object`
|
|
2390
|
+
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
2391
|
+
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
2392
|
+
*
|
|
2393
|
+
* @private
|
|
2394
|
+
* @param {Object} object The object to iterate over.
|
|
2395
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
2396
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
2397
|
+
* @returns {Object} Returns `object`.
|
|
2398
|
+
*/
|
|
2399
|
+
var baseFor = createBaseFor();
|
|
2400
|
+
//#endregion
|
|
2401
|
+
//#region ../../node_modules/lodash-es/_baseForOwn.js
|
|
2402
|
+
/**
|
|
2403
|
+
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
2404
|
+
*
|
|
2405
|
+
* @private
|
|
2406
|
+
* @param {Object} object The object to iterate over.
|
|
2407
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
2408
|
+
* @returns {Object} Returns `object`.
|
|
2409
|
+
*/
|
|
1041
2410
|
function baseForOwn(object, iteratee) {
|
|
1042
|
-
return object &&
|
|
1043
|
-
}
|
|
1044
|
-
|
|
2411
|
+
return object && baseFor(object, iteratee, keys);
|
|
2412
|
+
}
|
|
2413
|
+
//#endregion
|
|
2414
|
+
//#region ../../node_modules/lodash-es/_createBaseEach.js
|
|
2415
|
+
/**
|
|
2416
|
+
* Creates a `baseEach` or `baseEachRight` function.
|
|
2417
|
+
*
|
|
2418
|
+
* @private
|
|
2419
|
+
* @param {Function} eachFunc The function to iterate over a collection.
|
|
2420
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2421
|
+
* @returns {Function} Returns the new base function.
|
|
2422
|
+
*/
|
|
1045
2423
|
function createBaseEach(eachFunc, fromRight) {
|
|
1046
2424
|
return function(collection, iteratee) {
|
|
1047
2425
|
if (collection == null) return collection;
|
|
1048
|
-
if (!
|
|
2426
|
+
if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
|
|
1049
2427
|
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
|
|
1050
2428
|
while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
|
|
1051
2429
|
return collection;
|
|
1052
2430
|
};
|
|
1053
2431
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
2432
|
+
//#endregion
|
|
2433
|
+
//#region ../../node_modules/lodash-es/_baseEach.js
|
|
2434
|
+
/**
|
|
2435
|
+
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
2436
|
+
*
|
|
2437
|
+
* @private
|
|
2438
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
2439
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
2440
|
+
* @returns {Array|Object} Returns `collection`.
|
|
2441
|
+
*/
|
|
2442
|
+
var baseEach = createBaseEach(baseForOwn);
|
|
2443
|
+
//#endregion
|
|
2444
|
+
//#region ../../node_modules/lodash-es/isEmpty.js
|
|
2445
|
+
/** `Object#toString` result references. */
|
|
1057
2446
|
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
2447
|
+
/** Used to check objects for own properties. */
|
|
1058
2448
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2449
|
+
/**
|
|
2450
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
2451
|
+
*
|
|
2452
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
2453
|
+
* properties.
|
|
2454
|
+
*
|
|
2455
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
2456
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
2457
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
2458
|
+
*
|
|
2459
|
+
* @static
|
|
2460
|
+
* @memberOf _
|
|
2461
|
+
* @since 0.1.0
|
|
2462
|
+
* @category Lang
|
|
2463
|
+
* @param {*} value The value to check.
|
|
2464
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
2465
|
+
* @example
|
|
2466
|
+
*
|
|
2467
|
+
* _.isEmpty(null);
|
|
2468
|
+
* // => true
|
|
2469
|
+
*
|
|
2470
|
+
* _.isEmpty(true);
|
|
2471
|
+
* // => true
|
|
2472
|
+
*
|
|
2473
|
+
* _.isEmpty(1);
|
|
2474
|
+
* // => true
|
|
2475
|
+
*
|
|
2476
|
+
* _.isEmpty([1, 2, 3]);
|
|
2477
|
+
* // => false
|
|
2478
|
+
*
|
|
2479
|
+
* _.isEmpty({ 'a': 1 });
|
|
2480
|
+
* // => false
|
|
2481
|
+
*/
|
|
1059
2482
|
function isEmpty(value) {
|
|
1060
2483
|
if (value == null) return true;
|
|
1061
|
-
if (
|
|
2484
|
+
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) return !value.length;
|
|
1062
2485
|
var tag = _getTag_default(value);
|
|
1063
2486
|
if (tag == mapTag || tag == setTag) return !value.size;
|
|
1064
|
-
if (
|
|
2487
|
+
if (isPrototype(value)) return !baseKeys(value).length;
|
|
1065
2488
|
for (var key in value) if (hasOwnProperty.call(value, key)) return false;
|
|
1066
2489
|
return true;
|
|
1067
2490
|
}
|
|
1068
|
-
|
|
2491
|
+
//#endregion
|
|
2492
|
+
//#region ../../node_modules/lodash-es/_baseReduce.js
|
|
2493
|
+
/**
|
|
2494
|
+
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
2495
|
+
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
2496
|
+
*
|
|
2497
|
+
* @private
|
|
2498
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
2499
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
2500
|
+
* @param {*} accumulator The initial value.
|
|
2501
|
+
* @param {boolean} initAccum Specify using the first or last element of
|
|
2502
|
+
* `collection` as the initial value.
|
|
2503
|
+
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
2504
|
+
* @returns {*} Returns the accumulated value.
|
|
2505
|
+
*/
|
|
1069
2506
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
1070
|
-
eachFunc(collection, function(value, index, collection
|
|
1071
|
-
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection
|
|
2507
|
+
eachFunc(collection, function(value, index, collection) {
|
|
2508
|
+
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);
|
|
1072
2509
|
});
|
|
1073
2510
|
return accumulator;
|
|
1074
2511
|
}
|
|
1075
|
-
|
|
2512
|
+
//#endregion
|
|
2513
|
+
//#region ../../node_modules/lodash-es/reduce.js
|
|
2514
|
+
/**
|
|
2515
|
+
* Reduces `collection` to a value which is the accumulated result of running
|
|
2516
|
+
* each element in `collection` thru `iteratee`, where each successive
|
|
2517
|
+
* invocation is supplied the return value of the previous. If `accumulator`
|
|
2518
|
+
* is not given, the first element of `collection` is used as the initial
|
|
2519
|
+
* value. The iteratee is invoked with four arguments:
|
|
2520
|
+
* (accumulator, value, index|key, collection).
|
|
2521
|
+
*
|
|
2522
|
+
* Many lodash methods are guarded to work as iteratees for methods like
|
|
2523
|
+
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
|
2524
|
+
*
|
|
2525
|
+
* The guarded methods are:
|
|
2526
|
+
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
|
2527
|
+
* and `sortBy`
|
|
2528
|
+
*
|
|
2529
|
+
* @static
|
|
2530
|
+
* @memberOf _
|
|
2531
|
+
* @since 0.1.0
|
|
2532
|
+
* @category Collection
|
|
2533
|
+
* @param {Array|Object} collection The collection to iterate over.
|
|
2534
|
+
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
2535
|
+
* @param {*} [accumulator] The initial value.
|
|
2536
|
+
* @returns {*} Returns the accumulated value.
|
|
2537
|
+
* @see _.reduceRight
|
|
2538
|
+
* @example
|
|
2539
|
+
*
|
|
2540
|
+
* _.reduce([1, 2], function(sum, n) {
|
|
2541
|
+
* return sum + n;
|
|
2542
|
+
* }, 0);
|
|
2543
|
+
* // => 3
|
|
2544
|
+
*
|
|
2545
|
+
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
2546
|
+
* (result[value] || (result[value] = [])).push(key);
|
|
2547
|
+
* return result;
|
|
2548
|
+
* }, {});
|
|
2549
|
+
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
2550
|
+
*/
|
|
1076
2551
|
function reduce(collection, iteratee, accumulator) {
|
|
1077
|
-
var func =
|
|
1078
|
-
return func(collection,
|
|
2552
|
+
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|
2553
|
+
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
|
1079
2554
|
}
|
|
1080
|
-
|
|
2555
|
+
//#endregion
|
|
2556
|
+
//#region src/cli/utils.ts
|
|
1081
2557
|
function resolvePaths(paths) {
|
|
1082
2558
|
if (!Array.isArray(paths)) return path.default.resolve(process.cwd(), paths);
|
|
1083
2559
|
return paths.map((_path) => path.default.resolve(process.cwd(), _path));
|
|
@@ -1098,16 +2574,16 @@ function getFormatOpt(opts) {
|
|
|
1098
2574
|
"snowflake"
|
|
1099
2575
|
].includes(opt);
|
|
1100
2576
|
});
|
|
1101
|
-
let format
|
|
2577
|
+
let format = "postgres";
|
|
1102
2578
|
let cnt = 0;
|
|
1103
2579
|
formatOpts.forEach((opt) => {
|
|
1104
2580
|
if (opts[opt]) {
|
|
1105
2581
|
cnt += 1;
|
|
1106
2582
|
if (cnt > 1) throw new Error("Too many format options");
|
|
1107
|
-
format
|
|
2583
|
+
format = opt;
|
|
1108
2584
|
}
|
|
1109
2585
|
});
|
|
1110
|
-
return format
|
|
2586
|
+
return format;
|
|
1111
2587
|
}
|
|
1112
2588
|
function getConnectionOpt(args) {
|
|
1113
2589
|
const supportedDatabases = [
|
|
@@ -1118,7 +2594,7 @@ function getConnectionOpt(args) {
|
|
|
1118
2594
|
"bigquery",
|
|
1119
2595
|
"oracle"
|
|
1120
2596
|
];
|
|
1121
|
-
return
|
|
2597
|
+
return reduce(args, (connectionOpt, arg) => {
|
|
1122
2598
|
if (supportedDatabases.includes(arg)) connectionOpt.databaseType = arg;
|
|
1123
2599
|
if (/^.*[:;]/.test(arg)) connectionOpt.connection = arg;
|
|
1124
2600
|
if (/^[a-zA-Z]:[\\/](?:[^<>:"/\\|?*\n\r]+[\\/])*[^<>:"/\\|?*\n\r]*$/.test(arg) || /^(\/|\.\/|~\/|\.\.\/)([^<>:"|?*\n\r]*\/?)*[^<>:"|?*\n\r]*$/.test(arg)) connectionOpt.connection = arg;
|
|
@@ -1135,7 +2611,7 @@ function generate(inputPaths, transform, outputPlugin) {
|
|
|
1135
2611
|
const content = transform(source);
|
|
1136
2612
|
outputPlugin.write(content);
|
|
1137
2613
|
} catch (e) {
|
|
1138
|
-
if (e instanceof
|
|
2614
|
+
if (e instanceof _dbml_core.CompilerError) throw e.map((diag) => ({
|
|
1139
2615
|
...diag,
|
|
1140
2616
|
message: diag.message,
|
|
1141
2617
|
filepath: path.default.basename(_path),
|
|
@@ -1145,17 +2621,19 @@ function generate(inputPaths, transform, outputPlugin) {
|
|
|
1145
2621
|
}
|
|
1146
2622
|
});
|
|
1147
2623
|
}
|
|
1148
|
-
|
|
2624
|
+
//#endregion
|
|
2625
|
+
//#region src/cli/connector.ts
|
|
2626
|
+
async function connectionHandler(program) {
|
|
1149
2627
|
try {
|
|
1150
|
-
const { connection, databaseType } = getConnectionOpt(program
|
|
1151
|
-
const opts = program
|
|
1152
|
-
const schemaJson = await
|
|
2628
|
+
const { connection, databaseType } = getConnectionOpt(program.args);
|
|
2629
|
+
const opts = program.opts();
|
|
2630
|
+
const schemaJson = await _dbml_connector.connector.fetchSchemaJson(connection, databaseType);
|
|
1153
2631
|
if (!opts.outFile && !opts.outDir) {
|
|
1154
|
-
const res =
|
|
1155
|
-
|
|
2632
|
+
const res = _dbml_core.importer.generateDbml(schemaJson);
|
|
2633
|
+
OutputConsolePlugin.write(res);
|
|
1156
2634
|
} else if (opts.outFile) {
|
|
1157
|
-
const res =
|
|
1158
|
-
new
|
|
2635
|
+
const res = _dbml_core.importer.generateDbml(schemaJson);
|
|
2636
|
+
new OutputFilePlugin(resolvePaths(opts.outFile)).write(res);
|
|
1159
2637
|
console.log(` ${chalk.default.green(figures.default.main.tick)} Generated DBML file from database's connection: ${path.default.basename(opts.outFile)}`);
|
|
1160
2638
|
}
|
|
1161
2639
|
} catch (error) {
|
|
@@ -1163,6 +2641,11 @@ async function connectionHandler(program$1) {
|
|
|
1163
2641
|
fileLogger.error(error);
|
|
1164
2642
|
}
|
|
1165
2643
|
}
|
|
2644
|
+
//#endregion
|
|
2645
|
+
//#region src/NodeProjectLayout.ts
|
|
2646
|
+
/**
|
|
2647
|
+
* A read-only DbmlProjectLayout backed by the Node.js filesystem.
|
|
2648
|
+
*/
|
|
1166
2649
|
var NodeProjectLayout = class {
|
|
1167
2650
|
constructor(entryPoints) {
|
|
1168
2651
|
this.entryPoints = [...entryPoints];
|
|
@@ -1181,7 +2664,7 @@ var NodeProjectLayout = class {
|
|
|
1181
2664
|
}
|
|
1182
2665
|
listDirectory(dirPath) {
|
|
1183
2666
|
const basePath = dirPath?.absolute ?? "/";
|
|
1184
|
-
return safeReaddirSync(basePath)?.map((entry) => basePath + entry).sort().map(
|
|
2667
|
+
return safeReaddirSync(basePath)?.map((entry) => basePath + entry).sort().map(_dbml_parse.Filepath.from) ?? [];
|
|
1185
2668
|
}
|
|
1186
2669
|
getEntrypoints() {
|
|
1187
2670
|
return this.entryPoints.filter((fp) => this.exists(fp));
|
|
@@ -1199,7 +2682,9 @@ function logOnError(fn) {
|
|
|
1199
2682
|
}
|
|
1200
2683
|
var safeReadFileSync = logOnError(node_fs.readFileSync);
|
|
1201
2684
|
var safeReaddirSync = logOnError(node_fs.readdirSync);
|
|
1202
|
-
var safeStatSync = logOnError((path
|
|
2685
|
+
var safeStatSync = logOnError((path, opts) => (0, node_fs.statSync)(path, opts));
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region src/cli/config.ts
|
|
1203
2688
|
var config = {
|
|
1204
2689
|
mysql: { name: "MySQL" },
|
|
1205
2690
|
mysqlLegacy: { name: "MySQL" },
|
|
@@ -1209,22 +2694,25 @@ var config = {
|
|
|
1209
2694
|
oracle: { name: "Oracle" },
|
|
1210
2695
|
snowflake: { name: "Snowflake" }
|
|
1211
2696
|
};
|
|
1212
|
-
|
|
2697
|
+
//#endregion
|
|
2698
|
+
//#region src/cli/validatePlugins/validatePlugins.ts
|
|
1213
2699
|
function validateFilePlugin(_path) {
|
|
1214
2700
|
if (fs.default.statSync(_path).isDirectory()) throw new Error("Expect input to be files");
|
|
1215
2701
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
2702
|
+
//#endregion
|
|
2703
|
+
//#region src/cli/export.ts
|
|
2704
|
+
async function exportHandler(program) {
|
|
2705
|
+
const inputPaths = resolvePaths(program.args);
|
|
1218
2706
|
validateInputFilePaths(inputPaths, validateFilePlugin);
|
|
1219
|
-
const opts = program
|
|
1220
|
-
const format
|
|
1221
|
-
const entrypoints = inputPaths.map((p) => new
|
|
1222
|
-
const compiler = new
|
|
1223
|
-
const outputPlugin = opts.outFile ? new
|
|
2707
|
+
const opts = program.opts();
|
|
2708
|
+
const format = getFormatOpt(opts);
|
|
2709
|
+
const entrypoints = inputPaths.map((p) => new _dbml_parse.Filepath(p));
|
|
2710
|
+
const compiler = new _dbml_parse.Compiler(new NodeProjectLayout(entrypoints));
|
|
2711
|
+
const outputPlugin = opts.outFile ? new OutputFilePlugin(resolvePaths(opts.outFile), [
|
|
1224
2712
|
"-- SQL dump generated using DBML (dbml.dbdiagram.io)\n",
|
|
1225
|
-
`-- Database: ${
|
|
2713
|
+
`-- Database: ${config[format].name}\n`,
|
|
1226
2714
|
`-- Generated at: ${(/* @__PURE__ */ new Date()).toISOString()}\n\n`
|
|
1227
|
-
].join("")) :
|
|
2715
|
+
].join("")) : OutputConsolePlugin;
|
|
1228
2716
|
let hasErrors = false;
|
|
1229
2717
|
for (const filepath of entrypoints) {
|
|
1230
2718
|
const result = compiler.interpretFile(filepath);
|
|
@@ -1244,11 +2732,13 @@ async function exportHandler(program$1) {
|
|
|
1244
2732
|
}
|
|
1245
2733
|
const db = result.getValue();
|
|
1246
2734
|
if (!db) continue;
|
|
1247
|
-
const sql =
|
|
2735
|
+
const sql = _dbml_core.ModelExporter.export(_dbml_core.Parser.parseJSONToDatabase(db), format);
|
|
1248
2736
|
outputPlugin.write(sql);
|
|
1249
2737
|
}
|
|
1250
|
-
if (!hasErrors && opts.outFile) console.log(` ${chalk.default.green(figures.default.main.tick)} Generated SQL dump file (${
|
|
2738
|
+
if (!hasErrors && opts.outFile) console.log(` ${chalk.default.green(figures.default.main.tick)} Generated SQL dump file (${config[format].name}): ${path.default.basename(opts.outFile)}`);
|
|
1251
2739
|
}
|
|
2740
|
+
//#endregion
|
|
2741
|
+
//#region src/errors/domainError.ts
|
|
1252
2742
|
var DomainError = class extends Error {
|
|
1253
2743
|
constructor(message, rootError = {}) {
|
|
1254
2744
|
super(message);
|
|
@@ -1257,31 +2747,33 @@ var DomainError = class extends Error {
|
|
|
1257
2747
|
Error.captureStackTrace(this, this.constructor);
|
|
1258
2748
|
}
|
|
1259
2749
|
};
|
|
1260
|
-
|
|
1261
|
-
|
|
2750
|
+
//#endregion
|
|
2751
|
+
//#region src/errors/syntaxError.ts
|
|
2752
|
+
var SyntaxError = class extends DomainError {
|
|
1262
2753
|
constructor(fileName, rootError = {}) {
|
|
1263
2754
|
let message = `You have a syntax error at "${fileName}"`;
|
|
1264
2755
|
if (rootError.location) message += ` line ${rootError.location.start.line} column ${rootError.location.start.column}`;
|
|
1265
2756
|
message += ".";
|
|
1266
|
-
if (!
|
|
2757
|
+
if (!isEmpty(rootError)) message += ` ${rootError.message}`;
|
|
1267
2758
|
super(message, rootError);
|
|
1268
2759
|
}
|
|
1269
2760
|
};
|
|
1270
|
-
|
|
1271
|
-
|
|
2761
|
+
//#endregion
|
|
2762
|
+
//#region src/cli/import.ts
|
|
2763
|
+
async function importHandler(program) {
|
|
1272
2764
|
try {
|
|
1273
|
-
const inputPaths = resolvePaths(program
|
|
2765
|
+
const inputPaths = resolvePaths(program.args);
|
|
1274
2766
|
validateInputFilePaths(inputPaths, validateFilePlugin);
|
|
1275
|
-
const opts = program
|
|
1276
|
-
const format
|
|
1277
|
-
if (!opts.outFile && !opts.outDir) generate(inputPaths, (sql) =>
|
|
2767
|
+
const opts = program.opts();
|
|
2768
|
+
const format = getFormatOpt(opts);
|
|
2769
|
+
if (!opts.outFile && !opts.outDir) generate(inputPaths, (sql) => _dbml_core.importer.import(sql, format), OutputConsolePlugin);
|
|
1278
2770
|
else if (opts.outFile) {
|
|
1279
|
-
generate(inputPaths, (sql) =>
|
|
1280
|
-
console.log(` ${chalk.default.green(figures.default.main.tick)} Generated DBML file from SQL file (${
|
|
2771
|
+
generate(inputPaths, (sql) => _dbml_core.importer.import(sql, format), new OutputFilePlugin(resolvePaths(opts.outFile)));
|
|
2772
|
+
console.log(` ${chalk.default.green(figures.default.main.tick)} Generated DBML file from SQL file (${config[format].name}): ${path.default.basename(opts.outFile)}`);
|
|
1281
2773
|
}
|
|
1282
2774
|
} catch (error) {
|
|
1283
|
-
if (error instanceof
|
|
1284
|
-
const msg = `\n ${error.diags.map((diag) => new
|
|
2775
|
+
if (error instanceof _dbml_core.CompilerError) {
|
|
2776
|
+
const msg = `\n ${error.diags.map((diag) => new SyntaxError(diag.filepath ?? "", diag)).map(({ message }) => message).join("\n ")}`;
|
|
1285
2777
|
consoleLogger.error(msg);
|
|
1286
2778
|
fileLogger.error(msg);
|
|
1287
2779
|
return;
|
|
@@ -1289,6 +2781,8 @@ async function importHandler(program$1) {
|
|
|
1289
2781
|
throw error;
|
|
1290
2782
|
}
|
|
1291
2783
|
}
|
|
2784
|
+
//#endregion
|
|
2785
|
+
//#region src/cli/index.ts
|
|
1292
2786
|
function showHelp(args) {
|
|
1293
2787
|
if (args.length < 3) commander.default.help();
|
|
1294
2788
|
}
|
|
@@ -1346,6 +2840,7 @@ function db2dbml(args) {
|
|
|
1346
2840
|
commander.default.parse(args);
|
|
1347
2841
|
connectionHandler(commander.default);
|
|
1348
2842
|
}
|
|
2843
|
+
//#endregion
|
|
1349
2844
|
exports.db2dbml = db2dbml;
|
|
1350
2845
|
exports.dbml2sql = dbml2sql;
|
|
1351
2846
|
exports.sql2dbml = sql2dbml;
|