@absolutejs/absolute 0.19.0-beta.510 → 0.19.0-beta.512

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.
@@ -1410,6 +1410,329 @@ var createRAGClient = (options) => {
1410
1410
  }
1411
1411
  };
1412
1412
  };
1413
+ // src/ai/rag/quality.ts
1414
+ var {mkdir, readFile, writeFile} = (() => ({}));
1415
+
1416
+ // node:path
1417
+ function assertPath(path) {
1418
+ if (typeof path !== "string")
1419
+ throw TypeError("Path must be a string. Received " + JSON.stringify(path));
1420
+ }
1421
+ function normalizeStringPosix(path, allowAboveRoot) {
1422
+ var res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code;
1423
+ for (var i = 0;i <= path.length; ++i) {
1424
+ if (i < path.length)
1425
+ code = path.charCodeAt(i);
1426
+ else if (code === 47)
1427
+ break;
1428
+ else
1429
+ code = 47;
1430
+ if (code === 47) {
1431
+ if (lastSlash === i - 1 || dots === 1)
1432
+ ;
1433
+ else if (lastSlash !== i - 1 && dots === 2) {
1434
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
1435
+ if (res.length > 2) {
1436
+ var lastSlashIndex = res.lastIndexOf("/");
1437
+ if (lastSlashIndex !== res.length - 1) {
1438
+ if (lastSlashIndex === -1)
1439
+ res = "", lastSegmentLength = 0;
1440
+ else
1441
+ res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
1442
+ lastSlash = i, dots = 0;
1443
+ continue;
1444
+ }
1445
+ } else if (res.length === 2 || res.length === 1) {
1446
+ res = "", lastSegmentLength = 0, lastSlash = i, dots = 0;
1447
+ continue;
1448
+ }
1449
+ }
1450
+ if (allowAboveRoot) {
1451
+ if (res.length > 0)
1452
+ res += "/..";
1453
+ else
1454
+ res = "..";
1455
+ lastSegmentLength = 2;
1456
+ }
1457
+ } else {
1458
+ if (res.length > 0)
1459
+ res += "/" + path.slice(lastSlash + 1, i);
1460
+ else
1461
+ res = path.slice(lastSlash + 1, i);
1462
+ lastSegmentLength = i - lastSlash - 1;
1463
+ }
1464
+ lastSlash = i, dots = 0;
1465
+ } else if (code === 46 && dots !== -1)
1466
+ ++dots;
1467
+ else
1468
+ dots = -1;
1469
+ }
1470
+ return res;
1471
+ }
1472
+ function _format(sep, pathObject) {
1473
+ var dir = pathObject.dir || pathObject.root, base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
1474
+ if (!dir)
1475
+ return base;
1476
+ if (dir === pathObject.root)
1477
+ return dir + base;
1478
+ return dir + sep + base;
1479
+ }
1480
+ function resolve() {
1481
+ var resolvedPath = "", resolvedAbsolute = false, cwd;
1482
+ for (var i = arguments.length - 1;i >= -1 && !resolvedAbsolute; i--) {
1483
+ var path;
1484
+ if (i >= 0)
1485
+ path = arguments[i];
1486
+ else {
1487
+ if (cwd === undefined)
1488
+ cwd = process.cwd();
1489
+ path = cwd;
1490
+ }
1491
+ if (assertPath(path), path.length === 0)
1492
+ continue;
1493
+ resolvedPath = path + "/" + resolvedPath, resolvedAbsolute = path.charCodeAt(0) === 47;
1494
+ }
1495
+ if (resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute), resolvedAbsolute)
1496
+ if (resolvedPath.length > 0)
1497
+ return "/" + resolvedPath;
1498
+ else
1499
+ return "/";
1500
+ else if (resolvedPath.length > 0)
1501
+ return resolvedPath;
1502
+ else
1503
+ return ".";
1504
+ }
1505
+ function normalize(path) {
1506
+ if (assertPath(path), path.length === 0)
1507
+ return ".";
1508
+ var isAbsolute = path.charCodeAt(0) === 47, trailingSeparator = path.charCodeAt(path.length - 1) === 47;
1509
+ if (path = normalizeStringPosix(path, !isAbsolute), path.length === 0 && !isAbsolute)
1510
+ path = ".";
1511
+ if (path.length > 0 && trailingSeparator)
1512
+ path += "/";
1513
+ if (isAbsolute)
1514
+ return "/" + path;
1515
+ return path;
1516
+ }
1517
+ function isAbsolute(path) {
1518
+ return assertPath(path), path.length > 0 && path.charCodeAt(0) === 47;
1519
+ }
1520
+ function join() {
1521
+ if (arguments.length === 0)
1522
+ return ".";
1523
+ var joined;
1524
+ for (var i = 0;i < arguments.length; ++i) {
1525
+ var arg = arguments[i];
1526
+ if (assertPath(arg), arg.length > 0)
1527
+ if (joined === undefined)
1528
+ joined = arg;
1529
+ else
1530
+ joined += "/" + arg;
1531
+ }
1532
+ if (joined === undefined)
1533
+ return ".";
1534
+ return normalize(joined);
1535
+ }
1536
+ function relative(from, to) {
1537
+ if (assertPath(from), assertPath(to), from === to)
1538
+ return "";
1539
+ if (from = resolve(from), to = resolve(to), from === to)
1540
+ return "";
1541
+ var fromStart = 1;
1542
+ for (;fromStart < from.length; ++fromStart)
1543
+ if (from.charCodeAt(fromStart) !== 47)
1544
+ break;
1545
+ var fromEnd = from.length, fromLen = fromEnd - fromStart, toStart = 1;
1546
+ for (;toStart < to.length; ++toStart)
1547
+ if (to.charCodeAt(toStart) !== 47)
1548
+ break;
1549
+ var toEnd = to.length, toLen = toEnd - toStart, length = fromLen < toLen ? fromLen : toLen, lastCommonSep = -1, i = 0;
1550
+ for (;i <= length; ++i) {
1551
+ if (i === length) {
1552
+ if (toLen > length) {
1553
+ if (to.charCodeAt(toStart + i) === 47)
1554
+ return to.slice(toStart + i + 1);
1555
+ else if (i === 0)
1556
+ return to.slice(toStart + i);
1557
+ } else if (fromLen > length) {
1558
+ if (from.charCodeAt(fromStart + i) === 47)
1559
+ lastCommonSep = i;
1560
+ else if (i === 0)
1561
+ lastCommonSep = 0;
1562
+ }
1563
+ break;
1564
+ }
1565
+ var fromCode = from.charCodeAt(fromStart + i), toCode = to.charCodeAt(toStart + i);
1566
+ if (fromCode !== toCode)
1567
+ break;
1568
+ else if (fromCode === 47)
1569
+ lastCommonSep = i;
1570
+ }
1571
+ var out = "";
1572
+ for (i = fromStart + lastCommonSep + 1;i <= fromEnd; ++i)
1573
+ if (i === fromEnd || from.charCodeAt(i) === 47)
1574
+ if (out.length === 0)
1575
+ out += "..";
1576
+ else
1577
+ out += "/..";
1578
+ if (out.length > 0)
1579
+ return out + to.slice(toStart + lastCommonSep);
1580
+ else {
1581
+ if (toStart += lastCommonSep, to.charCodeAt(toStart) === 47)
1582
+ ++toStart;
1583
+ return to.slice(toStart);
1584
+ }
1585
+ }
1586
+ function _makeLong(path) {
1587
+ return path;
1588
+ }
1589
+ function dirname(path) {
1590
+ if (assertPath(path), path.length === 0)
1591
+ return ".";
1592
+ var code = path.charCodeAt(0), hasRoot = code === 47, end = -1, matchedSlash = true;
1593
+ for (var i = path.length - 1;i >= 1; --i)
1594
+ if (code = path.charCodeAt(i), code === 47) {
1595
+ if (!matchedSlash) {
1596
+ end = i;
1597
+ break;
1598
+ }
1599
+ } else
1600
+ matchedSlash = false;
1601
+ if (end === -1)
1602
+ return hasRoot ? "/" : ".";
1603
+ if (hasRoot && end === 1)
1604
+ return "//";
1605
+ return path.slice(0, end);
1606
+ }
1607
+ function basename(path, ext) {
1608
+ if (ext !== undefined && typeof ext !== "string")
1609
+ throw TypeError('"ext" argument must be a string');
1610
+ assertPath(path);
1611
+ var start = 0, end = -1, matchedSlash = true, i;
1612
+ if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
1613
+ if (ext.length === path.length && ext === path)
1614
+ return "";
1615
+ var extIdx = ext.length - 1, firstNonSlashEnd = -1;
1616
+ for (i = path.length - 1;i >= 0; --i) {
1617
+ var code = path.charCodeAt(i);
1618
+ if (code === 47) {
1619
+ if (!matchedSlash) {
1620
+ start = i + 1;
1621
+ break;
1622
+ }
1623
+ } else {
1624
+ if (firstNonSlashEnd === -1)
1625
+ matchedSlash = false, firstNonSlashEnd = i + 1;
1626
+ if (extIdx >= 0)
1627
+ if (code === ext.charCodeAt(extIdx)) {
1628
+ if (--extIdx === -1)
1629
+ end = i;
1630
+ } else
1631
+ extIdx = -1, end = firstNonSlashEnd;
1632
+ }
1633
+ }
1634
+ if (start === end)
1635
+ end = firstNonSlashEnd;
1636
+ else if (end === -1)
1637
+ end = path.length;
1638
+ return path.slice(start, end);
1639
+ } else {
1640
+ for (i = path.length - 1;i >= 0; --i)
1641
+ if (path.charCodeAt(i) === 47) {
1642
+ if (!matchedSlash) {
1643
+ start = i + 1;
1644
+ break;
1645
+ }
1646
+ } else if (end === -1)
1647
+ matchedSlash = false, end = i + 1;
1648
+ if (end === -1)
1649
+ return "";
1650
+ return path.slice(start, end);
1651
+ }
1652
+ }
1653
+ function extname(path) {
1654
+ assertPath(path);
1655
+ var startDot = -1, startPart = 0, end = -1, matchedSlash = true, preDotState = 0;
1656
+ for (var i = path.length - 1;i >= 0; --i) {
1657
+ var code = path.charCodeAt(i);
1658
+ if (code === 47) {
1659
+ if (!matchedSlash) {
1660
+ startPart = i + 1;
1661
+ break;
1662
+ }
1663
+ continue;
1664
+ }
1665
+ if (end === -1)
1666
+ matchedSlash = false, end = i + 1;
1667
+ if (code === 46) {
1668
+ if (startDot === -1)
1669
+ startDot = i;
1670
+ else if (preDotState !== 1)
1671
+ preDotState = 1;
1672
+ } else if (startDot !== -1)
1673
+ preDotState = -1;
1674
+ }
1675
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
1676
+ return "";
1677
+ return path.slice(startDot, end);
1678
+ }
1679
+ function format(pathObject) {
1680
+ if (pathObject === null || typeof pathObject !== "object")
1681
+ throw TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
1682
+ return _format("/", pathObject);
1683
+ }
1684
+ function parse(path) {
1685
+ assertPath(path);
1686
+ var ret = { root: "", dir: "", base: "", ext: "", name: "" };
1687
+ if (path.length === 0)
1688
+ return ret;
1689
+ var code = path.charCodeAt(0), isAbsolute2 = code === 47, start;
1690
+ if (isAbsolute2)
1691
+ ret.root = "/", start = 1;
1692
+ else
1693
+ start = 0;
1694
+ var startDot = -1, startPart = 0, end = -1, matchedSlash = true, i = path.length - 1, preDotState = 0;
1695
+ for (;i >= start; --i) {
1696
+ if (code = path.charCodeAt(i), code === 47) {
1697
+ if (!matchedSlash) {
1698
+ startPart = i + 1;
1699
+ break;
1700
+ }
1701
+ continue;
1702
+ }
1703
+ if (end === -1)
1704
+ matchedSlash = false, end = i + 1;
1705
+ if (code === 46) {
1706
+ if (startDot === -1)
1707
+ startDot = i;
1708
+ else if (preDotState !== 1)
1709
+ preDotState = 1;
1710
+ } else if (startDot !== -1)
1711
+ preDotState = -1;
1712
+ }
1713
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1714
+ if (end !== -1)
1715
+ if (startPart === 0 && isAbsolute2)
1716
+ ret.base = ret.name = path.slice(1, end);
1717
+ else
1718
+ ret.base = ret.name = path.slice(startPart, end);
1719
+ } else {
1720
+ if (startPart === 0 && isAbsolute2)
1721
+ ret.name = path.slice(1, startDot), ret.base = path.slice(1, end);
1722
+ else
1723
+ ret.name = path.slice(startPart, startDot), ret.base = path.slice(startPart, end);
1724
+ ret.ext = path.slice(startDot, end);
1725
+ }
1726
+ if (startPart > 0)
1727
+ ret.dir = path.slice(0, startPart - 1);
1728
+ else if (isAbsolute2)
1729
+ ret.dir = "/";
1730
+ return ret;
1731
+ }
1732
+ var sep = "/";
1733
+ var delimiter = ":";
1734
+ var posix = ((p) => (p.posix = p, p))({ resolve, normalize, isAbsolute, join, relative, _makeLong, dirname, basename, extname, format, parse, sep, delimiter, win32: null, posix: null });
1735
+
1413
1736
  // src/ai/rag/quality.ts
