@unifold/connect-react 0.1.58 → 0.1.60
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/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2379 -223
- package/dist/index.mjs +2379 -223
- package/package.json +7 -11
package/dist/index.mjs
CHANGED
|
@@ -1233,19 +1233,19 @@ import {
|
|
|
1233
1233
|
useMemo as useMemo10
|
|
1234
1234
|
} from "react";
|
|
1235
1235
|
|
|
1236
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1236
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1237
1237
|
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
|
1238
1238
|
|
|
1239
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1239
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1240
1240
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1241
1241
|
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
1242
1242
|
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
1243
1243
|
}).join(" ").trim();
|
|
1244
1244
|
|
|
1245
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1245
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1246
1246
|
import { forwardRef, createElement } from "react";
|
|
1247
1247
|
|
|
1248
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1248
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1249
1249
|
var defaultAttributes = {
|
|
1250
1250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1251
1251
|
width: 24,
|
|
@@ -1258,7 +1258,7 @@ var defaultAttributes = {
|
|
|
1258
1258
|
strokeLinejoin: "round"
|
|
1259
1259
|
};
|
|
1260
1260
|
|
|
1261
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1261
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1262
1262
|
var Icon = forwardRef(
|
|
1263
1263
|
({
|
|
1264
1264
|
color = "currentColor",
|
|
@@ -1290,7 +1290,7 @@ var Icon = forwardRef(
|
|
|
1290
1290
|
}
|
|
1291
1291
|
);
|
|
1292
1292
|
|
|
1293
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1293
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1294
1294
|
var createLucideIcon = (iconName, iconNode) => {
|
|
1295
1295
|
const Component = forwardRef2(
|
|
1296
1296
|
({ className, ...props }, ref) => createElement2(Icon, {
|
|
@@ -1304,7 +1304,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
1304
1304
|
return Component;
|
|
1305
1305
|
};
|
|
1306
1306
|
|
|
1307
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1307
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
|
|
1308
1308
|
var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
|
|
1309
1309
|
["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
|
|
1310
1310
|
["path", { d: "M4 7h16", key: "6tx8e3" }],
|
|
@@ -1312,13 +1312,13 @@ var ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
|
|
|
1312
1312
|
["path", { d: "M20 17H4", key: "h6l3hr" }]
|
|
1313
1313
|
]);
|
|
1314
1314
|
|
|
1315
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1315
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-left.js
|
|
1316
1316
|
var ArrowLeft = createLucideIcon("ArrowLeft", [
|
|
1317
1317
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
1318
1318
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
1319
1319
|
]);
|
|
1320
1320
|
|
|
1321
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1321
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
|
|
1322
1322
|
var ArrowUpDown = createLucideIcon("ArrowUpDown", [
|
|
1323
1323
|
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
1324
1324
|
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
@@ -1326,36 +1326,36 @@ var ArrowUpDown = createLucideIcon("ArrowUpDown", [
|
|
|
1326
1326
|
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
1327
1327
|
]);
|
|
1328
1328
|
|
|
1329
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1329
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/check.js
|
|
1330
1330
|
var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
1331
1331
|
|
|
1332
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1332
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
1333
1333
|
var ChevronDown = createLucideIcon("ChevronDown", [
|
|
1334
1334
|
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
1335
1335
|
]);
|
|
1336
1336
|
|
|
1337
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1337
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1338
1338
|
var ChevronRight = createLucideIcon("ChevronRight", [
|
|
1339
1339
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
1340
1340
|
]);
|
|
1341
1341
|
|
|
1342
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1342
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
1343
1343
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
1344
1344
|
|
|
1345
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1345
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-alert.js
|
|
1346
1346
|
var CircleAlert = createLucideIcon("CircleAlert", [
|
|
1347
1347
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1348
1348
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
1349
1349
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
1350
1350
|
]);
|
|
1351
1351
|
|
|
1352
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1352
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/circle-check.js
|
|
1353
1353
|
var CircleCheck = createLucideIcon("CircleCheck", [
|
|
1354
1354
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1355
1355
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
1356
1356
|
]);
|
|
1357
1357
|
|
|
1358
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1358
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
|
|
1359
1359
|
var ClipboardPaste = createLucideIcon("ClipboardPaste", [
|
|
1360
1360
|
[
|
|
1361
1361
|
"path",
|
|
@@ -1371,38 +1371,38 @@ var ClipboardPaste = createLucideIcon("ClipboardPaste", [
|
|
|
1371
1371
|
["path", { d: "m17 10 4 4-4 4", key: "vp2hj1" }]
|
|
1372
1372
|
]);
|
|
1373
1373
|
|
|
1374
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1374
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/clock.js
|
|
1375
1375
|
var Clock = createLucideIcon("Clock", [
|
|
1376
1376
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1377
1377
|
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
|
|
1378
1378
|
]);
|
|
1379
1379
|
|
|
1380
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1380
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/copy.js
|
|
1381
1381
|
var Copy = createLucideIcon("Copy", [
|
|
1382
1382
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
1383
1383
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
1384
1384
|
]);
|
|
1385
1385
|
|
|
1386
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1386
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/credit-card.js
|
|
1387
1387
|
var CreditCard = createLucideIcon("CreditCard", [
|
|
1388
1388
|
["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
|
|
1389
1389
|
["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
|
|
1390
1390
|
]);
|
|
1391
1391
|
|
|
1392
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1392
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
|
|
1393
1393
|
var DollarSign = createLucideIcon("DollarSign", [
|
|
1394
1394
|
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
1395
1395
|
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
1396
1396
|
]);
|
|
1397
1397
|
|
|
1398
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1398
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
1399
1399
|
var ExternalLink = createLucideIcon("ExternalLink", [
|
|
1400
1400
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
1401
1401
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
1402
1402
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
1403
1403
|
]);
|
|
1404
1404
|
|
|
1405
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1405
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/hand.js
|
|
1406
1406
|
var Hand = createLucideIcon("Hand", [
|
|
1407
1407
|
["path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2", key: "1fvzgz" }],
|
|
1408
1408
|
["path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2", key: "1kc0my" }],
|
|
@@ -1416,26 +1416,26 @@ var Hand = createLucideIcon("Hand", [
|
|
|
1416
1416
|
]
|
|
1417
1417
|
]);
|
|
1418
1418
|
|
|
1419
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1419
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/info.js
|
|
1420
1420
|
var Info = createLucideIcon("Info", [
|
|
1421
1421
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1422
1422
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
1423
1423
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
1424
1424
|
]);
|
|
1425
1425
|
|
|
1426
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1426
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/link-2.js
|
|
1427
1427
|
var Link2 = createLucideIcon("Link2", [
|
|
1428
1428
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
1429
1429
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
1430
1430
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
1431
1431
|
]);
|
|
1432
1432
|
|
|
1433
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1433
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
1434
1434
|
var LoaderCircle = createLucideIcon("LoaderCircle", [
|
|
1435
1435
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
1436
1436
|
]);
|
|
1437
1437
|
|
|
1438
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1438
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
|
|
1439
1439
|
var MapPinOff = createLucideIcon("MapPinOff", [
|
|
1440
1440
|
["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16", key: "1d4wjd" }],
|
|
1441
1441
|
[
|
|
@@ -1450,7 +1450,7 @@ var MapPinOff = createLucideIcon("MapPinOff", [
|
|
|
1450
1450
|
["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74", key: "13wojd" }]
|
|
1451
1451
|
]);
|
|
1452
1452
|
|
|
1453
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1453
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
|
|
1454
1454
|
var RefreshCw = createLucideIcon("RefreshCw", [
|
|
1455
1455
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
1456
1456
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
@@ -1458,7 +1458,7 @@ var RefreshCw = createLucideIcon("RefreshCw", [
|
|
|
1458
1458
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
1459
1459
|
]);
|
|
1460
1460
|
|
|
1461
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1461
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield-check.js
|
|
1462
1462
|
var ShieldCheck = createLucideIcon("ShieldCheck", [
|
|
1463
1463
|
[
|
|
1464
1464
|
"path",
|
|
@@ -1470,7 +1470,7 @@ var ShieldCheck = createLucideIcon("ShieldCheck", [
|
|
|
1470
1470
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
1471
1471
|
]);
|
|
1472
1472
|
|
|
1473
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1473
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/shield.js
|
|
1474
1474
|
var Shield = createLucideIcon("Shield", [
|
|
1475
1475
|
[
|
|
1476
1476
|
"path",
|
|
@@ -1481,7 +1481,7 @@ var Shield = createLucideIcon("Shield", [
|
|
|
1481
1481
|
]
|
|
1482
1482
|
]);
|
|
1483
1483
|
|
|
1484
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1484
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
|
|
1485
1485
|
var TriangleAlert = createLucideIcon("TriangleAlert", [
|
|
1486
1486
|
[
|
|
1487
1487
|
"path",
|
|
@@ -1494,7 +1494,7 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
|
|
|
1494
1494
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
1495
1495
|
]);
|
|
1496
1496
|
|
|
1497
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1497
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
|
|
1498
1498
|
var WalletMinimal = createLucideIcon("WalletMinimal", [
|
|
1499
1499
|
["path", { d: "M17 14h.01", key: "7oqj8z" }],
|
|
1500
1500
|
[
|
|
@@ -1506,7 +1506,7 @@ var WalletMinimal = createLucideIcon("WalletMinimal", [
|
|
|
1506
1506
|
]
|
|
1507
1507
|
]);
|
|
1508
1508
|
|
|
1509
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1509
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/wallet.js
|
|
1510
1510
|
var Wallet = createLucideIcon("Wallet", [
|
|
1511
1511
|
[
|
|
1512
1512
|
"path",
|
|
@@ -1518,13 +1518,13 @@ var Wallet = createLucideIcon("Wallet", [
|
|
|
1518
1518
|
["path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4", key: "xoc0q4" }]
|
|
1519
1519
|
]);
|
|
1520
1520
|
|
|
1521
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1521
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/x.js
|
|
1522
1522
|
var X = createLucideIcon("X", [
|
|
1523
1523
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
1524
1524
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
1525
1525
|
]);
|
|
1526
1526
|
|
|
1527
|
-
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@
|
|
1527
|
+
// ../../node_modules/.pnpm/lucide-react@0.454.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
1528
1528
|
var Zap = createLucideIcon("Zap", [
|
|
1529
1529
|
[
|
|
1530
1530
|
"path",
|
|
@@ -1538,7 +1538,7 @@ var Zap = createLucideIcon("Zap", [
|
|
|
1538
1538
|
// ../ui-react/dist/index.mjs
|
|
1539
1539
|
import * as React36 from "react";
|
|
1540
1540
|
|
|
1541
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
1541
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
1542
1542
|
import * as React24 from "react";
|
|
1543
1543
|
|
|
1544
1544
|
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
@@ -1552,7 +1552,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
|
|
1555
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@
|
|
1555
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
1556
1556
|
import * as React from "react";
|
|
1557
1557
|
function setRef(ref, value) {
|
|
1558
1558
|
if (typeof ref === "function") {
|
|
@@ -1589,7 +1589,7 @@ function useComposedRefs(...refs) {
|
|
|
1589
1589
|
return React.useCallback(composeRefs(...refs), refs);
|
|
1590
1590
|
}
|
|
1591
1591
|
|
|
1592
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@
|
|
1592
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
1593
1593
|
import * as React2 from "react";
|
|
1594
1594
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1595
1595
|
function createContext22(rootComponentName, defaultContext) {
|
|
@@ -1666,15 +1666,15 @@ function composeContextScopes(...scopes) {
|
|
|
1666
1666
|
return createScope;
|
|
1667
1667
|
}
|
|
1668
1668
|
|
|
1669
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@
|
|
1669
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1670
1670
|
import * as React4 from "react";
|
|
1671
1671
|
|
|
1672
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@
|
|
1672
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1673
1673
|
import * as React3 from "react";
|
|
1674
1674
|
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
|
1675
1675
|
};
|
|
1676
1676
|
|
|
1677
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@
|
|
1677
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1678
1678
|
var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
|
|
1679
1679
|
var count = 0;
|
|
1680
1680
|
function useId(deterministicId) {
|
|
@@ -1685,7 +1685,7 @@ function useId(deterministicId) {
|
|
|
1685
1685
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
1686
1686
|
}
|
|
1687
1687
|
|
|
1688
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@
|
|
1688
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
1689
1689
|
import * as React5 from "react";
|
|
1690
1690
|
import * as React22 from "react";
|
|
1691
1691
|
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
@@ -1753,14 +1753,14 @@ function isFunction(value) {
|
|
|
1753
1753
|
return typeof value === "function";
|
|
1754
1754
|
}
|
|
1755
1755
|
|
|
1756
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+
|
|
1756
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1757
1757
|
import * as React10 from "react";
|
|
1758
1758
|
|
|
1759
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.
|
|
1759
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1760
1760
|
import * as React7 from "react";
|
|
1761
1761
|
import * as ReactDOM from "react-dom";
|
|
1762
1762
|
|
|
1763
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@
|
|
1763
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
1764
1764
|
import * as React6 from "react";
|
|
1765
1765
|
import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
|
|
1766
1766
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1855,7 +1855,7 @@ function getElementRef(element) {
|
|
|
1855
1855
|
return element.props.ref || element.ref;
|
|
1856
1856
|
}
|
|
1857
1857
|
|
|
1858
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.
|
|
1858
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19._gsiol2hcpd6qizfnjc77drzehq/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1859
1859
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1860
1860
|
var NODES = [
|
|
1861
1861
|
"a",
|
|
@@ -1893,7 +1893,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
1893
1893
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
1896
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@
|
|
1896
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
1897
1897
|
import * as React8 from "react";
|
|
1898
1898
|
function useCallbackRef(callback) {
|
|
1899
1899
|
const callbackRef = React8.useRef(callback);
|
|
@@ -1903,7 +1903,7 @@ function useCallbackRef(callback) {
|
|
|
1903
1903
|
return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
1904
1904
|
}
|
|
1905
1905
|
|
|
1906
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@
|
|
1906
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
1907
1907
|
import * as React9 from "react";
|
|
1908
1908
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
1909
1909
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
@@ -1918,7 +1918,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
1918
1918
|
}, [onEscapeKeyDown, ownerDocument]);
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
1921
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+
|
|
1921
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.9__@types+_ibhfsyo6t6zt76khfyzt7lbbq4/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
1922
1922
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1923
1923
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
1924
1924
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
@@ -2123,7 +2123,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
2125
|
|
|
2126
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@
|
|
2126
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@1_md5yxmzngi2erdl2zbrekjyad4/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
2127
2127
|
import * as React11 from "react";
|
|
2128
2128
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
2129
2129
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
@@ -2327,7 +2327,7 @@ function removeLinks(items) {
|
|
|
2327
2327
|
return items.filter((item) => item.tagName !== "A");
|
|
2328
2328
|
}
|
|
2329
2329
|
|
|
2330
|
-
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
2330
|
+
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_a2vhfobmg2rqexwxy4r74ynlqm/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
2331
2331
|
import * as React12 from "react";
|
|
2332
2332
|
import ReactDOM2 from "react-dom";
|
|
2333
2333
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
@@ -2341,7 +2341,7 @@ var Portal = React12.forwardRef((props, forwardedRef) => {
|
|
|
2341
2341
|
});
|
|
2342
2342
|
Portal.displayName = PORTAL_NAME;
|
|
2343
2343
|
|
|
2344
|
-
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.
|
|
2344
|
+
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2_vxszomp4jt7xd7ti6rlx4jypfq/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
2345
2345
|
import * as React23 from "react";
|
|
2346
2346
|
import * as React13 from "react";
|
|
2347
2347
|
function useStateMachine(initialState, machine) {
|
|
@@ -2467,7 +2467,7 @@ function getElementRef2(element) {
|
|
|
2467
2467
|
return element.props.ref || element.ref;
|
|
2468
2468
|
}
|
|
2469
2469
|
|
|
2470
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@
|
|
2470
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
2471
2471
|
import * as React14 from "react";
|
|
2472
2472
|
var count2 = 0;
|
|
2473
2473
|
function useFocusGuards() {
|
|
@@ -2527,19 +2527,19 @@ function __spreadArray(to, from, pack) {
|
|
|
2527
2527
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2528
2528
|
}
|
|
2529
2529
|
|
|
2530
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2530
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
2531
2531
|
import * as React21 from "react";
|
|
2532
2532
|
|
|
2533
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2533
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
2534
2534
|
import * as React17 from "react";
|
|
2535
2535
|
|
|
2536
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@
|
|
2536
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
2537
2537
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
2538
2538
|
var fullWidthClassName = "width-before-scroll-bar";
|
|
2539
2539
|
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
2540
2540
|
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
2541
2541
|
|
|
2542
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@
|
|
2542
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
2543
2543
|
function assignRef(ref, value) {
|
|
2544
2544
|
if (typeof ref === "function") {
|
|
2545
2545
|
ref(value);
|
|
@@ -2549,7 +2549,7 @@ function assignRef(ref, value) {
|
|
|
2549
2549
|
return ref;
|
|
2550
2550
|
}
|
|
2551
2551
|
|
|
2552
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@
|
|
2552
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
2553
2553
|
import { useState as useState8 } from "react";
|
|
2554
2554
|
function useCallbackRef2(initialValue, callback) {
|
|
2555
2555
|
var ref = useState8(function() {
|
|
@@ -2577,7 +2577,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
2577
2577
|
return ref.facade;
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@
|
|
2580
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.9_react@19.2.3/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
2581
2581
|
import * as React15 from "react";
|
|
2582
2582
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
|
|
2583
2583
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
@@ -2609,7 +2609,7 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
2609
2609
|
return callbackRef;
|
|
2610
2610
|
}
|
|
2611
2611
|
|
|
2612
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@
|
|
2612
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/medium.js
|
|
2613
2613
|
function ItoI(a) {
|
|
2614
2614
|
return a;
|
|
2615
2615
|
}
|
|
@@ -2695,7 +2695,7 @@ function createSidecarMedium(options) {
|
|
|
2695
2695
|
return medium;
|
|
2696
2696
|
}
|
|
2697
2697
|
|
|
2698
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@
|
|
2698
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.9_react@19.2.3/node_modules/use-sidecar/dist/es2015/exports.js
|
|
2699
2699
|
import * as React16 from "react";
|
|
2700
2700
|
var SideCar = function(_a) {
|
|
2701
2701
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
@@ -2714,10 +2714,10 @@ function exportSidecar(medium, exported) {
|
|
|
2714
2714
|
return SideCar;
|
|
2715
2715
|
}
|
|
2716
2716
|
|
|
2717
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2717
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
2718
2718
|
var effectCar = createSidecarMedium();
|
|
2719
2719
|
|
|
2720
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2720
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
2721
2721
|
var nothing = function() {
|
|
2722
2722
|
return;
|
|
2723
2723
|
};
|
|
@@ -2749,13 +2749,13 @@ RemoveScroll.classNames = {
|
|
|
2749
2749
|
zeroRight: zeroRightClassName
|
|
2750
2750
|
};
|
|
2751
2751
|
|
|
2752
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2752
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
2753
2753
|
import * as React20 from "react";
|
|
2754
2754
|
|
|
2755
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@
|
|
2755
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
2756
2756
|
import * as React19 from "react";
|
|
2757
2757
|
|
|
2758
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@
|
|
2758
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
2759
2759
|
import * as React18 from "react";
|
|
2760
2760
|
|
|
2761
2761
|
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
@@ -2770,7 +2770,7 @@ var getNonce = function() {
|
|
|
2770
2770
|
return void 0;
|
|
2771
2771
|
};
|
|
2772
2772
|
|
|
2773
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@
|
|
2773
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
2774
2774
|
function makeStyleTag() {
|
|
2775
2775
|
if (!document)
|
|
2776
2776
|
return null;
|
|
@@ -2816,7 +2816,7 @@ var stylesheetSingleton = function() {
|
|
|
2816
2816
|
};
|
|
2817
2817
|
};
|
|
2818
2818
|
|
|
2819
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@
|
|
2819
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
2820
2820
|
var styleHookSingleton = function() {
|
|
2821
2821
|
var sheet = stylesheetSingleton();
|
|
2822
2822
|
return function(styles, isDynamic) {
|
|
@@ -2829,7 +2829,7 @@ var styleHookSingleton = function() {
|
|
|
2829
2829
|
};
|
|
2830
2830
|
};
|
|
2831
2831
|
|
|
2832
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@
|
|
2832
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.9_react@19.2.3/node_modules/react-style-singleton/dist/es2015/component.js
|
|
2833
2833
|
var styleSingleton = function() {
|
|
2834
2834
|
var useStyle = styleHookSingleton();
|
|
2835
2835
|
var Sheet = function(_a) {
|
|
@@ -2840,7 +2840,7 @@ var styleSingleton = function() {
|
|
|
2840
2840
|
return Sheet;
|
|
2841
2841
|
};
|
|
2842
2842
|
|
|
2843
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@
|
|
2843
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
2844
2844
|
var zeroGap = {
|
|
2845
2845
|
left: 0,
|
|
2846
2846
|
top: 0,
|
|
@@ -2875,7 +2875,7 @@ var getGapWidth = function(gapMode) {
|
|
|
2875
2875
|
};
|
|
2876
2876
|
};
|
|
2877
2877
|
|
|
2878
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@
|
|
2878
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
2879
2879
|
var Style = styleSingleton();
|
|
2880
2880
|
var lockAttribute = "data-scroll-locked";
|
|
2881
2881
|
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
@@ -2915,7 +2915,7 @@ var RemoveScrollBar = function(_a) {
|
|
|
2915
2915
|
return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
2916
2916
|
};
|
|
2917
2917
|
|
|
2918
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2918
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
2919
2919
|
var passiveSupported = false;
|
|
2920
2920
|
if (typeof window !== "undefined") {
|
|
2921
2921
|
try {
|
|
@@ -2934,7 +2934,7 @@ if (typeof window !== "undefined") {
|
|
|
2934
2934
|
var options;
|
|
2935
2935
|
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
2936
2936
|
|
|
2937
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
2937
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
2938
2938
|
var alwaysContainsScroll = function(node) {
|
|
2939
2939
|
return node.tagName === "TEXTAREA";
|
|
2940
2940
|
};
|
|
@@ -3034,7 +3034,7 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
3034
3034
|
return shouldCancelScroll;
|
|
3035
3035
|
};
|
|
3036
3036
|
|
|
3037
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
3037
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3038
3038
|
var getTouchXY = function(event) {
|
|
3039
3039
|
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
3040
3040
|
};
|
|
@@ -3205,10 +3205,10 @@ function getOutermostShadowParent(node) {
|
|
|
3205
3205
|
return shadowParent;
|
|
3206
3206
|
}
|
|
3207
3207
|
|
|
3208
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
3208
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
3209
3209
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
3210
3210
|
|
|
3211
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@
|
|
3211
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.9_react@19.2.3/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3212
3212
|
var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
|
|
3213
3213
|
return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
3214
3214
|
});
|
|
@@ -3336,7 +3336,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
3336
3336
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
3337
3337
|
};
|
|
3338
3338
|
|
|
3339
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
3339
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._qsrlqvvmbbdzsfzle7bhabp7n4/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
3340
3340
|
import { Fragment as Fragment5, jsx as jsx8, jsxs } from "react/jsx-runtime";
|
|
3341
3341
|
var DIALOG_NAME = "Dialog";
|
|
3342
3342
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
@@ -6244,12 +6244,12 @@ var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
|
|
|
6244
6244
|
return ExecutionStatus2;
|
|
6245
6245
|
})(ExecutionStatus || {});
|
|
6246
6246
|
var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
6247
|
-
async function queryExecutions(externalUserId, publishableKey, actionType) {
|
|
6247
|
+
async function queryExecutions(externalUserId, publishableKey, actionType = "deposit") {
|
|
6248
6248
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
6249
6249
|
validatePublishableKey(pk);
|
|
6250
6250
|
const body = {
|
|
6251
6251
|
external_user_id: externalUserId,
|
|
6252
|
-
|
|
6252
|
+
action_type: actionType
|
|
6253
6253
|
};
|
|
6254
6254
|
const response = await fetch(
|
|
6255
6255
|
`${API_BASE_URL}/v1/public/direct_executions/query`,
|
|
@@ -7204,7 +7204,7 @@ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
|
7204
7204
|
import * as React92 from "react";
|
|
7205
7205
|
import * as React82 from "react";
|
|
7206
7206
|
|
|
7207
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@
|
|
7207
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
7208
7208
|
import * as React25 from "react";
|
|
7209
7209
|
import { Fragment as Fragment22, jsx as jsx9 } from "react/jsx-runtime";
|
|
7210
7210
|
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
@@ -7355,6 +7355,62 @@ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
|
7355
7355
|
import * as React112 from "react";
|
|
7356
7356
|
import { jsx as jsx222, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7357
7357
|
import * as React242 from "react";
|
|
7358
|
+
|
|
7359
|
+
// ../../node_modules/.pnpm/mipd@0.0.7_typescript@5.9.3/node_modules/mipd/dist/esm/utils.js
|
|
7360
|
+
function requestProviders(listener) {
|
|
7361
|
+
if (typeof window === "undefined")
|
|
7362
|
+
return;
|
|
7363
|
+
const handler = (event) => listener(event.detail);
|
|
7364
|
+
window.addEventListener("eip6963:announceProvider", handler);
|
|
7365
|
+
window.dispatchEvent(new CustomEvent("eip6963:requestProvider"));
|
|
7366
|
+
return () => window.removeEventListener("eip6963:announceProvider", handler);
|
|
7367
|
+
}
|
|
7368
|
+
|
|
7369
|
+
// ../../node_modules/.pnpm/mipd@0.0.7_typescript@5.9.3/node_modules/mipd/dist/esm/store.js
|
|
7370
|
+
function createStore() {
|
|
7371
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
7372
|
+
let providerDetails = [];
|
|
7373
|
+
const request = () => requestProviders((providerDetail) => {
|
|
7374
|
+
if (providerDetails.some(({ info }) => info.uuid === providerDetail.info.uuid))
|
|
7375
|
+
return;
|
|
7376
|
+
providerDetails = [...providerDetails, providerDetail];
|
|
7377
|
+
listeners.forEach((listener) => listener(providerDetails, { added: [providerDetail] }));
|
|
7378
|
+
});
|
|
7379
|
+
let unwatch = request();
|
|
7380
|
+
return {
|
|
7381
|
+
_listeners() {
|
|
7382
|
+
return listeners;
|
|
7383
|
+
},
|
|
7384
|
+
clear() {
|
|
7385
|
+
listeners.forEach((listener) => listener([], { removed: [...providerDetails] }));
|
|
7386
|
+
providerDetails = [];
|
|
7387
|
+
},
|
|
7388
|
+
destroy() {
|
|
7389
|
+
this.clear();
|
|
7390
|
+
listeners.clear();
|
|
7391
|
+
unwatch?.();
|
|
7392
|
+
},
|
|
7393
|
+
findProvider({ rdns }) {
|
|
7394
|
+
return providerDetails.find((providerDetail) => providerDetail.info.rdns === rdns);
|
|
7395
|
+
},
|
|
7396
|
+
getProviders() {
|
|
7397
|
+
return providerDetails;
|
|
7398
|
+
},
|
|
7399
|
+
reset() {
|
|
7400
|
+
this.clear();
|
|
7401
|
+
unwatch?.();
|
|
7402
|
+
unwatch = request();
|
|
7403
|
+
},
|
|
7404
|
+
subscribe(listener, { emitImmediately } = {}) {
|
|
7405
|
+
listeners.add(listener);
|
|
7406
|
+
if (emitImmediately)
|
|
7407
|
+
listener(providerDetails, { added: providerDetails });
|
|
7408
|
+
return () => listeners.delete(listener);
|
|
7409
|
+
}
|
|
7410
|
+
};
|
|
7411
|
+
}
|
|
7412
|
+
|
|
7413
|
+
// ../ui-react/dist/index.mjs
|
|
7358
7414
|
import * as React122 from "react";
|
|
7359
7415
|
import { jsx as jsx232, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7360
7416
|
import * as React132 from "react";
|
|
@@ -7397,6 +7453,2006 @@ import { jsx as jsx38 } from "react/jsx-runtime";
|
|
|
7397
7453
|
import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7398
7454
|
import { Fragment as Fragment52, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7399
7455
|
import { useState as useState232, useMemo as useMemo62, useEffect as useEffect192 } from "react";
|
|
7456
|
+
|
|
7457
|
+
// ../../node_modules/.pnpm/fuse.js@7.4.0/node_modules/fuse.js/dist/fuse.mjs
|
|
7458
|
+
function isArray(value) {
|
|
7459
|
+
return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
|
|
7460
|
+
}
|
|
7461
|
+
function baseToString(value) {
|
|
7462
|
+
if (typeof value == "string") {
|
|
7463
|
+
return value;
|
|
7464
|
+
}
|
|
7465
|
+
if (typeof value === "bigint") {
|
|
7466
|
+
return value.toString();
|
|
7467
|
+
}
|
|
7468
|
+
const result = value + "";
|
|
7469
|
+
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
7470
|
+
}
|
|
7471
|
+
function toString(value) {
|
|
7472
|
+
return value == null ? "" : baseToString(value);
|
|
7473
|
+
}
|
|
7474
|
+
function isString(value) {
|
|
7475
|
+
return typeof value === "string";
|
|
7476
|
+
}
|
|
7477
|
+
function isNumber2(value) {
|
|
7478
|
+
return typeof value === "number";
|
|
7479
|
+
}
|
|
7480
|
+
function isBoolean(value) {
|
|
7481
|
+
return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
|
|
7482
|
+
}
|
|
7483
|
+
function isObject(value) {
|
|
7484
|
+
return typeof value === "object";
|
|
7485
|
+
}
|
|
7486
|
+
function isObjectLike(value) {
|
|
7487
|
+
return isObject(value) && value !== null;
|
|
7488
|
+
}
|
|
7489
|
+
function isDefined(value) {
|
|
7490
|
+
return value !== void 0 && value !== null;
|
|
7491
|
+
}
|
|
7492
|
+
function isBlank(value) {
|
|
7493
|
+
return !value.trim().length;
|
|
7494
|
+
}
|
|
7495
|
+
function getTag(value) {
|
|
7496
|
+
return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
|
|
7497
|
+
}
|
|
7498
|
+
var INCORRECT_INDEX_TYPE = "Incorrect 'index' type";
|
|
7499
|
+
var INVALID_DOC_INDEX = "Invalid doc index: must be a non-negative integer within the bounds of the docs array";
|
|
7500
|
+
var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`;
|
|
7501
|
+
var PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`;
|
|
7502
|
+
var MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;
|
|
7503
|
+
var INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`;
|
|
7504
|
+
var FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED = `Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`;
|
|
7505
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
7506
|
+
var KeyStore = class {
|
|
7507
|
+
constructor(keys) {
|
|
7508
|
+
this._keys = [];
|
|
7509
|
+
this._keyMap = {};
|
|
7510
|
+
let totalWeight = 0;
|
|
7511
|
+
keys.forEach((key) => {
|
|
7512
|
+
const obj = createKey(key);
|
|
7513
|
+
this._keys.push(obj);
|
|
7514
|
+
this._keyMap[obj.id] = obj;
|
|
7515
|
+
totalWeight += obj.weight;
|
|
7516
|
+
});
|
|
7517
|
+
this._keys.forEach((key) => {
|
|
7518
|
+
key.weight /= totalWeight;
|
|
7519
|
+
});
|
|
7520
|
+
}
|
|
7521
|
+
get(keyId) {
|
|
7522
|
+
return this._keyMap[keyId];
|
|
7523
|
+
}
|
|
7524
|
+
keys() {
|
|
7525
|
+
return this._keys;
|
|
7526
|
+
}
|
|
7527
|
+
toJSON() {
|
|
7528
|
+
return JSON.stringify(this._keys);
|
|
7529
|
+
}
|
|
7530
|
+
};
|
|
7531
|
+
function createKey(key) {
|
|
7532
|
+
let path = null;
|
|
7533
|
+
let id = null;
|
|
7534
|
+
let src = null;
|
|
7535
|
+
let weight = 1;
|
|
7536
|
+
let getFn = null;
|
|
7537
|
+
if (isString(key) || isArray(key)) {
|
|
7538
|
+
src = key;
|
|
7539
|
+
path = createKeyPath(key);
|
|
7540
|
+
id = createKeyId(key);
|
|
7541
|
+
} else {
|
|
7542
|
+
if (!hasOwn.call(key, "name")) {
|
|
7543
|
+
throw new Error(MISSING_KEY_PROPERTY("name"));
|
|
7544
|
+
}
|
|
7545
|
+
const name = key.name;
|
|
7546
|
+
src = name;
|
|
7547
|
+
if (hasOwn.call(key, "weight") && key.weight !== void 0) {
|
|
7548
|
+
weight = key.weight;
|
|
7549
|
+
if (weight <= 0) {
|
|
7550
|
+
throw new Error(INVALID_KEY_WEIGHT_VALUE(createKeyId(name)));
|
|
7551
|
+
}
|
|
7552
|
+
}
|
|
7553
|
+
path = createKeyPath(name);
|
|
7554
|
+
id = createKeyId(name);
|
|
7555
|
+
getFn = key.getFn ?? null;
|
|
7556
|
+
}
|
|
7557
|
+
return {
|
|
7558
|
+
path,
|
|
7559
|
+
id,
|
|
7560
|
+
weight,
|
|
7561
|
+
src,
|
|
7562
|
+
getFn
|
|
7563
|
+
};
|
|
7564
|
+
}
|
|
7565
|
+
function createKeyPath(key) {
|
|
7566
|
+
return isArray(key) ? key : key.split(".");
|
|
7567
|
+
}
|
|
7568
|
+
function createKeyId(key) {
|
|
7569
|
+
return isArray(key) ? key.join(".") : key;
|
|
7570
|
+
}
|
|
7571
|
+
function get(obj, path) {
|
|
7572
|
+
const list = [];
|
|
7573
|
+
let arr = false;
|
|
7574
|
+
const deepGet = (obj2, path2, index2, arrayIndex) => {
|
|
7575
|
+
if (!isDefined(obj2)) {
|
|
7576
|
+
return;
|
|
7577
|
+
}
|
|
7578
|
+
if (!path2[index2]) {
|
|
7579
|
+
list.push(arrayIndex !== void 0 ? {
|
|
7580
|
+
v: obj2,
|
|
7581
|
+
i: arrayIndex
|
|
7582
|
+
} : obj2);
|
|
7583
|
+
} else {
|
|
7584
|
+
const key = path2[index2];
|
|
7585
|
+
const value = obj2[key];
|
|
7586
|
+
if (!isDefined(value)) {
|
|
7587
|
+
return;
|
|
7588
|
+
}
|
|
7589
|
+
if (index2 === path2.length - 1 && (isString(value) || isNumber2(value) || isBoolean(value) || typeof value === "bigint")) {
|
|
7590
|
+
list.push(arrayIndex !== void 0 ? {
|
|
7591
|
+
v: toString(value),
|
|
7592
|
+
i: arrayIndex
|
|
7593
|
+
} : toString(value));
|
|
7594
|
+
} else if (isArray(value)) {
|
|
7595
|
+
arr = true;
|
|
7596
|
+
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
7597
|
+
deepGet(value[i], path2, index2 + 1, i);
|
|
7598
|
+
}
|
|
7599
|
+
} else if (path2.length) {
|
|
7600
|
+
deepGet(value, path2, index2 + 1, arrayIndex);
|
|
7601
|
+
}
|
|
7602
|
+
}
|
|
7603
|
+
};
|
|
7604
|
+
deepGet(obj, isString(path) ? path.split(".") : path, 0);
|
|
7605
|
+
return arr ? list : list[0];
|
|
7606
|
+
}
|
|
7607
|
+
var MatchOptions = {
|
|
7608
|
+
includeMatches: false,
|
|
7609
|
+
findAllMatches: false,
|
|
7610
|
+
minMatchCharLength: 1
|
|
7611
|
+
};
|
|
7612
|
+
var BasicOptions = {
|
|
7613
|
+
isCaseSensitive: false,
|
|
7614
|
+
ignoreDiacritics: false,
|
|
7615
|
+
includeScore: false,
|
|
7616
|
+
keys: [],
|
|
7617
|
+
shouldSort: true,
|
|
7618
|
+
sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1
|
|
7619
|
+
};
|
|
7620
|
+
var FuzzyOptions = {
|
|
7621
|
+
location: 0,
|
|
7622
|
+
threshold: 0.6,
|
|
7623
|
+
distance: 100
|
|
7624
|
+
};
|
|
7625
|
+
var AdvancedOptions = {
|
|
7626
|
+
useExtendedSearch: false,
|
|
7627
|
+
useTokenSearch: false,
|
|
7628
|
+
tokenize: void 0,
|
|
7629
|
+
tokenMatch: "any",
|
|
7630
|
+
getFn: get,
|
|
7631
|
+
ignoreLocation: false,
|
|
7632
|
+
ignoreFieldNorm: false,
|
|
7633
|
+
fieldNormWeight: 1
|
|
7634
|
+
};
|
|
7635
|
+
var Config = Object.freeze({
|
|
7636
|
+
...BasicOptions,
|
|
7637
|
+
...MatchOptions,
|
|
7638
|
+
...FuzzyOptions,
|
|
7639
|
+
...AdvancedOptions
|
|
7640
|
+
});
|
|
7641
|
+
function norm(weight = 1, mantissa = 3) {
|
|
7642
|
+
const cache = /* @__PURE__ */ new Map();
|
|
7643
|
+
const m = Math.pow(10, mantissa);
|
|
7644
|
+
return {
|
|
7645
|
+
get(value) {
|
|
7646
|
+
let numTokens = 1;
|
|
7647
|
+
let inSpace = false;
|
|
7648
|
+
for (let i = 0; i < value.length; i++) {
|
|
7649
|
+
if (value.charCodeAt(i) === 32) {
|
|
7650
|
+
if (!inSpace) {
|
|
7651
|
+
numTokens++;
|
|
7652
|
+
inSpace = true;
|
|
7653
|
+
}
|
|
7654
|
+
} else {
|
|
7655
|
+
inSpace = false;
|
|
7656
|
+
}
|
|
7657
|
+
}
|
|
7658
|
+
if (cache.has(numTokens)) {
|
|
7659
|
+
return cache.get(numTokens);
|
|
7660
|
+
}
|
|
7661
|
+
const n = Math.round(m / Math.pow(numTokens, 0.5 * weight)) / m;
|
|
7662
|
+
cache.set(numTokens, n);
|
|
7663
|
+
return n;
|
|
7664
|
+
},
|
|
7665
|
+
clear() {
|
|
7666
|
+
cache.clear();
|
|
7667
|
+
}
|
|
7668
|
+
};
|
|
7669
|
+
}
|
|
7670
|
+
var FuseIndex = class {
|
|
7671
|
+
constructor({
|
|
7672
|
+
getFn = Config.getFn,
|
|
7673
|
+
fieldNormWeight = Config.fieldNormWeight
|
|
7674
|
+
} = {}) {
|
|
7675
|
+
this.norm = norm(fieldNormWeight, 3);
|
|
7676
|
+
this.getFn = getFn;
|
|
7677
|
+
this.isCreated = false;
|
|
7678
|
+
this.docs = [];
|
|
7679
|
+
this.keys = [];
|
|
7680
|
+
this._keysMap = {};
|
|
7681
|
+
this.setIndexRecords();
|
|
7682
|
+
}
|
|
7683
|
+
setSources(docs = []) {
|
|
7684
|
+
this.docs = docs;
|
|
7685
|
+
}
|
|
7686
|
+
setIndexRecords(records = []) {
|
|
7687
|
+
this.records = records;
|
|
7688
|
+
}
|
|
7689
|
+
setKeys(keys = []) {
|
|
7690
|
+
this.keys = keys;
|
|
7691
|
+
this._keysMap = {};
|
|
7692
|
+
keys.forEach((key, idx) => {
|
|
7693
|
+
this._keysMap[key.id] = idx;
|
|
7694
|
+
});
|
|
7695
|
+
}
|
|
7696
|
+
create() {
|
|
7697
|
+
if (this.isCreated || !this.docs.length) {
|
|
7698
|
+
return;
|
|
7699
|
+
}
|
|
7700
|
+
this.isCreated = true;
|
|
7701
|
+
const len = this.docs.length;
|
|
7702
|
+
this.records = new Array(len);
|
|
7703
|
+
let recordCount = 0;
|
|
7704
|
+
if (isString(this.docs[0])) {
|
|
7705
|
+
for (let i = 0; i < len; i++) {
|
|
7706
|
+
const record = this._createStringRecord(this.docs[i], i);
|
|
7707
|
+
if (record) {
|
|
7708
|
+
this.records[recordCount++] = record;
|
|
7709
|
+
}
|
|
7710
|
+
}
|
|
7711
|
+
} else {
|
|
7712
|
+
for (let i = 0; i < len; i++) {
|
|
7713
|
+
this.records[recordCount++] = this._createObjectRecord(this.docs[i], i);
|
|
7714
|
+
}
|
|
7715
|
+
}
|
|
7716
|
+
this.records.length = recordCount;
|
|
7717
|
+
this.norm.clear();
|
|
7718
|
+
}
|
|
7719
|
+
// Appends a record for `doc` at `docIndex` (the doc's position in the source
|
|
7720
|
+
// array). Returns the appended record, or null when `doc` is a blank string
|
|
7721
|
+
// (those are skipped at record creation; see `_createStringRecord`). Callers
|
|
7722
|
+
// use the return value to gate downstream bookkeeping like the inverted
|
|
7723
|
+
// index, which must not be touched when no record was produced.
|
|
7724
|
+
add(doc, docIndex) {
|
|
7725
|
+
if (!Number.isInteger(docIndex) || docIndex < 0) {
|
|
7726
|
+
throw new Error(INVALID_DOC_INDEX);
|
|
7727
|
+
}
|
|
7728
|
+
if (isString(doc)) {
|
|
7729
|
+
const record2 = this._createStringRecord(doc, docIndex);
|
|
7730
|
+
if (record2) {
|
|
7731
|
+
this.records.push(record2);
|
|
7732
|
+
}
|
|
7733
|
+
return record2;
|
|
7734
|
+
}
|
|
7735
|
+
const record = this._createObjectRecord(doc, docIndex);
|
|
7736
|
+
this.records.push(record);
|
|
7737
|
+
return record;
|
|
7738
|
+
}
|
|
7739
|
+
// Removes the record for the doc at the specified source-array (docs) index.
|
|
7740
|
+
// Blank string docs have no record; callers may pass such an index and the
|
|
7741
|
+
// splice is a no-op, but subsequent records still need their .i decremented
|
|
7742
|
+
// to track the docs array that the caller is splicing in parallel.
|
|
7743
|
+
removeAt(idx) {
|
|
7744
|
+
if (!Number.isInteger(idx) || idx < 0) {
|
|
7745
|
+
throw new Error(INVALID_DOC_INDEX);
|
|
7746
|
+
}
|
|
7747
|
+
for (let i = 0, len = this.records.length; i < len; i += 1) {
|
|
7748
|
+
if (this.records[i].i === idx) {
|
|
7749
|
+
this.records.splice(i, 1);
|
|
7750
|
+
break;
|
|
7751
|
+
}
|
|
7752
|
+
}
|
|
7753
|
+
for (let i = 0, len = this.records.length; i < len; i += 1) {
|
|
7754
|
+
if (this.records[i].i > idx) {
|
|
7755
|
+
this.records[i].i -= 1;
|
|
7756
|
+
}
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7759
|
+
// Removes records for the docs at the specified source-array indices, then
|
|
7760
|
+
// shifts every surviving record's .i down by the count of removed indices
|
|
7761
|
+
// strictly less than it (mirrors removeAndShiftInvertedIndex's shift math).
|
|
7762
|
+
// Invalid entries (non-integer, negative) in `indices` are dropped silently
|
|
7763
|
+
// — removeAll's natural use case is "caller passed a list of matched doc
|
|
7764
|
+
// indices"; asymmetric throw-vs-no-op would be more surprising than a clean
|
|
7765
|
+
// filter.
|
|
7766
|
+
removeAll(indices) {
|
|
7767
|
+
const toRemove = /* @__PURE__ */ new Set();
|
|
7768
|
+
for (const v of indices) {
|
|
7769
|
+
if (Number.isInteger(v) && v >= 0) {
|
|
7770
|
+
toRemove.add(v);
|
|
7771
|
+
}
|
|
7772
|
+
}
|
|
7773
|
+
if (toRemove.size === 0) {
|
|
7774
|
+
return;
|
|
7775
|
+
}
|
|
7776
|
+
this.records = this.records.filter((r2) => !toRemove.has(r2.i));
|
|
7777
|
+
const sorted = Array.from(toRemove).sort((a, b) => a - b);
|
|
7778
|
+
for (const record of this.records) {
|
|
7779
|
+
let lo = 0;
|
|
7780
|
+
let hi = sorted.length;
|
|
7781
|
+
while (lo < hi) {
|
|
7782
|
+
const mid = lo + hi >>> 1;
|
|
7783
|
+
if (sorted[mid] < record.i) lo = mid + 1;
|
|
7784
|
+
else hi = mid;
|
|
7785
|
+
}
|
|
7786
|
+
record.i -= lo;
|
|
7787
|
+
}
|
|
7788
|
+
}
|
|
7789
|
+
getValueForItemAtKeyId(item, keyId) {
|
|
7790
|
+
return item[this._keysMap[keyId]];
|
|
7791
|
+
}
|
|
7792
|
+
size() {
|
|
7793
|
+
return this.records.length;
|
|
7794
|
+
}
|
|
7795
|
+
_createStringRecord(doc, docIndex) {
|
|
7796
|
+
if (!isDefined(doc) || isBlank(doc)) {
|
|
7797
|
+
return null;
|
|
7798
|
+
}
|
|
7799
|
+
return {
|
|
7800
|
+
v: doc,
|
|
7801
|
+
i: docIndex,
|
|
7802
|
+
n: this.norm.get(doc)
|
|
7803
|
+
};
|
|
7804
|
+
}
|
|
7805
|
+
_createObjectRecord(doc, docIndex) {
|
|
7806
|
+
const record = {
|
|
7807
|
+
i: docIndex,
|
|
7808
|
+
$: {}
|
|
7809
|
+
};
|
|
7810
|
+
for (let keyIndex = 0, keyLen = this.keys.length; keyIndex < keyLen; keyIndex++) {
|
|
7811
|
+
const key = this.keys[keyIndex];
|
|
7812
|
+
const value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);
|
|
7813
|
+
if (!isDefined(value)) {
|
|
7814
|
+
continue;
|
|
7815
|
+
}
|
|
7816
|
+
if (isArray(value)) {
|
|
7817
|
+
const subRecords = [];
|
|
7818
|
+
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
7819
|
+
const item = value[i];
|
|
7820
|
+
if (!isDefined(item)) {
|
|
7821
|
+
continue;
|
|
7822
|
+
}
|
|
7823
|
+
if (isString(item)) {
|
|
7824
|
+
if (!isBlank(item)) {
|
|
7825
|
+
const subRecord = {
|
|
7826
|
+
v: item,
|
|
7827
|
+
i,
|
|
7828
|
+
n: this.norm.get(item)
|
|
7829
|
+
};
|
|
7830
|
+
subRecords.push(subRecord);
|
|
7831
|
+
}
|
|
7832
|
+
} else if (isDefined(item.v)) {
|
|
7833
|
+
const text = isString(item.v) ? item.v : toString(item.v);
|
|
7834
|
+
if (!isBlank(text)) {
|
|
7835
|
+
const subRecord = {
|
|
7836
|
+
v: text,
|
|
7837
|
+
i: item.i,
|
|
7838
|
+
n: this.norm.get(text)
|
|
7839
|
+
};
|
|
7840
|
+
subRecords.push(subRecord);
|
|
7841
|
+
}
|
|
7842
|
+
}
|
|
7843
|
+
}
|
|
7844
|
+
record.$[keyIndex] = subRecords;
|
|
7845
|
+
} else if (isString(value) && !isBlank(value)) {
|
|
7846
|
+
const subRecord = {
|
|
7847
|
+
v: value,
|
|
7848
|
+
n: this.norm.get(value)
|
|
7849
|
+
};
|
|
7850
|
+
record.$[keyIndex] = subRecord;
|
|
7851
|
+
}
|
|
7852
|
+
}
|
|
7853
|
+
return record;
|
|
7854
|
+
}
|
|
7855
|
+
toJSON() {
|
|
7856
|
+
return {
|
|
7857
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7858
|
+
keys: this.keys.map(({
|
|
7859
|
+
getFn,
|
|
7860
|
+
...key
|
|
7861
|
+
}) => key),
|
|
7862
|
+
records: this.records
|
|
7863
|
+
};
|
|
7864
|
+
}
|
|
7865
|
+
};
|
|
7866
|
+
function createIndex(keys, docs, {
|
|
7867
|
+
getFn = Config.getFn,
|
|
7868
|
+
fieldNormWeight = Config.fieldNormWeight
|
|
7869
|
+
} = {}) {
|
|
7870
|
+
const myIndex = new FuseIndex({
|
|
7871
|
+
getFn,
|
|
7872
|
+
fieldNormWeight
|
|
7873
|
+
});
|
|
7874
|
+
myIndex.setKeys(keys.map(createKey));
|
|
7875
|
+
myIndex.setSources(docs);
|
|
7876
|
+
myIndex.create();
|
|
7877
|
+
return myIndex;
|
|
7878
|
+
}
|
|
7879
|
+
function parseIndex(data, {
|
|
7880
|
+
getFn = Config.getFn,
|
|
7881
|
+
fieldNormWeight = Config.fieldNormWeight
|
|
7882
|
+
} = {}) {
|
|
7883
|
+
const {
|
|
7884
|
+
keys,
|
|
7885
|
+
records
|
|
7886
|
+
} = data;
|
|
7887
|
+
const myIndex = new FuseIndex({
|
|
7888
|
+
getFn,
|
|
7889
|
+
fieldNormWeight
|
|
7890
|
+
});
|
|
7891
|
+
myIndex.setKeys(keys);
|
|
7892
|
+
myIndex.setIndexRecords(records);
|
|
7893
|
+
return myIndex;
|
|
7894
|
+
}
|
|
7895
|
+
function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) {
|
|
7896
|
+
const indices = [];
|
|
7897
|
+
let start = -1;
|
|
7898
|
+
let end = -1;
|
|
7899
|
+
let i = 0;
|
|
7900
|
+
for (let len = matchmask.length; i < len; i += 1) {
|
|
7901
|
+
const match = matchmask[i];
|
|
7902
|
+
if (match && start === -1) {
|
|
7903
|
+
start = i;
|
|
7904
|
+
} else if (!match && start !== -1) {
|
|
7905
|
+
end = i - 1;
|
|
7906
|
+
if (end - start + 1 >= minMatchCharLength) {
|
|
7907
|
+
indices.push([start, end]);
|
|
7908
|
+
}
|
|
7909
|
+
start = -1;
|
|
7910
|
+
}
|
|
7911
|
+
}
|
|
7912
|
+
if (matchmask[i - 1] && i - start >= minMatchCharLength) {
|
|
7913
|
+
indices.push([start, i - 1]);
|
|
7914
|
+
}
|
|
7915
|
+
return indices;
|
|
7916
|
+
}
|
|
7917
|
+
var MAX_BITS = 32;
|
|
7918
|
+
function search(text, pattern, patternAlphabet, {
|
|
7919
|
+
location = Config.location,
|
|
7920
|
+
distance = Config.distance,
|
|
7921
|
+
threshold = Config.threshold,
|
|
7922
|
+
findAllMatches = Config.findAllMatches,
|
|
7923
|
+
minMatchCharLength = Config.minMatchCharLength,
|
|
7924
|
+
includeMatches = Config.includeMatches,
|
|
7925
|
+
ignoreLocation = Config.ignoreLocation
|
|
7926
|
+
} = {}) {
|
|
7927
|
+
if (pattern.length > MAX_BITS) {
|
|
7928
|
+
throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));
|
|
7929
|
+
}
|
|
7930
|
+
const patternLen = pattern.length;
|
|
7931
|
+
const textLen = text.length;
|
|
7932
|
+
const expectedLocation = Math.max(0, Math.min(location, textLen));
|
|
7933
|
+
let currentThreshold = threshold;
|
|
7934
|
+
let bestLocation = expectedLocation;
|
|
7935
|
+
const calcScore = (errors, currentLocation) => {
|
|
7936
|
+
const accuracy = errors / patternLen;
|
|
7937
|
+
if (ignoreLocation) return accuracy;
|
|
7938
|
+
const proximity = Math.abs(expectedLocation - currentLocation);
|
|
7939
|
+
if (!distance) return proximity ? 1 : accuracy;
|
|
7940
|
+
return accuracy + proximity / distance;
|
|
7941
|
+
};
|
|
7942
|
+
const computeMatches = minMatchCharLength > 1 || includeMatches;
|
|
7943
|
+
const matchMask = computeMatches ? Array(textLen) : [];
|
|
7944
|
+
let index2;
|
|
7945
|
+
while ((index2 = text.indexOf(pattern, bestLocation)) > -1) {
|
|
7946
|
+
const score = calcScore(0, index2);
|
|
7947
|
+
currentThreshold = Math.min(score, currentThreshold);
|
|
7948
|
+
bestLocation = index2 + patternLen;
|
|
7949
|
+
if (computeMatches) {
|
|
7950
|
+
let i = 0;
|
|
7951
|
+
while (i < patternLen) {
|
|
7952
|
+
matchMask[index2 + i] = 1;
|
|
7953
|
+
i += 1;
|
|
7954
|
+
}
|
|
7955
|
+
}
|
|
7956
|
+
}
|
|
7957
|
+
bestLocation = -1;
|
|
7958
|
+
let lastBitArr = [];
|
|
7959
|
+
let finalScore = 1;
|
|
7960
|
+
let bestErrors = 0;
|
|
7961
|
+
let binMax = patternLen + textLen;
|
|
7962
|
+
const mask = 1 << patternLen - 1;
|
|
7963
|
+
for (let i = 0; i < patternLen; i += 1) {
|
|
7964
|
+
let binMin = 0;
|
|
7965
|
+
let binMid = binMax;
|
|
7966
|
+
while (binMin < binMid) {
|
|
7967
|
+
const score2 = calcScore(i, expectedLocation + binMid);
|
|
7968
|
+
if (score2 <= currentThreshold) {
|
|
7969
|
+
binMin = binMid;
|
|
7970
|
+
} else {
|
|
7971
|
+
binMax = binMid;
|
|
7972
|
+
}
|
|
7973
|
+
binMid = Math.floor((binMax - binMin) / 2 + binMin);
|
|
7974
|
+
}
|
|
7975
|
+
binMax = binMid;
|
|
7976
|
+
let start = Math.max(1, expectedLocation - binMid + 1);
|
|
7977
|
+
const finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;
|
|
7978
|
+
const bitArr = Array(finish + 2);
|
|
7979
|
+
bitArr[finish + 1] = (1 << i) - 1;
|
|
7980
|
+
for (let j = finish; j >= start; j -= 1) {
|
|
7981
|
+
const currentLocation = j - 1;
|
|
7982
|
+
const charMatch = patternAlphabet[text[currentLocation]];
|
|
7983
|
+
bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;
|
|
7984
|
+
if (i) {
|
|
7985
|
+
bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];
|
|
7986
|
+
}
|
|
7987
|
+
if (bitArr[j] & mask) {
|
|
7988
|
+
finalScore = calcScore(i, currentLocation);
|
|
7989
|
+
if (finalScore <= currentThreshold) {
|
|
7990
|
+
currentThreshold = finalScore;
|
|
7991
|
+
bestLocation = currentLocation;
|
|
7992
|
+
bestErrors = i;
|
|
7993
|
+
if (bestLocation <= expectedLocation) {
|
|
7994
|
+
break;
|
|
7995
|
+
}
|
|
7996
|
+
start = Math.max(1, 2 * expectedLocation - bestLocation);
|
|
7997
|
+
}
|
|
7998
|
+
}
|
|
7999
|
+
}
|
|
8000
|
+
const score = calcScore(i + 1, expectedLocation);
|
|
8001
|
+
if (score > currentThreshold) {
|
|
8002
|
+
break;
|
|
8003
|
+
}
|
|
8004
|
+
lastBitArr = bitArr;
|
|
8005
|
+
}
|
|
8006
|
+
if (computeMatches && bestLocation >= 0) {
|
|
8007
|
+
const matchEnd = Math.min(textLen - 1, bestLocation + patternLen - 1 + bestErrors);
|
|
8008
|
+
for (let k = bestLocation; k <= matchEnd; k += 1) {
|
|
8009
|
+
if (patternAlphabet[text[k]]) {
|
|
8010
|
+
matchMask[k] = 1;
|
|
8011
|
+
}
|
|
8012
|
+
}
|
|
8013
|
+
}
|
|
8014
|
+
const result = {
|
|
8015
|
+
isMatch: bestLocation >= 0,
|
|
8016
|
+
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
8017
|
+
score: Math.max(1e-3, finalScore)
|
|
8018
|
+
};
|
|
8019
|
+
if (computeMatches) {
|
|
8020
|
+
const indices = convertMaskToIndices(matchMask, minMatchCharLength);
|
|
8021
|
+
if (!indices.length) {
|
|
8022
|
+
result.isMatch = false;
|
|
8023
|
+
} else if (includeMatches) {
|
|
8024
|
+
result.indices = indices;
|
|
8025
|
+
}
|
|
8026
|
+
}
|
|
8027
|
+
return result;
|
|
8028
|
+
}
|
|
8029
|
+
function createPatternAlphabet(pattern) {
|
|
8030
|
+
const mask = {};
|
|
8031
|
+
for (let i = 0, len = pattern.length; i < len; i += 1) {
|
|
8032
|
+
const char = pattern.charAt(i);
|
|
8033
|
+
mask[char] = (mask[char] || 0) | 1 << len - i - 1;
|
|
8034
|
+
}
|
|
8035
|
+
return mask;
|
|
8036
|
+
}
|
|
8037
|
+
function mergeIndices(indices) {
|
|
8038
|
+
if (indices.length <= 1) return indices;
|
|
8039
|
+
indices.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
|
|
8040
|
+
const merged = [indices[0]];
|
|
8041
|
+
for (let i = 1, len = indices.length; i < len; i += 1) {
|
|
8042
|
+
const last = merged[merged.length - 1];
|
|
8043
|
+
const curr = indices[i];
|
|
8044
|
+
if (curr[0] <= last[1] + 1) {
|
|
8045
|
+
last[1] = Math.max(last[1], curr[1]);
|
|
8046
|
+
} else {
|
|
8047
|
+
merged.push(curr);
|
|
8048
|
+
}
|
|
8049
|
+
}
|
|
8050
|
+
return merged;
|
|
8051
|
+
}
|
|
8052
|
+
var NON_DECOMPOSABLE_MAP = {
|
|
8053
|
+
"\u0142": "l",
|
|
8054
|
+
// ł
|
|
8055
|
+
"\u0141": "L",
|
|
8056
|
+
// Ł
|
|
8057
|
+
"\u0111": "d",
|
|
8058
|
+
// đ
|
|
8059
|
+
"\u0110": "D",
|
|
8060
|
+
// Đ
|
|
8061
|
+
"\xF8": "o",
|
|
8062
|
+
// ø
|
|
8063
|
+
"\xD8": "O",
|
|
8064
|
+
// Ø
|
|
8065
|
+
"\u0127": "h",
|
|
8066
|
+
// ħ
|
|
8067
|
+
"\u0126": "H",
|
|
8068
|
+
// Ħ
|
|
8069
|
+
"\u0167": "t",
|
|
8070
|
+
// ŧ
|
|
8071
|
+
"\u0166": "T",
|
|
8072
|
+
// Ŧ
|
|
8073
|
+
"\u0131": "i",
|
|
8074
|
+
// ı
|
|
8075
|
+
"\xDF": "ss"
|
|
8076
|
+
// ß
|
|
8077
|
+
};
|
|
8078
|
+
var NON_DECOMPOSABLE_RE = new RegExp("[" + Object.keys(NON_DECOMPOSABLE_MAP).join("") + "]", "g");
|
|
8079
|
+
var stripDiacritics = typeof String.prototype.normalize === "function" ? (str) => str.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(NON_DECOMPOSABLE_RE, (ch) => NON_DECOMPOSABLE_MAP[ch]) : (str) => str;
|
|
8080
|
+
var BitapSearch = class {
|
|
8081
|
+
constructor(pattern, {
|
|
8082
|
+
location = Config.location,
|
|
8083
|
+
threshold = Config.threshold,
|
|
8084
|
+
distance = Config.distance,
|
|
8085
|
+
includeMatches = Config.includeMatches,
|
|
8086
|
+
findAllMatches = Config.findAllMatches,
|
|
8087
|
+
minMatchCharLength = Config.minMatchCharLength,
|
|
8088
|
+
isCaseSensitive = Config.isCaseSensitive,
|
|
8089
|
+
ignoreDiacritics = Config.ignoreDiacritics,
|
|
8090
|
+
ignoreLocation = Config.ignoreLocation
|
|
8091
|
+
} = {}) {
|
|
8092
|
+
this.options = {
|
|
8093
|
+
location,
|
|
8094
|
+
threshold,
|
|
8095
|
+
distance,
|
|
8096
|
+
includeMatches,
|
|
8097
|
+
findAllMatches,
|
|
8098
|
+
minMatchCharLength,
|
|
8099
|
+
isCaseSensitive,
|
|
8100
|
+
ignoreDiacritics,
|
|
8101
|
+
ignoreLocation
|
|
8102
|
+
};
|
|
8103
|
+
pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
|
|
8104
|
+
pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
|
|
8105
|
+
this.pattern = pattern;
|
|
8106
|
+
this.chunks = [];
|
|
8107
|
+
if (!this.pattern.length) {
|
|
8108
|
+
return;
|
|
8109
|
+
}
|
|
8110
|
+
const addChunk = (pattern2, startIndex) => {
|
|
8111
|
+
this.chunks.push({
|
|
8112
|
+
pattern: pattern2,
|
|
8113
|
+
alphabet: createPatternAlphabet(pattern2),
|
|
8114
|
+
startIndex
|
|
8115
|
+
});
|
|
8116
|
+
};
|
|
8117
|
+
const len = this.pattern.length;
|
|
8118
|
+
if (len > MAX_BITS) {
|
|
8119
|
+
let i = 0;
|
|
8120
|
+
const remainder = len % MAX_BITS;
|
|
8121
|
+
const end = len - remainder;
|
|
8122
|
+
while (i < end) {
|
|
8123
|
+
addChunk(this.pattern.substr(i, MAX_BITS), i);
|
|
8124
|
+
i += MAX_BITS;
|
|
8125
|
+
}
|
|
8126
|
+
if (remainder) {
|
|
8127
|
+
const startIndex = len - MAX_BITS;
|
|
8128
|
+
addChunk(this.pattern.substr(startIndex), startIndex);
|
|
8129
|
+
}
|
|
8130
|
+
} else {
|
|
8131
|
+
addChunk(this.pattern, 0);
|
|
8132
|
+
}
|
|
8133
|
+
}
|
|
8134
|
+
searchIn(text) {
|
|
8135
|
+
const {
|
|
8136
|
+
isCaseSensitive,
|
|
8137
|
+
ignoreDiacritics,
|
|
8138
|
+
includeMatches
|
|
8139
|
+
} = this.options;
|
|
8140
|
+
text = isCaseSensitive ? text : text.toLowerCase();
|
|
8141
|
+
text = ignoreDiacritics ? stripDiacritics(text) : text;
|
|
8142
|
+
if (this.pattern === text) {
|
|
8143
|
+
const result2 = {
|
|
8144
|
+
isMatch: true,
|
|
8145
|
+
score: 0
|
|
8146
|
+
};
|
|
8147
|
+
if (includeMatches) {
|
|
8148
|
+
result2.indices = [[0, text.length - 1]];
|
|
8149
|
+
}
|
|
8150
|
+
return result2;
|
|
8151
|
+
}
|
|
8152
|
+
const {
|
|
8153
|
+
location,
|
|
8154
|
+
distance,
|
|
8155
|
+
threshold,
|
|
8156
|
+
findAllMatches,
|
|
8157
|
+
minMatchCharLength,
|
|
8158
|
+
ignoreLocation
|
|
8159
|
+
} = this.options;
|
|
8160
|
+
const allIndices = [];
|
|
8161
|
+
let totalScore = 0;
|
|
8162
|
+
let hasMatches = false;
|
|
8163
|
+
this.chunks.forEach(({
|
|
8164
|
+
pattern,
|
|
8165
|
+
alphabet,
|
|
8166
|
+
startIndex
|
|
8167
|
+
}) => {
|
|
8168
|
+
const {
|
|
8169
|
+
isMatch,
|
|
8170
|
+
score,
|
|
8171
|
+
indices
|
|
8172
|
+
} = search(text, pattern, alphabet, {
|
|
8173
|
+
location: location + startIndex,
|
|
8174
|
+
distance,
|
|
8175
|
+
threshold,
|
|
8176
|
+
findAllMatches,
|
|
8177
|
+
minMatchCharLength,
|
|
8178
|
+
includeMatches,
|
|
8179
|
+
ignoreLocation
|
|
8180
|
+
});
|
|
8181
|
+
if (isMatch) {
|
|
8182
|
+
hasMatches = true;
|
|
8183
|
+
}
|
|
8184
|
+
totalScore += score;
|
|
8185
|
+
if (isMatch && indices) {
|
|
8186
|
+
allIndices.push(...indices);
|
|
8187
|
+
}
|
|
8188
|
+
});
|
|
8189
|
+
const result = {
|
|
8190
|
+
isMatch: hasMatches,
|
|
8191
|
+
score: hasMatches ? totalScore / this.chunks.length : 1
|
|
8192
|
+
};
|
|
8193
|
+
if (hasMatches && includeMatches) {
|
|
8194
|
+
result.indices = mergeIndices(allIndices);
|
|
8195
|
+
}
|
|
8196
|
+
return result;
|
|
8197
|
+
}
|
|
8198
|
+
};
|
|
8199
|
+
var MULTI_MATCH_TYPES = /* @__PURE__ */ new Set(["fuzzy", "include"]);
|
|
8200
|
+
function isInverse(type) {
|
|
8201
|
+
return type.startsWith("inverse");
|
|
8202
|
+
}
|
|
8203
|
+
var matchers = [
|
|
8204
|
+
// =term — exact match
|
|
8205
|
+
{
|
|
8206
|
+
type: "exact",
|
|
8207
|
+
multiRegex: /^="(.*)"$/,
|
|
8208
|
+
singleRegex: /^=(.*)$/,
|
|
8209
|
+
create: (pattern) => ({
|
|
8210
|
+
type: "exact",
|
|
8211
|
+
search(text) {
|
|
8212
|
+
const isMatch = text === pattern;
|
|
8213
|
+
return {
|
|
8214
|
+
isMatch,
|
|
8215
|
+
score: isMatch ? 0 : 1,
|
|
8216
|
+
indices: [0, pattern.length - 1]
|
|
8217
|
+
};
|
|
8218
|
+
}
|
|
8219
|
+
})
|
|
8220
|
+
},
|
|
8221
|
+
// 'term — include (substring) match
|
|
8222
|
+
{
|
|
8223
|
+
type: "include",
|
|
8224
|
+
multiRegex: /^'"(.*)"$/,
|
|
8225
|
+
singleRegex: /^'(.*)$/,
|
|
8226
|
+
create: (pattern) => ({
|
|
8227
|
+
type: "include",
|
|
8228
|
+
search(text) {
|
|
8229
|
+
let location = 0;
|
|
8230
|
+
let index2;
|
|
8231
|
+
const indices = [];
|
|
8232
|
+
const patternLen = pattern.length;
|
|
8233
|
+
while ((index2 = text.indexOf(pattern, location)) > -1) {
|
|
8234
|
+
location = index2 + patternLen;
|
|
8235
|
+
indices.push([index2, location - 1]);
|
|
8236
|
+
}
|
|
8237
|
+
const isMatch = !!indices.length;
|
|
8238
|
+
return {
|
|
8239
|
+
isMatch,
|
|
8240
|
+
score: isMatch ? 0 : 1,
|
|
8241
|
+
indices
|
|
8242
|
+
};
|
|
8243
|
+
}
|
|
8244
|
+
})
|
|
8245
|
+
},
|
|
8246
|
+
// ^term — prefix match
|
|
8247
|
+
{
|
|
8248
|
+
type: "prefix-exact",
|
|
8249
|
+
multiRegex: /^\^"(.*)"$/,
|
|
8250
|
+
singleRegex: /^\^(.*)$/,
|
|
8251
|
+
create: (pattern) => ({
|
|
8252
|
+
type: "prefix-exact",
|
|
8253
|
+
search(text) {
|
|
8254
|
+
const isMatch = text.startsWith(pattern);
|
|
8255
|
+
return {
|
|
8256
|
+
isMatch,
|
|
8257
|
+
score: isMatch ? 0 : 1,
|
|
8258
|
+
indices: [0, pattern.length - 1]
|
|
8259
|
+
};
|
|
8260
|
+
}
|
|
8261
|
+
})
|
|
8262
|
+
},
|
|
8263
|
+
// !^term — inverse prefix match
|
|
8264
|
+
{
|
|
8265
|
+
type: "inverse-prefix-exact",
|
|
8266
|
+
multiRegex: /^!\^"(.*)"$/,
|
|
8267
|
+
singleRegex: /^!\^(.*)$/,
|
|
8268
|
+
create: (pattern) => ({
|
|
8269
|
+
type: "inverse-prefix-exact",
|
|
8270
|
+
search(text) {
|
|
8271
|
+
const isMatch = !text.startsWith(pattern);
|
|
8272
|
+
return {
|
|
8273
|
+
isMatch,
|
|
8274
|
+
score: isMatch ? 0 : 1,
|
|
8275
|
+
indices: [0, text.length - 1]
|
|
8276
|
+
};
|
|
8277
|
+
}
|
|
8278
|
+
})
|
|
8279
|
+
},
|
|
8280
|
+
// !term$ — inverse suffix match
|
|
8281
|
+
{
|
|
8282
|
+
type: "inverse-suffix-exact",
|
|
8283
|
+
multiRegex: /^!"(.*)"\$$/,
|
|
8284
|
+
singleRegex: /^!(.*)\$$/,
|
|
8285
|
+
create: (pattern) => ({
|
|
8286
|
+
type: "inverse-suffix-exact",
|
|
8287
|
+
search(text) {
|
|
8288
|
+
const isMatch = !text.endsWith(pattern);
|
|
8289
|
+
return {
|
|
8290
|
+
isMatch,
|
|
8291
|
+
score: isMatch ? 0 : 1,
|
|
8292
|
+
indices: [0, text.length - 1]
|
|
8293
|
+
};
|
|
8294
|
+
}
|
|
8295
|
+
})
|
|
8296
|
+
},
|
|
8297
|
+
// term$ — suffix match
|
|
8298
|
+
{
|
|
8299
|
+
type: "suffix-exact",
|
|
8300
|
+
multiRegex: /^"(.*)"\$$/,
|
|
8301
|
+
singleRegex: /^(.*)\$$/,
|
|
8302
|
+
create: (pattern) => ({
|
|
8303
|
+
type: "suffix-exact",
|
|
8304
|
+
search(text) {
|
|
8305
|
+
const isMatch = text.endsWith(pattern);
|
|
8306
|
+
return {
|
|
8307
|
+
isMatch,
|
|
8308
|
+
score: isMatch ? 0 : 1,
|
|
8309
|
+
indices: [text.length - pattern.length, text.length - 1]
|
|
8310
|
+
};
|
|
8311
|
+
}
|
|
8312
|
+
})
|
|
8313
|
+
},
|
|
8314
|
+
// !term — inverse exact (does not contain)
|
|
8315
|
+
{
|
|
8316
|
+
type: "inverse-exact",
|
|
8317
|
+
multiRegex: /^!"(.*)"$/,
|
|
8318
|
+
singleRegex: /^!(.*)$/,
|
|
8319
|
+
create: (pattern) => ({
|
|
8320
|
+
type: "inverse-exact",
|
|
8321
|
+
search(text) {
|
|
8322
|
+
const isMatch = text.indexOf(pattern) === -1;
|
|
8323
|
+
return {
|
|
8324
|
+
isMatch,
|
|
8325
|
+
score: isMatch ? 0 : 1,
|
|
8326
|
+
indices: [0, text.length - 1]
|
|
8327
|
+
};
|
|
8328
|
+
}
|
|
8329
|
+
})
|
|
8330
|
+
},
|
|
8331
|
+
// term — fuzzy match (catch-all, must be last)
|
|
8332
|
+
{
|
|
8333
|
+
type: "fuzzy",
|
|
8334
|
+
multiRegex: /^"(.*)"$/,
|
|
8335
|
+
singleRegex: /^(.*)$/,
|
|
8336
|
+
create: (pattern, options = {}) => {
|
|
8337
|
+
const bitap = new BitapSearch(pattern, {
|
|
8338
|
+
location: options.location ?? Config.location,
|
|
8339
|
+
threshold: options.threshold ?? Config.threshold,
|
|
8340
|
+
distance: options.distance ?? Config.distance,
|
|
8341
|
+
includeMatches: options.includeMatches ?? Config.includeMatches,
|
|
8342
|
+
findAllMatches: options.findAllMatches ?? Config.findAllMatches,
|
|
8343
|
+
minMatchCharLength: options.minMatchCharLength ?? Config.minMatchCharLength,
|
|
8344
|
+
isCaseSensitive: options.isCaseSensitive ?? Config.isCaseSensitive,
|
|
8345
|
+
ignoreDiacritics: options.ignoreDiacritics ?? Config.ignoreDiacritics,
|
|
8346
|
+
ignoreLocation: options.ignoreLocation ?? Config.ignoreLocation
|
|
8347
|
+
});
|
|
8348
|
+
return {
|
|
8349
|
+
type: "fuzzy",
|
|
8350
|
+
search(text) {
|
|
8351
|
+
return bitap.searchIn(text);
|
|
8352
|
+
}
|
|
8353
|
+
};
|
|
8354
|
+
}
|
|
8355
|
+
}
|
|
8356
|
+
];
|
|
8357
|
+
var matchersLen = matchers.length;
|
|
8358
|
+
var ESCAPED_PIPE = "\0";
|
|
8359
|
+
var OR_TOKEN = "|";
|
|
8360
|
+
function tokenize(pattern) {
|
|
8361
|
+
const tokens = [];
|
|
8362
|
+
const len = pattern.length;
|
|
8363
|
+
let i = 0;
|
|
8364
|
+
while (i < len) {
|
|
8365
|
+
while (i < len && pattern[i] === " ") i++;
|
|
8366
|
+
if (i >= len) break;
|
|
8367
|
+
let j = i;
|
|
8368
|
+
while (j < len && pattern[j] !== " " && pattern[j] !== '"') j++;
|
|
8369
|
+
if (j < len && pattern[j] === '"') {
|
|
8370
|
+
j++;
|
|
8371
|
+
while (j < len) {
|
|
8372
|
+
if (pattern[j] === '"') {
|
|
8373
|
+
const next = j + 1;
|
|
8374
|
+
if (next >= len || pattern[next] === " ") {
|
|
8375
|
+
j++;
|
|
8376
|
+
break;
|
|
8377
|
+
}
|
|
8378
|
+
if (pattern[next] === "$" && (next + 1 >= len || pattern[next + 1] === " ")) {
|
|
8379
|
+
j += 2;
|
|
8380
|
+
break;
|
|
8381
|
+
}
|
|
8382
|
+
}
|
|
8383
|
+
j++;
|
|
8384
|
+
}
|
|
8385
|
+
tokens.push(pattern.substring(i, j));
|
|
8386
|
+
i = j;
|
|
8387
|
+
} else {
|
|
8388
|
+
while (j < len && pattern[j] !== " ") j++;
|
|
8389
|
+
tokens.push(pattern.substring(i, j));
|
|
8390
|
+
i = j;
|
|
8391
|
+
}
|
|
8392
|
+
}
|
|
8393
|
+
return tokens;
|
|
8394
|
+
}
|
|
8395
|
+
function getMatch(pattern, exp) {
|
|
8396
|
+
const matches = pattern.match(exp);
|
|
8397
|
+
return matches ? matches[1] : null;
|
|
8398
|
+
}
|
|
8399
|
+
function parseQuery(pattern, options = {}) {
|
|
8400
|
+
const escaped = pattern.replace(/\\\|/g, ESCAPED_PIPE);
|
|
8401
|
+
return escaped.split(OR_TOKEN).map((item) => {
|
|
8402
|
+
const restored = item.replace(/\u0000/g, "|");
|
|
8403
|
+
const query = tokenize(restored.trim()).filter((item2) => item2 && !!item2.trim());
|
|
8404
|
+
const results = [];
|
|
8405
|
+
for (let i = 0, len = query.length; i < len; i += 1) {
|
|
8406
|
+
const queryItem = query[i];
|
|
8407
|
+
let found = false;
|
|
8408
|
+
let idx = -1;
|
|
8409
|
+
while (!found && ++idx < matchersLen) {
|
|
8410
|
+
const def = matchers[idx];
|
|
8411
|
+
const token = getMatch(queryItem, def.multiRegex);
|
|
8412
|
+
if (token) {
|
|
8413
|
+
results.push(def.create(token, options));
|
|
8414
|
+
found = true;
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8417
|
+
if (found) {
|
|
8418
|
+
continue;
|
|
8419
|
+
}
|
|
8420
|
+
idx = -1;
|
|
8421
|
+
while (++idx < matchersLen) {
|
|
8422
|
+
const def = matchers[idx];
|
|
8423
|
+
const token = getMatch(queryItem, def.singleRegex);
|
|
8424
|
+
if (token) {
|
|
8425
|
+
results.push(def.create(token, options));
|
|
8426
|
+
break;
|
|
8427
|
+
}
|
|
8428
|
+
}
|
|
8429
|
+
}
|
|
8430
|
+
return results;
|
|
8431
|
+
});
|
|
8432
|
+
}
|
|
8433
|
+
var ExtendedSearch = class {
|
|
8434
|
+
constructor(pattern, {
|
|
8435
|
+
isCaseSensitive = Config.isCaseSensitive,
|
|
8436
|
+
ignoreDiacritics = Config.ignoreDiacritics,
|
|
8437
|
+
includeMatches = Config.includeMatches,
|
|
8438
|
+
minMatchCharLength = Config.minMatchCharLength,
|
|
8439
|
+
ignoreLocation = Config.ignoreLocation,
|
|
8440
|
+
findAllMatches = Config.findAllMatches,
|
|
8441
|
+
location = Config.location,
|
|
8442
|
+
threshold = Config.threshold,
|
|
8443
|
+
distance = Config.distance
|
|
8444
|
+
} = {}) {
|
|
8445
|
+
this.query = null;
|
|
8446
|
+
this.options = {
|
|
8447
|
+
isCaseSensitive,
|
|
8448
|
+
ignoreDiacritics,
|
|
8449
|
+
includeMatches,
|
|
8450
|
+
minMatchCharLength,
|
|
8451
|
+
findAllMatches,
|
|
8452
|
+
ignoreLocation,
|
|
8453
|
+
location,
|
|
8454
|
+
threshold,
|
|
8455
|
+
distance
|
|
8456
|
+
};
|
|
8457
|
+
pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
|
|
8458
|
+
pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
|
|
8459
|
+
this.pattern = pattern;
|
|
8460
|
+
this.query = parseQuery(this.pattern, this.options);
|
|
8461
|
+
}
|
|
8462
|
+
static condition(_, options) {
|
|
8463
|
+
return options.useExtendedSearch;
|
|
8464
|
+
}
|
|
8465
|
+
// Note: searchIn operates on a single text value and sets hasInverse on the
|
|
8466
|
+
// result when inverse patterns are involved. _searchObjectList uses this to
|
|
8467
|
+
// switch from "ANY key" to "ALL keys" aggregation. See #712.
|
|
8468
|
+
searchIn(text) {
|
|
8469
|
+
const query = this.query;
|
|
8470
|
+
if (!query) {
|
|
8471
|
+
return {
|
|
8472
|
+
isMatch: false,
|
|
8473
|
+
score: 1
|
|
8474
|
+
};
|
|
8475
|
+
}
|
|
8476
|
+
const {
|
|
8477
|
+
includeMatches,
|
|
8478
|
+
isCaseSensitive,
|
|
8479
|
+
ignoreDiacritics
|
|
8480
|
+
} = this.options;
|
|
8481
|
+
text = isCaseSensitive ? text : text.toLowerCase();
|
|
8482
|
+
text = ignoreDiacritics ? stripDiacritics(text) : text;
|
|
8483
|
+
let numMatches = 0;
|
|
8484
|
+
const allIndices = [];
|
|
8485
|
+
let totalScore = 0;
|
|
8486
|
+
let hasInverse = false;
|
|
8487
|
+
for (let i = 0, qLen = query.length; i < qLen; i += 1) {
|
|
8488
|
+
const searchers = query[i];
|
|
8489
|
+
allIndices.length = 0;
|
|
8490
|
+
numMatches = 0;
|
|
8491
|
+
hasInverse = false;
|
|
8492
|
+
for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
|
|
8493
|
+
const matcher = searchers[j];
|
|
8494
|
+
const {
|
|
8495
|
+
isMatch,
|
|
8496
|
+
indices,
|
|
8497
|
+
score
|
|
8498
|
+
} = matcher.search(text);
|
|
8499
|
+
if (isMatch) {
|
|
8500
|
+
numMatches += 1;
|
|
8501
|
+
totalScore += score;
|
|
8502
|
+
if (isInverse(matcher.type)) {
|
|
8503
|
+
hasInverse = true;
|
|
8504
|
+
}
|
|
8505
|
+
if (includeMatches) {
|
|
8506
|
+
if (MULTI_MATCH_TYPES.has(matcher.type)) {
|
|
8507
|
+
allIndices.push(...indices);
|
|
8508
|
+
} else {
|
|
8509
|
+
allIndices.push(indices);
|
|
8510
|
+
}
|
|
8511
|
+
}
|
|
8512
|
+
} else {
|
|
8513
|
+
totalScore = 0;
|
|
8514
|
+
numMatches = 0;
|
|
8515
|
+
allIndices.length = 0;
|
|
8516
|
+
hasInverse = false;
|
|
8517
|
+
break;
|
|
8518
|
+
}
|
|
8519
|
+
}
|
|
8520
|
+
if (numMatches) {
|
|
8521
|
+
const result = {
|
|
8522
|
+
isMatch: true,
|
|
8523
|
+
score: totalScore / numMatches
|
|
8524
|
+
};
|
|
8525
|
+
if (hasInverse) {
|
|
8526
|
+
result.hasInverse = true;
|
|
8527
|
+
}
|
|
8528
|
+
if (includeMatches) {
|
|
8529
|
+
result.indices = mergeIndices(allIndices);
|
|
8530
|
+
}
|
|
8531
|
+
return result;
|
|
8532
|
+
}
|
|
8533
|
+
}
|
|
8534
|
+
return {
|
|
8535
|
+
isMatch: false,
|
|
8536
|
+
score: 1
|
|
8537
|
+
};
|
|
8538
|
+
}
|
|
8539
|
+
};
|
|
8540
|
+
var registeredSearchers = [];
|
|
8541
|
+
function register(...args) {
|
|
8542
|
+
registeredSearchers.push(...args);
|
|
8543
|
+
}
|
|
8544
|
+
function createSearcher(pattern, options) {
|
|
8545
|
+
for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
|
|
8546
|
+
const searcherClass = registeredSearchers[i];
|
|
8547
|
+
if (searcherClass.condition(pattern, options)) {
|
|
8548
|
+
return new searcherClass(pattern, options);
|
|
8549
|
+
}
|
|
8550
|
+
}
|
|
8551
|
+
return new BitapSearch(pattern, options);
|
|
8552
|
+
}
|
|
8553
|
+
var LogicalOperator = {
|
|
8554
|
+
AND: "$and",
|
|
8555
|
+
OR: "$or"
|
|
8556
|
+
};
|
|
8557
|
+
var KeyType = {
|
|
8558
|
+
PATH: "$path",
|
|
8559
|
+
PATTERN: "$val"
|
|
8560
|
+
};
|
|
8561
|
+
var isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
|
|
8562
|
+
var isPath = (query) => !!query[KeyType.PATH];
|
|
8563
|
+
var isLeaf = (query) => !isArray(query) && isObject(query) && !isExpression(query);
|
|
8564
|
+
var convertToExplicit = (query) => ({
|
|
8565
|
+
[LogicalOperator.AND]: Object.keys(query).map((key) => ({
|
|
8566
|
+
[key]: query[key]
|
|
8567
|
+
}))
|
|
8568
|
+
});
|
|
8569
|
+
function parse2(query, options, {
|
|
8570
|
+
auto = true
|
|
8571
|
+
} = {}) {
|
|
8572
|
+
const next = (query2) => {
|
|
8573
|
+
if (isString(query2)) {
|
|
8574
|
+
const obj = {
|
|
8575
|
+
keyId: null,
|
|
8576
|
+
pattern: query2
|
|
8577
|
+
};
|
|
8578
|
+
if (auto) {
|
|
8579
|
+
obj.searcher = createSearcher(query2, options);
|
|
8580
|
+
}
|
|
8581
|
+
return obj;
|
|
8582
|
+
}
|
|
8583
|
+
const keys = Object.keys(query2);
|
|
8584
|
+
const isQueryPath = isPath(query2);
|
|
8585
|
+
if (!isQueryPath && keys.length > 1 && !isExpression(query2)) {
|
|
8586
|
+
return next(convertToExplicit(query2));
|
|
8587
|
+
}
|
|
8588
|
+
if (isLeaf(query2)) {
|
|
8589
|
+
const key = isQueryPath ? query2[KeyType.PATH] : keys[0];
|
|
8590
|
+
const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key];
|
|
8591
|
+
if (!isString(pattern)) {
|
|
8592
|
+
throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
|
|
8593
|
+
}
|
|
8594
|
+
const obj = {
|
|
8595
|
+
keyId: createKeyId(key),
|
|
8596
|
+
pattern
|
|
8597
|
+
};
|
|
8598
|
+
if (auto) {
|
|
8599
|
+
obj.searcher = createSearcher(pattern, options);
|
|
8600
|
+
}
|
|
8601
|
+
return obj;
|
|
8602
|
+
}
|
|
8603
|
+
const node = {
|
|
8604
|
+
children: [],
|
|
8605
|
+
operator: keys[0]
|
|
8606
|
+
};
|
|
8607
|
+
keys.forEach((key) => {
|
|
8608
|
+
const value = query2[key];
|
|
8609
|
+
if (isArray(value)) {
|
|
8610
|
+
value.forEach((item) => {
|
|
8611
|
+
node.children.push(next(item));
|
|
8612
|
+
});
|
|
8613
|
+
}
|
|
8614
|
+
});
|
|
8615
|
+
return node;
|
|
8616
|
+
};
|
|
8617
|
+
if (!isExpression(query)) {
|
|
8618
|
+
query = convertToExplicit(query);
|
|
8619
|
+
}
|
|
8620
|
+
return next(query);
|
|
8621
|
+
}
|
|
8622
|
+
function computeScoreSingle(matches, {
|
|
8623
|
+
ignoreFieldNorm = Config.ignoreFieldNorm
|
|
8624
|
+
}) {
|
|
8625
|
+
let totalScore = 1;
|
|
8626
|
+
matches.forEach(({
|
|
8627
|
+
key,
|
|
8628
|
+
norm: norm2,
|
|
8629
|
+
score
|
|
8630
|
+
}) => {
|
|
8631
|
+
const weight = key ? key.weight : null;
|
|
8632
|
+
totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm2));
|
|
8633
|
+
});
|
|
8634
|
+
return totalScore;
|
|
8635
|
+
}
|
|
8636
|
+
function computeScore(results, {
|
|
8637
|
+
ignoreFieldNorm = Config.ignoreFieldNorm
|
|
8638
|
+
}) {
|
|
8639
|
+
results.forEach((result) => {
|
|
8640
|
+
result.score = computeScoreSingle(result.matches, {
|
|
8641
|
+
ignoreFieldNorm
|
|
8642
|
+
});
|
|
8643
|
+
});
|
|
8644
|
+
}
|
|
8645
|
+
var MaxHeap = class {
|
|
8646
|
+
constructor(limit) {
|
|
8647
|
+
this.limit = limit;
|
|
8648
|
+
this.heap = [];
|
|
8649
|
+
}
|
|
8650
|
+
get size() {
|
|
8651
|
+
return this.heap.length;
|
|
8652
|
+
}
|
|
8653
|
+
shouldInsert(score) {
|
|
8654
|
+
return this.size < this.limit || score < this.heap[0].score;
|
|
8655
|
+
}
|
|
8656
|
+
insert(item) {
|
|
8657
|
+
if (this.size < this.limit) {
|
|
8658
|
+
this.heap.push(item);
|
|
8659
|
+
this._bubbleUp(this.size - 1);
|
|
8660
|
+
} else if (item.score < this.heap[0].score) {
|
|
8661
|
+
this.heap[0] = item;
|
|
8662
|
+
this._sinkDown(0);
|
|
8663
|
+
}
|
|
8664
|
+
}
|
|
8665
|
+
extractSorted(sortFn) {
|
|
8666
|
+
return this.heap.sort(sortFn);
|
|
8667
|
+
}
|
|
8668
|
+
_bubbleUp(i) {
|
|
8669
|
+
const heap = this.heap;
|
|
8670
|
+
while (i > 0) {
|
|
8671
|
+
const parent = i - 1 >> 1;
|
|
8672
|
+
if (heap[i].score <= heap[parent].score) break;
|
|
8673
|
+
const tmp = heap[i];
|
|
8674
|
+
heap[i] = heap[parent];
|
|
8675
|
+
heap[parent] = tmp;
|
|
8676
|
+
i = parent;
|
|
8677
|
+
}
|
|
8678
|
+
}
|
|
8679
|
+
_sinkDown(i) {
|
|
8680
|
+
const heap = this.heap;
|
|
8681
|
+
const len = heap.length;
|
|
8682
|
+
let largest = i;
|
|
8683
|
+
do {
|
|
8684
|
+
i = largest;
|
|
8685
|
+
const left = 2 * i + 1;
|
|
8686
|
+
const right = 2 * i + 2;
|
|
8687
|
+
if (left < len && heap[left].score > heap[largest].score) {
|
|
8688
|
+
largest = left;
|
|
8689
|
+
}
|
|
8690
|
+
if (right < len && heap[right].score > heap[largest].score) {
|
|
8691
|
+
largest = right;
|
|
8692
|
+
}
|
|
8693
|
+
if (largest !== i) {
|
|
8694
|
+
const tmp = heap[i];
|
|
8695
|
+
heap[i] = heap[largest];
|
|
8696
|
+
heap[largest] = tmp;
|
|
8697
|
+
}
|
|
8698
|
+
} while (largest !== i);
|
|
8699
|
+
}
|
|
8700
|
+
};
|
|
8701
|
+
function formatMatches(result) {
|
|
8702
|
+
const matches = [];
|
|
8703
|
+
result.matches.forEach((match) => {
|
|
8704
|
+
if (!isDefined(match.indices) || !match.indices.length) {
|
|
8705
|
+
return;
|
|
8706
|
+
}
|
|
8707
|
+
const obj = {
|
|
8708
|
+
indices: match.indices,
|
|
8709
|
+
value: match.value
|
|
8710
|
+
};
|
|
8711
|
+
if (match.key) {
|
|
8712
|
+
obj.key = match.key.id;
|
|
8713
|
+
}
|
|
8714
|
+
if (match.idx > -1) {
|
|
8715
|
+
obj.refIndex = match.idx;
|
|
8716
|
+
}
|
|
8717
|
+
matches.push(obj);
|
|
8718
|
+
});
|
|
8719
|
+
return matches;
|
|
8720
|
+
}
|
|
8721
|
+
function format(results, docs, {
|
|
8722
|
+
includeMatches = Config.includeMatches,
|
|
8723
|
+
includeScore = Config.includeScore
|
|
8724
|
+
} = {}) {
|
|
8725
|
+
return results.map((result) => {
|
|
8726
|
+
const {
|
|
8727
|
+
idx
|
|
8728
|
+
} = result;
|
|
8729
|
+
const data = {
|
|
8730
|
+
item: docs[idx],
|
|
8731
|
+
refIndex: idx
|
|
8732
|
+
};
|
|
8733
|
+
if (includeMatches) data.matches = formatMatches(result);
|
|
8734
|
+
if (includeScore) data.score = result.score;
|
|
8735
|
+
return data;
|
|
8736
|
+
});
|
|
8737
|
+
}
|
|
8738
|
+
var DEFAULT_TOKEN = /[\p{L}\p{M}\p{N}_]+/gu;
|
|
8739
|
+
var warned = /* @__PURE__ */ new WeakSet();
|
|
8740
|
+
function warnNonGlobal(regex) {
|
|
8741
|
+
if (!warned.has(regex)) {
|
|
8742
|
+
warned.add(regex);
|
|
8743
|
+
console.warn(`[Fuse] tokenize regex ${regex} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`);
|
|
8744
|
+
}
|
|
8745
|
+
}
|
|
8746
|
+
function resolveTokenize(tokenize2) {
|
|
8747
|
+
if (typeof tokenize2 === "function") {
|
|
8748
|
+
let validated = false;
|
|
8749
|
+
return (text) => {
|
|
8750
|
+
const result = tokenize2(text);
|
|
8751
|
+
if (!validated) {
|
|
8752
|
+
validated = true;
|
|
8753
|
+
if (!Array.isArray(result) || result.some((t12) => typeof t12 !== "string")) {
|
|
8754
|
+
throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(result) ? "array containing non-strings" : typeof result}.`);
|
|
8755
|
+
}
|
|
8756
|
+
}
|
|
8757
|
+
return result;
|
|
8758
|
+
};
|
|
8759
|
+
}
|
|
8760
|
+
if (tokenize2 instanceof RegExp) {
|
|
8761
|
+
if (!tokenize2.global) warnNonGlobal(tokenize2);
|
|
8762
|
+
return (text) => text.match(tokenize2) || [];
|
|
8763
|
+
}
|
|
8764
|
+
return (text) => text.match(DEFAULT_TOKEN) || [];
|
|
8765
|
+
}
|
|
8766
|
+
function createAnalyzer({
|
|
8767
|
+
isCaseSensitive = false,
|
|
8768
|
+
ignoreDiacritics = false,
|
|
8769
|
+
tokenize: tokenize2
|
|
8770
|
+
} = {}) {
|
|
8771
|
+
const tokenizeFn = resolveTokenize(tokenize2);
|
|
8772
|
+
return {
|
|
8773
|
+
tokenize(text) {
|
|
8774
|
+
if (!isCaseSensitive) {
|
|
8775
|
+
text = text.toLowerCase();
|
|
8776
|
+
}
|
|
8777
|
+
if (ignoreDiacritics) {
|
|
8778
|
+
text = stripDiacritics(text);
|
|
8779
|
+
}
|
|
8780
|
+
return tokenizeFn(text);
|
|
8781
|
+
}
|
|
8782
|
+
};
|
|
8783
|
+
}
|
|
8784
|
+
var MAX_MASK_TERMS = 31;
|
|
8785
|
+
var TokenSearch = class {
|
|
8786
|
+
// `tokenMatch: 'all'` (AND) coverage. When true, searchIn reports which
|
|
8787
|
+
// query terms matched each text so the core loop can require record-level
|
|
8788
|
+
// coverage of every term. Bitmask is the ≤31-term fast path; Set is the
|
|
8789
|
+
// ≥32-term fallback (JS bitwise ops are 32-bit signed).
|
|
8790
|
+
static condition(_, options) {
|
|
8791
|
+
return options.useTokenSearch;
|
|
8792
|
+
}
|
|
8793
|
+
constructor(pattern, options) {
|
|
8794
|
+
this.options = options;
|
|
8795
|
+
this.analyzer = createAnalyzer({
|
|
8796
|
+
isCaseSensitive: options.isCaseSensitive,
|
|
8797
|
+
ignoreDiacritics: options.ignoreDiacritics,
|
|
8798
|
+
tokenize: options.tokenize
|
|
8799
|
+
});
|
|
8800
|
+
const queryTerms = this.analyzer.tokenize(pattern);
|
|
8801
|
+
const invertedIndex = options._invertedIndex;
|
|
8802
|
+
const {
|
|
8803
|
+
df,
|
|
8804
|
+
fieldCount
|
|
8805
|
+
} = invertedIndex;
|
|
8806
|
+
this.termSearchers = [];
|
|
8807
|
+
this.idfWeights = [];
|
|
8808
|
+
for (const term of queryTerms) {
|
|
8809
|
+
this.termSearchers.push(new BitapSearch(term, {
|
|
8810
|
+
location: options.location,
|
|
8811
|
+
threshold: options.threshold,
|
|
8812
|
+
distance: options.distance,
|
|
8813
|
+
includeMatches: options.includeMatches,
|
|
8814
|
+
findAllMatches: options.findAllMatches,
|
|
8815
|
+
minMatchCharLength: options.minMatchCharLength,
|
|
8816
|
+
isCaseSensitive: options.isCaseSensitive,
|
|
8817
|
+
ignoreDiacritics: options.ignoreDiacritics,
|
|
8818
|
+
ignoreLocation: true
|
|
8819
|
+
}));
|
|
8820
|
+
const docFreq = df.get(term) || 0;
|
|
8821
|
+
const idf = Math.log(1 + (fieldCount - docFreq + 0.5) / (docFreq + 0.5));
|
|
8822
|
+
this.idfWeights.push(idf);
|
|
8823
|
+
}
|
|
8824
|
+
this.combineAll = options.tokenMatch === "all";
|
|
8825
|
+
this.numTerms = this.termSearchers.length;
|
|
8826
|
+
this.useMask = this.numTerms <= MAX_MASK_TERMS;
|
|
8827
|
+
}
|
|
8828
|
+
searchIn(text) {
|
|
8829
|
+
if (!this.termSearchers.length) {
|
|
8830
|
+
return {
|
|
8831
|
+
isMatch: false,
|
|
8832
|
+
score: 1
|
|
8833
|
+
};
|
|
8834
|
+
}
|
|
8835
|
+
const allIndices = [];
|
|
8836
|
+
let weightedScore = 0;
|
|
8837
|
+
let maxPossibleScore = 0;
|
|
8838
|
+
let matchedCount = 0;
|
|
8839
|
+
let matchedMask = 0;
|
|
8840
|
+
const matchedTerms = this.combineAll && !this.useMask ? /* @__PURE__ */ new Set() : null;
|
|
8841
|
+
for (let i = 0; i < this.termSearchers.length; i++) {
|
|
8842
|
+
const result = this.termSearchers[i].searchIn(text);
|
|
8843
|
+
const idf = this.idfWeights[i];
|
|
8844
|
+
maxPossibleScore += idf;
|
|
8845
|
+
if (result.isMatch) {
|
|
8846
|
+
matchedCount++;
|
|
8847
|
+
weightedScore += idf * (1 - result.score);
|
|
8848
|
+
if (result.indices) {
|
|
8849
|
+
allIndices.push(...result.indices);
|
|
8850
|
+
}
|
|
8851
|
+
if (this.combineAll) {
|
|
8852
|
+
if (this.useMask) {
|
|
8853
|
+
matchedMask |= 1 << i;
|
|
8854
|
+
} else {
|
|
8855
|
+
matchedTerms.add(i);
|
|
8856
|
+
}
|
|
8857
|
+
}
|
|
8858
|
+
}
|
|
8859
|
+
}
|
|
8860
|
+
if (matchedCount === 0) {
|
|
8861
|
+
return {
|
|
8862
|
+
isMatch: false,
|
|
8863
|
+
score: 1
|
|
8864
|
+
};
|
|
8865
|
+
}
|
|
8866
|
+
const normalized = maxPossibleScore > 0 ? 1 - weightedScore / maxPossibleScore : 0;
|
|
8867
|
+
const searchResult = {
|
|
8868
|
+
isMatch: true,
|
|
8869
|
+
score: Math.max(1e-3, normalized)
|
|
8870
|
+
};
|
|
8871
|
+
if (this.options.includeMatches && allIndices.length) {
|
|
8872
|
+
searchResult.indices = mergeIndices(allIndices);
|
|
8873
|
+
}
|
|
8874
|
+
if (this.combineAll) {
|
|
8875
|
+
if (this.useMask) {
|
|
8876
|
+
searchResult.matchedMask = matchedMask;
|
|
8877
|
+
} else {
|
|
8878
|
+
searchResult.matchedTerms = matchedTerms;
|
|
8879
|
+
}
|
|
8880
|
+
searchResult.termCount = this.numTerms;
|
|
8881
|
+
}
|
|
8882
|
+
return searchResult;
|
|
8883
|
+
}
|
|
8884
|
+
};
|
|
8885
|
+
function addField(index2, text, docIdx, analyzer) {
|
|
8886
|
+
const tokens = analyzer.tokenize(text);
|
|
8887
|
+
if (!tokens.length) return;
|
|
8888
|
+
index2.fieldCount++;
|
|
8889
|
+
index2.docFieldCount.set(docIdx, (index2.docFieldCount.get(docIdx) || 0) + 1);
|
|
8890
|
+
const distinctTerms = new Set(tokens);
|
|
8891
|
+
let perDocTerms = index2.docTermFieldHits.get(docIdx);
|
|
8892
|
+
if (!perDocTerms) {
|
|
8893
|
+
perDocTerms = /* @__PURE__ */ new Map();
|
|
8894
|
+
index2.docTermFieldHits.set(docIdx, perDocTerms);
|
|
8895
|
+
}
|
|
8896
|
+
for (const term of distinctTerms) {
|
|
8897
|
+
perDocTerms.set(term, (perDocTerms.get(term) || 0) + 1);
|
|
8898
|
+
index2.df.set(term, (index2.df.get(term) || 0) + 1);
|
|
8899
|
+
}
|
|
8900
|
+
}
|
|
8901
|
+
function ingestRecord(index2, record, keyCount, analyzer) {
|
|
8902
|
+
const {
|
|
8903
|
+
i: docIdx,
|
|
8904
|
+
v,
|
|
8905
|
+
$: fields
|
|
8906
|
+
} = record;
|
|
8907
|
+
if (v !== void 0) {
|
|
8908
|
+
addField(index2, v, docIdx, analyzer);
|
|
8909
|
+
return;
|
|
8910
|
+
}
|
|
8911
|
+
if (!fields) return;
|
|
8912
|
+
for (let keyIdx = 0; keyIdx < keyCount; keyIdx++) {
|
|
8913
|
+
const value = fields[keyIdx];
|
|
8914
|
+
if (!value) continue;
|
|
8915
|
+
if (Array.isArray(value)) {
|
|
8916
|
+
for (const sub of value) addField(index2, sub.v, docIdx, analyzer);
|
|
8917
|
+
} else {
|
|
8918
|
+
addField(index2, value.v, docIdx, analyzer);
|
|
8919
|
+
}
|
|
8920
|
+
}
|
|
8921
|
+
}
|
|
8922
|
+
function buildInvertedIndex(records, keyCount, analyzer) {
|
|
8923
|
+
const index2 = {
|
|
8924
|
+
fieldCount: 0,
|
|
8925
|
+
df: /* @__PURE__ */ new Map(),
|
|
8926
|
+
docFieldCount: /* @__PURE__ */ new Map(),
|
|
8927
|
+
docTermFieldHits: /* @__PURE__ */ new Map()
|
|
8928
|
+
};
|
|
8929
|
+
for (const record of records) {
|
|
8930
|
+
ingestRecord(index2, record, keyCount, analyzer);
|
|
8931
|
+
}
|
|
8932
|
+
return index2;
|
|
8933
|
+
}
|
|
8934
|
+
function addToInvertedIndex(index2, record, keyCount, analyzer) {
|
|
8935
|
+
ingestRecord(index2, record, keyCount, analyzer);
|
|
8936
|
+
}
|
|
8937
|
+
function removeFromInvertedIndex(index2, docIdx) {
|
|
8938
|
+
const fieldCount = index2.docFieldCount.get(docIdx);
|
|
8939
|
+
if (fieldCount === void 0) return;
|
|
8940
|
+
index2.fieldCount -= fieldCount;
|
|
8941
|
+
index2.docFieldCount.delete(docIdx);
|
|
8942
|
+
const perDocTerms = index2.docTermFieldHits.get(docIdx);
|
|
8943
|
+
if (!perDocTerms) return;
|
|
8944
|
+
for (const [term, hits] of perDocTerms) {
|
|
8945
|
+
const next = (index2.df.get(term) || 0) - hits;
|
|
8946
|
+
if (next <= 0) {
|
|
8947
|
+
index2.df.delete(term);
|
|
8948
|
+
} else {
|
|
8949
|
+
index2.df.set(term, next);
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8952
|
+
index2.docTermFieldHits.delete(docIdx);
|
|
8953
|
+
}
|
|
8954
|
+
function removeAndShiftInvertedIndex(index2, removedIndices) {
|
|
8955
|
+
if (removedIndices.length === 0) return;
|
|
8956
|
+
const sorted = Array.from(new Set(removedIndices)).sort((a, b) => a - b);
|
|
8957
|
+
for (const idx of sorted) {
|
|
8958
|
+
removeFromInvertedIndex(index2, idx);
|
|
8959
|
+
}
|
|
8960
|
+
const shift4 = (oldIdx) => {
|
|
8961
|
+
let lo = 0;
|
|
8962
|
+
let hi = sorted.length;
|
|
8963
|
+
while (lo < hi) {
|
|
8964
|
+
const mid = lo + hi >>> 1;
|
|
8965
|
+
if (sorted[mid] < oldIdx) lo = mid + 1;
|
|
8966
|
+
else hi = mid;
|
|
8967
|
+
}
|
|
8968
|
+
return oldIdx - lo;
|
|
8969
|
+
};
|
|
8970
|
+
const firstRemoved = sorted[0];
|
|
8971
|
+
const shiftedDocFieldCount = /* @__PURE__ */ new Map();
|
|
8972
|
+
for (const [oldKey, count3] of index2.docFieldCount) {
|
|
8973
|
+
shiftedDocFieldCount.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, count3);
|
|
8974
|
+
}
|
|
8975
|
+
index2.docFieldCount = shiftedDocFieldCount;
|
|
8976
|
+
const shiftedDocTermFieldHits = /* @__PURE__ */ new Map();
|
|
8977
|
+
for (const [oldKey, terms] of index2.docTermFieldHits) {
|
|
8978
|
+
shiftedDocTermFieldHits.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, terms);
|
|
8979
|
+
}
|
|
8980
|
+
index2.docTermFieldHits = shiftedDocTermFieldHits;
|
|
8981
|
+
}
|
|
8982
|
+
var Fuse = class {
|
|
8983
|
+
// Statics are assigned in entry.ts
|
|
8984
|
+
constructor(docs, options, index2) {
|
|
8985
|
+
this.options = {
|
|
8986
|
+
...Config,
|
|
8987
|
+
...options
|
|
8988
|
+
};
|
|
8989
|
+
if (this.options.useExtendedSearch && false) ;
|
|
8990
|
+
if (this.options.useTokenSearch && false) ;
|
|
8991
|
+
this._keyStore = new KeyStore(this.options.keys);
|
|
8992
|
+
this._docs = docs;
|
|
8993
|
+
this._myIndex = null;
|
|
8994
|
+
this._invertedIndex = null;
|
|
8995
|
+
this.setCollection(docs, index2);
|
|
8996
|
+
this._lastQuery = null;
|
|
8997
|
+
this._lastSearcher = null;
|
|
8998
|
+
}
|
|
8999
|
+
_getSearcher(query) {
|
|
9000
|
+
if (this._lastQuery === query) {
|
|
9001
|
+
return this._lastSearcher;
|
|
9002
|
+
}
|
|
9003
|
+
const opts = this._invertedIndex ? {
|
|
9004
|
+
...this.options,
|
|
9005
|
+
_invertedIndex: this._invertedIndex
|
|
9006
|
+
} : this.options;
|
|
9007
|
+
const searcher = createSearcher(query, opts);
|
|
9008
|
+
this._lastQuery = query;
|
|
9009
|
+
this._lastSearcher = searcher;
|
|
9010
|
+
return searcher;
|
|
9011
|
+
}
|
|
9012
|
+
setCollection(docs, index2) {
|
|
9013
|
+
this._docs = docs;
|
|
9014
|
+
if (index2 && !(index2 instanceof FuseIndex)) {
|
|
9015
|
+
throw new Error(INCORRECT_INDEX_TYPE);
|
|
9016
|
+
}
|
|
9017
|
+
this._myIndex = index2 || createIndex(this.options.keys, this._docs, {
|
|
9018
|
+
getFn: this.options.getFn,
|
|
9019
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
9020
|
+
});
|
|
9021
|
+
if (this.options.useTokenSearch) {
|
|
9022
|
+
const analyzer = createAnalyzer({
|
|
9023
|
+
isCaseSensitive: this.options.isCaseSensitive,
|
|
9024
|
+
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
9025
|
+
tokenize: this.options.tokenize
|
|
9026
|
+
});
|
|
9027
|
+
this._invertedIndex = buildInvertedIndex(this._myIndex.records, this._myIndex.keys.length, analyzer);
|
|
9028
|
+
}
|
|
9029
|
+
this._invalidateSearcherCache();
|
|
9030
|
+
}
|
|
9031
|
+
add(doc) {
|
|
9032
|
+
if (!isDefined(doc)) {
|
|
9033
|
+
return;
|
|
9034
|
+
}
|
|
9035
|
+
this._docs.push(doc);
|
|
9036
|
+
const record = this._myIndex.add(doc, this._docs.length - 1);
|
|
9037
|
+
if (this._invertedIndex && record) {
|
|
9038
|
+
const analyzer = createAnalyzer({
|
|
9039
|
+
isCaseSensitive: this.options.isCaseSensitive,
|
|
9040
|
+
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
9041
|
+
tokenize: this.options.tokenize
|
|
9042
|
+
});
|
|
9043
|
+
addToInvertedIndex(this._invertedIndex, record, this._myIndex.keys.length, analyzer);
|
|
9044
|
+
}
|
|
9045
|
+
this._invalidateSearcherCache();
|
|
9046
|
+
}
|
|
9047
|
+
remove(predicate = () => false) {
|
|
9048
|
+
const results = [];
|
|
9049
|
+
const indicesToRemove = [];
|
|
9050
|
+
for (let i = 0, len = this._docs.length; i < len; i += 1) {
|
|
9051
|
+
if (predicate(this._docs[i], i)) {
|
|
9052
|
+
results.push(this._docs[i]);
|
|
9053
|
+
indicesToRemove.push(i);
|
|
9054
|
+
}
|
|
9055
|
+
}
|
|
9056
|
+
if (indicesToRemove.length) {
|
|
9057
|
+
if (this._invertedIndex) {
|
|
9058
|
+
removeAndShiftInvertedIndex(this._invertedIndex, indicesToRemove);
|
|
9059
|
+
}
|
|
9060
|
+
const toRemove = new Set(indicesToRemove);
|
|
9061
|
+
this._docs = this._docs.filter((_, i) => !toRemove.has(i));
|
|
9062
|
+
this._myIndex.removeAll(indicesToRemove);
|
|
9063
|
+
this._invalidateSearcherCache();
|
|
9064
|
+
}
|
|
9065
|
+
return results;
|
|
9066
|
+
}
|
|
9067
|
+
removeAt(idx) {
|
|
9068
|
+
if (!Number.isInteger(idx) || idx < 0 || idx >= this._docs.length) {
|
|
9069
|
+
throw new Error(INVALID_DOC_INDEX);
|
|
9070
|
+
}
|
|
9071
|
+
if (this._invertedIndex) {
|
|
9072
|
+
removeAndShiftInvertedIndex(this._invertedIndex, [idx]);
|
|
9073
|
+
}
|
|
9074
|
+
const doc = this._docs.splice(idx, 1)[0];
|
|
9075
|
+
this._myIndex.removeAt(idx);
|
|
9076
|
+
this._invalidateSearcherCache();
|
|
9077
|
+
return doc;
|
|
9078
|
+
}
|
|
9079
|
+
_invalidateSearcherCache() {
|
|
9080
|
+
this._lastQuery = null;
|
|
9081
|
+
this._lastSearcher = null;
|
|
9082
|
+
}
|
|
9083
|
+
getIndex() {
|
|
9084
|
+
return this._myIndex;
|
|
9085
|
+
}
|
|
9086
|
+
search(query, options) {
|
|
9087
|
+
const {
|
|
9088
|
+
limit = -1
|
|
9089
|
+
} = options || {};
|
|
9090
|
+
const {
|
|
9091
|
+
includeMatches,
|
|
9092
|
+
includeScore,
|
|
9093
|
+
shouldSort,
|
|
9094
|
+
sortFn,
|
|
9095
|
+
ignoreFieldNorm
|
|
9096
|
+
} = this.options;
|
|
9097
|
+
if (isString(query) && !query.trim()) {
|
|
9098
|
+
let docs = this._docs.map((item, idx) => ({
|
|
9099
|
+
item,
|
|
9100
|
+
refIndex: idx
|
|
9101
|
+
}));
|
|
9102
|
+
if (isNumber2(limit) && limit > -1) {
|
|
9103
|
+
docs = docs.slice(0, limit);
|
|
9104
|
+
}
|
|
9105
|
+
return docs;
|
|
9106
|
+
}
|
|
9107
|
+
const useHeap = isNumber2(limit) && limit > 0 && isString(query);
|
|
9108
|
+
let results;
|
|
9109
|
+
if (useHeap) {
|
|
9110
|
+
const heap = new MaxHeap(limit);
|
|
9111
|
+
if (isString(this._docs[0])) {
|
|
9112
|
+
this._searchStringList(query, {
|
|
9113
|
+
heap,
|
|
9114
|
+
ignoreFieldNorm
|
|
9115
|
+
});
|
|
9116
|
+
} else {
|
|
9117
|
+
this._searchObjectList(query, {
|
|
9118
|
+
heap,
|
|
9119
|
+
ignoreFieldNorm
|
|
9120
|
+
});
|
|
9121
|
+
}
|
|
9122
|
+
results = heap.extractSorted(sortFn);
|
|
9123
|
+
} else {
|
|
9124
|
+
results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
|
|
9125
|
+
computeScore(results, {
|
|
9126
|
+
ignoreFieldNorm
|
|
9127
|
+
});
|
|
9128
|
+
if (shouldSort) {
|
|
9129
|
+
results.sort(sortFn);
|
|
9130
|
+
}
|
|
9131
|
+
if (isNumber2(limit) && limit > -1) {
|
|
9132
|
+
results = results.slice(0, limit);
|
|
9133
|
+
}
|
|
9134
|
+
}
|
|
9135
|
+
return format(results, this._docs, {
|
|
9136
|
+
includeMatches,
|
|
9137
|
+
includeScore
|
|
9138
|
+
});
|
|
9139
|
+
}
|
|
9140
|
+
_searchStringList(query, {
|
|
9141
|
+
heap,
|
|
9142
|
+
ignoreFieldNorm
|
|
9143
|
+
} = {}) {
|
|
9144
|
+
const searcher = this._getSearcher(query);
|
|
9145
|
+
const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
|
|
9146
|
+
const {
|
|
9147
|
+
records
|
|
9148
|
+
} = this._myIndex;
|
|
9149
|
+
const results = heap ? null : [];
|
|
9150
|
+
records.forEach(({
|
|
9151
|
+
v: text,
|
|
9152
|
+
i: idx,
|
|
9153
|
+
n: norm2
|
|
9154
|
+
}) => {
|
|
9155
|
+
if (!isDefined(text)) {
|
|
9156
|
+
return;
|
|
9157
|
+
}
|
|
9158
|
+
const searchResult = searcher.searchIn(text);
|
|
9159
|
+
if (searchResult.isMatch) {
|
|
9160
|
+
const match = {
|
|
9161
|
+
score: searchResult.score,
|
|
9162
|
+
value: text,
|
|
9163
|
+
norm: norm2,
|
|
9164
|
+
indices: searchResult.indices
|
|
9165
|
+
};
|
|
9166
|
+
if (requireAllTokens) {
|
|
9167
|
+
match.matchedMask = searchResult.matchedMask;
|
|
9168
|
+
match.matchedTerms = searchResult.matchedTerms;
|
|
9169
|
+
match.termCount = searchResult.termCount;
|
|
9170
|
+
}
|
|
9171
|
+
const matches = [match];
|
|
9172
|
+
if (!requireAllTokens || this._coversAllTokens(matches)) {
|
|
9173
|
+
const result = {
|
|
9174
|
+
item: text,
|
|
9175
|
+
idx,
|
|
9176
|
+
matches
|
|
9177
|
+
};
|
|
9178
|
+
if (heap) {
|
|
9179
|
+
result.score = computeScoreSingle(result.matches, {
|
|
9180
|
+
ignoreFieldNorm
|
|
9181
|
+
});
|
|
9182
|
+
if (heap.shouldInsert(result.score)) {
|
|
9183
|
+
heap.insert(result);
|
|
9184
|
+
}
|
|
9185
|
+
} else {
|
|
9186
|
+
results.push(result);
|
|
9187
|
+
}
|
|
9188
|
+
}
|
|
9189
|
+
}
|
|
9190
|
+
});
|
|
9191
|
+
return results;
|
|
9192
|
+
}
|
|
9193
|
+
_searchLogical(query) {
|
|
9194
|
+
const expression = parse2(query, this.options);
|
|
9195
|
+
const evaluate2 = (node, item, idx) => {
|
|
9196
|
+
if (!("children" in node)) {
|
|
9197
|
+
const {
|
|
9198
|
+
keyId,
|
|
9199
|
+
searcher
|
|
9200
|
+
} = node;
|
|
9201
|
+
let matches;
|
|
9202
|
+
if (keyId === null) {
|
|
9203
|
+
matches = [];
|
|
9204
|
+
this._myIndex.keys.forEach((key, keyIndex) => {
|
|
9205
|
+
matches.push(...this._findMatches({
|
|
9206
|
+
key,
|
|
9207
|
+
value: item[keyIndex],
|
|
9208
|
+
searcher
|
|
9209
|
+
}));
|
|
9210
|
+
});
|
|
9211
|
+
} else {
|
|
9212
|
+
matches = this._findMatches({
|
|
9213
|
+
key: this._keyStore.get(keyId),
|
|
9214
|
+
value: this._myIndex.getValueForItemAtKeyId(item, keyId),
|
|
9215
|
+
searcher
|
|
9216
|
+
});
|
|
9217
|
+
}
|
|
9218
|
+
if (matches && matches.length) {
|
|
9219
|
+
return [{
|
|
9220
|
+
idx,
|
|
9221
|
+
item,
|
|
9222
|
+
matches
|
|
9223
|
+
}];
|
|
9224
|
+
}
|
|
9225
|
+
return [];
|
|
9226
|
+
}
|
|
9227
|
+
const {
|
|
9228
|
+
children,
|
|
9229
|
+
operator
|
|
9230
|
+
} = node;
|
|
9231
|
+
const res = [];
|
|
9232
|
+
for (let i = 0, len = children.length; i < len; i += 1) {
|
|
9233
|
+
const child = children[i];
|
|
9234
|
+
const result = evaluate2(child, item, idx);
|
|
9235
|
+
if (result.length) {
|
|
9236
|
+
res.push(...result);
|
|
9237
|
+
} else if (operator === LogicalOperator.AND) {
|
|
9238
|
+
return [];
|
|
9239
|
+
}
|
|
9240
|
+
}
|
|
9241
|
+
return res;
|
|
9242
|
+
};
|
|
9243
|
+
const records = this._myIndex.records;
|
|
9244
|
+
const resultMap = /* @__PURE__ */ new Map();
|
|
9245
|
+
const results = [];
|
|
9246
|
+
records.forEach(({
|
|
9247
|
+
$: item,
|
|
9248
|
+
i: idx
|
|
9249
|
+
}) => {
|
|
9250
|
+
if (isDefined(item)) {
|
|
9251
|
+
const expResults = evaluate2(expression, item, idx);
|
|
9252
|
+
if (expResults.length) {
|
|
9253
|
+
if (!resultMap.has(idx)) {
|
|
9254
|
+
resultMap.set(idx, {
|
|
9255
|
+
idx,
|
|
9256
|
+
item,
|
|
9257
|
+
matches: []
|
|
9258
|
+
});
|
|
9259
|
+
results.push(resultMap.get(idx));
|
|
9260
|
+
}
|
|
9261
|
+
expResults.forEach(({
|
|
9262
|
+
matches
|
|
9263
|
+
}) => {
|
|
9264
|
+
resultMap.get(idx).matches.push(...matches);
|
|
9265
|
+
});
|
|
9266
|
+
}
|
|
9267
|
+
}
|
|
9268
|
+
});
|
|
9269
|
+
return results;
|
|
9270
|
+
}
|
|
9271
|
+
// When a search involves inverse patterns (e.g. !Syrup), the aggregation
|
|
9272
|
+
// across keys switches from "ANY key matches" to "ALL keys must match."
|
|
9273
|
+
// This is signaled by hasInverse on the SearchResult from ExtendedSearch.
|
|
9274
|
+
//
|
|
9275
|
+
// For mixed patterns like "^hello !Syrup", a key failure is ambiguous —
|
|
9276
|
+
// it could be the positive or inverse term that failed. In that case we
|
|
9277
|
+
// conservatively exclude the item, which is strictly better than the old
|
|
9278
|
+
// behavior of including it. See: https://github.com/krisk/Fuse/issues/712
|
|
9279
|
+
_searchObjectList(query, {
|
|
9280
|
+
heap,
|
|
9281
|
+
ignoreFieldNorm
|
|
9282
|
+
} = {}) {
|
|
9283
|
+
const searcher = this._getSearcher(query);
|
|
9284
|
+
const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
|
|
9285
|
+
const {
|
|
9286
|
+
keys,
|
|
9287
|
+
records
|
|
9288
|
+
} = this._myIndex;
|
|
9289
|
+
const results = heap ? null : [];
|
|
9290
|
+
records.forEach(({
|
|
9291
|
+
$: item,
|
|
9292
|
+
i: idx
|
|
9293
|
+
}) => {
|
|
9294
|
+
if (!isDefined(item)) {
|
|
9295
|
+
return;
|
|
9296
|
+
}
|
|
9297
|
+
const matches = [];
|
|
9298
|
+
let anyKeyFailed = false;
|
|
9299
|
+
let hasInverse = false;
|
|
9300
|
+
keys.forEach((key, keyIndex) => {
|
|
9301
|
+
const keyMatches = this._findMatches({
|
|
9302
|
+
key,
|
|
9303
|
+
value: item[keyIndex],
|
|
9304
|
+
searcher
|
|
9305
|
+
});
|
|
9306
|
+
if (keyMatches.length) {
|
|
9307
|
+
matches.push(...keyMatches);
|
|
9308
|
+
if (keyMatches[0].hasInverse) {
|
|
9309
|
+
hasInverse = true;
|
|
9310
|
+
}
|
|
9311
|
+
} else {
|
|
9312
|
+
anyKeyFailed = true;
|
|
9313
|
+
}
|
|
9314
|
+
});
|
|
9315
|
+
if (hasInverse && anyKeyFailed) {
|
|
9316
|
+
return;
|
|
9317
|
+
}
|
|
9318
|
+
if (matches.length && (!requireAllTokens || this._coversAllTokens(matches))) {
|
|
9319
|
+
const result = {
|
|
9320
|
+
idx,
|
|
9321
|
+
item,
|
|
9322
|
+
matches
|
|
9323
|
+
};
|
|
9324
|
+
if (heap) {
|
|
9325
|
+
result.score = computeScoreSingle(result.matches, {
|
|
9326
|
+
ignoreFieldNorm
|
|
9327
|
+
});
|
|
9328
|
+
if (heap.shouldInsert(result.score)) {
|
|
9329
|
+
heap.insert(result);
|
|
9330
|
+
}
|
|
9331
|
+
} else {
|
|
9332
|
+
results.push(result);
|
|
9333
|
+
}
|
|
9334
|
+
}
|
|
9335
|
+
});
|
|
9336
|
+
return results;
|
|
9337
|
+
}
|
|
9338
|
+
_findMatches({
|
|
9339
|
+
key,
|
|
9340
|
+
value,
|
|
9341
|
+
searcher
|
|
9342
|
+
}) {
|
|
9343
|
+
if (!isDefined(value)) {
|
|
9344
|
+
return [];
|
|
9345
|
+
}
|
|
9346
|
+
const matches = [];
|
|
9347
|
+
if (isArray(value)) {
|
|
9348
|
+
value.forEach(({
|
|
9349
|
+
v: text,
|
|
9350
|
+
i: idx,
|
|
9351
|
+
n: norm2
|
|
9352
|
+
}) => {
|
|
9353
|
+
if (!isDefined(text)) {
|
|
9354
|
+
return;
|
|
9355
|
+
}
|
|
9356
|
+
const searchResult = searcher.searchIn(text);
|
|
9357
|
+
if (searchResult.isMatch) {
|
|
9358
|
+
const match = {
|
|
9359
|
+
score: searchResult.score,
|
|
9360
|
+
key,
|
|
9361
|
+
value: text,
|
|
9362
|
+
idx,
|
|
9363
|
+
norm: norm2,
|
|
9364
|
+
indices: searchResult.indices,
|
|
9365
|
+
hasInverse: searchResult.hasInverse
|
|
9366
|
+
};
|
|
9367
|
+
if (searchResult.termCount !== void 0) {
|
|
9368
|
+
match.matchedMask = searchResult.matchedMask;
|
|
9369
|
+
match.matchedTerms = searchResult.matchedTerms;
|
|
9370
|
+
match.termCount = searchResult.termCount;
|
|
9371
|
+
}
|
|
9372
|
+
matches.push(match);
|
|
9373
|
+
}
|
|
9374
|
+
});
|
|
9375
|
+
} else {
|
|
9376
|
+
const {
|
|
9377
|
+
v: text,
|
|
9378
|
+
n: norm2
|
|
9379
|
+
} = value;
|
|
9380
|
+
const searchResult = searcher.searchIn(text);
|
|
9381
|
+
if (searchResult.isMatch) {
|
|
9382
|
+
const match = {
|
|
9383
|
+
score: searchResult.score,
|
|
9384
|
+
key,
|
|
9385
|
+
value: text,
|
|
9386
|
+
norm: norm2,
|
|
9387
|
+
indices: searchResult.indices,
|
|
9388
|
+
hasInverse: searchResult.hasInverse
|
|
9389
|
+
};
|
|
9390
|
+
if (searchResult.termCount !== void 0) {
|
|
9391
|
+
match.matchedMask = searchResult.matchedMask;
|
|
9392
|
+
match.matchedTerms = searchResult.matchedTerms;
|
|
9393
|
+
match.termCount = searchResult.termCount;
|
|
9394
|
+
}
|
|
9395
|
+
matches.push(match);
|
|
9396
|
+
}
|
|
9397
|
+
}
|
|
9398
|
+
return matches;
|
|
9399
|
+
}
|
|
9400
|
+
// Record-level AND gate for token search (`tokenMatch: 'all'`). Returns true
|
|
9401
|
+
// unless the matched terms across ALL of a record's field/array-element
|
|
9402
|
+
// matches fail to cover every query term. `termCount` is only set by
|
|
9403
|
+
// TokenSearch in 'all' mode, so non-token / 'any' searches always pass.
|
|
9404
|
+
_coversAllTokens(matches) {
|
|
9405
|
+
const termCount = matches.length ? matches[0].termCount : void 0;
|
|
9406
|
+
if (termCount === void 0) {
|
|
9407
|
+
return true;
|
|
9408
|
+
}
|
|
9409
|
+
if (termCount <= MAX_MASK_TERMS) {
|
|
9410
|
+
let coverage2 = 0;
|
|
9411
|
+
for (let i = 0; i < matches.length; i++) {
|
|
9412
|
+
coverage2 |= matches[i].matchedMask || 0;
|
|
9413
|
+
}
|
|
9414
|
+
return coverage2 === 2 ** termCount - 1;
|
|
9415
|
+
}
|
|
9416
|
+
const coverage = /* @__PURE__ */ new Set();
|
|
9417
|
+
for (let i = 0; i < matches.length; i++) {
|
|
9418
|
+
const terms = matches[i].matchedTerms;
|
|
9419
|
+
if (terms) {
|
|
9420
|
+
for (const t12 of terms) {
|
|
9421
|
+
coverage.add(t12);
|
|
9422
|
+
}
|
|
9423
|
+
}
|
|
9424
|
+
}
|
|
9425
|
+
return coverage.size === termCount;
|
|
9426
|
+
}
|
|
9427
|
+
};
|
|
9428
|
+
Fuse.version = "7.4.0";
|
|
9429
|
+
Fuse.createIndex = createIndex;
|
|
9430
|
+
Fuse.parseIndex = parseIndex;
|
|
9431
|
+
Fuse.config = Config;
|
|
9432
|
+
Fuse.match = function(pattern, text, options) {
|
|
9433
|
+
if (options && options.useTokenSearch) {
|
|
9434
|
+
throw new Error(FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED);
|
|
9435
|
+
}
|
|
9436
|
+
const searcher = createSearcher(pattern, {
|
|
9437
|
+
...Config,
|
|
9438
|
+
...options
|
|
9439
|
+
});
|
|
9440
|
+
return searcher.searchIn(text);
|
|
9441
|
+
};
|
|
9442
|
+
{
|
|
9443
|
+
Fuse.parseQuery = parse2;
|
|
9444
|
+
}
|
|
9445
|
+
{
|
|
9446
|
+
register(ExtendedSearch);
|
|
9447
|
+
}
|
|
9448
|
+
{
|
|
9449
|
+
register(TokenSearch);
|
|
9450
|
+
}
|
|
9451
|
+
Fuse.use = function(...plugins) {
|
|
9452
|
+
plugins.forEach((plugin) => register(plugin));
|
|
9453
|
+
};
|
|
9454
|
+
|
|
9455
|
+
// ../ui-react/dist/index.mjs
|
|
7400
9456
|
import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7401
9457
|
import { useState as useState242, useEffect as useEffect202, useRef as useRef62 } from "react";
|
|
7402
9458
|
import { jsx as jsx422, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
@@ -7404,10 +9460,10 @@ import { Fragment as Fragment62, jsx as jsx43, jsxs as jsxs39 } from "react/jsx-
|
|
|
7404
9460
|
import { useState as useState252 } from "react";
|
|
7405
9461
|
import * as React272 from "react";
|
|
7406
9462
|
|
|
7407
|
-
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
9463
|
+
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
7408
9464
|
import * as React31 from "react";
|
|
7409
9465
|
|
|
7410
|
-
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
9466
|
+
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
7411
9467
|
import * as React29 from "react";
|
|
7412
9468
|
|
|
7413
9469
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
@@ -9016,7 +11072,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
9016
11072
|
});
|
|
9017
11073
|
};
|
|
9018
11074
|
|
|
9019
|
-
// ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@
|
|
11075
|
+
// ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
9020
11076
|
import * as React26 from "react";
|
|
9021
11077
|
import { useLayoutEffect as useLayoutEffect4 } from "react";
|
|
9022
11078
|
import * as ReactDOM3 from "react-dom";
|
|
@@ -9300,7 +11356,7 @@ var arrow3 = (options, deps) => ({
|
|
|
9300
11356
|
options: [options, deps]
|
|
9301
11357
|
});
|
|
9302
11358
|
|
|
9303
|
-
// ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
11359
|
+
// ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9__trfewiwgkjpdk2hzi5vnfkkag4/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
9304
11360
|
import * as React27 from "react";
|
|
9305
11361
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
9306
11362
|
var NAME = "Arrow";
|
|
@@ -9322,7 +11378,7 @@ var Arrow = React27.forwardRef((props, forwardedRef) => {
|
|
|
9322
11378
|
Arrow.displayName = NAME;
|
|
9323
11379
|
var Root2 = Arrow;
|
|
9324
11380
|
|
|
9325
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@
|
|
11381
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
9326
11382
|
import * as React28 from "react";
|
|
9327
11383
|
function useSize(element) {
|
|
9328
11384
|
const [size4, setSize] = React28.useState(void 0);
|
|
@@ -9359,7 +11415,7 @@ function useSize(element) {
|
|
|
9359
11415
|
return size4;
|
|
9360
11416
|
}
|
|
9361
11417
|
|
|
9362
|
-
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
11418
|
+
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_plbhs5hqqc2ne4pfqm2mjggvti/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
9363
11419
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
9364
11420
|
var POPPER_NAME = "Popper";
|
|
9365
11421
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
@@ -9631,7 +11687,7 @@ var Anchor = PopperAnchor;
|
|
|
9631
11687
|
var Content2 = PopperContent;
|
|
9632
11688
|
var Arrow2 = PopperArrow;
|
|
9633
11689
|
|
|
9634
|
-
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+
|
|
11690
|
+
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_xe64s7cc2fbkwxawx7ejudwycu/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
9635
11691
|
import * as React30 from "react";
|
|
9636
11692
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
9637
11693
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
@@ -9663,7 +11719,7 @@ var VisuallyHidden = React30.forwardRef(
|
|
|
9663
11719
|
VisuallyHidden.displayName = NAME2;
|
|
9664
11720
|
var Root3 = VisuallyHidden;
|
|
9665
11721
|
|
|
9666
|
-
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
11722
|
+
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2._udyjcec5g7ve3mpsxbgla63vgi/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
9667
11723
|
import { jsx as jsx13, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
9668
11724
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
9669
11725
|
createPopperScope
|
|
@@ -10146,7 +12202,7 @@ import { Fragment as Fragment72, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-
|
|
|
10146
12202
|
import { useState as useState28, useEffect as useEffect222, useMemo as useMemo82 } from "react";
|
|
10147
12203
|
import * as React282 from "react";
|
|
10148
12204
|
|
|
10149
|
-
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
12205
|
+
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
10150
12206
|
import * as React35 from "react";
|
|
10151
12207
|
import * as ReactDOM4 from "react-dom";
|
|
10152
12208
|
|
|
@@ -10155,7 +12211,7 @@ function clamp2(value, [min2, max2]) {
|
|
|
10155
12211
|
return Math.min(max2, Math.max(min2, value));
|
|
10156
12212
|
}
|
|
10157
12213
|
|
|
10158
|
-
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@
|
|
12214
|
+
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_aqbloo75wukq4oiqf2nfnf7fqm/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
10159
12215
|
import React32 from "react";
|
|
10160
12216
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
10161
12217
|
import React210 from "react";
|
|
@@ -10223,7 +12279,7 @@ function createCollection(name) {
|
|
|
10223
12279
|
];
|
|
10224
12280
|
}
|
|
10225
12281
|
|
|
10226
|
-
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@
|
|
12282
|
+
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
10227
12283
|
import * as React33 from "react";
|
|
10228
12284
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
10229
12285
|
var DirectionContext = React33.createContext(void 0);
|
|
@@ -10232,7 +12288,7 @@ function useDirection(localDir) {
|
|
|
10232
12288
|
return localDir || globalDir || "ltr";
|
|
10233
12289
|
}
|
|
10234
12290
|
|
|
10235
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@
|
|
12291
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@19.2.3/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
10236
12292
|
import * as React34 from "react";
|
|
10237
12293
|
function usePrevious(value) {
|
|
10238
12294
|
const ref = React34.useRef({ value, previous: value });
|
|
@@ -10245,7 +12301,7 @@ function usePrevious(value) {
|
|
|
10245
12301
|
}, [value]);
|
|
10246
12302
|
}
|
|
10247
12303
|
|
|
10248
|
-
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.
|
|
12304
|
+
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19.2.9_cot3leusltbsophitaz3dgdqdm/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
10249
12305
|
import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
10250
12306
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
10251
12307
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
@@ -10367,10 +12423,10 @@ var SelectTrigger = React35.forwardRef(
|
|
|
10367
12423
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
10368
12424
|
const getItems = useCollection(__scopeSelect);
|
|
10369
12425
|
const pointerTypeRef = React35.useRef("touch");
|
|
10370
|
-
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((
|
|
12426
|
+
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search2) => {
|
|
10371
12427
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
10372
12428
|
const currentItem = enabledItems.find((item) => item.value === context.value);
|
|
10373
|
-
const nextItem = findNextItem(enabledItems,
|
|
12429
|
+
const nextItem = findNextItem(enabledItems, search2, currentItem);
|
|
10374
12430
|
if (nextItem !== void 0) {
|
|
10375
12431
|
context.onValueChange(nextItem.value);
|
|
10376
12432
|
}
|
|
@@ -10597,10 +12653,10 @@ var SelectContentImpl = React35.forwardRef(
|
|
|
10597
12653
|
window.removeEventListener("resize", close);
|
|
10598
12654
|
};
|
|
10599
12655
|
}, [onOpenChange]);
|
|
10600
|
-
const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((
|
|
12656
|
+
const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search2) => {
|
|
10601
12657
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
10602
12658
|
const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
|
|
10603
|
-
const nextItem = findNextItem(enabledItems,
|
|
12659
|
+
const nextItem = findNextItem(enabledItems, search2, currentItem);
|
|
10604
12660
|
if (nextItem) {
|
|
10605
12661
|
setTimeout(() => nextItem.ref.current.focus());
|
|
10606
12662
|
}
|
|
@@ -11329,13 +13385,13 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
11329
13385
|
const timerRef = React35.useRef(0);
|
|
11330
13386
|
const handleTypeaheadSearch = React35.useCallback(
|
|
11331
13387
|
(key) => {
|
|
11332
|
-
const
|
|
11333
|
-
handleSearchChange(
|
|
13388
|
+
const search2 = searchRef.current + key;
|
|
13389
|
+
handleSearchChange(search2);
|
|
11334
13390
|
(function updateSearch(value) {
|
|
11335
13391
|
searchRef.current = value;
|
|
11336
13392
|
window.clearTimeout(timerRef.current);
|
|
11337
13393
|
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
|
|
11338
|
-
})(
|
|
13394
|
+
})(search2);
|
|
11339
13395
|
},
|
|
11340
13396
|
[handleSearchChange]
|
|
11341
13397
|
);
|
|
@@ -11348,9 +13404,9 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
11348
13404
|
}, []);
|
|
11349
13405
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
11350
13406
|
}
|
|
11351
|
-
function findNextItem(items,
|
|
11352
|
-
const isRepeated =
|
|
11353
|
-
const normalizedSearch = isRepeated ?
|
|
13407
|
+
function findNextItem(items, search2, currentItem) {
|
|
13408
|
+
const isRepeated = search2.length > 1 && Array.from(search2).every((char) => char === search2[0]);
|
|
13409
|
+
const normalizedSearch = isRepeated ? search2[0] : search2;
|
|
11354
13410
|
const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
|
|
11355
13411
|
let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
|
|
11356
13412
|
const excludeCurrentItem = normalizedSearch.length === 1;
|
|
@@ -12814,7 +14870,7 @@ function interpolate(template, params) {
|
|
|
12814
14870
|
}
|
|
12815
14871
|
var DEPOSIT_CONFIRM_DELAY_MS = 5e3;
|
|
12816
14872
|
var POLL_INTERVAL_MS = 2500;
|
|
12817
|
-
var POLL_ENDPOINT_INTERVAL_MS =
|
|
14873
|
+
var POLL_ENDPOINT_INTERVAL_MS = 5e3;
|
|
12818
14874
|
var CUTOFF_BUFFER_MS = 6e4;
|
|
12819
14875
|
function useDepositPolling({
|
|
12820
14876
|
userId,
|
|
@@ -16456,6 +18512,53 @@ function CashAppButton({
|
|
|
16456
18512
|
}
|
|
16457
18513
|
);
|
|
16458
18514
|
}
|
|
18515
|
+
var _store = null;
|
|
18516
|
+
function getEip6963Store() {
|
|
18517
|
+
if (typeof window === "undefined") return null;
|
|
18518
|
+
if (!_store) {
|
|
18519
|
+
_store = createStore();
|
|
18520
|
+
}
|
|
18521
|
+
return _store;
|
|
18522
|
+
}
|
|
18523
|
+
var RDNS_TO_WALLET_ID = {
|
|
18524
|
+
"io.metamask": "metamask",
|
|
18525
|
+
"io.metamask.flask": "metamask",
|
|
18526
|
+
"io.metamask.mmi": "metamask",
|
|
18527
|
+
"app.phantom": "phantom",
|
|
18528
|
+
"com.coinbase.wallet": "coinbase",
|
|
18529
|
+
"com.okex.wallet": "okx",
|
|
18530
|
+
"io.rabby": "rabby",
|
|
18531
|
+
"com.trustwallet.app": "trust",
|
|
18532
|
+
"me.rainbow": "rainbow"
|
|
18533
|
+
};
|
|
18534
|
+
function rdnsToWalletId(rdns) {
|
|
18535
|
+
if (RDNS_TO_WALLET_ID[rdns]) return RDNS_TO_WALLET_ID[rdns];
|
|
18536
|
+
if (rdns.includes("metamask")) return "metamask";
|
|
18537
|
+
if (rdns.includes("phantom")) return "phantom";
|
|
18538
|
+
if (rdns.includes("coinbase")) return "coinbase";
|
|
18539
|
+
if (rdns.includes("okx") || rdns.includes("okex")) return "okx";
|
|
18540
|
+
if (rdns.includes("rabby")) return "rabby";
|
|
18541
|
+
if (rdns.includes("trust")) return "trust";
|
|
18542
|
+
if (rdns.includes("rainbow")) return "rainbow";
|
|
18543
|
+
return "unknown";
|
|
18544
|
+
}
|
|
18545
|
+
function getEip6963Providers() {
|
|
18546
|
+
const store = getEip6963Store();
|
|
18547
|
+
if (!store) return [];
|
|
18548
|
+
return store.getProviders().map((detail) => ({
|
|
18549
|
+
walletId: rdnsToWalletId(detail.info.rdns),
|
|
18550
|
+
provider: detail.provider,
|
|
18551
|
+
info: detail.info
|
|
18552
|
+
}));
|
|
18553
|
+
}
|
|
18554
|
+
function findProviderByWalletId(walletId) {
|
|
18555
|
+
return getEip6963Providers().find((p) => p.walletId === walletId);
|
|
18556
|
+
}
|
|
18557
|
+
function collectAllEip6963EthProviders() {
|
|
18558
|
+
const store = getEip6963Store();
|
|
18559
|
+
if (!store) return [];
|
|
18560
|
+
return store.getProviders().map((d) => d.provider);
|
|
18561
|
+
}
|
|
16459
18562
|
var SOLANA_DISCONNECT_TYPES = [
|
|
16460
18563
|
"phantom-solana",
|
|
16461
18564
|
"solflare",
|
|
@@ -16495,8 +18598,9 @@ function collectEthereumProvidersForDisconnect(win) {
|
|
|
16495
18598
|
out.push(p);
|
|
16496
18599
|
}
|
|
16497
18600
|
};
|
|
16498
|
-
const
|
|
16499
|
-
|
|
18601
|
+
for (const p of collectAllEip6963EthProviders()) {
|
|
18602
|
+
add(p);
|
|
18603
|
+
}
|
|
16500
18604
|
add(win.ethereum);
|
|
16501
18605
|
add(
|
|
16502
18606
|
win.phantom?.ethereum
|
|
@@ -18502,30 +20606,13 @@ function BrowserWalletButton({
|
|
|
18502
20606
|
}, []);
|
|
18503
20607
|
const [eip6963ProviderCount, setEip6963ProviderCount] = React242.useState(0);
|
|
18504
20608
|
React242.useEffect(() => {
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
if (!detail?.info || !detail?.provider) return;
|
|
18513
|
-
const exists = anyWin.__eip6963Providers.some(
|
|
18514
|
-
(p) => p.info.uuid === detail.info.uuid
|
|
18515
|
-
);
|
|
18516
|
-
if (!exists) {
|
|
18517
|
-
anyWin.__eip6963Providers.push(detail);
|
|
18518
|
-
setEip6963ProviderCount(anyWin.__eip6963Providers.length);
|
|
18519
|
-
}
|
|
18520
|
-
};
|
|
18521
|
-
window.addEventListener("eip6963:announceProvider", handleAnnouncement);
|
|
18522
|
-
window.dispatchEvent(new Event("eip6963:requestProvider"));
|
|
18523
|
-
return () => {
|
|
18524
|
-
window.removeEventListener(
|
|
18525
|
-
"eip6963:announceProvider",
|
|
18526
|
-
handleAnnouncement
|
|
18527
|
-
);
|
|
18528
|
-
};
|
|
20609
|
+
const store = getEip6963Store();
|
|
20610
|
+
if (!store) return;
|
|
20611
|
+
setEip6963ProviderCount(store.getProviders().length);
|
|
20612
|
+
const unsubscribe = store.subscribe((providers) => {
|
|
20613
|
+
setEip6963ProviderCount(providers.length);
|
|
20614
|
+
});
|
|
20615
|
+
return unsubscribe;
|
|
18529
20616
|
}, []);
|
|
18530
20617
|
React242.useEffect(() => {
|
|
18531
20618
|
if (!wallet || !publishableKey) {
|
|
@@ -18584,7 +20671,7 @@ function BrowserWalletButton({
|
|
|
18584
20671
|
return;
|
|
18585
20672
|
}
|
|
18586
20673
|
if (!chainType || chainType === "solana") {
|
|
18587
|
-
const
|
|
20674
|
+
const anyWin = win;
|
|
18588
20675
|
const trySilentSolana = async (provider, type, name, icon) => {
|
|
18589
20676
|
if (!provider) return false;
|
|
18590
20677
|
if (provider.isConnected && provider.publicKey) {
|
|
@@ -18623,21 +20710,21 @@ function BrowserWalletButton({
|
|
|
18623
20710
|
))
|
|
18624
20711
|
return;
|
|
18625
20712
|
if (await trySilentSolana(
|
|
18626
|
-
|
|
20713
|
+
anyWin.solflare,
|
|
18627
20714
|
"solflare",
|
|
18628
20715
|
"Solflare",
|
|
18629
20716
|
"solflare"
|
|
18630
20717
|
))
|
|
18631
20718
|
return;
|
|
18632
20719
|
if (await trySilentSolana(
|
|
18633
|
-
|
|
20720
|
+
anyWin.backpack,
|
|
18634
20721
|
"backpack",
|
|
18635
20722
|
"Backpack",
|
|
18636
20723
|
"backpack"
|
|
18637
20724
|
))
|
|
18638
20725
|
return;
|
|
18639
20726
|
if (await trySilentSolana(
|
|
18640
|
-
|
|
20727
|
+
anyWin.glow,
|
|
18641
20728
|
"glow",
|
|
18642
20729
|
"Glow",
|
|
18643
20730
|
"glow"
|
|
@@ -18645,19 +20732,14 @@ function BrowserWalletButton({
|
|
|
18645
20732
|
return;
|
|
18646
20733
|
}
|
|
18647
20734
|
if (!chainType || chainType === "ethereum") {
|
|
18648
|
-
const
|
|
20735
|
+
const anyWin = win;
|
|
18649
20736
|
const allProviders = [];
|
|
18650
|
-
const
|
|
18651
|
-
for (const {
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
else if (info.rdns.includes("okx")) walletId = "okx";
|
|
18657
|
-
else if (info.rdns.includes("rabby")) walletId = "rabby";
|
|
18658
|
-
else if (info.rdns.includes("trust")) walletId = "trust";
|
|
18659
|
-
else if (info.rdns.includes("rainbow")) walletId = "rainbow";
|
|
18660
|
-
allProviders.push({ provider, walletId });
|
|
20737
|
+
const eip6963 = getEip6963Providers();
|
|
20738
|
+
for (const { provider, walletId } of eip6963) {
|
|
20739
|
+
allProviders.push({
|
|
20740
|
+
provider,
|
|
20741
|
+
walletId: walletId === "unknown" ? "default" : walletId
|
|
20742
|
+
});
|
|
18661
20743
|
}
|
|
18662
20744
|
if (allProviders.length === 0) {
|
|
18663
20745
|
if (win.phantom?.ethereum) {
|
|
@@ -18666,15 +20748,15 @@ function BrowserWalletButton({
|
|
|
18666
20748
|
walletId: "phantom"
|
|
18667
20749
|
});
|
|
18668
20750
|
}
|
|
18669
|
-
if (
|
|
20751
|
+
if (anyWin.okxwallet) {
|
|
18670
20752
|
allProviders.push({
|
|
18671
|
-
provider:
|
|
20753
|
+
provider: anyWin.okxwallet,
|
|
18672
20754
|
walletId: "okx"
|
|
18673
20755
|
});
|
|
18674
20756
|
}
|
|
18675
|
-
if (
|
|
20757
|
+
if (anyWin.coinbaseWalletExtension) {
|
|
18676
20758
|
allProviders.push({
|
|
18677
|
-
provider:
|
|
20759
|
+
provider: anyWin.coinbaseWalletExtension,
|
|
18678
20760
|
walletId: "coinbase"
|
|
18679
20761
|
});
|
|
18680
20762
|
}
|
|
@@ -18698,7 +20780,7 @@ function BrowserWalletButton({
|
|
|
18698
20780
|
});
|
|
18699
20781
|
if (!accounts || accounts.length === 0) continue;
|
|
18700
20782
|
const address = accounts[0];
|
|
18701
|
-
const resolved = identifyEthWallet(provider,
|
|
20783
|
+
const resolved = identifyEthWallet(provider, anyWin, walletId);
|
|
18702
20784
|
if (mounted) {
|
|
18703
20785
|
setWallet({ ...resolved, address });
|
|
18704
20786
|
setIsLoading(false);
|
|
@@ -18740,15 +20822,11 @@ function BrowserWalletButton({
|
|
|
18740
20822
|
solanaProvider.on("disconnect", handleDisconnect);
|
|
18741
20823
|
solanaProvider.on("accountChanged", handleAccountsChanged);
|
|
18742
20824
|
}
|
|
18743
|
-
const anyWin = window;
|
|
18744
20825
|
const ethProviders = [];
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
if (provider && !ethProviders.includes(provider)) {
|
|
18750
|
-
ethProviders.push(provider);
|
|
18751
|
-
}
|
|
20826
|
+
for (const { provider } of getEip6963Providers()) {
|
|
20827
|
+
const p = provider;
|
|
20828
|
+
if (p && !ethProviders.includes(p)) {
|
|
20829
|
+
ethProviders.push(p);
|
|
18752
20830
|
}
|
|
18753
20831
|
}
|
|
18754
20832
|
if (window.ethereum && !ethProviders.includes(window.ethereum)) {
|
|
@@ -18850,7 +20928,7 @@ function BrowserWalletButton({
|
|
|
18850
20928
|
if (isLoading) {
|
|
18851
20929
|
return null;
|
|
18852
20930
|
}
|
|
18853
|
-
const hasWalletExtension = (!chainType || chainType === "solana") && (window.phantom?.solana?.isPhantom || window.solana?.isPhantom)
|
|
20931
|
+
const hasWalletExtension = (!chainType || chainType === "ethereum") && getEip6963Providers().length > 0 || (!chainType || chainType === "solana") && (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) || (!chainType || chainType === "ethereum") && (window.phantom?.ethereum || window.ethereum);
|
|
18854
20932
|
if (!onConnectClick && !wallet && !hasWalletExtension) {
|
|
18855
20933
|
return null;
|
|
18856
20934
|
}
|
|
@@ -21425,13 +23503,25 @@ function TokenSelectorSheet({
|
|
|
21425
23503
|
});
|
|
21426
23504
|
setRecentTokens(updated);
|
|
21427
23505
|
};
|
|
23506
|
+
const fuse = useMemo62(
|
|
23507
|
+
() => new Fuse(allOptions, {
|
|
23508
|
+
keys: [
|
|
23509
|
+
{ name: "token.symbol", weight: 2 },
|
|
23510
|
+
{ name: "token.name", weight: 1 },
|
|
23511
|
+
{ name: "chain.chain_name", weight: 0.5 }
|
|
23512
|
+
],
|
|
23513
|
+
threshold: 0.2,
|
|
23514
|
+
ignoreLocation: true,
|
|
23515
|
+
minMatchCharLength: 2
|
|
23516
|
+
}),
|
|
23517
|
+
[allOptions]
|
|
23518
|
+
);
|
|
21428
23519
|
const filteredOptions = useMemo62(() => {
|
|
21429
23520
|
if (!searchQuery.trim()) return allOptions;
|
|
21430
|
-
const query = searchQuery.
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
}, [allOptions, searchQuery]);
|
|
23521
|
+
const query = searchQuery.trim();
|
|
23522
|
+
const results = fuse.search(query);
|
|
23523
|
+
return results.map((r2) => r2.item);
|
|
23524
|
+
}, [fuse, allOptions, searchQuery]);
|
|
21435
23525
|
const isCommonToken = (symbol, chainType, chainId) => {
|
|
21436
23526
|
return COMMON_TOKENS.some(
|
|
21437
23527
|
(ct) => ct.symbol === symbol && ct.chainType === chainType && ct.chainId === chainId
|
|
@@ -24346,15 +26436,10 @@ var WALLET_DEFINITIONS = [
|
|
|
24346
26436
|
{ id: "backpack", name: "Backpack", networks: ["solana"], installUrl: "https://backpack.app/" },
|
|
24347
26437
|
{ id: "glow", name: "Glow", networks: ["solana"], installUrl: "https://glow.app/" }
|
|
24348
26438
|
];
|
|
24349
|
-
function
|
|
26439
|
+
function getSolanaProviders() {
|
|
24350
26440
|
if (typeof window === "undefined") return {};
|
|
24351
26441
|
const win = window;
|
|
24352
26442
|
return {
|
|
24353
|
-
ethereum: win.ethereum,
|
|
24354
|
-
phantomEthereum: win.phantom?.ethereum,
|
|
24355
|
-
coinbaseEthereum: win.coinbaseWalletExtension,
|
|
24356
|
-
trustEthereum: win.trustwallet?.ethereum,
|
|
24357
|
-
okxEthereum: win.okxwallet,
|
|
24358
26443
|
phantomSolana: win.phantom?.solana,
|
|
24359
26444
|
solflare: win.solflare,
|
|
24360
26445
|
backpack: win.backpack,
|
|
@@ -24362,37 +26447,71 @@ function getWalletProviders() {
|
|
|
24362
26447
|
coinbaseSolana: win.coinbaseSolana || win.coinbaseWalletExtension?.solana
|
|
24363
26448
|
};
|
|
24364
26449
|
}
|
|
26450
|
+
function getLegacyEvmProviders() {
|
|
26451
|
+
if (typeof window === "undefined") return {};
|
|
26452
|
+
const win = window;
|
|
26453
|
+
return {
|
|
26454
|
+
ethereum: win.ethereum,
|
|
26455
|
+
phantomEthereum: win.phantom?.ethereum,
|
|
26456
|
+
coinbaseEthereum: win.coinbaseWalletExtension,
|
|
26457
|
+
trustEthereum: win.trustwallet?.ethereum,
|
|
26458
|
+
okxEthereum: win.okxwallet
|
|
26459
|
+
};
|
|
26460
|
+
}
|
|
24365
26461
|
function detectAvailableWallets(filterChainType) {
|
|
24366
|
-
const
|
|
26462
|
+
const solProviders = getSolanaProviders();
|
|
26463
|
+
const legacyEvm = getLegacyEvmProviders();
|
|
26464
|
+
const eip6963List = getEip6963Providers();
|
|
24367
26465
|
const win = typeof window !== "undefined" ? window : null;
|
|
26466
|
+
const hasEip6963 = (walletId) => eip6963List.some((d) => {
|
|
26467
|
+
const rdns = d.info?.rdns || "";
|
|
26468
|
+
switch (walletId) {
|
|
26469
|
+
case "metamask":
|
|
26470
|
+
return rdns.includes("metamask");
|
|
26471
|
+
case "phantom":
|
|
26472
|
+
return rdns.includes("phantom");
|
|
26473
|
+
case "coinbase":
|
|
26474
|
+
return rdns.includes("coinbase");
|
|
26475
|
+
case "trust":
|
|
26476
|
+
return rdns.includes("trust");
|
|
26477
|
+
case "rainbow":
|
|
26478
|
+
return rdns.includes("rainbow");
|
|
26479
|
+
case "rabby":
|
|
26480
|
+
return rdns.includes("rabby");
|
|
26481
|
+
case "okx":
|
|
26482
|
+
return rdns.includes("okx") || rdns.includes("okex");
|
|
26483
|
+
default:
|
|
26484
|
+
return false;
|
|
26485
|
+
}
|
|
26486
|
+
});
|
|
24368
26487
|
return WALLET_DEFINITIONS.filter((w) => !filterChainType || w.networks.includes(filterChainType)).map((wallet) => {
|
|
24369
26488
|
let isInstalled = false;
|
|
24370
26489
|
const detectedNetworks = [];
|
|
24371
26490
|
switch (wallet.id) {
|
|
24372
26491
|
case "metamask":
|
|
24373
|
-
isInstalled = !!(
|
|
26492
|
+
isInstalled = hasEip6963("metamask") || !!(legacyEvm.ethereum?.isMetaMask && !legacyEvm.ethereum?.isPhantom && !legacyEvm.ethereum?.isRabby && !legacyEvm.ethereum?.isOkxWallet);
|
|
24374
26493
|
if (isInstalled) detectedNetworks.push("ethereum");
|
|
24375
26494
|
break;
|
|
24376
26495
|
case "phantom":
|
|
24377
|
-
if (
|
|
26496
|
+
if (solProviders.phantomSolana?.isPhantom) {
|
|
24378
26497
|
isInstalled = true;
|
|
24379
26498
|
detectedNetworks.push("solana");
|
|
24380
26499
|
}
|
|
24381
|
-
if (
|
|
26500
|
+
if (hasEip6963("phantom") || legacyEvm.phantomEthereum?.isPhantom) {
|
|
24382
26501
|
isInstalled = true;
|
|
24383
26502
|
detectedNetworks.push("ethereum");
|
|
24384
26503
|
}
|
|
24385
26504
|
break;
|
|
24386
26505
|
case "coinbase":
|
|
24387
|
-
if (
|
|
26506
|
+
if (hasEip6963("coinbase") || legacyEvm.coinbaseEthereum || legacyEvm.ethereum?.isCoinbaseWallet) {
|
|
24388
26507
|
isInstalled = true;
|
|
24389
26508
|
detectedNetworks.push("ethereum");
|
|
24390
26509
|
}
|
|
24391
|
-
if (
|
|
26510
|
+
if (solProviders.coinbaseSolana || win?.coinbaseWalletExtension?.solana) detectedNetworks.push("solana");
|
|
24392
26511
|
if (isInstalled && wallet.networks.includes("solana") && !detectedNetworks.includes("solana")) detectedNetworks.push("solana");
|
|
24393
26512
|
break;
|
|
24394
26513
|
case "trust":
|
|
24395
|
-
if (
|
|
26514
|
+
if (hasEip6963("trust") || legacyEvm.trustEthereum || legacyEvm.ethereum?.isTrust || win?.trustwallet) {
|
|
24396
26515
|
isInstalled = true;
|
|
24397
26516
|
detectedNetworks.push("ethereum");
|
|
24398
26517
|
}
|
|
@@ -24400,27 +26519,27 @@ function detectAvailableWallets(filterChainType) {
|
|
|
24400
26519
|
if (isInstalled && wallet.networks.includes("solana") && !detectedNetworks.includes("solana")) detectedNetworks.push("solana");
|
|
24401
26520
|
break;
|
|
24402
26521
|
case "rainbow":
|
|
24403
|
-
isInstalled = !!
|
|
26522
|
+
isInstalled = hasEip6963("rainbow") || !!legacyEvm.ethereum?.isRainbow;
|
|
24404
26523
|
if (isInstalled) detectedNetworks.push("ethereum");
|
|
24405
26524
|
break;
|
|
24406
26525
|
case "rabby":
|
|
24407
|
-
isInstalled = !!
|
|
26526
|
+
isInstalled = hasEip6963("rabby") || !!legacyEvm.ethereum?.isRabby;
|
|
24408
26527
|
if (isInstalled) detectedNetworks.push("ethereum");
|
|
24409
26528
|
break;
|
|
24410
26529
|
case "okx":
|
|
24411
|
-
isInstalled = !!(
|
|
26530
|
+
isInstalled = hasEip6963("okx") || !!(legacyEvm.okxEthereum || legacyEvm.ethereum?.isOkxWallet);
|
|
24412
26531
|
if (isInstalled) detectedNetworks.push("ethereum");
|
|
24413
26532
|
break;
|
|
24414
26533
|
case "solflare":
|
|
24415
|
-
isInstalled = !!
|
|
26534
|
+
isInstalled = !!solProviders.solflare?.isSolflare;
|
|
24416
26535
|
if (isInstalled) detectedNetworks.push("solana");
|
|
24417
26536
|
break;
|
|
24418
26537
|
case "backpack":
|
|
24419
|
-
isInstalled = !!(
|
|
26538
|
+
isInstalled = !!(solProviders.backpack?.isBackpack || win?.backpack);
|
|
24420
26539
|
if (isInstalled) detectedNetworks.push("solana");
|
|
24421
26540
|
break;
|
|
24422
26541
|
case "glow":
|
|
24423
|
-
isInstalled = !!(
|
|
26542
|
+
isInstalled = !!(solProviders.glow?.isGlow || win?.glow);
|
|
24424
26543
|
if (isInstalled) detectedNetworks.push("solana");
|
|
24425
26544
|
break;
|
|
24426
26545
|
}
|
|
@@ -24475,7 +26594,16 @@ function WalletConnect({
|
|
|
24475
26594
|
const [connectingNetwork, setConnectingNetwork] = React292.useState(null);
|
|
24476
26595
|
const [walletError, setWalletError] = React292.useState(null);
|
|
24477
26596
|
const [isWalletConnecting, setIsWalletConnecting] = React292.useState(false);
|
|
24478
|
-
const
|
|
26597
|
+
const [eip6963ProviderCount, setEip6963ProviderCount] = React292.useState(0);
|
|
26598
|
+
React292.useEffect(() => {
|
|
26599
|
+
const store = getEip6963Store();
|
|
26600
|
+
if (!store) return;
|
|
26601
|
+
setEip6963ProviderCount(store.getProviders().length);
|
|
26602
|
+
return store.subscribe((providers) => {
|
|
26603
|
+
setEip6963ProviderCount(providers.length);
|
|
26604
|
+
});
|
|
26605
|
+
}, []);
|
|
26606
|
+
const availableWallets = React292.useMemo(() => detectAvailableWallets(), [eip6963ProviderCount]);
|
|
24479
26607
|
const [balances, setBalances] = React292.useState([]);
|
|
24480
26608
|
const [isLoading, setIsLoading] = React292.useState(false);
|
|
24481
26609
|
const [selectedBalance, setSelectedBalance] = React292.useState(null);
|
|
@@ -24534,59 +26662,72 @@ function WalletConnect({
|
|
|
24534
26662
|
setWalletError(null);
|
|
24535
26663
|
setIsWalletConnecting(true);
|
|
24536
26664
|
try {
|
|
24537
|
-
const providers = getWalletProviders();
|
|
24538
26665
|
const win = typeof window !== "undefined" ? window : null;
|
|
24539
26666
|
let connectedInfo;
|
|
24540
26667
|
if (network === "ethereum") {
|
|
24541
|
-
|
|
24542
|
-
|
|
24543
|
-
|
|
24544
|
-
|
|
24545
|
-
|
|
24546
|
-
|
|
24547
|
-
|
|
24548
|
-
|
|
24549
|
-
|
|
24550
|
-
|
|
24551
|
-
|
|
24552
|
-
|
|
24553
|
-
|
|
24554
|
-
|
|
24555
|
-
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
|
|
24564
|
-
|
|
24565
|
-
|
|
26668
|
+
const eip6963Match = findProviderByWalletId(wallet.id);
|
|
26669
|
+
let provider = eip6963Match?.provider;
|
|
26670
|
+
if (!provider) {
|
|
26671
|
+
const legacyEvm = getLegacyEvmProviders();
|
|
26672
|
+
switch (wallet.id) {
|
|
26673
|
+
case "metamask":
|
|
26674
|
+
if (legacyEvm.ethereum?.isMetaMask && !legacyEvm.ethereum?.isPhantom) provider = legacyEvm.ethereum;
|
|
26675
|
+
break;
|
|
26676
|
+
case "phantom":
|
|
26677
|
+
provider = legacyEvm.phantomEthereum;
|
|
26678
|
+
break;
|
|
26679
|
+
case "coinbase":
|
|
26680
|
+
provider = legacyEvm.coinbaseEthereum || (legacyEvm.ethereum?.isCoinbaseWallet ? legacyEvm.ethereum : void 0);
|
|
26681
|
+
break;
|
|
26682
|
+
case "trust":
|
|
26683
|
+
provider = legacyEvm.trustEthereum || (legacyEvm.ethereum?.isTrust ? legacyEvm.ethereum : void 0);
|
|
26684
|
+
break;
|
|
26685
|
+
case "rainbow":
|
|
26686
|
+
if (legacyEvm.ethereum?.isRainbow) provider = legacyEvm.ethereum;
|
|
26687
|
+
break;
|
|
26688
|
+
case "rabby":
|
|
26689
|
+
if (legacyEvm.ethereum?.isRabby) provider = legacyEvm.ethereum;
|
|
26690
|
+
break;
|
|
26691
|
+
case "okx":
|
|
26692
|
+
provider = legacyEvm.okxEthereum || (legacyEvm.ethereum?.isOkxWallet ? legacyEvm.ethereum : void 0);
|
|
26693
|
+
break;
|
|
26694
|
+
default:
|
|
26695
|
+
provider = legacyEvm.ethereum;
|
|
26696
|
+
}
|
|
24566
26697
|
}
|
|
24567
26698
|
if (!provider) throw new Error(`${wallet.name} wallet not found. Please install it.`);
|
|
24568
26699
|
const accounts = await provider.request({ method: "eth_requestAccounts" });
|
|
24569
26700
|
if (!accounts?.length) throw new Error("No accounts returned from wallet");
|
|
24570
26701
|
setUserDisconnectedWallet(false);
|
|
24571
|
-
const
|
|
26702
|
+
const walletIdToType = {
|
|
26703
|
+
phantom: "phantom-ethereum",
|
|
26704
|
+
coinbase: "coinbase",
|
|
26705
|
+
trust: "trust",
|
|
26706
|
+
rainbow: "rainbow",
|
|
26707
|
+
rabby: "rabby",
|
|
26708
|
+
okx: "okx",
|
|
26709
|
+
metamask: "metamask"
|
|
26710
|
+
};
|
|
26711
|
+
const walletType = walletIdToType[wallet.id] || "metamask";
|
|
24572
26712
|
connectedInfo = { type: walletType, name: wallet.name, address: accounts[0], icon: wallet.id };
|
|
24573
26713
|
} else {
|
|
26714
|
+
const solProviders = getSolanaProviders();
|
|
24574
26715
|
let provider;
|
|
24575
26716
|
switch (wallet.id) {
|
|
24576
26717
|
case "phantom":
|
|
24577
|
-
provider =
|
|
26718
|
+
provider = solProviders.phantomSolana;
|
|
24578
26719
|
break;
|
|
24579
26720
|
case "solflare":
|
|
24580
|
-
provider =
|
|
26721
|
+
provider = solProviders.solflare;
|
|
24581
26722
|
break;
|
|
24582
26723
|
case "backpack":
|
|
24583
|
-
provider =
|
|
26724
|
+
provider = solProviders.backpack || win?.backpack;
|
|
24584
26725
|
break;
|
|
24585
26726
|
case "glow":
|
|
24586
|
-
provider =
|
|
26727
|
+
provider = solProviders.glow || win?.glow;
|
|
24587
26728
|
break;
|
|
24588
26729
|
case "coinbase":
|
|
24589
|
-
provider =
|
|
26730
|
+
provider = solProviders.coinbaseSolana || win?.coinbaseWalletExtension?.solana;
|
|
24590
26731
|
break;
|
|
24591
26732
|
case "trust":
|
|
24592
26733
|
provider = win?.trustwallet?.solana;
|
|
@@ -24832,10 +26973,15 @@ function WalletConnect({
|
|
|
24832
26973
|
};
|
|
24833
26974
|
const sendEthereumTransaction = async (token, amountStr) => {
|
|
24834
26975
|
if (!recipientAddress || !/^0x[a-fA-F0-9]{40}$/.test(recipientAddress)) throw new Error(`Invalid recipient address.`);
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
26976
|
+
const walletIdMap = { "phantom-ethereum": "phantom", coinbase: "coinbase", trust: "trust", okx: "okx", rainbow: "rainbow", rabby: "rabby", metamask: "metamask" };
|
|
26977
|
+
const lookupId = walletIdMap[walletInfo.type] || walletInfo.type;
|
|
26978
|
+
const eip6963Match = findProviderByWalletId(lookupId);
|
|
26979
|
+
let provider = eip6963Match?.provider;
|
|
26980
|
+
if (!provider) {
|
|
26981
|
+
if (walletInfo.type === "phantom-ethereum") provider = window.phantom?.ethereum;
|
|
26982
|
+
else if (walletInfo.type === "coinbase") provider = window.coinbaseWalletExtension || window.ethereum;
|
|
26983
|
+
else provider = window.ethereum;
|
|
26984
|
+
}
|
|
24839
26985
|
if (!provider) throw new Error("Ethereum wallet not found");
|
|
24840
26986
|
const currentChainIdHex = await provider.request({ method: "eth_chainId", params: [] });
|
|
24841
26987
|
if (parseInt(currentChainIdHex, 16).toString() !== token.chain_id) {
|
|
@@ -25074,6 +27220,7 @@ function DepositModal({
|
|
|
25074
27220
|
enableConnectWallet = false,
|
|
25075
27221
|
browserWalletAmountQuickSelect = "percentage",
|
|
25076
27222
|
enablePayWithExchange,
|
|
27223
|
+
enableFiatOnramp,
|
|
25077
27224
|
enableConnectExchange = false,
|
|
25078
27225
|
enableCashApp = false,
|
|
25079
27226
|
hideDepositFlowInfo = false,
|
|
@@ -25095,8 +27242,9 @@ function DepositModal({
|
|
|
25095
27242
|
const s = initialScreen ?? "main";
|
|
25096
27243
|
if (s === "tracker" && hideDepositTracker) return "main";
|
|
25097
27244
|
if (s === "cashapp" && !enableCashApp) return "main";
|
|
27245
|
+
if (s === "card" && enableFiatOnramp === false) return "main";
|
|
25098
27246
|
return s;
|
|
25099
|
-
}, [initialScreen, hideDepositTracker, enableCashApp]);
|
|
27247
|
+
}, [initialScreen, hideDepositTracker, enableCashApp, enableFiatOnramp]);
|
|
25100
27248
|
const [containerEl, setContainerEl] = useState31(null);
|
|
25101
27249
|
const containerCallbackRef = useCallback52((el) => {
|
|
25102
27250
|
setContainerEl(el);
|
|
@@ -25212,6 +27360,13 @@ function DepositModal({
|
|
|
25212
27360
|
enabled: open
|
|
25213
27361
|
});
|
|
25214
27362
|
const showPayWithExchange = enablePayWithExchange ?? projectConfig?.pay_with_exchange?.enabled ?? true;
|
|
27363
|
+
const showFiatOnramp = enableFiatOnramp ?? projectConfig?.fiat_onramp?.enabled ?? true;
|
|
27364
|
+
useEffect25(() => {
|
|
27365
|
+
if (view === "card" && !showFiatOnramp) {
|
|
27366
|
+
setView("main");
|
|
27367
|
+
setCardView("amount");
|
|
27368
|
+
}
|
|
27369
|
+
}, [view, showFiatOnramp]);
|
|
25215
27370
|
const { exchanges, isLoading: exchangesLoading } = useExchanges({
|
|
25216
27371
|
publishableKey,
|
|
25217
27372
|
enabled: open && showPayWithExchange
|
|
@@ -25521,7 +27676,7 @@ function DepositModal({
|
|
|
25521
27676
|
featuredWallets: projectConfig?.connect_wallet?.wallets
|
|
25522
27677
|
}
|
|
25523
27678
|
),
|
|
25524
|
-
/* @__PURE__ */ jsx55(
|
|
27679
|
+
showFiatOnramp && /* @__PURE__ */ jsx55(
|
|
25525
27680
|
DepositWithCardButton,
|
|
25526
27681
|
{
|
|
25527
27682
|
onClick: () => setView("card"),
|
|
@@ -26660,7 +28815,7 @@ function useExecutions(userId, publishableKey, options) {
|
|
|
26660
28815
|
});
|
|
26661
28816
|
}
|
|
26662
28817
|
var POLL_INTERVAL_MS3 = 2500;
|
|
26663
|
-
var POLL_ENDPOINT_INTERVAL_MS2 =
|
|
28818
|
+
var POLL_ENDPOINT_INTERVAL_MS2 = 5e3;
|
|
26664
28819
|
var CUTOFF_BUFFER_MS2 = 6e4;
|
|
26665
28820
|
function useWithdrawPolling({
|
|
26666
28821
|
userId,
|
|
@@ -28523,6 +30678,7 @@ function UnifoldProvider2({
|
|
|
28523
30678
|
transferInputVariant: config?.transferInputVariant,
|
|
28524
30679
|
enableConnectWallet: config?.enableConnectWallet,
|
|
28525
30680
|
enablePayWithExchange: config?.enablePayWithExchange,
|
|
30681
|
+
enableFiatOnramp: config?.enableFiatOnramp,
|
|
28526
30682
|
enableConnectExchange: config?.enableConnectExchange,
|
|
28527
30683
|
enableCashApp: config?.enableCashApp,
|
|
28528
30684
|
onDepositSuccess: handleDepositSuccess,
|