@react-hive/honey-utils 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -5
- package/dist/README.md +64 -5
- package/dist/array/index.d.ts +1 -0
- package/dist/array/toggle-array-item.d.ts +26 -0
- package/dist/dom/history.d.ts +24 -0
- package/dist/dom/index.d.ts +1 -0
- package/dist/encoding/encode-base64-json.d.ts +1 -0
- package/dist/encoding/encode-base64.d.ts +1 -0
- package/dist/encoding/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.dev.cjs +231 -45
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/math/clamp.d.ts +18 -0
- package/dist/math/index.d.ts +1 -0
- package/package.json +9 -9
package/dist/index.dev.cjs
CHANGED
|
@@ -412,6 +412,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
412
412
|
/* harmony export */ isArray: () => (/* reexport safe */ _is_array__WEBPACK_IMPORTED_MODULE_7__.isArray),
|
|
413
413
|
/* harmony export */ isEmptyArray: () => (/* reexport safe */ _is_empty_array__WEBPACK_IMPORTED_MODULE_8__.isEmptyArray),
|
|
414
414
|
/* harmony export */ pipe: () => (/* reexport safe */ _pipe__WEBPACK_IMPORTED_MODULE_0__.pipe),
|
|
415
|
+
/* harmony export */ toggleArrayItem: () => (/* reexport safe */ _toggle_array_item__WEBPACK_IMPORTED_MODULE_10__.toggleArrayItem),
|
|
415
416
|
/* harmony export */ unique: () => (/* reexport safe */ _unique__WEBPACK_IMPORTED_MODULE_5__.unique)
|
|
416
417
|
/* harmony export */ });
|
|
417
418
|
/* harmony import */ var _pipe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipe */ "./src/array/pipe.ts");
|
|
@@ -424,6 +425,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
424
425
|
/* harmony import */ var _is_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./is-array */ "./src/array/is-array.ts");
|
|
425
426
|
/* harmony import */ var _is_empty_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./is-empty-array */ "./src/array/is-empty-array.ts");
|
|
426
427
|
/* harmony import */ var _get_adjacent_items__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-adjacent-items */ "./src/array/get-adjacent-items.ts");
|
|
428
|
+
/* harmony import */ var _toggle_array_item__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./toggle-array-item */ "./src/array/toggle-array-item.ts");
|
|
429
|
+
|
|
427
430
|
|
|
428
431
|
|
|
429
432
|
|
|
@@ -560,6 +563,54 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
560
563
|
const pipe = (...fns) => (arg) => fns.reduce((prev, fn) => fn(prev), arg);
|
|
561
564
|
|
|
562
565
|
|
|
566
|
+
/***/ },
|
|
567
|
+
|
|
568
|
+
/***/ "./src/array/toggle-array-item.ts"
|
|
569
|
+
/*!****************************************!*\
|
|
570
|
+
!*** ./src/array/toggle-array-item.ts ***!
|
|
571
|
+
\****************************************/
|
|
572
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
573
|
+
|
|
574
|
+
__webpack_require__.r(__webpack_exports__);
|
|
575
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
576
|
+
/* harmony export */ toggleArrayItem: () => (/* binding */ toggleArrayItem)
|
|
577
|
+
/* harmony export */ });
|
|
578
|
+
/* harmony import */ var _difference__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./difference */ "./src/array/difference.ts");
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Adds an item to an array or removes it from the array, without changing the source array.
|
|
582
|
+
*
|
|
583
|
+
* With `isIncluded` given, the item ends up in the array or out of it as asked - what a checkbox
|
|
584
|
+
* in a list of them reports. Without it, the item's presence is flipped.
|
|
585
|
+
*
|
|
586
|
+
* The source array itself is returned when it already is as asked, and an item already present is
|
|
587
|
+
* never added a second time. Items are matched as `includes()` matches them.
|
|
588
|
+
*
|
|
589
|
+
* @template T - The type of the items in the array.
|
|
590
|
+
*
|
|
591
|
+
* @param array - The source array.
|
|
592
|
+
* @param item - The item to add or remove.
|
|
593
|
+
* @param isIncluded - Whether the item should be in the array. Flips its presence when omitted.
|
|
594
|
+
*
|
|
595
|
+
* @returns The array with the item in it or out of it.
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```ts
|
|
599
|
+
* toggleArrayItem(['a', 'b'], 'c', true); // ['a', 'b', 'c']
|
|
600
|
+
* toggleArrayItem(['a', 'b'], 'b', false); // ['a']
|
|
601
|
+
* toggleArrayItem(['a', 'b'], 'a'); // ['b']
|
|
602
|
+
* toggleArrayItem(['a', 'b'], 'c'); // ['a', 'b', 'c']
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
605
|
+
const toggleArrayItem = (array, item, isIncluded) => {
|
|
606
|
+
const isPresent = array.includes(item);
|
|
607
|
+
if (isPresent === (isIncluded ?? !isPresent)) {
|
|
608
|
+
return array;
|
|
609
|
+
}
|
|
610
|
+
return isPresent ? (0,_difference__WEBPACK_IMPORTED_MODULE_0__.difference)(array, [item]) : [...array, item];
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
|
|
563
614
|
/***/ },
|
|
564
615
|
|
|
565
616
|
/***/ "./src/array/unique.ts"
|
|
@@ -1271,6 +1322,47 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1271
1322
|
|
|
1272
1323
|
|
|
1273
1324
|
|
|
1325
|
+
/***/ },
|
|
1326
|
+
|
|
1327
|
+
/***/ "./src/dom/history.ts"
|
|
1328
|
+
/*!****************************!*\
|
|
1329
|
+
!*** ./src/dom/history.ts ***!
|
|
1330
|
+
\****************************/
|
|
1331
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1332
|
+
|
|
1333
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1334
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1335
|
+
/* harmony export */ replaceHistorySearchParams: () => (/* binding */ replaceHistorySearchParams)
|
|
1336
|
+
/* harmony export */ });
|
|
1337
|
+
/**
|
|
1338
|
+
* Replaces the query string of the current URL without navigating or adding a history entry.
|
|
1339
|
+
*
|
|
1340
|
+
* The path and the hash are kept, and so is the history entry's state, which routers such as
|
|
1341
|
+
* React Router keep their own bookkeeping in. Empty search params remove the query string
|
|
1342
|
+
* altogether rather than leaving a bare `?`.
|
|
1343
|
+
*
|
|
1344
|
+
* `history.replaceState()` fires no event, so a router listening for navigation is not told: its
|
|
1345
|
+
* own location keeps the previous query until it next navigates.
|
|
1346
|
+
*
|
|
1347
|
+
* @param searchParams - The search params the URL should carry.
|
|
1348
|
+
*
|
|
1349
|
+
* @example
|
|
1350
|
+
* ```ts
|
|
1351
|
+
* // https://example.com/products?page=1#reviews
|
|
1352
|
+
* const searchParams = new URLSearchParams(window.location.search);
|
|
1353
|
+
*
|
|
1354
|
+
* searchParams.set('page', '2');
|
|
1355
|
+
*
|
|
1356
|
+
* replaceHistorySearchParams(searchParams);
|
|
1357
|
+
* // ➜ https://example.com/products?page=2#reviews
|
|
1358
|
+
* ```
|
|
1359
|
+
*/
|
|
1360
|
+
const replaceHistorySearchParams = (searchParams) => {
|
|
1361
|
+
const search = searchParams.toString();
|
|
1362
|
+
window.history.replaceState(window.history.state, '', `${window.location.pathname}${search ? `?${search}` : ''}${window.location.hash}`);
|
|
1363
|
+
};
|
|
1364
|
+
|
|
1365
|
+
|
|
1274
1366
|
/***/ },
|
|
1275
1367
|
|
|
1276
1368
|
/***/ "./src/dom/index.ts"
|
|
@@ -1282,25 +1374,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1282
1374
|
__webpack_require__.r(__webpack_exports__);
|
|
1283
1375
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1284
1376
|
/* harmony export */ DATA_TRANSFER_JSON_MIME: () => (/* reexport safe */ _data_transfer__WEBPACK_IMPORTED_MODULE_0__.DATA_TRANSFER_JSON_MIME),
|
|
1285
|
-
/* harmony export */ centerElementInContainer: () => (/* reexport safe */
|
|
1377
|
+
/* harmony export */ centerElementInContainer: () => (/* reexport safe */ _layout__WEBPACK_IMPORTED_MODULE_4__.centerElementInContainer),
|
|
1286
1378
|
/* harmony export */ cloneBlob: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_1__.cloneBlob),
|
|
1287
1379
|
/* harmony export */ downloadFile: () => (/* reexport safe */ _file__WEBPACK_IMPORTED_MODULE_2__.downloadFile),
|
|
1288
1380
|
/* harmony export */ getDataTransferJson: () => (/* reexport safe */ _data_transfer__WEBPACK_IMPORTED_MODULE_0__.getDataTransferJson),
|
|
1289
1381
|
/* harmony export */ getElementOffsetRect: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_1__.getElementOffsetRect),
|
|
1290
|
-
/* harmony export */ getXOverflowWidth: () => (/* reexport safe */
|
|
1291
|
-
/* harmony export */ getYOverflowHeight: () => (/* reexport safe */
|
|
1292
|
-
/* harmony export */ hasXOverflow: () => (/* reexport safe */
|
|
1293
|
-
/* harmony export */ hasYOverflow: () => (/* reexport safe */
|
|
1382
|
+
/* harmony export */ getXOverflowWidth: () => (/* reexport safe */ _layout__WEBPACK_IMPORTED_MODULE_4__.getXOverflowWidth),
|
|
1383
|
+
/* harmony export */ getYOverflowHeight: () => (/* reexport safe */ _layout__WEBPACK_IMPORTED_MODULE_4__.getYOverflowHeight),
|
|
1384
|
+
/* harmony export */ hasXOverflow: () => (/* reexport safe */ _layout__WEBPACK_IMPORTED_MODULE_4__.hasXOverflow),
|
|
1385
|
+
/* harmony export */ hasYOverflow: () => (/* reexport safe */ _layout__WEBPACK_IMPORTED_MODULE_4__.hasYOverflow),
|
|
1294
1386
|
/* harmony export */ isAnchorHtmlElement: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_1__.isAnchorHtmlElement),
|
|
1295
1387
|
/* harmony export */ isContentEditableHtmlElement: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_1__.isContentEditableHtmlElement),
|
|
1296
|
-
/* harmony export */ parse2DMatrix: () => (/* reexport safe */
|
|
1388
|
+
/* harmony export */ parse2DMatrix: () => (/* reexport safe */ _transform__WEBPACK_IMPORTED_MODULE_5__.parse2DMatrix),
|
|
1389
|
+
/* harmony export */ replaceHistorySearchParams: () => (/* reexport safe */ _history__WEBPACK_IMPORTED_MODULE_3__.replaceHistorySearchParams),
|
|
1297
1390
|
/* harmony export */ setDataTransferJson: () => (/* reexport safe */ _data_transfer__WEBPACK_IMPORTED_MODULE_0__.setDataTransferJson)
|
|
1298
1391
|
/* harmony export */ });
|
|
1299
1392
|
/* harmony import */ var _data_transfer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data-transfer */ "./src/dom/data-transfer.ts");
|
|
1300
1393
|
/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom */ "./src/dom/dom.ts");
|
|
1301
1394
|
/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./file */ "./src/dom/file/index.ts");
|
|
1302
|
-
/* harmony import */ var
|
|
1303
|
-
/* harmony import */ var
|
|
1395
|
+
/* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./history */ "./src/dom/history.ts");
|
|
1396
|
+
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layout */ "./src/dom/layout/index.ts");
|
|
1397
|
+
/* harmony import */ var _transform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transform */ "./src/dom/transform/index.ts");
|
|
1398
|
+
|
|
1304
1399
|
|
|
1305
1400
|
|
|
1306
1401
|
|
|
@@ -1555,18 +1650,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1555
1650
|
/* harmony export */ decodeBase64: () => (/* binding */ decodeBase64)
|
|
1556
1651
|
/* harmony export */ });
|
|
1557
1652
|
const BASE64_PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
1653
|
+
const decodeBase64Bytes = (value) => {
|
|
1654
|
+
if (typeof Uint8Array.fromBase64 === 'function') {
|
|
1655
|
+
return Uint8Array.fromBase64(value);
|
|
1656
|
+
}
|
|
1657
|
+
if (typeof Buffer !== 'undefined') {
|
|
1658
|
+
return Buffer.from(value, 'base64');
|
|
1659
|
+
}
|
|
1660
|
+
const binary = atob(value);
|
|
1661
|
+
const bytes = new Uint8Array(binary.length);
|
|
1662
|
+
for (let i = 0; i < binary.length; i++) {
|
|
1663
|
+
bytes[i] = binary.charCodeAt(i);
|
|
1664
|
+
}
|
|
1665
|
+
return bytes;
|
|
1666
|
+
};
|
|
1558
1667
|
const decodeBase64 = (value) => {
|
|
1668
|
+
if (!BASE64_PATTERN.test(value)) {
|
|
1669
|
+
return null;
|
|
1670
|
+
}
|
|
1559
1671
|
try {
|
|
1560
|
-
|
|
1561
|
-
return null;
|
|
1562
|
-
}
|
|
1563
|
-
if (typeof Buffer !== 'undefined') {
|
|
1564
|
-
return Buffer.from(value, 'base64').toString('utf-8');
|
|
1565
|
-
}
|
|
1566
|
-
return decodeURIComponent(atob(value)
|
|
1567
|
-
.split('')
|
|
1568
|
-
.map(char => `%${char.charCodeAt(0).toString(16).padStart(2, '0')}`)
|
|
1569
|
-
.join(''));
|
|
1672
|
+
return new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(decodeBase64Bytes(value));
|
|
1570
1673
|
}
|
|
1571
1674
|
catch {
|
|
1572
1675
|
return null;
|
|
@@ -1574,6 +1677,51 @@ const decodeBase64 = (value) => {
|
|
|
1574
1677
|
};
|
|
1575
1678
|
|
|
1576
1679
|
|
|
1680
|
+
/***/ },
|
|
1681
|
+
|
|
1682
|
+
/***/ "./src/encoding/encode-base64-json.ts"
|
|
1683
|
+
/*!********************************************!*\
|
|
1684
|
+
!*** ./src/encoding/encode-base64-json.ts ***!
|
|
1685
|
+
\********************************************/
|
|
1686
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1687
|
+
|
|
1688
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1689
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1690
|
+
/* harmony export */ encodeBase64Json: () => (/* binding */ encodeBase64Json)
|
|
1691
|
+
/* harmony export */ });
|
|
1692
|
+
/* harmony import */ var _encode_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./encode-base64 */ "./src/encoding/encode-base64.ts");
|
|
1693
|
+
|
|
1694
|
+
const encodeBase64Json = (value) => (0,_encode_base64__WEBPACK_IMPORTED_MODULE_0__.encodeBase64)(JSON.stringify(value));
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
/***/ },
|
|
1698
|
+
|
|
1699
|
+
/***/ "./src/encoding/encode-base64.ts"
|
|
1700
|
+
/*!***************************************!*\
|
|
1701
|
+
!*** ./src/encoding/encode-base64.ts ***!
|
|
1702
|
+
\***************************************/
|
|
1703
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1704
|
+
|
|
1705
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1706
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1707
|
+
/* harmony export */ encodeBase64: () => (/* binding */ encodeBase64)
|
|
1708
|
+
/* harmony export */ });
|
|
1709
|
+
const encodeBase64Bytes = (bytes) => {
|
|
1710
|
+
if (typeof bytes.toBase64 === 'function') {
|
|
1711
|
+
return bytes.toBase64();
|
|
1712
|
+
}
|
|
1713
|
+
if (typeof Buffer !== 'undefined') {
|
|
1714
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64');
|
|
1715
|
+
}
|
|
1716
|
+
let binary = '';
|
|
1717
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
1718
|
+
binary += String.fromCharCode(bytes[i]);
|
|
1719
|
+
}
|
|
1720
|
+
return btoa(binary);
|
|
1721
|
+
};
|
|
1722
|
+
const encodeBase64 = (value) => encodeBase64Bytes(new TextEncoder().encode(value));
|
|
1723
|
+
|
|
1724
|
+
|
|
1577
1725
|
/***/ },
|
|
1578
1726
|
|
|
1579
1727
|
/***/ "./src/encoding/index.ts"
|
|
@@ -1585,10 +1733,16 @@ const decodeBase64 = (value) => {
|
|
|
1585
1733
|
__webpack_require__.r(__webpack_exports__);
|
|
1586
1734
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1587
1735
|
/* harmony export */ decodeBase64: () => (/* reexport safe */ _decode_base64__WEBPACK_IMPORTED_MODULE_0__.decodeBase64),
|
|
1588
|
-
/* harmony export */ decodeBase64Json: () => (/* reexport safe */ _decode_base64_json__WEBPACK_IMPORTED_MODULE_1__.decodeBase64Json)
|
|
1736
|
+
/* harmony export */ decodeBase64Json: () => (/* reexport safe */ _decode_base64_json__WEBPACK_IMPORTED_MODULE_1__.decodeBase64Json),
|
|
1737
|
+
/* harmony export */ encodeBase64: () => (/* reexport safe */ _encode_base64__WEBPACK_IMPORTED_MODULE_2__.encodeBase64),
|
|
1738
|
+
/* harmony export */ encodeBase64Json: () => (/* reexport safe */ _encode_base64_json__WEBPACK_IMPORTED_MODULE_3__.encodeBase64Json)
|
|
1589
1739
|
/* harmony export */ });
|
|
1590
1740
|
/* harmony import */ var _decode_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decode-base64 */ "./src/encoding/decode-base64.ts");
|
|
1591
1741
|
/* harmony import */ var _decode_base64_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decode-base64-json */ "./src/encoding/decode-base64-json.ts");
|
|
1742
|
+
/* harmony import */ var _encode_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./encode-base64 */ "./src/encoding/encode-base64.ts");
|
|
1743
|
+
/* harmony import */ var _encode_base64_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./encode-base64-json */ "./src/encoding/encode-base64-json.ts");
|
|
1744
|
+
|
|
1745
|
+
|
|
1592
1746
|
|
|
1593
1747
|
|
|
1594
1748
|
|
|
@@ -2715,6 +2869,38 @@ const parseJson = (value) => {
|
|
|
2715
2869
|
};
|
|
2716
2870
|
|
|
2717
2871
|
|
|
2872
|
+
/***/ },
|
|
2873
|
+
|
|
2874
|
+
/***/ "./src/math/clamp.ts"
|
|
2875
|
+
/*!***************************!*\
|
|
2876
|
+
!*** ./src/math/clamp.ts ***!
|
|
2877
|
+
\***************************/
|
|
2878
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2879
|
+
|
|
2880
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2881
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2882
|
+
/* harmony export */ clamp: () => (/* binding */ clamp)
|
|
2883
|
+
/* harmony export */ });
|
|
2884
|
+
/**
|
|
2885
|
+
* Restricts a number to the inclusive range between `min` and `max`.
|
|
2886
|
+
*
|
|
2887
|
+
* @param value - The number to restrict.
|
|
2888
|
+
* @param min - The lower bound.
|
|
2889
|
+
* @param max - The upper bound. Wins over `min` when the two cross.
|
|
2890
|
+
*
|
|
2891
|
+
* @returns `min` when the value is below it, `max` when the value is above it, and the value
|
|
2892
|
+
* itself otherwise.
|
|
2893
|
+
*
|
|
2894
|
+
* @example
|
|
2895
|
+
* ```ts
|
|
2896
|
+
* clamp(5, 0, 10); // 5
|
|
2897
|
+
* clamp(-3, 0, 10); // 0
|
|
2898
|
+
* clamp(42, 0, 10); // 10
|
|
2899
|
+
* ```
|
|
2900
|
+
*/
|
|
2901
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
2902
|
+
|
|
2903
|
+
|
|
2718
2904
|
/***/ },
|
|
2719
2905
|
|
|
2720
2906
|
/***/ "./src/math/hash-string.ts"
|
|
@@ -2773,10 +2959,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2773
2959
|
/* harmony export */ calculateEuclideanDistance: () => (/* reexport safe */ _math__WEBPACK_IMPORTED_MODULE_0__.calculateEuclideanDistance),
|
|
2774
2960
|
/* harmony export */ calculateMovingSpeed: () => (/* reexport safe */ _math__WEBPACK_IMPORTED_MODULE_0__.calculateMovingSpeed),
|
|
2775
2961
|
/* harmony export */ calculatePercentage: () => (/* reexport safe */ _math__WEBPACK_IMPORTED_MODULE_0__.calculatePercentage),
|
|
2962
|
+
/* harmony export */ clamp: () => (/* reexport safe */ _clamp__WEBPACK_IMPORTED_MODULE_2__.clamp),
|
|
2776
2963
|
/* harmony export */ hashString: () => (/* reexport safe */ _hash_string__WEBPACK_IMPORTED_MODULE_1__.hashString)
|
|
2777
2964
|
/* harmony export */ });
|
|
2778
2965
|
/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math */ "./src/math/math.ts");
|
|
2779
2966
|
/* harmony import */ var _hash_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hash-string */ "./src/math/hash-string.ts");
|
|
2967
|
+
/* harmony import */ var _clamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clamp */ "./src/math/clamp.ts");
|
|
2968
|
+
|
|
2780
2969
|
|
|
2781
2970
|
|
|
2782
2971
|
|
|
@@ -3619,17 +3808,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3619
3808
|
/******/ });
|
|
3620
3809
|
/************************************************************************/
|
|
3621
3810
|
/******/ // The module cache
|
|
3622
|
-
/******/
|
|
3811
|
+
/******/ const __webpack_module_cache__ = {};
|
|
3623
3812
|
/******/
|
|
3624
3813
|
/******/ // The require function
|
|
3625
3814
|
/******/ function __webpack_require__(moduleId) {
|
|
3626
3815
|
/******/ // Check if module is in cache
|
|
3627
|
-
/******/
|
|
3816
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
3628
3817
|
/******/ if (cachedModule !== undefined) {
|
|
3629
3818
|
/******/ return cachedModule.exports;
|
|
3630
3819
|
/******/ }
|
|
3631
3820
|
/******/ // Create a new module (and put it into the cache)
|
|
3632
|
-
/******/
|
|
3821
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
3633
3822
|
/******/ // no module.id needed
|
|
3634
3823
|
/******/ // no module.loaded needed
|
|
3635
3824
|
/******/ exports: {}
|
|
@@ -3638,7 +3827,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3638
3827
|
/******/ // Execute the module function
|
|
3639
3828
|
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
3640
3829
|
/******/ delete __webpack_module_cache__[moduleId];
|
|
3641
|
-
/******/
|
|
3830
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
3642
3831
|
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
3643
3832
|
/******/ throw e;
|
|
3644
3833
|
/******/ }
|
|
@@ -3650,35 +3839,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3650
3839
|
/******/
|
|
3651
3840
|
/************************************************************************/
|
|
3652
3841
|
/******/ /* webpack/runtime/define property getters */
|
|
3653
|
-
/******/
|
|
3654
|
-
/******/
|
|
3655
|
-
/******/
|
|
3656
|
-
/******/
|
|
3657
|
-
/******/
|
|
3658
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
3659
|
-
/******/ }
|
|
3842
|
+
/******/ // define getter/value functions for harmony exports
|
|
3843
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
3844
|
+
/******/ for(var key in definition) {
|
|
3845
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
3846
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
3660
3847
|
/******/ }
|
|
3661
|
-
/******/ }
|
|
3662
|
-
/******/ }
|
|
3848
|
+
/******/ }
|
|
3849
|
+
/******/ };
|
|
3663
3850
|
/******/
|
|
3664
3851
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
3665
|
-
/******/ (
|
|
3666
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
3667
|
-
/******/ })();
|
|
3852
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
|
|
3668
3853
|
/******/
|
|
3669
3854
|
/******/ /* webpack/runtime/make namespace object */
|
|
3670
|
-
/******/
|
|
3671
|
-
/******/
|
|
3672
|
-
/******/
|
|
3673
|
-
/******/
|
|
3674
|
-
/******/
|
|
3675
|
-
/******/ }
|
|
3676
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
3677
|
-
/******/ };
|
|
3678
|
-
/******/ })();
|
|
3855
|
+
/******/ // define __esModule on exports
|
|
3856
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
3857
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3858
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
3859
|
+
/******/ };
|
|
3679
3860
|
/******/
|
|
3680
3861
|
/************************************************************************/
|
|
3681
|
-
|
|
3862
|
+
let __webpack_exports__ = {};
|
|
3682
3863
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
3683
3864
|
(() => {
|
|
3684
3865
|
/*!**********************!*\
|
|
@@ -3699,6 +3880,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3699
3880
|
/* harmony export */ camelToWords: () => (/* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_13__.camelToWords),
|
|
3700
3881
|
/* harmony export */ centerElementInContainer: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.centerElementInContainer),
|
|
3701
3882
|
/* harmony export */ chunk: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.chunk),
|
|
3883
|
+
/* harmony export */ clamp: () => (/* reexport safe */ _math__WEBPACK_IMPORTED_MODULE_11__.clamp),
|
|
3702
3884
|
/* harmony export */ clampOffsetToOverflow: () => (/* reexport safe */ _geometry__WEBPACK_IMPORTED_MODULE_7__.clampOffsetToOverflow),
|
|
3703
3885
|
/* harmony export */ cloneBlob: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.cloneBlob),
|
|
3704
3886
|
/* harmony export */ compact: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.compact),
|
|
@@ -3709,6 +3891,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3709
3891
|
/* harmony export */ delay: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.delay),
|
|
3710
3892
|
/* harmony export */ difference: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.difference),
|
|
3711
3893
|
/* harmony export */ downloadFile: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.downloadFile),
|
|
3894
|
+
/* harmony export */ encodeBase64: () => (/* reexport safe */ _encoding__WEBPACK_IMPORTED_MODULE_18__.encodeBase64),
|
|
3895
|
+
/* harmony export */ encodeBase64Json: () => (/* reexport safe */ _encoding__WEBPACK_IMPORTED_MODULE_18__.encodeBase64Json),
|
|
3712
3896
|
/* harmony export */ everyAsync: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.everyAsync),
|
|
3713
3897
|
/* harmony export */ fileListToFiles: () => (/* reexport safe */ _file__WEBPACK_IMPORTED_MODULE_5__.fileListToFiles),
|
|
3714
3898
|
/* harmony export */ filterParallel: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.filterParallel),
|
|
@@ -3774,6 +3958,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3774
3958
|
/* harmony export */ pipe: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.pipe),
|
|
3775
3959
|
/* harmony export */ readFilesFromDataTransfer: () => (/* reexport safe */ _file__WEBPACK_IMPORTED_MODULE_5__.readFilesFromDataTransfer),
|
|
3776
3960
|
/* harmony export */ reduceAsync: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.reduceAsync),
|
|
3961
|
+
/* harmony export */ replaceHistorySearchParams: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.replaceHistorySearchParams),
|
|
3777
3962
|
/* harmony export */ resolveAxisDelta: () => (/* reexport safe */ _intersection__WEBPACK_IMPORTED_MODULE_10__.resolveAxisDelta),
|
|
3778
3963
|
/* harmony export */ resolveBoundedDelta: () => (/* reexport safe */ _geometry__WEBPACK_IMPORTED_MODULE_7__.resolveBoundedDelta),
|
|
3779
3964
|
/* harmony export */ retry: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.retry),
|
|
@@ -3786,6 +3971,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3786
3971
|
/* harmony export */ splitStringIntoWords: () => (/* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_13__.splitStringIntoWords),
|
|
3787
3972
|
/* harmony export */ timeout: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.timeout),
|
|
3788
3973
|
/* harmony export */ toKebabCase: () => (/* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_13__.toKebabCase),
|
|
3974
|
+
/* harmony export */ toggleArrayItem: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.toggleArrayItem),
|
|
3789
3975
|
/* harmony export */ traverseFileSystemDirectory: () => (/* reexport safe */ _file__WEBPACK_IMPORTED_MODULE_5__.traverseFileSystemDirectory),
|
|
3790
3976
|
/* harmony export */ unique: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.unique)
|
|
3791
3977
|
/* harmony export */ });
|