@gomusdev/web-components 1.47.1 → 1.49.0
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-js/gomus-webcomponents.iife.js +72 -67
- package/dist-js/gomus-webcomponents.js +72 -67
- package/dist-js/lib/models/cart/CartItem.spec.d.ts +1 -0
- package/dist-js/lib/models/cart/selectOptions.d.ts +3 -1
- package/dist-js/lib/models/cart/selectOptions.spec.d.ts +1 -0
- package/dist-js/lib/models/cart/types.d.ts +2 -0
- package/dist-js/lib/models/scalePrice/UIScaledPrice.svelte.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4250,15 +4250,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4250
4250
|
if (!is_array(value)) {
|
|
4251
4251
|
return select_multiple_invalid_value();
|
|
4252
4252
|
}
|
|
4253
|
-
for (var
|
|
4254
|
-
|
|
4253
|
+
for (var option2 of select.options) {
|
|
4254
|
+
option2.selected = value.includes(get_option_value(option2));
|
|
4255
4255
|
}
|
|
4256
4256
|
return;
|
|
4257
4257
|
}
|
|
4258
|
-
for (
|
|
4259
|
-
var option_value = get_option_value(
|
|
4258
|
+
for (option2 of select.options) {
|
|
4259
|
+
var option_value = get_option_value(option2);
|
|
4260
4260
|
if (is(option_value, value)) {
|
|
4261
|
-
|
|
4261
|
+
option2.selected = true;
|
|
4262
4262
|
return;
|
|
4263
4263
|
}
|
|
4264
4264
|
}
|
|
@@ -4327,11 +4327,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4327
4327
|
});
|
|
4328
4328
|
init_select(select);
|
|
4329
4329
|
}
|
|
4330
|
-
function get_option_value(
|
|
4331
|
-
if ("__value" in
|
|
4332
|
-
return
|
|
4330
|
+
function get_option_value(option2) {
|
|
4331
|
+
if ("__value" in option2) {
|
|
4332
|
+
return option2.__value;
|
|
4333
4333
|
} else {
|
|
4334
|
-
return
|
|
4334
|
+
return option2.value;
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
4337
|
const CLASS = /* @__PURE__ */ Symbol("class");
|
|
@@ -6450,8 +6450,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
6450
6450
|
promise() {
|
|
6451
6451
|
return ZodPromise.create(this, this._def);
|
|
6452
6452
|
}
|
|
6453
|
-
or(
|
|
6454
|
-
return ZodUnion$1.create([this,
|
|
6453
|
+
or(option2) {
|
|
6454
|
+
return ZodUnion$1.create([this, option2], this._def);
|
|
6455
6455
|
}
|
|
6456
6456
|
and(incoming) {
|
|
6457
6457
|
return ZodIntersection$1.create(this, incoming, this._def);
|
|
@@ -8213,7 +8213,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8213
8213
|
return INVALID;
|
|
8214
8214
|
}
|
|
8215
8215
|
if (ctx.common.async) {
|
|
8216
|
-
return Promise.all(options.map(async (
|
|
8216
|
+
return Promise.all(options.map(async (option2) => {
|
|
8217
8217
|
const childCtx = {
|
|
8218
8218
|
...ctx,
|
|
8219
8219
|
common: {
|
|
@@ -8223,7 +8223,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8223
8223
|
parent: null
|
|
8224
8224
|
};
|
|
8225
8225
|
return {
|
|
8226
|
-
result: await
|
|
8226
|
+
result: await option2._parseAsync({
|
|
8227
8227
|
data: ctx.data,
|
|
8228
8228
|
path: ctx.path,
|
|
8229
8229
|
parent: childCtx
|
|
@@ -8234,7 +8234,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8234
8234
|
} else {
|
|
8235
8235
|
let dirty = void 0;
|
|
8236
8236
|
const issues = [];
|
|
8237
|
-
for (const
|
|
8237
|
+
for (const option2 of options) {
|
|
8238
8238
|
const childCtx = {
|
|
8239
8239
|
...ctx,
|
|
8240
8240
|
common: {
|
|
@@ -8243,7 +8243,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8243
8243
|
},
|
|
8244
8244
|
parent: null
|
|
8245
8245
|
};
|
|
8246
|
-
const result =
|
|
8246
|
+
const result = option2._parseSync({
|
|
8247
8247
|
data: ctx.data,
|
|
8248
8248
|
path: ctx.path,
|
|
8249
8249
|
parent: childCtx
|
|
@@ -8324,8 +8324,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8324
8324
|
}
|
|
8325
8325
|
const discriminator = this.discriminator;
|
|
8326
8326
|
const discriminatorValue = ctx.data[discriminator];
|
|
8327
|
-
const
|
|
8328
|
-
if (!
|
|
8327
|
+
const option2 = this.optionsMap.get(discriminatorValue);
|
|
8328
|
+
if (!option2) {
|
|
8329
8329
|
addIssueToContext(ctx, {
|
|
8330
8330
|
code: ZodIssueCode.invalid_union_discriminator,
|
|
8331
8331
|
options: Array.from(this.optionsMap.keys()),
|
|
@@ -8334,13 +8334,13 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8334
8334
|
return INVALID;
|
|
8335
8335
|
}
|
|
8336
8336
|
if (ctx.common.async) {
|
|
8337
|
-
return
|
|
8337
|
+
return option2._parseAsync({
|
|
8338
8338
|
data: ctx.data,
|
|
8339
8339
|
path: ctx.path,
|
|
8340
8340
|
parent: ctx
|
|
8341
8341
|
});
|
|
8342
8342
|
} else {
|
|
8343
|
-
return
|
|
8343
|
+
return option2._parseSync({
|
|
8344
8344
|
data: ctx.data,
|
|
8345
8345
|
path: ctx.path,
|
|
8346
8346
|
parent: ctx
|
|
@@ -11197,6 +11197,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
11197
11197
|
return this.uuid + ":" + this.quantity;
|
|
11198
11198
|
},
|
|
11199
11199
|
get price_cents() {
|
|
11200
|
+
if (this.time && this.product.dynamic_prices?.[this.time] != null) {
|
|
11201
|
+
return this.product.dynamic_prices[this.time];
|
|
11202
|
+
}
|
|
11200
11203
|
return this.product.price_cents;
|
|
11201
11204
|
},
|
|
11202
11205
|
get price_formatted() {
|
|
@@ -11226,10 +11229,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
11226
11229
|
const type = cartItem.type;
|
|
11227
11230
|
switch (type) {
|
|
11228
11231
|
case "Ticket":
|
|
11229
|
-
if (cartItem.product.
|
|
11232
|
+
if (cartItem.product.type === "timeslot" && !inTheFuture(cartItem.time)) return;
|
|
11230
11233
|
const ticket = createUITicket(cartItem.product);
|
|
11231
11234
|
return createCartItem(ticket, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11232
11235
|
case "Event":
|
|
11236
|
+
if (cartItem.time && !inTheFuture(cartItem.time)) return;
|
|
11233
11237
|
const event2 = createUIScaledPricesTicket(cartItem.product, cartItem.id);
|
|
11234
11238
|
return createCartItem(event2, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11235
11239
|
default:
|
|
@@ -14081,7 +14085,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14081
14085
|
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
14082
14086
|
defineLazy(inst._zod, "values", () => {
|
|
14083
14087
|
if (def.options.every((o) => o._zod.values)) {
|
|
14084
|
-
return new Set(def.options.flatMap((
|
|
14088
|
+
return new Set(def.options.flatMap((option2) => Array.from(option2._zod.values)));
|
|
14085
14089
|
}
|
|
14086
14090
|
return void 0;
|
|
14087
14091
|
});
|
|
@@ -14100,8 +14104,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14100
14104
|
}
|
|
14101
14105
|
let async = false;
|
|
14102
14106
|
const results = [];
|
|
14103
|
-
for (const
|
|
14104
|
-
const result =
|
|
14107
|
+
for (const option2 of def.options) {
|
|
14108
|
+
const result = option2._zod.run({
|
|
14105
14109
|
value: payload.value,
|
|
14106
14110
|
issues: []
|
|
14107
14111
|
}, ctx);
|
|
@@ -15271,8 +15275,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15271
15275
|
return false;
|
|
15272
15276
|
}
|
|
15273
15277
|
if (def.type === "union") {
|
|
15274
|
-
for (const
|
|
15275
|
-
if (isTransforming(
|
|
15278
|
+
for (const option2 of def.options) {
|
|
15279
|
+
if (isTransforming(option2, ctx))
|
|
15276
15280
|
return true;
|
|
15277
15281
|
}
|
|
15278
15282
|
return false;
|
|
@@ -16857,23 +16861,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16857
16861
|
return pop($$exports);
|
|
16858
16862
|
}
|
|
16859
16863
|
create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
|
|
16860
|
-
function generateQuantityOptions(
|
|
16861
|
-
|
|
16862
|
-
if (
|
|
16863
|
-
return
|
|
16864
|
+
function generateQuantityOptions(from, to, options = { floor: 0 }) {
|
|
16865
|
+
const { floor: floor2 } = options;
|
|
16866
|
+
if (to === 0 || to === floor2) {
|
|
16867
|
+
return [option(floor2)];
|
|
16864
16868
|
}
|
|
16865
|
-
if (
|
|
16866
|
-
|
|
16867
|
-
options = [];
|
|
16869
|
+
if (to < from) {
|
|
16870
|
+
return from > floor2 ? [option(from)] : [];
|
|
16868
16871
|
}
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
});
|
|
16872
|
+
const start = Math.max(from, floor2);
|
|
16873
|
+
const result = [option(floor2)];
|
|
16874
|
+
for (let q = start; q <= to; q++) {
|
|
16875
|
+
if (q === floor2) continue;
|
|
16876
|
+
result.push(option(q));
|
|
16875
16877
|
}
|
|
16876
|
-
return
|
|
16878
|
+
return result;
|
|
16879
|
+
}
|
|
16880
|
+
function option(value) {
|
|
16881
|
+
return { value, label: value.toString() };
|
|
16877
16882
|
}
|
|
16878
16883
|
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
16879
16884
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
@@ -16977,19 +16982,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16977
16982
|
var alternate_1 = ($$anchor3) => {
|
|
16978
16983
|
var select = root_6$2();
|
|
16979
16984
|
select.__change = (e) => update(cartItem(), e.target);
|
|
16980
|
-
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor4, q) => {
|
|
16981
|
-
var
|
|
16982
|
-
var text_2 = child(
|
|
16983
|
-
reset(
|
|
16985
|
+
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor4, q) => {
|
|
16986
|
+
var option2 = root_7$3();
|
|
16987
|
+
var text_2 = child(option2, true);
|
|
16988
|
+
reset(option2);
|
|
16984
16989
|
var option_value = {};
|
|
16985
16990
|
template_effect(() => {
|
|
16986
|
-
set_selected(
|
|
16991
|
+
set_selected(option2, cartItem().quantity === get$2(q).value);
|
|
16987
16992
|
set_text(text_2, get$2(q).label);
|
|
16988
16993
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
16989
|
-
|
|
16994
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
16990
16995
|
}
|
|
16991
16996
|
});
|
|
16992
|
-
append($$anchor4,
|
|
16997
|
+
append($$anchor4, option2);
|
|
16993
16998
|
});
|
|
16994
16999
|
reset(select);
|
|
16995
17000
|
append($$anchor3, select);
|
|
@@ -17412,18 +17417,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17412
17417
|
var text2 = child(h3, true);
|
|
17413
17418
|
reset(h3);
|
|
17414
17419
|
var div_1 = sibling(h3, 2);
|
|
17415
|
-
each(div_1, 20, () => goDonation.campaign?.options, (
|
|
17420
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option2) => option2, ($$anchor2, option2) => {
|
|
17416
17421
|
var button = root_1$g();
|
|
17417
17422
|
let classes;
|
|
17418
|
-
button.__click = () => selectAmount(
|
|
17423
|
+
button.__click = () => selectAmount(option2);
|
|
17419
17424
|
var text_1 = child(button, true);
|
|
17420
17425
|
reset(button);
|
|
17421
17426
|
template_effect(
|
|
17422
17427
|
($0) => {
|
|
17423
|
-
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount ===
|
|
17428
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option2 });
|
|
17424
17429
|
set_text(text_1, $0);
|
|
17425
17430
|
},
|
|
17426
|
-
[() => currency(
|
|
17431
|
+
[() => currency(option2 / 100, shop.currency)]
|
|
17427
17432
|
);
|
|
17428
17433
|
append($$anchor2, button);
|
|
17429
17434
|
});
|
|
@@ -18797,9 +18802,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18797
18802
|
const propValue = getProp();
|
|
18798
18803
|
if (propValue !== void 0)
|
|
18799
18804
|
return propValue;
|
|
18800
|
-
const
|
|
18801
|
-
if (
|
|
18802
|
-
return
|
|
18805
|
+
const option2 = configOption(config2).current;
|
|
18806
|
+
if (option2 !== void 0)
|
|
18807
|
+
return option2;
|
|
18803
18808
|
return fallback;
|
|
18804
18809
|
});
|
|
18805
18810
|
};
|
|
@@ -31266,15 +31271,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31266
31271
|
reset(option_1);
|
|
31267
31272
|
option_1.value = option_1.__value = "";
|
|
31268
31273
|
var node_5 = sibling(option_1, 2);
|
|
31269
|
-
each(node_5, 17, () => field().options(), index$1, ($$anchor4,
|
|
31274
|
+
each(node_5, 17, () => field().options(), index$1, ($$anchor4, option2) => {
|
|
31270
31275
|
var option_2 = root_7$2();
|
|
31271
31276
|
var text_2 = child(option_2, true);
|
|
31272
31277
|
reset(option_2);
|
|
31273
31278
|
var option_2_value = {};
|
|
31274
31279
|
template_effect(() => {
|
|
31275
|
-
set_text(text_2, get$2(
|
|
31276
|
-
if (option_2_value !== (option_2_value = get$2(
|
|
31277
|
-
option_2.value = (option_2.__value = get$2(
|
|
31280
|
+
set_text(text_2, get$2(option2).label);
|
|
31281
|
+
if (option_2_value !== (option_2_value = get$2(option2).value)) {
|
|
31282
|
+
option_2.value = (option_2.__value = get$2(option2).value) ?? "";
|
|
31278
31283
|
}
|
|
31279
31284
|
});
|
|
31280
31285
|
append($$anchor4, option_2);
|
|
@@ -31324,7 +31329,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31324
31329
|
var consequent_2 = ($$anchor3) => {
|
|
31325
31330
|
var fragment_5 = comment();
|
|
31326
31331
|
var node_8 = first_child(fragment_5);
|
|
31327
|
-
each(node_8, 17, () => field().options, index$1, ($$anchor4,
|
|
31332
|
+
each(node_8, 17, () => field().options, index$1, ($$anchor4, option2) => {
|
|
31328
31333
|
var label_4 = root_11$2();
|
|
31329
31334
|
var text_3 = child(label_4);
|
|
31330
31335
|
var input_3 = sibling(text_3);
|
|
@@ -31345,8 +31350,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31345
31350
|
reset(label_4);
|
|
31346
31351
|
template_effect(() => {
|
|
31347
31352
|
set_class(label_4, 1, clsx(labelClass()));
|
|
31348
|
-
set_attribute(label_4, "for", get$2(inputId) + get$2(
|
|
31349
|
-
set_text(text_3, `${get$2(
|
|
31353
|
+
set_attribute(label_4, "for", get$2(inputId) + get$2(option2));
|
|
31354
|
+
set_text(text_3, `${get$2(option2) ?? ""} `);
|
|
31350
31355
|
});
|
|
31351
31356
|
bind_value(input_3, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
31352
31357
|
append($$anchor4, label_4);
|
|
@@ -33507,18 +33512,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33507
33512
|
var select = child(li_4);
|
|
33508
33513
|
select.__change = (e) => update(item(), e.target, details()?.ticketSelectionDetails);
|
|
33509
33514
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor3, q) => {
|
|
33510
|
-
var
|
|
33511
|
-
var text_4 = child(
|
|
33512
|
-
reset(
|
|
33515
|
+
var option2 = root_4();
|
|
33516
|
+
var text_4 = child(option2, true);
|
|
33517
|
+
reset(option2);
|
|
33513
33518
|
var option_value = {};
|
|
33514
33519
|
template_effect(() => {
|
|
33515
|
-
set_selected(
|
|
33520
|
+
set_selected(option2, item().quantity === get$2(q).value);
|
|
33516
33521
|
set_text(text_4, get$2(q).label);
|
|
33517
33522
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
33518
|
-
|
|
33523
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
33519
33524
|
}
|
|
33520
33525
|
});
|
|
33521
|
-
append($$anchor3,
|
|
33526
|
+
append($$anchor3, option2);
|
|
33522
33527
|
});
|
|
33523
33528
|
reset(select);
|
|
33524
33529
|
reset(li_4);
|
|
@@ -33572,7 +33577,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33572
33577
|
reset(ul);
|
|
33573
33578
|
reset(li);
|
|
33574
33579
|
var node_1 = sibling(li, 2);
|
|
33575
|
-
each(node_1, 17, () => get$2(details).preCart.items,
|
|
33580
|
+
each(node_1, 17, () => get$2(details).preCart.items, (ci) => ci.uuid, ($$anchor3, ci) => {
|
|
33576
33581
|
Item($$anchor3, {
|
|
33577
33582
|
get item() {
|
|
33578
33583
|
return get$2(ci);
|
|
@@ -4248,15 +4248,15 @@ function select_option(select, value, mounting = false) {
|
|
|
4248
4248
|
if (!is_array(value)) {
|
|
4249
4249
|
return select_multiple_invalid_value();
|
|
4250
4250
|
}
|
|
4251
|
-
for (var
|
|
4252
|
-
|
|
4251
|
+
for (var option2 of select.options) {
|
|
4252
|
+
option2.selected = value.includes(get_option_value(option2));
|
|
4253
4253
|
}
|
|
4254
4254
|
return;
|
|
4255
4255
|
}
|
|
4256
|
-
for (
|
|
4257
|
-
var option_value = get_option_value(
|
|
4256
|
+
for (option2 of select.options) {
|
|
4257
|
+
var option_value = get_option_value(option2);
|
|
4258
4258
|
if (is(option_value, value)) {
|
|
4259
|
-
|
|
4259
|
+
option2.selected = true;
|
|
4260
4260
|
return;
|
|
4261
4261
|
}
|
|
4262
4262
|
}
|
|
@@ -4325,11 +4325,11 @@ function bind_select_value(select, get2, set2 = get2) {
|
|
|
4325
4325
|
});
|
|
4326
4326
|
init_select(select);
|
|
4327
4327
|
}
|
|
4328
|
-
function get_option_value(
|
|
4329
|
-
if ("__value" in
|
|
4330
|
-
return
|
|
4328
|
+
function get_option_value(option2) {
|
|
4329
|
+
if ("__value" in option2) {
|
|
4330
|
+
return option2.__value;
|
|
4331
4331
|
} else {
|
|
4332
|
-
return
|
|
4332
|
+
return option2.value;
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
4335
|
const CLASS = /* @__PURE__ */ Symbol("class");
|
|
@@ -6450,8 +6450,8 @@ let ZodType$1 = class ZodType {
|
|
|
6450
6450
|
promise() {
|
|
6451
6451
|
return ZodPromise.create(this, this._def);
|
|
6452
6452
|
}
|
|
6453
|
-
or(
|
|
6454
|
-
return ZodUnion$1.create([this,
|
|
6453
|
+
or(option2) {
|
|
6454
|
+
return ZodUnion$1.create([this, option2], this._def);
|
|
6455
6455
|
}
|
|
6456
6456
|
and(incoming) {
|
|
6457
6457
|
return ZodIntersection$1.create(this, incoming, this._def);
|
|
@@ -8213,7 +8213,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8213
8213
|
return INVALID;
|
|
8214
8214
|
}
|
|
8215
8215
|
if (ctx.common.async) {
|
|
8216
|
-
return Promise.all(options.map(async (
|
|
8216
|
+
return Promise.all(options.map(async (option2) => {
|
|
8217
8217
|
const childCtx = {
|
|
8218
8218
|
...ctx,
|
|
8219
8219
|
common: {
|
|
@@ -8223,7 +8223,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8223
8223
|
parent: null
|
|
8224
8224
|
};
|
|
8225
8225
|
return {
|
|
8226
|
-
result: await
|
|
8226
|
+
result: await option2._parseAsync({
|
|
8227
8227
|
data: ctx.data,
|
|
8228
8228
|
path: ctx.path,
|
|
8229
8229
|
parent: childCtx
|
|
@@ -8234,7 +8234,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8234
8234
|
} else {
|
|
8235
8235
|
let dirty = void 0;
|
|
8236
8236
|
const issues = [];
|
|
8237
|
-
for (const
|
|
8237
|
+
for (const option2 of options) {
|
|
8238
8238
|
const childCtx = {
|
|
8239
8239
|
...ctx,
|
|
8240
8240
|
common: {
|
|
@@ -8243,7 +8243,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8243
8243
|
},
|
|
8244
8244
|
parent: null
|
|
8245
8245
|
};
|
|
8246
|
-
const result =
|
|
8246
|
+
const result = option2._parseSync({
|
|
8247
8247
|
data: ctx.data,
|
|
8248
8248
|
path: ctx.path,
|
|
8249
8249
|
parent: childCtx
|
|
@@ -8324,8 +8324,8 @@ class ZodDiscriminatedUnion extends ZodType$1 {
|
|
|
8324
8324
|
}
|
|
8325
8325
|
const discriminator = this.discriminator;
|
|
8326
8326
|
const discriminatorValue = ctx.data[discriminator];
|
|
8327
|
-
const
|
|
8328
|
-
if (!
|
|
8327
|
+
const option2 = this.optionsMap.get(discriminatorValue);
|
|
8328
|
+
if (!option2) {
|
|
8329
8329
|
addIssueToContext(ctx, {
|
|
8330
8330
|
code: ZodIssueCode.invalid_union_discriminator,
|
|
8331
8331
|
options: Array.from(this.optionsMap.keys()),
|
|
@@ -8334,13 +8334,13 @@ class ZodDiscriminatedUnion extends ZodType$1 {
|
|
|
8334
8334
|
return INVALID;
|
|
8335
8335
|
}
|
|
8336
8336
|
if (ctx.common.async) {
|
|
8337
|
-
return
|
|
8337
|
+
return option2._parseAsync({
|
|
8338
8338
|
data: ctx.data,
|
|
8339
8339
|
path: ctx.path,
|
|
8340
8340
|
parent: ctx
|
|
8341
8341
|
});
|
|
8342
8342
|
} else {
|
|
8343
|
-
return
|
|
8343
|
+
return option2._parseSync({
|
|
8344
8344
|
data: ctx.data,
|
|
8345
8345
|
path: ctx.path,
|
|
8346
8346
|
parent: ctx
|
|
@@ -11197,6 +11197,9 @@ function createCartItem(product, options) {
|
|
|
11197
11197
|
return this.uuid + ":" + this.quantity;
|
|
11198
11198
|
},
|
|
11199
11199
|
get price_cents() {
|
|
11200
|
+
if (this.time && this.product.dynamic_prices?.[this.time] != null) {
|
|
11201
|
+
return this.product.dynamic_prices[this.time];
|
|
11202
|
+
}
|
|
11200
11203
|
return this.product.price_cents;
|
|
11201
11204
|
},
|
|
11202
11205
|
get price_formatted() {
|
|
@@ -11226,10 +11229,11 @@ function generateCartItem(cartItem) {
|
|
|
11226
11229
|
const type = cartItem.type;
|
|
11227
11230
|
switch (type) {
|
|
11228
11231
|
case "Ticket":
|
|
11229
|
-
if (cartItem.product.
|
|
11232
|
+
if (cartItem.product.type === "timeslot" && !inTheFuture(cartItem.time)) return;
|
|
11230
11233
|
const ticket = createUITicket(cartItem.product);
|
|
11231
11234
|
return createCartItem(ticket, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11232
11235
|
case "Event":
|
|
11236
|
+
if (cartItem.time && !inTheFuture(cartItem.time)) return;
|
|
11233
11237
|
const event2 = createUIScaledPricesTicket(cartItem.product, cartItem.id);
|
|
11234
11238
|
return createCartItem(event2, { time: cartItem.time, quantity: cartItem.quantity });
|
|
11235
11239
|
default:
|
|
@@ -14081,7 +14085,7 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
14081
14085
|
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
14082
14086
|
defineLazy(inst._zod, "values", () => {
|
|
14083
14087
|
if (def.options.every((o) => o._zod.values)) {
|
|
14084
|
-
return new Set(def.options.flatMap((
|
|
14088
|
+
return new Set(def.options.flatMap((option2) => Array.from(option2._zod.values)));
|
|
14085
14089
|
}
|
|
14086
14090
|
return void 0;
|
|
14087
14091
|
});
|
|
@@ -14100,8 +14104,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
14100
14104
|
}
|
|
14101
14105
|
let async = false;
|
|
14102
14106
|
const results = [];
|
|
14103
|
-
for (const
|
|
14104
|
-
const result =
|
|
14107
|
+
for (const option2 of def.options) {
|
|
14108
|
+
const result = option2._zod.run({
|
|
14105
14109
|
value: payload.value,
|
|
14106
14110
|
issues: []
|
|
14107
14111
|
}, ctx);
|
|
@@ -15271,8 +15275,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
15271
15275
|
return false;
|
|
15272
15276
|
}
|
|
15273
15277
|
if (def.type === "union") {
|
|
15274
|
-
for (const
|
|
15275
|
-
if (isTransforming(
|
|
15278
|
+
for (const option2 of def.options) {
|
|
15279
|
+
if (isTransforming(option2, ctx))
|
|
15276
15280
|
return true;
|
|
15277
15281
|
}
|
|
15278
15282
|
return false;
|
|
@@ -16857,23 +16861,24 @@ function Ticket($$anchor, $$props) {
|
|
|
16857
16861
|
return pop($$exports);
|
|
16858
16862
|
}
|
|
16859
16863
|
create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
|
|
16860
|
-
function generateQuantityOptions(
|
|
16861
|
-
|
|
16862
|
-
if (
|
|
16863
|
-
return
|
|
16864
|
+
function generateQuantityOptions(from, to, options = { floor: 0 }) {
|
|
16865
|
+
const { floor: floor2 } = options;
|
|
16866
|
+
if (to === 0 || to === floor2) {
|
|
16867
|
+
return [option(floor2)];
|
|
16864
16868
|
}
|
|
16865
|
-
if (
|
|
16866
|
-
|
|
16867
|
-
options = [];
|
|
16869
|
+
if (to < from) {
|
|
16870
|
+
return from > floor2 ? [option(from)] : [];
|
|
16868
16871
|
}
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
});
|
|
16872
|
+
const start = Math.max(from, floor2);
|
|
16873
|
+
const result = [option(floor2)];
|
|
16874
|
+
for (let q = start; q <= to; q++) {
|
|
16875
|
+
if (q === floor2) continue;
|
|
16876
|
+
result.push(option(q));
|
|
16875
16877
|
}
|
|
16876
|
-
return
|
|
16878
|
+
return result;
|
|
16879
|
+
}
|
|
16880
|
+
function option(value) {
|
|
16881
|
+
return { value, label: value.toString() };
|
|
16877
16882
|
}
|
|
16878
16883
|
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
16879
16884
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
@@ -16977,19 +16982,19 @@ function Item$1($$anchor, $$props) {
|
|
|
16977
16982
|
var alternate_1 = ($$anchor3) => {
|
|
16978
16983
|
var select = root_6$2();
|
|
16979
16984
|
select.__change = (e) => update(cartItem(), e.target);
|
|
16980
|
-
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor4, q) => {
|
|
16981
|
-
var
|
|
16982
|
-
var text_2 = child(
|
|
16983
|
-
reset(
|
|
16985
|
+
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor4, q) => {
|
|
16986
|
+
var option2 = root_7$3();
|
|
16987
|
+
var text_2 = child(option2, true);
|
|
16988
|
+
reset(option2);
|
|
16984
16989
|
var option_value = {};
|
|
16985
16990
|
template_effect(() => {
|
|
16986
|
-
set_selected(
|
|
16991
|
+
set_selected(option2, cartItem().quantity === get$2(q).value);
|
|
16987
16992
|
set_text(text_2, get$2(q).label);
|
|
16988
16993
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
16989
|
-
|
|
16994
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
16990
16995
|
}
|
|
16991
16996
|
});
|
|
16992
|
-
append($$anchor4,
|
|
16997
|
+
append($$anchor4, option2);
|
|
16993
16998
|
});
|
|
16994
16999
|
reset(select);
|
|
16995
17000
|
append($$anchor3, select);
|
|
@@ -17412,18 +17417,18 @@ function DonationSelector($$anchor, $$props) {
|
|
|
17412
17417
|
var text2 = child(h3, true);
|
|
17413
17418
|
reset(h3);
|
|
17414
17419
|
var div_1 = sibling(h3, 2);
|
|
17415
|
-
each(div_1, 20, () => goDonation.campaign?.options, (
|
|
17420
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option2) => option2, ($$anchor2, option2) => {
|
|
17416
17421
|
var button = root_1$g();
|
|
17417
17422
|
let classes;
|
|
17418
|
-
button.__click = () => selectAmount(
|
|
17423
|
+
button.__click = () => selectAmount(option2);
|
|
17419
17424
|
var text_1 = child(button, true);
|
|
17420
17425
|
reset(button);
|
|
17421
17426
|
template_effect(
|
|
17422
17427
|
($0) => {
|
|
17423
|
-
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount ===
|
|
17428
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option2 });
|
|
17424
17429
|
set_text(text_1, $0);
|
|
17425
17430
|
},
|
|
17426
|
-
[() => currency(
|
|
17431
|
+
[() => currency(option2 / 100, shop.currency)]
|
|
17427
17432
|
);
|
|
17428
17433
|
append($$anchor2, button);
|
|
17429
17434
|
});
|
|
@@ -18797,9 +18802,9 @@ function createPropResolver(configOption, fallback) {
|
|
|
18797
18802
|
const propValue = getProp();
|
|
18798
18803
|
if (propValue !== void 0)
|
|
18799
18804
|
return propValue;
|
|
18800
|
-
const
|
|
18801
|
-
if (
|
|
18802
|
-
return
|
|
18805
|
+
const option2 = configOption(config2).current;
|
|
18806
|
+
if (option2 !== void 0)
|
|
18807
|
+
return option2;
|
|
18803
18808
|
return fallback;
|
|
18804
18809
|
});
|
|
18805
18810
|
};
|
|
@@ -31266,15 +31271,15 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31266
31271
|
reset(option_1);
|
|
31267
31272
|
option_1.value = option_1.__value = "";
|
|
31268
31273
|
var node_5 = sibling(option_1, 2);
|
|
31269
|
-
each(node_5, 17, () => field().options(), index$1, ($$anchor4,
|
|
31274
|
+
each(node_5, 17, () => field().options(), index$1, ($$anchor4, option2) => {
|
|
31270
31275
|
var option_2 = root_7$2();
|
|
31271
31276
|
var text_2 = child(option_2, true);
|
|
31272
31277
|
reset(option_2);
|
|
31273
31278
|
var option_2_value = {};
|
|
31274
31279
|
template_effect(() => {
|
|
31275
|
-
set_text(text_2, get$2(
|
|
31276
|
-
if (option_2_value !== (option_2_value = get$2(
|
|
31277
|
-
option_2.value = (option_2.__value = get$2(
|
|
31280
|
+
set_text(text_2, get$2(option2).label);
|
|
31281
|
+
if (option_2_value !== (option_2_value = get$2(option2).value)) {
|
|
31282
|
+
option_2.value = (option_2.__value = get$2(option2).value) ?? "";
|
|
31278
31283
|
}
|
|
31279
31284
|
});
|
|
31280
31285
|
append($$anchor4, option_2);
|
|
@@ -31324,7 +31329,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31324
31329
|
var consequent_2 = ($$anchor3) => {
|
|
31325
31330
|
var fragment_5 = comment();
|
|
31326
31331
|
var node_8 = first_child(fragment_5);
|
|
31327
|
-
each(node_8, 17, () => field().options, index$1, ($$anchor4,
|
|
31332
|
+
each(node_8, 17, () => field().options, index$1, ($$anchor4, option2) => {
|
|
31328
31333
|
var label_4 = root_11$2();
|
|
31329
31334
|
var text_3 = child(label_4);
|
|
31330
31335
|
var input_3 = sibling(text_3);
|
|
@@ -31345,8 +31350,8 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31345
31350
|
reset(label_4);
|
|
31346
31351
|
template_effect(() => {
|
|
31347
31352
|
set_class(label_4, 1, clsx(labelClass()));
|
|
31348
|
-
set_attribute(label_4, "for", get$2(inputId) + get$2(
|
|
31349
|
-
set_text(text_3, `${get$2(
|
|
31353
|
+
set_attribute(label_4, "for", get$2(inputId) + get$2(option2));
|
|
31354
|
+
set_text(text_3, `${get$2(option2) ?? ""} `);
|
|
31350
31355
|
});
|
|
31351
31356
|
bind_value(input_3, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
31352
31357
|
append($$anchor4, label_4);
|
|
@@ -33507,18 +33512,18 @@ function Item($$anchor, $$props) {
|
|
|
33507
33512
|
var select = child(li_4);
|
|
33508
33513
|
select.__change = (e) => update(item(), e.target, details()?.ticketSelectionDetails);
|
|
33509
33514
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor3, q) => {
|
|
33510
|
-
var
|
|
33511
|
-
var text_4 = child(
|
|
33512
|
-
reset(
|
|
33515
|
+
var option2 = root_4();
|
|
33516
|
+
var text_4 = child(option2, true);
|
|
33517
|
+
reset(option2);
|
|
33513
33518
|
var option_value = {};
|
|
33514
33519
|
template_effect(() => {
|
|
33515
|
-
set_selected(
|
|
33520
|
+
set_selected(option2, item().quantity === get$2(q).value);
|
|
33516
33521
|
set_text(text_4, get$2(q).label);
|
|
33517
33522
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
33518
|
-
|
|
33523
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
33519
33524
|
}
|
|
33520
33525
|
});
|
|
33521
|
-
append($$anchor3,
|
|
33526
|
+
append($$anchor3, option2);
|
|
33522
33527
|
});
|
|
33523
33528
|
reset(select);
|
|
33524
33529
|
reset(li_4);
|
|
@@ -33572,7 +33577,7 @@ function Body($$anchor, $$props) {
|
|
|
33572
33577
|
reset(ul);
|
|
33573
33578
|
reset(li);
|
|
33574
33579
|
var node_1 = sibling(li, 2);
|
|
33575
|
-
each(node_1, 17, () => get$2(details).preCart.items,
|
|
33580
|
+
each(node_1, 17, () => get$2(details).preCart.items, (ci) => ci.uuid, ($$anchor3, ci) => {
|
|
33576
33581
|
Item($$anchor3, {
|
|
33577
33582
|
get item() {
|
|
33578
33583
|
return get$2(ci);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -27,6 +27,7 @@ export declare function createUIScaledPricesTicket(apiTicket: EventScalePriceTic
|
|
|
27
27
|
id: number;
|
|
28
28
|
tax_included: boolean;
|
|
29
29
|
product_type: ProductType;
|
|
30
|
+
dynamic_prices?: Record<string, number> | null;
|
|
30
31
|
uid: number;
|
|
31
32
|
dateId: number;
|
|
32
33
|
scalePriceId: number;
|