@gomusdev/web-components 0.0.17 → 0.0.18
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.css +111 -0
- package/dist-js/gomus-webcomponents.iife.js +178 -294
- package/package.json +1 -1
|
@@ -975,3 +975,114 @@ ul[data-go-timeslots] label:hover {
|
|
|
975
975
|
ul[data-go-timeslots] input:focus + label {
|
|
976
976
|
outline: 2px solid #0052cc;
|
|
977
977
|
}
|
|
978
|
+
|
|
979
|
+
go-tickets {
|
|
980
|
+
/*// Tweak these numbers to change column ratios (must match header + rows)*/
|
|
981
|
+
--col-title: 2;
|
|
982
|
+
--col-desc: 4;
|
|
983
|
+
--col-price: 1;
|
|
984
|
+
--col-qty: 1;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
go-tickets [data-testid='tickets'] {
|
|
988
|
+
margin: 0;
|
|
989
|
+
padding: 0;
|
|
990
|
+
list-style: none;
|
|
991
|
+
|
|
992
|
+
/*// Header row*/
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] {
|
|
996
|
+
top: 0;
|
|
997
|
+
background: inherit;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul {
|
|
1001
|
+
display: flex;
|
|
1002
|
+
align-items: center;
|
|
1003
|
+
gap: 1rem;
|
|
1004
|
+
padding: 0.5rem 0;
|
|
1005
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
1006
|
+
font-weight: 600;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul > li {
|
|
1010
|
+
list-style: none;
|
|
1011
|
+
/*// allow truncation*/
|
|
1012
|
+
min-width: 0;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul > li:first-child {
|
|
1016
|
+
padding-left: 0;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul [data-go-tickets-title] {
|
|
1020
|
+
flex: var(--col-title) 0 0;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul [data-go-tickets-description] {
|
|
1024
|
+
flex: var(--col-desc) 0 0;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul [data-go-tickets-price] {
|
|
1028
|
+
flex: var(--col-price) 0 0;
|
|
1029
|
+
text-align: right;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
go-tickets [data-testid='tickets'] > li[data-go-tickets-header] > ul [data-go-tickets-quality] {
|
|
1033
|
+
flex: var(--col-qty) 0 0;
|
|
1034
|
+
text-align: right;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/*// Data rows*/
|
|
1038
|
+
|
|
1039
|
+
go-tickets [data-testid='tickets'] > li {
|
|
1040
|
+
list-style: none;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul {
|
|
1044
|
+
display: flex;
|
|
1045
|
+
align-items: center;
|
|
1046
|
+
gap: 1rem;
|
|
1047
|
+
padding: 0.75rem 0;
|
|
1048
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul > li {
|
|
1052
|
+
list-style: none;
|
|
1053
|
+
/*// enable text truncation*/
|
|
1054
|
+
min-width: 0;
|
|
1055
|
+
/*// Optional: single-line truncation (comment out if you want wrapping)*/
|
|
1056
|
+
white-space: nowrap;
|
|
1057
|
+
overflow: hidden;
|
|
1058
|
+
text-overflow: ellipsis;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul [data-go-tickets-title] {
|
|
1062
|
+
flex: var(--col-title) 0 0;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul [data-go-tickets-description] {
|
|
1066
|
+
flex: var(--col-desc) 0 0;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul [data-go-tickets-price] {
|
|
1070
|
+
flex: var(--col-price) 0 0;
|
|
1071
|
+
text-align: right;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul [data-go-tickets-quality] {
|
|
1075
|
+
flex: var(--col-qty) 0 0;
|
|
1076
|
+
text-align: right;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
go-tickets [data-testid='tickets'] > li > article[data-go-ticket] > ul [data-go-tickets-quality] select {
|
|
1080
|
+
/*// keeps the quantity control aligned but not stretched*/
|
|
1081
|
+
margin-left: auto;
|
|
1082
|
+
/*// adjust as needed*/
|
|
1083
|
+
max-width: 8rem;
|
|
1084
|
+
|
|
1085
|
+
min-width: 4rem;
|
|
1086
|
+
min-height: 2rem;
|
|
1087
|
+
width: auto;
|
|
1088
|
+
}
|
|
@@ -11,7 +11,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
12
|
(function() {
|
|
13
13
|
"use strict";
|
|
14
|
-
var _a, _previous, _callbacks, _pending, _deferred, _neutered, _async_effects, _boundary_async_effects, _render_effects, _effects, _block_effects, _dirty_effects, _maybe_dirty_effects, _Batch_instances, traverse_effect_tree_fn, defer_effects_fn, commit_fn, _events, _instance, _data, _fetchStatus, _Shop_instances, defaultApiParams_get, _canFetch, _ensureFetch, _items, _total, _b, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _selectedTickets, _ticketList, _total2, _document, _subscribe, _name, _key, _root, _variant, _prefix, _visibleMonths, _months, _weekdays, _initialPlaceholderYear, _defaultYears, _CalendarRootState_instances, setupInitialFocusEffect_fn, setupAccessibleHeadingEffect_fn, setupFormatterEffect_fn, _isNextButtonDisabled, _isPrevButtonDisabled, _isInvalid, _headingValue, _fullCalendarLabel, isMultipleSelectionValid_fn, _snippetProps, _props, _props2, _cellDate, _isUnavailable, _isDateToday, _isOutsideMonth, _isOutsideVisibleMonths, _isDisabled, _isFocusedDate, _isSelectedDate, _labelText, _snippetProps2, _ariaDisabled, _sharedDataAttrs, _props3, _tabindex, _snippetProps3, _props4, _isDisabled2, _props5, _isDisabled3, _props6, _props7, _props8, _props9, _props10, _props11, _props12, _startAt, _selected, _c, _details, _params, _ticketSelectionDetails, _d, _ticketSelectionDetails2, _e, _ticketSelectionDetails3;
|
|
14
|
+
var _a, _previous, _callbacks, _pending, _deferred, _neutered, _async_effects, _boundary_async_effects, _render_effects, _effects, _block_effects, _dirty_effects, _maybe_dirty_effects, _Batch_instances, traverse_effect_tree_fn, defer_effects_fn, commit_fn, _events, _instance, _data, _fetchStatus, _Shop_instances, defaultApiParams_get, _canFetch, _ensureFetch, _priceCents, _priceFormatted, _quantity, _totalPriceCents, _totalPriceFormatted, _GomusTicket_instances, calcPriceCentes_fn, createTimeslots_fn, _items, _total, _b, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _selectedTickets, _ticketList, _total2, _document, _subscribe, _name, _key, _root, _variant, _prefix, _visibleMonths, _months, _weekdays, _initialPlaceholderYear, _defaultYears, _CalendarRootState_instances, setupInitialFocusEffect_fn, setupAccessibleHeadingEffect_fn, setupFormatterEffect_fn, _isNextButtonDisabled, _isPrevButtonDisabled, _isInvalid, _headingValue, _fullCalendarLabel, isMultipleSelectionValid_fn, _snippetProps, _props, _props2, _cellDate, _isUnavailable, _isDateToday, _isOutsideMonth, _isOutsideVisibleMonths, _isDisabled, _isFocusedDate, _isSelectedDate, _labelText, _snippetProps2, _ariaDisabled, _sharedDataAttrs, _props3, _tabindex, _snippetProps3, _props4, _isDisabled2, _props5, _isDisabled3, _props6, _props7, _props8, _props9, _props10, _props11, _props12, _startAt, _selected, _c, _details, _params, _ticketSelectionDetails, _d, _ticketSelectionDetails2, _e, _ticketSelectionDetails3;
|
|
15
15
|
const PUBLIC_VERSION = "5";
|
|
16
16
|
if (typeof window !== "undefined") {
|
|
17
17
|
((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add(PUBLIC_VERSION);
|
|
@@ -3567,9 +3567,6 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
3567
3567
|
const whitespace = [..." \n\r\f \v\uFEFF"];
|
|
3568
3568
|
function to_class(value, hash, directives) {
|
|
3569
3569
|
var classname = value == null ? "" : "" + value;
|
|
3570
|
-
if (hash) {
|
|
3571
|
-
classname = classname ? classname + " " + hash : hash;
|
|
3572
|
-
}
|
|
3573
3570
|
if (directives) {
|
|
3574
3571
|
for (var key in directives) {
|
|
3575
3572
|
if (directives[key]) {
|
|
@@ -10924,109 +10921,6 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
10924
10921
|
{}
|
|
10925
10922
|
);
|
|
10926
10923
|
};
|
|
10927
|
-
class GomusTicket {
|
|
10928
|
-
constructor(ticketObject, minAvailableCapacity = 0, selectedTime = "", quantity) {
|
|
10929
|
-
__publicField(this, "id");
|
|
10930
|
-
__publicField(this, "title");
|
|
10931
|
-
__publicField(this, "description");
|
|
10932
|
-
__publicField(this, "type");
|
|
10933
|
-
__publicField(this, "selectedTime");
|
|
10934
|
-
__publicField(this, "_quantity", 0);
|
|
10935
|
-
__publicField(this, "quantityOptions");
|
|
10936
|
-
__publicField(this, "vatPct");
|
|
10937
|
-
__publicField(this, "priceCents");
|
|
10938
|
-
__publicField(this, "priceFormatted");
|
|
10939
|
-
__publicField(this, "totalPriceCents");
|
|
10940
|
-
__publicField(this, "totalPriceFormatted");
|
|
10941
|
-
__publicField(this, "minQuantity");
|
|
10942
|
-
__publicField(this, "maxQuantity");
|
|
10943
|
-
__publicField(this, "maxPersons");
|
|
10944
|
-
__publicField(this, "timeSlots");
|
|
10945
|
-
__publicField(this, "capacities");
|
|
10946
|
-
__publicField(this, "totalCapacities");
|
|
10947
|
-
__publicField(this, "maxCapacity");
|
|
10948
|
-
__publicField(this, "maxTotalCapacity");
|
|
10949
|
-
__publicField(this, "quotaIds");
|
|
10950
|
-
__publicField(this, "shopOrder");
|
|
10951
|
-
__publicField(this, "minAvailableCapacity");
|
|
10952
|
-
__publicField(this, "reductionReason");
|
|
10953
|
-
__publicField(this, "ticketObject");
|
|
10954
|
-
this.ticketObject = ticketObject;
|
|
10955
|
-
this.minAvailableCapacity = minAvailableCapacity;
|
|
10956
|
-
this.id = ticketObject.id;
|
|
10957
|
-
this.title = ticketObject.title;
|
|
10958
|
-
this.description = ticketObject.description;
|
|
10959
|
-
this.type = ticketObject.ticket_type;
|
|
10960
|
-
this.selectedTime = selectedTime;
|
|
10961
|
-
this.vatPct = ticketObject.vat_pct;
|
|
10962
|
-
if (ticketObject.tax_included) {
|
|
10963
|
-
this.priceCents = ticketObject.price_cents;
|
|
10964
|
-
} else {
|
|
10965
|
-
this.priceCents = ticketObject.price_cents * (1 + this.vatPct / 100);
|
|
10966
|
-
}
|
|
10967
|
-
this.priceFormatted = formatCurrency$1(this.priceCents);
|
|
10968
|
-
this.quantity = quantity || 0;
|
|
10969
|
-
this.minQuantity = ticketObject.min_persons;
|
|
10970
|
-
this.maxPersons = ticketObject.max_persons;
|
|
10971
|
-
this.maxTotalCapacity = ticketObject.max_total_capacity;
|
|
10972
|
-
this.capacities = { ...ticketObject.capacities };
|
|
10973
|
-
this.totalCapacities = { ...ticketObject.total_capacities };
|
|
10974
|
-
this.timeSlots = Object.keys(this.capacities).map((key) => {
|
|
10975
|
-
return {
|
|
10976
|
-
startAt: key,
|
|
10977
|
-
timeFormatted: formatTime(key),
|
|
10978
|
-
capacity: this.capacities[key],
|
|
10979
|
-
totalCapacity: this.totalCapacities[key],
|
|
10980
|
-
available: this.capacities[key] >= minAvailableCapacity,
|
|
10981
|
-
selected: this.selectedTime === key,
|
|
10982
|
-
quotaIds: ticketObject.quota_ids
|
|
10983
|
-
};
|
|
10984
|
-
});
|
|
10985
|
-
this.timeSlots = this.timeSlots.filter((st) => this.totalCapacities[st.startAt]).sort((a, b) => a.startAt > b.startAt ? 1 : -1);
|
|
10986
|
-
this.quotaIds = ticketObject.quota_ids;
|
|
10987
|
-
this.updateMaxCapacity(selectedTime ?? null);
|
|
10988
|
-
this.shopOrder = ticketObject.shop_order ? ticketObject.shop_order : 0;
|
|
10989
|
-
}
|
|
10990
|
-
set quantity(value) {
|
|
10991
|
-
this._quantity = value;
|
|
10992
|
-
this.updateTotalPrices();
|
|
10993
|
-
}
|
|
10994
|
-
get quantity() {
|
|
10995
|
-
return this._quantity;
|
|
10996
|
-
}
|
|
10997
|
-
updateMaxCapacity(isoTime) {
|
|
10998
|
-
if (isoTime) {
|
|
10999
|
-
this.maxCapacity = Math.max(0, this.capacities[isoTime] ?? 0);
|
|
11000
|
-
} else {
|
|
11001
|
-
this.maxCapacity = Math.max(0, ...Object.keys(this.capacities).map((key) => this.capacities[key])) + this.quantity;
|
|
11002
|
-
}
|
|
11003
|
-
this.updateMaxQuantity();
|
|
11004
|
-
}
|
|
11005
|
-
updateMaxQuantity() {
|
|
11006
|
-
this.maxQuantity = Math.min(this.maxPersons, this.maxCapacity);
|
|
11007
|
-
this.quantityOptions = generateQuantityOptions(this.minQuantity, this.maxQuantity);
|
|
11008
|
-
this.updateTimeslots();
|
|
11009
|
-
}
|
|
11010
|
-
updateTimeslots() {
|
|
11011
|
-
this.timeSlots.forEach((timeslot) => {
|
|
11012
|
-
timeslot.capacity = Math.max(this.capacities[timeslot.startAt], 0);
|
|
11013
|
-
const selectedQuantity = timeslot.startAt === this.selectedTime ? this.quantity : 0;
|
|
11014
|
-
timeslot.available = this.capacities[timeslot.startAt] + selectedQuantity >= this.quantity && this.capacities[timeslot.startAt] + selectedQuantity >= this.minAvailableCapacity;
|
|
11015
|
-
timeslot.selected = this.selectedTime === timeslot.startAt;
|
|
11016
|
-
});
|
|
11017
|
-
}
|
|
11018
|
-
updateTotalPrices() {
|
|
11019
|
-
this.totalPriceCents = this.quantity * this.priceCents;
|
|
11020
|
-
this.totalPriceFormatted = formatCurrency$1(this.totalPriceCents);
|
|
11021
|
-
}
|
|
11022
|
-
}
|
|
11023
|
-
function initGomusTickets(tickets) {
|
|
11024
|
-
const tmpTickets = {};
|
|
11025
|
-
Object.keys(tickets).forEach((ticketId) => {
|
|
11026
|
-
if (tickets[ticketId]) tmpTickets[ticketId] = new GomusTicket(tickets[ticketId]);
|
|
11027
|
-
});
|
|
11028
|
-
return sort(Object.values(tmpTickets), (f) => f.shopOrder);
|
|
11029
|
-
}
|
|
11030
10924
|
class GomusAnnualTicket {
|
|
11031
10925
|
constructor(ticketObject, minAvailableCapacity = 0, selectedTime = "", quantity) {
|
|
11032
10926
|
__publicField(this, "id");
|
|
@@ -11419,6 +11313,140 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
11419
11313
|
}
|
|
11420
11314
|
};
|
|
11421
11315
|
}
|
|
11316
|
+
class GomusTicket {
|
|
11317
|
+
constructor(apiTicket, options) {
|
|
11318
|
+
__privateAdd(this, _GomusTicket_instances);
|
|
11319
|
+
__publicField(this, "id");
|
|
11320
|
+
__publicField(this, "title");
|
|
11321
|
+
__publicField(this, "description");
|
|
11322
|
+
__publicField(this, "type");
|
|
11323
|
+
__publicField(this, "selectedTime");
|
|
11324
|
+
__publicField(this, "quantityOptions");
|
|
11325
|
+
__publicField(this, "vatPct");
|
|
11326
|
+
__privateAdd(this, _priceCents, /* @__PURE__ */ state(0));
|
|
11327
|
+
__privateAdd(this, _priceFormatted, /* @__PURE__ */ user_derived(() => formatCurrency$1(this.priceCents)));
|
|
11328
|
+
__privateAdd(this, _quantity, /* @__PURE__ */ state(0));
|
|
11329
|
+
__privateAdd(this, _totalPriceCents, /* @__PURE__ */ user_derived(() => this.quantity * this.priceCents));
|
|
11330
|
+
__privateAdd(this, _totalPriceFormatted, /* @__PURE__ */ user_derived(() => formatCurrency$1(this.totalPriceCents)));
|
|
11331
|
+
__publicField(this, "minQuantity");
|
|
11332
|
+
__publicField(this, "maxQuantity");
|
|
11333
|
+
__publicField(this, "maxPersons");
|
|
11334
|
+
__publicField(this, "timeSlots");
|
|
11335
|
+
__publicField(this, "capacities");
|
|
11336
|
+
__publicField(this, "totalCapacities");
|
|
11337
|
+
__publicField(this, "minAvailableCapacity");
|
|
11338
|
+
__publicField(this, "maxCapacity");
|
|
11339
|
+
__publicField(this, "maxTotalCapacity");
|
|
11340
|
+
__publicField(this, "quotaIds");
|
|
11341
|
+
__publicField(this, "shopOrder");
|
|
11342
|
+
__publicField(this, "reductionReason");
|
|
11343
|
+
__publicField(this, "apiTicket");
|
|
11344
|
+
const { minAvailableCapacity = 0, selectedTime = "", quantity = 0 } = { ...options };
|
|
11345
|
+
this.apiTicket = apiTicket;
|
|
11346
|
+
this.minAvailableCapacity = minAvailableCapacity;
|
|
11347
|
+
this.id = apiTicket.id;
|
|
11348
|
+
this.title = apiTicket.title;
|
|
11349
|
+
this.description = apiTicket.description;
|
|
11350
|
+
this.type = apiTicket.ticket_type;
|
|
11351
|
+
this.selectedTime = selectedTime;
|
|
11352
|
+
this.vatPct = apiTicket.vat_pct;
|
|
11353
|
+
__privateMethod(this, _GomusTicket_instances, calcPriceCentes_fn).call(this);
|
|
11354
|
+
this.quantity = quantity;
|
|
11355
|
+
this.minQuantity = apiTicket.min_persons;
|
|
11356
|
+
this.maxPersons = apiTicket.max_persons;
|
|
11357
|
+
this.maxTotalCapacity = apiTicket.max_total_capacity;
|
|
11358
|
+
this.capacities = { ...apiTicket.capacities };
|
|
11359
|
+
this.totalCapacities = { ...apiTicket.total_capacities };
|
|
11360
|
+
this.timeSlots = __privateMethod(this, _GomusTicket_instances, createTimeslots_fn).call(this);
|
|
11361
|
+
this.quotaIds = apiTicket.quota_ids;
|
|
11362
|
+
this.updateMaxCapacity(selectedTime ?? null);
|
|
11363
|
+
this.shopOrder = apiTicket.shop_order ? apiTicket.shop_order : 0;
|
|
11364
|
+
}
|
|
11365
|
+
get priceCents() {
|
|
11366
|
+
return get(__privateGet(this, _priceCents));
|
|
11367
|
+
}
|
|
11368
|
+
set priceCents(value) {
|
|
11369
|
+
set(__privateGet(this, _priceCents), value, true);
|
|
11370
|
+
}
|
|
11371
|
+
get priceFormatted() {
|
|
11372
|
+
return get(__privateGet(this, _priceFormatted));
|
|
11373
|
+
}
|
|
11374
|
+
set priceFormatted(value) {
|
|
11375
|
+
set(__privateGet(this, _priceFormatted), value);
|
|
11376
|
+
}
|
|
11377
|
+
get quantity() {
|
|
11378
|
+
return get(__privateGet(this, _quantity));
|
|
11379
|
+
}
|
|
11380
|
+
set quantity(value) {
|
|
11381
|
+
set(__privateGet(this, _quantity), value, true);
|
|
11382
|
+
}
|
|
11383
|
+
get totalPriceCents() {
|
|
11384
|
+
return get(__privateGet(this, _totalPriceCents));
|
|
11385
|
+
}
|
|
11386
|
+
set totalPriceCents(value) {
|
|
11387
|
+
set(__privateGet(this, _totalPriceCents), value);
|
|
11388
|
+
}
|
|
11389
|
+
get totalPriceFormatted() {
|
|
11390
|
+
return get(__privateGet(this, _totalPriceFormatted));
|
|
11391
|
+
}
|
|
11392
|
+
set totalPriceFormatted(value) {
|
|
11393
|
+
set(__privateGet(this, _totalPriceFormatted), value);
|
|
11394
|
+
}
|
|
11395
|
+
updateMaxCapacity(isoTime) {
|
|
11396
|
+
if (isoTime) {
|
|
11397
|
+
this.maxCapacity = Math.max(0, this.capacities[isoTime] ?? 0);
|
|
11398
|
+
} else {
|
|
11399
|
+
this.maxCapacity = Math.max(0, ...Object.keys(this.capacities).map((key) => this.capacities[key])) + this.quantity;
|
|
11400
|
+
}
|
|
11401
|
+
this.updateMaxQuantity();
|
|
11402
|
+
}
|
|
11403
|
+
updateMaxQuantity() {
|
|
11404
|
+
this.maxQuantity = Math.min(this.maxPersons, this.maxCapacity);
|
|
11405
|
+
this.quantityOptions = generateQuantityOptions(this.minQuantity, this.maxQuantity);
|
|
11406
|
+
this.updateTimeslots();
|
|
11407
|
+
}
|
|
11408
|
+
updateTimeslots() {
|
|
11409
|
+
this.timeSlots.forEach((timeslot) => {
|
|
11410
|
+
timeslot.capacity = Math.max(this.capacities[timeslot.startAt], 0);
|
|
11411
|
+
const selectedQuantity = timeslot.startAt === this.selectedTime ? this.quantity : 0;
|
|
11412
|
+
timeslot.available = this.capacities[timeslot.startAt] + selectedQuantity >= this.quantity && this.capacities[timeslot.startAt] + selectedQuantity >= this.minAvailableCapacity;
|
|
11413
|
+
timeslot.selected = this.selectedTime === timeslot.startAt;
|
|
11414
|
+
});
|
|
11415
|
+
}
|
|
11416
|
+
}
|
|
11417
|
+
_priceCents = new WeakMap();
|
|
11418
|
+
_priceFormatted = new WeakMap();
|
|
11419
|
+
_quantity = new WeakMap();
|
|
11420
|
+
_totalPriceCents = new WeakMap();
|
|
11421
|
+
_totalPriceFormatted = new WeakMap();
|
|
11422
|
+
_GomusTicket_instances = new WeakSet();
|
|
11423
|
+
calcPriceCentes_fn = function() {
|
|
11424
|
+
if (this.apiTicket.tax_included) {
|
|
11425
|
+
this.priceCents = this.apiTicket.price_cents;
|
|
11426
|
+
} else {
|
|
11427
|
+
this.priceCents = this.apiTicket.price_cents * (1 + this.vatPct / 100);
|
|
11428
|
+
}
|
|
11429
|
+
};
|
|
11430
|
+
createTimeslots_fn = function() {
|
|
11431
|
+
let ret = Object.keys(this.capacities).map((key) => ({
|
|
11432
|
+
startAt: key,
|
|
11433
|
+
timeFormatted: formatTime(key),
|
|
11434
|
+
capacity: this.capacities[key],
|
|
11435
|
+
totalCapacity: this.totalCapacities[key],
|
|
11436
|
+
available: this.capacities[key] >= this.minAvailableCapacity,
|
|
11437
|
+
selected: this.selectedTime === key,
|
|
11438
|
+
quotaIds: this.apiTicket.quota_ids
|
|
11439
|
+
}));
|
|
11440
|
+
ret = ret.filter((st) => this.totalCapacities[st.startAt]).sort((a, b) => a.startAt > b.startAt ? 1 : -1);
|
|
11441
|
+
return ret;
|
|
11442
|
+
};
|
|
11443
|
+
function initGomusTickets(tickets) {
|
|
11444
|
+
const tmpTickets = {};
|
|
11445
|
+
Object.keys(tickets).forEach((ticketId) => {
|
|
11446
|
+
if (tickets[ticketId]) tmpTickets[ticketId] = new GomusTicket(tickets[ticketId]);
|
|
11447
|
+
});
|
|
11448
|
+
return sort(Object.values(tmpTickets), (f) => f.shopOrder);
|
|
11449
|
+
}
|
|
11422
11450
|
const defaultErrorConfig = {
|
|
11423
11451
|
withStackTrace: false
|
|
11424
11452
|
};
|
|
@@ -11909,7 +11937,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
11909
11937
|
}
|
|
11910
11938
|
items.push(
|
|
11911
11939
|
new CartItem(
|
|
11912
|
-
new GomusTicket(cartItem.item.
|
|
11940
|
+
new GomusTicket(cartItem.item.apiTicket, {
|
|
11941
|
+
minAvailableCapacity: 0,
|
|
11942
|
+
selectedTime: cartItem.item.selectedTime,
|
|
11943
|
+
quantity: cartItem.attributes.quantity
|
|
11944
|
+
}),
|
|
11913
11945
|
cartItem.type
|
|
11914
11946
|
)
|
|
11915
11947
|
);
|
|
@@ -14749,7 +14781,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
14749
14781
|
};
|
|
14750
14782
|
_props12 = new WeakMap();
|
|
14751
14783
|
let CalendarHeaderState = _CalendarHeaderState;
|
|
14752
|
-
var root_2$
|
|
14784
|
+
var root_2$g = /* @__PURE__ */ from_html(`<div><!></div>`);
|
|
14753
14785
|
function Calendar$2($$anchor, $$props) {
|
|
14754
14786
|
push($$props, true);
|
|
14755
14787
|
let child$1 = prop($$props, "child", 7), children = prop($$props, "children", 7), id = prop($$props, "id", 23, useId), ref = prop($$props, "ref", 15, null), value = prop($$props, "value", 15), onValueChange = prop($$props, "onValueChange", 7, noop), placeholder = prop($$props, "placeholder", 15), onPlaceholderChange = prop($$props, "onPlaceholderChange", 7, noop), weekdayFormat = prop($$props, "weekdayFormat", 7, "narrow"), weekStartsOn = prop($$props, "weekStartsOn", 7), pagedNavigation = prop($$props, "pagedNavigation", 7, false), isDateDisabled = prop($$props, "isDateDisabled", 7, () => false), isDateUnavailable = prop($$props, "isDateUnavailable", 7, () => false), fixedWeeks = prop($$props, "fixedWeeks", 7, false), numberOfMonths = prop($$props, "numberOfMonths", 7, 1), locale = prop($$props, "locale", 7), calendarLabel = prop($$props, "calendarLabel", 7, "Event"), disabled = prop($$props, "disabled", 7, false), readonly = prop($$props, "readonly", 7, false), minValue = prop($$props, "minValue", 7, void 0), maxValue = prop($$props, "maxValue", 7, void 0), preventDeselect = prop($$props, "preventDeselect", 7, false), type = prop($$props, "type", 7), disableDaysOutsideMonth = prop($$props, "disableDaysOutsideMonth", 7, true), initialFocus = prop($$props, "initialFocus", 7, false), maxDays = prop($$props, "maxDays", 7), monthFormat = prop($$props, "monthFormat", 7, "long"), yearFormat = prop($$props, "yearFormat", 7, "numeric"), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
@@ -14850,7 +14882,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
14850
14882
|
append($$anchor2, fragment_1);
|
|
14851
14883
|
};
|
|
14852
14884
|
var alternate = ($$anchor2) => {
|
|
14853
|
-
var div = root_2$
|
|
14885
|
+
var div = root_2$g();
|
|
14854
14886
|
attribute_effect(div, () => ({ ...get(mergedProps) }));
|
|
14855
14887
|
var node_2 = child(div);
|
|
14856
14888
|
snippet(node_2, () => children() ?? noop$1, () => rootState.snippetProps);
|
|
@@ -15098,7 +15130,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15098
15130
|
[],
|
|
15099
15131
|
true
|
|
15100
15132
|
);
|
|
15101
|
-
var root_2$
|
|
15133
|
+
var root_2$f = /* @__PURE__ */ from_html(`<div><!></div>`);
|
|
15102
15134
|
function Calendar_day($$anchor, $$props) {
|
|
15103
15135
|
const uid = props_id();
|
|
15104
15136
|
push($$props, true);
|
|
@@ -15130,7 +15162,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15130
15162
|
append($$anchor2, fragment_1);
|
|
15131
15163
|
};
|
|
15132
15164
|
var alternate_1 = ($$anchor2) => {
|
|
15133
|
-
var div = root_2$
|
|
15165
|
+
var div = root_2$f();
|
|
15134
15166
|
attribute_effect(div, () => ({ ...get(mergedProps) }));
|
|
15135
15167
|
var node_2 = child(div);
|
|
15136
15168
|
{
|
|
@@ -15191,7 +15223,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15191
15223
|
});
|
|
15192
15224
|
}
|
|
15193
15225
|
create_custom_element(Calendar_day, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15194
|
-
var root_2$
|
|
15226
|
+
var root_2$e = /* @__PURE__ */ from_html(`<table><!></table>`);
|
|
15195
15227
|
function Calendar_grid($$anchor, $$props) {
|
|
15196
15228
|
const uid = props_id();
|
|
15197
15229
|
push($$props, true);
|
|
@@ -15220,7 +15252,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15220
15252
|
append($$anchor2, fragment_1);
|
|
15221
15253
|
};
|
|
15222
15254
|
var alternate = ($$anchor2) => {
|
|
15223
|
-
var table = root_2$
|
|
15255
|
+
var table = root_2$e();
|
|
15224
15256
|
attribute_effect(table, () => ({ ...get(mergedProps) }));
|
|
15225
15257
|
var node_2 = child(table);
|
|
15226
15258
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15265,7 +15297,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15265
15297
|
});
|
|
15266
15298
|
}
|
|
15267
15299
|
create_custom_element(Calendar_grid, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15268
|
-
var root_2$
|
|
15300
|
+
var root_2$d = /* @__PURE__ */ from_html(`<tbody><!></tbody>`);
|
|
15269
15301
|
function Calendar_grid_body($$anchor, $$props) {
|
|
15270
15302
|
const uid = props_id();
|
|
15271
15303
|
push($$props, true);
|
|
@@ -15294,7 +15326,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15294
15326
|
append($$anchor2, fragment_1);
|
|
15295
15327
|
};
|
|
15296
15328
|
var alternate = ($$anchor2) => {
|
|
15297
|
-
var tbody = root_2$
|
|
15329
|
+
var tbody = root_2$d();
|
|
15298
15330
|
attribute_effect(tbody, () => ({ ...get(mergedProps) }));
|
|
15299
15331
|
var node_2 = child(tbody);
|
|
15300
15332
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15339,7 +15371,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15339
15371
|
});
|
|
15340
15372
|
}
|
|
15341
15373
|
create_custom_element(Calendar_grid_body, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15342
|
-
var root_2$
|
|
15374
|
+
var root_2$c = /* @__PURE__ */ from_html(`<td><!></td>`);
|
|
15343
15375
|
function Calendar_cell($$anchor, $$props) {
|
|
15344
15376
|
const uid = props_id();
|
|
15345
15377
|
push($$props, true);
|
|
@@ -15375,7 +15407,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15375
15407
|
append($$anchor2, fragment_1);
|
|
15376
15408
|
};
|
|
15377
15409
|
var alternate = ($$anchor2) => {
|
|
15378
|
-
var td = root_2$
|
|
15410
|
+
var td = root_2$c();
|
|
15379
15411
|
attribute_effect(td, () => ({ ...get(mergedProps) }));
|
|
15380
15412
|
var node_2 = child(td);
|
|
15381
15413
|
snippet(node_2, () => children() ?? noop$1, () => cellState.snippetProps);
|
|
@@ -15447,7 +15479,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15447
15479
|
[],
|
|
15448
15480
|
true
|
|
15449
15481
|
);
|
|
15450
|
-
var root_2$
|
|
15482
|
+
var root_2$b = /* @__PURE__ */ from_html(`<thead><!></thead>`);
|
|
15451
15483
|
function Calendar_grid_head($$anchor, $$props) {
|
|
15452
15484
|
const uid = props_id();
|
|
15453
15485
|
push($$props, true);
|
|
@@ -15476,7 +15508,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15476
15508
|
append($$anchor2, fragment_1);
|
|
15477
15509
|
};
|
|
15478
15510
|
var alternate = ($$anchor2) => {
|
|
15479
|
-
var thead = root_2$
|
|
15511
|
+
var thead = root_2$b();
|
|
15480
15512
|
attribute_effect(thead, () => ({ ...get(mergedProps) }));
|
|
15481
15513
|
var node_2 = child(thead);
|
|
15482
15514
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15521,7 +15553,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15521
15553
|
});
|
|
15522
15554
|
}
|
|
15523
15555
|
create_custom_element(Calendar_grid_head, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15524
|
-
var root_2$
|
|
15556
|
+
var root_2$a = /* @__PURE__ */ from_html(`<th><!></th>`);
|
|
15525
15557
|
function Calendar_head_cell($$anchor, $$props) {
|
|
15526
15558
|
const uid = props_id();
|
|
15527
15559
|
push($$props, true);
|
|
@@ -15550,7 +15582,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15550
15582
|
append($$anchor2, fragment_1);
|
|
15551
15583
|
};
|
|
15552
15584
|
var alternate = ($$anchor2) => {
|
|
15553
|
-
var th = root_2$
|
|
15585
|
+
var th = root_2$a();
|
|
15554
15586
|
attribute_effect(th, () => ({ ...get(mergedProps) }));
|
|
15555
15587
|
var node_2 = child(th);
|
|
15556
15588
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15595,7 +15627,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15595
15627
|
});
|
|
15596
15628
|
}
|
|
15597
15629
|
create_custom_element(Calendar_head_cell, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15598
|
-
var root_2$
|
|
15630
|
+
var root_2$9 = /* @__PURE__ */ from_html(`<tr><!></tr>`);
|
|
15599
15631
|
function Calendar_grid_row($$anchor, $$props) {
|
|
15600
15632
|
const uid = props_id();
|
|
15601
15633
|
push($$props, true);
|
|
@@ -15624,7 +15656,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15624
15656
|
append($$anchor2, fragment_1);
|
|
15625
15657
|
};
|
|
15626
15658
|
var alternate = ($$anchor2) => {
|
|
15627
|
-
var tr = root_2$
|
|
15659
|
+
var tr = root_2$9();
|
|
15628
15660
|
attribute_effect(tr, () => ({ ...get(mergedProps) }));
|
|
15629
15661
|
var node_2 = child(tr);
|
|
15630
15662
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15669,7 +15701,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15669
15701
|
});
|
|
15670
15702
|
}
|
|
15671
15703
|
create_custom_element(Calendar_grid_row, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15672
|
-
var root_2$
|
|
15704
|
+
var root_2$8 = /* @__PURE__ */ from_html(`<header><!></header>`);
|
|
15673
15705
|
function Calendar_header($$anchor, $$props) {
|
|
15674
15706
|
const uid = props_id();
|
|
15675
15707
|
push($$props, true);
|
|
@@ -15698,7 +15730,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15698
15730
|
append($$anchor2, fragment_1);
|
|
15699
15731
|
};
|
|
15700
15732
|
var alternate = ($$anchor2) => {
|
|
15701
|
-
var header = root_2$
|
|
15733
|
+
var header = root_2$8();
|
|
15702
15734
|
attribute_effect(header, () => ({ ...get(mergedProps) }));
|
|
15703
15735
|
var node_2 = child(header);
|
|
15704
15736
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15743,7 +15775,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15743
15775
|
});
|
|
15744
15776
|
}
|
|
15745
15777
|
create_custom_element(Calendar_header, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15746
|
-
var root_2$
|
|
15778
|
+
var root_2$7 = /* @__PURE__ */ from_html(`<div><!></div>`);
|
|
15747
15779
|
function Calendar_heading($$anchor, $$props) {
|
|
15748
15780
|
const uid = props_id();
|
|
15749
15781
|
push($$props, true);
|
|
@@ -15775,7 +15807,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15775
15807
|
append($$anchor2, fragment_1);
|
|
15776
15808
|
};
|
|
15777
15809
|
var alternate_1 = ($$anchor2) => {
|
|
15778
|
-
var div = root_2$
|
|
15810
|
+
var div = root_2$7();
|
|
15779
15811
|
attribute_effect(div, () => ({ ...get(mergedProps) }));
|
|
15780
15812
|
var node_2 = child(div);
|
|
15781
15813
|
{
|
|
@@ -15836,7 +15868,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15836
15868
|
});
|
|
15837
15869
|
}
|
|
15838
15870
|
create_custom_element(Calendar_heading, { children: {}, child: {}, ref: {}, id: {} }, [], [], true);
|
|
15839
|
-
var root_2$
|
|
15871
|
+
var root_2$6 = /* @__PURE__ */ from_html(`<button><!></button>`);
|
|
15840
15872
|
function Calendar_next_button($$anchor, $$props) {
|
|
15841
15873
|
const uid = props_id();
|
|
15842
15874
|
push($$props, true);
|
|
@@ -15866,7 +15898,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15866
15898
|
append($$anchor2, fragment_1);
|
|
15867
15899
|
};
|
|
15868
15900
|
var alternate = ($$anchor2) => {
|
|
15869
|
-
var button = root_2$
|
|
15901
|
+
var button = root_2$6();
|
|
15870
15902
|
attribute_effect(button, () => ({ ...get(mergedProps) }));
|
|
15871
15903
|
var node_2 = child(button);
|
|
15872
15904
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -15918,7 +15950,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15918
15950
|
});
|
|
15919
15951
|
}
|
|
15920
15952
|
create_custom_element(Calendar_next_button, { children: {}, child: {}, id: {}, ref: {}, tabindex: {} }, [], [], true);
|
|
15921
|
-
var root_2$
|
|
15953
|
+
var root_2$5 = /* @__PURE__ */ from_html(`<button><!></button>`);
|
|
15922
15954
|
function Calendar_prev_button($$anchor, $$props) {
|
|
15923
15955
|
const uid = props_id();
|
|
15924
15956
|
push($$props, true);
|
|
@@ -15948,7 +15980,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
15948
15980
|
append($$anchor2, fragment_1);
|
|
15949
15981
|
};
|
|
15950
15982
|
var alternate = ($$anchor2) => {
|
|
15951
|
-
var button = root_2$
|
|
15983
|
+
var button = root_2$5();
|
|
15952
15984
|
attribute_effect(button, () => ({ ...get(mergedProps) }));
|
|
15953
15985
|
var node_2 = child(button);
|
|
15954
15986
|
snippet(node_2, () => children() ?? noop$1);
|
|
@@ -16065,12 +16097,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16065
16097
|
_details = new WeakMap();
|
|
16066
16098
|
_params = new WeakMap();
|
|
16067
16099
|
const ticketsCalendar = new TicketsCalendar();
|
|
16068
|
-
var root_3$
|
|
16100
|
+
var root_3$2 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
16069
16101
|
var root_11 = /* @__PURE__ */ from_html(`<div> </div>`);
|
|
16070
16102
|
var root_17 = /* @__PURE__ */ from_html(`<div></div> `, 1);
|
|
16071
16103
|
var root_7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
16072
|
-
var root_2$
|
|
16073
|
-
var root_1$
|
|
16104
|
+
var root_2$4 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
16105
|
+
var root_1$4 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
|
|
16074
16106
|
function CalendarUI($$anchor, $$props) {
|
|
16075
16107
|
push($$props, true);
|
|
16076
16108
|
let calendarClass = prop($$props, "calendarClass", 7);
|
|
@@ -16082,18 +16114,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16082
16114
|
bubbles: true
|
|
16083
16115
|
}));
|
|
16084
16116
|
});
|
|
16085
|
-
var div = root_1$
|
|
16117
|
+
var div = root_1$4();
|
|
16086
16118
|
var node = child(div);
|
|
16087
16119
|
{
|
|
16088
16120
|
const children = ($$anchor2, $$arg0) => {
|
|
16089
16121
|
let months = () => $$arg0 == null ? void 0 : $$arg0().months;
|
|
16090
16122
|
let weekdays = () => $$arg0 == null ? void 0 : $$arg0().weekdays;
|
|
16091
|
-
var fragment = root_2$
|
|
16123
|
+
var fragment = root_2$4();
|
|
16092
16124
|
var node_1 = first_child(fragment);
|
|
16093
16125
|
component(node_1, () => Calendar_header, ($$anchor3, Calendar_Header) => {
|
|
16094
16126
|
Calendar_Header($$anchor3, {
|
|
16095
16127
|
children: ($$anchor4, $$slotProps) => {
|
|
16096
|
-
var fragment_1 = root_3$
|
|
16128
|
+
var fragment_1 = root_3$2();
|
|
16097
16129
|
var node_2 = first_child(fragment_1);
|
|
16098
16130
|
component(node_2, () => Calendar_prev_button, ($$anchor5, Calendar_PrevButton) => {
|
|
16099
16131
|
Calendar_PrevButton($$anchor5, {
|
|
@@ -16409,8 +16441,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16409
16441
|
}
|
|
16410
16442
|
};
|
|
16411
16443
|
}
|
|
16412
|
-
var root_2$
|
|
16413
|
-
var root_1$
|
|
16444
|
+
var root_2$3 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
|
|
16445
|
+
var root_1$3 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots" data-go-timeslots=""></ul>`);
|
|
16414
16446
|
function Timeslots($$anchor, $$props) {
|
|
16415
16447
|
push($$props, true);
|
|
16416
16448
|
const binding_group = [];
|
|
@@ -16427,13 +16459,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16427
16459
|
var node = first_child(fragment);
|
|
16428
16460
|
{
|
|
16429
16461
|
var consequent = ($$anchor2) => {
|
|
16430
|
-
var ul = root_1$
|
|
16462
|
+
var ul = root_1$3();
|
|
16431
16463
|
each(ul, 20, () => details.timeslots, (timeslot) => timeslot, ($$anchor3, timeslot) => {
|
|
16432
16464
|
const selected = /* @__PURE__ */ user_derived(() => {
|
|
16433
16465
|
var _a2;
|
|
16434
16466
|
return ((_a2 = details.ticketSelectionDetails) == null ? void 0 : _a2.selectedTimeslot) === timeslot.startAt;
|
|
16435
16467
|
});
|
|
16436
|
-
var li = root_2$
|
|
16468
|
+
var li = root_2$3();
|
|
16437
16469
|
var label = child(li);
|
|
16438
16470
|
var text2 = child(label);
|
|
16439
16471
|
var input = sibling(text2);
|
|
@@ -16475,7 +16507,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16475
16507
|
}
|
|
16476
16508
|
delegate(["change"]);
|
|
16477
16509
|
customElements.define("go-timeslots", create_custom_element(Timeslots, {}, [], ["details"], false));
|
|
16478
|
-
var root_2$
|
|
16510
|
+
var root_2$2 = /* @__PURE__ */ from_html(`<div><!></div>`);
|
|
16479
16511
|
var root$3 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
16480
16512
|
function Wrapper($$anchor, $$props) {
|
|
16481
16513
|
push($$props, true);
|
|
@@ -16508,7 +16540,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16508
16540
|
var node_2 = sibling(node, 2);
|
|
16509
16541
|
{
|
|
16510
16542
|
var consequent_1 = ($$anchor2) => {
|
|
16511
|
-
var div = root_2$
|
|
16543
|
+
var div = root_2$2();
|
|
16512
16544
|
attribute_effect(div, () => ({ ...restProps }));
|
|
16513
16545
|
var node_3 = child(div);
|
|
16514
16546
|
snippet(node_3, children);
|
|
@@ -16702,6 +16734,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16702
16734
|
}
|
|
16703
16735
|
updateSelectedTickets(ticket, quantity) {
|
|
16704
16736
|
var _a2, _b2, _c2;
|
|
16737
|
+
if (!this.ticketSelectionDetails) return;
|
|
16705
16738
|
const index2 = this.timeslotTickets.findIndex((t) => t.id == ticket.id);
|
|
16706
16739
|
const duplicate = this.timeslotTickets[index2];
|
|
16707
16740
|
duplicate.quantity = quantity;
|
|
@@ -16713,159 +16746,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
16713
16746
|
this.ticketSelectionDetails.ticketList = (_c2 = this.ticketSelectionDetails) == null ? void 0 : _c2.ticketList.concat(duplicate);
|
|
16714
16747
|
}
|
|
16715
16748
|
}, _ticketSelectionDetails2 = new WeakMap(), _e);
|
|
16716
|
-
var root_2$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
16717
|
-
var root_1$3 = /* @__PURE__ */ from_html(`<tr><td><select></select></td><td><p> </p> <!></td><td> </td></tr>`);
|
|
16718
|
-
function Annual($$anchor, $$props) {
|
|
16719
|
-
push($$props, true);
|
|
16720
|
-
let details = prop($$props, "details", 7);
|
|
16721
|
-
var fragment = comment();
|
|
16722
|
-
var node = first_child(fragment);
|
|
16723
|
-
each(node, 16, () => Object.values(details().annualTickets), (ticket) => ticket, ($$anchor2, ticket) => {
|
|
16724
|
-
var tr = root_1$3();
|
|
16725
|
-
var td = child(tr);
|
|
16726
|
-
var select = child(td);
|
|
16727
|
-
each(select, 21, () => ticket.quantityOptions, index, ($$anchor3, quantity) => {
|
|
16728
|
-
var option = root_2$3();
|
|
16729
|
-
var text2 = child(option, true);
|
|
16730
|
-
reset(option);
|
|
16731
|
-
var option_value = {};
|
|
16732
|
-
template_effect(() => {
|
|
16733
|
-
set_selected(option, get(quantity).selected);
|
|
16734
|
-
set_text(text2, get(quantity).label);
|
|
16735
|
-
if (option_value !== (option_value = get(quantity).value)) {
|
|
16736
|
-
option.value = (option.__value = get(quantity).value) ?? "";
|
|
16737
|
-
}
|
|
16738
|
-
});
|
|
16739
|
-
append($$anchor3, option);
|
|
16740
|
-
});
|
|
16741
|
-
reset(select);
|
|
16742
|
-
reset(td);
|
|
16743
|
-
var td_1 = sibling(td);
|
|
16744
|
-
var p = child(td_1);
|
|
16745
|
-
var text_1 = child(p, true);
|
|
16746
|
-
reset(p);
|
|
16747
|
-
var node_1 = sibling(p, 2);
|
|
16748
|
-
html(node_1, () => ticket.description);
|
|
16749
|
-
reset(td_1);
|
|
16750
|
-
var td_2 = sibling(td_1);
|
|
16751
|
-
var text_2 = child(td_2, true);
|
|
16752
|
-
reset(td_2);
|
|
16753
|
-
reset(tr);
|
|
16754
|
-
template_effect(
|
|
16755
|
-
($0) => {
|
|
16756
|
-
set_attribute(select, "name", $0);
|
|
16757
|
-
set_text(text_1, ticket.title);
|
|
16758
|
-
set_text(text_2, ticket.priceFormatted);
|
|
16759
|
-
},
|
|
16760
|
-
[() => ticket.id.toString()]
|
|
16761
|
-
);
|
|
16762
|
-
append($$anchor2, tr);
|
|
16763
|
-
});
|
|
16764
|
-
append($$anchor, fragment);
|
|
16765
|
-
return pop({
|
|
16766
|
-
get details() {
|
|
16767
|
-
return details();
|
|
16768
|
-
},
|
|
16769
|
-
set details($$value) {
|
|
16770
|
-
details($$value);
|
|
16771
|
-
flushSync();
|
|
16772
|
-
}
|
|
16773
|
-
});
|
|
16774
|
-
}
|
|
16775
|
-
create_custom_element(Annual, { details: {} }, [], [], true);
|
|
16776
|
-
var on_change = (e, details, ticket) => {
|
|
16777
|
-
var _a2;
|
|
16778
|
-
return details().updateSelectedTickets(ticket, parseInt((_a2 = e == null ? void 0 : e.target) == null ? void 0 : _a2.value));
|
|
16779
|
-
};
|
|
16780
|
-
var root_3$2 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
16781
|
-
var root_2$2 = /* @__PURE__ */ from_html(`<tr><td><select></select></td><td><p> </p> <!></td><td> </td></tr>`);
|
|
16782
|
-
function Timeslot($$anchor, $$props) {
|
|
16783
|
-
push($$props, true);
|
|
16784
|
-
let details = prop($$props, "details", 7);
|
|
16785
|
-
function hasTimeSlotInCapacities(ticket) {
|
|
16786
|
-
var _a2;
|
|
16787
|
-
if ((_a2 = details().ticketSelectionDetails) == null ? void 0 : _a2.selectedTimeslot) {
|
|
16788
|
-
return Object.keys(ticket.capacities).includes(details().ticketSelectionDetails.selectedTimeslot);
|
|
16789
|
-
} else {
|
|
16790
|
-
return false;
|
|
16791
|
-
}
|
|
16792
|
-
}
|
|
16793
|
-
var fragment = comment();
|
|
16794
|
-
var node = first_child(fragment);
|
|
16795
|
-
each(node, 16, () => Object.values(details().timeslotTickets), (ticket) => ticket, ($$anchor2, ticket) => {
|
|
16796
|
-
var fragment_1 = comment();
|
|
16797
|
-
var node_1 = first_child(fragment_1);
|
|
16798
|
-
{
|
|
16799
|
-
var consequent = ($$anchor3) => {
|
|
16800
|
-
var tr = root_2$2();
|
|
16801
|
-
let classes;
|
|
16802
|
-
var td = child(tr);
|
|
16803
|
-
var select = child(td);
|
|
16804
|
-
select.__change = [on_change, details, ticket];
|
|
16805
|
-
each(select, 21, () => ticket.quantityOptions, index, ($$anchor4, quantity) => {
|
|
16806
|
-
var option = root_3$2();
|
|
16807
|
-
var text2 = child(option, true);
|
|
16808
|
-
reset(option);
|
|
16809
|
-
var option_value = {};
|
|
16810
|
-
template_effect(() => {
|
|
16811
|
-
set_selected(option, get(quantity).selected);
|
|
16812
|
-
set_text(text2, get(quantity).label);
|
|
16813
|
-
if (option_value !== (option_value = get(quantity).value)) {
|
|
16814
|
-
option.value = (option.__value = get(quantity).value) ?? "";
|
|
16815
|
-
}
|
|
16816
|
-
});
|
|
16817
|
-
append($$anchor4, option);
|
|
16818
|
-
});
|
|
16819
|
-
reset(select);
|
|
16820
|
-
reset(td);
|
|
16821
|
-
var td_1 = sibling(td);
|
|
16822
|
-
var p = child(td_1);
|
|
16823
|
-
var text_1 = child(p, true);
|
|
16824
|
-
reset(p);
|
|
16825
|
-
var node_2 = sibling(p, 2);
|
|
16826
|
-
html(node_2, () => ticket.description);
|
|
16827
|
-
reset(td_1);
|
|
16828
|
-
var td_2 = sibling(td_1);
|
|
16829
|
-
var text_2 = child(td_2, true);
|
|
16830
|
-
reset(td_2);
|
|
16831
|
-
reset(tr);
|
|
16832
|
-
template_effect(
|
|
16833
|
-
($0, $1) => {
|
|
16834
|
-
classes = set_class(tr, 1, "", null, classes, $0);
|
|
16835
|
-
set_attribute(select, "name", $1);
|
|
16836
|
-
set_text(text_1, ticket.title);
|
|
16837
|
-
set_text(text_2, ticket.priceFormatted);
|
|
16838
|
-
},
|
|
16839
|
-
[
|
|
16840
|
-
() => ({ hidden: hasTimeSlotInCapacities(ticket) }),
|
|
16841
|
-
() => ticket.id.toString()
|
|
16842
|
-
]
|
|
16843
|
-
);
|
|
16844
|
-
append($$anchor3, tr);
|
|
16845
|
-
};
|
|
16846
|
-
if_block(node_1, ($$render) => {
|
|
16847
|
-
if (hasTimeSlotInCapacities(ticket) || ticket.type == "normal") $$render(consequent);
|
|
16848
|
-
});
|
|
16849
|
-
}
|
|
16850
|
-
append($$anchor2, fragment_1);
|
|
16851
|
-
});
|
|
16852
|
-
append($$anchor, fragment);
|
|
16853
|
-
return pop({
|
|
16854
|
-
get details() {
|
|
16855
|
-
return details();
|
|
16856
|
-
},
|
|
16857
|
-
set details($$value) {
|
|
16858
|
-
details($$value);
|
|
16859
|
-
flushSync();
|
|
16860
|
-
}
|
|
16861
|
-
});
|
|
16862
|
-
}
|
|
16863
|
-
delegate(["change"]);
|
|
16864
|
-
create_custom_element(Timeslot, { details: {} }, [], [], true);
|
|
16865
16749
|
var root_2$1 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
16866
16750
|
var root_1$2 = /* @__PURE__ */ from_html(`<select></select>`);
|
|
16867
16751
|
var root_4$1 = /* @__PURE__ */ from_html(`<li><article data-go-ticket=""><ul><li data-go-tickets-title=""> </li> <li data-go-tickets-description=""><!></li> <li data-go-tickets-price=""> </li> <li data-go-tickets-quality=""><!></li></ul></article></li>`);
|
|
16868
|
-
var root_3$1 = /* @__PURE__ */ from_html(`<ol data-
|
|
16752
|
+
var root_3$1 = /* @__PURE__ */ from_html(`<ol data-testid="tickets"><li data-go-tickets-header="" data-testid="tickets-header"><ul><li data-go-tickets-title="">Title</li> <li data-go-tickets-description="">Description</li> <li data-go-tickets-price="">Price</li> <li data-go-tickets-quality="">Quantity</li></ul></li> <!></ol>`);
|
|
16869
16753
|
function Tickets($$anchor, $$props) {
|
|
16870
16754
|
push($$props, true);
|
|
16871
16755
|
const select = ($$anchor2, ticket = noop$1) => {
|