Rocky_Mountain_Vending/.pnpm-store/v10/files/64/8d1705ef45b2096f37bb0d456a96953ae34b43e3b4a262e11eba4b45f092e0b3a5b22bb7f485c31e4d124944ab4008f37495d1b7bdba1de974047795ce4c24
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

55 lines
No EOL
1.6 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ascendingDefined = ascendingDefined;
exports.compareDefined = compareDefined;
exports.default = sort;
var _ascending = _interopRequireDefault(require("./ascending.js"));
var _permute = _interopRequireDefault(require("./permute.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function sort(values, ...F) {
if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
values = Array.from(values);
let [f] = F;
if (f && f.length !== 2 || F.length > 1) {
const index = Uint32Array.from(values, (d, i) => i);
if (F.length > 1) {
F = F.map(f => values.map(f));
index.sort((i, j) => {
for (const f of F) {
const c = ascendingDefined(f[i], f[j]);
if (c) return c;
}
});
} else {
f = values.map(f);
index.sort((i, j) => ascendingDefined(f[i], f[j]));
}
return (0, _permute.default)(values, index);
}
return values.sort(compareDefined(f));
}
function compareDefined(compare = _ascending.default) {
if (compare === _ascending.default) return ascendingDefined;
if (typeof compare !== "function") throw new TypeError("compare is not a function");
return (a, b) => {
const x = compare(a, b);
if (x || x === 0) return x;
return (compare(b, b) === 0) - (compare(a, a) === 0);
};
}
function ascendingDefined(a, b) {
return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);
}