@cfp-studio/iframe 18.3.0 → 18.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,23 +4,13 @@
4
4
 
5
5
  var hasMap = typeof Map === "function" && Map.prototype;
6
6
  var mapSizeDescriptor =
7
- Object.getOwnPropertyDescriptor && hasMap
8
- ? Object.getOwnPropertyDescriptor(Map.prototype, "size")
9
- : null;
10
- var mapSize =
11
- hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function"
12
- ? mapSizeDescriptor.get
13
- : null;
7
+ Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
8
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
14
9
  var mapForEach = hasMap && Map.prototype.forEach;
15
10
  var hasSet = typeof Set === "function" && Set.prototype;
16
11
  var setSizeDescriptor =
17
- Object.getOwnPropertyDescriptor && hasSet
18
- ? Object.getOwnPropertyDescriptor(Set.prototype, "size")
19
- : null;
20
- var setSize =
21
- hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function"
22
- ? setSizeDescriptor.get
23
- : null;
12
+ Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
13
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
24
14
  var setForEach = hasSet && Set.prototype.forEach;
25
15
  var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
26
16
  var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
@@ -41,628 +31,556 @@ var $concat = Array.prototype.concat;
41
31
  var $join = Array.prototype.join;
42
32
  var $arrSlice = Array.prototype.slice;
43
33
  var $floor = Math.floor;
44
- var bigIntValueOf =
45
- typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
34
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
46
35
  var gOPS = Object.getOwnPropertySymbols;
47
36
  var symToString =
48
- typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
49
- ? Symbol.prototype.toString
50
- : null;
51
- var hasShammedSymbols =
52
- typeof Symbol === "function" && typeof Symbol.iterator === "object";
37
+ typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
38
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
53
39
  // ie, `has-tostringtag/shams
54
40
  var toStringTag =
55
- typeof Symbol === "function" &&
56
- Symbol.toStringTag &&
57
- (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol")
58
- ? Symbol.toStringTag
59
- : null;
41
+ typeof Symbol === "function" &&
42
+ Symbol.toStringTag &&
43
+ (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol")
44
+ ? Symbol.toStringTag
45
+ : null;
60
46
  var isEnumerable = Object.prototype.propertyIsEnumerable;
61
47
 
62
48
  var gPO =
63
- (typeof Reflect === "function"
64
- ? Reflect.getPrototypeOf
65
- : Object.getPrototypeOf) ||
66
- ([].__proto__ === Array.prototype // eslint-disable-line no-proto
67
- ? function (O) {
68
- return O.__proto__; // eslint-disable-line no-proto
69
- }
70
- : null);
49
+ (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) ||
50
+ ([].__proto__ === Array.prototype // eslint-disable-line no-proto
51
+ ? function (O) {
52
+ return O.__proto__; // eslint-disable-line no-proto
53
+ }
54
+ : null);
71
55
 
72
56
  function addNumericSeparator(num, str) {
73
- if (
74
- num === Infinity ||
75
- num === -Infinity ||
76
- num !== num ||
77
- (num && num > -1000 && num < 1000) ||
78
- $test.call(/e/, str)
79
- ) {
80
- return str;
81
- }
82
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
83
- if (typeof num === "number") {
84
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
85
- if (int !== num) {
86
- var intStr = String(int);
87
- var dec = $slice.call(str, intStr.length + 1);
88
- return (
89
- $replace.call(intStr, sepRegex, "$&_") +
90
- "." +
91
- $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "")
92
- );
93
- }
94
- }
95
- return $replace.call(str, sepRegex, "$&_");
57
+ if (
58
+ num === Infinity ||
59
+ num === -Infinity ||
60
+ num !== num ||
61
+ (num && num > -1000 && num < 1000) ||
62
+ $test.call(/e/, str)
63
+ ) {
64
+ return str;
65
+ }
66
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
67
+ if (typeof num === "number") {
68
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
69
+ if (int !== num) {
70
+ var intStr = String(int);
71
+ var dec = $slice.call(str, intStr.length + 1);
72
+ return (
73
+ $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "")
74
+ );
75
+ }
76
+ }
77
+ return $replace.call(str, sepRegex, "$&_");
96
78
  }
97
79
 
