@unifold/connect-react 0.1.58 → 0.1.59

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.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@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
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@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
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@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
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@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
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@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
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@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-alert.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-check.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/clipboard-paste.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/hand.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/link-2.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/map-pin-off.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/shield.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/triangle-alert.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet-minimal.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/wallet.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
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@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
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._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
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+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
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._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
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._ttsd3lhl6vteekfa4w7yhzbari/node_modules/@radix-ui/react-primitive/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
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+_ww6fouyx2m6cwmjzqm53vz7gdi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
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@1_tfxcpqbhv4yeom5omze5oqyk7a/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
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.9_nk6ushapd5m5qcefseikyaidiq/node_modules/@radix-ui/react-portal/dist/index.mjs
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.2_lhxxu3bl2a5egptwobjoj75owm/node_modules/@radix-ui/react-presence/dist/index.mjs
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@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
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@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
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@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js
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@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js
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@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
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@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js
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@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
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@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
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@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
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@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js
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@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
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@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js
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@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
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@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js
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@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
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._c543yfkcelkno3idkccogkevua/node_modules/@radix-ui/react-dialog/dist/index.mjs
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
- ...actionType ? { action_type: actionType } : {}
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@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
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");
@@ -7397,6 +7397,2006 @@ import { jsx as jsx38 } from "react/jsx-runtime";
7397
7397
  import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
