path-serializer 0.0.0 → 0.0.2
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/LICENSE +21 -0
- package/README.md +14 -0
- package/dist/cjs/index.d.cts +20 -0
- package/dist/cjs/main.cjs +1130 -0
- package/dist/esm/index.d.ts +20 -0
- package/dist/esm/main.js +1106 -0
- package/package.json +61 -9
|
@@ -0,0 +1,1130 @@
|
|
|
1
|
+
var __webpack_modules__ = ({
|
|
2
|
+
"./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js": (function (__unused_webpack_module, exports, __webpack_require__) {
|
|
3
|
+
/**
|
|
4
|
+
* upath http://github.com/anodynos/upath/
|
|
5
|
+
*
|
|
6
|
+
* A proxy to `path`, replacing `\` with `/` for all results (supports UNC paths) & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.
|
|
7
|
+
* Version 2.0.1 - Compiled on 2020-11-07 16:59:47
|
|
8
|
+
* Repository git://github.com/anodynos/upath
|
|
9
|
+
* Copyright(c) 2020 Angelos Pikoulas <agelos.pikoulas@gmail.com>
|
|
10
|
+
* License MIT
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs'
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var VERSION = '2.0.1'; // injected by urequire-rc-inject-version
|
|
17
|
+
|
|
18
|
+
var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function (item) {
|
|
19
|
+
for (var i = 0, l = this.length; i < l; i++) {
|
|
20
|
+
if (i in this && this[i] === item)
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
return -1;
|
|
24
|
+
}, hasProp = {}.hasOwnProperty;
|
|
25
|
+
path = __webpack_require__("path");
|
|
26
|
+
isFunction = function (val) {
|
|
27
|
+
return typeof val === "function";
|
|
28
|
+
};
|
|
29
|
+
isString = function (val) {
|
|
30
|
+
return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]";
|
|
31
|
+
};
|
|
32
|
+
upath = exports;
|
|
33
|
+
upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION";
|
|
34
|
+
toUnix = function (p) {
|
|
35
|
+
p = p.replace(/\\/g, "/");
|
|
36
|
+
p = p.replace(/(?<!^)\/+/g, "/");
|
|
37
|
+
return p;
|
|
38
|
+
};
|
|
39
|
+
for (propName in path) {
|
|
40
|
+
propValue = path[propName];
|
|
41
|
+
if (isFunction(propValue)) {
|
|
42
|
+
upath[propName] = function (propName) {
|
|
43
|
+
return function () {
|
|
44
|
+
var args, result;
|
|
45
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
46
|
+
args = args.map(function (p) {
|
|
47
|
+
if (isString(p)) {
|
|
48
|
+
return toUnix(p);
|
|
49
|
+
} else {
|
|
50
|
+
return p;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
result = path[propName].apply(path, args);
|
|
54
|
+
if (isString(result)) {
|
|
55
|
+
return toUnix(result);
|
|
56
|
+
} else {
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}(propName);
|
|
61
|
+
} else {
|
|
62
|
+
upath[propName] = propValue;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
upath.sep = "/";
|
|
66
|
+
extraFunctions = {
|
|
67
|
+
toUnix: toUnix,
|
|
68
|
+
normalizeSafe: function (p) {
|
|
69
|
+
var result;
|
|
70
|
+
p = toUnix(p);
|
|
71
|
+
result = upath.normalize(p);
|
|
72
|
+
if (p.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
|
|
73
|
+
result = "./" + result;
|
|
74
|
+
} else if (p.startsWith("//") && !result.startsWith("//")) {
|
|
75
|
+
if (p.startsWith("//./")) {
|
|
76
|
+
result = "//." + result;
|
|
77
|
+
} else {
|
|
78
|
+
result = "/" + result;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
},
|
|
83
|
+
normalizeTrim: function (p) {
|
|
84
|
+
p = upath.normalizeSafe(p);
|
|
85
|
+
if (p.endsWith("/")) {
|
|
86
|
+
return p.slice(0, +(p.length - 2) + 1 || 9000000000);
|
|
87
|
+
} else {
|
|
88
|
+
return p;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
joinSafe: function () {
|
|
92
|
+
var p, p0, result;
|
|
93
|
+
p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
94
|
+
result = upath.join.apply(null, p);
|
|
95
|
+
if (p.length > 0) {
|
|
96
|
+
p0 = toUnix(p[0]);
|
|
97
|
+
if (p0.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
|
|
98
|
+
result = "./" + result;
|
|
99
|
+
} else if (p0.startsWith("//") && !result.startsWith("//")) {
|
|
100
|
+
if (p0.startsWith("//./")) {
|
|
101
|
+
result = "//." + result;
|
|
102
|
+
} else {
|
|
103
|
+
result = "/" + result;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
},
|
|
109
|
+
addExt: function (file, ext) {
|
|
110
|
+
if (!ext) {
|
|
111
|
+
return file;
|
|
112
|
+
} else {
|
|
113
|
+
if (ext[0] !== ".") {
|
|
114
|
+
ext = "." + ext;
|
|
115
|
+
}
|
|
116
|
+
return file + (file.endsWith(ext) ? "" : ext);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
trimExt: function (filename, ignoreExts, maxSize) {
|
|
120
|
+
var oldExt;
|
|
121
|
+
if (maxSize == null) {
|
|
122
|
+
maxSize = 7;
|
|
123
|
+
}
|
|
124
|
+
oldExt = upath.extname(filename);
|
|
125
|
+
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
126
|
+
return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000);
|
|
127
|
+
} else {
|
|
128
|
+
return filename;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
removeExt: function (filename, ext) {
|
|
132
|
+
if (!ext) {
|
|
133
|
+
return filename;
|
|
134
|
+
} else {
|
|
135
|
+
ext = ext[0] === "." ? ext : "." + ext;
|
|
136
|
+
if (upath.extname(filename) === ext) {
|
|
137
|
+
return upath.trimExt(filename, [], ext.length);
|
|
138
|
+
} else {
|
|
139
|
+
return filename;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
changeExt: function (filename, ext, ignoreExts, maxSize) {
|
|
144
|
+
if (maxSize == null) {
|
|
145
|
+
maxSize = 7;
|
|
146
|
+
}
|
|
147
|
+
return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext);
|
|
148
|
+
},
|
|
149
|
+
defaultExt: function (filename, ext, ignoreExts, maxSize) {
|
|
150
|
+
var oldExt;
|
|
151
|
+
if (maxSize == null) {
|
|
152
|
+
maxSize = 7;
|
|
153
|
+
}
|
|
154
|
+
oldExt = upath.extname(filename);
|
|
155
|
+
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
156
|
+
return filename;
|
|
157
|
+
} else {
|
|
158
|
+
return upath.addExt(filename, ext);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
isValidExt = function (ext, ignoreExts, maxSize) {
|
|
163
|
+
if (ignoreExts == null) {
|
|
164
|
+
ignoreExts = [];
|
|
165
|
+
}
|
|
166
|
+
return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function (e) {
|
|
167
|
+
return (e && e[0] !== "." ? "." : "") + e;
|
|
168
|
+
}), ext) < 0;
|
|
169
|
+
};
|
|
170
|
+
for (name in extraFunctions) {
|
|
171
|
+
if (!hasProp.call(extraFunctions, name))
|
|
172
|
+
continue;
|
|
173
|
+
extraFn = extraFunctions[name];
|
|
174
|
+
if (upath[name] !== void 0) {
|
|
175
|
+
throw new Error("path." + name + " already exists.");
|
|
176
|
+
} else {
|
|
177
|
+
upath[name] = extraFn;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
;
|
|
182
|
+
|
|
183
|
+
}),
|
|
184
|
+
"path": (function (module) {
|
|
185
|
+
"use strict";
|
|
186
|
+
module.exports = require("path");
|
|
187
|
+
|
|
188
|
+
}),
|
|
189
|
+
|
|
190
|
+
});
|
|
191
|
+
/************************************************************************/
|
|
192
|
+
// The module cache
|
|
193
|
+
var __webpack_module_cache__ = {};
|
|
194
|
+
|
|
195
|
+
// The require function
|
|
196
|
+
function __webpack_require__(moduleId) {
|
|
197
|
+
|
|
198
|
+
// Check if module is in cache
|
|
199
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
200
|
+
if (cachedModule !== undefined) {
|
|
201
|
+
return cachedModule.exports;
|
|
202
|
+
}
|
|
203
|
+
// Create a new module (and put it into the cache)
|
|
204
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
205
|
+
exports: {}
|
|
206
|
+
});
|
|
207
|
+
// Execute the module function
|
|
208
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
209
|
+
|
|
210
|
+
// Return the exports of the module
|
|
211
|
+
return module.exports;
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/************************************************************************/
|
|
216
|
+
// webpack/runtime/compat_get_default_export
|
|
217
|
+
(() => {
|
|
218
|
+
// getDefaultExport function for compatibility with non-harmony modules
|
|
219
|
+
__webpack_require__.n = function (module) {
|
|
220
|
+
var getter = module && module.__esModule ?
|
|
221
|
+
function () { return module['default']; } :
|
|
222
|
+
function () { return module; };
|
|
223
|
+
__webpack_require__.d(getter, { a: getter });
|
|
224
|
+
return getter;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
})();
|
|
231
|
+
// webpack/runtime/define_property_getters
|
|
232
|
+
(() => {
|
|
233
|
+
__webpack_require__.d = function(exports, definition) {
|
|
234
|
+
for(var key in definition) {
|
|
235
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
236
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
})();
|
|
241
|
+
// webpack/runtime/has_own_property
|
|
242
|
+
(() => {
|
|
243
|
+
__webpack_require__.o = function (obj, prop) {
|
|
244
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
})();
|
|
248
|
+
// webpack/runtime/make_namespace_object
|
|
249
|
+
(() => {
|
|
250
|
+
// define __esModule on exports
|
|
251
|
+
__webpack_require__.r = function(exports) {
|
|
252
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
253
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
254
|
+
}
|
|
255
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
})();
|
|
259
|
+
/************************************************************************/
|
|
260
|
+
var __webpack_exports__ = {};
|
|
261
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
262
|
+
(() => {
|
|
263
|
+
"use strict";
|
|
264
|
+
// ESM COMPAT FLAG
|
|
265
|
+
__webpack_require__.r(__webpack_exports__);
|
|
266
|
+
|
|
267
|
+
// EXPORTS
|
|
268
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
269
|
+
createSnapshotSerializer: () => (/* reexport */ createSnapshotSerializer)
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
;// CONCATENATED MODULE: external "node:os"
|
|
273
|
+
var external_node_os_namespaceObject = require("node:os");
|
|
274
|
+
var external_node_os_default = /*#__PURE__*/__webpack_require__.n(external_node_os_namespaceObject);
|
|
275
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js
|
|
276
|
+
/**
|
|
277
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
278
|
+
* iteratee shorthands.
|
|
279
|
+
*
|
|
280
|
+
* @private
|
|
281
|
+
* @param {Array} [array] The array to iterate over.
|
|
282
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
283
|
+
* @param {*} [accumulator] The initial value.
|
|
284
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
285
|
+
* the initial value.
|
|
286
|
+
* @returns {*} Returns the accumulated value.
|
|
287
|
+
*/
|
|
288
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
289
|
+
var index = -1,
|
|
290
|
+
length = array == null ? 0 : array.length;
|
|
291
|
+
|
|
292
|
+
if (initAccum && length) {
|
|
293
|
+
accumulator = array[++index];
|
|
294
|
+
}
|
|
295
|
+
while (++index < length) {
|
|
296
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
297
|
+
}
|
|
298
|
+
return accumulator;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* harmony default export */ const _arrayReduce = (arrayReduce);
|
|
302
|
+
|
|
303
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js
|
|
304
|
+
/**
|
|
305
|
+
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
306
|
+
*
|
|
307
|
+
* @private
|
|
308
|
+
* @param {Object} object The object to query.
|
|
309
|
+
* @returns {Function} Returns the new accessor function.
|
|
310
|
+
*/
|
|
311
|
+
function basePropertyOf(object) {
|
|
312
|
+
return function(key) {
|
|
313
|
+
return object == null ? undefined : object[key];
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* harmony default export */ const _basePropertyOf = (basePropertyOf);
|
|
318
|
+
|
|
319
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
323
|
+
var deburredLetters = {
|
|
324
|
+
// Latin-1 Supplement block.
|
|
325
|
+
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
326
|
+
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
327
|
+
'\xc7': 'C', '\xe7': 'c',
|
|
328
|
+
'\xd0': 'D', '\xf0': 'd',
|
|
329
|
+
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
330
|
+
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
331
|
+
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
332
|
+
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
333
|
+
'\xd1': 'N', '\xf1': 'n',
|
|
334
|
+
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
335
|
+
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
336
|
+
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
337
|
+
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
338
|
+
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
339
|
+
'\xc6': 'Ae', '\xe6': 'ae',
|
|
340
|
+
'\xde': 'Th', '\xfe': 'th',
|
|
341
|
+
'\xdf': 'ss',
|
|
342
|
+
// Latin Extended-A block.
|
|
343
|
+
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
344
|
+
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
345
|
+
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
346
|
+
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
347
|
+
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
348
|
+
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
349
|
+
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
350
|
+
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
351
|
+
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
352
|
+
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
353
|
+
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
354
|
+
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
355
|
+
'\u0134': 'J', '\u0135': 'j',
|
|
356
|
+
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
357
|
+
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
358
|
+
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
359
|
+
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
360
|
+
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
361
|
+
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
362
|
+
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
363
|
+
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
364
|
+
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
365
|
+
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
366
|
+
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
367
|
+
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
368
|
+
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
369
|
+
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
370
|
+
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
371
|
+
'\u0174': 'W', '\u0175': 'w',
|
|
372
|
+
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
373
|
+
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
374
|
+
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
375
|
+
'\u0132': 'IJ', '\u0133': 'ij',
|
|
376
|
+
'\u0152': 'Oe', '\u0153': 'oe',
|
|
377
|
+
'\u0149': "'n", '\u017f': 's'
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
382
|
+
* letters to basic Latin letters.
|
|
383
|
+
*
|
|
384
|
+
* @private
|
|
385
|
+
* @param {string} letter The matched letter to deburr.
|
|
386
|
+
* @returns {string} Returns the deburred letter.
|
|
387
|
+
*/
|
|
388
|
+
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
389
|
+
|
|
390
|
+
/* harmony default export */ const _deburrLetter = (deburrLetter);
|
|
391
|
+
|
|
392
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
|
|
393
|
+
/** Detect free variable `global` from Node.js. */
|
|
394
|
+
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
395
|
+
|
|
396
|
+
/* harmony default export */ const _freeGlobal = (freeGlobal);
|
|
397
|
+
|
|
398
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
/** Detect free variable `self`. */
|
|
402
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
403
|
+
|
|
404
|
+
/** Used as a reference to the global object. */
|
|
405
|
+
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
406
|
+
|
|
407
|
+
/* harmony default export */ const _root = (root);
|
|
408
|
+
|
|
409
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
/** Built-in value references. */
|
|
413
|
+
var Symbol = _root.Symbol;
|
|
414
|
+
|
|
415
|
+
/* harmony default export */ const _Symbol = (Symbol);
|
|
416
|
+
|
|
417
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js
|
|
418
|
+
/**
|
|
419
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
420
|
+
* shorthands.
|
|
421
|
+
*
|
|
422
|
+
* @private
|
|
423
|
+
* @param {Array} [array] The array to iterate over.
|
|
424
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
425
|
+
* @returns {Array} Returns the new mapped array.
|
|
426
|
+
*/
|
|
427
|
+
function arrayMap(array, iteratee) {
|
|
428
|
+
var index = -1,
|
|
429
|
+
length = array == null ? 0 : array.length,
|
|
430
|
+
result = Array(length);
|
|
431
|
+
|
|
432
|
+
while (++index < length) {
|
|
433
|
+
result[index] = iteratee(array[index], index, array);
|
|
434
|
+
}
|
|
435
|
+
return result;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* harmony default export */ const _arrayMap = (arrayMap);
|
|
439
|
+
|
|
440
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
|
|
441
|
+
/**
|
|
442
|
+
* Checks if `value` is classified as an `Array` object.
|
|
443
|
+
*
|
|
444
|
+
* @static
|
|
445
|
+
* @memberOf _
|
|
446
|
+
* @since 0.1.0
|
|
447
|
+
* @category Lang
|
|
448
|
+
* @param {*} value The value to check.
|
|
449
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
450
|
+
* @example
|
|
451
|
+
*
|
|
452
|
+
* _.isArray([1, 2, 3]);
|
|
453
|
+
* // => true
|
|
454
|
+
*
|
|
455
|
+
* _.isArray(document.body.children);
|
|
456
|
+
* // => false
|
|
457
|
+
*
|
|
458
|
+
* _.isArray('abc');
|
|
459
|
+
* // => false
|
|
460
|
+
*
|
|
461
|
+
* _.isArray(_.noop);
|
|
462
|
+
* // => false
|
|
463
|
+
*/
|
|
464
|
+
var isArray_isArray = Array.isArray;
|
|
465
|
+
|
|
466
|
+
/* harmony default export */ const isArray = (isArray_isArray);
|
|
467
|
+
|
|
468
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
/** Used for built-in method references. */
|
|
472
|
+
var objectProto = Object.prototype;
|
|
473
|
+
|
|
474
|
+
/** Used to check objects for own properties. */
|
|
475
|
+
var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Used to resolve the
|
|
479
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
480
|
+
* of values.
|
|
481
|
+
*/
|
|
482
|
+
var nativeObjectToString = objectProto.toString;
|
|
483
|
+
|
|
484
|
+
/** Built-in value references. */
|
|
485
|
+
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
489
|
+
*
|
|
490
|
+
* @private
|
|
491
|
+
* @param {*} value The value to query.
|
|
492
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
493
|
+
*/
|
|
494
|
+
function getRawTag(value) {
|
|
495
|
+
var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag),
|
|
496
|
+
tag = value[symToStringTag];
|
|
497
|
+
|
|
498
|
+
try {
|
|
499
|
+
value[symToStringTag] = undefined;
|
|
500
|
+
var unmasked = true;
|
|
501
|
+
} catch (e) {}
|
|
502
|
+
|
|
503
|
+
var result = nativeObjectToString.call(value);
|
|
504
|
+
if (unmasked) {
|
|
505
|
+
if (isOwn) {
|
|
506
|
+
value[symToStringTag] = tag;
|
|
507
|
+
} else {
|
|
508
|
+
delete value[symToStringTag];
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return result;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* harmony default export */ const _getRawTag = (getRawTag);
|
|
515
|
+
|
|
516
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
|
|
517
|
+
/** Used for built-in method references. */
|
|
518
|
+
var _objectToString_objectProto = Object.prototype;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Used to resolve the
|
|
522
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
523
|
+
* of values.
|
|
524
|
+
*/
|
|
525
|
+
var _objectToString_nativeObjectToString = _objectToString_objectProto.toString;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
529
|
+
*
|
|
530
|
+
* @private
|
|
531
|
+
* @param {*} value The value to convert.
|
|
532
|
+
* @returns {string} Returns the converted string.
|
|
533
|
+
*/
|
|
534
|
+
function objectToString(value) {
|
|
535
|
+
return _objectToString_nativeObjectToString.call(value);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* harmony default export */ const _objectToString = (objectToString);
|
|
539
|
+
|
|
540
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
/** `Object#toString` result references. */
|
|
546
|
+
var nullTag = '[object Null]',
|
|
547
|
+
undefinedTag = '[object Undefined]';
|
|
548
|
+
|
|
549
|
+
/** Built-in value references. */
|
|
550
|
+
var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
554
|
+
*
|
|
555
|
+
* @private
|
|
556
|
+
* @param {*} value The value to query.
|
|
557
|
+
* @returns {string} Returns the `toStringTag`.
|
|
558
|
+
*/
|
|
559
|
+
function baseGetTag(value) {
|
|
560
|
+
if (value == null) {
|
|
561
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
562
|
+
}
|
|
563
|
+
return (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value))
|
|
564
|
+
? _getRawTag(value)
|
|
565
|
+
: _objectToString(value);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* harmony default export */ const _baseGetTag = (baseGetTag);
|
|
569
|
+
|
|
570
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
|
|
571
|
+
/**
|
|
572
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
573
|
+
* and has a `typeof` result of "object".
|
|
574
|
+
*
|
|
575
|
+
* @static
|
|
576
|
+
* @memberOf _
|
|
577
|
+
* @since 4.0.0
|
|
578
|
+
* @category Lang
|
|
579
|
+
* @param {*} value The value to check.
|
|
580
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
581
|
+
* @example
|
|
582
|
+
*
|
|
583
|
+
* _.isObjectLike({});
|
|
584
|
+
* // => true
|
|
585
|
+
*
|
|
586
|
+
* _.isObjectLike([1, 2, 3]);
|
|
587
|
+
* // => true
|
|
588
|
+
*
|
|
589
|
+
* _.isObjectLike(_.noop);
|
|
590
|
+
* // => false
|
|
591
|
+
*
|
|
592
|
+
* _.isObjectLike(null);
|
|
593
|
+
* // => false
|
|
594
|
+
*/
|
|
595
|
+
function isObjectLike(value) {
|
|
596
|
+
return value != null && typeof value == 'object';
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* harmony default export */ const lodash_es_isObjectLike = (isObjectLike);
|
|
600
|
+
|
|
601
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
/** `Object#toString` result references. */
|
|
606
|
+
var symbolTag = '[object Symbol]';
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
610
|
+
*
|
|
611
|
+
* @static
|
|
612
|
+
* @memberOf _
|
|
613
|
+
* @since 4.0.0
|
|
614
|
+
* @category Lang
|
|
615
|
+
* @param {*} value The value to check.
|
|
616
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
617
|
+
* @example
|
|
618
|
+
*
|
|
619
|
+
* _.isSymbol(Symbol.iterator);
|
|
620
|
+
* // => true
|
|
621
|
+
*
|
|
622
|
+
* _.isSymbol('abc');
|
|
623
|
+
* // => false
|
|
624
|
+
*/
|
|
625
|
+
function isSymbol_isSymbol(value) {
|
|
626
|
+
return typeof value == 'symbol' ||
|
|
627
|
+
(lodash_es_isObjectLike(value) && _baseGetTag(value) == symbolTag);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/* harmony default export */ const isSymbol = (isSymbol_isSymbol);
|
|
631
|
+
|
|
632
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
/** Used as references for various `Number` constants. */
|
|
639
|
+
var INFINITY = 1 / 0;
|
|
640
|
+
|
|
641
|
+
/** Used to convert symbols to primitives and strings. */
|
|
642
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
643
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
647
|
+
* values to empty strings.
|
|
648
|
+
*
|
|
649
|
+
* @private
|
|
650
|
+
* @param {*} value The value to process.
|
|
651
|
+
* @returns {string} Returns the string.
|
|
652
|
+
*/
|
|
653
|
+
function baseToString(value) {
|
|
654
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
655
|
+
if (typeof value == 'string') {
|
|
656
|
+
return value;
|
|
657
|
+
}
|
|
658
|
+
if (isArray(value)) {
|
|
659
|
+
// Recursively convert values (susceptible to call stack limits).
|
|
660
|
+
return _arrayMap(value, baseToString) + '';
|
|
661
|
+
}
|
|
662
|
+
if (isSymbol(value)) {
|
|
663
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
664
|
+
}
|
|
665
|
+
var result = (value + '');
|
|
666
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/* harmony default export */ const _baseToString = (baseToString);
|
|
670
|
+
|
|
671
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
676
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
677
|
+
*
|
|
678
|
+
* @static
|
|
679
|
+
* @memberOf _
|
|
680
|
+
* @since 4.0.0
|
|
681
|
+
* @category Lang
|
|
682
|
+
* @param {*} value The value to convert.
|
|
683
|
+
* @returns {string} Returns the converted string.
|
|
684
|
+
* @example
|
|
685
|
+
*
|
|
686
|
+
* _.toString(null);
|
|
687
|
+
* // => ''
|
|
688
|
+
*
|
|
689
|
+
* _.toString(-0);
|
|
690
|
+
* // => '-0'
|
|
691
|
+
*
|
|
692
|
+
* _.toString([1, 2, 3]);
|
|
693
|
+
* // => '1,2,3'
|
|
694
|
+
*/
|
|
695
|
+
function toString_toString(value) {
|
|
696
|
+
return value == null ? '' : _baseToString(value);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* harmony default export */ const lodash_es_toString = (toString_toString);
|
|
700
|
+
|
|
701
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
706
|
+
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
707
|
+
|
|
708
|
+
/** Used to compose unicode character classes. */
|
|
709
|
+
var rsComboMarksRange = '\\u0300-\\u036f',
|
|
710
|
+
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
711
|
+
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
712
|
+
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
713
|
+
|
|
714
|
+
/** Used to compose unicode capture groups. */
|
|
715
|
+
var rsCombo = '[' + rsComboRange + ']';
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
719
|
+
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
720
|
+
*/
|
|
721
|
+
var reComboMark = RegExp(rsCombo, 'g');
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Deburrs `string` by converting
|
|
725
|
+
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
726
|
+
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
727
|
+
* letters to basic Latin letters and removing
|
|
728
|
+
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
729
|
+
*
|
|
730
|
+
* @static
|
|
731
|
+
* @memberOf _
|
|
732
|
+
* @since 3.0.0
|
|
733
|
+
* @category String
|
|
734
|
+
* @param {string} [string=''] The string to deburr.
|
|
735
|
+
* @returns {string} Returns the deburred string.
|
|
736
|
+
* @example
|
|
737
|
+
*
|
|
738
|
+
* _.deburr('déjà vu');
|
|
739
|
+
* // => 'deja vu'
|
|
740
|
+
*/
|
|
741
|
+
function deburr_deburr(string) {
|
|
742
|
+
string = lodash_es_toString(string);
|
|
743
|
+
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/* harmony default export */ const deburr = (deburr_deburr);
|
|
747
|
+
|
|
748
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js
|
|
749
|
+
/** Used to match words composed of alphanumeric characters. */
|
|
750
|
+
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Splits an ASCII `string` into an array of its words.
|
|
754
|
+
*
|
|
755
|
+
* @private
|
|
756
|
+
* @param {string} The string to inspect.
|
|
757
|
+
* @returns {Array} Returns the words of `string`.
|
|
758
|
+
*/
|
|
759
|
+
function asciiWords(string) {
|
|
760
|
+
return string.match(reAsciiWord) || [];
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/* harmony default export */ const _asciiWords = (asciiWords);
|
|
764
|
+
|
|
765
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js
|
|
766
|
+
/** Used to detect strings that need a more robust regexp to match words. */
|
|
767
|
+
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Checks if `string` contains a word composed of Unicode symbols.
|
|
771
|
+
*
|
|
772
|
+
* @private
|
|
773
|
+
* @param {string} string The string to inspect.
|
|
774
|
+
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
775
|
+
*/
|
|
776
|
+
function hasUnicodeWord(string) {
|
|
777
|
+
return reHasUnicodeWord.test(string);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/* harmony default export */ const _hasUnicodeWord = (hasUnicodeWord);
|
|
781
|
+
|
|
782
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js
|
|
783
|
+
/** Used to compose unicode character classes. */
|
|
784
|
+
var rsAstralRange = '\\ud800-\\udfff',
|
|
785
|
+
_unicodeWords_rsComboMarksRange = '\\u0300-\\u036f',
|
|
786
|
+
_unicodeWords_reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
787
|
+
_unicodeWords_rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
788
|
+
_unicodeWords_rsComboRange = _unicodeWords_rsComboMarksRange + _unicodeWords_reComboHalfMarksRange + _unicodeWords_rsComboSymbolsRange,
|
|
789
|
+
rsDingbatRange = '\\u2700-\\u27bf',
|
|
790
|
+
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
791
|
+
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
792
|
+
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
793
|
+
rsPunctuationRange = '\\u2000-\\u206f',
|
|
794
|
+
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
795
|
+
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
796
|
+
rsVarRange = '\\ufe0e\\ufe0f',
|
|
797
|
+
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
798
|
+
|
|
799
|
+
/** Used to compose unicode capture groups. */
|
|
800
|
+
var rsApos = "['\u2019]",
|
|
801
|
+
rsBreak = '[' + rsBreakRange + ']',
|
|
802
|
+
_unicodeWords_rsCombo = '[' + _unicodeWords_rsComboRange + ']',
|
|
803
|
+
rsDigits = '\\d+',
|
|
804
|
+
rsDingbat = '[' + rsDingbatRange + ']',
|
|
805
|
+
rsLower = '[' + rsLowerRange + ']',
|
|
806
|
+
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
807
|
+
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
808
|
+
rsModifier = '(?:' + _unicodeWords_rsCombo + '|' + rsFitz + ')',
|
|
809
|
+
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
810
|
+
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
811
|
+
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
812
|
+
rsUpper = '[' + rsUpperRange + ']',
|
|
813
|
+
rsZWJ = '\\u200d';
|
|
814
|
+
|
|
815
|
+
/** Used to compose unicode regexes. */
|
|
816
|
+
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
817
|
+
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
818
|
+
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
|
819
|
+
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
|
820
|
+
reOptMod = rsModifier + '?',
|
|
821
|
+
rsOptVar = '[' + rsVarRange + ']?',
|
|
822
|
+
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
823
|
+
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
824
|
+
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
825
|
+
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
826
|
+
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
827
|
+
|
|
828
|
+
/** Used to match complex or compound words. */
|
|
829
|
+
var reUnicodeWord = RegExp([
|
|
830
|
+
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
831
|
+
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
832
|
+
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
833
|
+
rsUpper + '+' + rsOptContrUpper,
|
|
834
|
+
rsOrdUpper,
|
|
835
|
+
rsOrdLower,
|
|
836
|
+
rsDigits,
|
|
837
|
+
rsEmoji
|
|
838
|
+
].join('|'), 'g');
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Splits a Unicode `string` into an array of its words.
|
|
842
|
+
*
|
|
843
|
+
* @private
|
|
844
|
+
* @param {string} The string to inspect.
|
|
845
|
+
* @returns {Array} Returns the words of `string`.
|
|
846
|
+
*/
|
|
847
|
+
function unicodeWords(string) {
|
|
848
|
+
return string.match(reUnicodeWord) || [];
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/* harmony default export */ const _unicodeWords = (unicodeWords);
|
|
852
|
+
|
|
853
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Splits `string` into an array of its words.
|
|
861
|
+
*
|
|
862
|
+
* @static
|
|
863
|
+
* @memberOf _
|
|
864
|
+
* @since 3.0.0
|
|
865
|
+
* @category String
|
|
866
|
+
* @param {string} [string=''] The string to inspect.
|
|
867
|
+
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
868
|
+
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
869
|
+
* @returns {Array} Returns the words of `string`.
|
|
870
|
+
* @example
|
|
871
|
+
*
|
|
872
|
+
* _.words('fred, barney, & pebbles');
|
|
873
|
+
* // => ['fred', 'barney', 'pebbles']
|
|
874
|
+
*
|
|
875
|
+
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
876
|
+
* // => ['fred', 'barney', '&', 'pebbles']
|
|
877
|
+
*/
|
|
878
|
+
function words_words(string, pattern, guard) {
|
|
879
|
+
string = lodash_es_toString(string);
|
|
880
|
+
pattern = guard ? undefined : pattern;
|
|
881
|
+
|
|
882
|
+
if (pattern === undefined) {
|
|
883
|
+
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
884
|
+
}
|
|
885
|
+
return string.match(pattern) || [];
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/* harmony default export */ const words = (words_words);
|
|
889
|
+
|
|
890
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
/** Used to compose unicode capture groups. */
|
|
896
|
+
var _createCompounder_rsApos = "['\u2019]";
|
|
897
|
+
|
|
898
|
+
/** Used to match apostrophes. */
|
|
899
|
+
var reApos = RegExp(_createCompounder_rsApos, 'g');
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Creates a function like `_.camelCase`.
|
|
903
|
+
*
|
|
904
|
+
* @private
|
|
905
|
+
* @param {Function} callback The function to combine each word.
|
|
906
|
+
* @returns {Function} Returns the new compounder function.
|
|
907
|
+
*/
|
|
908
|
+
function createCompounder(callback) {
|
|
909
|
+
return function(string) {
|
|
910
|
+
return _arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/* harmony default export */ const _createCompounder = (createCompounder);
|
|
915
|
+
|
|
916
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/snakeCase.js
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Converts `string` to
|
|
921
|
+
* [snake case](https://en.wikipedia.org/wiki/Snake_case).
|
|
922
|
+
*
|
|
923
|
+
* @static
|
|
924
|
+
* @memberOf _
|
|
925
|
+
* @since 3.0.0
|
|
926
|
+
* @category String
|
|
927
|
+
* @param {string} [string=''] The string to convert.
|
|
928
|
+
* @returns {string} Returns the snake cased string.
|
|
929
|
+
* @example
|
|
930
|
+
*
|
|
931
|
+
* _.snakeCase('Foo Bar');
|
|
932
|
+
* // => 'foo_bar'
|
|
933
|
+
*
|
|
934
|
+
* _.snakeCase('fooBar');
|
|
935
|
+
* // => 'foo_bar'
|
|
936
|
+
*
|
|
937
|
+
* _.snakeCase('--FOO-BAR--');
|
|
938
|
+
* // => 'foo_bar'
|
|
939
|
+
*/
|
|
940
|
+
var snakeCase_snakeCase = _createCompounder(function(result, word, index) {
|
|
941
|
+
return result + (index ? '_' : '') + word.toLowerCase();
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
/* harmony default export */ const snakeCase = (snakeCase_snakeCase);
|
|
945
|
+
|
|
946
|
+
;// CONCATENATED MODULE: external "node:fs"
|
|
947
|
+
var external_node_fs_namespaceObject = require("node:fs");
|
|
948
|
+
var external_node_fs_default = /*#__PURE__*/__webpack_require__.n(external_node_fs_namespaceObject);
|
|
949
|
+
;// CONCATENATED MODULE: external "node:path"
|
|
950
|
+
var external_node_path_namespaceObject = require("node:path");
|
|
951
|
+
var external_node_path_default = /*#__PURE__*/__webpack_require__.n(external_node_path_namespaceObject);
|
|
952
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Used to match `RegExp`
|
|
957
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
958
|
+
*/
|
|
959
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
960
|
+
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
|
|
964
|
+
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
|
|
965
|
+
*
|
|
966
|
+
* @static
|
|
967
|
+
* @memberOf _
|
|
968
|
+
* @since 3.0.0
|
|
969
|
+
* @category String
|
|
970
|
+
* @param {string} [string=''] The string to escape.
|
|
971
|
+
* @returns {string} Returns the escaped string.
|
|
972
|
+
* @example
|
|
973
|
+
*
|
|
974
|
+
* _.escapeRegExp('[lodash](https://lodash.com/)');
|
|
975
|
+
* // => '\[lodash\]\(https://lodash\.com/\)'
|
|
976
|
+
*/
|
|
977
|
+
function escapeRegExp(string) {
|
|
978
|
+
string = lodash_es_toString(string);
|
|
979
|
+
return (string && reHasRegExpChar.test(string))
|
|
980
|
+
? string.replace(reRegExpChar, '\\$&')
|
|
981
|
+
: string;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/* harmony default export */ const lodash_es_escapeRegExp = (escapeRegExp);
|
|
985
|
+
|
|
986
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js
|
|
987
|
+
var upath = __webpack_require__("./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js");
|
|
988
|
+
var upath_default = /*#__PURE__*/__webpack_require__.n(upath);
|
|
989
|
+
;// CONCATENATED MODULE: ./src/utils.ts
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
const isPathString = (test)=>external_node_path_default().posix.basename(test) !== test || external_node_path_default().win32.basename(test) !== test;
|
|
996
|
+
function utils_getRealTemporaryDirectory() {
|
|
997
|
+
let ret = null;
|
|
998
|
+
try {
|
|
999
|
+
ret = external_node_os_default().tmpdir();
|
|
1000
|
+
ret = external_node_fs_default().realpathSync(ret);
|
|
1001
|
+
} catch {}
|
|
1002
|
+
return ret;
|
|
1003
|
+
}
|
|
1004
|
+
const normalizeToPosixPath = (p)=>upath_default().normalizeSafe(external_node_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
|
|
1005
|
+
/**
|
|
1006
|
+
* Compile path string to RegExp.
|
|
1007
|
+
* @note Only support posix path.
|
|
1008
|
+
*/ function compilePathMatcherRegExp(match) {
|
|
1009
|
+
if (typeof match !== 'string') {
|
|
1010
|
+
return match;
|
|
1011
|
+
}
|
|
1012
|
+
const escaped = lodash_es_escapeRegExp(match);
|
|
1013
|
+
return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`);
|
|
1014
|
+
}
|
|
1015
|
+
function splitPathString(str) {
|
|
1016
|
+
return str.split(/[\\/]/);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
;// CONCATENATED MODULE: ./src/applyMatcherReplacement.ts
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
function applyPathMatcher(matcher, str, options = {}) {
|
|
1024
|
+
const regex = compilePathMatcherRegExp(matcher.match);
|
|
1025
|
+
const replacer = (substring, ...args)=>{
|
|
1026
|
+
if (options.minPartials && splitPathString(substring).length < options.minPartials) {
|
|
1027
|
+
return substring;
|
|
1028
|
+
}
|
|
1029
|
+
const ret = typeof matcher.mark === 'string' ? matcher.mark : matcher.mark(substring, ...args);
|
|
1030
|
+
return `<${snakeCase(ret).toUpperCase()}>`;
|
|
1031
|
+
};
|
|
1032
|
+
return str.replace(regex, replacer);
|
|
1033
|
+
}
|
|
1034
|
+
function applyMatcherReplacement(matchers, str, options = {}) {
|
|
1035
|
+
return matchers.reduce((ret, matcher)=>{
|
|
1036
|
+
return applyPathMatcher(matcher, ret, options);
|
|
1037
|
+
}, str);
|
|
1038
|
+
}
|
|
1039
|
+
const createDefaultPathMatchers = ()=>{
|
|
1040
|
+
const ret = [
|
|
1041
|
+
{
|
|
1042
|
+
match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/,
|
|
1043
|
+
mark: 'pnpmInner'
|
|
1044
|
+
}
|
|
1045
|
+
];
|
|
1046
|
+
const tmpdir = getRealTemporaryDirectory();
|
|
1047
|
+
tmpdir && ret.push({
|
|
1048
|
+
match: tmpdir,
|
|
1049
|
+
mark: 'temp'
|
|
1050
|
+
});
|
|
1051
|
+
ret.push({
|
|
1052
|
+
match: os.tmpdir(),
|
|
1053
|
+
mark: 'temp'
|
|
1054
|
+
});
|
|
1055
|
+
ret.push({
|
|
1056
|
+
match: os.homedir(),
|
|
1057
|
+
mark: 'home'
|
|
1058
|
+
});
|
|
1059
|
+
return ret;
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
;// CONCATENATED MODULE: ./src/createDefaultPathMatchers.ts
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
const createDefaultPathMatchers_createDefaultPathMatchers = ()=>{
|
|
1066
|
+
const ret = [
|
|
1067
|
+
{
|
|
1068
|
+
match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/,
|
|
1069
|
+
mark: 'pnpmInner'
|
|
1070
|
+
}
|
|
1071
|
+
];
|
|
1072
|
+
const tmpdir = utils_getRealTemporaryDirectory();
|
|
1073
|
+
tmpdir && ret.push({
|
|
1074
|
+
match: tmpdir,
|
|
1075
|
+
mark: 'temp'
|
|
1076
|
+
});
|
|
1077
|
+
ret.push({
|
|
1078
|
+
match: external_node_os_default().tmpdir(),
|
|
1079
|
+
mark: 'temp'
|
|
1080
|
+
});
|
|
1081
|
+
ret.push({
|
|
1082
|
+
match: external_node_os_default().homedir(),
|
|
1083
|
+
mark: 'home'
|
|
1084
|
+
});
|
|
1085
|
+
return ret;
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1088
|
+
;// CONCATENATED MODULE: ./src/createSnapshotSerializer.ts
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
function createSnapshotSerializer(options) {
|
|
1093
|
+
const { cwd = process.cwd(), workspace = process.cwd(), replace: customMatchers = [] } = options || {};
|
|
1094
|
+
const pathMatchers = [
|
|
1095
|
+
{
|
|
1096
|
+
mark: 'root',
|
|
1097
|
+
match: cwd
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
mark: 'workspace',
|
|
1101
|
+
match: workspace
|
|
1102
|
+
},
|
|
1103
|
+
...customMatchers,
|
|
1104
|
+
...createDefaultPathMatchers_createDefaultPathMatchers()
|
|
1105
|
+
];
|
|
1106
|
+
for (const matcher of pathMatchers){
|
|
1107
|
+
if (typeof matcher.match === 'string') {
|
|
1108
|
+
matcher.match = normalizeToPosixPath(matcher.match);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return {
|
|
1112
|
+
pathMatchers,
|
|
1113
|
+
// match path-format string
|
|
1114
|
+
test: (val)=>typeof val === 'string' && isPathString(val),
|
|
1115
|
+
print: (val)=>{
|
|
1116
|
+
const normalized = normalizeToPosixPath(val);
|
|
1117
|
+
const replaced = applyMatcherReplacement(pathMatchers, normalized).replace(/"/g, '\\"');
|
|
1118
|
+
return `"${replaced}"`;
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
;// CONCATENATED MODULE: ./src/index.ts
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
})();
|
|
1127
|
+
|
|
1128
|
+
var __webpack_export_target__ = exports;
|
|
1129
|
+
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
|
|
1130
|
+
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', { value: true });
|