98
80
  export default function inspect_(obj, options, depth, seen) {
99
- var opts = options || {};
100
-
101
- if (
102
- has(opts, "quoteStyle") &&
103
- opts.quoteStyle !== "single" &&
104
- opts.quoteStyle !== "double"
105
- ) {
106
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
107
- }
108
- if (
109
- has(opts, "maxStringLength") &&
110
- (typeof opts.maxStringLength === "number"
111
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
112
- : opts.maxStringLength !== null)
113
- ) {
114
- throw new TypeError(
115
- 'option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'
116
- );
117
- }
118
- var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
119
- if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
120
- throw new TypeError(
121
- "option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"
122
- );
123
- }
124
-
125
- if (
126
- has(opts, "indent") &&
127
- opts.indent !== null &&
128
- opts.indent !== "\t" &&
129
- !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
130
- ) {
131
- throw new TypeError(
132
- 'option "indent" must be "\\t", an integer > 0, or `null`'
133
- );
134
- }
135
- if (
136
- has(opts, "numericSeparator") &&
137
- typeof opts.numericSeparator !== "boolean"
138
- ) {
139
- throw new TypeError(
140
- 'option "numericSeparator", if provided, must be `true` or `false`'
141
- );
142
- }
143
- var numericSeparator = opts.numericSeparator;
144
-
145
- if (typeof obj === "undefined") {
146
- return "undefined";
147
- }
148
- if (obj === null) {
149
- return "null";
150
- }
151
- if (typeof obj === "boolean") {
152
- return obj ? "true" : "false";
153
- }
154
-
155
- if (typeof obj === "string") {
156
- return inspectString(obj, opts);
157
- }
158
- if (typeof obj === "number") {
159
- if (obj === 0) {
160
- return Infinity / obj > 0 ? "0" : "-0";
161
- }
162
- var str = String(obj);
163
- return numericSeparator ? addNumericSeparator(obj, str) : str;
164
- }
165
- if (typeof obj === "bigint") {
166
- var bigIntStr = String(obj) + "n";
167
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
168
- }
169
-
170
- var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
171
- if (typeof depth === "undefined") {
172
- depth = 0;
173
- }
174
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
175
- return isArray(obj) ? "[Array]" : "[Object]";
176
- }
177
-
178
- var indent = getIndent(opts, depth);
179
-
180
- if (typeof seen === "undefined") {
181
- seen = [];
182
- } else if (indexOf(seen, obj) >= 0) {
183
- return "[Circular]";
184
- }
185
-
186
- function inspect(value, from, noIndent) {
187
- if (from) {
188
- seen = $arrSlice.call(seen);
189
- seen.push(from);
190
- }
191
- if (noIndent) {
192
- var newOpts = {
193
- depth: opts.depth,
194
- };
195
- if (has(opts, "quoteStyle")) {
196
- newOpts.quoteStyle = opts.quoteStyle;
197
- }
198
- return inspect_(value, newOpts, depth + 1, seen);
199
- }
200
- return inspect_(value, opts, depth + 1, seen);
201
- }
202
-
203
- if (typeof obj === "function") {
204
- var name = nameOf(obj);
205
- var keys = arrObjKeys(obj, inspect);
206
- return (
207
- "[Function" +
208
- (name ? ": " + name : " (anonymous)") +
209
- "]" +
210
- (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "")
211
- );
212
- }
213
- if (isSymbol(obj)) {
214
- var symString = hasShammedSymbols
215
- ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1")
216
- : symToString.call(obj);
217
- return typeof obj === "object" && !hasShammedSymbols
218
- ? markBoxed(symString)
219
- : symString;
220
- }
221
- if (isElement(obj)) {
222
- var s = "<" + $toLowerCase.call(String(obj.nodeName));
223
- var attrs = obj.attributes || [];
224
- for (var i = 0; i < attrs.length; i++) {
225
- s +=
226
- " " +
227
- attrs[i].name +
228
- "=" +
229
- wrapQuotes(quote(attrs[i].value), "double", opts);
230
- }
231
- s += ">";
232
- if (obj.childNodes && obj.childNodes.length) {
233
- s += "...";
234
- }
235
- s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
236
- return s;
237
- }
238
- if (isArray(obj)) {
239
- if (obj.length === 0) {
240
- return "[]";
241
- }
242
- var xs = arrObjKeys(obj, inspect);
243
- if (indent && !singleLineValues(xs)) {
244
- return "[" + indentedJoin(xs, indent) + "]";
245
- }
246
- return "[ " + $join.call(xs, ", ") + " ]";
247
- }
248
- if (isError(obj)) {
249
- var parts = arrObjKeys(obj, inspect);
250
- if ("cause" in obj && !isEnumerable.call(obj, "cause")) {
251
- return (
252
- "{ [" +
253
- String(obj) +
254
- "] " +
255
- $join.call(
256
- $concat.call("[cause]: " + inspect(obj.cause), parts),
257
- ", "
258
- ) +
259
- " }"
260
- );
261
- }
262
- if (parts.length === 0) {
263
- return "[" + String(obj) + "]";
264
- }
265
- return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
266
- }
267
- if (typeof obj === "object" && customInspect) {
268
- if (customInspect !== "symbol" && typeof obj.inspect === "function") {
269
- return obj.inspect();
270
- }
271
- }
272
- if (isMap(obj)) {
273
- var mapParts = [];
274
- mapForEach.call(obj, function (value, key) {
275
- mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
276
- });
277
- return collectionOf("Map", mapSize.call(obj), mapParts, indent);
278
- }
279
- if (isSet(obj)) {
280
- var setParts = [];
281
- setForEach.call(obj, function (value) {
282
- setParts.push(inspect(value, obj));
283
- });
284
- return collectionOf("Set", setSize.call(obj), setParts, indent);
285
- }
286
- if (isWeakMap(obj)) {
287
- return weakCollectionOf("WeakMap");
288
- }
289
- if (isWeakSet(obj)) {
290
- return weakCollectionOf("WeakSet");
291
- }
292
- if (isWeakRef(obj)) {
293
- return weakCollectionOf("WeakRef");
294
- }
295
- if (isNumber(obj)) {
296
- return markBoxed(inspect(Number(obj)));
297
- }
298
- if (isBigInt(obj)) {
299
- return markBoxed(inspect(bigIntValueOf.call(obj)));
300
- }
301
- if (isBoolean(obj)) {
302
- return markBoxed(booleanValueOf.call(obj));
303
- }
304
- if (isString(obj)) {
305
- return markBoxed(inspect(String(obj)));
306
- }
307
- if (!isDate(obj) && !isRegExp(obj)) {
308
- var ys = arrObjKeys(obj, inspect);
309
- var isPlainObject = gPO
310
- ? gPO(obj) === Object.prototype
311
- : obj instanceof Object || obj.constructor === Object;
312
- var protoTag = obj instanceof Object ? "" : "null prototype";
313
- var stringTag =
314
- !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj
315
- ? $slice.call(toStr(obj), 8, -1)
316
- : protoTag
317
- ? "Object"
318
- : "";
319
- var constructorTag =
320
- isPlainObject || typeof obj.constructor !== "function"
321
- ? ""
322
- : obj.constructor.name
323
- ? obj.constructor.name + " "
324
- : "";
325
- var tag =
326
- constructorTag +
327
- (stringTag || protoTag
328
- ? "[" +
329
- $join.call($concat.call([], stringTag || [], protoTag || []), ": ") +
330
- "] "
331
- : "");
332
- if (ys.length === 0) {
333
- return tag + "{}";
334
- }
335
- if (indent) {
336
- return tag + "{" + indentedJoin(ys, indent) + "}";
337
- }
338
- return tag + "{ " + $join.call(ys, ", ") + " }";
339
- }
340
- return String(obj);
81
+ var opts = options || {};
82
+
83
+ if (has(opts, "quoteStyle") && opts.quoteStyle !== "single" && opts.quoteStyle !== "double") {
84
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
85
+ }
86
+ if (
87
+ has(opts, "maxStringLength") &&
88
+ (typeof opts.maxStringLength === "number"
89
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
90
+ : opts.maxStringLength !== null)
91
+ ) {
92
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
93
+ }
94
+ var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
95
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
96
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
97
+ }
98
+
99
+ if (
100
+ has(opts, "indent") &&
101
+ opts.indent !== null &&
102
+ opts.indent !== "\t" &&
103
+ !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
104
+ ) {
105
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
106
+ }
107
+ if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
108
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
109
+ }
110
+ var numericSeparator = opts.numericSeparator;
111
+
112
+ if (typeof obj === "undefined") {
113
+ return "undefined";
114
+ }
115
+ if (obj === null) {
116
+ return "null";
117
+ }
118
+ if (typeof obj === "boolean") {
119
+ return obj ? "true" : "false";
120
+ }
121
+
122
+ if (typeof obj === "string") {
123
+ return inspectString(obj, opts);
124
+ }
125
+ if (typeof obj === "number") {
126
+ if (obj === 0) {
127
+ return Infinity / obj > 0 ? "0" : "-0";
128
+ }
129
+ var str = String(obj);
130
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
131
+ }
132
+ if (typeof obj === "bigint") {
133
+ var bigIntStr = String(obj) + "n";
134
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
135
+ }
136
+
137
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
138
+ if (typeof depth === "undefined") {
139
+ depth = 0;
140
+ }
141
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
142
+ return isArray(obj) ? "[Array]" : "[Object]";
143
+ }
144
+
145
+ var indent = getIndent(opts, depth);
146
+
147
+ if (typeof seen === "undefined") {
148
+ seen = [];
149
+ } else if (indexOf(seen, obj) >= 0) {
150
+ return "[Circular]";
151
+ }
152
+
153
+ function inspect(value, from, noIndent) {
154
+ if (from) {
155
+ seen = $arrSlice.call(seen);
156
+ seen.push(from);
157
+ }
158
+ if (noIndent) {
159
+ var newOpts = {
160
+ depth: opts.depth,
161
+ };
162
+ if (has(opts, "quoteStyle")) {
163
+ newOpts.quoteStyle = opts.quoteStyle;
164
+ }
165
+ return inspect_(value, newOpts, depth + 1, seen);
166
+ }
167
+ return inspect_(value, opts, depth + 1, seen);
168
+ }
169
+
170
+ if (typeof obj === "function") {
171
+ var name = nameOf(obj);
172
+ var keys = arrObjKeys(obj, inspect);
173
+ return (
174
+ "[Function" +
175
+ (name ? ": " + name : " (anonymous)") +
176
+ "]" +
177
+ (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "")
178
+ );
179
+ }
180
+ if (isSymbol(obj)) {
181
+ var symString = hasShammedSymbols
182
+ ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1")
183
+ : symToString.call(obj);
184
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
185
+ }
186
+ if (isElement(obj)) {
187
+ var s = "<" + $toLowerCase.call(String(obj.nodeName));
188
+ var attrs = obj.attributes || [];
189
+ for (var i = 0; i < attrs.length; i++) {
190
+ s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
191
+ }
192
+ s += ">";
193
+ if (obj.childNodes && obj.childNodes.length) {
194
+ s += "...";
195
+ }
196
+ s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
197
+ return s;
198
+ }
199
+ if (isArray(obj)) {
200
+ if (obj.length === 0) {
201
+ return "[]";
202
+ }
203
+ var xs = arrObjKeys(obj, inspect);
204
+ if (indent && !singleLineValues(xs)) {
205
+ return "[" + indentedJoin(xs, indent) + "]";
206
+ }
207
+ return "[ " + $join.call(xs, ", ") + " ]";
208
+ }
209
+ if (isError(obj)) {
210
+ var parts = arrObjKeys(obj, inspect);
211
+ if ("cause" in obj && !isEnumerable.call(obj, "cause")) {
212
+ return (
213
+ "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"
214
+ );
215
+ }
216
+ if (parts.length === 0) {
217
+ return "[" + String(obj) + "]";
218
+ }
219
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
220
+ }
221
+ if (typeof obj === "object" && customInspect) {
222
+ if (customInspect !== "symbol" && typeof obj.inspect === "function") {
223
+ return obj.inspect();
224
+ }
225
+ }
226
+ if (isMap(obj)) {
227
+ var mapParts = [];
228
+ mapForEach.call(obj, function (value, key) {
229
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
230
+ });
231
+ return collectionOf("Map", mapSize.call(obj), mapParts, indent);
232
+ }
233
+ if (isSet(obj)) {
234
+ var setParts = [];
235
+ setForEach.call(obj, function (value) {
236
+ setParts.push(inspect(value, obj));
237
+ });
238
+ return collectionOf("Set", setSize.call(obj), setParts, indent);
239
+ }
240
+ if (isWeakMap(obj)) {
241
+ return weakCollectionOf("WeakMap");
242
+ }
243
+ if (isWeakSet(obj)) {
244
+ return weakCollectionOf("WeakSet");
245
+ }
246
+ if (isWeakRef(obj)) {
247
+ return weakCollectionOf("WeakRef");
248
+ }
249
+ if (isNumber(obj)) {
250
+ return markBoxed(inspect(Number(obj)));
251
+ }
252
+ if (isBigInt(obj)) {
253
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
254
+ }
255
+ if (isBoolean(obj)) {
256
+ return markBoxed(booleanValueOf.call(obj));
257
+ }
258
+ if (isString(obj)) {
259
+ return markBoxed(inspect(String(obj)));
260
+ }
261
+ if (!isDate(obj) && !isRegExp(obj)) {
262
+ var ys = arrObjKeys(obj, inspect);
263
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
264
+ var protoTag = obj instanceof Object ? "" : "null prototype";
265
+ var stringTag =
266
+ !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj
267
+ ? $slice.call(toStr(obj), 8, -1)
268
+ : protoTag
269
+ ? "Object"
270
+ : "";
271
+ var constructorTag =
272
+ isPlainObject || typeof obj.constructor !== "function"
273
+ ? ""
274
+ : obj.constructor.name
275
+ ? obj.constructor.name + " "
276
+ : "";
277
+ var tag =
278
+ constructorTag +
279
+ (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
280
+ if (ys.length === 0) {
281
+ return tag + "{}";
282
+ }
283
+ if (indent) {
284
+ return tag + "{" + indentedJoin(ys, indent) + "}";
285
+ }
286
+ return tag + "{ " + $join.call(ys, ", ") + " }";
287
+ }
288
+ return String(obj);
341
289
  }
