| 878 | ); |
| 879 | } |
| 880 | function Ae() { |
| 881 | if (J) return q; |
| 882 | J = 1; |
| 883 | const e = we(), |
| 884 | { MAX_LENGTH: t, MAX_SAFE_INTEGER: n } = ye(), |
| 885 | { safeRe: r, t: i } = Oe(), |
| 886 | o = U(), |
| 887 | { compareIdentifiers: a } = (function () { |
| 888 | if (Y) return H; |
| 889 | Y = 1; |
| 890 | const e = /^[0-9]+$/, |
| 891 | t = (t, n) => { |
| 892 | const r = e.test(t), |
| 893 | i = e.test(n); |
| 894 | return ( |
| 895 | r && i && ((t = +t), (n = +n)), |
| 896 | t === n ? 0 : r && !i ? -1 : i && !r ? 1 : t < n ? -1 : 1 |
| 897 | ); |
| 898 | }; |
| 899 | return (H = { |
| 900 | compareIdentifiers: t, |
| 901 | rcompareIdentifiers: (e, n) => t(n, e), |
| 902 | }); |
| 903 | })(); |
| 904 | class s { |
| 905 | constructor(a, l) { |
| 906 | if (((l = o(l)), a instanceof s)) { |
| 907 | if ( |
| 908 | a.loose === !!l.loose && |
| 909 | a.includePrerelease === !!l.includePrerelease |
| 910 | ) |
| 911 | return a; |
| 912 | a = a.version; |
| 913 | } else if ("string" != typeof a) |
| 914 | throw new TypeError( |
| 915 | `Invalid version. Must be a string. Got type "${typeof a}".`, |
| 916 | ); |
| 917 | if (a.length > t) |
| 918 | throw new TypeError(`version is longer than ${t} characters`); |
| 919 | (e("SemVer", a, l), |
| 920 | (this.options = l), |
| 921 | (this.loose = !!l.loose), |
| 922 | (this.includePrerelease = !!l.includePrerelease)); |
| 923 | const c = a.trim().match(l.loose ? r[i.LOOSE] : r[i.FULL]); |
| 924 | if (!c) throw new TypeError(`Invalid Version: ${a}`); |
| 925 | if ( |
| 926 | ((this.raw = a), |
| 927 | (this.major = +c[1]), |
| 928 | (this.minor = +c[2]), |
| 929 | (this.patch = +c[3]), |
| 930 | this.major > n || this.major < 0) |
| 931 | ) |
| 932 | throw new TypeError("Invalid major version"); |
| 933 | if (this.minor > n || this.minor < 0) |
| 934 | throw new TypeError("Invalid minor version"); |
| 935 | if (this.patch > n || this.patch < 0) |
| 936 | throw new TypeError("Invalid patch version"); |
| 937 | (c[4] |