@gomusdev/web-components 4.10.0 → 4.12.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.
@@ -6479,6 +6479,9 @@ var isArray = Array.isArray;
6479
6479
  var isObject$2 = (value) => {
6480
6480
  return !!value && value.constructor === Object;
6481
6481
  };
6482
+ var isFunction$2 = (value) => {
6483
+ return !!(value && value.constructor && value.call && value.apply);
6484
+ };
6482
6485
  var isString = (value) => {
6483
6486
  return typeof value === "string" || value instanceof String;
6484
6487
  };
@@ -6489,6 +6492,12 @@ var isNumber = (value) => {
6489
6492
  return false;
6490
6493
  }
6491
6494
  };
6495
+ var isPromise = (value) => {
6496
+ if (!value) return false;
6497
+ if (!value.then) return false;
6498
+ if (!isFunction$2(value.then)) return false;
6499
+ return true;
6500
+ };
6492
6501
  //#endregion
6493
6502
  //#region ../../node_modules/.pnpm/radash@12.1.1/node_modules/radash/dist/esm/array.mjs
6494
6503
  var group = (array, getGroupId) => {
@@ -15559,9 +15568,10 @@ function Event$2($$anchor, $$props) {
15559
15568
  create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
15560
15569
  //#endregion
15561
15570
  //#region src/components/cart/components/itemTitles/Ticket.svelte
15562
- var root$52 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15563
- var root_1$19 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15564
- var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
15571
+ var root$52 = /* @__PURE__ */ from_html(`<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>`);
15572
+ var root_1$19 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15573
+ var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15574
+ var root_3$10 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>`, 1);
15565
15575
  function Ticket($$anchor, $$props) {
15566
15576
  push($$props, true);
15567
15577
  let cartItem = prop($$props, "cartItem", 7);
@@ -15574,35 +15584,47 @@ function Ticket($$anchor, $$props) {
15574
15584
  flushSync();
15575
15585
  }
15576
15586
  };
15577
- var fragment = root_2$14();
15587
+ var fragment = root_3$10();
15578
15588
  var span = first_child(fragment);
15579
15589
  var text = child(span, true);
15580
15590
  reset(span);
15581
15591
  var node = sibling(span, 2);
15582
- var consequent_1 = ($$anchor) => {
15583
- var fragment_1 = root_1$19();
15584
- var span_1 = first_child(fragment_1);
15592
+ var consequent = ($$anchor) => {
15593
+ var span_1 = root$52();
15585
15594
  var text_1 = child(span_1, true);
15586
15595
  reset(span_1);
15587
- var node_1 = sibling(span_1, 2);
15588
- var consequent = ($$anchor) => {
15589
- var span_2 = root$52();
15590
- var text_2 = child(span_2, true);
15591
- reset(span_2);
15592
- template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
15593
- append($$anchor, span_2);
15596
+ template_effect(() => set_text(text_1, cartItem().product.sub_title));
15597
+ append($$anchor, span_1);
15598
+ };
15599
+ var d = /* @__PURE__ */ user_derived(() => isUITicket(cartItem().product) && cartItem().product.sub_title);
15600
+ if_block(node, ($$render) => {
15601
+ if (get$2(d)) $$render(consequent);
15602
+ });
15603
+ var node_1 = sibling(node, 2);
15604
+ var consequent_2 = ($$anchor) => {
15605
+ var fragment_1 = root_2$14();
15606
+ var span_2 = first_child(fragment_1);
15607
+ var text_2 = child(span_2, true);
15608
+ reset(span_2);
15609
+ var node_2 = sibling(span_2, 2);
15610
+ var consequent_1 = ($$anchor) => {
15611
+ var span_3 = root_1$19();
15612
+ var text_3 = child(span_3, true);
15613
+ reset(span_3);
15614
+ template_effect(($0) => set_text(text_3, $0), [() => formatTime(cartItem().time)]);
15615
+ append($$anchor, span_3);
15594
15616
  };
15595
- if_block(node_1, ($$render) => {
15596
- if (cartItem().product.type === "Ticket" && cartItem().product.subtype === "timeslot") $$render(consequent);
15617
+ if_block(node_2, ($$render) => {
15618
+ if (cartItem().product.type === "Ticket" && cartItem().product.subtype === "timeslot") $$render(consequent_1);
15597
15619
  });
15598
- template_effect(($0) => set_text(text_1, $0), [() => formatDate(cartItem().time, {
15620
+ template_effect(($0) => set_text(text_2, $0), [() => formatDate(cartItem().time, {
15599
15621
  month: "numeric",
15600
15622
  day: "numeric"
15601
15623
  }, shop.locale)]);
15602
15624
  append($$anchor, fragment_1);
15603
15625
  };
15604
- if_block(node, ($$render) => {
15605
- if (cartItem().time) $$render(consequent_1);
15626
+ if_block(node_1, ($$render) => {
15627
+ if (cartItem().time) $$render(consequent_2);
15606
15628
  });
15607
15629
  template_effect(() => set_text(text, cartItem().product.title));
15608
15630
  append($$anchor, fragment);
@@ -18048,7 +18070,7 @@ var root_1$15 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-disco
18048
18070
  var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18049
18071
  var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
18050
18072
  var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
18051
- var root_5$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18073
+ var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18052
18074
  var root_6$2 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
18053
18075
  var root_7$2 = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>`, 1);
18054
18076
  function Item$1($$anchor, $$props) {
@@ -18230,7 +18252,7 @@ function Item$1($$anchor, $$props) {
18230
18252
  reset(li_2);
18231
18253
  var node_4 = sibling(li_2, 2);
18232
18254
  var consequent_8 = ($$anchor) => {
18233
- var li_3 = root_5$2();
18255
+ var li_3 = root_5$3();
18234
18256
  var button = child(li_3);
18235
18257
  reset(li_3);
18236
18258
  template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.item.remove")]);
@@ -33277,14 +33299,14 @@ var root_1$8 = /* @__PURE__ */ from_html(` <!>`, 1);
33277
33299
  var root_2$7 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
33278
33300
  var root_3$7 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
33279
33301
  var root_4$3 = /* @__PURE__ */ from_html(`<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>`);
33280
- var root_5$1 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
33302
+ var root_5$2 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
33281
33303
  var root_6$1 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
33282
33304
  var root_7$1 = /* @__PURE__ */ from_html(`<img src="" alt=""/> <option> </option>`, 1);
33283
33305
  var root_8$1 = /* @__PURE__ */ from_html(`<option disabled="" hidden="" selected=""> </option> <!>`, 1);
33284
33306
  var select_content = /* @__PURE__ */ from_html(`<!>`, 1);
33285
33307
  var root_9$1 = /* @__PURE__ */ from_html(`<label><!></label> <select><!></select>`, 1);
33286
33308
  var root_10$1 = /* @__PURE__ */ from_html(`<img style="width: 60px" aria-hidden="true"/>`);
33287
- var root_11 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-icons"></span>`);
33309
+ var root_11$1 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-icons"></span>`);
33288
33310
  var root_12 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-name"> </span>`);
33289
33311
  var root_13 = /* @__PURE__ */ from_html(`<label><input type="radio"/> <!></label>`);
33290
33312
  var root_14 = /* @__PURE__ */ from_html(`<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>`);
@@ -33349,7 +33371,7 @@ function InputAndLabel($$anchor, $$props) {
33349
33371
  append($$anchor, fragment_2);
33350
33372
  };
33351
33373
  const file = ($$anchor) => {
33352
- var fragment_3 = root_5$1();
33374
+ var fragment_3 = root_5$2();
33353
33375
  var label_3 = first_child(fragment_3);
33354
33376
  labelText(child(label_3));
33355
33377
  reset(label_3);
@@ -33499,7 +33521,7 @@ function InputAndLabel($$anchor, $$props) {
33499
33521
  remove_input_defaults(input_4);
33500
33522
  var node_11 = sibling(input_4, 2);
33501
33523
  var consequent_3 = ($$anchor) => {
33502
- var span_2 = root_11();
33524
+ var span_2 = root_11$1();
33503
33525
  each(span_2, 20, () => get$2(mode).icons, (icon) => icon, ($$anchor, icon) => {
33504
33526
  const url = /* @__PURE__ */ user_derived(() => CDN_PATH + icon + ".svg");
33505
33527
  var img_1 = root_10$1();
@@ -36454,17 +36476,18 @@ create_custom_element(Event$1, {
36454
36476
  }, [], [], { mode: "open" });
36455
36477
  //#endregion
36456
36478
  //#region src/components/order/components/subcomponents/breakdown/items/TicketSale.svelte
36457
- var root$9 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>`, 1);
36458
- var root_1$4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
36459
- var root_2$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
36460
- var root_3$3 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
36461
- var root_4$2 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
36462
- var root_5 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
36463
- var root_6 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
36464
- var root_7 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
36465
- var root_8 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
36466
- var root_9 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
36467
- var root_10 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36479
+ var root$9 = /* @__PURE__ */ from_html(`<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>`);
36480
+ var root_1$4 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>`, 1);
36481
+ var root_2$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
36482
+ var root_3$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
36483
+ var root_4$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
36484
+ var root_5$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
36485
+ var root_6 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
36486
+ var root_7 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
36487
+ var root_8 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
36488
+ var root_9 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
36489
+ var root_10 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
36490
+ var root_11 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36468
36491
  function TicketSale($$anchor, $$props) {
36469
36492
  push($$props, true);
36470
36493
  const APPLE_WALLET_CDN_PATH = `https://cdn.shop.platform.gomus.de/apple_wallet_${shop.locale}.svg`;
@@ -36488,10 +36511,10 @@ function TicketSale($$anchor, $$props) {
36488
36511
  };
36489
36512
  var fragment = comment();
36490
36513
  var node = first_child(fragment);
36491
- var consequent_5 = ($$anchor) => {
36514
+ var consequent_6 = ($$anchor) => {
36492
36515
  var fragment_1 = comment();
36493
36516
  each(first_child(fragment_1), 17, () => ({ length: item().attributes.quantity }), index$1, ($$anchor, $$item, index) => {
36494
- var li = root_7();
36517
+ var li = root_8();
36495
36518
  var article = child(li);
36496
36519
  var ul = child(article);
36497
36520
  var li_1 = child(ul);
@@ -36501,82 +36524,93 @@ function TicketSale($$anchor, $$props) {
36501
36524
  var text = child(span, true);
36502
36525
  reset(span);
36503
36526
  var node_2 = sibling(span, 2);
36504
- each(node_2, 17, () => get$2(subTicketSales), (sub) => sub.id, ($$anchor, sub) => {
36505
- var fragment_2 = root$9();
36506
- var span_1 = sibling(first_child(fragment_2), 2);
36507
- var text_1 = child(span_1);
36527
+ var consequent = ($$anchor) => {
36528
+ var span_1 = root$9();
36529
+ var text_1 = child(span_1, true);
36508
36530
  reset(span_1);
36509
- template_effect(() => set_text(text_1, `${get$2(sub).quantity ?? ""} x ${get$2(sub).title ?? ""}`));
36510
- append($$anchor, fragment_2);
36531
+ template_effect(() => set_text(text_1, item().attributes.sub_title));
36532
+ append($$anchor, span_1);
36533
+ };
36534
+ if_block(node_2, ($$render) => {
36535
+ if (item().attributes.sub_title) $$render(consequent);
36511
36536
  });
36512
36537
  var node_3 = sibling(node_2, 2);
36513
- var consequent_2 = ($$anchor) => {
36538
+ each(node_3, 17, () => get$2(subTicketSales), (sub) => sub.id, ($$anchor, sub) => {
36539
+ var fragment_2 = root_1$4();
36540
+ var span_2 = sibling(first_child(fragment_2), 2);
36541
+ var text_2 = child(span_2);
36542
+ reset(span_2);
36543
+ template_effect(() => set_text(text_2, `${get$2(sub).quantity ?? ""} x ${get$2(sub).title ?? ""}`));
36544
+ append($$anchor, fragment_2);
36545
+ });
36546
+ var node_4 = sibling(node_3, 2);
36547
+ var consequent_3 = ($$anchor) => {
36514
36548
  const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index]?.id);
36515
- var fragment_3 = root_3$3();
36516
- var node_4 = first_child(fragment_3);
36517
- var consequent = ($$anchor) => {
36518
- var fragment_4 = root_1$4();
36519
- var span_2 = first_child(fragment_4);
36520
- var text_2 = child(span_2, true);
36521
- reset(span_2);
36522
- var span_3 = sibling(span_2, 2);
36549
+ var fragment_3 = root_4$2();
36550
+ var node_5 = first_child(fragment_3);
36551
+ var consequent_1 = ($$anchor) => {
36552
+ var fragment_4 = root_2$3();
36553
+ var span_3 = first_child(fragment_4);
36523
36554
  var text_3 = child(span_3, true);
36524
36555
  reset(span_3);
36556
+ var span_4 = sibling(span_3, 2);
36557
+ var text_4 = child(span_4, true);
36558
+ reset(span_4);
36525
36559
  template_effect(($0, $1) => {
36526
- set_text(text_2, $0);
36527
- set_text(text_3, $1);
36560
+ set_text(text_3, $0);
36561
+ set_text(text_4, $1);
36528
36562
  }, [() => formatDate(item().attributes.start_time, {
36529
36563
  month: "numeric",
36530
36564
  day: "numeric"
36531
36565
  }, shop.locale), () => formatTime(item().attributes.start_time)]);
36532
36566
  append($$anchor, fragment_4);
36533
36567
  };
36534
- var consequent_1 = ($$anchor) => {
36535
- var span_4 = root_2$3();
36536
- var text_4 = child(span_4, true);
36537
- reset(span_4);
36538
- template_effect(($0) => set_text(text_4, $0), [() => formatDate(item().attributes.start_time, {
36568
+ var consequent_2 = ($$anchor) => {
36569
+ var span_5 = root_3$3();
36570
+ var text_5 = child(span_5, true);
36571
+ reset(span_5);
36572
+ template_effect(($0) => set_text(text_5, $0), [() => formatDate(item().attributes.start_time, {
36539
36573
  month: "numeric",
36540
36574
  day: "numeric"
36541
36575
  }, shop.locale)]);
36542
- append($$anchor, span_4);
36576
+ append($$anchor, span_5);
36543
36577
  };
36544
- if_block(node_4, ($$render) => {
36545
- if (item().attributes.ticket_type === "time_slot") $$render(consequent);
36546
- else if (item().attributes.ticket_type === "normal") $$render(consequent_1, 1);
36578
+ if_block(node_5, ($$render) => {
36579
+ if (item().attributes.ticket_type === "time_slot") $$render(consequent_1);
36580
+ else if (item().attributes.ticket_type === "normal") $$render(consequent_2, 1);
36547
36581
  });
36548
- var a = sibling(node_4, 4);
36549
- var text_5 = child(a, true);
36582
+ var a = sibling(node_5, 4);
36583
+ var text_6 = child(a, true);
36550
36584
  reset(a);
36551
36585
  template_effect(($0, $1) => {
36552
36586
  set_attribute(a, "href", $0);
36553
- set_text(text_5, $1);
36587
+ set_text(text_6, $1);
36554
36588
  }, [() => orderDetails().downloadLink(item(), get$2(barcodeId)), () => shop.t("common.download")]);
36555
36589
  append($$anchor, fragment_3);
36556
36590
  };
36557
36591
  var alternate = ($$anchor) => {
36558
- var fragment_5 = root_4$2();
36592
+ var fragment_5 = root_5$1();
36559
36593
  var a_1 = sibling(first_child(fragment_5), 2);
36560
- var text_6 = child(a_1, true);
36594
+ var text_7 = child(a_1, true);
36561
36595
  reset(a_1);
36562
36596
  template_effect(($0, $1) => {
36563
36597
  set_attribute(a_1, "href", $0);
36564
- set_text(text_6, $1);
36598
+ set_text(text_7, $1);
36565
36599
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.personalize")]);
36566
36600
  append($$anchor, fragment_5);
36567
36601
  };
36568
- if_block(node_3, ($$render) => {
36569
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_2);
36602
+ if_block(node_4, ($$render) => {
36603
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_3);
36570
36604
  else $$render(alternate, -1);
36571
36605
  });
36572
36606
  reset(li_2);
36573
36607
  var li_3 = sibling(li_2, 2);
36574
- var text_7 = child(li_3, true);
36608
+ var text_8 = child(li_3, true);
36575
36609
  reset(li_3);
36576
36610
  var li_4 = sibling(li_3, 2);
36577
- var node_5 = child(li_4);
36578
- var consequent_3 = ($$anchor) => {
36579
- var a_2 = root_5();
36611
+ var node_6 = child(li_4);
36612
+ var consequent_4 = ($$anchor) => {
36613
+ var a_2 = root_6();
36580
36614
  var img = child(a_2);
36581
36615
  reset(a_2);
36582
36616
  template_effect(() => {
@@ -36585,24 +36619,24 @@ function TicketSale($$anchor, $$props) {
36585
36619
  });
36586
36620
  append($$anchor, a_2);
36587
36621
  };
36588
- if_block(node_5, ($$render) => {
36589
- if (item().attributes.barcodes[index] && item().attributes.barcodes[index]?.passbook_url) $$render(consequent_3);
36622
+ if_block(node_6, ($$render) => {
36623
+ if (item().attributes.barcodes[index] && item().attributes.barcodes[index]?.passbook_url) $$render(consequent_4);
36590
36624
  });
36591
36625
  reset(li_4);
36592
36626
  var li_5 = sibling(li_4, 2);
36593
- var node_6 = child(li_5);
36594
- var consequent_4 = ($$anchor) => {
36595
- var a_3 = root_6();
36596
- var text_8 = child(a_3, true);
36627
+ var node_7 = child(li_5);
36628
+ var consequent_5 = ($$anchor) => {
36629
+ var a_3 = root_7();
36630
+ var text_9 = child(a_3, true);
36597
36631
  reset(a_3);
36598
36632
  template_effect(($0) => {
36599
36633
  set_attribute(a_3, "href", shop.apiUrl + item().attributes.ical_url);
36600
- set_text(text_8, $0);
36634
+ set_text(text_9, $0);
36601
36635
  }, [() => shop.t("common.calendar")]);
36602
36636
  append($$anchor, a_3);
36603
36637
  };
36604
- if_block(node_6, ($$render) => {
36605
- if (item().attributes.ical_url) $$render(consequent_4);
36638
+ if_block(node_7, ($$render) => {
36639
+ if (item().attributes.ical_url) $$render(consequent_5);
36606
36640
  });
36607
36641
  reset(li_5);
36608
36642
  reset(ul);
@@ -36610,65 +36644,76 @@ function TicketSale($$anchor, $$props) {
36610
36644
  reset(li);
36611
36645
  template_effect(($0) => {
36612
36646
  set_text(text, item().attributes.title);
36613
- set_text(text_7, $0);
36647
+ set_text(text_8, $0);
36614
36648
  }, [() => formatCurrency(item().price_cents)]);
36615
36649
  append($$anchor, li);
36616
36650
  });
36617
36651
  append($$anchor, fragment_1);
36618
36652
  };
36619
36653
  var alternate_2 = ($$anchor) => {
36620
- var li_6 = root_10();
36654
+ var li_6 = root_11();
36621
36655
  var article_1 = child(li_6);
36622
36656
  var ul_1 = child(article_1);
36623
36657
  var li_7 = child(ul_1);
36624
- var text_9 = child(li_7, true);
36658
+ var text_10 = child(li_7, true);
36625
36659
  reset(li_7);
36626
36660
  var li_8 = sibling(li_7, 2);
36627
- var span_5 = child(li_8);
36628
- var text_10 = child(span_5, true);
36629
- reset(span_5);
36630
- var node_7 = sibling(span_5, 2);
36631
- var consequent_6 = ($$anchor) => {
36632
- var a_4 = root_8();
36633
- var text_11 = child(a_4, true);
36661
+ var span_6 = child(li_8);
36662
+ var text_11 = child(span_6, true);
36663
+ reset(span_6);
36664
+ var node_8 = sibling(span_6, 2);
36665
+ var consequent_7 = ($$anchor) => {
36666
+ var span_7 = root$9();
36667
+ var text_12 = child(span_7, true);
36668
+ reset(span_7);
36669
+ template_effect(() => set_text(text_12, item().attributes.sub_title));
36670
+ append($$anchor, span_7);
36671
+ };
36672
+ if_block(node_8, ($$render) => {
36673
+ if (item().attributes.sub_title) $$render(consequent_7);
36674
+ });
36675
+ var node_9 = sibling(node_8, 2);
36676
+ var consequent_8 = ($$anchor) => {
36677
+ var a_4 = root_9();
36678
+ var text_13 = child(a_4, true);
36634
36679
  reset(a_4);
36635
36680
  template_effect(($0, $1) => {
36636
36681
  set_attribute(a_4, "href", $0);
36637
- set_text(text_11, $1);
36682
+ set_text(text_13, $1);
36638
36683
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.download")]);
36639
36684
  append($$anchor, a_4);
36640
36685
  };
36641
36686
  var alternate_1 = ($$anchor) => {
36642
- var a_5 = root_9();
36643
- var text_12 = child(a_5, true);
36687
+ var a_5 = root_10();
36688
+ var text_14 = child(a_5, true);
36644
36689
  reset(a_5);
36645
36690
  template_effect(($0, $1) => {
36646
36691
  set_attribute(a_5, "href", $0);
36647
- set_text(text_12, $1);
36692
+ set_text(text_14, $1);
36648
36693
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.personalize")]);
36649
36694
  append($$anchor, a_5);
36650
36695
  };
36651
- if_block(node_7, ($$render) => {
36652
- if (item().attributes.is_voucher) $$render(consequent_6);
36696
+ if_block(node_9, ($$render) => {
36697
+ if (item().attributes.is_voucher) $$render(consequent_8);
36653
36698
  else $$render(alternate_1, -1);
36654
36699
  });
36655
36700
  reset(li_8);
36656
36701
  var li_9 = sibling(li_8, 2);
36657
- var text_13 = child(li_9, true);
36702
+ var text_15 = child(li_9, true);
36658
36703
  reset(li_9);
36659
36704
  next(2);
36660
36705
  reset(ul_1);
36661
36706
  reset(article_1);
36662
36707
  reset(li_6);
36663
36708
  template_effect(($0) => {
36664
- set_text(text_9, item().attributes.quantity);
36665
- set_text(text_10, item().attributes.title);
36666
- set_text(text_13, $0);
36709
+ set_text(text_10, item().attributes.quantity);
36710
+ set_text(text_11, item().attributes.title);
36711
+ set_text(text_15, $0);
36667
36712
  }, [() => formatCurrency(item().price_cents)]);
36668
36713
  append($$anchor, li_6);
36669
36714
  };
36670
36715
  if_block(node, ($$render) => {
36671
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_5);
36716
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_6);
36672
36717
  else $$render(alternate_2, -1);
36673
36718
  });
36674
36719
  append($$anchor, fragment);
@@ -37477,10 +37522,11 @@ customElements.define("go-ticket-segment-empty", create_custom_element(TicketSeg
37477
37522
  //#endregion
37478
37523
  //#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/Item.svelte
37479
37524
  var root$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
37480
- var root_1$2 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
37481
- var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
37482
- var root_3$1 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
37483
- var root_4$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>`);
37525
+ var root_1$2 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>`);
37526
+ var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
37527
+ var root_3$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
37528
+ var root_4$1 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
37529
+ var root_5 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!> <!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>`);
37484
37530
  function Item($$anchor, $$props) {
37485
37531
  const uid = props_id();
37486
37532
  push($$props, true);
@@ -37544,17 +37590,28 @@ function Item($$anchor, $$props) {
37544
37590
  };
37545
37591
  var fragment_2 = comment();
37546
37592
  var node = first_child(fragment_2);
37547
- var consequent_3 = ($$anchor) => {
37548
- var li = root_4$1();
37593
+ var consequent_4 = ($$anchor) => {
37594
+ var li = root_5();
37549
37595
  var article = child(li);
37550
37596
  var ul = child(article);
37551
37597
  var li_1 = child(ul);
37552
37598
  var node_1 = child(li_1);
37553
37599
  titleSnippet(node_1);
37554
- reset(li_1);
37555
- var node_2 = sibling(li_1, 2);
37600
+ var node_2 = sibling(node_1, 2);
37556
37601
  var consequent = ($$anchor) => {
37557
- var li_2 = root_1$2();
37602
+ var span_2 = root_1$2();
37603
+ var text_3 = child(span_2, true);
37604
+ reset(span_2);
37605
+ template_effect(() => set_text(text_3, item().product.sub_title));
37606
+ append($$anchor, span_2);
37607
+ };
37608
+ if_block(node_2, ($$render) => {
37609
+ if (item().product.sub_title) $$render(consequent);
37610
+ });
37611
+ reset(li_1);
37612
+ var node_3 = sibling(li_1, 2);
37613
+ var consequent_1 = ($$anchor) => {
37614
+ var li_2 = root_2$1();
37558
37615
  var button = child(li_2);
37559
37616
  reset(li_2);
37560
37617
  template_effect(($0) => {
@@ -37566,35 +37623,35 @@ function Item($$anchor, $$props) {
37566
37623
  delegated("click", button, () => set(infoExpanded, !get$2(infoExpanded)));
37567
37624
  append($$anchor, li_2);
37568
37625
  };
37569
- if_block(node_2, ($$render) => {
37570
- if (get$2(reductionReason)) $$render(consequent);
37626
+ if_block(node_3, ($$render) => {
37627
+ if (get$2(reductionReason)) $$render(consequent_1);
37571
37628
  });
37572
- var li_3 = sibling(node_2, 2);
37629
+ var li_3 = sibling(node_3, 2);
37573
37630
  html$2(li_3, () => purify.sanitize(item().product.description), true);
37574
37631
  reset(li_3);
37575
- var node_3 = sibling(li_3, 2);
37576
- var consequent_1 = ($$anchor) => {
37577
- var li_4 = root_2$1();
37578
- var text_3 = child(li_4, true);
37632
+ var node_4 = sibling(li_3, 2);
37633
+ var consequent_2 = ($$anchor) => {
37634
+ var li_4 = root_3$1();
37635
+ var text_4 = child(li_4, true);
37579
37636
  reset(li_4);
37580
37637
  template_effect(($0) => {
37581
37638
  set_attribute(li_4, "id", infoPanelId);
37582
37639
  set_attribute(li_4, "hidden", !get$2(infoExpanded));
37583
- set_text(text_3, $0);
37640
+ set_text(text_4, $0);
37584
37641
  }, [() => shop.t(get$2(reductionReason))]);
37585
37642
  append($$anchor, li_4);
37586
37643
  };
37587
- if_block(node_3, ($$render) => {
37588
- if (get$2(reductionReason)) $$render(consequent_1);
37644
+ if_block(node_4, ($$render) => {
37645
+ if (get$2(reductionReason)) $$render(consequent_2);
37589
37646
  });
37590
- var li_5 = sibling(node_3, 2);
37591
- var text_4 = child(li_5, true);
37647
+ var li_5 = sibling(node_4, 2);
37648
+ var text_5 = child(li_5, true);
37592
37649
  reset(li_5);
37593
37650
  var li_6 = sibling(li_5, 2);
37594
- var node_4 = child(li_6);
37651
+ var node_5 = child(li_6);
37595
37652
  {
37596
37653
  let $0 = /* @__PURE__ */ user_derived(() => quantityLabel(item()));
37597
- QuantityControl(node_4, {
37654
+ QuantityControl(node_5, {
37598
37655
  get value() {
37599
37656
  return item().quantity;
37600
37657
  },
@@ -37613,9 +37670,9 @@ function Item($$anchor, $$props) {
37613
37670
  reset(li_6);
37614
37671
  reset(ul);
37615
37672
  reset(article);
37616
- var node_5 = sibling(article, 2);
37617
- var consequent_2 = ($$anchor) => {
37618
- var ul_1 = root_3$1();
37673
+ var node_6 = sibling(article, 2);
37674
+ var consequent_3 = ($$anchor) => {
37675
+ var ul_1 = root_4$1();
37619
37676
  each(ul_1, 21, () => subTicketDefs(get$2(mantleProduct)), (sub) => sub.id, ($$anchor, sub) => {
37620
37677
  {
37621
37678
  let $0 = /* @__PURE__ */ user_derived(() => item().mantle?.composition?.[get$2(sub).id] ?? 0);
@@ -37637,19 +37694,19 @@ function Item($$anchor, $$props) {
37637
37694
  template_effect(() => set_attribute(ul_1, "aria-label", get$2(mantleProduct).title));
37638
37695
  append($$anchor, ul_1);
37639
37696
  };
37640
- if_block(node_5, ($$render) => {
37641
- if (get$2(mantleProduct) && item().quantity > 0) $$render(consequent_2);
37697
+ if_block(node_6, ($$render) => {
37698
+ if (get$2(mantleProduct) && item().quantity > 0) $$render(consequent_3);
37642
37699
  });
37643
37700
  reset(li);
37644
37701
  template_effect(() => {
37645
37702
  set_class(article, 1, clsx(["go-tickets-item", get$2(capacity).bookedOut && "is-booked-out"]));
37646
37703
  set_attribute(article, "data-testid", item().uuid);
37647
- set_text(text_4, item().price_formatted);
37704
+ set_text(text_5, item().price_formatted);
37648
37705
  });
37649
37706
  append($$anchor, li);
37650
37707
  };
37651
37708
  if_block(node, ($$render) => {
37652
- if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_3);
37709
+ if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_4);
37653
37710
  });
37654
37711
  append($$anchor, fragment_2);
37655
37712
  return pop($$exports);
@@ -37872,6 +37929,12 @@ delegate(["change"]);
37872
37929
  customElements.define("go-timeslots", create_custom_element(Timeslots, {}, [], ["details"]));
37873
37930
  //#endregion
37874
37931
  //#region src/components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.ts
37932
+ function describeAvailability(value) {
37933
+ if (typeof value === "string") return `'${value}'`;
37934
+ if (value === null || value === void 0) return String(value);
37935
+ if (isPromise(value)) return "a Promise — the callback must be synchronous";
37936
+ return `a ${typeof value}`;
37937
+ }
37875
37938
  var Calendar = class {
37876
37939
  #details = /* @__PURE__ */ state();
37877
37940
  get details() {
@@ -37894,6 +37957,14 @@ var Calendar = class {
37894
37957
  set selected(value) {
37895
37958
  set(this.#selected, value, true);
37896
37959
  }
37960
+ #availabilityOverride = /* @__PURE__ */ state();
37961
+ get availabilityOverride() {
37962
+ return get$2(this.#availabilityOverride);
37963
+ }
37964
+ set availabilityOverride(value) {
37965
+ set(this.#availabilityOverride, value, true);
37966
+ }
37967
+ #logged = [];
37897
37968
  get endpoint() {
37898
37969
  return (this.details?.filters?.map((f) => getFilter(f).calendarEndpoint).filter(Boolean) ?? [])[0] ?? null;
37899
37970
  }
@@ -37905,12 +37976,49 @@ var Calendar = class {
37905
37976
  default: return;
37906
37977
  }
37907
37978
  }
37979
+ /** What gomus makes of a date on its own, ignoring any integrator override. */
37980
+ defaultAvailability(date) {
37981
+ switch (this.dates?.[date.toString()]) {
37982
+ case "unavailable": return "unavailable";
37983
+ case "fully_booked": return "sold_out";
37984
+ default: return "available";
37985
+ }
37986
+ }
37987
+ /** The gomus default, with the integrator's override given the last word. */
37988
+ availability(date) {
37989
+ const defaultAvailability = this.defaultAvailability(date);
37990
+ const override = this.#overrideCallback();
37991
+ if (!override) return defaultAvailability;
37992
+ let returned;
37993
+ try {
37994
+ returned = override(date.toString(), defaultAvailability);
37995
+ } catch (error) {
37996
+ this.#reportOnce("threw", `[go-calendar] the availability-override callback threw (${String(error)}) — using the gomus default instead.`);
37997
+ return defaultAvailability;
37998
+ }
37999
+ if (returned === "pass_through") return defaultAvailability;
38000
+ if (returned === "available" || returned === "sold_out" || returned === "unavailable") return returned;
38001
+ this.#reportOnce("returned", `[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${describeAvailability(returned)} — using the gomus default instead.`);
38002
+ return defaultAvailability;
38003
+ }
38004
+ #overrideCallback() {
38005
+ const source = this.availabilityOverride;
38006
+ if (typeof source === "function") return source;
38007
+ if (!source) return void 0;
38008
+ const candidate = globalThis[source];
38009
+ if (typeof candidate === "function") return candidate;
38010
+ this.#reportOnce(`unresolved:${source}`, `[go-calendar] availability-override="${source}" does not resolve to a function on window — using the gomus defaults.`, console.warn);
38011
+ }
38012
+ #reportOnce(key, message, log = console.error) {
38013
+ if (this.#logged.includes(key)) return;
38014
+ this.#logged.push(key);
38015
+ log(message);
38016
+ }
37908
38017
  isDateDisabled(date) {
37909
- if (this.dates) return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0 || this.dates[date.toString()] == "unavailable";
37910
- return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0;
38018
+ return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0 || this.availability(date) === "unavailable";
37911
38019
  }
37912
38020
  isDateUnavailable(date) {
37913
- return this.dates?.[date.toString()] == "fully_booked";
38021
+ return this.availability(date) === "sold_out";
37914
38022
  }
37915
38023
  get apiFilters() {
37916
38024
  return this.details?.filters?.map((f) => getFilter(f).apiToken).filter(Boolean);
@@ -37939,13 +38047,14 @@ var Calendar = class {
37939
38047
  thisMonth.add({ months: 2 })
37940
38048
  ];
37941
38049
  }
38050
+ #mergedDates(fetchMonth) {
38051
+ return this.fetchPeriod().reduce((all, startAt) => Object.assign(all, fetchMonth(this.params(startAt))), {});
38052
+ }
37942
38053
  eventsDates() {
37943
- const method = shop.calendar.bind(shop);
37944
- return this.fetchPeriod().reduce((prev, startAt) => assign(prev, method(this.params(startAt))), {});
38054
+ return this.#mergedDates((params) => shop.calendar(params));
37945
38055
  }
37946
38056
  ticketsDates() {
37947
- const method = shop.ticketsCalendar.bind(shop);
37948
- return this.fetchPeriod().reduce((prev, startAt) => assign(prev, method(this.params(startAt))), {});
38057
+ return this.#mergedDates((params) => shop.ticketsCalendar(params));
37949
38058
  }
37950
38059
  };
37951
38060
  //#endregion
@@ -38177,12 +38286,19 @@ create_custom_element(CalendarUI, { calendarClass: {} }, [], ["details"], { mode
38177
38286
  //#region src/components/ticketSelection/subcomponents/calendar/components/Calendar.svelte
38178
38287
  function Calendar_1($$anchor, $$props) {
38179
38288
  push($$props, true);
38289
+ /**
38290
+ * Per-date availability override. As an attribute it names a global function
38291
+ * (`<go-calendar availability-override="shopRule">`); as a property it is the function
38292
+ * itself (`element.availabilityOverride = fn`).
38293
+ */
38294
+ let availabilityOverride = prop($$props, "availabilityOverride", 7);
38180
38295
  const ticketsCalendar = new Calendar();
38181
38296
  const details = ticketsCalendar;
38182
38297
  const _ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
38183
38298
  const ticketSelectionDetails = /* @__PURE__ */ user_derived(() => _ticketSelectionDetails.value);
38184
38299
  user_effect(() => {
38185
38300
  ticketsCalendar.details = get$2(ticketSelectionDetails);
38301
+ ticketsCalendar.availabilityOverride = availabilityOverride();
38186
38302
  });
38187
38303
  $$props.$$host.addEventListener("go-date-select", (e) => {
38188
38304
  if (get$2(ticketSelectionDetails)) {
@@ -38190,7 +38306,16 @@ function Calendar_1($$anchor, $$props) {
38190
38306
  get$2(ticketSelectionDetails).selectedTimeslot = void 0;
38191
38307
  }
38192
38308
  });
38193
- var $$exports = { details };
38309
+ var $$exports = {
38310
+ details,
38311
+ get availabilityOverride() {
38312
+ return availabilityOverride();
38313
+ },
38314
+ set availabilityOverride($$value) {
38315
+ availabilityOverride($$value);
38316
+ flushSync();
38317
+ }
38318
+ };
38194
38319
  var fragment = comment();
38195
38320
  var node = first_child(fragment);
38196
38321
  var consequent = ($$anchor) => {
@@ -38204,7 +38329,10 @@ function Calendar_1($$anchor, $$props) {
38204
38329
  append($$anchor, fragment);
38205
38330
  return pop($$exports);
38206
38331
  }
38207
- customElements.define("go-calendar", create_custom_element(Calendar_1, {}, [], ["details"]));
38332
+ customElements.define("go-calendar", create_custom_element(Calendar_1, { availabilityOverride: {
38333
+ attribute: "availability-override",
38334
+ type: "String"
38335
+ } }, [], ["details"]));
38208
38336
  //#endregion
38209
38337
  //#region src/components/ticketSelection/subcomponents/addToCartButton/AddToCartButton.svelte.ts
38210
38338
  var Details = class {