342
290
 
343
291
  function wrapQuotes(s, defaultStyle, opts) {
344
- var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
345
- return quoteChar + s + quoteChar;
292
+ var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
293
+ return quoteChar + s + quoteChar;
346
294
  }
347
295
 
348
296
  function quote(s) {
349
- return $replace.call(String(s), /"/g, "&quot;");
297
+ return $replace.call(String(s), /"/g, "&quot;");
350
298
  }
351
299
 
352
300
  function isArray(obj) {
353
- return (
354
- toStr(obj) === "[object Array]" &&
355
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
356
- );
301
+ return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
357
302
  }
358
303
  function isDate(obj) {
359
- return (
360
- toStr(obj) === "[object Date]" &&
361
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
362
- );
304
+ return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
363
305
  }
364
306
  function isRegExp(obj) {
365
- return (
366
- toStr(obj) === "[object RegExp]" &&
367
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
368
- );
307
+ return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
369
308
  }
370
309
  function isError(obj) {
371
- return (
372
- toStr(obj) === "[object Error]" &&
373
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
374
- );
310
+ return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
375
311
  }
376
312
  function isString(obj) {
377
- return (
378
- toStr(obj) === "[object String]" &&
379
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
380
- );
313
+ return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
381
314
  }
382
315
  function isNumber(obj) {
383
- return (
384
- toStr(obj) === "[object Number]" &&
385
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
386
- );
316
+ return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
387
317
  }
388
318
  function isBoolean(obj) {
389
- return (
390
- toStr(obj) === "[object Boolean]" &&
391
- (!toStringTag || !(typeof obj === "object" && toStringTag in obj))
392
- );
319
+ return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
393
320
  }
394
321
 
395
322
  // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
396
323
  function isSymbol(obj) {
397
- if (hasShammedSymbols) {
398
- return obj && typeof obj === "object" && obj instanceof Symbol;
399
- }
400
- if (typeof obj === "symbol") {
401
- return true;
402
- }
403
- if (!obj || typeof obj !== "object" || !symToString) {
404
- return false;
405
- }
406
- try {
407
- symToString.call(obj);
408
- return true;
409
- } catch (e) {}
410
- return false;
324
+ if (hasShammedSymbols) {
325
+ return obj && typeof obj === "object" && obj instanceof Symbol;
326
+ }
327
+ if (typeof obj === "symbol") {
328
+ return true;
329
+ }
330
+ if (!obj || typeof obj !== "object" || !symToString) {
331
+ return false;
332
+ }
333
+ try {
334
+ symToString.call(obj);
335
+ return true;
336
+ } catch (e) {}
337
+ return false;
411
338
  }
412
339
 
413
340
  function isBigInt(obj) {
414
- if (!obj || typeof obj !== "object" || !bigIntValueOf) {
415
- return false;
416
- }
417
- try {
418
- bigIntValueOf.call(obj);
419
- return true;
420
- } catch (e) {}
421
- return false;
341
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
342
+ return false;
343
+ }
344
+ try {
345
+ bigIntValueOf.call(obj);
346
+ return true;
347
+ } catch (e) {}
348
+ return false;
422
349
  }
423
350
 
424
351
  var hasOwn =
425
- Object.prototype.hasOwnProperty ||
426
- function (key) {
427
- return key in this;
428
- };
352
+ Object.prototype.hasOwnProperty ||
353
+ function (key) {
354
+ return key in this;
355
+ };
429
356
  function has(obj, key) {
430
- return hasOwn.call(obj, key);
357
+ return hasOwn.call(obj, key);
431
358
  }
432
359
 
433
360
  function toStr(obj) {
434
- return objectToString.call(obj);
361
+ return objectToString.call(obj);
435
362
  }
436
363
 
437
364
  function nameOf(f) {
438
- if (f.name) {
439
- return f.name;
440
- }
441
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
442
- if (m) {
443
- return m[1];
444
- }
445
- return null;
365
+ if (f.name) {
366
+ return f.name;
367
+ }
368
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
369
+ if (m) {
370
+ return m[1];
371
+ }
372
+ return null;
446
373
  }
447
374
 
448
375
  function indexOf(xs, x) {
449
- if (xs.indexOf) {
450
- return xs.indexOf(x);
451
- }
452
- for (var i = 0, l = xs.length; i < l; i++) {
453
- if (xs[i] === x) {
454
- return i;
455
- }
456
- }
457
- return -1;
376
+ if (xs.indexOf) {
377
+ return xs.indexOf(x);
378
+ }
379
+ for (var i = 0, l = xs.length; i < l; i++) {
380
+ if (xs[i] === x) {
381
+ return i;
382
+ }
383
+ }
384
+ return -1;
458
385
  }
459
386
 
460
387
  function isMap(x) {
461
- if (!mapSize || !x || typeof x !== "object") {
462
- return false;
463
- }
464
- try {
465
- mapSize.call(x);
466
- try {
467
- setSize.call(x);
468
- } catch (s) {
469
- return true;
470
- }
471
- return x instanceof Map; // core-js workaround, pre-v2.5.0
472
- } catch (e) {}
473
- return false;
388
+ if (!mapSize || !x || typeof x !== "object") {
389
+ return false;
390
+ }
391
+ try {
392
+ mapSize.call(x);
393
+ try {
394
+ setSize.call(x);
395
+ } catch (s) {
396
+ return true;
397
+ }
398
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
399
+ } catch (e) {}
400
+ return false;
474
401
  }
475
402
 
476
403
  function isWeakMap(x) {
477
- if (!weakMapHas || !x || typeof x !== "object") {
478
- return false;
479
- }
480
- try {
481
- weakMapHas.call(x, weakMapHas);
482
- try {
483
- weakSetHas.call(x, weakSetHas);
484
- } catch (s) {
485
- return true;
486
- }
487
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
488
- } catch (e) {}
489
- return false;
404
+ if (!weakMapHas || !x || typeof x !== "object") {
405
+ return false;
406
+ }
407
+ try {
408
+ weakMapHas.call(x, weakMapHas);
409
+ try {
410
+ weakSetHas.call(x, weakSetHas);
411
+ } catch (s) {
412
+ return true;
413
+ }
414
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
415
+ } catch (e) {}
416
+ return false;
490
417
  }
491
418
 
492
419
  function isWeakRef(x) {
493
- if (!weakRefDeref || !x || typeof x !== "object") {
494
- return false;
495
- }
496
- try {
497
- weakRefDeref.call(x);
498
- return true;
499
- } catch (e) {}
500
- return false;
420
+ if (!weakRefDeref || !x || typeof x !== "object") {
421
+ return false;
422
+ }
423
+ try {
424
+ weakRefDeref.call(x);
425
+ return true;
426
+ } catch (e) {}
427
+ return false;
501
428
  }
502
429
 
503
430
  function isSet(x) {
504
- if (!setSize || !x || typeof x !== "object") {
505
- return false;
506
- }
507
- try {
508
- setSize.call(x);
509
- try {
510
- mapSize.call(x);
511
- } catch (m) {
512
- return true;
513
- }
514
- return x instanceof Set; // core-js workaround, pre-v2.5.0
515
- } catch (e) {}
516
- return false;
431
+ if (!setSize || !x || typeof x !== "object") {
432
+ return false;
433
+ }
434
+ try {
435
+ setSize.call(x);
436
+ try {
437
+ mapSize.call(x);
438
+ } catch (m) {
439
+ return true;
440
+ }
441
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
442
+ } catch (e) {}
443
+ return false;
517
444
  }
518
445
 
519
446
  function isWeakSet(x) {
520
- if (!weakSetHas || !x || typeof x !== "object") {
521
- return false;
522
- }
523
- try {
524
- weakSetHas.call(x, weakSetHas);
525
- try {
526
- weakMapHas.call(x, weakMapHas);
527
- } catch (s) {
528
- return true;
529
- }
530
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
531
- } catch (e) {}
532
- return false;
447
+ if (!weakSetHas || !x || typeof x !== "object") {
448
+ return false;
449
+ }
450
+ try {
451
+ weakSetHas.call(x, weakSetHas);
452
+ try {
453
+ weakMapHas.call(x, weakMapHas);
454
+ } catch (s) {
455
+ return true;
456
+ }
457
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
458
+ } catch (e) {}
459
+ return false;
533
460
  }
534
461
 
535
462
  function isElement(x) {
536
- if (!x || typeof x !== "object") {
537
- return false;
538
- }
539
- if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
540
- return true;
541
- }
542
- return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
463
+ if (!x || typeof x !== "object") {
464
+ return false;
465
+ }
466
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
467
+ return true;
468
+ }
469
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
543
470
  }