1414
1737
  var buildRAGEvaluationLeaderboard = (runs) => {
1415
1738
  const sorted = [...runs].sort((left, right) => {
@@ -1474,6 +1474,329 @@ var useRAGDocuments = (path) => {
1474
1474
  // src/vue/ai/useRAGEvaluate.ts
1475
1475
  import { computed as computed2, ref as ref4 } from "vue";
1476
1476
 
1477
+ // src/ai/rag/quality.ts
1478
+ var {mkdir, readFile, writeFile} = (() => ({}));
1479
+
1480
+ // node:path
1481
+ function assertPath(path) {
1482
+ if (typeof path !== "string")
1483
+ throw TypeError("Path must be a string. Received " + JSON.stringify(path));
1484
+ }
1485
+ function normalizeStringPosix(path, allowAboveRoot) {
1486
+ var res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code;
1487
+ for (var i = 0;i <= path.length; ++i) {
1488
+ if (i < path.length)
1489
+ code = path.charCodeAt(i);
1490
+ else if (code === 47)
1491
+ break;
1492
+ else
1493
+ code = 47;
1494
+ if (code === 47) {
1495
+ if (lastSlash === i - 1 || dots === 1)
1496
+ ;
1497
+ else if (lastSlash !== i - 1 && dots === 2) {
1498
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
1499
+ if (res.length > 2) {
1500
+ var lastSlashIndex = res.lastIndexOf("/");
1501
+ if (lastSlashIndex !== res.length - 1) {
1502
+ if (lastSlashIndex === -1)
1503
+ res = "", lastSegmentLength = 0;
1504
+ else
1505
+ res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
1506
+ lastSlash = i, dots = 0;
1507
+ continue;
1508
+ }
1509
+ } else if (res.length === 2 || res.length === 1) {
1510
+ res = "", lastSegmentLength = 0, lastSlash = i, dots = 0;
1511
+ continue;
1512
+ }
1513
+ }
1514
+ if (allowAboveRoot) {
1515
+ if (res.length > 0)
1516
+ res += "/..";
1517
+ else
1518
+ res = "..";
1519
+ lastSegmentLength = 2;
1520
+ }
1521
+ } else {
1522
+ if (res.length > 0)
1523
+ res += "/" + path.slice(lastSlash + 1, i);
1524
+ else
1525
+ res = path.slice(lastSlash + 1, i);
1526
+ lastSegmentLength = i - lastSlash - 1;
1527
+ }
1528
+ lastSlash = i, dots = 0;
1529
+ } else if (code === 46 && dots !== -1)
1530
+ ++dots;
1531
+ else
1532
+ dots = -1;
1533
+ }
1534
+ return res;
1535
+ }
1536
+ function _format(sep, pathObject) {
1537
+ var dir = pathObject.dir || pathObject.root, base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
1538
+ if (!dir)
1539
+ return base;
1540
+ if (dir === pathObject.root)
1541
+ return dir + base;
1542
+ return dir + sep + base;
1543
+ }
1544
+ function resolve() {
1545
+ var resolvedPath = "", resolvedAbsolute = false, cwd;
1546
+ for (var i = arguments.length - 1;i >= -1 && !resolvedAbsolute; i--) {
1547
+ var path;
1548
+ if (i >= 0)
1549
+ path = arguments[i];
1550
+ else {
1551
+ if (cwd === undefined)
1552
+ cwd = process.cwd();
1553
+ path = cwd;
1554
+ }
1555
+ if (assertPath(path), path.length === 0)
1556
+ continue;
1557
+ resolvedPath = path + "/" + resolvedPath, resolvedAbsolute = path.charCodeAt(0) === 47;
1558
+ }
1559
+ if (resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute), resolvedAbsolute)
1560
+ if (resolvedPath.length > 0)
1561
+ return "/" + resolvedPath;
1562
+ else
1563
+ return "/";
1564
+ else if (resolvedPath.length > 0)
1565
+ return resolvedPath;
1566
+ else
1567
+ return ".";
1568
+ }
1569
+ function normalize(path) {
1570
+ if (assertPath(path), path.length === 0)
1571
+ return ".";
1572
+ var isAbsolute = path.charCodeAt(0) === 47, trailingSeparator = path.charCodeAt(path.length - 1) === 47;
1573
+ if (path = normalizeStringPosix(path, !isAbsolute), path.length === 0 && !isAbsolute)
1574
+ path = ".";
1575
+ if (path.length > 0 && trailingSeparator)
1576
+ path += "/";
1577
+ if (isAbsolute)
1578
+ return "/" + path;
1579
+ return path;
1580
+ }
1581
+ function isAbsolute(path) {
1582
+ return assertPath(path), path.length > 0 && path.charCodeAt(0) === 47;
1583
+ }
1584
+ function join() {
1585
+ if (arguments.length === 0)
1586
+ return ".";
1587
+ var joined;
1588
+ for (var i = 0;i < arguments.length; ++i) {
1589
+ var arg = arguments[i];
1590
+ if (assertPath(arg), arg.length > 0)
1591
+ if (joined === undefined)
1592
+ joined = arg;
1593
+ else
1594
+ joined += "/" + arg;
1595
+ }
1596
+ if (joined === undefined)
1597
+ return ".";
1598
+ return normalize(joined);
1599
+ }
1600
+ function relative(from, to) {
1601
+ if (assertPath(from), assertPath(to), from === to)
1602
+ return "";
1603
+ if (from = resolve(from), to = resolve(to), from === to)
1604
+ return "";
1605
+ var fromStart = 1;
1606
+ for (;fromStart < from.length; ++fromStart)
1607
+ if (from.charCodeAt(fromStart) !== 47)
1608
+ break;
1609
+ var fromEnd = from.length, fromLen = fromEnd - fromStart, toStart = 1;
1610
+ for (;toStart < to.length; ++toStart)
1611
+ if (to.charCodeAt(toStart) !== 47)
1612
+ break;
1613
+ var toEnd = to.length, toLen = toEnd - toStart, length = fromLen < toLen ? fromLen : toLen, lastCommonSep = -1, i = 0;
1614
+ for (;i <= length; ++i) {
1615
+ if (i === length) {
1616
+ if (toLen > length) {
1617
+ if (to.charCodeAt(toStart + i) === 47)
1618
+ return to.slice(toStart + i + 1);
1619
+ else if (i === 0)
1620
+ return to.slice(toStart + i);
1621
+ } else if (fromLen > length) {
1622
+ if (from.charCodeAt(fromStart + i) === 47)
1623
+ lastCommonSep = i;
1624
+ else if (i === 0)
1625
+ lastCommonSep = 0;
1626
+ }
1627
+ break;
1628
+ }
1629
+ var fromCode = from.charCodeAt(fromStart + i), toCode = to.charCodeAt(toStart + i);
1630
+ if (fromCode !== toCode)
1631
+ break;
1632
+ else if (fromCode === 47)
1633
+ lastCommonSep = i;
1634
+ }
1635
+ var out = "";
1636
+ for (i = fromStart + lastCommonSep + 1;i <= fromEnd; ++i)
1637
+ if (i === fromEnd || from.charCodeAt(i) === 47)
1638
+ if (out.length === 0)
1639
+ out += "..";
1640
+ else
1641
+ out += "/..";
1642
+ if (out.length > 0)
1643
+ return out + to.slice(toStart + lastCommonSep);
1644
+ else {
1645
+ if (toStart += lastCommonSep, to.charCodeAt(toStart) === 47)
1646
+ ++toStart;
1647
+ return to.slice(toStart);
1648
+ }
1649
+ }
1650
+ function _makeLong(path) {
1651
+ return path;
1652
+ }
1653
+ function dirname(path) {
1654
+ if (assertPath(path), path.length === 0)
1655
+ return ".";
1656
+ var code = path.charCodeAt(0), hasRoot = code === 47, end = -1, matchedSlash = true;
1657
+ for (var i = path.length - 1;i >= 1; --i)
1658
+ if (code = path.charCodeAt(i), code === 47) {
1659
+ if (!matchedSlash) {
1660
+ end = i;
1661
+ break;
1662
+ }
1663
+ } else
1664
+ matchedSlash = false;
1665
+ if (end === -1)
1666
+ return hasRoot ? "/" : ".";
1667
+ if (hasRoot && end === 1)
1668
+ return "//";
1669
+ return path.slice(0, end);
1670
+ }
1671
+ function basename(path, ext) {
1672
+ if (ext !== undefined && typeof ext !== "string")
1673
+ throw TypeError('"ext" argument must be a string');
1674
+ assertPath(path);
1675
+ var start = 0, end = -1, matchedSlash = true, i;
1676
+ if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
1677
+ if (ext.length === path.length && ext === path)
1678
+ return "";
1679
+ var extIdx = ext.length - 1, firstNonSlashEnd = -1;
1680
+ for (i = path.length - 1;i >= 0; --i) {
1681
+ var code = path.charCodeAt(i);
1682
+ if (code === 47) {
1683
+ if (!matchedSlash) {
1684
+ start = i + 1;
1685
+ break;
1686
+ }
1687
+ } else {
1688
+ if (firstNonSlashEnd === -1)
1689
+ matchedSlash = false, firstNonSlashEnd = i + 1;
1690
+ if (extIdx >= 0)
1691
+ if (code === ext.charCodeAt(extIdx)) {
1692
+ if (--extIdx === -1)
1693
+ end = i;
1694
+ } else
1695
+ extIdx = -1, end = firstNonSlashEnd;
1696
+ }
1697
+ }
1698
+ if (start === end)
1699
+ end = firstNonSlashEnd;
1700
+ else if (end === -1)
1701
+ end = path.length;
1702
+ return path.slice(start, end);
1703
+ } else {
1704
+ for (i = path.length - 1;i >= 0; --i)
1705
+ if (path.charCodeAt(i) === 47) {
1706
+ if (!matchedSlash) {
1707
+ start = i + 1;
1708
+ break;
1709
+ }
1710
+ } else if (end === -1)
1711
+ matchedSlash = false, end = i + 1;
1712
+ if (end === -1)
1713
+ return "";
1714
+ return path.slice(start, end);
1715
+ }
1716
+ }
1717
+ function extname(path) {
1718
+ assertPath(path);
1719
+ var startDot = -1, startPart = 0, end = -1, matchedSlash = true, preDotState = 0;
1720
+ for (var i = path.length - 1;i >= 0; --i) {
1721
+ var code = path.charCodeAt(i);
1722
+ if (code === 47) {
1723
+ if (!matchedSlash) {
1724
+ startPart = i + 1;
1725
+ break;
1726
+ }
1727
+ continue;
1728
+ }
1729
+ if (end === -1)
1730
+ matchedSlash = false, end = i + 1;
1731
+ if (code === 46) {
1732
+ if (startDot === -1)
1733
+ startDot = i;
1734
+ else if (preDotState !== 1)
1735
+ preDotState = 1;
1736
+ } else if (startDot !== -1)
1737
+ preDotState = -1;
1738
+ }
1739
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
1740
+ return "";
1741
+ return path.slice(startDot, end);
1742
+ }
1743
+ function format(pathObject) {
1744
+ if (pathObject === null || typeof pathObject !== "object")
1745
+ throw TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
1746
+ return _format("/", pathObject);
1747
+ }
1748
+ function parse(path) {
1749
+ assertPath(path);
1750
+ var ret = { root: "", dir: "", base: "", ext: "", name: "" };
1751
+ if (path.length === 0)
1752
+ return ret;
1753
+ var code = path.charCodeAt(0), isAbsolute2 = code === 47, start;
1754
+ if (isAbsolute2)
1755
+ ret.root = "/", start = 1;
1756
+ else
1757
+ start = 0;
1758
+ var startDot = -1, startPart = 0, end = -1, matchedSlash = true, i = path.length - 1, preDotState = 0;
1759
+ for (;i >= start; --i) {
1760
+ if (code = path.charCodeAt(i), code === 47) {
1761
+ if (!matchedSlash) {
1762
+ startPart = i + 1;
1763
+ break;
1764
+ }
1765
+ continue;
1766
+ }
1767
+ if (end === -1)
1768
+ matchedSlash = false, end = i + 1;
1769
+ if (code === 46) {
1770
+ if (startDot === -1)
1771
+ startDot = i;
1772
+ else if (preDotState !== 1)
1773
+ preDotState = 1;
1774
+ } else if (startDot !== -1)
1775
+ preDotState = -1;
1776
+ }
1777
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
1778
+ if (end !== -1)
1779
+ if (startPart === 0 && isAbsolute2)
1780
+ ret.base = ret.name = path.slice(1, end);
1781
+ else
1782
+ ret.base = ret.name = path.slice(startPart, end);
1783
+ } else {
1784
+ if (startPart === 0 && isAbsolute2)
1785
+ ret.name = path.slice(1, startDot), ret.base = path.slice(1, end);
1786
+ else
1787
+ ret.name = path.slice(startPart, startDot), ret.base = path.slice(startPart, end);
1788
+ ret.ext = path.slice(startDot, end);
1789
+ }
1790
+ if (startPart > 0)
1791
+ ret.dir = path.slice(0, startPart - 1);
1792
+ else if (isAbsolute2)
1793
+ ret.dir = "/";
1794
+ return ret;
1795
+ }
1796
+ var sep = "/";
1797
+ var delimiter = ":";
1798
+ var posix = ((p) => (p.posix = p, p))({ resolve, normalize, isAbsolute, join, relative, _makeLong, dirname, basename, extname, format, parse, sep, delimiter, win32: null, posix: null });
1799
+
1477
1800
  // src/ai/rag/quality.ts
1478
1801
  var buildRAGEvaluationLeaderboard = (runs) => {
1479
1802
  const sorted = [...runs].sort((left, right) => {
@@ -172204,7 +172204,7 @@ ${registrations}
172204
172204
  ({ tsLibDir } = cached);
172205
172205
  cached.lastUsed = Date.now();
172206
172206
  } else {
172207
- const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
172207
+ const tsPath = __require.resolve("typescript");
172208
172208
  const tsRootDir = dirname3(tsPath);
172209
172209
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve5(tsRootDir, "lib");
172210
172210
  const config = readConfiguration("./tsconfig.json");
@@ -182239,5 +182239,5 @@ export {
182239
182239
  Island
182240
182240
  };
182241
182241
 
182242
- //# debugId=EF76AEE7A161867E64756E2164756E21
182242
+ //# debugId=A04B9E4707529A4D64756E2164756E21
182243
182243
  //# sourceMappingURL=index.js.map