7398
7398
  import { Fragment as Fragment52, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
7399
7399
  import { useState as useState232, useMemo as useMemo62, useEffect as useEffect192 } from "react";
7400
+
7401
+ // ../../node_modules/.pnpm/fuse.js@7.4.0/node_modules/fuse.js/dist/fuse.mjs
7402
+ function isArray(value) {
7403
+ return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
7404
+ }
7405
+ function baseToString(value) {
7406
+ if (typeof value == "string") {
7407
+ return value;
7408
+ }
7409
+ if (typeof value === "bigint") {
7410
+ return value.toString();
7411
+ }
7412
+ const result = value + "";
7413
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
7414
+ }
7415
+ function toString(value) {
7416
+ return value == null ? "" : baseToString(value);
7417
+ }
7418
+ function isString(value) {
7419
+ return typeof value === "string";
7420
+ }
7421
+ function isNumber2(value) {
7422
+ return typeof value === "number";
7423
+ }
7424
+ function isBoolean(value) {
7425
+ return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
7426
+ }
7427
+ function isObject(value) {
7428
+ return typeof value === "object";
7429
+ }
7430
+ function isObjectLike(value) {
7431
+ return isObject(value) && value !== null;
7432
+ }
7433
+ function isDefined(value) {
7434
+ return value !== void 0 && value !== null;
7435
+ }
7436
+ function isBlank(value) {
7437
+ return !value.trim().length;
7438
+ }
7439
+ function getTag(value) {
7440
+ return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
7441
+ }
7442
+ var INCORRECT_INDEX_TYPE = "Incorrect 'index' type";
7443
+ var INVALID_DOC_INDEX = "Invalid doc index: must be a non-negative integer within the bounds of the docs array";
7444
+ var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`;
7445
+ var PATTERN_LENGTH_TOO_LARGE = (max2) => `Pattern length exceeds max of ${max2}.`;
7446
+ var MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;
7447
+ var INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`;
7448
+ 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.`;
7449
+ var hasOwn = Object.prototype.hasOwnProperty;
7450
+ var KeyStore = class {
7451
+ constructor(keys) {
7452
+ this._keys = [];
7453
+ this._keyMap = {};
7454
+ let totalWeight = 0;
7455
+ keys.forEach((key) => {
7456
+ const obj = createKey(key);
7457
+ this._keys.push(obj);
7458
+ this._keyMap[obj.id] = obj;
7459
+ totalWeight += obj.weight;
7460
+ });
7461
+ this._keys.forEach((key) => {
7462
+ key.weight /= totalWeight;
7463
+ });
7464
+ }
7465
+ get(keyId) {
7466
+ return this._keyMap[keyId];
7467
+ }
7468
+ keys() {
7469
+ return this._keys;
7470
+ }
7471
+ toJSON() {
7472
+ return JSON.stringify(this._keys);
7473
+ }
7474
+ };
7475
+ function createKey(key) {
7476
+ let path = null;
7477
+ let id = null;
7478
+ let src = null;
7479
+ let weight = 1;
7480
+ let getFn = null;
7481
+ if (isString(key) || isArray(key)) {
7482
+ src = key;
7483
+ path = createKeyPath(key);
7484
+ id = createKeyId(key);
7485
+ } else {
7486
+ if (!hasOwn.call(key, "name")) {
7487
+ throw new Error(MISSING_KEY_PROPERTY("name"));
7488
+ }
7489
+ const name = key.name;
7490
+ src = name;
7491
+ if (hasOwn.call(key, "weight") && key.weight !== void 0) {
7492
+ weight = key.weight;
7493
+ if (weight <= 0) {
7494
+ throw new Error(INVALID_KEY_WEIGHT_VALUE(createKeyId(name)));
7495
+ }
7496
+ }
7497
+ path = createKeyPath(name);
7498
+ id = createKeyId(name);
7499
+ getFn = key.getFn ?? null;
7500
+ }
7501
+ return {
7502
+ path,
7503
+ id,
7504
+ weight,
7505
+ src,
7506
+ getFn
7507
+ };
7508
+ }
7509
+ function createKeyPath(key) {
7510
+ return isArray(key) ? key : key.split(".");
7511
+ }
7512
+ function createKeyId(key) {
7513
+ return isArray(key) ? key.join(".") : key;
7514
+ }
7515
+ function get(obj, path) {
7516
+ const list = [];
7517
+ let arr = false;
7518
+ const deepGet = (obj2, path2, index2, arrayIndex) => {
7519
+ if (!isDefined(obj2)) {
7520
+ return;
7521
+ }
7522
+ if (!path2[index2]) {
7523
+ list.push(arrayIndex !== void 0 ? {
7524
+ v: obj2,
7525
+ i: arrayIndex
7526
+ } : obj2);
7527
+ } else {
7528
+ const key = path2[index2];
7529
+ const value = obj2[key];
7530
+ if (!isDefined(value)) {
7531
+ return;
7532
+ }
7533
+ if (index2 === path2.length - 1 && (isString(value) || isNumber2(value) || isBoolean(value) || typeof value === "bigint")) {
7534
+ list.push(arrayIndex !== void 0 ? {
7535
+ v: toString(value),
7536
+ i: arrayIndex
7537
+ } : toString(value));
7538
+ } else if (isArray(value)) {
7539
+ arr = true;
7540
+ for (let i = 0, len = value.length; i < len; i += 1) {
7541
+ deepGet(value[i], path2, index2 + 1, i);
7542
+ }
7543
+ } else if (path2.length) {
7544
+ deepGet(value, path2, index2 + 1, arrayIndex);
7545
+ }
7546
+ }
7547
+ };
7548
+ deepGet(obj, isString(path) ? path.split(".") : path, 0);
7549
+ return arr ? list : list[0];
7550
+ }
7551
+ var MatchOptions = {
7552
+ includeMatches: false,
7553
+ findAllMatches: false,
7554
+ minMatchCharLength: 1
7555
+ };
7556
+ var BasicOptions = {
7557
+ isCaseSensitive: false,
7558
+ ignoreDiacritics: false,
7559
+ includeScore: false,
7560
+ keys: [],
7561
+ shouldSort: true,
7562
+ sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1
7563
+ };
7564
+ var FuzzyOptions = {
7565
+ location: 0,
7566
+ threshold: 0.6,
7567
+ distance: 100
7568
+ };
7569
+ var AdvancedOptions = {
7570
+ useExtendedSearch: false,
7571
+ useTokenSearch: false,
7572
+ tokenize: void 0,
7573
+ tokenMatch: "any",
7574
+ getFn: get,
7575
+ ignoreLocation: false,
7576
+ ignoreFieldNorm: false,
7577
+ fieldNormWeight: 1
7578
+ };
7579
+ var Config = Object.freeze({
7580
+ ...BasicOptions,
7581
+ ...MatchOptions,
7582
+ ...FuzzyOptions,
7583
+ ...AdvancedOptions
7584
+ });
7585
+ function norm(weight = 1, mantissa = 3) {
7586
+ const cache = /* @__PURE__ */ new Map();
7587
+ const m = Math.pow(10, mantissa);
7588
+ return {
7589
+ get(value) {
7590
+ let numTokens = 1;
7591
+ let inSpace = false;
7592
+ for (let i = 0; i < value.length; i++) {
7593
+ if (value.charCodeAt(i) === 32) {
7594
+ if (!inSpace) {
7595
+ numTokens++;
7596
+ inSpace = true;
7597
+ }
7598
+ } else {
7599
+ inSpace = false;
7600
+ }
7601
+ }
7602
+ if (cache.has(numTokens)) {
7603
+ return cache.get(numTokens);
7604
+ }
7605
+ const n = Math.round(m / Math.pow(numTokens, 0.5 * weight)) / m;
7606
+ cache.set(numTokens, n);
7607
+ return n;
7608
+ },
7609
+ clear() {
7610
+ cache.clear();
7611
+ }
7612
+ };
7613
+ }
7614
+ var FuseIndex = class {
7615
+ constructor({
7616
+ getFn = Config.getFn,
7617
+ fieldNormWeight = Config.fieldNormWeight
7618
+ } = {}) {
7619
+ this.norm = norm(fieldNormWeight, 3);
7620
+ this.getFn = getFn;
7621
+ this.isCreated = false;
7622
+ this.docs = [];
7623
+ this.keys = [];
7624
+ this._keysMap = {};
7625
+ this.setIndexRecords();
7626
+ }
7627
+ setSources(docs = []) {
7628
+ this.docs = docs;
7629
+ }
7630
+ setIndexRecords(records = []) {
7631
+ this.records = records;
7632
+ }
7633
+ setKeys(keys = []) {
7634
+ this.keys = keys;
7635
+ this._keysMap = {};
7636
+ keys.forEach((key, idx) => {
7637
+ this._keysMap[key.id] = idx;
7638
+ });
7639
+ }
7640
+ create() {
7641
+ if (this.isCreated || !this.docs.length) {
7642
+ return;
7643
+ }
7644
+ this.isCreated = true;
7645
+ const len = this.docs.length;
7646
+ this.records = new Array(len);
7647
+ let recordCount = 0;
7648
+ if (isString(this.docs[0])) {
7649
+ for (let i = 0; i < len; i++) {
7650
+ const record = this._createStringRecord(this.docs[i], i);
7651
+ if (record) {
7652
+ this.records[recordCount++] = record;
7653
+ }
7654
+ }
7655
+ } else {
7656
+ for (let i = 0; i < len; i++) {
7657
+ this.records[recordCount++] = this._createObjectRecord(this.docs[i], i);
7658
+ }
7659
+ }
7660
+ this.records.length = recordCount;
7661
+ this.norm.clear();
7662
+ }
7663
+ // Appends a record for `doc` at `docIndex` (the doc's position in the source
7664
+ // array). Returns the appended record, or null when `doc` is a blank string
7665
+ // (those are skipped at record creation; see `_createStringRecord`). Callers
7666
+ // use the return value to gate downstream bookkeeping like the inverted
7667
+ // index, which must not be touched when no record was produced.
7668
+ add(doc, docIndex) {
7669
+ if (!Number.isInteger(docIndex) || docIndex < 0) {
7670
+ throw new Error(INVALID_DOC_INDEX);
7671
+ }
7672
+ if (isString(doc)) {
7673
+ const record2 = this._createStringRecord(doc, docIndex);
7674
+ if (record2) {
7675
+ this.records.push(record2);
7676
+ }
7677
+ return record2;
7678
+ }
7679
+ const record = this._createObjectRecord(doc, docIndex);
7680
+ this.records.push(record);
7681
+ return record;
7682
+ }
7683
+ // Removes the record for the doc at the specified source-array (docs) index.
7684
+ // Blank string docs have no record; callers may pass such an index and the
7685
+ // splice is a no-op, but subsequent records still need their .i decremented
7686
+ // to track the docs array that the caller is splicing in parallel.
7687
+ removeAt(idx) {
7688
+ if (!Number.isInteger(idx) || idx < 0) {
7689
+ throw new Error(INVALID_DOC_INDEX);
7690
+ }
7691
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7692
+ if (this.records[i].i === idx) {
7693
+ this.records.splice(i, 1);
7694
+ break;
7695
+ }
7696
+ }
7697
+ for (let i = 0, len = this.records.length; i < len; i += 1) {
7698
+ if (this.records[i].i > idx) {
7699
+ this.records[i].i -= 1;
7700
+ }
7701
+ }
7702
+ }
7703
+ // Removes records for the docs at the specified source-array indices, then
7704
+ // shifts every surviving record's .i down by the count of removed indices
7705
+ // strictly less than it (mirrors removeAndShiftInvertedIndex's shift math).
7706
+ // Invalid entries (non-integer, negative) in `indices` are dropped silently
7707
+ // — removeAll's natural use case is "caller passed a list of matched doc
7708
+ // indices"; asymmetric throw-vs-no-op would be more surprising than a clean
7709
+ // filter.
7710
+ removeAll(indices) {
7711
+ const toRemove = /* @__PURE__ */ new Set();
7712
+ for (const v of indices) {
7713
+ if (Number.isInteger(v) && v >= 0) {
7714
+ toRemove.add(v);
7715
+ }
7716
+ }
7717
+ if (toRemove.size === 0) {
7718
+ return;
7719
+ }
7720
+ this.records = this.records.filter((r2) => !toRemove.has(r2.i));
7721
+ const sorted = Array.from(toRemove).sort((a, b) => a - b);
7722
+ for (const record of this.records) {
7723
+ let lo = 0;
7724
+ let hi = sorted.length;
7725
+ while (lo < hi) {
7726
+ const mid = lo + hi >>> 1;
7727
+ if (sorted[mid] < record.i) lo = mid + 1;
7728
+ else hi = mid;
7729
+ }
7730
+ record.i -= lo;
7731
+ }
7732
+ }
7733
+ getValueForItemAtKeyId(item, keyId) {
7734
+ return item[this._keysMap[keyId]];
7735
+ }
7736
+ size() {
7737
+ return this.records.length;
7738
+ }
7739
+ _createStringRecord(doc, docIndex) {
7740
+ if (!isDefined(doc) || isBlank(doc)) {
7741
+ return null;
7742
+ }
7743
+ return {
7744
+ v: doc,
7745
+ i: docIndex,
7746
+ n: this.norm.get(doc)
7747
+ };
7748
+ }
7749
+ _createObjectRecord(doc, docIndex) {
7750
+ const record = {
7751
+ i: docIndex,
7752
+ $: {}
7753
+ };
7754
+ for (let keyIndex = 0, keyLen = this.keys.length; keyIndex < keyLen; keyIndex++) {
7755
+ const key = this.keys[keyIndex];
7756
+ const value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);
7757
+ if (!isDefined(value)) {
7758
+ continue;
7759
+ }
7760
+ if (isArray(value)) {
7761
+ const subRecords = [];
7762
+ for (let i = 0, len = value.length; i < len; i += 1) {
7763
+ const item = value[i];
7764
+ if (!isDefined(item)) {
7765
+ continue;
7766
+ }
7767
+ if (isString(item)) {
7768
+ if (!isBlank(item)) {
7769
+ const subRecord = {
7770
+ v: item,
7771
+ i,
7772
+ n: this.norm.get(item)
7773
+ };
7774
+ subRecords.push(subRecord);
7775
+ }
7776
+ } else if (isDefined(item.v)) {
7777
+ const text = isString(item.v) ? item.v : toString(item.v);
7778
+ if (!isBlank(text)) {
7779
+ const subRecord = {
7780
+ v: text,
7781
+ i: item.i,
7782
+ n: this.norm.get(text)
7783
+ };
7784
+ subRecords.push(subRecord);
7785
+ }
7786
+ }
7787
+ }
7788
+ record.$[keyIndex] = subRecords;
7789
+ } else if (isString(value) && !isBlank(value)) {
7790
+ const subRecord = {
7791
+ v: value,
7792
+ n: this.norm.get(value)
7793
+ };
7794
+ record.$[keyIndex] = subRecord;
7795
+ }
7796
+ }
7797
+ return record;
7798
+ }
7799
+ toJSON() {
7800
+ return {
7801
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7802
+ keys: this.keys.map(({
7803
+ getFn,
7804
+ ...key
7805
+ }) => key),
7806
+ records: this.records
7807
+ };
7808
+ }
7809
+ };
7810
+ function createIndex(keys, docs, {
7811
+ getFn = Config.getFn,
7812
+ fieldNormWeight = Config.fieldNormWeight
7813
+ } = {}) {
7814
+ const myIndex = new FuseIndex({
7815
+ getFn,
7816
+ fieldNormWeight
7817
+ });
7818
+ myIndex.setKeys(keys.map(createKey));
7819
+ myIndex.setSources(docs);
7820
+ myIndex.create();
7821
+ return myIndex;
7822
+ }
7823
+ function parseIndex(data, {
7824
+ getFn = Config.getFn,
7825
+ fieldNormWeight = Config.fieldNormWeight
7826
+ } = {}) {
7827
+ const {
7828
+ keys,
7829
+ records
7830
+ } = data;
7831
+ const myIndex = new FuseIndex({
7832
+ getFn,
7833
+ fieldNormWeight
7834
+ });
7835
+ myIndex.setKeys(keys);
7836
+ myIndex.setIndexRecords(records);
7837
+ return myIndex;
7838
+ }
7839
+ function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) {
7840
+ const indices = [];
7841
+ let start = -1;
7842
+ let end = -1;
7843
+ let i = 0;
7844
+ for (let len = matchmask.length; i < len; i += 1) {
7845
+ const match = matchmask[i];
7846
+ if (match && start === -1) {
7847
+ start = i;
7848
+ } else if (!match && start !== -1) {
7849
+ end = i - 1;
7850
+ if (end - start + 1 >= minMatchCharLength) {
7851
+ indices.push([start, end]);
7852
+ }
7853
+ start = -1;
7854
+ }
7855
+ }
7856
+ if (matchmask[i - 1] && i - start >= minMatchCharLength) {
7857
+ indices.push([start, i - 1]);
7858
+ }
7859
+ return indices;
7860
+ }
7861
+ var MAX_BITS = 32;
7862
+ function search(text, pattern, patternAlphabet, {
7863
+ location = Config.location,
7864
+ distance = Config.distance,
7865
+ threshold = Config.threshold,
7866
+ findAllMatches = Config.findAllMatches,
7867
+ minMatchCharLength = Config.minMatchCharLength,
7868
+ includeMatches = Config.includeMatches,
7869
+ ignoreLocation = Config.ignoreLocation
7870
+ } = {}) {
7871
+ if (pattern.length > MAX_BITS) {
7872
+ throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));
7873
+ }
7874
+ const patternLen = pattern.length;
7875
+ const textLen = text.length;
7876
+ const expectedLocation = Math.max(0, Math.min(location, textLen));
7877
+ let currentThreshold = threshold;
7878
+ let bestLocation = expectedLocation;
7879
+ const calcScore = (errors, currentLocation) => {
7880
+ const accuracy = errors / patternLen;
7881
+ if (ignoreLocation) return accuracy;
7882
+ const proximity = Math.abs(expectedLocation - currentLocation);
7883
+ if (!distance) return proximity ? 1 : accuracy;
7884
+ return accuracy + proximity / distance;
7885
+ };
7886
+ const computeMatches = minMatchCharLength > 1 || includeMatches;
7887
+ const matchMask = computeMatches ? Array(textLen) : [];
7888
+ let index2;
7889
+ while ((index2 = text.indexOf(pattern, bestLocation)) > -1) {
7890
+ const score = calcScore(0, index2);
7891
+ currentThreshold = Math.min(score, currentThreshold);
7892
+ bestLocation = index2 + patternLen;
7893
+ if (computeMatches) {
7894
+ let i = 0;
7895
+ while (i < patternLen) {
7896
+ matchMask[index2 + i] = 1;
7897
+ i += 1;
7898
+ }
7899
+ }
7900
+ }
7901
+ bestLocation = -1;
7902
+ let lastBitArr = [];
7903
+ let finalScore = 1;
7904
+ let bestErrors = 0;
7905
+ let binMax = patternLen + textLen;
7906
+ const mask = 1 << patternLen - 1;
7907
+ for (let i = 0; i < patternLen; i += 1) {
7908
+ let binMin = 0;
7909
+ let binMid = binMax;
7910
+ while (binMin < binMid) {
7911
+ const score2 = calcScore(i, expectedLocation + binMid);
7912
+ if (score2 <= currentThreshold) {
7913
+ binMin = binMid;
7914
+ } else {
7915
+ binMax = binMid;
7916
+ }
7917
+ binMid = Math.floor((binMax - binMin) / 2 + binMin);
7918
+ }
7919
+ binMax = binMid;
7920
+ let start = Math.max(1, expectedLocation - binMid + 1);
7921
+ const finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;
7922
+ const bitArr = Array(finish + 2);
7923
+ bitArr[finish + 1] = (1 << i) - 1;
7924
+ for (let j = finish; j >= start; j -= 1) {
7925
+ const currentLocation = j - 1;
7926
+ const charMatch = patternAlphabet[text[currentLocation]];
7927
+ bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;
7928
+ if (i) {
7929
+ bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];
7930
+ }
7931
+ if (bitArr[j] & mask) {
7932
+ finalScore = calcScore(i, currentLocation);
7933
+ if (finalScore <= currentThreshold) {
7934
+ currentThreshold = finalScore;
7935
+ bestLocation = currentLocation;
7936
+ bestErrors = i;
7937
+ if (bestLocation <= expectedLocation) {
7938
+ break;
7939
+ }
7940
+ start = Math.max(1, 2 * expectedLocation - bestLocation);
7941
+ }
7942
+ }
7943
+ }
7944
+ const score = calcScore(i + 1, expectedLocation);
7945
+ if (score > currentThreshold) {
7946
+ break;
7947
+ }
7948
+ lastBitArr = bitArr;
7949
+ }
7950
+ if (computeMatches && bestLocation >= 0) {
7951
+ const matchEnd = Math.min(textLen - 1, bestLocation + patternLen - 1 + bestErrors);
7952
+ for (let k = bestLocation; k <= matchEnd; k += 1) {
7953
+ if (patternAlphabet[text[k]]) {
7954
+ matchMask[k] = 1;
7955
+ }
7956
+ }
7957
+ }
7958
+ const result = {
7959
+ isMatch: bestLocation >= 0,
7960
+ // Count exact matches (those with a score of 0) to be "almost" exact
7961
+ score: Math.max(1e-3, finalScore)
7962
+ };
7963
+ if (computeMatches) {
7964
+ const indices = convertMaskToIndices(matchMask, minMatchCharLength);
7965
+ if (!indices.length) {
7966
+ result.isMatch = false;
7967
+ } else if (includeMatches) {
7968
+ result.indices = indices;
7969
+ }
7970
+ }
7971
+ return result;
7972
+ }
7973
+ function createPatternAlphabet(pattern) {
7974
+ const mask = {};
7975
+ for (let i = 0, len = pattern.length; i < len; i += 1) {
7976
+ const char = pattern.charAt(i);
7977
+ mask[char] = (mask[char] || 0) | 1 << len - i - 1;
7978
+ }
7979
+ return mask;
7980
+ }
7981
+ function mergeIndices(indices) {
7982
+ if (indices.length <= 1) return indices;
7983
+ indices.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
7984
+ const merged = [indices[0]];
7985
+ for (let i = 1, len = indices.length; i < len; i += 1) {
7986
+ const last = merged[merged.length - 1];
7987
+ const curr = indices[i];
7988
+ if (curr[0] <= last[1] + 1) {
7989
+ last[1] = Math.max(last[1], curr[1]);
7990
+ } else {
7991
+ merged.push(curr);
7992
+ }
7993
+ }
7994
+ return merged;
7995
+ }
7996
+ var NON_DECOMPOSABLE_MAP = {
7997
+ "\u0142": "l",
7998
+ // ł
7999
+ "\u0141": "L",
8000
+ // Ł
8001
+ "\u0111": "d",
8002
+ // đ
8003
+ "\u0110": "D",
8004
+ // Đ
8005
+ "\xF8": "o",
8006
+ // ø
8007
+ "\xD8": "O",
8008
+ // Ø
8009
+ "\u0127": "h",
8010
+ // ħ
8011
+ "\u0126": "H",
8012
+ // Ħ
8013
+ "\u0167": "t",
8014
+ // ŧ
8015
+ "\u0166": "T",
8016
+ // Ŧ
8017
+ "\u0131": "i",
8018
+ // ı
8019
+ "\xDF": "ss"
8020
+ // ß
8021
+ };
8022
+ var NON_DECOMPOSABLE_RE = new RegExp("[" + Object.keys(NON_DECOMPOSABLE_MAP).join("") + "]", "g");
8023
+ 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;
8024
+ var BitapSearch = class {
8025
+ constructor(pattern, {
8026
+ location = Config.location,
8027
+ threshold = Config.threshold,
8028
+ distance = Config.distance,
8029
+ includeMatches = Config.includeMatches,
8030
+ findAllMatches = Config.findAllMatches,
8031
+ minMatchCharLength = Config.minMatchCharLength,
8032
+ isCaseSensitive = Config.isCaseSensitive,
8033
+ ignoreDiacritics = Config.ignoreDiacritics,
8034
+ ignoreLocation = Config.ignoreLocation
8035
+ } = {}) {
8036
+ this.options = {
8037
+ location,
8038
+ threshold,
8039
+ distance,
8040
+ includeMatches,
8041
+ findAllMatches,
8042
+ minMatchCharLength,
8043
+ isCaseSensitive,
8044
+ ignoreDiacritics,
8045
+ ignoreLocation
8046
+ };
8047
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8048
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8049
+ this.pattern = pattern;
8050
+ this.chunks = [];
8051
+ if (!this.pattern.length) {
8052
+ return;
8053
+ }
8054
+ const addChunk = (pattern2, startIndex) => {
8055
+ this.chunks.push({
8056
+ pattern: pattern2,
8057
+ alphabet: createPatternAlphabet(pattern2),
8058
+ startIndex
8059
+ });
8060
+ };
8061
+ const len = this.pattern.length;
8062
+ if (len > MAX_BITS) {
8063
+ let i = 0;
8064
+ const remainder = len % MAX_BITS;
8065
+ const end = len - remainder;
8066
+ while (i < end) {
8067
+ addChunk(this.pattern.substr(i, MAX_BITS), i);
8068
+ i += MAX_BITS;
8069
+ }
8070
+ if (remainder) {
8071
+ const startIndex = len - MAX_BITS;
8072
+ addChunk(this.pattern.substr(startIndex), startIndex);
8073
+ }
8074
+ } else {
8075
+ addChunk(this.pattern, 0);
8076
+ }
8077
+ }
8078
+ searchIn(text) {
8079
+ const {
8080
+ isCaseSensitive,
8081
+ ignoreDiacritics,
8082
+ includeMatches
8083
+ } = this.options;
8084
+ text = isCaseSensitive ? text : text.toLowerCase();
8085
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8086
+ if (this.pattern === text) {
8087
+ const result2 = {
8088
+ isMatch: true,
8089
+ score: 0
8090
+ };
8091
+ if (includeMatches) {
8092
+ result2.indices = [[0, text.length - 1]];
8093
+ }
8094
+ return result2;
8095
+ }
8096
+ const {
8097
+ location,
8098
+ distance,
8099
+ threshold,
8100
+ findAllMatches,
8101
+ minMatchCharLength,
8102
+ ignoreLocation
8103
+ } = this.options;
8104
+ const allIndices = [];
8105
+ let totalScore = 0;
8106
+ let hasMatches = false;
8107
+ this.chunks.forEach(({
8108
+ pattern,
8109
+ alphabet,
8110
+ startIndex
8111
+ }) => {
8112
+ const {
8113
+ isMatch,
8114
+ score,
8115
+ indices
8116
+ } = search(text, pattern, alphabet, {
8117
+ location: location + startIndex,
8118
+ distance,
8119
+ threshold,
8120
+ findAllMatches,
8121
+ minMatchCharLength,
8122
+ includeMatches,
8123
+ ignoreLocation
8124
+ });
8125
+ if (isMatch) {
8126
+ hasMatches = true;
8127
+ }
8128
+ totalScore += score;
8129
+ if (isMatch && indices) {
8130
+ allIndices.push(...indices);
8131
+ }
8132
+ });
8133
+ const result = {
8134
+ isMatch: hasMatches,
8135
+ score: hasMatches ? totalScore / this.chunks.length : 1
8136
+ };
8137
+ if (hasMatches && includeMatches) {
8138
+ result.indices = mergeIndices(allIndices);
8139
+ }
8140
+ return result;
8141
+ }
8142
+ };
8143
+ var MULTI_MATCH_TYPES = /* @__PURE__ */ new Set(["fuzzy", "include"]);
8144
+ function isInverse(type) {
8145
+ return type.startsWith("inverse");
8146
+ }
8147
+ var matchers = [
8148
+ // =term — exact match
8149
+ {
8150
+ type: "exact",
8151
+ multiRegex: /^="(.*)"$/,
8152
+ singleRegex: /^=(.*)$/,
8153
+ create: (pattern) => ({
8154
+ type: "exact",
8155
+ search(text) {
8156
+ const isMatch = text === pattern;
8157
+ return {
8158
+ isMatch,
8159
+ score: isMatch ? 0 : 1,
8160
+ indices: [0, pattern.length - 1]
8161
+ };
8162
+ }
8163
+ })
8164
+ },
8165
+ // 'term — include (substring) match
8166
+ {
8167
+ type: "include",
8168
+ multiRegex: /^'"(.*)"$/,
8169
+ singleRegex: /^'(.*)$/,
8170
+ create: (pattern) => ({
8171
+ type: "include",
8172
+ search(text) {
8173
+ let location = 0;
8174
+ let index2;
8175
+ const indices = [];
8176
+ const patternLen = pattern.length;
8177
+ while ((index2 = text.indexOf(pattern, location)) > -1) {
8178
+ location = index2 + patternLen;
8179
+ indices.push([index2, location - 1]);
8180
+ }
8181
+ const isMatch = !!indices.length;
8182
+ return {
8183
+ isMatch,
8184
+ score: isMatch ? 0 : 1,
8185
+ indices
8186
+ };
8187
+ }
8188
+ })
8189
+ },
8190
+ // ^term — prefix match
8191
+ {
8192
+ type: "prefix-exact",
8193
+ multiRegex: /^\^"(.*)"$/,
8194
+ singleRegex: /^\^(.*)$/,
8195
+ create: (pattern) => ({
8196
+ type: "prefix-exact",
8197
+ search(text) {
8198
+ const isMatch = text.startsWith(pattern);
8199
+ return {
8200
+ isMatch,
8201
+ score: isMatch ? 0 : 1,
8202
+ indices: [0, pattern.length - 1]
8203
+ };
8204
+ }
8205
+ })
8206
+ },
8207
+ // !^term — inverse prefix match
8208
+ {
8209
+ type: "inverse-prefix-exact",
8210
+ multiRegex: /^!\^"(.*)"$/,
8211
+ singleRegex: /^!\^(.*)$/,
8212
+ create: (pattern) => ({
8213
+ type: "inverse-prefix-exact",
8214
+ search(text) {
8215
+ const isMatch = !text.startsWith(pattern);
8216
+ return {
8217
+ isMatch,
8218
+ score: isMatch ? 0 : 1,
8219
+ indices: [0, text.length - 1]
8220
+ };
8221
+ }
8222
+ })
8223
+ },
8224
+ // !term$ — inverse suffix match
8225
+ {
8226
+ type: "inverse-suffix-exact",
8227
+ multiRegex: /^!"(.*)"\$$/,
8228
+ singleRegex: /^!(.*)\$$/,
8229
+ create: (pattern) => ({
8230
+ type: "inverse-suffix-exact",
8231
+ search(text) {
8232
+ const isMatch = !text.endsWith(pattern);
8233
+ return {
8234
+ isMatch,
8235
+ score: isMatch ? 0 : 1,
8236
+ indices: [0, text.length - 1]
8237
+ };
8238
+ }
8239
+ })
8240
+ },
8241
+ // term$ — suffix match
8242
+ {
8243
+ type: "suffix-exact",
8244
+ multiRegex: /^"(.*)"\$$/,
8245
+ singleRegex: /^(.*)\$$/,
8246
+ create: (pattern) => ({
8247
+ type: "suffix-exact",
8248
+ search(text) {
8249
+ const isMatch = text.endsWith(pattern);
8250
+ return {
8251
+ isMatch,
8252
+ score: isMatch ? 0 : 1,
8253
+ indices: [text.length - pattern.length, text.length - 1]
8254
+ };
8255
+ }
8256
+ })
8257
+ },
8258
+ // !term — inverse exact (does not contain)
8259
+ {
8260
+ type: "inverse-exact",
8261
+ multiRegex: /^!"(.*)"$/,
8262
+ singleRegex: /^!(.*)$/,
8263
+ create: (pattern) => ({
8264
+ type: "inverse-exact",
8265
+ search(text) {
8266
+ const isMatch = text.indexOf(pattern) === -1;
8267
+ return {
8268
+ isMatch,
8269
+ score: isMatch ? 0 : 1,
8270
+ indices: [0, text.length - 1]
8271
+ };
8272
+ }
8273
+ })
8274
+ },
8275
+ // term — fuzzy match (catch-all, must be last)
8276
+ {
8277
+ type: "fuzzy",
8278
+ multiRegex: /^"(.*)"$/,
8279
+ singleRegex: /^(.*)$/,
8280
+ create: (pattern, options = {}) => {
8281
+ const bitap = new BitapSearch(pattern, {
8282
+ location: options.location ?? Config.location,
8283
+ threshold: options.threshold ?? Config.threshold,
8284
+ distance: options.distance ?? Config.distance,
8285
+ includeMatches: options.includeMatches ?? Config.includeMatches,
8286
+ findAllMatches: options.findAllMatches ?? Config.findAllMatches,
8287
+ minMatchCharLength: options.minMatchCharLength ?? Config.minMatchCharLength,
8288
+ isCaseSensitive: options.isCaseSensitive ?? Config.isCaseSensitive,
8289
+ ignoreDiacritics: options.ignoreDiacritics ?? Config.ignoreDiacritics,
8290
+ ignoreLocation: options.ignoreLocation ?? Config.ignoreLocation
8291
+ });
8292
+ return {
8293
+ type: "fuzzy",
8294
+ search(text) {
8295
+ return bitap.searchIn(text);
8296
+ }
8297
+ };
8298
+ }
8299
+ }
8300
+ ];
8301
+ var matchersLen = matchers.length;
8302
+ var ESCAPED_PIPE = "\0";
8303
+ var OR_TOKEN = "|";
8304
+ function tokenize(pattern) {
8305
+ const tokens = [];
8306
+ const len = pattern.length;
8307
+ let i = 0;
8308
+ while (i < len) {
8309
+ while (i < len && pattern[i] === " ") i++;
8310
+ if (i >= len) break;
8311
+ let j = i;
8312
+ while (j < len && pattern[j] !== " " && pattern[j] !== '"') j++;
8313
+ if (j < len && pattern[j] === '"') {
8314
+ j++;
8315
+ while (j < len) {
8316
+ if (pattern[j] === '"') {
8317
+ const next = j + 1;
8318
+ if (next >= len || pattern[next] === " ") {
8319
+ j++;
8320
+ break;
8321
+ }
8322
+ if (pattern[next] === "$" && (next + 1 >= len || pattern[next + 1] === " ")) {
8323
+ j += 2;
8324
+ break;
8325
+ }
8326
+ }
8327
+ j++;
8328
+ }
8329
+ tokens.push(pattern.substring(i, j));
8330
+ i = j;
8331
+ } else {
8332
+ while (j < len && pattern[j] !== " ") j++;
8333
+ tokens.push(pattern.substring(i, j));
8334
+ i = j;
8335
+ }
8336
+ }
8337
+ return tokens;
8338
+ }
8339
+ function getMatch(pattern, exp) {
8340
+ const matches = pattern.match(exp);
8341
+ return matches ? matches[1] : null;
8342
+ }
8343
+ function parseQuery(pattern, options = {}) {
8344
+ const escaped = pattern.replace(/\\\|/g, ESCAPED_PIPE);
8345
+ return escaped.split(OR_TOKEN).map((item) => {
8346
+ const restored = item.replace(/\u0000/g, "|");
8347
+ const query = tokenize(restored.trim()).filter((item2) => item2 && !!item2.trim());
8348
+ const results = [];
8349
+ for (let i = 0, len = query.length; i < len; i += 1) {
8350
+ const queryItem = query[i];
8351
+ let found = false;
8352
+ let idx = -1;
8353
+ while (!found && ++idx < matchersLen) {
8354
+ const def = matchers[idx];
8355
+ const token = getMatch(queryItem, def.multiRegex);
8356
+ if (token) {
8357
+ results.push(def.create(token, options));
8358
+ found = true;
8359
+ }
8360
+ }
8361
+ if (found) {
8362
+ continue;
8363
+ }
8364
+ idx = -1;
8365
+ while (++idx < matchersLen) {
8366
+ const def = matchers[idx];
8367
+ const token = getMatch(queryItem, def.singleRegex);
8368
+ if (token) {
8369
+ results.push(def.create(token, options));
8370
+ break;
8371
+ }
8372
+ }
8373
+ }
8374
+ return results;
8375
+ });
8376
+ }
8377
+ var ExtendedSearch = class {
8378
+ constructor(pattern, {
8379
+ isCaseSensitive = Config.isCaseSensitive,
8380
+ ignoreDiacritics = Config.ignoreDiacritics,
8381
+ includeMatches = Config.includeMatches,
8382
+ minMatchCharLength = Config.minMatchCharLength,
8383
+ ignoreLocation = Config.ignoreLocation,
8384
+ findAllMatches = Config.findAllMatches,
8385
+ location = Config.location,
8386
+ threshold = Config.threshold,
8387
+ distance = Config.distance
8388
+ } = {}) {
8389
+ this.query = null;
8390
+ this.options = {
8391
+ isCaseSensitive,
8392
+ ignoreDiacritics,
8393
+ includeMatches,
8394
+ minMatchCharLength,
8395
+ findAllMatches,
8396
+ ignoreLocation,
8397
+ location,
8398
+ threshold,
8399
+ distance
8400
+ };
8401
+ pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
8402
+ pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
8403
+ this.pattern = pattern;
8404
+ this.query = parseQuery(this.pattern, this.options);
8405
+ }
8406
+ static condition(_, options) {
8407
+ return options.useExtendedSearch;
8408
+ }
8409
+ // Note: searchIn operates on a single text value and sets hasInverse on the
8410
+ // result when inverse patterns are involved. _searchObjectList uses this to
8411
+ // switch from "ANY key" to "ALL keys" aggregation. See #712.
8412
+ searchIn(text) {
8413
+ const query = this.query;
8414
+ if (!query) {
8415
+ return {
8416
+ isMatch: false,
8417
+ score: 1
8418
+ };
8419
+ }
8420
+ const {
8421
+ includeMatches,
8422
+ isCaseSensitive,
8423
+ ignoreDiacritics
8424
+ } = this.options;
8425
+ text = isCaseSensitive ? text : text.toLowerCase();
8426
+ text = ignoreDiacritics ? stripDiacritics(text) : text;
8427
+ let numMatches = 0;
8428
+ const allIndices = [];
8429
+ let totalScore = 0;
8430
+ let hasInverse = false;
8431
+ for (let i = 0, qLen = query.length; i < qLen; i += 1) {
8432
+ const searchers = query[i];
8433
+ allIndices.length = 0;
8434
+ numMatches = 0;
8435
+ hasInverse = false;
8436
+ for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
8437
+ const matcher = searchers[j];
8438
+ const {
8439
+ isMatch,
8440
+ indices,
8441
+ score
8442
+ } = matcher.search(text);
8443
+ if (isMatch) {
8444
+ numMatches += 1;
8445
+ totalScore += score;
8446
+ if (isInverse(matcher.type)) {
8447
+ hasInverse = true;
8448
+ }
8449
+ if (includeMatches) {
8450
+ if (MULTI_MATCH_TYPES.has(matcher.type)) {
8451
+ allIndices.push(...indices);
8452
+ } else {
8453
+ allIndices.push(indices);
8454
+ }
8455
+ }
8456
+ } else {
8457
+ totalScore = 0;
8458
+ numMatches = 0;
8459
+ allIndices.length = 0;
8460
+ hasInverse = false;
8461
+ break;
8462
+ }
8463
+ }
8464
+ if (numMatches) {
8465
+ const result = {
8466
+ isMatch: true,
8467
+ score: totalScore / numMatches
8468
+ };
8469
+ if (hasInverse) {
8470
+ result.hasInverse = true;
8471
+ }
8472
+ if (includeMatches) {
8473
+ result.indices = mergeIndices(allIndices);
8474
+ }
8475
+ return result;
8476
+ }
8477
+ }
8478
+ return {
8479
+ isMatch: false,
8480
+ score: 1
8481
+ };
8482
+ }
8483
+ };
8484
+ var registeredSearchers = [];
8485
+ function register(...args) {
8486
+ registeredSearchers.push(...args);
8487
+ }
8488
+ function createSearcher(pattern, options) {
8489
+ for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
8490
+ const searcherClass = registeredSearchers[i];
8491
+ if (searcherClass.condition(pattern, options)) {
8492
+ return new searcherClass(pattern, options);
8493
+ }
8494
+ }
8495
+ return new BitapSearch(pattern, options);
8496
+ }
8497
+ var LogicalOperator = {
8498
+ AND: "$and",
8499
+ OR: "$or"
8500
+ };
8501
+ var KeyType = {
8502
+ PATH: "$path",
8503
+ PATTERN: "$val"
8504
+ };
8505
+ var isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
8506
+ var isPath = (query) => !!query[KeyType.PATH];
8507
+ var isLeaf = (query) => !isArray(query) && isObject(query) && !isExpression(query);
8508
+ var convertToExplicit = (query) => ({
8509
+ [LogicalOperator.AND]: Object.keys(query).map((key) => ({
8510
+ [key]: query[key]
8511
+ }))
8512
+ });
8513
+ function parse2(query, options, {
8514
+ auto = true
8515
+ } = {}) {
8516
+ const next = (query2) => {
8517
+ if (isString(query2)) {
8518
+ const obj = {
8519
+ keyId: null,
8520
+ pattern: query2
8521
+ };
8522
+ if (auto) {
8523
+ obj.searcher = createSearcher(query2, options);
8524
+ }
8525
+ return obj;
8526
+ }
8527
+ const keys = Object.keys(query2);
8528
+ const isQueryPath = isPath(query2);
8529
+ if (!isQueryPath && keys.length > 1 && !isExpression(query2)) {
8530
+ return next(convertToExplicit(query2));
8531
+ }
8532
+ if (isLeaf(query2)) {
8533
+ const key = isQueryPath ? query2[KeyType.PATH] : keys[0];
8534
+ const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key];
8535
+ if (!isString(pattern)) {
8536
+ throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
8537
+ }
8538
+ const obj = {
8539
+ keyId: createKeyId(key),
8540
+ pattern
8541
+ };
8542
+ if (auto) {
8543
+ obj.searcher = createSearcher(pattern, options);
8544
+ }
8545
+ return obj;
8546
+ }
8547
+ const node = {
8548
+ children: [],
8549
+ operator: keys[0]
8550
+ };
8551
+ keys.forEach((key) => {
8552
+ const value = query2[key];
8553
+ if (isArray(value)) {
8554
+ value.forEach((item) => {
8555
+ node.children.push(next(item));
8556
+ });
8557
+ }
8558
+ });
8559
+ return node;
8560
+ };
8561
+ if (!isExpression(query)) {
8562
+ query = convertToExplicit(query);
8563
+ }
8564
+ return next(query);
8565
+ }
8566
+ function computeScoreSingle(matches, {
8567
+ ignoreFieldNorm = Config.ignoreFieldNorm
8568
+ }) {
8569
+ let totalScore = 1;
8570
+ matches.forEach(({
8571
+ key,
8572
+ norm: norm2,
8573
+ score
8574
+ }) => {
8575
+ const weight = key ? key.weight : null;
8576
+ totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm2));
8577
+ });
8578
+ return totalScore;
8579
+ }
8580
+ function computeScore(results, {
8581
+ ignoreFieldNorm = Config.ignoreFieldNorm
8582
+ }) {
8583
+ results.forEach((result) => {
8584
+ result.score = computeScoreSingle(result.matches, {
8585
+ ignoreFieldNorm
8586
+ });
8587
+ });
8588
+ }
8589
+ var MaxHeap = class {
8590
+ constructor(limit) {
8591
+ this.limit = limit;
8592
+ this.heap = [];
8593
+ }
8594
+ get size() {
8595
+ return this.heap.length;
8596
+ }
8597
+ shouldInsert(score) {
8598
+ return this.size < this.limit || score < this.heap[0].score;
8599
+ }
8600
+ insert(item) {
8601
+ if (this.size < this.limit) {
8602
+ this.heap.push(item);
8603
+ this._bubbleUp(this.size - 1);
8604
+ } else if (item.score < this.heap[0].score) {
8605
+ this.heap[0] = item;
8606
+ this._sinkDown(0);
8607
+ }
8608
+ }
8609
+ extractSorted(sortFn) {
8610
+ return this.heap.sort(sortFn);
8611
+ }
8612
+ _bubbleUp(i) {
8613
+ const heap = this.heap;
8614
+ while (i > 0) {
8615
+ const parent = i - 1 >> 1;
8616
+ if (heap[i].score <= heap[parent].score) break;
8617
+ const tmp = heap[i];
8618
+ heap[i] = heap[parent];
8619
+ heap[parent] = tmp;
8620
+ i = parent;
8621
+ }
8622
+ }
8623
+ _sinkDown(i) {
8624
+ const heap = this.heap;
8625
+ const len = heap.length;
8626
+ let largest = i;
8627
+ do {
8628
+ i = largest;
8629
+ const left = 2 * i + 1;
8630
+ const right = 2 * i + 2;
8631
+ if (left < len && heap[left].score > heap[largest].score) {
8632
+ largest = left;
8633
+ }
8634
+ if (right < len && heap[right].score > heap[largest].score) {
8635
+ largest = right;
8636
+ }
8637
+ if (largest !== i) {
8638
+ const tmp = heap[i];
8639
+ heap[i] = heap[largest];
8640
+ heap[largest] = tmp;
8641
+ }
8642
+ } while (largest !== i);
8643
+ }
8644
+ };
8645
+ function formatMatches(result) {
8646
+ const matches = [];
8647
+ result.matches.forEach((match) => {
8648
+ if (!isDefined(match.indices) || !match.indices.length) {
8649
+ return;
8650
+ }
8651
+ const obj = {
8652
+ indices: match.indices,
8653
+ value: match.value
8654
+ };
8655
+ if (match.key) {
8656
+ obj.key = match.key.id;
8657
+ }
8658
+ if (match.idx > -1) {
8659
+ obj.refIndex = match.idx;
8660
+ }
8661
+ matches.push(obj);
8662
+ });
8663
+ return matches;
8664
+ }
8665
+ function format(results, docs, {
8666
+ includeMatches = Config.includeMatches,
8667
+ includeScore = Config.includeScore
8668
+ } = {}) {
8669
+ return results.map((result) => {
8670
+ const {
8671
+ idx
8672
+ } = result;
8673
+ const data = {
8674
+ item: docs[idx],
8675
+ refIndex: idx
8676
+ };
8677
+ if (includeMatches) data.matches = formatMatches(result);
8678
+ if (includeScore) data.score = result.score;
8679
+ return data;
8680
+ });
8681
+ }
8682
+ var DEFAULT_TOKEN = /[\p{L}\p{M}\p{N}_]+/gu;
8683
+ var warned = /* @__PURE__ */ new WeakSet();
8684
+ function warnNonGlobal(regex) {
8685
+ if (!warned.has(regex)) {
8686
+ warned.add(regex);
8687
+ console.warn(`[Fuse] tokenize regex ${regex} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`);
8688
+ }
8689
+ }
8690
+ function resolveTokenize(tokenize2) {
8691
+ if (typeof tokenize2 === "function") {
8692
+ let validated = false;
8693
+ return (text) => {
8694
+ const result = tokenize2(text);
8695
+ if (!validated) {
8696
+ validated = true;
8697
+ if (!Array.isArray(result) || result.some((t12) => typeof t12 !== "string")) {
8698
+ throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(result) ? "array containing non-strings" : typeof result}.`);
8699
+ }
8700
+ }
8701
+ return result;
8702
+ };
8703
+ }
8704
+ if (tokenize2 instanceof RegExp) {
8705
+ if (!tokenize2.global) warnNonGlobal(tokenize2);
8706
+ return (text) => text.match(tokenize2) || [];
8707
+ }
8708
+ return (text) => text.match(DEFAULT_TOKEN) || [];
8709
+ }
8710
+ function createAnalyzer({
8711
+ isCaseSensitive = false,
8712
+ ignoreDiacritics = false,
8713
+ tokenize: tokenize2
8714
+ } = {}) {
8715
+ const tokenizeFn = resolveTokenize(tokenize2);
8716
+ return {
8717
+ tokenize(text) {
8718
+ if (!isCaseSensitive) {
8719
+ text = text.toLowerCase();
8720
+ }
8721
+ if (ignoreDiacritics) {
8722
+ text = stripDiacritics(text);
8723
+ }
8724
+ return tokenizeFn(text);
8725
+ }
8726
+ };
8727
+ }
8728
+ var MAX_MASK_TERMS = 31;
8729
+ var TokenSearch = class {
8730
+ // `tokenMatch: 'all'` (AND) coverage. When true, searchIn reports which
8731
+ // query terms matched each text so the core loop can require record-level
8732
+ // coverage of every term. Bitmask is the ≤31-term fast path; Set is the
8733
+ // ≥32-term fallback (JS bitwise ops are 32-bit signed).
8734
+ static condition(_, options) {
8735
+ return options.useTokenSearch;
8736
+ }
8737
+ constructor(pattern, options) {
8738
+ this.options = options;
8739
+ this.analyzer = createAnalyzer({
8740
+ isCaseSensitive: options.isCaseSensitive,
8741
+ ignoreDiacritics: options.ignoreDiacritics,
8742
+ tokenize: options.tokenize
8743
+ });
8744
+ const queryTerms = this.analyzer.tokenize(pattern);
8745
+ const invertedIndex = options._invertedIndex;
8746
+ const {
8747
+ df,
8748
+ fieldCount
8749
+ } = invertedIndex;
8750
+ this.termSearchers = [];
8751
+ this.idfWeights = [];
8752
+ for (const term of queryTerms) {
8753
+ this.termSearchers.push(new BitapSearch(term, {
8754
+ location: options.location,
8755
+ threshold: options.threshold,
8756
+ distance: options.distance,
8757
+ includeMatches: options.includeMatches,
8758
+ findAllMatches: options.findAllMatches,
8759
+ minMatchCharLength: options.minMatchCharLength,
8760
+ isCaseSensitive: options.isCaseSensitive,
8761
+ ignoreDiacritics: options.ignoreDiacritics,
8762
+ ignoreLocation: true
8763
+ }));
8764
+ const docFreq = df.get(term) || 0;
8765
+ const idf = Math.log(1 + (fieldCount - docFreq + 0.5) / (docFreq + 0.5));
8766
+ this.idfWeights.push(idf);
8767
+ }
8768
+ this.combineAll = options.tokenMatch === "all";
8769
+ this.numTerms = this.termSearchers.length;
8770
+ this.useMask = this.numTerms <= MAX_MASK_TERMS;
8771
+ }
8772
+ searchIn(text) {
8773
+ if (!this.termSearchers.length) {
8774
+ return {
8775
+ isMatch: false,
8776
+ score: 1
8777
+ };
8778
+ }
8779
+ const allIndices = [];
8780
+ let weightedScore = 0;
8781
+ let maxPossibleScore = 0;
8782
+ let matchedCount = 0;
8783
+ let matchedMask = 0;
8784
+ const matchedTerms = this.combineAll && !this.useMask ? /* @__PURE__ */ new Set() : null;
8785
+ for (let i = 0; i < this.termSearchers.length; i++) {
8786
+ const result = this.termSearchers[i].searchIn(text);
8787
+ const idf = this.idfWeights[i];
8788
+ maxPossibleScore += idf;
8789
+ if (result.isMatch) {
8790
+ matchedCount++;
8791
+ weightedScore += idf * (1 - result.score);
8792
+ if (result.indices) {
8793
+ allIndices.push(...result.indices);
8794
+ }
8795
+ if (this.combineAll) {
8796
+ if (this.useMask) {
8797
+ matchedMask |= 1 << i;
8798
+ } else {
8799
+ matchedTerms.add(i);
8800
+ }
8801
+ }
8802
+ }
8803
+ }
8804
+ if (matchedCount === 0) {
8805
+ return {
8806
+ isMatch: false,
8807
+ score: 1
8808
+ };
8809
+ }
8810
+ const normalized = maxPossibleScore > 0 ? 1 - weightedScore / maxPossibleScore : 0;
8811
+ const searchResult = {
8812
+ isMatch: true,
8813
+ score: Math.max(1e-3, normalized)
8814
+ };
8815
+ if (this.options.includeMatches && allIndices.length) {
8816
+ searchResult.indices = mergeIndices(allIndices);
8817
+ }
8818
+ if (this.combineAll) {
8819
+ if (this.useMask) {
8820
+ searchResult.matchedMask = matchedMask;
8821
+ } else {
8822
+ searchResult.matchedTerms = matchedTerms;
8823
+ }
8824
+ searchResult.termCount = this.numTerms;
8825
+ }
8826
+ return searchResult;
8827
+ }
8828
+ };
8829
+ function addField(index2, text, docIdx, analyzer) {
8830
+ const tokens = analyzer.tokenize(text);
8831
+ if (!tokens.length) return;
8832
+ index2.fieldCount++;
8833
+ index2.docFieldCount.set(docIdx, (index2.docFieldCount.get(docIdx) || 0) + 1);
8834
+ const distinctTerms = new Set(tokens);
8835
+ let perDocTerms = index2.docTermFieldHits.get(docIdx);
8836
+ if (!perDocTerms) {
8837
+ perDocTerms = /* @__PURE__ */ new Map();
8838
+ index2.docTermFieldHits.set(docIdx, perDocTerms);
8839
+ }
8840
+ for (const term of distinctTerms) {
8841
+ perDocTerms.set(term, (perDocTerms.get(term) || 0) + 1);
8842
+ index2.df.set(term, (index2.df.get(term) || 0) + 1);
8843
+ }
8844
+ }
8845
+ function ingestRecord(index2, record, keyCount, analyzer) {
8846
+ const {
8847
+ i: docIdx,
8848
+ v,
8849
+ $: fields
8850
+ } = record;
8851
+ if (v !== void 0) {
8852
+ addField(index2, v, docIdx, analyzer);
8853
+ return;
8854
+ }
8855
+ if (!fields) return;
8856
+ for (let keyIdx = 0; keyIdx < keyCount; keyIdx++) {
8857
+ const value = fields[keyIdx];
8858
+ if (!value) continue;
8859
+ if (Array.isArray(value)) {
8860
+ for (const sub of value) addField(index2, sub.v, docIdx, analyzer);
8861
+ } else {
8862
+ addField(index2, value.v, docIdx, analyzer);
8863
+ }
8864
+ }
8865
+ }
8866
+ function buildInvertedIndex(records, keyCount, analyzer) {
8867
+ const index2 = {
8868
+ fieldCount: 0,
8869
+ df: /* @__PURE__ */ new Map(),
8870
+ docFieldCount: /* @__PURE__ */ new Map(),
8871
+ docTermFieldHits: /* @__PURE__ */ new Map()
8872
+ };
8873
+ for (const record of records) {
8874
+ ingestRecord(index2, record, keyCount, analyzer);
8875
+ }
8876
+ return index2;
8877
+ }
8878
+ function addToInvertedIndex(index2, record, keyCount, analyzer) {
8879
+ ingestRecord(index2, record, keyCount, analyzer);
8880
+ }
8881
+ function removeFromInvertedIndex(index2, docIdx) {
8882
+ const fieldCount = index2.docFieldCount.get(docIdx);
8883
+ if (fieldCount === void 0) return;
8884
+ index2.fieldCount -= fieldCount;
8885
+ index2.docFieldCount.delete(docIdx);
8886
+ const perDocTerms = index2.docTermFieldHits.get(docIdx);
8887
+ if (!perDocTerms) return;
8888
+ for (const [term, hits] of perDocTerms) {
8889
+ const next = (index2.df.get(term) || 0) - hits;
8890
+ if (next <= 0) {
8891
+ index2.df.delete(term);
8892
+ } else {
8893
+ index2.df.set(term, next);
8894
+ }
8895
+ }
8896
+ index2.docTermFieldHits.delete(docIdx);
8897
+ }
8898
+ function removeAndShiftInvertedIndex(index2, removedIndices) {
8899
+ if (removedIndices.length === 0) return;
8900
+ const sorted = Array.from(new Set(removedIndices)).sort((a, b) => a - b);
8901
+ for (const idx of sorted) {
8902
+ removeFromInvertedIndex(index2, idx);
8903
+ }
8904
+ const shift4 = (oldIdx) => {
8905
+ let lo = 0;
8906
+ let hi = sorted.length;
8907
+ while (lo < hi) {
8908
+ const mid = lo + hi >>> 1;
8909
+ if (sorted[mid] < oldIdx) lo = mid + 1;
8910
+ else hi = mid;
8911
+ }
8912
+ return oldIdx - lo;
8913
+ };
8914
+ const firstRemoved = sorted[0];
8915
+ const shiftedDocFieldCount = /* @__PURE__ */ new Map();
8916
+ for (const [oldKey, count3] of index2.docFieldCount) {
8917
+ shiftedDocFieldCount.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, count3);
8918
+ }
8919
+ index2.docFieldCount = shiftedDocFieldCount;
8920
+ const shiftedDocTermFieldHits = /* @__PURE__ */ new Map();
8921
+ for (const [oldKey, terms] of index2.docTermFieldHits) {
8922
+ shiftedDocTermFieldHits.set(oldKey > firstRemoved ? shift4(oldKey) : oldKey, terms);
8923
+ }
8924
+ index2.docTermFieldHits = shiftedDocTermFieldHits;
8925
+ }
8926
+ var Fuse = class {
8927
+ // Statics are assigned in entry.ts
8928
+ constructor(docs, options, index2) {
8929
+ this.options = {
8930
+ ...Config,
8931
+ ...options
8932
+ };
8933
+ if (this.options.useExtendedSearch && false) ;
8934
+ if (this.options.useTokenSearch && false) ;
8935
+ this._keyStore = new KeyStore(this.options.keys);
8936
+ this._docs = docs;
8937
+ this._myIndex = null;
8938
+ this._invertedIndex = null;
8939
+ this.setCollection(docs, index2);
8940
+ this._lastQuery = null;
8941
+ this._lastSearcher = null;
8942
+ }
8943
+ _getSearcher(query) {
8944
+ if (this._lastQuery === query) {
8945
+ return this._lastSearcher;
8946
+ }
8947
+ const opts = this._invertedIndex ? {
8948
+ ...this.options,
8949
+ _invertedIndex: this._invertedIndex
8950
+ } : this.options;
8951
+ const searcher = createSearcher(query, opts);
8952
+ this._lastQuery = query;
8953
+ this._lastSearcher = searcher;
8954
+ return searcher;
8955
+ }
8956
+ setCollection(docs, index2) {
8957
+ this._docs = docs;
8958
+ if (index2 && !(index2 instanceof FuseIndex)) {
8959
+ throw new Error(INCORRECT_INDEX_TYPE);
8960
+ }
8961
+ this._myIndex = index2 || createIndex(this.options.keys, this._docs, {
8962
+ getFn: this.options.getFn,
8963
+ fieldNormWeight: this.options.fieldNormWeight
8964
+ });
8965
+ if (this.options.useTokenSearch) {
8966
+ const analyzer = createAnalyzer({
8967
+ isCaseSensitive: this.options.isCaseSensitive,
8968
+ ignoreDiacritics: this.options.ignoreDiacritics,
8969
+ tokenize: this.options.tokenize
8970
+ });
8971
+ this._invertedIndex = buildInvertedIndex(this._myIndex.records, this._myIndex.keys.length, analyzer);
8972
+ }
8973
+ this._invalidateSearcherCache();
8974
+ }
8975
+ add(doc) {
8976
+ if (!isDefined(doc)) {
8977
+ return;
8978
+ }
8979
+ this._docs.push(doc);
8980
+ const record = this._myIndex.add(doc, this._docs.length - 1);
8981
+ if (this._invertedIndex && record) {
8982
+ const analyzer = createAnalyzer({
8983
+ isCaseSensitive: this.options.isCaseSensitive,
8984
+ ignoreDiacritics: this.options.ignoreDiacritics,
8985
+ tokenize: this.options.tokenize
8986
+ });
8987
+ addToInvertedIndex(this._invertedIndex, record, this._myIndex.keys.length, analyzer);
8988
+ }
8989
+ this._invalidateSearcherCache();
8990
+ }
8991
+ remove(predicate = () => false) {
8992
+ const results = [];
8993
+ const indicesToRemove = [];
8994
+ for (let i = 0, len = this._docs.length; i < len; i += 1) {
8995
+ if (predicate(this._docs[i], i)) {
8996
+ results.push(this._docs[i]);
8997
+ indicesToRemove.push(i);
8998
+ }
8999
+ }
9000
+ if (indicesToRemove.length) {
9001
+ if (this._invertedIndex) {
9002
+ removeAndShiftInvertedIndex(this._invertedIndex, indicesToRemove);
9003
+ }
9004
+ const toRemove = new Set(indicesToRemove);
9005
+ this._docs = this._docs.filter((_, i) => !toRemove.has(i));
9006
+ this._myIndex.removeAll(indicesToRemove);
9007
+ this._invalidateSearcherCache();
9008
+ }
9009
+ return results;
9010
+ }
9011
+ removeAt(idx) {
9012
+ if (!Number.isInteger(idx) || idx < 0 || idx >= this._docs.length) {
9013
+ throw new Error(INVALID_DOC_INDEX);
9014
+ }
9015
+ if (this._invertedIndex) {
9016
+ removeAndShiftInvertedIndex(this._invertedIndex, [idx]);
9017
+ }
9018
+ const doc = this._docs.splice(idx, 1)[0];
9019
+ this._myIndex.removeAt(idx);
9020
+ this._invalidateSearcherCache();
9021
+ return doc;
9022
+ }
9023
+ _invalidateSearcherCache() {
9024
+ this._lastQuery = null;
9025
+ this._lastSearcher = null;
9026
+ }
9027
+ getIndex() {
9028
+ return this._myIndex;
9029
+ }
9030
+ search(query, options) {
9031
+ const {
9032
+ limit = -1
9033
+ } = options || {};
9034
+ const {
9035
+ includeMatches,
9036
+ includeScore,
9037
+ shouldSort,
9038
+ sortFn,
9039
+ ignoreFieldNorm
9040
+ } = this.options;
9041
+ if (isString(query) && !query.trim()) {
9042
+ let docs = this._docs.map((item, idx) => ({
9043
+ item,
9044
+ refIndex: idx
9045
+ }));
9046
+ if (isNumber2(limit) && limit > -1) {
9047
+ docs = docs.slice(0, limit);
9048
+ }
9049
+ return docs;
9050
+ }
9051
+ const useHeap = isNumber2(limit) && limit > 0 && isString(query);
9052
+ let results;
9053
+ if (useHeap) {
9054
+ const heap = new MaxHeap(limit);
9055
+ if (isString(this._docs[0])) {
9056
+ this._searchStringList(query, {
9057
+ heap,
9058
+ ignoreFieldNorm
9059
+ });
9060
+ } else {
9061
+ this._searchObjectList(query, {
9062
+ heap,
9063
+ ignoreFieldNorm
9064
+ });
9065
+ }
9066
+ results = heap.extractSorted(sortFn);
9067
+ } else {
9068
+ results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
9069
+ computeScore(results, {
9070
+ ignoreFieldNorm
9071
+ });
9072
+ if (shouldSort) {
9073
+ results.sort(sortFn);
9074
+ }
9075
+ if (isNumber2(limit) && limit > -1) {
9076
+ results = results.slice(0, limit);
9077
+ }
9078
+ }
9079
+ return format(results, this._docs, {
9080
+ includeMatches,
9081
+ includeScore
9082
+ });
9083
+ }
9084
+ _searchStringList(query, {
9085
+ heap,
9086
+ ignoreFieldNorm
9087
+ } = {}) {
9088
+ const searcher = this._getSearcher(query);
9089
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9090
+ const {
9091
+ records
9092
+ } = this._myIndex;
9093
+ const results = heap ? null : [];
9094
+ records.forEach(({
9095
+ v: text,
9096
+ i: idx,
9097
+ n: norm2
9098
+ }) => {
9099
+ if (!isDefined(text)) {
9100
+ return;
9101
+ }
9102
+ const searchResult = searcher.searchIn(text);
9103
+ if (searchResult.isMatch) {
9104
+ const match = {
9105
+ score: searchResult.score,
9106
+ value: text,
9107
+ norm: norm2,
9108
+ indices: searchResult.indices
9109
+ };
9110
+ if (requireAllTokens) {
9111
+ match.matchedMask = searchResult.matchedMask;
9112
+ match.matchedTerms = searchResult.matchedTerms;
9113
+ match.termCount = searchResult.termCount;
9114
+ }
9115
+ const matches = [match];
9116
+ if (!requireAllTokens || this._coversAllTokens(matches)) {
9117
+ const result = {
9118
+ item: text,
9119
+ idx,
9120
+ matches
9121
+ };
9122
+ if (heap) {
9123
+ result.score = computeScoreSingle(result.matches, {
9124
+ ignoreFieldNorm
9125
+ });
9126
+ if (heap.shouldInsert(result.score)) {
9127
+ heap.insert(result);
9128
+ }
9129
+ } else {
9130
+ results.push(result);
9131
+ }
9132
+ }
9133
+ }
9134
+ });
9135
+ return results;
9136
+ }
9137
+ _searchLogical(query) {
9138
+ const expression = parse2(query, this.options);
9139
+ const evaluate2 = (node, item, idx) => {
9140
+ if (!("children" in node)) {
9141
+ const {
9142
+ keyId,
9143
+ searcher
9144
+ } = node;
9145
+ let matches;
9146
+ if (keyId === null) {
9147
+ matches = [];
9148
+ this._myIndex.keys.forEach((key, keyIndex) => {
9149
+ matches.push(...this._findMatches({
9150
+ key,
9151
+ value: item[keyIndex],
9152
+ searcher
9153
+ }));
9154
+ });
9155
+ } else {
9156
+ matches = this._findMatches({
9157
+ key: this._keyStore.get(keyId),
9158
+ value: this._myIndex.getValueForItemAtKeyId(item, keyId),
9159
+ searcher
9160
+ });
9161
+ }
9162
+ if (matches && matches.length) {
9163
+ return [{
9164
+ idx,
9165
+ item,
9166
+ matches
9167
+ }];
9168
+ }
9169
+ return [];
9170
+ }
9171
+ const {
9172
+ children,
9173
+ operator
9174
+ } = node;
9175
+ const res = [];
9176
+ for (let i = 0, len = children.length; i < len; i += 1) {
9177
+ const child = children[i];
9178
+ const result = evaluate2(child, item, idx);
9179
+ if (result.length) {
9180
+ res.push(...result);
9181
+ } else if (operator === LogicalOperator.AND) {
9182
+ return [];
9183
+ }
9184
+ }
9185
+ return res;
9186
+ };
9187
+ const records = this._myIndex.records;
9188
+ const resultMap = /* @__PURE__ */ new Map();
9189
+ const results = [];
9190
+ records.forEach(({
9191
+ $: item,
9192
+ i: idx
9193
+ }) => {
9194
+ if (isDefined(item)) {
9195
+ const expResults = evaluate2(expression, item, idx);
9196
+ if (expResults.length) {
9197
+ if (!resultMap.has(idx)) {
9198
+ resultMap.set(idx, {
9199
+ idx,
9200
+ item,
9201
+ matches: []
9202
+ });
9203
+ results.push(resultMap.get(idx));
9204
+ }
9205
+ expResults.forEach(({
9206
+ matches
9207
+ }) => {
9208
+ resultMap.get(idx).matches.push(...matches);
9209
+ });
9210
+ }
9211
+ }
9212
+ });
9213
+ return results;
9214
+ }
9215
+ // When a search involves inverse patterns (e.g. !Syrup), the aggregation
9216
+ // across keys switches from "ANY key matches" to "ALL keys must match."
9217
+ // This is signaled by hasInverse on the SearchResult from ExtendedSearch.
9218
+ //
9219
+ // For mixed patterns like "^hello !Syrup", a key failure is ambiguous —
9220
+ // it could be the positive or inverse term that failed. In that case we
9221
+ // conservatively exclude the item, which is strictly better than the old
9222
+ // behavior of including it. See: https://github.com/krisk/Fuse/issues/712
9223
+ _searchObjectList(query, {
9224
+ heap,
9225
+ ignoreFieldNorm
9226
+ } = {}) {
9227
+ const searcher = this._getSearcher(query);
9228
+ const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
9229
+ const {
9230
+ keys,
9231
+ records
9232
+ } = this._myIndex;
9233
+ const results = heap ? null : [];
9234
+ records.forEach(({
9235
+ $: item,
9236
+ i: idx
9237
+ }) => {
9238
+ if (!isDefined(item)) {
9239
+ return;
9240
+ }
9241
+ const matches = [];
9242
+ let anyKeyFailed = false;
9243
+ let hasInverse = false;
9244
+ keys.forEach((key, keyIndex) => {
9245
+ const keyMatches = this._findMatches({
9246
+ key,
9247
+ value: item[keyIndex],
9248
+ searcher
9249
+ });
9250
+ if (keyMatches.length) {
9251
+ matches.push(...keyMatches);
9252
+ if (keyMatches[0].hasInverse) {
9253
+ hasInverse = true;
9254
+ }
9255
+ } else {
9256
+ anyKeyFailed = true;
9257
+ }
9258
+ });
9259
+ if (hasInverse && anyKeyFailed) {
9260
+ return;
9261
+ }
9262
+ if (matches.length && (!requireAllTokens || this._coversAllTokens(matches))) {
9263
+ const result = {
9264
+ idx,
9265
+ item,
9266
+ matches
9267
+ };
9268
+ if (heap) {
9269
+ result.score = computeScoreSingle(result.matches, {
9270
+ ignoreFieldNorm
9271
+ });
9272
+ if (heap.shouldInsert(result.score)) {
9273
+ heap.insert(result);
9274
+ }
9275
+ } else {
9276
+ results.push(result);
9277
+ }
9278
+ }
9279
+ });
9280
+ return results;
9281
+ }
9282
+ _findMatches({
9283
+ key,
9284
+ value,
9285
+ searcher
9286
+ }) {
9287
+ if (!isDefined(value)) {
9288
+ return [];
9289
+ }
9290
+ const matches = [];
9291
+ if (isArray(value)) {
9292
+ value.forEach(({
9293
+ v: text,
9294
+ i: idx,
9295
+ n: norm2
9296
+ }) => {
9297
+ if (!isDefined(text)) {
9298
+ return;
9299
+ }
9300
+ const searchResult = searcher.searchIn(text);
9301
+ if (searchResult.isMatch) {
9302
+ const match = {
9303
+ score: searchResult.score,
9304
+ key,
9305
+ value: text,
9306
+ idx,
9307
+ norm: norm2,
9308
+ indices: searchResult.indices,
9309
+ hasInverse: searchResult.hasInverse
9310
+ };
9311
+ if (searchResult.termCount !== void 0) {
9312
+ match.matchedMask = searchResult.matchedMask;
9313
+ match.matchedTerms = searchResult.matchedTerms;
9314
+ match.termCount = searchResult.termCount;
9315
+ }
9316
+ matches.push(match);
9317
+ }
9318
+ });
9319
+ } else {
9320
+ const {
9321
+ v: text,
9322
+ n: norm2
9323
+ } = value;
9324
+ const searchResult = searcher.searchIn(text);
9325
+ if (searchResult.isMatch) {
9326
+ const match = {
9327
+ score: searchResult.score,
9328
+ key,
9329
+ value: text,
9330
+ norm: norm2,
9331
+ indices: searchResult.indices,
9332
+ hasInverse: searchResult.hasInverse
9333
+ };
9334
+ if (searchResult.termCount !== void 0) {
9335
+ match.matchedMask = searchResult.matchedMask;
9336
+ match.matchedTerms = searchResult.matchedTerms;
9337
+ match.termCount = searchResult.termCount;
9338
+ }
9339
+ matches.push(match);
9340
+ }
9341
+ }
9342
+ return matches;
9343
+ }
9344
+ // Record-level AND gate for token search (`tokenMatch: 'all'`). Returns true
9345
+ // unless the matched terms across ALL of a record's field/array-element
9346
+ // matches fail to cover every query term. `termCount` is only set by
9347
+ // TokenSearch in 'all' mode, so non-token / 'any' searches always pass.
9348
+ _coversAllTokens(matches) {
9349
+ const termCount = matches.length ? matches[0].termCount : void 0;
9350
+ if (termCount === void 0) {
9351
+ return true;
9352
+ }
9353
+ if (termCount <= MAX_MASK_TERMS) {
9354
+ let coverage2 = 0;
9355
+ for (let i = 0; i < matches.length; i++) {
9356
+ coverage2 |= matches[i].matchedMask || 0;
9357
+ }
9358
+ return coverage2 === 2 ** termCount - 1;
9359
+ }
9360
+ const coverage = /* @__PURE__ */ new Set();
9361
+ for (let i = 0; i < matches.length; i++) {
9362
+ const terms = matches[i].matchedTerms;
9363
+ if (terms) {
9364
+ for (const t12 of terms) {
9365
+ coverage.add(t12);
9366
+ }
9367
+ }
9368
+ }
9369
+ return coverage.size === termCount;
9370
+ }
9371
+ };
9372
+ Fuse.version = "7.4.0";
9373
+ Fuse.createIndex = createIndex;
9374
+ Fuse.parseIndex = parseIndex;
9375
+ Fuse.config = Config;
9376
+ Fuse.match = function(pattern, text, options) {
9377
+ if (options && options.useTokenSearch) {
9378
+ throw new Error(FUSE_MATCH_TOKEN_SEARCH_UNSUPPORTED);
9379
+ }
9380
+ const searcher = createSearcher(pattern, {
9381
+ ...Config,
9382
+ ...options
9383
+ });
9384
+ return searcher.searchIn(text);
9385
+ };
9386
+ {
9387
+ Fuse.parseQuery = parse2;
9388
+ }
9389
+ {
9390
+ register(ExtendedSearch);
9391
+ }
9392
+ {
9393
+ register(TokenSearch);
9394
+ }
9395
+ Fuse.use = function(...plugins) {
9396
+ plugins.forEach((plugin) => register(plugin));
9397
+ };
9398
+
9399
+ // ../ui-react/dist/index.mjs
7400
9400
  import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