544
471
 
545
472
  function inspectString(str, opts) {
546
- if (str.length > opts.maxStringLength) {
547
- var remaining = str.length - opts.maxStringLength;
548
- var trailer =
549
- "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
550
- return (
551
- inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer
552
- );
553
- }
554
- // eslint-disable-next-line no-control-regex
555
- var s = $replace.call(
556
- $replace.call(str, /(['\\])/g, "\\$1"),
557
- /[\x00-\x1f]/g,
558
- lowbyte
559
- );
560
- return wrapQuotes(s, "single", opts);
473
+ if (str.length > opts.maxStringLength) {
474
+ var remaining = str.length - opts.maxStringLength;
475
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
476
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
477
+ }
478
+ // eslint-disable-next-line no-control-regex
479
+ var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
480
+ return wrapQuotes(s, "single", opts);
561
481
  }
562
482
 
563
483
  function lowbyte(c) {
564
- var n = c.charCodeAt(0);
565
- var x = {
566
- 8: "b",
567
- 9: "t",
568
- 10: "n",
569
- 12: "f",
570
- 13: "r",
571
- }[n];
572
- if (x) {
573
- return "\\" + x;
574
- }
575
- return "\\x" + (n < 0x10 ? "0" : "") + $toUpperCase.call(n.toString(16));
484
+ var n = c.charCodeAt(0);
485
+ var x = {
486
+ 8: "b",
487
+ 9: "t",
488
+ 10: "n",
489
+ 12: "f",
490
+ 13: "r",
491
+ }[n];
492
+ if (x) {
493
+ return "\\" + x;
494
+ }
495
+ return "\\x" + (n < 0x10 ? "0" : "") + $toUpperCase.call(n.toString(16));
576
496
  }
577
497
 
578
498
  function markBoxed(str) {
579
- return "Object(" + str + ")";
499
+ return "Object(" + str + ")";
580
500
  }
581
501
 
582
502
  function weakCollectionOf(type) {
583
- return type + " { ? }";
503
+ return type + " { ? }";
584
504
  }
585
505
 
586
506
  function collectionOf(type, size, entries, indent) {
587
- var joinedEntries = indent
588
- ? indentedJoin(entries, indent)
589
- : $join.call(entries, ", ");
590
- return type + " (" + size + ") {" + joinedEntries + "}";
507
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
508
+ return type + " (" + size + ") {" + joinedEntries + "}";
591
509
  }
592
510
 
593
511
  function singleLineValues(xs) {
594
- for (var i = 0; i < xs.length; i++) {
595
- if (indexOf(xs[i], "\n") >= 0) {
596
- return false;
597
- }
598
- }
599
- return true;
512
+ for (var i = 0; i < xs.length; i++) {
513
+ if (indexOf(xs[i], "\n") >= 0) {
514
+ return false;
515
+ }
516
+ }
517
+ return true;
600
518
  }
601
519
 
602
520
  function getIndent(opts, depth) {
603
- var baseIndent;
604
- if (opts.indent === "\t") {
605
- baseIndent = "\t";
606
- } else if (typeof opts.indent === "number" && opts.indent > 0) {
607
- baseIndent = $join.call(Array(opts.indent + 1), " ");
608
- } else {
609
- return null;
610
- }
611
- return {
612
- base: baseIndent,
613
- prev: $join.call(Array(depth + 1), baseIndent),
614
- };
521
+ var baseIndent;
522
+ if (opts.indent === "\t") {
523
+ baseIndent = "\t";
524
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
525
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
526
+ } else {
527
+ return null;
528
+ }
529
+ return {
530
+ base: baseIndent,
531
+ prev: $join.call(Array(depth + 1), baseIndent),
532
+ };
615
533
  }
616
534
 
617
535
  function indentedJoin(xs, indent) {
618
- if (xs.length === 0) {
619
- return "";
620
- }
621
- var lineJoiner = "\n" + indent.prev + indent.base;
622
- return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
536
+ if (xs.length === 0) {
537
+ return "";
538
+ }
539
+ var lineJoiner = "\n" + indent.prev + indent.base;
540
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
623
541
  }
624
542
 
625
543
  function arrObjKeys(obj, inspect) {
626
- var isArr = isArray(obj);
627
- var xs = [];
628
- if (isArr) {
629
- xs.length = obj.length;
630
- for (var i = 0; i < obj.length; i++) {
631
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
632
- }
633
- }
634
- var syms = typeof gOPS === "function" ? gOPS(obj) : [];
635
- var symMap;
636
- if (hasShammedSymbols) {
637
- symMap = {};
638
- for (var k = 0; k < syms.length; k++) {
639
- symMap["$" + syms[k]] = syms[k];
640
- }
641
- }
642
-
643
- for (var key in obj) {
644
- // eslint-disable-line no-restricted-syntax
645
- if (!has(obj, key)) {
646
- continue;
647
- } // eslint-disable-line no-restricted-syntax, no-continue
648
- if (isArr && String(Number(key)) === key && key < obj.length) {
649
- continue;
650
- } // eslint-disable-line no-restricted-syntax, no-continue
651
- if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
652
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
653
- continue; // eslint-disable-line no-restricted-syntax, no-continue
654
- } else if ($test.call(/[^\w$]/, key)) {
655
- xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
656
- } else {
657
- xs.push(key + ": " + inspect(obj[key], obj));
658
- }
659
- }
660
- if (typeof gOPS === "function") {
661
- for (var j = 0; j < syms.length; j++) {
662
- if (isEnumerable.call(obj, syms[j])) {
663
- xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
664
- }
665
- }
666
- }
667
- return xs;
544
+ var isArr = isArray(obj);
545
+ var xs = [];
546
+ if (isArr) {
547
+ xs.length = obj.length;
548
+ for (var i = 0; i < obj.length; i++) {
549
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
550
+ }
551
+ }
552
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
553
+ var symMap;
554
+ if (hasShammedSymbols) {
555
+ symMap = {};
556
+ for (var k = 0; k < syms.length; k++) {
557
+ symMap["$" + syms[k]] = syms[k];
558
+ }
559
+ }
560
+
561
+ for (var key in obj) {
562
+ // eslint-disable-line no-restricted-syntax
563
+ if (!has(obj, key)) {
564
+ continue;
565
+ } // eslint-disable-line no-restricted-syntax, no-continue
566
+ if (isArr && String(Number(key)) === key && key < obj.length) {
567
+ continue;
568
+ } // eslint-disable-line no-restricted-syntax, no-continue
569
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
570
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
571
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
572
+ } else if ($test.call(/[^\w$]/, key)) {
573
+ xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
574
+ } else {
575
+ xs.push(key + ": " + inspect(obj[key], obj));
576
+ }
577
+ }
578
+ if (typeof gOPS === "function") {
579
+ for (var j = 0; j < syms.length; j++) {
580
+ if (isEnumerable.call(obj, syms[j])) {
581
+ xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
582
+ }
583
+ }
584
+ }
585
+ return xs;
668
586
  }