Files
klz-cables.com/.pnpm-store/v10/files/7b/b0a0a8278ad37947002efdb0c01131028b5b3046970255f3b1458fcfb7187fab50ad93f54d4401f862a90a4db8a520989ee84fce85293d23beb3f6482bf2f8
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

67 lines
1.3 KiB
Plaintext

"use strict";
exports.ValueSetter = exports.Setter = exports.DateTimezoneSetter = void 0;
var _index = require("../../constructFrom.cjs");
var _index2 = require("../../transpose.cjs");
const TIMEZONE_UNIT_PRIORITY = 10;
class Setter {
subPriority = 0;
validate(_utcDate, _options) {
return true;
}
}
exports.Setter = Setter;
class ValueSetter extends Setter {
constructor(
value,
validateValue,
setValue,
priority,
subPriority,
) {
super();
this.value = value;
this.validateValue = validateValue;
this.setValue = setValue;
this.priority = priority;
if (subPriority) {
this.subPriority = subPriority;
}
}
validate(date, options) {
return this.validateValue(date, this.value, options);
}
set(date, flags, options) {
return this.setValue(date, flags, this.value, options);
}
}
exports.ValueSetter = ValueSetter;
class DateTimezoneSetter extends Setter {
priority = TIMEZONE_UNIT_PRIORITY;
subPriority = -1;
constructor(context, reference) {
super();
this.context =
context || ((date) => (0, _index.constructFrom)(reference, date));
}
set(date, flags) {
if (flags.timestampIsSet) return date;
return (0, _index.constructFrom)(
date,
(0, _index2.transpose)(date, this.context),
);
}
}
exports.DateTimezoneSetter = DateTimezoneSetter;