7401
9401
  import { useState as useState242, useEffect as useEffect202, useRef as useRef62 } from "react";
7402
9402
  import { jsx as jsx422, jsxs as jsxs38 } from "react/jsx-runtime";
@@ -7404,10 +9404,10 @@ import { Fragment as Fragment62, jsx as jsx43, jsxs as jsxs39 } from "react/jsx-
7404
9404
  import { useState as useState252 } from "react";
7405
9405
  import * as React272 from "react";
7406
9406
 
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._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
9407
+ // ../../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
9408
  import * as React31 from "react";
7409
9409
 
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.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
9410
+ // ../../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
9411
  import * as React29 from "react";
7412
9412
 
7413
9413
  // ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
@@ -9016,7 +11016,7 @@ var computePosition2 = (reference, floating, options) => {
9016
11016
  });
9017
11017
  };
9018
11018
 
9019
- // ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
11019
+ // ../../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
11020
  import * as React26 from "react";
9021
11021
  import { useLayoutEffect as useLayoutEffect4 } from "react";
9022
11022
  import * as ReactDOM3 from "react-dom";
@@ -9300,7 +11300,7 @@ var arrow3 = (options, deps) => ({
9300
11300
  options: [options, deps]
9301
11301
  });
9302
11302
 
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.9__3k7jfnq3g5zq63z6pm7q63bd4u/node_modules/@radix-ui/react-arrow/dist/index.mjs
11303
+ // ../../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
11304
  import * as React27 from "react";
