@gomusdev/web-components 1.43.0 → 1.45.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.
@@ -12816,19 +12816,28 @@ class ConfigStoreSvelte {
12816
12816
  this.update();
12817
12817
  }
12818
12818
  update() {
12819
- this.options = assign(this.defaultConfig, this.override);
12819
+ const merged = assign(this.defaultConfig, this.override);
12820
+ merged.forms = Object.keys({ ...this.defaultConfig.forms, ...this.override.forms }).reduce(
12821
+ (acc, key) => {
12822
+ acc[key] = {
12823
+ ...this.defaultConfig.forms[key],
12824
+ ...this.override.forms[key]
12825
+ };
12826
+ return acc;
12827
+ },
12828
+ {}
12829
+ );
12830
+ this.options = merged;
12820
12831
  }
12821
12832
  get config() {
12822
12833
  return this.options;
12823
12834
  }
12824
12835
  define(options) {
12825
- console.log("ConfigStore.define", options);
12826
12836
  this.override = assign(this.override, options);
12827
12837
  this.update();
12828
12838
  return this;
12829
12839
  }
12830
12840
  default(options) {
12831
- console.log("ConfigStore.default", options);
12832
12841
  this.defaultConfig = assign(this.defaultConfig, options);
12833
12842
  this.update();
12834
12843
  return this;
@@ -12870,7 +12879,7 @@ class PersonalizationDetails {
12870
12879
  }
12871
12880
  const KEY$4 = "go-annual-ticket-personalization";
12872
12881
  const setPersonalizationDetails = createSetDetails(KEY$4);
12873
- var root_3$8 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
12882
+ var root_3$9 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
12874
12883
  var root_2$q = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
12875
12884
  function AnnualTicketPersonalization($$anchor, $$props) {
12876
12885
  push($$props, true);
@@ -12908,7 +12917,7 @@ function AnnualTicketPersonalization($$anchor, $$props) {
12908
12917
  var node_2 = sibling(li_1, 2);
12909
12918
  {
12910
12919
  var consequent = ($$anchor4) => {
12911
- var li_2 = root_3$8();
12920
+ var li_2 = root_3$9();
12912
12921
  var a2 = child(li_2);
12913
12922
  var text_2 = child(a2, true);
12914
12923
  reset(a2);
@@ -16475,14 +16484,12 @@ class FormDetails {
16475
16484
  fill(data) {
16476
16485
  const fs = this.fields;
16477
16486
  Object.entries(data).forEach(([key, val]) => {
16478
- console.log(key, val);
16479
16487
  const f = fs.find((f2) => f2.apiKey === key);
16480
16488
  if (!f) {
16481
16489
  console.warn(`(FormDetails.fill) Field with API key ${key} not found.`);
16482
16490
  return;
16483
16491
  }
16484
16492
  if (f.type === "select") {
16485
- console.log(f.options());
16486
16493
  if (!f.options?.().find((o) => o.value === val)) {
16487
16494
  throw new Error(`(FormDetails.fill) Field ${key} has invalid value: ${val}`);
16488
16495
  }
@@ -16590,7 +16597,7 @@ customElements.define("go-form", create_custom_element(
16590
16597
  [],
16591
16598
  ["details"]
16592
16599
  ));
16593
- var root$c = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16600
+ var root$a = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16594
16601
  function PasswordReset($$anchor, $$props) {
16595
16602
  push($$props, true);
16596
16603
  let custom2 = prop($$props, "custom", 7, false);
@@ -16620,7 +16627,7 @@ function PasswordReset($$anchor, $$props) {
16620
16627
  flushSync();
16621
16628
  }
16622
16629
  };
16623
- var go_form = root$c();
16630
+ var go_form = root$a();
16624
16631
  set_custom_element_data(go_form, "formId", "passwordReset");
16625
16632
  template_effect(() => set_custom_element_data(go_form, "custom", custom2()));
16626
16633
  event("submit", go_form, passwordReset);
@@ -16628,7 +16635,6 @@ function PasswordReset($$anchor, $$props) {
16628
16635
  return pop($$exports);
16629
16636
  }
16630
16637
  customElements.define("go-password-reset", create_custom_element(PasswordReset, { custom: {} }, [], []));
16631
- var root$b = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16632
16638
  function SignIn($$anchor, $$props) {
16633
16639
  push($$props, true);
16634
16640
  Forms.defineForm({
@@ -16639,6 +16645,7 @@ function SignIn($$anchor, $$props) {
16639
16645
  { key: "password", required: true }
16640
16646
  ]
16641
16647
  });
16648
+ let custom2 = prop($$props, "custom", 7, false);
16642
16649
  async function signIn(event2) {
16643
16650
  const form = event2.target;
16644
16651
  const details = form.details;
@@ -16649,11 +16656,18 @@ function SignIn($$anchor, $$props) {
16649
16656
  details.apiErrors = result.error.errors;
16650
16657
  }
16651
16658
  }
16652
- var go_form = root$b();
16653
- set_custom_element_data(go_form, "formId", "signIn");
16654
- event("submit", go_form, signIn);
16655
- append($$anchor, go_form);
16656
- pop();
16659
+ wrapInElement($$props.$$host, "go-form", { "form-id": "signIn", custom: custom2() });
16660
+ $$props.$$host.addEventListener("submit", signIn);
16661
+ var $$exports = {
16662
+ get custom() {
16663
+ return custom2();
16664
+ },
16665
+ set custom($$value = false) {
16666
+ custom2($$value);
16667
+ flushSync();
16668
+ }
16669
+ };
16670
+ return pop($$exports);
16657
16671
  }
16658
16672
  customElements.define("go-sign-in", create_custom_element(
16659
16673
  SignIn,
@@ -16663,9 +16677,9 @@ customElements.define("go-sign-in", create_custom_element(
16663
16677
  [],
16664
16678
  []
16665
16679
  ));
16666
- var root$a = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
16667
16680
  function SignUp($$anchor, $$props) {
16668
16681
  push($$props, true);
16682
+ let custom2 = prop($$props, "custom", 7, false);
16669
16683
  Forms.defineForm({
16670
16684
  id: "signUp",
16671
16685
  submitLabel: "common.actions.register",
@@ -16696,11 +16710,18 @@ function SignUp($$anchor, $$props) {
16696
16710
  details.apiErrors = result.error.errors;
16697
16711
  }
16698
16712
  }
16699
- var go_form = root$a();
16700
- set_custom_element_data(go_form, "formId", "signUp");
16701
- event("submit", go_form, signUp);
16702
- append($$anchor, go_form);
16703
- pop();
16713
+ wrapInElement($$props.$$host, "go-form", { "form-id": "signUp", custom: custom2() });
16714
+ $$props.$$host.addEventListener("submit", signUp);
16715
+ var $$exports = {
16716
+ get custom() {
16717
+ return custom2();
16718
+ },
16719
+ set custom($$value = false) {
16720
+ custom2($$value);
16721
+ flushSync();
16722
+ }
16723
+ };
16724
+ return pop($$exports);
16704
16725
  }
16705
16726
  customElements.define("go-sign-up", create_custom_element(
16706
16727
  SignUp,
@@ -17000,7 +17021,7 @@ function Item$1($$anchor, $$props) {
17000
17021
  delegate(["change", "click"]);
17001
17022
  create_custom_element(Item$1, { cartItem: {}, cart: {}, preview: {} }, [], [], { mode: "open" });
17002
17023
  var root_2$o = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove" data-go-cart-header-remove=""></li>`);
17003
- var root_3$7 = /* @__PURE__ */ from_html(`<li class="go-cart-item" data-go-cart-item=""><!></li>`);
17024
+ var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-item" data-go-cart-item=""><!></li>`);
17004
17025
  var root_4$6 = /* @__PURE__ */ from_html(`<li class="go-cart-footer-remove" data-go-cart-footer-remove=""></li>`);
17005
17026
  var root_1$f = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li class="go-cart-header" data-go-cart-header="" data-testid="cart-header"><ul><li class="go-cart-header-title" data-go-cart-header-title=""> </li> <li class="go-cart-header-price" data-go-cart-header-price=""> </li> <li class="go-cart-header-count" data-go-cart-header-count=""> </li> <!> <li class="go-cart-header-sum" data-go-cart-header-sum=""> </li></ul></li> <!> <li class="go-cart-footer" data-go-cart-footer="" data-testid="cart-footer"><ul><li class="go-cart-footer-title" data-go-cart-footer-title=""></li> <li class="go-cart-footer-price" data-go-cart-footer-price=""></li> <li class="go-cart-footer-count" data-go-cart-footer-count=""></li> <!> <li class="go-cart-footer-sum" data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
17006
17027
  function Cart($$anchor, $$props) {
@@ -17049,7 +17070,7 @@ function Cart($$anchor, $$props) {
17049
17070
  reset(li);
17050
17071
  var node_2 = sibling(li, 2);
17051
17072
  each(node_2, 17, () => get$2(cart).items, (cartItem) => cartItem.uuid, ($$anchor3, cartItem) => {
17052
- var li_6 = root_3$7();
17073
+ var li_6 = root_3$8();
17053
17074
  var node_3 = child(li_6);
17054
17075
  Item$1(node_3, {
17055
17076
  get cartItem() {
@@ -17140,26 +17161,24 @@ function CheckoutForm($$anchor, $$props) {
17140
17161
  ]
17141
17162
  });
17142
17163
  wrapInElement($$props.$$host, "go-form", { "form-id": "checkoutGuest", custom: custom2() });
17143
- const form = $$props.$$host.querySelector("go-form");
17144
- onMount(async () => {
17145
- $$props.$$host.addEventListener("go-submit", async (e) => {
17146
- const auth = await shop.signUp(form.details.formData, true);
17147
- if (auth.error) {
17148
- form.details.apiErrors = auth.error.errors;
17149
- return;
17150
- }
17151
- const checkout = await shop.checkout(get$2(cart).orderData());
17152
- if (checkout.error) {
17153
- form.details.apiErrors = checkout.error;
17154
- return;
17155
- }
17156
- const beforeSubmit = configStore.config.forms.checkoutGuest?.beforeSubmit;
17157
- if (beforeSubmit) {
17158
- await beforeSubmit(form.details.formData);
17159
- }
17160
- const paymentUrl = checkout.data.meta.payment_url;
17161
- configStore.config.navigateTo?.(paymentUrl);
17162
- });
17164
+ $$props.$$host.addEventListener("submit", async (e) => {
17165
+ const form = e.target;
17166
+ const auth = await shop.signUp(form.details.formData, true);
17167
+ if (auth.error) {
17168
+ form.details.apiErrors = auth.error.errors;
17169
+ return;
17170
+ }
17171
+ const checkout = await shop.checkout(get$2(cart).orderData());
17172
+ if (checkout.error) {
17173
+ form.details.apiErrors = checkout.error;
17174
+ return;
17175
+ }
17176
+ const beforeSubmit = configStore.config.forms.checkoutGuest?.beforeSubmit;
17177
+ if (beforeSubmit) {
17178
+ await beforeSubmit(form.details.formData);
17179
+ }
17180
+ const paymentUrl = checkout.data.meta.payment_url;
17181
+ configStore.config.navigateTo?.(paymentUrl);
17163
17182
  });
17164
17183
  var $$exports = {
17165
17184
  get custom() {
@@ -30345,7 +30364,7 @@ function Date_picker_content($$anchor, $$props) {
30345
30364
  return pop($$exports);
30346
30365
  }
30347
30366
  create_custom_element(Date_picker_content, { ref: {}, onOpenAutoFocus: {} }, [], [], { mode: "open" });
30348
- var root_3$6 = /* @__PURE__ */ from_html(`<button><!></button>`);
30367
+ var root_3$7 = /* @__PURE__ */ from_html(`<button><!></button>`);
30349
30368
  function Popover_trigger($$anchor, $$props) {
30350
30369
  const uid = props_id();
30351
30370
  push($$props, true);
@@ -30456,7 +30475,7 @@ function Popover_trigger($$anchor, $$props) {
30456
30475
  append($$anchor3, fragment_2);
30457
30476
  };
30458
30477
  var alternate = ($$anchor3) => {
30459
- var button = root_3$6();
30478
+ var button = root_3$7();
30460
30479
  attribute_effect(button, () => ({ ...get$2(mergedProps) }));
30461
30480
  var node_2 = child(button);
30462
30481
  snippet(node_2, () => children() ?? noop$1);
@@ -30844,7 +30863,7 @@ create_custom_element(
30844
30863
  );
30845
30864
  var root_2$6 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
30846
30865
  var root_1$b = /* @__PURE__ */ from_html(` <!>`, 1);
30847
- var root_3$5 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
30866
+ var root_3$6 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
30848
30867
  var root_4$3 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
30849
30868
  var root_7$2 = /* @__PURE__ */ from_html(`<option> </option>`);
30850
30869
  var root_6$1 = /* @__PURE__ */ from_html(`<option disabled hidden="" selected> </option> <!>`, 1);
@@ -30871,7 +30890,7 @@ function InputAndLabel($$anchor, $$props) {
30871
30890
  append($$anchor2, fragment);
30872
30891
  };
30873
30892
  const input = ($$anchor2) => {
30874
- var fragment_1 = root_3$5();
30893
+ var fragment_1 = root_3$6();
30875
30894
  var label_1 = first_child(fragment_1);
30876
30895
  var node_1 = child(label_1);
30877
30896
  labelText(node_1);
@@ -31166,7 +31185,7 @@ create_custom_element(
31166
31185
  { mode: "open" }
31167
31186
  );
31168
31187
  var root_1$a = /* @__PURE__ */ from_html(`<span> </span>`);
31169
- var root_3$4 = /* @__PURE__ */ from_html(`<li> </li>`);
31188
+ var root_3$5 = /* @__PURE__ */ from_html(`<li> </li>`);
31170
31189
  var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors" role="alert"></ul>`);
31171
31190
  var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
31172
31191
  function Field($$anchor, $$props) {
@@ -31268,7 +31287,7 @@ function Field($$anchor, $$props) {
31268
31287
  var consequent_1 = ($$anchor2) => {
31269
31288
  var ul = root_2$5();
31270
31289
  each(ul, 21, () => get$2(allErrors), index$1, ($$anchor3, error) => {
31271
- var li = root_3$4();
31290
+ var li = root_3$5();
31272
31291
  var text_1 = child(li, true);
31273
31292
  reset(li);
31274
31293
  template_effect(() => set_text(text_1, get$2(error)));
@@ -31316,7 +31335,7 @@ function AllFields($$anchor, $$props) {
31316
31335
  customElements.define("go-all-fields", create_custom_element(AllFields, {}, [], []));
31317
31336
  var root_2$4 = /* @__PURE__ */ from_html(`<p aria-live="assertive" class="sr-only"> </p>`);
31318
31337
  var root_4$2 = /* @__PURE__ */ from_html(`<li> </li>`);
31319
- var root_3$3 = /* @__PURE__ */ from_html(`<ul class="go-error-feedback-api-errors"></ul>`);
31338
+ var root_3$4 = /* @__PURE__ */ from_html(`<ul class="go-error-feedback-api-errors"></ul>`);
31320
31339
  var root_5 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
31321
31340
  var root_1$8 = /* @__PURE__ */ from_html(`<div><!> <!> <!></div>`);
31322
31341
  function ErrorsFeedback($$anchor, $$props) {
@@ -31361,7 +31380,7 @@ function ErrorsFeedback($$anchor, $$props) {
31361
31380
  var node_2 = sibling(node_1, 2);
31362
31381
  {
31363
31382
  var consequent_1 = ($$anchor3) => {
31364
- var ul = root_3$3();
31383
+ var ul = root_3$4();
31365
31384
  each(ul, 21, () => get$2(details)?.apiErrors, index$1, ($$anchor4, error) => {
31366
31385
  var li = root_4$2();
31367
31386
  var text_1 = child(li, true);
@@ -31881,7 +31900,8 @@ function Order($$anchor, $$props) {
31881
31900
  customElements.define("go-order", create_custom_element(Order, { token: { attribute: "token", reflect: true, type: "String" } }, [], ["orderDetails"]));
31882
31901
  var root_1$6 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
31883
31902
  var root_2$3 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities"> </span>`, 1);
31884
- var root$3 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank">Download</a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
31903
+ var root_3$3 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
31904
+ var root$3 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></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>`);
31885
31905
  function Event$1($$anchor, $$props) {
31886
31906
  push($$props, true);
31887
31907
  let item = prop($$props, "item", 7), orderDetails = prop($$props, "orderDetails", 7);
@@ -31935,7 +31955,7 @@ function Event$1($$anchor, $$props) {
31935
31955
  });
31936
31956
  }
31937
31957
  var node_1 = sibling(node, 2);
31938
- each(node_1, 17, () => item().attributes.quantities, index$1, ($$anchor2, scalePrice) => {
31958
+ each(node_1, 17, () => item().attributes.quantities, (scalePrice) => scalePrice.id, ($$anchor2, scalePrice) => {
31939
31959
  var fragment_1 = root_2$3();
31940
31960
  var span_3 = sibling(first_child(fragment_1), 2);
31941
31961
  var text_3 = child(span_3);
@@ -31944,22 +31964,46 @@ function Event$1($$anchor, $$props) {
31944
31964
  append($$anchor2, fragment_1);
31945
31965
  });
31946
31966
  var a2 = sibling(node_1, 2);
31967
+ var text_4 = child(a2, true);
31968
+ reset(a2);
31947
31969
  reset(li_1);
31948
31970
  var li_2 = sibling(li_1, 2);
31949
- var text_4 = child(li_2, true);
31971
+ var text_5 = child(li_2, true);
31950
31972
  reset(li_2);
31951
- next(2);
31973
+ var li_3 = sibling(li_2, 4);
31974
+ var node_2 = child(li_3);
31975
+ {
31976
+ var consequent_1 = ($$anchor2) => {
31977
+ var a_1 = root_3$3();
31978
+ var text_6 = child(a_1, true);
31979
+ reset(a_1);
31980
+ template_effect(
31981
+ ($0) => {
31982
+ set_attribute(a_1, "href", shop.apiUrl + item().attributes.ical_url);
31983
+ set_text(text_6, $0);
31984
+ },
31985
+ [() => shop.t("common.calendar")]
31986
+ );
31987
+ append($$anchor2, a_1);
31988
+ };
31989
+ if_block(node_2, ($$render) => {
31990
+ if (item().attributes.ical_url) $$render(consequent_1);
31991
+ });
31992
+ }
31993
+ reset(li_3);
31952
31994
  reset(ul);
31953
31995
  reset(article);
31954
31996
  reset(li);
31955
31997
  template_effect(
31956
- ($0, $1) => {
31998
+ ($0, $1, $2) => {
31957
31999
  set_text(text2, item().attributes.title);
31958
32000
  set_attribute(a2, "href", $0);
31959
32001
  set_text(text_4, $1);
32002
+ set_text(text_5, $2);
31960
32003
  },
31961
32004
  [
31962
32005
  () => orderDetails().downloadLink(item()),
32006
+ () => shop.t("common.download"),
31963
32007
  () => formatCurrency$1(item().price_cents)
31964
32008
  ]
31965
32009
  );
@@ -31969,13 +32013,14 @@ function Event$1($$anchor, $$props) {
31969
32013
  create_custom_element(Event$1, { item: {}, orderDetails: {} }, [], [], { mode: "open" });
31970
32014
  var root_4$1 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
31971
32015
  var root_6 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
31972
- var root_3$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank">Download</a>`, 1);
31973
- var root_7$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization">Personalize</a>`, 1);
32016
+ var root_3$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
32017
+ var root_7$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
31974
32018
  var root_8 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
31975
- var root_2$2 = /* @__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>`);
31976
- var root_10 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31977
- var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization">Personalize</a>`);
31978
- var root_9 = /* @__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>`);
32019
+ var root_9 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
32020
+ var root_2$2 = /* @__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>`);
32021
+ var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
32022
+ var root_12 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
32023
+ 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>`);
31979
32024
  function TicketSale($$anchor, $$props) {
31980
32025
  push($$props, true);
31981
32026
  const APPLE_WALLET_CDN_PATH = `https://cdn.shop.platform.gomus.de/apple_wallet_${shop.locale}.svg`;
@@ -31999,7 +32044,7 @@ function TicketSale($$anchor, $$props) {
31999
32044
  var fragment = comment();
32000
32045
  var node = first_child(fragment);
32001
32046
  {
32002
- var consequent_4 = ($$anchor2) => {
32047
+ var consequent_5 = ($$anchor2) => {
32003
32048
  var fragment_1 = comment();
32004
32049
  var node_1 = first_child(fragment_1);
32005
32050
  each(node_1, 17, () => ({ length: item().attributes.quantity }), index$1, ($$anchor3, $$item, index2) => {
@@ -32068,13 +32113,35 @@ function TicketSale($$anchor, $$props) {
32068
32113
  });
32069
32114
  }
32070
32115
  var a2 = sibling(node_3, 4);
32071
- template_effect(($0) => set_attribute(a2, "href", $0), [() => orderDetails().downloadLink(item(), get$2(barcodeId))]);
32116
+ var text_4 = child(a2, true);
32117
+ reset(a2);
32118
+ template_effect(
32119
+ ($0, $1) => {
32120
+ set_attribute(a2, "href", $0);
32121
+ set_text(text_4, $1);
32122
+ },
32123
+ [
32124
+ () => orderDetails().downloadLink(item(), get$2(barcodeId)),
32125
+ () => shop.t("common.download")
32126
+ ]
32127
+ );
32072
32128
  append($$anchor4, fragment_2);
32073
32129
  };
32074
32130
  var alternate_1 = ($$anchor4) => {
32075
32131
  var fragment_5 = root_7$1();
32076
32132
  var a_1 = sibling(first_child(fragment_5), 2);
32077
- template_effect(($0) => set_attribute(a_1, "href", $0), [() => orderDetails().downloadLink(item())]);
32133
+ var text_5 = child(a_1, true);
32134
+ reset(a_1);
32135
+ template_effect(
32136
+ ($0, $1) => {
32137
+ set_attribute(a_1, "href", $0);
32138
+ set_text(text_5, $1);
32139
+ },
32140
+ [
32141
+ () => orderDetails().downloadLink(item()),
32142
+ () => shop.t("common.personalize")
32143
+ ]
32144
+ );
32078
32145
  append($$anchor4, fragment_5);
32079
32146
  };
32080
32147
  if_block(node_2, ($$render) => {
@@ -32084,7 +32151,7 @@ function TicketSale($$anchor, $$props) {
32084
32151
  }
32085
32152
  reset(li_2);
32086
32153
  var li_3 = sibling(li_2, 2);
32087
- var text_4 = child(li_3, true);
32154
+ var text_6 = child(li_3, true);
32088
32155
  reset(li_3);
32089
32156
  var li_4 = sibling(li_3, 2);
32090
32157
  var node_5 = child(li_4);
@@ -32104,13 +32171,34 @@ function TicketSale($$anchor, $$props) {
32104
32171
  });
32105
32172
  }
32106
32173
  reset(li_4);
32174
+ var li_5 = sibling(li_4, 2);
32175
+ var node_6 = child(li_5);
32176
+ {
32177
+ var consequent_4 = ($$anchor4) => {
32178
+ var a_3 = root_9();
32179
+ var text_7 = child(a_3, true);
32180
+ reset(a_3);
32181
+ template_effect(
32182
+ ($0) => {
32183
+ set_attribute(a_3, "href", shop.apiUrl + item().attributes.ical_url);
32184
+ set_text(text_7, $0);
32185
+ },
32186
+ [() => shop.t("common.calendar")]
32187
+ );
32188
+ append($$anchor4, a_3);
32189
+ };
32190
+ if_block(node_6, ($$render) => {
32191
+ if (item().attributes.ical_url) $$render(consequent_4);
32192
+ });
32193
+ }
32194
+ reset(li_5);
32107
32195
  reset(ul);
32108
32196
  reset(article);
32109
32197
  reset(li);
32110
32198
  template_effect(
32111
32199
  ($0) => {
32112
32200
  set_text(text2, item().attributes.title);
32113
- set_text(text_4, $0);
32201
+ set_text(text_6, $0);
32114
32202
  },
32115
32203
  [() => formatCurrency$1(item().price_cents)]
32116
32204
  );
@@ -32119,53 +32207,75 @@ function TicketSale($$anchor, $$props) {
32119
32207
  append($$anchor2, fragment_1);
32120
32208
  };
32121
32209
  var alternate_3 = ($$anchor2) => {
32122
- var li_5 = root_9();
32123
- var article_1 = child(li_5);
32210
+ var li_6 = root_10();
32211
+ var article_1 = child(li_6);
32124
32212
  var ul_1 = child(article_1);
32125
- var li_6 = child(ul_1);
32126
- var text_5 = child(li_6, true);
32127
- reset(li_6);
32128
- var li_7 = sibling(li_6, 2);
32129
- var span_4 = child(li_7);
32130
- var text_6 = child(span_4, true);
32213
+ var li_7 = child(ul_1);
32214
+ var text_8 = child(li_7, true);
32215
+ reset(li_7);
32216
+ var li_8 = sibling(li_7, 2);
32217
+ var span_4 = child(li_8);
32218
+ var text_9 = child(span_4, true);
32131
32219
  reset(span_4);
32132
- var node_6 = sibling(span_4, 2);
32220
+ var node_7 = sibling(span_4, 2);
32133
32221
  {
32134
- var consequent_5 = ($$anchor3) => {
32135
- var a_3 = root_10();
32136
- template_effect(($0) => set_attribute(a_3, "href", $0), [() => orderDetails().downloadLink(item())]);
32137
- append($$anchor3, a_3);
32138
- };
32139
- var alternate_2 = ($$anchor3) => {
32222
+ var consequent_6 = ($$anchor3) => {
32140
32223
  var a_4 = root_11$1();
32141
- template_effect(($0) => set_attribute(a_4, "href", $0), [() => orderDetails().downloadLink(item())]);
32224
+ var text_10 = child(a_4, true);
32225
+ reset(a_4);
32226
+ template_effect(
32227
+ ($0, $1) => {
32228
+ set_attribute(a_4, "href", $0);
32229
+ set_text(text_10, $1);
32230
+ },
32231
+ [
32232
+ () => orderDetails().downloadLink(item()),
32233
+ () => shop.t("common.download")
32234
+ ]
32235
+ );
32142
32236
  append($$anchor3, a_4);
32143
32237
  };
32144
- if_block(node_6, ($$render) => {
32145
- if (item().attributes.is_voucher) $$render(consequent_5);
32238
+ var alternate_2 = ($$anchor3) => {
32239
+ var a_5 = root_12();
32240
+ var text_11 = child(a_5, true);
32241
+ reset(a_5);
32242
+ template_effect(
32243
+ ($0, $1) => {
32244
+ set_attribute(a_5, "href", $0);
32245
+ set_text(text_11, $1);
32246
+ },
32247
+ [
32248
+ () => orderDetails().downloadLink(item()),
32249
+ () => shop.t("common.personalize")
32250
+ ]
32251
+ );
32252
+ append($$anchor3, a_5);
32253
+ };
32254
+ if_block(node_7, ($$render) => {
32255
+ if (item().attributes.is_voucher) $$render(consequent_6);
32146
32256
  else $$render(alternate_2, false);
32147
32257
  });
32148
32258
  }
32149
- reset(li_7);
32150
- var li_8 = sibling(li_7, 2);
32151
- var text_7 = child(li_8, true);
32152
32259
  reset(li_8);
32260
+ var li_9 = sibling(li_8, 2);
32261
+ var text_12 = child(li_9, true);
32262
+ reset(li_9);
32153
32263
  next(2);
32154
32264
  reset(ul_1);
32155
32265
  reset(article_1);
32156
- reset(li_5);
32266
+ reset(li_6);
32157
32267
  template_effect(
32158
32268
  ($0) => {
32159
- set_text(text_5, item().attributes.quantity);
32160
- set_text(text_6, item().attributes.title);
32161
- set_text(text_7, $0);
32269
+ set_text(text_8, item().attributes.quantity);
32270
+ set_text(text_9, item().attributes.title);
32271
+ set_text(text_12, $0);
32162
32272
  },
32163
32273
  [() => formatCurrency$1(item().price_cents)]
32164
32274
  );
32165
- append($$anchor2, li_5);
32275
+ append($$anchor2, li_6);
32166
32276
  };
32167
32277
  if_block(node, ($$render) => {
32168
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_4);
32278
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_5);
32169
32279
  else $$render(alternate_3, false);
32170
32280
  });
32171
32281
  }
@@ -32173,7 +32283,7 @@ function TicketSale($$anchor, $$props) {
32173
32283
  return pop($$exports);
32174
32284
  }
32175
32285
  create_custom_element(TicketSale, { item: {}, orderDetails: {} }, [], [], { mode: "open" });
32176
- var root_1$5 = /* @__PURE__ */ from_html(`<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count">Count</li> <li class="go-order-breakdown-header-product">Product</li> <li class="go-order-breakdown-header-price">Price</li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>`);
32286
+ var root_1$5 = /* @__PURE__ */ from_html(`<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>`);
32177
32287
  function Breakdown($$anchor, $$props) {
32178
32288
  push($$props, true);
32179
32289
  const _orderDetails = getDetails($$props.$$host);
@@ -32184,7 +32294,21 @@ function Breakdown($$anchor, $$props) {
32184
32294
  {
32185
32295
  var consequent_2 = ($$anchor2) => {
32186
32296
  var ol = root_1$5();
32187
- var node_1 = sibling(child(ol), 2);
32297
+ var li = child(ol);
32298
+ var ul = child(li);
32299
+ var li_1 = child(ul);
32300
+ var text2 = child(li_1, true);
32301
+ reset(li_1);
32302
+ var li_2 = sibling(li_1, 2);
32303
+ var text_1 = child(li_2, true);
32304
+ reset(li_2);
32305
+ var li_3 = sibling(li_2, 2);
32306
+ var text_2 = child(li_3, true);
32307
+ reset(li_3);
32308
+ next(2);
32309
+ reset(ul);
32310
+ reset(li);
32311
+ var node_1 = sibling(li, 2);
32188
32312
  each(node_1, 17, () => get$2(order).items, (item) => item.id, ($$anchor3, item) => {
32189
32313
  var fragment_1 = comment();
32190
32314
  var node_2 = first_child(fragment_1);
@@ -32230,20 +32354,33 @@ function Breakdown($$anchor, $$props) {
32230
32354
  }
32231
32355
  append($$anchor3, fragment_1);
32232
32356
  });
32233
- var li = sibling(node_1, 2);
32234
- var ul = child(li);
32235
- var li_1 = sibling(child(ul), 4);
32236
- var text2 = child(li_1);
32237
- reset(li_1);
32357
+ var li_4 = sibling(node_1, 2);
32358
+ var ul_1 = child(li_4);
32359
+ var li_5 = sibling(child(ul_1), 4);
32360
+ var text_3 = child(li_5, true);
32361
+ reset(li_5);
32238
32362
  next(2);
32239
- reset(ul);
32240
- reset(li);
32363
+ reset(ul_1);
32364
+ reset(li_4);
32241
32365
  reset(ol);
32242
- template_effect(($0) => set_text(text2, `Total: ${$0 ?? ""}`), [() => formatCurrency$1(get$2(order).total_price_cents)]);
32366
+ template_effect(
32367
+ ($0, $1, $2, $3) => {
32368
+ set_text(text2, $0);
32369
+ set_text(text_1, $1);
32370
+ set_text(text_2, $2);
32371
+ set_text(text_3, $3);
32372
+ },
32373
+ [
32374
+ () => shop.t("common.table.count"),
32375
+ () => shop.t("common.table.product"),
32376
+ () => shop.t("common.table.price"),
32377
+ () => shop.t("common.table.total", { value: formatCurrency$1(get$2(order).total_price_cents) })
32378
+ ]
32379
+ );
32243
32380
  append($$anchor2, ol);
32244
32381
  };
32245
32382
  if_block(node, ($$render) => {
32246
- if (get$2(order)) $$render(consequent_2);
32383
+ if (get$2(order) && get$2(orderDetails)) $$render(consequent_2);
32247
32384
  });
32248
32385
  }
32249
32386
  append($$anchor, fragment);
@@ -1 +1 @@
1
- export declare function wrapInElement(host: HTMLElement, tag: string, props?: Record<string, string | boolean>): HTMLElement;
1
+ export declare function wrapInElement(host: HTMLElement, tag: string, props?: Record<string, unknown | boolean>): HTMLElement;