9305
11305
  import { jsx as jsx10 } from "react/jsx-runtime";
9306
11306
  var NAME = "Arrow";
@@ -9322,7 +11322,7 @@ var Arrow = React27.forwardRef((props, forwardedRef) => {
9322
11322
  Arrow.displayName = NAME;
9323
11323
  var Root2 = Arrow;
9324
11324
 
9325
- // ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
11325
+ // ../../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
11326
  import * as React28 from "react";
9327
11327
  function useSize(element) {
9328
11328
  const [size4, setSize] = React28.useState(void 0);
@@ -9359,7 +11359,7 @@ function useSize(element) {
9359
11359
  return size4;
9360
11360
  }
9361
11361
 
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.9_64rpffaf3sso2bzgb3su5jbaxm/node_modules/@radix-ui/react-popper/dist/index.mjs
11362
+ // ../../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
11363
  import { jsx as jsx11 } from "react/jsx-runtime";
9364
11364
  var POPPER_NAME = "Popper";
9365
11365
  var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
@@ -9631,7 +11631,7 @@ var Anchor = PopperAnchor;
9631
11631
  var Content2 = PopperContent;
9632
11632
  var Arrow2 = PopperArrow;
9633
11633
 
9634
- // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.9__@types+rea_wt7sdqfyqu7fggokpnlq4zaz2e/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
11634
+ // ../../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
11635
  import * as React30 from "react";
9636
11636
  import { jsx as jsx12 } from "react/jsx-runtime";
9637
11637
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
@@ -9663,7 +11663,7 @@ var VisuallyHidden = React30.forwardRef(
9663
11663
  VisuallyHidden.displayName = NAME2;
9664
11664
  var Root3 = VisuallyHidden;
9665
11665
 
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._aqltx4jspgwttwvtzmq3z5uagy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
11666
+ // ../../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
11667
  import { jsx as jsx13, jsxs as jsxs2 } from "react/jsx-runtime";
9668
11668
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
9669
11669
  createPopperScope
@@ -10146,7 +12146,7 @@ import { Fragment as Fragment72, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-
10146
12146
  import { useState as useState28, useEffect as useEffect222, useMemo as useMemo82 } from "react";
10147
12147
  import * as React282 from "react";
10148
12148
 
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.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
12149
+ // ../../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
12150
  import * as React35 from "react";
10151
12151
  import * as ReactDOM4 from "react-dom";
10152
12152
 
@@ -10155,7 +12155,7 @@ function clamp2(value, [min2, max2]) {
10155
12155
  return Math.min(max2, Math.max(min2, value));
10156
12156
  }
10157
12157
 
10158
- // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.9__@types+react@19_532r4g3s7qk4zcqxxtldqwghxu/node_modules/@radix-ui/react-collection/dist/index.mjs
12158
+ // ../../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
12159
  import React32 from "react";
10160
12160
  import { jsx as jsx14 } from "react/jsx-runtime";
10161
12161
  import React210 from "react";
@@ -10223,7 +12223,7 @@ function createCollection(name) {
10223
12223
  ];
10224
12224
  }
10225
12225
 
10226
- // ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
12226
+ // ../../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
12227
  import * as React33 from "react";
10228
12228
  import { jsx as jsx15 } from "react/jsx-runtime";
10229
12229
  var DirectionContext = React33.createContext(void 0);
@@ -10232,7 +12232,7 @@ function useDirection(localDir) {
10232
12232
  return localDir || globalDir || "ltr";
10233
12233
  }
10234
12234
 
10235
- // ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.2.9_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
12235
+ // ../../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
12236
  import * as React34 from "react";
10237
12237
  function usePrevious(value) {
10238
12238
  const ref = React34.useRef({ value, previous: value });
@@ -10245,7 +12245,7 @@ function usePrevious(value) {
10245
12245
  }, [value]);
10246
12246
  }
10247
12247
 
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.9_5n4syhs66qrtkkphe44qzgdimq/node_modules/@radix-ui/react-select/dist/index.mjs
12248
+ // ../../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
12249
  import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs3 } from "react/jsx-runtime";
10250
12250
  var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
10251
12251
  var SELECTION_KEYS = [" ", "Enter"];
@@ -10367,10 +12367,10 @@ var SelectTrigger = React35.forwardRef(
10367
12367
  const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
10368
12368
  const getItems = useCollection(__scopeSelect);
10369
12369
  const pointerTypeRef = React35.useRef("touch");
10370
- const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
12370
+ const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search2) => {
10371
12371
  const enabledItems = getItems().filter((item) => !item.disabled);
10372
12372
  const currentItem = enabledItems.find((item) => item.value === context.value);
10373
- const nextItem = findNextItem(enabledItems, search, currentItem);
12373
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10374
12374
  if (nextItem !== void 0) {
10375
12375
  context.onValueChange(nextItem.value);
10376
12376
  }
@@ -10597,10 +12597,10 @@ var SelectContentImpl = React35.forwardRef(
10597
12597
  window.removeEventListener("resize", close);
10598
12598
  };
10599
12599
  }, [onOpenChange]);
10600
- const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {
12600
+ const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search2) => {
10601
12601
  const enabledItems = getItems().filter((item) => !item.disabled);
10602
12602
  const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
10603
- const nextItem = findNextItem(enabledItems, search, currentItem);
12603
+ const nextItem = findNextItem(enabledItems, search2, currentItem);
10604
12604
  if (nextItem) {
10605
12605
  setTimeout(() => nextItem.ref.current.focus());
10606
12606
  }
@@ -11329,13 +13329,13 @@ function useTypeaheadSearch(onSearchChange) {
11329
13329
  const timerRef = React35.useRef(0);
11330
13330
  const handleTypeaheadSearch = React35.useCallback(
11331
13331
  (key) => {
11332
- const search = searchRef.current + key;
11333
- handleSearchChange(search);
13332
+ const search2 = searchRef.current + key;
13333
+ handleSearchChange(search2);
11334
13334
  (function updateSearch(value) {
11335
13335
  searchRef.current = value;
11336
13336
  window.clearTimeout(timerRef.current);
11337
13337
  if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
11338
- })(search);
13338
+ })(search2);
11339
13339
  },
11340
13340
  [handleSearchChange]
11341
13341
  );
@@ -11348,9 +13348,9 @@ function useTypeaheadSearch(onSearchChange) {
11348
13348
  }, []);
11349
13349
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
11350
13350
  }
11351
- function findNextItem(items, search, currentItem) {
11352
- const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
11353
- const normalizedSearch = isRepeated ? search[0] : search;
13351
+ function findNextItem(items, search2, currentItem) {
13352
+ const isRepeated = search2.length > 1 && Array.from(search2).every((char) => char === search2[0]);
13353
+ const normalizedSearch = isRepeated ? search2[0] : search2;
11354
13354
  const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
11355
13355
  let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
11356
13356
  const excludeCurrentItem = normalizedSearch.length === 1;
@@ -21425,13 +23425,25 @@ function TokenSelectorSheet({
21425
23425
  });
21426
23426
  setRecentTokens(updated);
21427
23427
  };
23428
+ const fuse = useMemo62(
23429
+ () => new Fuse(allOptions, {
23430
+ keys: [
23431
+ { name: "token.symbol", weight: 2 },
23432
+ { name: "token.name", weight: 1 },
23433
+ { name: "chain.chain_name", weight: 0.5 }
23434
+ ],
23435
+ threshold: 0.2,
23436
+ ignoreLocation: true,
23437
+ minMatchCharLength: 2
23438
+ }),
23439
+ [allOptions]
23440
+ );
21428
23441
  const filteredOptions = useMemo62(() => {
21429
23442
  if (!searchQuery.trim()) return allOptions;
21430
- const query = searchQuery.toLowerCase();
21431
- return allOptions.filter(
21432
- ({ token, chain }) => token.symbol.toLowerCase().includes(query) || token.name.toLowerCase().includes(query) || chain.chain_name.toLowerCase().includes(query)
21433
- );
21434
- }, [allOptions, searchQuery]);
23443
+ const query = searchQuery.trim();
23444
+ const results = fuse.search(query);
23445
+ return results.map((r2) => r2.item);
23446
+ }, [fuse, allOptions, searchQuery]);
21435
23447
  const isCommonToken = (symbol, chainType, chainId) => {
21436
23448
  return COMMON_TOKENS.some(
21437
23449
  (ct) => ct.symbol === symbol && ct.chainType === chainType && ct.chainId === chainId
@@ -25074,6 +27086,7 @@ function DepositModal({
25074
27086
  enableConnectWallet = false,
25075
27087
  browserWalletAmountQuickSelect = "percentage",
25076
27088
  enablePayWithExchange,
27089
+ enableFiatOnramp,
25077
27090
  enableConnectExchange = false,
25078
27091
  enableCashApp = false,
25079
27092
  hideDepositFlowInfo = false,
@@ -25095,8 +27108,9 @@ function DepositModal({
25095
27108
  const s = initialScreen ?? "main";
25096
27109
  if (s === "tracker" && hideDepositTracker) return "main";
25097
27110
  if (s === "cashapp" && !enableCashApp) return "main";
27111
+ if (s === "card" && enableFiatOnramp === false) return "main";
25098
27112
  return s;
25099
- }, [initialScreen, hideDepositTracker, enableCashApp]);
27113
+ }, [initialScreen, hideDepositTracker, enableCashApp, enableFiatOnramp]);
25100
27114
  const [containerEl, setContainerEl] = useState31(null);
25101
27115
  const containerCallbackRef = useCallback52((el) => {
25102
27116
  setContainerEl(el);
@@ -25212,6 +27226,13 @@ function DepositModal({
25212
27226
  enabled: open
25213
27227
  });
25214
27228
  const showPayWithExchange = enablePayWithExchange ?? projectConfig?.pay_with_exchange?.enabled ?? true;
27229
+ const showFiatOnramp = enableFiatOnramp ?? projectConfig?.fiat_onramp?.enabled ?? true;
27230
+ useEffect25(() => {
27231
+ if (view === "card" && !showFiatOnramp) {
27232
+ setView("main");
27233
+ setCardView("amount");
27234
+ }
27235
+ }, [view, showFiatOnramp]);
25215
27236
  const { exchanges, isLoading: exchangesLoading } = useExchanges({
25216
27237
  publishableKey,
25217
27238
  enabled: open && showPayWithExchange
@@ -25521,7 +27542,7 @@ function DepositModal({
25521
27542
  featuredWallets: projectConfig?.connect_wallet?.wallets
25522
27543
  }
25523
27544
  ),
25524
- /* @__PURE__ */ jsx55(
27545
+ showFiatOnramp && /* @__PURE__ */ jsx55(
25525
27546
  DepositWithCardButton,
25526
27547
  {
25527
27548
  onClick: () => setView("card"),
@@ -28523,6 +30544,7 @@ function UnifoldProvider2({
28523
30544
  transferInputVariant: config?.transferInputVariant,
28524
30545
  enableConnectWallet: config?.enableConnectWallet,
28525
30546
  enablePayWithExchange: config?.enablePayWithExchange,
30547
+ enableFiatOnramp: config?.enableFiatOnramp,
28526
30548
  enableConnectExchange: config?.enableConnectExchange,
28527
30549
  enableCashApp: config?.enableCashApp,
28528
30550
  onDepositSuccess: handleDepositSuccess,