@gomusdev/web-components 0.0.20 → 0.0.22

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.
Files changed (25) hide show
  1. package/dist-js/components/forms/ui/Signup.svelte.d.ts +1 -0
  2. package/dist-js/components/forms/ui/generic/AllFields.svelte.d.ts +1 -0
  3. package/dist-js/components/forms/ui/generic/ErrorsFeedback.svelte.d.ts +1 -0
  4. package/dist-js/components/forms/ui/generic/FieldGroup.svelte.d.ts +1 -0
  5. package/dist-js/components/forms/ui/generic/Form.svelte.d.ts +1 -0
  6. package/dist-js/components/forms/ui/generic/FormFeedback.svelte.d.ts +1 -0
  7. package/dist-js/components/forms/ui/generic/InputAndLabel.svelte.d.ts +1 -0
  8. package/dist-js/components/forms/ui/generic/Submit.spec.d.ts +1 -0
  9. package/dist-js/components/forms/ui/generic/Submit.svelte.d.ts +1 -0
  10. package/dist-js/components/forms/ui/generic/SuccessFeedback.svelte.d.ts +1 -0
  11. package/dist-js/components/forms/ui/specs/TestForm.spec.d.ts +1 -0
  12. package/dist-js/components/ticketSelection/TicketSelectionDetails.svelte.d.ts +2 -1
  13. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/TicketGroup.svelte.d.ts +1 -1
  14. package/dist-js/components/ticketSelection/subcomponents/timeslots/lib/generateAvailableTimeSlots.specs.d.ts +1 -121
  15. package/dist-js/gomus-webcomponents.css +12 -3
  16. package/dist-js/gomus-webcomponents.iife.js +2132 -138
  17. package/dist-js/gomus-webcomponents.js +2132 -138
  18. package/dist-js/lib/gomusTicket.svelte.d.ts +1 -1
  19. package/dist-js/lib/helpers/utils.d.ts +1 -0
  20. package/dist-js/lib/helpers/wrapInElement.d.ts +1 -0
  21. package/dist-js/lib/helpers/wrapInElement.spec.d.ts +1 -0
  22. package/dist-js/lib/stores/shop.svelte.d.ts +62 -0
  23. package/dist-js/lib/stores/shop.svelte.test.d.ts +1 -3
  24. package/dist-js/mocks/ShopMocks.d.ts +179 -0
  25. package/package.json +1 -1
@@ -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, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _ticketGroups, _preCarts, _tickets, _preCart, _type, _ticketSelectionDetails, _ticketSelectionDetails2, _b, _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, _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, _fields, _form, _mode, _filters, _eventId, _museumIds, _exhibitionIds, _ticketIds, _selectedDate, _selectedTimeslot, _ticketGroups, _preCarts, _tickets, _preCart, _filters2, _ticketSelectionDetails, _ticketSelectionDetails2, _b, _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, _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);
@@ -262,9 +262,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
262
262
  }
263
263
  const empty = [];
264
264
  function snapshot(value, skip_warning = false) {
265
- return clone(value, /* @__PURE__ */ new Map(), "", empty);
265
+ return clone$1(value, /* @__PURE__ */ new Map(), "", empty);
266
266
  }
267
- function clone(value, cloned, path, paths, original = null) {
267
+ function clone$1(value, cloned, path, paths, original = null) {
268
268
  if (typeof value === "object" && value !== null) {
269
269
  var unwrapped = cloned.get(value);
270
270
  if (unwrapped !== void 0) return unwrapped;
@@ -288,7 +288,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
288
288
  for (var i = 0; i < value.length; i += 1) {
289
289
  var element = value[i];
290
290
  if (i in value) {
291
- copy[i] = clone(element, cloned, path, paths);
291
+ copy[i] = clone$1(element, cloned, path, paths);
292
292
  }
293
293
  }
294
294
  return copy;
@@ -300,7 +300,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
300
300
  cloned.set(original, copy);
301
301
  }
302
302
  for (var key in value) {
303
- copy[key] = clone(value[key], cloned, path, paths);
303
+ copy[key] = clone$1(value[key], cloned, path, paths);
304
304
  }
305
305
  return copy;
306
306
  }
@@ -312,7 +312,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
312
312
  }
313
313
  if (typeof /** @type {T & { toJSON?: any } } */
314
314
  value.toJSON === "function") {
315
- return clone(
315
+ return clone$1(
316
316
  /** @type {T & { toJSON(): any } } */
317
317
  value.toJSON(),
318
318
  cloned,
@@ -757,6 +757,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
757
757
  }
758
758
  const batches = /* @__PURE__ */ new Set();
759
759
  let current_batch = null;
760
+ let previous_batch = null;
760
761
  let batch_deriveds = null;
761
762
  let effect_pending_updates = /* @__PURE__ */ new Set();
762
763
  let tasks = [];
@@ -864,6 +865,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
864
865
  process(root_effects) {
865
866
  var _a2;
866
867
  queued_root_effects = [];
868
+ previous_batch = null;
867
869
  var current_values = null;
868
870
  if (batches.size > 1) {
869
871
  current_values = /* @__PURE__ */ new Map();
@@ -892,6 +894,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
892
894
  __privateSet(this, _render_effects, []);
893
895
  __privateSet(this, _effects, []);
894
896
  __privateSet(this, _block_effects, []);
897
+ previous_batch = current_batch;
895
898
  current_batch = null;
896
899
  flush_queued_effects(render_effects);
897
900
  flush_queued_effects(effects);
@@ -940,6 +943,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
940
943
  }
941
944
  deactivate() {
942
945
  current_batch = null;
946
+ previous_batch = null;
943
947
  for (const update of effect_pending_updates) {
944
948
  effect_pending_updates.delete(update);
945
949
  update();
@@ -2574,7 +2578,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2574
2578
  return clone2;
2575
2579
  };
2576
2580
  }
2577
- function text(value = "") {
2581
+ function text$1(value = "") {
2578
2582
  if (!hydrating) {
2579
2583
  var t = create_text(value + "");
2580
2584
  assign_nodes(t, t);
@@ -3414,7 +3418,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3414
3418
  next2.e.prev = prev && prev.e;
3415
3419
  }
3416
3420
  }
3417
- function html(node, get_value, svg = false, mathml = false, skip_warning = false) {
3421
+ function html$2(node, get_value, svg2 = false, mathml = false, skip_warning = false) {
3418
3422
  var anchor = node;
3419
3423
  var value = "";
3420
3424
  template_effect(() => {
@@ -3454,10 +3458,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3454
3458
  return;
3455
3459
  }
3456
3460
  var html2 = value + "";
3457
- if (svg) html2 = `<svg>${html2}</svg>`;
3461
+ if (svg2) html2 = `<svg>${html2}</svg>`;
3458
3462
  else if (mathml) html2 = `<math>${html2}</math>`;
3459
3463
  var node2 = create_fragment_from_html(html2);
3460
- if (svg || mathml) {
3464
+ if (svg2 || mathml) {
3461
3465
  node2 = /** @type {Element} */
3462
3466
  /* @__PURE__ */ get_first_child(node2);
3463
3467
  }
@@ -3467,7 +3471,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3467
3471
  /** @type {TemplateNode} */
3468
3472
  node2.lastChild
3469
3473
  );
3470
- if (svg || mathml) {
3474
+ if (svg2 || mathml) {
3471
3475
  while (/* @__PURE__ */ get_first_child(node2)) {
3472
3476
  anchor.before(
3473
3477
  /** @type {Node} */
@@ -3479,6 +3483,22 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3479
3483
  }
3480
3484
  });
3481
3485
  }
3486
+ function slot(anchor, $$props, name, slot_props, fallback_fn) {
3487
+ var _a2;
3488
+ if (hydrating) {
3489
+ hydrate_next();
3490
+ }
3491
+ var slot_fn = (_a2 = $$props.$$slots) == null ? void 0 : _a2[name];
3492
+ var is_interop = false;
3493
+ if (slot_fn === true) {
3494
+ slot_fn = $$props["children"];
3495
+ is_interop = true;
3496
+ }
3497
+ if (slot_fn === void 0) ;
3498
+ else {
3499
+ slot_fn(anchor, is_interop ? () => slot_props : slot_props);
3500
+ }
3501
+ }
3482
3502
  function component(node, get_component, render_fn) {
3483
3503
  if (hydrating) {
3484
3504
  hydrate_next();
@@ -3568,6 +3588,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3568
3588
  const whitespace = [..." \n\r\f \v\uFEFF"];
3569
3589
  function to_class(value, hash, directives) {
3570
3590
  var classname = value == null ? "" : "" + value;
3591
+ if (hash) {
3592
+ classname = classname ? classname + " " + hash : hash;
3593
+ }
3571
3594
  if (directives) {
3572
3595
  for (var key in directives) {
3573
3596
  if (directives[key]) {
@@ -3782,6 +3805,35 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3782
3805
  observer.disconnect();
3783
3806
  });
3784
3807
  }
3808
+ function bind_select_value(select, get2, set2 = get2) {
3809
+ var mounting = true;
3810
+ listen_to_event_and_reset_event(select, "change", (is_reset) => {
3811
+ var query = is_reset ? "[selected]" : ":checked";
3812
+ var value;
3813
+ if (select.multiple) {
3814
+ value = [].map.call(select.querySelectorAll(query), get_option_value);
3815
+ } else {
3816
+ var selected_option = select.querySelector(query) ?? // will fall back to first non-disabled option if no option is selected
3817
+ select.querySelector("option:not([disabled])");
3818
+ value = selected_option && get_option_value(selected_option);
3819
+ }
3820
+ set2(value);
3821
+ });
3822
+ effect(() => {
3823
+ var value = get2();
3824
+ select_option(select, value, mounting);
3825
+ if (mounting && value === void 0) {
3826
+ var selected_option = select.querySelector(":checked");
3827
+ if (selected_option !== null) {
3828
+ value = get_option_value(selected_option);
3829
+ set2(value);
3830
+ }
3831
+ }
3832
+ select.__value = value;
3833
+ mounting = false;
3834
+ });
3835
+ init_select(select);
3836
+ }
3785
3837
  function get_option_value(option) {
3786
3838
  if ("__value" in option) {
3787
3839
  return option.__value;
@@ -3843,6 +3895,36 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
3843
3895
  element.setAttribute(attribute, value);
3844
3896
  }
3845
3897
  }
3898
+ function set_custom_element_data(node, prop2, value) {
3899
+ var previous_reaction = active_reaction;
3900
+ var previous_effect = active_effect;
3901
+ let was_hydrating = hydrating;
3902
+ if (hydrating) {
3903
+ set_hydrating(false);
3904
+ }
3905
+ set_active_reaction(null);
3906
+ set_active_effect(null);
3907
+ try {
3908
+ if (
3909
+ // `style` should use `set_attribute` rather than the setter
3910
+ prop2 !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
3911
+ // because during their upgrade/instantiation they might add more setters.
3912
+ // Instead, fall back to a simple "an object, then set as property" heuristic.
3913
+ (setters_cache.has(node.nodeName) || // customElements may not be available in browser extension contexts
3914
+ !customElements || customElements.get(node.tagName.toLowerCase()) ? get_setters(node).includes(prop2) : value && typeof value === "object")
3915
+ ) {
3916
+ node[prop2] = value;
3917
+ } else {
3918
+ set_attribute(node, prop2, value == null ? value : String(value));
3919
+ }
3920
+ } finally {
3921
+ set_active_reaction(previous_reaction);
3922
+ set_active_effect(previous_effect);
3923
+ if (was_hydrating) {
3924
+ set_hydrating(true);
3925
+ }
3926
+ }
3927
+ }
3846
3928
  function set_attributes(element, prev, next2, css_hash, skip_warning = false) {
3847
3929
  var attributes = get_attributes(element);
3848
3930
  var is_custom_element = attributes[IS_CUSTOM_ELEMENT];
@@ -4054,6 +4136,60 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4054
4136
  }
4055
4137
  return setters;
4056
4138
  }
4139
+ function bind_value(input, get2, set2 = get2) {
4140
+ var runes = is_runes();
4141
+ var batches2 = /* @__PURE__ */ new WeakSet();
4142
+ listen_to_event_and_reset_event(input, "input", (is_reset) => {
4143
+ var value = is_reset ? input.defaultValue : input.value;
4144
+ value = is_numberlike_input(input) ? to_number(value) : value;
4145
+ set2(value);
4146
+ if (current_batch !== null) {
4147
+ batches2.add(current_batch);
4148
+ }
4149
+ if (runes && value !== (value = get2())) {
4150
+ var start = input.selectionStart;
4151
+ var end = input.selectionEnd;
4152
+ input.value = value ?? "";
4153
+ if (end !== null) {
4154
+ input.selectionStart = start;
4155
+ input.selectionEnd = Math.min(end, input.value.length);
4156
+ }
4157
+ }
4158
+ });
4159
+ if (
4160
+ // If we are hydrating and the value has since changed,
4161
+ // then use the updated value from the input instead.
4162
+ hydrating && input.defaultValue !== input.value || // If defaultValue is set, then value == defaultValue
4163
+ // TODO Svelte 6: remove input.value check and set to empty string?
4164
+ untrack(get2) == null && input.value
4165
+ ) {
4166
+ set2(is_numberlike_input(input) ? to_number(input.value) : input.value);
4167
+ if (current_batch !== null) {
4168
+ batches2.add(current_batch);
4169
+ }
4170
+ }
4171
+ render_effect(() => {
4172
+ var value = get2();
4173
+ if (input === document.activeElement) {
4174
+ var batch = (
4175
+ /** @type {Batch} */
4176
+ previous_batch ?? current_batch
4177
+ );
4178
+ if (batches2.has(batch)) {
4179
+ return;
4180
+ }
4181
+ }
4182
+ if (is_numberlike_input(input) && value === to_number(input.value)) {
4183
+ return;
4184
+ }
4185
+ if (input.type === "date" && !value && !input.value) {
4186
+ return;
4187
+ }
4188
+ if (value !== input.value) {
4189
+ input.value = value ?? "";
4190
+ }
4191
+ });
4192
+ }
4057
4193
  const pending = /* @__PURE__ */ new Set();
4058
4194
  function bind_group(inputs, group_index, input, get2, set2 = get2) {
4059
4195
  var is_checkbox = input.getAttribute("type") === "checkbox";
@@ -4117,6 +4253,24 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4117
4253
  }
4118
4254
  });
4119
4255
  }
4256
+ function bind_checked(input, get2, set2 = get2) {
4257
+ listen_to_event_and_reset_event(input, "change", (is_reset) => {
4258
+ var value = is_reset ? input.defaultChecked : input.checked;
4259
+ set2(value);
4260
+ });
4261
+ if (
4262
+ // If we are hydrating and the value has since changed,
4263
+ // then use the update value from the input instead.
4264
+ hydrating && input.defaultChecked !== input.checked || // If defaultChecked is set, then checked == defaultChecked
4265
+ untrack(get2) == null
4266
+ ) {
4267
+ set2(input.checked);
4268
+ }
4269
+ render_effect(() => {
4270
+ var value = get2();
4271
+ input.checked = Boolean(value);
4272
+ });
4273
+ }
4120
4274
  function get_binding_group_value(group, __value, checked) {
4121
4275
  var value = /* @__PURE__ */ new Set();
4122
4276
  for (var i = 0; i < group.length; i += 1) {
@@ -4129,6 +4283,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4129
4283
  }
4130
4284
  return Array.from(value);
4131
4285
  }
4286
+ function is_numberlike_input(input) {
4287
+ var type = input.type;
4288
+ return type === "number" || type === "range";
4289
+ }
4290
+ function to_number(value) {
4291
+ return value === "" ? null : +value;
4292
+ }
4132
4293
  function is_bound_this(bound_value, element_or_component) {
4133
4294
  return bound_value === element_or_component || (bound_value == null ? void 0 : bound_value[STATE_SYMBOL]) === element_or_component;
4134
4295
  }
@@ -4604,9 +4765,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4604
4765
  if (!this.$$c) {
4605
4766
  let create_slot = function(name) {
4606
4767
  return (anchor) => {
4607
- const slot = document.createElement("slot");
4608
- if (name !== "default") slot.name = name;
4609
- append(anchor, slot);
4768
+ const slot2 = document.createElement("slot");
4769
+ if (name !== "default") slot2.name = name;
4770
+ append(anchor, slot2);
4610
4771
  };
4611
4772
  };
4612
4773
  await Promise.resolve();
@@ -4867,6 +5028,18 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
4867
5028
  const parsed = ids.split(",").map((id) => id.trim()).map(Number).filter((num) => !isNaN(num) && num > 0);
4868
5029
  return parsed.length > 0 ? parsed : void 0;
4869
5030
  }
5031
+ function parseTokens(tokens, possibleTokens) {
5032
+ if (!tokens) {
5033
+ return void 0;
5034
+ }
5035
+ const parsed = tokens.split(",").map((token) => token.trim()).map(String).filter((token) => token.length > 0);
5036
+ parsed.forEach((token) => {
5037
+ if (!possibleTokens.includes(token)) {
5038
+ throw new Error("(parseTokens) Invalid token: " + token);
5039
+ }
5040
+ });
5041
+ return parsed.length > 0 ? parsed : void 0;
5042
+ }
4870
5043
  class User {
4871
5044
  get isAuthenticated() {
4872
5045
  return this.isLoggedIn || this.isGuest;
@@ -9398,13 +9571,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
9398
9571
  class ZodReadonly extends ZodType {
9399
9572
  _parse(input) {
9400
9573
  const result = this._def.innerType._parse(input);
9401
- const freeze = (data) => {
9574
+ const freeze2 = (data) => {
9402
9575
  if (isValid(data)) {
9403
9576
  data.value = Object.freeze(data.value);
9404
9577
  }
9405
9578
  return data;
9406
9579
  };
9407
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
9580
+ return isAsync(result) ? result.then((data) => freeze2(data)) : freeze2(result);
9408
9581
  }
9409
9582
  unwrap() {
9410
9583
  return this._def.innerType;
@@ -11299,11 +11472,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11299
11472
  priceCents = priceCents ?? 0;
11300
11473
  return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(priceCents / 100);
11301
11474
  }
11302
- var root_4$1 = /* @__PURE__ */ from_html(`<span> </span>`);
11303
- var root_3$2 = /* @__PURE__ */ from_html(`<span> </span> <!>`, 1);
11475
+ var root_4$2 = /* @__PURE__ */ from_html(`<span> </span>`);
11476
+ var root_3$4 = /* @__PURE__ */ from_html(`<span> </span> <!>`, 1);
11304
11477
  var on_click = (_, cartItem) => cart.deleteItem(get(cartItem));
11305
- var root_2$g = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <li data-go-cart-item-remove=""><button>⨉</button></li> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
11306
- var root_1$3 = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li data-go-cart-header="" data-testid="cart-header"><ul><li data-go-cart-item-title="">Product</li> <li data-go-cart-item-price="">Price</li> <li data-go-cart-item-count="">Count</li> <li data-go-cart-item-remove="">remove</li> <li data-go-cart-item-sum="">Sum</li></ul></li> <!> <li data-go-cart-footer="" data-testid="cart-footer"><ul><li data-go-cart-item-title=""></li> <li data-go-cart-item-price=""></li> <li data-go-cart-item-count=""></li> <li data-go-cart-item-remove=""></li> <li data-go-cart-item-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
11478
+ var root_2$j = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <li data-go-cart-item-remove=""><button>⨉</button></li> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
11479
+ var root_1$9 = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li data-go-cart-header="" data-testid="cart-header"><ul><li data-go-cart-item-title="">Product</li> <li data-go-cart-item-price="">Price</li> <li data-go-cart-item-count="">Count</li> <li data-go-cart-item-remove="">remove</li> <li data-go-cart-item-sum="">Sum</li></ul></li> <!> <li data-go-cart-footer="" data-testid="cart-footer"><ul><li data-go-cart-item-title=""></li> <li data-go-cart-item-price=""></li> <li data-go-cart-item-count=""></li> <li data-go-cart-item-remove=""></li> <li data-go-cart-item-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
11307
11480
  function Cart($$anchor, $$props) {
11308
11481
  push($$props, false);
11309
11482
  init();
@@ -11311,10 +11484,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11311
11484
  var node = first_child(fragment);
11312
11485
  {
11313
11486
  var consequent_2 = ($$anchor2) => {
11314
- var ol = root_1$3();
11487
+ var ol = root_1$9();
11315
11488
  var node_1 = sibling(child(ol), 2);
11316
11489
  each(node_1, 1, () => cart.items, (cartItem) => cartItem.uuid, ($$anchor3, cartItem) => {
11317
- var li = root_2$g();
11490
+ var li = root_2$j();
11318
11491
  var article = child(li);
11319
11492
  var ul = child(article);
11320
11493
  var li_1 = child(ul);
@@ -11322,14 +11495,14 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11322
11495
  var node_2 = sibling(text2);
11323
11496
  {
11324
11497
  var consequent_1 = ($$anchor4) => {
11325
- var fragment_1 = root_3$2();
11498
+ var fragment_1 = root_3$4();
11326
11499
  var span = first_child(fragment_1);
11327
11500
  var text_1 = child(span, true);
11328
11501
  reset(span);
11329
11502
  var node_3 = sibling(span, 2);
11330
11503
  {
11331
11504
  var consequent = ($$anchor5) => {
11332
- var span_1 = root_4$1();
11505
+ var span_1 = root_4$2();
11333
11506
  var text_2 = child(span_1, true);
11334
11507
  reset(span_1);
11335
11508
  template_effect(($0) => set_text(text_2, $0), [() => formatTime(get(cartItem).attributes.time)]);
@@ -11489,13 +11662,263 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11489
11662
  [],
11490
11663
  false
11491
11664
  ));
11492
- function evaluateExpression(expression, data) {
11493
- try {
11494
- const func = new Function("data", `return ${expression};`);
11495
- return func(data);
11496
- } catch (error) {
11497
- console.log(`Error while evaluating when in go-if: ${error.message}`);
11665
+ function createField(data) {
11666
+ const field = proxy({
11667
+ ...data,
11668
+ errors: data.errors || [],
11669
+ value: data.value ?? "",
11670
+ options: data.options ?? [],
11671
+ autocomplete: data.autocomplete ?? "",
11672
+ checked: data.checked ?? false,
11673
+ placeholder: data.placeholder ?? "",
11674
+ description: data.description ?? "",
11675
+ mounted: data.mounted ?? false,
11676
+ validate: () => {
11677
+ validateField(field);
11678
+ }
11679
+ });
11680
+ if (field.type === "checkbox") {
11681
+ user_effect(() => {
11682
+ field.value = "" + field.checked;
11683
+ });
11684
+ }
11685
+ return field;
11686
+ }
11687
+ function validateField(field) {
11688
+ if (!field.validator) return;
11689
+ const validation = field.validator.safeParse(field.value);
11690
+ if (!validation.success) {
11691
+ field.errors = validation.error.format()._errors;
11692
+ } else {
11693
+ field.errors = [];
11694
+ }
11695
+ }
11696
+ var allFields = {
11697
+ salutation: {
11698
+ id: "salutation",
11699
+ type: "select",
11700
+ label: "Please choose",
11701
+ placeholder: "",
11702
+ required: true,
11703
+ description: "",
11704
+ autocomplete: "honorific-prefix",
11705
+ options: [
11706
+ { value: "mr", label: "Mr." },
11707
+ { value: "ms", label: "Ms." },
11708
+ { value: "other", label: "Other" }
11709
+ ],
11710
+ validator: z.string().min(1, "Salutation is required")
11711
+ },
11712
+ firstName: {
11713
+ id: "firstName",
11714
+ type: "text",
11715
+ label: "First name",
11716
+ placeholder: "",
11717
+ required: true,
11718
+ description: "",
11719
+ autocomplete: "given-name",
11720
+ validator: z.string().min(1, "First name is required")
11721
+ },
11722
+ lastName: {
11723
+ id: "lastName",
11724
+ type: "text",
11725
+ label: "Last name",
11726
+ placeholder: "",
11727
+ required: true,
11728
+ description: "",
11729
+ autocomplete: "family-name",
11730
+ validator: z.string().min(1, "Last name is required")
11731
+ },
11732
+ email: {
11733
+ id: "email",
11734
+ type: "email",
11735
+ label: "E-mail",
11736
+ placeholder: "",
11737
+ required: true,
11738
+ description: "",
11739
+ autocomplete: "email",
11740
+ validator: z.string().email("Invalid email")
11741
+ },
11742
+ confirmEmail: {
11743
+ id: "confirmEmail",
11744
+ type: "email",
11745
+ label: "Confirm E-mail",
11746
+ placeholder: "",
11747
+ required: true,
11748
+ description: "",
11749
+ autocomplete: "email",
11750
+ validator: z.string().email("Invalid email").min(1, "Please confirm your email")
11751
+ },
11752
+ password: {
11753
+ id: "password",
11754
+ type: "password",
11755
+ label: "Password",
11756
+ placeholder: "",
11757
+ required: true,
11758
+ description: "",
11759
+ autocomplete: "new-password",
11760
+ validator: z.string().min(6, "Password must be at least 6 characters")
11761
+ },
11762
+ confirmPassword: {
11763
+ id: "confirmPassword",
11764
+ type: "password",
11765
+ label: "Confirm password",
11766
+ placeholder: "",
11767
+ required: true,
11768
+ description: "",
11769
+ autocomplete: "new-password",
11770
+ validator: z.string().min(6, "Please confirm your password")
11771
+ },
11772
+ addressee: {
11773
+ id: "addressee",
11774
+ type: "text",
11775
+ label: "Addressee",
11776
+ placeholder: "",
11777
+ required: true,
11778
+ description: "",
11779
+ autocomplete: "name",
11780
+ validator: z.string().min(1, "Addressee is required")
11781
+ },
11782
+ street: {
11783
+ id: "street",
11784
+ type: "text",
11785
+ label: "Street",
11786
+ placeholder: "",
11787
+ required: true,
11788
+ description: "",
11789
+ autocomplete: "street-address",
11790
+ validator: z.string().min(1, "Street is required")
11791
+ },
11792
+ postcode: {
11793
+ id: "postcode",
11794
+ type: "text",
11795
+ label: "Postcode",
11796
+ placeholder: "",
11797
+ required: true,
11798
+ description: "",
11799
+ autocomplete: "postal-code",
11800
+ validator: z.string().min(1, "Postcode is required")
11801
+ },
11802
+ city: {
11803
+ id: "city",
11804
+ type: "text",
11805
+ label: "City",
11806
+ placeholder: "",
11807
+ required: true,
11808
+ description: "",
11809
+ autocomplete: "address-level2",
11810
+ validator: z.string().min(1, "City is required")
11811
+ },
11812
+ country: {
11813
+ id: "country",
11814
+ type: "select",
11815
+ label: "Country",
11816
+ placeholder: "",
11817
+ required: true,
11818
+ description: "",
11819
+ autocomplete: "country",
11820
+ options: [
11821
+ { value: "de", label: "Germany" },
11822
+ { value: "at", label: "Austria" },
11823
+ { value: "ch", label: "Switzerland" }
11824
+ ],
11825
+ validator: z.string().min(1, "Country is required")
11826
+ },
11827
+ gender: {
11828
+ id: "gender",
11829
+ type: "select",
11830
+ label: "Gender",
11831
+ placeholder: "",
11832
+ required: true,
11833
+ description: "",
11834
+ autocomplete: "sex",
11835
+ options: [
11836
+ { value: "female", label: "Female" },
11837
+ { value: "male", label: "Male" },
11838
+ { value: "third", label: "Third Gender" },
11839
+ { value: "unspecified", label: "Not Specified" }
11840
+ ],
11841
+ validator: z.string().min(1, "Gender is required")
11842
+ },
11843
+ forWhom: {
11844
+ id: "forWhom",
11845
+ type: "select",
11846
+ label: "For Whom",
11847
+ placeholder: "",
11848
+ required: true,
11849
+ description: "",
11850
+ autocomplete: "",
11851
+ options: [
11852
+ { value: "for_me", label: "For Me" },
11853
+ { value: "as_a_gift", label: "As a Gift" }
11854
+ ]
11855
+ },
11856
+ language: {
11857
+ id: "language",
11858
+ type: "select",
11859
+ label: "Language",
11860
+ placeholder: "",
11861
+ required: true,
11862
+ description: "",
11863
+ autocomplete: "language",
11864
+ options: [
11865
+ { value: "de", label: "German" },
11866
+ { value: "en", label: "English" }
11867
+ ],
11868
+ validator: z.string().min(1, "Language is required")
11869
+ },
11870
+ acceptTerms: {
11871
+ id: "acceptTerms",
11872
+ type: "checkbox",
11873
+ label: "I agree to the Terms",
11874
+ placeholder: "",
11875
+ required: true,
11876
+ description: "",
11877
+ autocomplete: "off",
11878
+ validator: z.string().refine((val) => val === "true", {
11879
+ message: "Accepting the terms and conditions is mandatory"
11880
+ })
11881
+ },
11882
+ rememberMe: {
11883
+ id: "rememberMe",
11884
+ type: "checkbox",
11885
+ label: "Remember me",
11886
+ placeholder: "",
11887
+ required: false,
11888
+ description: "",
11889
+ autocomplete: "off",
11890
+ validator: z.boolean()
11891
+ }
11892
+ };
11893
+ const formsSvelte = {
11894
+ signup: ["firstName", "lastName", "email", "password", "acceptTerms"],
11895
+ login: ["email", "password", "rememberMe"],
11896
+ ticketPersonalization: [
11897
+ "forWhom",
11898
+ "email",
11899
+ "gender",
11900
+ "firstName",
11901
+ "lastName",
11902
+ "country",
11903
+ "postcode",
11904
+ "city",
11905
+ "street"
11906
+ ],
11907
+ custom: Object.keys(allFields)
11908
+ };
11909
+ function formFields(formId) {
11910
+ if (!formsSvelte[formId]) {
11911
+ throw new Error(`Form ${formId} not found`);
11498
11912
  }
11913
+ return formsSvelte[formId].map((fid) => createField(allFields[fid]));
11914
+ }
11915
+ function errors(fields) {
11916
+ if (!fields) return 0;
11917
+ const ret = fields.filter((f) => {
11918
+ var _a2;
11919
+ return f.mounted && ((_a2 = f.errors) == null ? void 0 : _a2.length);
11920
+ }).length;
11921
+ return ret;
11499
11922
  }
11500
11923
  function createSetDetails(KEY2) {
11501
11924
  return function(host, details) {
@@ -11518,77 +11941,1648 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11518
11941
  }
11519
11942
  };
11520
11943
  }
11521
- let lastUId = 0;
11522
- class TicketSelectionDetails {
11523
- constructor() {
11524
- __publicField(this, "uid", lastUId++);
11525
- __privateAdd(this, _mode, /* @__PURE__ */ state());
11526
- __privateAdd(this, _filters, /* @__PURE__ */ state());
11527
- __privateAdd(this, _eventId, /* @__PURE__ */ state());
11528
- __privateAdd(this, _museumIds, /* @__PURE__ */ state());
11529
- __privateAdd(this, _exhibitionIds, /* @__PURE__ */ state());
11530
- __privateAdd(this, _ticketIds, /* @__PURE__ */ state());
11531
- __privateAdd(this, _selectedDate, /* @__PURE__ */ state());
11532
- __privateAdd(this, _selectedTimeslot, /* @__PURE__ */ state());
11533
- __privateAdd(this, _ticketGroups, /* @__PURE__ */ state(proxy([])));
11534
- __privateAdd(this, _preCarts, /* @__PURE__ */ user_derived(() => this.ticketGroups.map((tg) => tg.preCart)));
11535
- }
11536
- get mode() {
11537
- return get(__privateGet(this, _mode));
11944
+ class DetailsSvelte {
11945
+ constructor(formId) {
11946
+ __privateAdd(this, _fields, /* @__PURE__ */ state(proxy([])));
11947
+ __privateAdd(this, _form, /* @__PURE__ */ state());
11948
+ const _fields2 = /* @__PURE__ */ user_derived(() => formFields(formId));
11949
+ set(__privateGet(this, _fields), get(_fields2), true);
11538
11950
  }
11539
- set mode(value) {
11540
- set(__privateGet(this, _mode), value, true);
11951
+ get form() {
11952
+ return get(__privateGet(this, _form));
11541
11953
  }
11542
- get filters() {
11543
- return get(__privateGet(this, _filters));
11954
+ set form(value) {
11955
+ set(__privateGet(this, _form), value, true);
11544
11956
  }
11545
- set filters(value) {
11546
- set(__privateGet(this, _filters), value, true);
11957
+ get fields() {
11958
+ return get(__privateGet(this, _fields));
11547
11959
  }
11548
- get eventId() {
11549
- return get(__privateGet(this, _eventId));
11960
+ getField(id) {
11961
+ return get(__privateGet(this, _fields)).find((f) => f.id == id);
11550
11962
  }
11551
- set eventId(value) {
11552
- set(__privateGet(this, _eventId), value, true);
11963
+ }
11964
+ _fields = new WeakMap();
11965
+ _form = new WeakMap();
11966
+ const KEY$2 = "go-request-form";
11967
+ const setDetails = createSetDetails(KEY$2);
11968
+ const getDetails = createGetDetails(KEY$2);
11969
+ function wrapInElement(host, tag, props) {
11970
+ var _a2;
11971
+ const first = host.firstElementChild;
11972
+ if (((_a2 = host.children) == null ? void 0 : _a2.length) === 1 && (first == null ? void 0 : first.tagName.toLowerCase()) === tag) {
11973
+ return first;
11553
11974
  }
11554
- get museumIds() {
11555
- return get(__privateGet(this, _museumIds));
11975
+ const element = document.createElement(tag);
11976
+ if (props) {
11977
+ Object.entries(props).forEach(([key, value]) => {
11978
+ if (typeof value === "boolean") {
11979
+ if (value) {
11980
+ element.setAttribute(key, "");
11981
+ }
11982
+ } else {
11983
+ element.setAttribute(key, value);
11984
+ }
11985
+ });
11556
11986
  }
11557
- set museumIds(value) {
11558
- set(__privateGet(this, _museumIds), value, true);
11987
+ const frag = document.createDocumentFragment();
11988
+ while (host.firstChild) frag.appendChild(host.firstChild);
11989
+ element.appendChild(frag);
11990
+ host.replaceChildren(element);
11991
+ return element;
11992
+ }
11993
+ var root_1$8 = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit>Submit</go-submit>`, 3);
11994
+ function Form($$anchor, $$props) {
11995
+ push($$props, true);
11996
+ let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
11997
+ const details = new DetailsSvelte(formId());
11998
+ setDetails($$props.$$host, details);
11999
+ function handleSubmit(event) {
12000
+ var _a2, _b2;
12001
+ event.preventDefault();
12002
+ details.fields.forEach((f) => {
12003
+ f.validate();
12004
+ });
12005
+ (_a2 = details == null ? void 0 : details.form) == null ? void 0 : _a2.dispatchEvent(new Event("after-validation", event));
12006
+ if (errors(details.fields) === 0) {
12007
+ (_b2 = details == null ? void 0 : details.form) == null ? void 0 : _b2.dispatchEvent(new Event("success", event));
12008
+ }
11559
12009
  }
11560
- get exhibitionIds() {
11561
- return get(__privateGet(this, _exhibitionIds));
12010
+ onMount(() => {
12011
+ const form = wrapInElement($$props.$$host, "form", { novalidate: true });
12012
+ form.addEventListener("submit", handleSubmit);
12013
+ details.form = form;
12014
+ });
12015
+ var fragment = comment();
12016
+ var node = first_child(fragment);
12017
+ {
12018
+ var consequent = ($$anchor2) => {
12019
+ var fragment_1 = root_1$8();
12020
+ var go_all_fields = first_child(fragment_1);
12021
+ var go_form_feedback = sibling(go_all_fields, 2);
12022
+ sibling(go_form_feedback, 2);
12023
+ append($$anchor2, fragment_1);
12024
+ };
12025
+ if_block(node, ($$render) => {
12026
+ if (!custom2()) $$render(consequent);
12027
+ });
11562
12028
  }
11563
- set exhibitionIds(value) {
11564
- set(__privateGet(this, _exhibitionIds), value, true);
12029
+ append($$anchor, fragment);
12030
+ return pop({
12031
+ details,
12032
+ get formId() {
12033
+ return formId();
12034
+ },
12035
+ set formId($$value) {
12036
+ formId($$value);
12037
+ flushSync();
12038
+ },
12039
+ get custom() {
12040
+ return custom2();
12041
+ },
12042
+ set custom($$value) {
12043
+ custom2($$value);
12044
+ flushSync();
12045
+ }
12046
+ });
12047
+ }
12048
+ customElements.define("go-form", create_custom_element(
12049
+ Form,
12050
+ {
12051
+ formId: { attribute: "form-id", reflect: true, type: "String" },
12052
+ custom: { attribute: "custom", reflect: true, type: "Boolean" }
12053
+ },
12054
+ [],
12055
+ ["details"],
12056
+ false
12057
+ ));
12058
+ var root$5 = /* @__PURE__ */ from_html(`<go-form><!></go-form>`, 2);
12059
+ function Signup($$anchor, $$props) {
12060
+ push($$props, true);
12061
+ let custom2 = prop($$props, "custom", 7, false);
12062
+ var go_form = root$5();
12063
+ set_custom_element_data(go_form, "formId", "signup");
12064
+ template_effect(() => set_custom_element_data(go_form, "custom", custom2()));
12065
+ var node = child(go_form);
12066
+ slot(node, $$props, "default", {});
12067
+ reset(go_form);
12068
+ append($$anchor, go_form);
12069
+ return pop({
12070
+ get custom() {
12071
+ return custom2();
12072
+ },
12073
+ set custom($$value = false) {
12074
+ custom2($$value);
12075
+ flushSync();
12076
+ }
12077
+ });
12078
+ }
12079
+ customElements.define("go-signup-form", create_custom_element(
12080
+ Signup,
12081
+ {
12082
+ custom: { attribute: "custom", reflect: true, type: "Boolean" }
12083
+ },
12084
+ ["default"],
12085
+ [],
12086
+ true
12087
+ ));
12088
+ /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
12089
+ const {
12090
+ entries,
12091
+ setPrototypeOf,
12092
+ isFrozen,
12093
+ getPrototypeOf,
12094
+ getOwnPropertyDescriptor
12095
+ } = Object;
12096
+ let {
12097
+ freeze,
12098
+ seal,
12099
+ create
12100
+ } = Object;
12101
+ let {
12102
+ apply,
12103
+ construct
12104
+ } = typeof Reflect !== "undefined" && Reflect;
12105
+ if (!freeze) {
12106
+ freeze = function freeze2(x) {
12107
+ return x;
12108
+ };
12109
+ }
12110
+ if (!seal) {
12111
+ seal = function seal2(x) {
12112
+ return x;
12113
+ };
12114
+ }
12115
+ if (!apply) {
12116
+ apply = function apply2(fun, thisValue, args) {
12117
+ return fun.apply(thisValue, args);
12118
+ };
12119
+ }
12120
+ if (!construct) {
12121
+ construct = function construct2(Func, args) {
12122
+ return new Func(...args);
12123
+ };
12124
+ }
12125
+ const arrayForEach = unapply(Array.prototype.forEach);
12126
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
12127
+ const arrayPop = unapply(Array.prototype.pop);
12128
+ const arrayPush = unapply(Array.prototype.push);
12129
+ const arraySplice = unapply(Array.prototype.splice);
12130
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
12131
+ const stringToString = unapply(String.prototype.toString);
12132
+ const stringMatch = unapply(String.prototype.match);
12133
+ const stringReplace = unapply(String.prototype.replace);
12134
+ const stringIndexOf = unapply(String.prototype.indexOf);
12135
+ const stringTrim = unapply(String.prototype.trim);
12136
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
12137
+ const regExpTest = unapply(RegExp.prototype.test);
12138
+ const typeErrorCreate = unconstruct(TypeError);
12139
+ function unapply(func) {
12140
+ return function(thisArg) {
12141
+ if (thisArg instanceof RegExp) {
12142
+ thisArg.lastIndex = 0;
12143
+ }
12144
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
12145
+ args[_key2 - 1] = arguments[_key2];
12146
+ }
12147
+ return apply(func, thisArg, args);
12148
+ };
12149
+ }
12150
+ function unconstruct(func) {
12151
+ return function() {
12152
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
12153
+ args[_key2] = arguments[_key2];
12154
+ }
12155
+ return construct(func, args);
12156
+ };
12157
+ }
12158
+ function addToSet(set2, array) {
12159
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
12160
+ if (setPrototypeOf) {
12161
+ setPrototypeOf(set2, null);
12162
+ }
12163
+ let l = array.length;
12164
+ while (l--) {
12165
+ let element = array[l];
12166
+ if (typeof element === "string") {
12167
+ const lcElement = transformCaseFunc(element);
12168
+ if (lcElement !== element) {
12169
+ if (!isFrozen(array)) {
12170
+ array[l] = lcElement;
12171
+ }
12172
+ element = lcElement;
12173
+ }
12174
+ }
12175
+ set2[element] = true;
11565
12176
  }
11566
- get ticketIds() {
11567
- return get(__privateGet(this, _ticketIds));
12177
+ return set2;
12178
+ }
12179
+ function cleanArray(array) {
12180
+ for (let index2 = 0; index2 < array.length; index2++) {
12181
+ const isPropertyExist = objectHasOwnProperty(array, index2);
12182
+ if (!isPropertyExist) {
12183
+ array[index2] = null;
12184
+ }
11568
12185
  }
11569
- set ticketIds(value) {
11570
- set(__privateGet(this, _ticketIds), value, true);
12186
+ return array;
12187
+ }
12188
+ function clone(object) {
12189
+ const newObject = create(null);
12190
+ for (const [property, value] of entries(object)) {
12191
+ const isPropertyExist = objectHasOwnProperty(object, property);
12192
+ if (isPropertyExist) {
12193
+ if (Array.isArray(value)) {
12194
+ newObject[property] = cleanArray(value);
12195
+ } else if (value && typeof value === "object" && value.constructor === Object) {
12196
+ newObject[property] = clone(value);
12197
+ } else {
12198
+ newObject[property] = value;
12199
+ }
12200
+ }
11571
12201
  }
11572
- get selectedDate() {
11573
- return get(__privateGet(this, _selectedDate));
12202
+ return newObject;
12203
+ }
12204
+ function lookupGetter(object, prop2) {
12205
+ while (object !== null) {
12206
+ const desc = getOwnPropertyDescriptor(object, prop2);
12207
+ if (desc) {
12208
+ if (desc.get) {
12209
+ return unapply(desc.get);
12210
+ }
12211
+ if (typeof desc.value === "function") {
12212
+ return unapply(desc.value);
12213
+ }
12214
+ }
12215
+ object = getPrototypeOf(object);
11574
12216
  }
11575
- set selectedDate(value) {
11576
- set(__privateGet(this, _selectedDate), value, true);
12217
+ function fallbackValue() {
12218
+ return null;
11577
12219
  }
11578
- get selectedTimeslot() {
11579
- return get(__privateGet(this, _selectedTimeslot));
12220
+ return fallbackValue;
12221
+ }
12222
+ const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
12223
+ const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
12224
+ const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
12225
+ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
12226
+ const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
12227
+ const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
12228
+ const text = freeze(["#text"]);
12229
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
12230
+ const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
12231
+ const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
12232
+ const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
12233
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
12234
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
12235
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
12236
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
12237
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
12238
+ const IS_ALLOWED_URI = seal(
12239
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
12240
+ // eslint-disable-line no-useless-escape
12241
+ );
12242
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
12243
+ const ATTR_WHITESPACE = seal(
12244
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
12245
+ // eslint-disable-line no-control-regex
12246
+ );
12247
+ const DOCTYPE_NAME = seal(/^html$/i);
12248
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
12249
+ var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
12250
+ __proto__: null,
12251
+ ARIA_ATTR,
12252
+ ATTR_WHITESPACE,
12253
+ CUSTOM_ELEMENT,
12254
+ DATA_ATTR,
12255
+ DOCTYPE_NAME,
12256
+ ERB_EXPR,
12257
+ IS_ALLOWED_URI,
12258
+ IS_SCRIPT_OR_DATA,
12259
+ MUSTACHE_EXPR,
12260
+ TMPLIT_EXPR
12261
+ });
12262
+ const NODE_TYPE = {
12263
+ element: 1,
12264
+ text: 3,
12265
+ // Deprecated
12266
+ progressingInstruction: 7,
12267
+ comment: 8,
12268
+ document: 9
12269
+ };
12270
+ const getGlobal = function getGlobal2() {
12271
+ return typeof window === "undefined" ? null : window;
12272
+ };
12273
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
12274
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
12275
+ return null;
11580
12276
  }
11581
- set selectedTimeslot(value) {
11582
- set(__privateGet(this, _selectedTimeslot), value, true);
12277
+ let suffix = null;
12278
+ const ATTR_NAME = "data-tt-policy-suffix";
12279
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
12280
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
11583
12281
  }
11584
- get ticketGroups() {
11585
- return get(__privateGet(this, _ticketGroups));
12282
+ const policyName = "dompurify" + (suffix ? "#" + suffix : "");
12283
+ try {
12284
+ return trustedTypes.createPolicy(policyName, {
12285
+ createHTML(html2) {
12286
+ return html2;
12287
+ },
12288
+ createScriptURL(scriptUrl) {
12289
+ return scriptUrl;
12290
+ }
12291
+ });
12292
+ } catch (_) {
12293
+ console.warn("TrustedTypes policy " + policyName + " could not be created.");
12294
+ return null;
11586
12295
  }
11587
- set ticketGroups(value) {
11588
- set(__privateGet(this, _ticketGroups), value, true);
12296
+ };
12297
+ const _createHooksMap = function _createHooksMap2() {
12298
+ return {
12299
+ afterSanitizeAttributes: [],
12300
+ afterSanitizeElements: [],
12301
+ afterSanitizeShadowDOM: [],
12302
+ beforeSanitizeAttributes: [],
12303
+ beforeSanitizeElements: [],
12304
+ beforeSanitizeShadowDOM: [],
12305
+ uponSanitizeAttribute: [],
12306
+ uponSanitizeElement: [],
12307
+ uponSanitizeShadowNode: []
12308
+ };
12309
+ };
12310
+ function createDOMPurify() {
12311
+ let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
12312
+ const DOMPurify = (root2) => createDOMPurify(root2);
12313
+ DOMPurify.version = "3.2.6";
12314
+ DOMPurify.removed = [];
12315
+ if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
12316
+ DOMPurify.isSupported = false;
12317
+ return DOMPurify;
11589
12318
  }
11590
- get preCarts() {
11591
- return get(__privateGet(this, _preCarts));
12319
+ let {
12320
+ document: document2
12321
+ } = window2;
12322
+ const originalDocument = document2;
12323
+ const currentScript = originalDocument.currentScript;
12324
+ const {
12325
+ DocumentFragment,
12326
+ HTMLTemplateElement,
12327
+ Node: Node2,
12328
+ Element: Element2,
12329
+ NodeFilter,
12330
+ NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
12331
+ HTMLFormElement,
12332
+ DOMParser,
12333
+ trustedTypes
12334
+ } = window2;
12335
+ const ElementPrototype = Element2.prototype;
12336
+ const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
12337
+ const remove = lookupGetter(ElementPrototype, "remove");
12338
+ const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
12339
+ const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
12340
+ const getParentNode = lookupGetter(ElementPrototype, "parentNode");
12341
+ if (typeof HTMLTemplateElement === "function") {
12342
+ const template = document2.createElement("template");
12343
+ if (template.content && template.content.ownerDocument) {
12344
+ document2 = template.content.ownerDocument;
12345
+ }
12346
+ }
12347
+ let trustedTypesPolicy;
12348
+ let emptyHTML = "";
12349
+ const {
12350
+ implementation,
12351
+ createNodeIterator,
12352
+ createDocumentFragment,
12353
+ getElementsByTagName
12354
+ } = document2;
12355
+ const {
12356
+ importNode
12357
+ } = originalDocument;
12358
+ let hooks = _createHooksMap();
12359
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
12360
+ const {
12361
+ MUSTACHE_EXPR: MUSTACHE_EXPR2,
12362
+ ERB_EXPR: ERB_EXPR2,
12363
+ TMPLIT_EXPR: TMPLIT_EXPR2,
12364
+ DATA_ATTR: DATA_ATTR2,
12365
+ ARIA_ATTR: ARIA_ATTR2,
12366
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
12367
+ ATTR_WHITESPACE: ATTR_WHITESPACE2,
12368
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT2
12369
+ } = EXPRESSIONS;
12370
+ let {
12371
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
12372
+ } = EXPRESSIONS;
12373
+ let ALLOWED_TAGS = null;
12374
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
12375
+ let ALLOWED_ATTR = null;
12376
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
12377
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
12378
+ tagNameCheck: {
12379
+ writable: true,
12380
+ configurable: false,
12381
+ enumerable: true,
12382
+ value: null
12383
+ },
12384
+ attributeNameCheck: {
12385
+ writable: true,
12386
+ configurable: false,
12387
+ enumerable: true,
12388
+ value: null
12389
+ },
12390
+ allowCustomizedBuiltInElements: {
12391
+ writable: true,
12392
+ configurable: false,
12393
+ enumerable: true,
12394
+ value: false
12395
+ }
12396
+ }));
12397
+ let FORBID_TAGS = null;
12398
+ let FORBID_ATTR = null;
12399
+ let ALLOW_ARIA_ATTR = true;
12400
+ let ALLOW_DATA_ATTR = true;
12401
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
12402
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
12403
+ let SAFE_FOR_TEMPLATES = false;
12404
+ let SAFE_FOR_XML = true;
12405
+ let WHOLE_DOCUMENT = false;
12406
+ let SET_CONFIG = false;
12407
+ let FORCE_BODY = false;
12408
+ let RETURN_DOM = false;
12409
+ let RETURN_DOM_FRAGMENT = false;
12410
+ let RETURN_TRUSTED_TYPE = false;
12411
+ let SANITIZE_DOM = true;
12412
+ let SANITIZE_NAMED_PROPS = false;
12413
+ const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
12414
+ let KEEP_CONTENT = true;
12415
+ let IN_PLACE = false;
12416
+ let USE_PROFILES = {};
12417
+ let FORBID_CONTENTS = null;
12418
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
12419
+ let DATA_URI_TAGS = null;
12420
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
12421
+ let URI_SAFE_ATTRIBUTES = null;
12422
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
12423
+ const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
12424
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
12425
+ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
12426
+ let NAMESPACE = HTML_NAMESPACE;
12427
+ let IS_EMPTY_INPUT = false;
12428
+ let ALLOWED_NAMESPACES = null;
12429
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
12430
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
12431
+ let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
12432
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
12433
+ let PARSER_MEDIA_TYPE = null;
12434
+ const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
12435
+ const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
12436
+ let transformCaseFunc = null;
12437
+ let CONFIG = null;
12438
+ const formElement = document2.createElement("form");
12439
+ const isRegexOrFunction = function isRegexOrFunction2(testValue) {
12440
+ return testValue instanceof RegExp || testValue instanceof Function;
12441
+ };
12442
+ const _parseConfig = function _parseConfig2() {
12443
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
12444
+ if (CONFIG && CONFIG === cfg) {
12445
+ return;
12446
+ }
12447
+ if (!cfg || typeof cfg !== "object") {
12448
+ cfg = {};
12449
+ }
12450
+ cfg = clone(cfg);
12451
+ PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
12452
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
12453
+ transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
12454
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
12455
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
12456
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
12457
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
12458
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
12459
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
12460
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
12461
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
12462
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
12463
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
12464
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
12465
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
12466
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
12467
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
12468
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
12469
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
12470
+ RETURN_DOM = cfg.RETURN_DOM || false;
12471
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
12472
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
12473
+ FORCE_BODY = cfg.FORCE_BODY || false;
12474
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
12475
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
12476
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
12477
+ IN_PLACE = cfg.IN_PLACE || false;
12478
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
12479
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
12480
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
12481
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
12482
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
12483
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
12484
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
12485
+ }
12486
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
12487
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
12488
+ }
12489
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
12490
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
12491
+ }
12492
+ if (SAFE_FOR_TEMPLATES) {
12493
+ ALLOW_DATA_ATTR = false;
12494
+ }
12495
+ if (RETURN_DOM_FRAGMENT) {
12496
+ RETURN_DOM = true;
12497
+ }
12498
+ if (USE_PROFILES) {
12499
+ ALLOWED_TAGS = addToSet({}, text);
12500
+ ALLOWED_ATTR = [];
12501
+ if (USE_PROFILES.html === true) {
12502
+ addToSet(ALLOWED_TAGS, html$1);
12503
+ addToSet(ALLOWED_ATTR, html);
12504
+ }
12505
+ if (USE_PROFILES.svg === true) {
12506
+ addToSet(ALLOWED_TAGS, svg$1);
12507
+ addToSet(ALLOWED_ATTR, svg);
12508
+ addToSet(ALLOWED_ATTR, xml);
12509
+ }
12510
+ if (USE_PROFILES.svgFilters === true) {
12511
+ addToSet(ALLOWED_TAGS, svgFilters);
12512
+ addToSet(ALLOWED_ATTR, svg);
12513
+ addToSet(ALLOWED_ATTR, xml);
12514
+ }
12515
+ if (USE_PROFILES.mathMl === true) {
12516
+ addToSet(ALLOWED_TAGS, mathMl$1);
12517
+ addToSet(ALLOWED_ATTR, mathMl);
12518
+ addToSet(ALLOWED_ATTR, xml);
12519
+ }
12520
+ }
12521
+ if (cfg.ADD_TAGS) {
12522
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
12523
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
12524
+ }
12525
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
12526
+ }
12527
+ if (cfg.ADD_ATTR) {
12528
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
12529
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
12530
+ }
12531
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
12532
+ }
12533
+ if (cfg.ADD_URI_SAFE_ATTR) {
12534
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
12535
+ }
12536
+ if (cfg.FORBID_CONTENTS) {
12537
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
12538
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
12539
+ }
12540
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
12541
+ }
12542
+ if (KEEP_CONTENT) {
12543
+ ALLOWED_TAGS["#text"] = true;
12544
+ }
12545
+ if (WHOLE_DOCUMENT) {
12546
+ addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
12547
+ }
12548
+ if (ALLOWED_TAGS.table) {
12549
+ addToSet(ALLOWED_TAGS, ["tbody"]);
12550
+ delete FORBID_TAGS.tbody;
12551
+ }
12552
+ if (cfg.TRUSTED_TYPES_POLICY) {
12553
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
12554
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
12555
+ }
12556
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
12557
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
12558
+ }
12559
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
12560
+ emptyHTML = trustedTypesPolicy.createHTML("");
12561
+ } else {
12562
+ if (trustedTypesPolicy === void 0) {
12563
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
12564
+ }
12565
+ if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
12566
+ emptyHTML = trustedTypesPolicy.createHTML("");
12567
+ }
12568
+ }
12569
+ if (freeze) {
12570
+ freeze(cfg);
12571
+ }
12572
+ CONFIG = cfg;
12573
+ };
12574
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
12575
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
12576
+ const _checkValidNamespace = function _checkValidNamespace2(element) {
12577
+ let parent = getParentNode(element);
12578
+ if (!parent || !parent.tagName) {
12579
+ parent = {
12580
+ namespaceURI: NAMESPACE,
12581
+ tagName: "template"
12582
+ };
12583
+ }
12584
+ const tagName = stringToLowerCase(element.tagName);
12585
+ const parentTagName = stringToLowerCase(parent.tagName);
12586
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
12587
+ return false;
12588
+ }
12589
+ if (element.namespaceURI === SVG_NAMESPACE) {
12590
+ if (parent.namespaceURI === HTML_NAMESPACE) {
12591
+ return tagName === "svg";
12592
+ }
12593
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
12594
+ return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
12595
+ }
12596
+ return Boolean(ALL_SVG_TAGS[tagName]);
12597
+ }
12598
+ if (element.namespaceURI === MATHML_NAMESPACE) {
12599
+ if (parent.namespaceURI === HTML_NAMESPACE) {
12600
+ return tagName === "math";
12601
+ }
12602
+ if (parent.namespaceURI === SVG_NAMESPACE) {
12603
+ return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
12604
+ }
12605
+ return Boolean(ALL_MATHML_TAGS[tagName]);
12606
+ }
12607
+ if (element.namespaceURI === HTML_NAMESPACE) {
12608
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
12609
+ return false;
12610
+ }
12611
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
12612
+ return false;
12613
+ }
12614
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
12615
+ }
12616
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
12617
+ return true;
12618
+ }
12619
+ return false;
12620
+ };
12621
+ const _forceRemove = function _forceRemove2(node) {
12622
+ arrayPush(DOMPurify.removed, {
12623
+ element: node
12624
+ });
12625
+ try {
12626
+ getParentNode(node).removeChild(node);
12627
+ } catch (_) {
12628
+ remove(node);
12629
+ }
12630
+ };
12631
+ const _removeAttribute = function _removeAttribute2(name, element) {
12632
+ try {
12633
+ arrayPush(DOMPurify.removed, {
12634
+ attribute: element.getAttributeNode(name),
12635
+ from: element
12636
+ });
12637
+ } catch (_) {
12638
+ arrayPush(DOMPurify.removed, {
12639
+ attribute: null,
12640
+ from: element
12641
+ });
12642
+ }
12643
+ element.removeAttribute(name);
12644
+ if (name === "is") {
12645
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
12646
+ try {
12647
+ _forceRemove(element);
12648
+ } catch (_) {
12649
+ }
12650
+ } else {
12651
+ try {
12652
+ element.setAttribute(name, "");
12653
+ } catch (_) {
12654
+ }
12655
+ }
12656
+ }
12657
+ };
12658
+ const _initDocument = function _initDocument2(dirty) {
12659
+ let doc = null;
12660
+ let leadingWhitespace = null;
12661
+ if (FORCE_BODY) {
12662
+ dirty = "<remove></remove>" + dirty;
12663
+ } else {
12664
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
12665
+ leadingWhitespace = matches && matches[0];
12666
+ }
12667
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) {
12668
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
12669
+ }
12670
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
12671
+ if (NAMESPACE === HTML_NAMESPACE) {
12672
+ try {
12673
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
12674
+ } catch (_) {
12675
+ }
12676
+ }
12677
+ if (!doc || !doc.documentElement) {
12678
+ doc = implementation.createDocument(NAMESPACE, "template", null);
12679
+ try {
12680
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
12681
+ } catch (_) {
12682
+ }
12683
+ }
12684
+ const body = doc.body || doc.documentElement;
12685
+ if (dirty && leadingWhitespace) {
12686
+ body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
12687
+ }
12688
+ if (NAMESPACE === HTML_NAMESPACE) {
12689
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
12690
+ }
12691
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
12692
+ };
12693
+ const _createNodeIterator = function _createNodeIterator2(root2) {
12694
+ return createNodeIterator.call(
12695
+ root2.ownerDocument || root2,
12696
+ root2,
12697
+ // eslint-disable-next-line no-bitwise
12698
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
12699
+ null
12700
+ );
12701
+ };
12702
+ const _isClobbered = function _isClobbered2(element) {
12703
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
12704
+ };
12705
+ const _isNode = function _isNode2(value) {
12706
+ return typeof Node2 === "function" && value instanceof Node2;
12707
+ };
12708
+ function _executeHooks(hooks2, currentNode, data) {
12709
+ arrayForEach(hooks2, (hook) => {
12710
+ hook.call(DOMPurify, currentNode, data, CONFIG);
12711
+ });
12712
+ }
12713
+ const _sanitizeElements = function _sanitizeElements2(currentNode) {
12714
+ let content = null;
12715
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
12716
+ if (_isClobbered(currentNode)) {
12717
+ _forceRemove(currentNode);
12718
+ return true;
12719
+ }
12720
+ const tagName = transformCaseFunc(currentNode.nodeName);
12721
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
12722
+ tagName,
12723
+ allowedTags: ALLOWED_TAGS
12724
+ });
12725
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
12726
+ _forceRemove(currentNode);
12727
+ return true;
12728
+ }
12729
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
12730
+ _forceRemove(currentNode);
12731
+ return true;
12732
+ }
12733
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
12734
+ _forceRemove(currentNode);
12735
+ return true;
12736
+ }
12737
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
12738
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
12739
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
12740
+ return false;
12741
+ }
12742
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
12743
+ return false;
12744
+ }
12745
+ }
12746
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
12747
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
12748
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
12749
+ if (childNodes && parentNode) {
12750
+ const childCount = childNodes.length;
12751
+ for (let i = childCount - 1; i >= 0; --i) {
12752
+ const childClone = cloneNode(childNodes[i], true);
12753
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
12754
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
12755
+ }
12756
+ }
12757
+ }
12758
+ _forceRemove(currentNode);
12759
+ return true;
12760
+ }
12761
+ if (currentNode instanceof Element2 && !_checkValidNamespace(currentNode)) {
12762
+ _forceRemove(currentNode);
12763
+ return true;
12764
+ }
12765
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
12766
+ _forceRemove(currentNode);
12767
+ return true;
12768
+ }
12769
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
12770
+ content = currentNode.textContent;
12771
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
12772
+ content = stringReplace(content, expr, " ");
12773
+ });
12774
+ if (currentNode.textContent !== content) {
12775
+ arrayPush(DOMPurify.removed, {
12776
+ element: currentNode.cloneNode()
12777
+ });
12778
+ currentNode.textContent = content;
12779
+ }
12780
+ }
12781
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
12782
+ return false;
12783
+ };
12784
+ const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
12785
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
12786
+ return false;
12787
+ }
12788
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
12789
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
12790
+ else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
12791
+ if (
12792
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
12793
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
12794
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
12795
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
12796
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
12797
+ lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
12798
+ ) ;
12799
+ else {
12800
+ return false;
12801
+ }
12802
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
12803
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
12804
+ else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
12805
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
12806
+ else if (value) {
12807
+ return false;
12808
+ } else ;
12809
+ return true;
12810
+ };
12811
+ const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
12812
+ return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
12813
+ };
12814
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
12815
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
12816
+ const {
12817
+ attributes
12818
+ } = currentNode;
12819
+ if (!attributes || _isClobbered(currentNode)) {
12820
+ return;
12821
+ }
12822
+ const hookEvent = {
12823
+ attrName: "",
12824
+ attrValue: "",
12825
+ keepAttr: true,
12826
+ allowedAttributes: ALLOWED_ATTR,
12827
+ forceKeepAttr: void 0
12828
+ };
12829
+ let l = attributes.length;
12830
+ while (l--) {
12831
+ const attr = attributes[l];
12832
+ const {
12833
+ name,
12834
+ namespaceURI,
12835
+ value: attrValue
12836
+ } = attr;
12837
+ const lcName = transformCaseFunc(name);
12838
+ const initValue = attrValue;
12839
+ let value = name === "value" ? initValue : stringTrim(initValue);
12840
+ hookEvent.attrName = lcName;
12841
+ hookEvent.attrValue = value;
12842
+ hookEvent.keepAttr = true;
12843
+ hookEvent.forceKeepAttr = void 0;
12844
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
12845
+ value = hookEvent.attrValue;
12846
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
12847
+ _removeAttribute(name, currentNode);
12848
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
12849
+ }
12850
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
12851
+ _removeAttribute(name, currentNode);
12852
+ continue;
12853
+ }
12854
+ if (hookEvent.forceKeepAttr) {
12855
+ continue;
12856
+ }
12857
+ if (!hookEvent.keepAttr) {
12858
+ _removeAttribute(name, currentNode);
12859
+ continue;
12860
+ }
12861
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
12862
+ _removeAttribute(name, currentNode);
12863
+ continue;
12864
+ }
12865
+ if (SAFE_FOR_TEMPLATES) {
12866
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
12867
+ value = stringReplace(value, expr, " ");
12868
+ });
12869
+ }
12870
+ const lcTag = transformCaseFunc(currentNode.nodeName);
12871
+ if (!_isValidAttribute(lcTag, lcName, value)) {
12872
+ _removeAttribute(name, currentNode);
12873
+ continue;
12874
+ }
12875
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
12876
+ if (namespaceURI) ;
12877
+ else {
12878
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
12879
+ case "TrustedHTML": {
12880
+ value = trustedTypesPolicy.createHTML(value);
12881
+ break;
12882
+ }
12883
+ case "TrustedScriptURL": {
12884
+ value = trustedTypesPolicy.createScriptURL(value);
12885
+ break;
12886
+ }
12887
+ }
12888
+ }
12889
+ }
12890
+ if (value !== initValue) {
12891
+ try {
12892
+ if (namespaceURI) {
12893
+ currentNode.setAttributeNS(namespaceURI, name, value);
12894
+ } else {
12895
+ currentNode.setAttribute(name, value);
12896
+ }
12897
+ if (_isClobbered(currentNode)) {
12898
+ _forceRemove(currentNode);
12899
+ } else {
12900
+ arrayPop(DOMPurify.removed);
12901
+ }
12902
+ } catch (_) {
12903
+ _removeAttribute(name, currentNode);
12904
+ }
12905
+ }
12906
+ }
12907
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
12908
+ };
12909
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
12910
+ let shadowNode = null;
12911
+ const shadowIterator = _createNodeIterator(fragment);
12912
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
12913
+ while (shadowNode = shadowIterator.nextNode()) {
12914
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
12915
+ _sanitizeElements(shadowNode);
12916
+ _sanitizeAttributes(shadowNode);
12917
+ if (shadowNode.content instanceof DocumentFragment) {
12918
+ _sanitizeShadowDOM2(shadowNode.content);
12919
+ }
12920
+ }
12921
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
12922
+ };
12923
+ DOMPurify.sanitize = function(dirty) {
12924
+ let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
12925
+ let body = null;
12926
+ let importedNode = null;
12927
+ let currentNode = null;
12928
+ let returnNode = null;
12929
+ IS_EMPTY_INPUT = !dirty;
12930
+ if (IS_EMPTY_INPUT) {
12931
+ dirty = "<!-->";
12932
+ }
12933
+ if (typeof dirty !== "string" && !_isNode(dirty)) {
12934
+ if (typeof dirty.toString === "function") {
12935
+ dirty = dirty.toString();
12936
+ if (typeof dirty !== "string") {
12937
+ throw typeErrorCreate("dirty is not a string, aborting");
12938
+ }
12939
+ } else {
12940
+ throw typeErrorCreate("toString is not a function");
12941
+ }
12942
+ }
12943
+ if (!DOMPurify.isSupported) {
12944
+ return dirty;
12945
+ }
12946
+ if (!SET_CONFIG) {
12947
+ _parseConfig(cfg);
12948
+ }
12949
+ DOMPurify.removed = [];
12950
+ if (typeof dirty === "string") {
12951
+ IN_PLACE = false;
12952
+ }
12953
+ if (IN_PLACE) {
12954
+ if (dirty.nodeName) {
12955
+ const tagName = transformCaseFunc(dirty.nodeName);
12956
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
12957
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
12958
+ }
12959
+ }
12960
+ } else if (dirty instanceof Node2) {
12961
+ body = _initDocument("<!---->");
12962
+ importedNode = body.ownerDocument.importNode(dirty, true);
12963
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
12964
+ body = importedNode;
12965
+ } else if (importedNode.nodeName === "HTML") {
12966
+ body = importedNode;
12967
+ } else {
12968
+ body.appendChild(importedNode);
12969
+ }
12970
+ } else {
12971
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
12972
+ dirty.indexOf("<") === -1) {
12973
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
12974
+ }
12975
+ body = _initDocument(dirty);
12976
+ if (!body) {
12977
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
12978
+ }
12979
+ }
12980
+ if (body && FORCE_BODY) {
12981
+ _forceRemove(body.firstChild);
12982
+ }
12983
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
12984
+ while (currentNode = nodeIterator.nextNode()) {
12985
+ _sanitizeElements(currentNode);
12986
+ _sanitizeAttributes(currentNode);
12987
+ if (currentNode.content instanceof DocumentFragment) {
12988
+ _sanitizeShadowDOM(currentNode.content);
12989
+ }
12990
+ }
12991
+ if (IN_PLACE) {
12992
+ return dirty;
12993
+ }
12994
+ if (RETURN_DOM) {
12995
+ if (RETURN_DOM_FRAGMENT) {
12996
+ returnNode = createDocumentFragment.call(body.ownerDocument);
12997
+ while (body.firstChild) {
12998
+ returnNode.appendChild(body.firstChild);
12999
+ }
13000
+ } else {
13001
+ returnNode = body;
13002
+ }
13003
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
13004
+ returnNode = importNode.call(originalDocument, returnNode, true);
13005
+ }
13006
+ return returnNode;
13007
+ }
13008
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
13009
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
13010
+ serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
13011
+ }
13012
+ if (SAFE_FOR_TEMPLATES) {
13013
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
13014
+ serializedHTML = stringReplace(serializedHTML, expr, " ");
13015
+ });
13016
+ }
13017
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
13018
+ };
13019
+ DOMPurify.setConfig = function() {
13020
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
13021
+ _parseConfig(cfg);
13022
+ SET_CONFIG = true;
13023
+ };
13024
+ DOMPurify.clearConfig = function() {
13025
+ CONFIG = null;
13026
+ SET_CONFIG = false;
13027
+ };
13028
+ DOMPurify.isValidAttribute = function(tag, attr, value) {
13029
+ if (!CONFIG) {
13030
+ _parseConfig({});
13031
+ }
13032
+ const lcTag = transformCaseFunc(tag);
13033
+ const lcName = transformCaseFunc(attr);
13034
+ return _isValidAttribute(lcTag, lcName, value);
13035
+ };
13036
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
13037
+ if (typeof hookFunction !== "function") {
13038
+ return;
13039
+ }
13040
+ arrayPush(hooks[entryPoint], hookFunction);
13041
+ };
13042
+ DOMPurify.removeHook = function(entryPoint, hookFunction) {
13043
+ if (hookFunction !== void 0) {
13044
+ const index2 = arrayLastIndexOf(hooks[entryPoint], hookFunction);
13045
+ return index2 === -1 ? void 0 : arraySplice(hooks[entryPoint], index2, 1)[0];
13046
+ }
13047
+ return arrayPop(hooks[entryPoint]);
13048
+ };
13049
+ DOMPurify.removeHooks = function(entryPoint) {
13050
+ hooks[entryPoint] = [];
13051
+ };
13052
+ DOMPurify.removeAllHooks = function() {
13053
+ hooks = _createHooksMap();
13054
+ };
13055
+ return DOMPurify;
13056
+ }
13057
+ var purify = createDOMPurify();
13058
+ var root_2$i = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
13059
+ var root_1$7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
13060
+ var root_3$3 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
13061
+ var root_4$1 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
13062
+ var root_7$1 = /* @__PURE__ */ from_html(`<option> </option>`);
13063
+ var root_5 = /* @__PURE__ */ from_html(`<label><!></label> <select><!></select>`, 1);
13064
+ var root_10 = /* @__PURE__ */ from_html(`<label> <input/></label>`);
13065
+ var root_8 = /* @__PURE__ */ from_html(`<fieldset><legend><!></legend> <!></fieldset>`);
13066
+ function InputAndLabel($$anchor, $$props) {
13067
+ push($$props, true);
13068
+ const labelText = ($$anchor2) => {
13069
+ var fragment = root_1$7();
13070
+ var node = first_child(fragment);
13071
+ html$2(node, () => purify.sanitize(field().label));
13072
+ var node_1 = sibling(node, 2);
13073
+ {
13074
+ var consequent = ($$anchor3) => {
13075
+ var span = root_2$i();
13076
+ append($$anchor3, span);
13077
+ };
13078
+ if_block(node_1, ($$render) => {
13079
+ if (field().required) $$render(consequent);
13080
+ });
13081
+ }
13082
+ append($$anchor2, fragment);
13083
+ };
13084
+ const input = ($$anchor2) => {
13085
+ var fragment_1 = root_3$3();
13086
+ var label = first_child(fragment_1);
13087
+ var node_2 = child(label);
13088
+ labelText(node_2);
13089
+ reset(label);
13090
+ var input_1 = sibling(label, 2);
13091
+ remove_input_defaults(input_1);
13092
+ attribute_effect(input_1, () => ({ ...get(fieldAttributes), ...restProps, type: field().type }));
13093
+ template_effect(() => set_attribute(label, "for", get(inputId)));
13094
+ bind_value(input_1, () => field().value, ($$value) => field().value = $$value);
13095
+ append($$anchor2, fragment_1);
13096
+ };
13097
+ const checkbox = ($$anchor2) => {
13098
+ var label_1 = root_4$1();
13099
+ var input_2 = child(label_1);
13100
+ remove_input_defaults(input_2);
13101
+ attribute_effect(input_2, () => ({ ...get(fieldAttributes), ...restProps, type: "checkbox" }));
13102
+ var span_1 = sibling(input_2, 2);
13103
+ var node_3 = child(span_1);
13104
+ labelText(node_3);
13105
+ reset(span_1);
13106
+ reset(label_1);
13107
+ template_effect(() => set_attribute(label_1, "for", get(inputId)));
13108
+ bind_checked(input_2, () => field().checked, ($$value) => field().checked = $$value);
13109
+ append($$anchor2, label_1);
13110
+ };
13111
+ const select = ($$anchor2) => {
13112
+ var fragment_2 = root_5();
13113
+ var label_2 = first_child(fragment_2);
13114
+ var node_4 = child(label_2);
13115
+ labelText(node_4);
13116
+ reset(label_2);
13117
+ var select_1 = sibling(label_2, 2);
13118
+ attribute_effect(select_1, () => ({ ...get(fieldAttributes), ...restProps }));
13119
+ var node_5 = child(select_1);
13120
+ {
13121
+ var consequent_1 = ($$anchor3) => {
13122
+ var fragment_3 = comment();
13123
+ var node_6 = first_child(fragment_3);
13124
+ each(node_6, 17, () => field().options, index, ($$anchor4, option) => {
13125
+ var option_1 = root_7$1();
13126
+ var text2 = child(option_1, true);
13127
+ reset(option_1);
13128
+ var option_1_value = {};
13129
+ template_effect(() => {
13130
+ set_text(text2, get(option).label);
13131
+ if (option_1_value !== (option_1_value = get(option).value)) {
13132
+ option_1.value = (option_1.__value = get(option).value) ?? "";
13133
+ }
13134
+ });
13135
+ append($$anchor4, option_1);
13136
+ });
13137
+ append($$anchor3, fragment_3);
13138
+ };
13139
+ if_block(node_5, ($$render) => {
13140
+ if (field().options) $$render(consequent_1);
13141
+ });
13142
+ }
13143
+ reset(select_1);
13144
+ template_effect(() => set_attribute(label_2, "for", get(inputId)));
13145
+ bind_select_value(select_1, () => field().value, ($$value) => field().value = $$value);
13146
+ append($$anchor2, fragment_2);
13147
+ };
13148
+ const radio = ($$anchor2) => {
13149
+ var fieldset = root_8();
13150
+ var legend = child(fieldset);
13151
+ var node_7 = child(legend);
13152
+ labelText(node_7);
13153
+ reset(legend);
13154
+ var node_8 = sibling(legend, 2);
13155
+ {
13156
+ var consequent_2 = ($$anchor3) => {
13157
+ var fragment_4 = comment();
13158
+ var node_9 = first_child(fragment_4);
13159
+ each(node_9, 17, () => field().options, index, ($$anchor4, option) => {
13160
+ var label_3 = root_10();
13161
+ var text_1 = child(label_3);
13162
+ var input_3 = sibling(text_1);
13163
+ remove_input_defaults(input_3);
13164
+ attribute_effect(input_3, () => ({ ...get(fieldAttributes), ...restProps, type: "radio" }));
13165
+ reset(label_3);
13166
+ template_effect(() => {
13167
+ set_attribute(label_3, "for", get(inputId) + get(option));
13168
+ set_text(text_1, `${get(option) ?? ""} `);
13169
+ });
13170
+ bind_value(input_3, () => field().value, ($$value) => field().value = $$value);
13171
+ append($$anchor4, label_3);
13172
+ });
13173
+ append($$anchor3, fragment_4);
13174
+ };
13175
+ if_block(node_8, ($$render) => {
13176
+ if (field().options) $$render(consequent_2);
13177
+ });
13178
+ }
13179
+ reset(fieldset);
13180
+ append($$anchor2, fieldset);
13181
+ };
13182
+ let field = prop($$props, "field", 7), describedById = prop($$props, "describedById", 7), restProps = /* @__PURE__ */ rest_props($$props, [
13183
+ "$$slots",
13184
+ "$$events",
13185
+ "$$legacy",
13186
+ "$$host",
13187
+ "field",
13188
+ "describedById"
13189
+ ]);
13190
+ const map = {
13191
+ input,
13192
+ text: input,
13193
+ email: input,
13194
+ password: input,
13195
+ search: input,
13196
+ tel: input,
13197
+ url: input,
13198
+ number: input,
13199
+ checkbox,
13200
+ select,
13201
+ radio,
13202
+ textarea: null
13203
+ };
13204
+ const snippet$1 = /* @__PURE__ */ user_derived(() => map[field().type]);
13205
+ let inputId = /* @__PURE__ */ user_derived(() => $$props.id || `go-field-${Math.random().toString(36).substring(2, 9)}`);
13206
+ function onblur() {
13207
+ if (field().type == "checkbox") return;
13208
+ if (field().value) field().validate();
13209
+ }
13210
+ const fieldAttributes = /* @__PURE__ */ user_derived(() => ({
13211
+ id: get(inputId),
13212
+ "aria-describedby": describedById(),
13213
+ "aria-required": field().required,
13214
+ "aria-invalid": field().errors.length > 0,
13215
+ autocomplete: field().autocomplete,
13216
+ onblur
13217
+ }));
13218
+ var fragment_5 = comment();
13219
+ var node_10 = first_child(fragment_5);
13220
+ {
13221
+ var consequent_3 = ($$anchor2) => {
13222
+ var fragment_6 = comment();
13223
+ var node_11 = first_child(fragment_6);
13224
+ snippet(node_11, () => get(snippet$1));
13225
+ append($$anchor2, fragment_6);
13226
+ };
13227
+ if_block(node_10, ($$render) => {
13228
+ if (get(snippet$1)) $$render(consequent_3);
13229
+ });
13230
+ }
13231
+ append($$anchor, fragment_5);
13232
+ return pop({
13233
+ get field() {
13234
+ return field();
13235
+ },
13236
+ set field($$value) {
13237
+ field($$value);
13238
+ flushSync();
13239
+ },
13240
+ get describedById() {
13241
+ return describedById();
13242
+ },
13243
+ set describedById($$value) {
13244
+ describedById($$value);
13245
+ flushSync();
13246
+ }
13247
+ });
13248
+ }
13249
+ create_custom_element(InputAndLabel, { field: {}, describedById: {} }, [], [], true);
13250
+ var root_2$h = /* @__PURE__ */ from_html(`<span> </span>`);
13251
+ var root_1$6 = /* @__PURE__ */ from_html(`<div><!> <!> <span class="go-error" role="alert"> </span></div>`);
13252
+ function FieldGroup($$anchor, $$props) {
13253
+ push($$props, true);
13254
+ let fieldId = prop($$props, "fieldId", 7), restProps = /* @__PURE__ */ rest_props($$props, ["$$slots", "$$events", "$$legacy", "$$host", "fieldId"]);
13255
+ let details = /* @__PURE__ */ state(void 0);
13256
+ let field = /* @__PURE__ */ state(void 0);
13257
+ onMount(async () => {
13258
+ var _a2;
13259
+ await tick();
13260
+ set(details, getDetails($$props.$$host), true);
13261
+ set(field, (_a2 = get(details)) == null ? void 0 : _a2.getField(fieldId()), true);
13262
+ });
13263
+ let descriptionId = /* @__PURE__ */ user_derived(() => $$props.id || `go-description-${Math.random().toString(36).substring(2, 9)}`);
13264
+ let errorsId = /* @__PURE__ */ user_derived(() => $$props.id || `go-errors-${Math.random().toString(36).substring(2, 9)}`);
13265
+ let describedById = /* @__PURE__ */ user_derived(() => get(descriptionId) + " " + get(errorsId));
13266
+ user_effect(() => {
13267
+ if (!get(field)) return;
13268
+ get(field).mounted = true;
13269
+ get(
13270
+ field
13271
+ // Track the value
13272
+ ).value;
13273
+ untrack(() => {
13274
+ var _a2;
13275
+ if ((_a2 = get(field)) == null ? void 0 : _a2.errors.length) get(field).validate();
13276
+ });
13277
+ });
13278
+ var fragment = comment();
13279
+ var node = first_child(fragment);
13280
+ {
13281
+ var consequent_1 = ($$anchor2) => {
13282
+ var div = root_1$6();
13283
+ let classes;
13284
+ var node_1 = child(div);
13285
+ InputAndLabel(node_1, {
13286
+ get restProps() {
13287
+ return restProps;
13288
+ },
13289
+ get describedById() {
13290
+ return get(describedById);
13291
+ },
13292
+ get field() {
13293
+ return get(field);
13294
+ },
13295
+ set field($$value) {
13296
+ set(field, $$value, true);
13297
+ }
13298
+ });
13299
+ var node_2 = sibling(node_1, 2);
13300
+ {
13301
+ var consequent = ($$anchor3) => {
13302
+ var span = root_2$h();
13303
+ var text2 = child(span, true);
13304
+ reset(span);
13305
+ template_effect(() => {
13306
+ set_attribute(span, "id", get(descriptionId));
13307
+ set_text(text2, get(field).description);
13308
+ });
13309
+ append($$anchor3, span);
13310
+ };
13311
+ if_block(node_2, ($$render) => {
13312
+ if (get(field).description) $$render(consequent);
13313
+ });
13314
+ }
13315
+ var span_1 = sibling(node_2, 2);
13316
+ var text_1 = child(span_1, true);
13317
+ reset(span_1);
13318
+ reset(div);
13319
+ template_effect(
13320
+ ($0, $1) => {
13321
+ classes = set_class(div, 1, "go-field", null, classes, $0);
13322
+ set_attribute(span_1, "id", get(errorsId));
13323
+ set_text(text_1, $1);
13324
+ },
13325
+ [
13326
+ () => ({ "is-invalid": get(field).errors.length > 0 }),
13327
+ () => get(field).errors.join(", ")
13328
+ ]
13329
+ );
13330
+ append($$anchor2, div);
13331
+ };
13332
+ if_block(node, ($$render) => {
13333
+ if (get(field)) $$render(consequent_1);
13334
+ });
13335
+ }
13336
+ append($$anchor, fragment);
13337
+ return pop({
13338
+ get fieldId() {
13339
+ return fieldId();
13340
+ },
13341
+ set fieldId($$value) {
13342
+ fieldId($$value);
13343
+ flushSync();
13344
+ }
13345
+ });
13346
+ }
13347
+ customElements.define("go-input", create_custom_element(
13348
+ FieldGroup,
13349
+ {
13350
+ fieldId: { attribute: "field", reflect: true, type: "String" }
13351
+ },
13352
+ [],
13353
+ [],
13354
+ false
13355
+ ));
13356
+ var root_2$g = /* @__PURE__ */ from_html(`<p aria-live="assertive" class="sr-only"> </p>`);
13357
+ var root_3$2 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
13358
+ var root_1$5 = /* @__PURE__ */ from_html(`<div><!> <!></div>`);
13359
+ function ErrorsFeedback($$anchor, $$props) {
13360
+ push($$props, true);
13361
+ let details = /* @__PURE__ */ state(void 0);
13362
+ onMount(() => {
13363
+ set(details, getDetails($$props.$$host), true);
13364
+ });
13365
+ user_effect(() => {
13366
+ var _a2, _b2;
13367
+ (_b2 = (_a2 = get(details)) == null ? void 0 : _a2.form) == null ? void 0 : _b2.addEventListener("after-validation", () => {
13368
+ var _a3;
13369
+ set(errorsOnSubmit, errors((_a3 = get(details)) == null ? void 0 : _a3.fields), true);
13370
+ });
13371
+ });
13372
+ let errorsRealtime = /* @__PURE__ */ user_derived(() => {
13373
+ var _a2;
13374
+ return errors((_a2 = get(details)) == null ? void 0 : _a2.fields);
13375
+ });
13376
+ let errorsOnSubmit = /* @__PURE__ */ state(-1);
13377
+ var fragment = comment();
13378
+ var node = first_child(fragment);
13379
+ {
13380
+ var consequent_2 = ($$anchor2) => {
13381
+ var div = root_1$5();
13382
+ let classes;
13383
+ var node_1 = child(div);
13384
+ {
13385
+ var consequent = ($$anchor3) => {
13386
+ var p = root_2$g();
13387
+ var text2 = child(p);
13388
+ reset(p);
13389
+ template_effect(() => set_text(text2, `Failed to save because ${get(errorsOnSubmit) ?? ""} fields are invalid.`));
13390
+ append($$anchor3, p);
13391
+ };
13392
+ if_block(node_1, ($$render) => {
13393
+ if (get(errorsOnSubmit) > 0) $$render(consequent);
13394
+ });
13395
+ }
13396
+ var node_2 = sibling(node_1, 2);
13397
+ {
13398
+ var consequent_1 = ($$anchor3) => {
13399
+ var p_1 = root_3$2();
13400
+ var text_1 = child(p_1);
13401
+ reset(p_1);
13402
+ template_effect(() => set_text(text_1, `Failed to save because ${get(errorsRealtime) ?? ""} fields are invalid.`));
13403
+ append($$anchor3, p_1);
13404
+ };
13405
+ if_block(node_2, ($$render) => {
13406
+ if (get(errorsRealtime) > 0) $$render(consequent_1);
13407
+ });
13408
+ }
13409
+ reset(div);
13410
+ template_effect(($0) => classes = set_class(div, 1, "go-error-feedback go-feedback", null, classes, $0), [() => ({ "is-invalid": get(errorsRealtime) })]);
13411
+ append($$anchor2, div);
13412
+ };
13413
+ if_block(node, ($$render) => {
13414
+ if (get(errorsRealtime) > 0 || get(errorsOnSubmit) > 0) $$render(consequent_2);
13415
+ });
13416
+ }
13417
+ append($$anchor, fragment);
13418
+ pop();
13419
+ }
13420
+ customElements.define("go-errors-feedback", create_custom_element(ErrorsFeedback, {}, [], [], false));
13421
+ var root_1$4 = /* @__PURE__ */ from_html(`<p>Form submitted successfully!</p>`);
13422
+ var root$4 = /* @__PURE__ */ from_html(`<div aria-live="assertive"><!></div>`);
13423
+ function SuccessFeedback($$anchor, $$props) {
13424
+ push($$props, true);
13425
+ let details = /* @__PURE__ */ state(void 0);
13426
+ onMount(() => {
13427
+ set(details, getDetails($$props.$$host), true);
13428
+ });
13429
+ let show = /* @__PURE__ */ state(false);
13430
+ user_effect(() => {
13431
+ var _a2;
13432
+ if (!((_a2 = get(details)) == null ? void 0 : _a2.form)) return;
13433
+ untrack(() => {
13434
+ var _a3, _b2;
13435
+ (_b2 = (_a3 = get(details)) == null ? void 0 : _a3.form) == null ? void 0 : _b2.addEventListener("success", () => {
13436
+ var _a4;
13437
+ set(show, errors((_a4 = get(details)) == null ? void 0 : _a4.fields) === 0);
13438
+ });
13439
+ });
13440
+ });
13441
+ var div = root$4();
13442
+ let classes;
13443
+ var node = child(div);
13444
+ {
13445
+ var consequent = ($$anchor2) => {
13446
+ var p = root_1$4();
13447
+ append($$anchor2, p);
13448
+ };
13449
+ if_block(node, ($$render) => {
13450
+ if (get(show)) $$render(consequent);
13451
+ });
13452
+ }
13453
+ reset(div);
13454
+ template_effect(($0) => classes = set_class(div, 1, "go-success-feedback go-feedback", null, classes, $0), [() => ({ "is-successful": get(show) })]);
13455
+ append($$anchor, div);
13456
+ pop();
13457
+ }
13458
+ customElements.define("go-success-feedback", create_custom_element(SuccessFeedback, {}, [], [], false));
13459
+ var root$3 = /* @__PURE__ */ from_html(`<div class="go-form-feedback"><!></div>`);
13460
+ function FormFeedback($$anchor, $$props) {
13461
+ var div = root$3();
13462
+ var node = child(div);
13463
+ slot(node, $$props, "default", {});
13464
+ reset(div);
13465
+ append($$anchor, div);
13466
+ }
13467
+ customElements.define("go-form-feedback", create_custom_element(FormFeedback, {}, ["default"], [], false));
13468
+ function Submit($$anchor, $$props) {
13469
+ push($$props, true);
13470
+ let details = /* @__PURE__ */ state(void 0);
13471
+ onMount(() => {
13472
+ set(details, getDetails($$props.$$host), true);
13473
+ });
13474
+ function submit() {
13475
+ var _a2, _b2;
13476
+ (_b2 = (_a2 = get(details)) == null ? void 0 : _a2.form) == null ? void 0 : _b2.dispatchEvent(new SubmitEvent("submit", { bubbles: true, cancelable: true }));
13477
+ }
13478
+ onMount(() => {
13479
+ const btn = wrapInElement($$props.$$host, "button", { type: "submit" });
13480
+ btn.addEventListener("click", submit);
13481
+ });
13482
+ pop();
13483
+ }
13484
+ customElements.define("go-submit", create_custom_element(Submit, {}, [], [], false));
13485
+ var root_1$3 = /* @__PURE__ */ from_html(`<go-input></go-input>`, 2);
13486
+ function AllFields($$anchor, $$props) {
13487
+ push($$props, true);
13488
+ let details = /* @__PURE__ */ state(void 0);
13489
+ onMount(async () => {
13490
+ set(details, getDetails($$props.$$host), true);
13491
+ });
13492
+ var fragment = comment();
13493
+ var node = first_child(fragment);
13494
+ each(node, 17, () => {
13495
+ var _a2;
13496
+ return ((_a2 = get(details)) == null ? void 0 : _a2.fields) || [];
13497
+ }, index, ($$anchor2, field) => {
13498
+ var go_input = root_1$3();
13499
+ template_effect(() => set_custom_element_data(go_input, "field", get(field).id));
13500
+ append($$anchor2, go_input);
13501
+ });
13502
+ append($$anchor, fragment);
13503
+ pop();
13504
+ }
13505
+ customElements.define("go-all-fields", create_custom_element(AllFields, {}, [], [], false));
13506
+ function evaluateExpression(expression, data) {
13507
+ try {
13508
+ const func = new Function("data", `return ${expression};`);
13509
+ return func(data);
13510
+ } catch (error) {
13511
+ console.log(`Error while evaluating when in go-if: ${error.message}`);
13512
+ }
13513
+ }
13514
+ const validTicketSelectionFilters = ["timeslot", "normal", "annual"];
13515
+ let lastUId = 0;
13516
+ class TicketSelectionDetails {
13517
+ constructor() {
13518
+ __publicField(this, "uid", lastUId++);
13519
+ __privateAdd(this, _mode, /* @__PURE__ */ state());
13520
+ __privateAdd(this, _filters, /* @__PURE__ */ state());
13521
+ __privateAdd(this, _eventId, /* @__PURE__ */ state());
13522
+ __privateAdd(this, _museumIds, /* @__PURE__ */ state());
13523
+ __privateAdd(this, _exhibitionIds, /* @__PURE__ */ state());
13524
+ __privateAdd(this, _ticketIds, /* @__PURE__ */ state());
13525
+ __privateAdd(this, _selectedDate, /* @__PURE__ */ state());
13526
+ __privateAdd(this, _selectedTimeslot, /* @__PURE__ */ state());
13527
+ __privateAdd(this, _ticketGroups, /* @__PURE__ */ state(proxy([])));
13528
+ __privateAdd(this, _preCarts, /* @__PURE__ */ user_derived(() => this.ticketGroups.map((tg) => tg.preCart)));
13529
+ }
13530
+ get mode() {
13531
+ return get(__privateGet(this, _mode));
13532
+ }
13533
+ set mode(value) {
13534
+ set(__privateGet(this, _mode), value, true);
13535
+ }
13536
+ get filters() {
13537
+ return get(__privateGet(this, _filters));
13538
+ }
13539
+ set filters(value) {
13540
+ set(__privateGet(this, _filters), value, true);
13541
+ }
13542
+ get eventId() {
13543
+ return get(__privateGet(this, _eventId));
13544
+ }
13545
+ set eventId(value) {
13546
+ set(__privateGet(this, _eventId), value, true);
13547
+ }
13548
+ get museumIds() {
13549
+ return get(__privateGet(this, _museumIds));
13550
+ }
13551
+ set museumIds(value) {
13552
+ set(__privateGet(this, _museumIds), value, true);
13553
+ }
13554
+ get exhibitionIds() {
13555
+ return get(__privateGet(this, _exhibitionIds));
13556
+ }
13557
+ set exhibitionIds(value) {
13558
+ set(__privateGet(this, _exhibitionIds), value, true);
13559
+ }
13560
+ get ticketIds() {
13561
+ return get(__privateGet(this, _ticketIds));
13562
+ }
13563
+ set ticketIds(value) {
13564
+ set(__privateGet(this, _ticketIds), value, true);
13565
+ }
13566
+ get selectedDate() {
13567
+ return get(__privateGet(this, _selectedDate));
13568
+ }
13569
+ set selectedDate(value) {
13570
+ set(__privateGet(this, _selectedDate), value, true);
13571
+ }
13572
+ get selectedTimeslot() {
13573
+ return get(__privateGet(this, _selectedTimeslot));
13574
+ }
13575
+ set selectedTimeslot(value) {
13576
+ set(__privateGet(this, _selectedTimeslot), value, true);
13577
+ }
13578
+ get ticketGroups() {
13579
+ return get(__privateGet(this, _ticketGroups));
13580
+ }
13581
+ set ticketGroups(value) {
13582
+ set(__privateGet(this, _ticketGroups), value, true);
13583
+ }
13584
+ get preCarts() {
13585
+ return get(__privateGet(this, _preCarts));
11592
13586
  }
11593
13587
  set preCarts(value) {
11594
13588
  set(__privateGet(this, _preCarts), value);
@@ -11742,13 +13736,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11742
13736
  create_custom_element(Wrapper, { host: {}, children: {} }, [], [], true);
11743
13737
  function TicketSelection($$anchor, $$props) {
11744
13738
  push($$props, true);
11745
- let mode = prop($$props, "mode", 7), filter = prop($$props, "filter", 7), eventId = prop($$props, "eventId", 7), children = prop($$props, "children", 7), museumIds = prop($$props, "museumIds", 7), exhibitionIds = prop($$props, "exhibitionIds", 7), ticketIds = prop($$props, "ticketIds", 7), restProps = /* @__PURE__ */ rest_props($$props, [
13739
+ let mode = prop($$props, "mode", 7), filters = prop($$props, "filters", 7), eventId = prop($$props, "eventId", 7), children = prop($$props, "children", 7), museumIds = prop($$props, "museumIds", 7), exhibitionIds = prop($$props, "exhibitionIds", 7), ticketIds = prop($$props, "ticketIds", 7), restProps = /* @__PURE__ */ rest_props($$props, [
11746
13740
  "$$slots",
11747
13741
  "$$events",
11748
13742
  "$$legacy",
11749
13743
  "$$host",
11750
13744
  "mode",
11751
- "filter",
13745
+ "filters",
11752
13746
  "eventId",
11753
13747
  "children",
11754
13748
  "museumIds",
@@ -11758,7 +13752,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11758
13752
  const details = new TicketSelectionDetails();
11759
13753
  user_effect(() => {
11760
13754
  details.mode = mode();
11761
- details.filters = [filter()];
13755
+ details.filters = parseTokens(filters(), validTicketSelectionFilters);
11762
13756
  details.eventId = eventId();
11763
13757
  details.museumIds = parseIds(museumIds());
11764
13758
  details.exhibitionIds = parseIds(exhibitionIds());
@@ -11783,11 +13777,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11783
13777
  mode($$value);
11784
13778
  flushSync();
11785
13779
  },
11786
- get filter() {
11787
- return filter();
13780
+ get filters() {
13781
+ return filters();
11788
13782
  },
11789
- set filter($$value) {
11790
- filter($$value);
13783
+ set filters($$value) {
13784
+ filters($$value);
11791
13785
  flushSync();
11792
13786
  },
11793
13787
  get eventId() {
@@ -11835,7 +13829,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11835
13829
  ticketIds: { attribute: "ticket-ids", reflect: true, type: "String" },
11836
13830
  museumIds: { attribute: "museum-ids", reflect: true, type: "String" },
11837
13831
  exhibitionIds: { attribute: "exhibition-ids", reflect: true, type: "String" },
11838
- filter: {},
13832
+ filters: {},
11839
13833
  children: {}
11840
13834
  },
11841
13835
  [],
@@ -11861,9 +13855,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11861
13855
  if (!tsd) console.error("Ticket Sum must be inside a Ticket Selection Details");
11862
13856
  let val = /* @__PURE__ */ user_derived(() => sum((tsd == null ? void 0 : tsd.preCarts) || [], (c) => c.totalPriceCents));
11863
13857
  next();
11864
- var text$1 = text();
11865
- template_effect(($0) => set_text(text$1, $0), [() => formatCurrency(get(val))]);
11866
- append($$anchor, text$1);
13858
+ var text2 = text$1();
13859
+ template_effect(($0) => set_text(text2, $0), [() => formatCurrency(get(val))]);
13860
+ append($$anchor, text2);
11867
13861
  return pop({ tsd });
11868
13862
  }
11869
13863
  customElements.define("go-tickets-sum", create_custom_element(TicketsSum, {}, [], ["tsd"], false));
@@ -11871,9 +13865,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11871
13865
  constructor(type, ticketSelectionDetails) {
11872
13866
  __privateAdd(this, _tickets, /* @__PURE__ */ state(proxy([])));
11873
13867
  __privateAdd(this, _preCart, /* @__PURE__ */ user_derived(() => createCart(this.preCartTickets())));
11874
- __privateAdd(this, _type, /* @__PURE__ */ state("timeslot"));
13868
+ __privateAdd(this, _filters2, /* @__PURE__ */ state("timeslot"));
11875
13869
  __privateAdd(this, _ticketSelectionDetails, /* @__PURE__ */ state());
11876
- this.type = type;
13870
+ this.filters = type;
11877
13871
  this.ticketSelectionDetails = ticketSelectionDetails;
11878
13872
  this.ticketSelectionDetails.addTicketGroup(this);
11879
13873
  }
@@ -11889,11 +13883,11 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11889
13883
  set preCart(value) {
11890
13884
  set(__privateGet(this, _preCart), value);
11891
13885
  }
11892
- get type() {
11893
- return get(__privateGet(this, _type));
13886
+ get filters() {
13887
+ return get(__privateGet(this, _filters2));
11894
13888
  }
11895
- set type(value) {
11896
- set(__privateGet(this, _type), value, true);
13889
+ set filters(value) {
13890
+ set(__privateGet(this, _filters2), value, true);
11897
13891
  }
11898
13892
  get ticketSelectionDetails() {
11899
13893
  return get(__privateGet(this, _ticketSelectionDetails));
@@ -11902,7 +13896,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11902
13896
  set(__privateGet(this, _ticketSelectionDetails), value, true);
11903
13897
  }
11904
13898
  preCartTickets() {
11905
- switch (this.type) {
13899
+ switch (this.filters) {
11906
13900
  case "timeslot":
11907
13901
  return this.timeslotTickets;
11908
13902
  case "annual":
@@ -11910,7 +13904,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11910
13904
  case "custom":
11911
13905
  return this.tickets;
11912
13906
  default:
11913
- const exhaustiveCheck = this.type;
13907
+ const exhaustiveCheck = this.filters;
11914
13908
  if (exhaustiveCheck) throw new Error(`(TicketGroup) Unhandled case: ${exhaustiveCheck}`);
11915
13909
  }
11916
13910
  return [];
@@ -11949,37 +13943,37 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11949
13943
  }
11950
13944
  _tickets = new WeakMap();
11951
13945
  _preCart = new WeakMap();
11952
- _type = new WeakMap();
13946
+ _filters2 = new WeakMap();
11953
13947
  _ticketSelectionDetails = new WeakMap();
11954
13948
  const KEY = "go-ticket-group";
11955
13949
  const setTicketGroupDetails = createSetDetails(KEY);
11956
13950
  const getTicketGroupDetails = createGetDetails(KEY);
11957
13951
  function TicketGroup($$anchor, $$props) {
11958
13952
  push($$props, true);
11959
- const type = prop($$props, "type", 7);
13953
+ const filters = prop($$props, "filters", 7);
11960
13954
  const ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
11961
- if (!type()) {
11962
- throw new Error("type is required");
13955
+ if (!filters()) {
13956
+ debugger;
13957
+ throw new Error("filters is required");
11963
13958
  }
11964
13959
  if (!ticketSelectionDetails) throw new Error("Ticket Group should be an ancestor of a Ticket Selection Details element");
11965
- const details = new TicketGroupDetails(type(), ticketSelectionDetails);
13960
+ const details = new TicketGroupDetails(filters(), ticketSelectionDetails);
11966
13961
  setTicketGroupDetails($$props.$$host, details);
11967
13962
  user_effect(() => {
11968
- console.log("setting type");
11969
- details.type = type();
13963
+ details.filters = filters();
11970
13964
  });
11971
13965
  return pop({
11972
13966
  details,
11973
- get type() {
11974
- return type();
13967
+ get filters() {
13968
+ return filters();
11975
13969
  },
11976
- set type($$value) {
11977
- type($$value);
13970
+ set filters($$value) {
13971
+ filters($$value);
11978
13972
  flushSync();
11979
13973
  }
11980
13974
  });
11981
13975
  }
11982
- customElements.define("go-ticket-group", create_custom_element(TicketGroup, { type: { reflect: true } }, [], ["details"], false));
13976
+ customElements.define("go-ticket-group", create_custom_element(TicketGroup, { filters: {} }, [], ["details"], false));
11983
13977
  function updateSelectedTickets(ci, target, tsd) {
11984
13978
  if (!tsd) {
11985
13979
  console.warn("tsd is undefined");
@@ -12076,7 +14070,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12076
14070
  reset(li_1);
12077
14071
  var li_2 = sibling(li_1, 2);
12078
14072
  var node_2 = child(li_2);
12079
- html(node_2, () => get(ci).item.description);
14073
+ html$2(node_2, () => get(ci).item.description);
12080
14074
  reset(li_2);
12081
14075
  var li_3 = sibling(li_2, 2);
12082
14076
  var text_2 = child(li_3, true);
@@ -12112,9 +14106,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12112
14106
  const details = getTicketGroupDetails($$props.$$host);
12113
14107
  if (!details) console.warn("TicketGroupSum: details not found");
12114
14108
  next();
12115
- var text$1 = text();
12116
- template_effect(() => set_text(text$1, details == null ? void 0 : details.preCart.totalFormatted));
12117
- append($$anchor, text$1);
14109
+ var text2 = text$1();
14110
+ template_effect(() => set_text(text2, details == null ? void 0 : details.preCart.totalFormatted));
14111
+ append($$anchor, text2);
12118
14112
  return pop({ details });
12119
14113
  }
12120
14114
  customElements.define("go-ticket-group-sum", create_custom_element(GroupSum, {}, [], ["details"], false));
@@ -12131,10 +14125,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12131
14125
  });
12132
14126
  }
12133
14127
  function flattenTicketsIntoSlots(tickets) {
12134
- return alphabetical(Object.values(tickets).flatMap(createTimeSlotEntriesFromTicket), (slot) => slot.startAt);
14128
+ return alphabetical(Object.values(tickets).flatMap(createTimeSlotEntriesFromTicket), (slot2) => slot2.startAt);
12135
14129
  }
12136
14130
  function filterSlotsByQuota(allTimeSlots, quotaId) {
12137
- const slotsForThisQuota = allTimeSlots.filter((slot) => slot.quotaIds.includes(quotaId));
14131
+ const slotsForThisQuota = allTimeSlots.filter((slot2) => slot2.quotaIds.includes(quotaId));
12138
14132
  return slotsForThisQuota;
12139
14133
  }
12140
14134
  function filterSlots(allTimeSlots, quotas) {
@@ -12147,19 +14141,19 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12147
14141
  }
12148
14142
  function combineSlots(timeSlots) {
12149
14143
  const slotMap = {};
12150
- for (const slot of timeSlots) {
12151
- const existing = slotMap[slot.startAt];
14144
+ for (const slot2 of timeSlots) {
14145
+ const existing = slotMap[slot2.startAt];
12152
14146
  if (existing) {
12153
- existing.capacity += slot.capacity;
12154
- existing.totalCapacity += slot.totalCapacity;
12155
- const newQuotaIds = slot.quotaIds.filter((id) => !existing.quotaIds.includes(id));
14147
+ existing.capacity += slot2.capacity;
14148
+ existing.totalCapacity += slot2.totalCapacity;
14149
+ const newQuotaIds = slot2.quotaIds.filter((id) => !existing.quotaIds.includes(id));
12156
14150
  existing.quotaIds.push(...newQuotaIds);
12157
14151
  existing.available = existing.capacity > 0;
12158
14152
  } else {
12159
- slotMap[slot.startAt] = { ...slot };
14153
+ slotMap[slot2.startAt] = { ...slot2 };
12160
14154
  }
12161
14155
  }
12162
- return alphabetical(Object.values(slotMap), (slot) => slot.startAt);
14156
+ return alphabetical(Object.values(slotMap), (slot2) => slot2.startAt);
12163
14157
  }
12164
14158
  function generateAvailableTimeSlots(tickets, quotas) {
12165
14159
  const ticketSlots = flattenTicketsIntoSlots(tickets);
@@ -12185,7 +14179,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12185
14179
  by_bookable: true,
12186
14180
  valid_at: date.toString(),
12187
14181
  // @ts-ignore
12188
- "by_ticket_types[]": tsd.filters,
14182
+ "by_ticket_types[]": ["time_slot"],
12189
14183
  "by_museum_ids[]": tsd.museumIds,
12190
14184
  "by_exhibition_ids[]": tsd.exhibitionIds,
12191
14185
  "by_ticket_ids[]": tsd.ticketIds
@@ -15262,9 +17256,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15262
17256
  append($$anchor3, fragment_2);
15263
17257
  };
15264
17258
  var alternate = ($$anchor3) => {
15265
- var text$1 = text();
15266
- template_effect(() => set_text(text$1, dayState.cell.opts.date.current.day));
15267
- append($$anchor3, text$1);
17259
+ var text2 = text$1();
17260
+ template_effect(() => set_text(text2, dayState.cell.opts.date.current.day));
17261
+ append($$anchor3, text2);
15268
17262
  };
15269
17263
  if_block(node_2, ($$render) => {
15270
17264
  if (children()) $$render(consequent_1);
@@ -15907,9 +17901,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
15907
17901
  append($$anchor3, fragment_2);
15908
17902
  };
15909
17903
  var alternate = ($$anchor3) => {
15910
- var text$1 = text();
15911
- template_effect(() => set_text(text$1, headingState.root.headingValue));
15912
- append($$anchor3, text$1);
17904
+ var text2 = text$1();
17905
+ template_effect(() => set_text(text2, headingState.root.headingValue));
17906
+ append($$anchor3, text2);
15913
17907
  };
15914
17908
  if_block(node_2, ($$render) => {
15915
17909
  if (children()) $$render(consequent_1);
@@ -16161,7 +18155,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
16161
18155
  "by_museum_ids[]": (_c2 = this.details) == null ? void 0 : _c2.museumIds,
16162
18156
  "by_exhibition_ids[]": (_d = this.details) == null ? void 0 : _d.exhibitionIds,
16163
18157
  start_at: this.startAt.set({ day: 1 }).toString(),
16164
- end_at: this.startAt.add({ months: 1 }).set({ day: 7 }).toString()
18158
+ end_at: this.startAt.add({ months: 1 }).set({ day: 14 }).toString()
16165
18159
  };
16166
18160
  }));
16167
18161
  }
@@ -16218,8 +18212,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
16218
18212
  Calendar_PrevButton($$anchor5, {
16219
18213
  children: ($$anchor6, $$slotProps2) => {
16220
18214
  next();
16221
- var text$1 = text("Prev");
16222
- append($$anchor6, text$1);
18215
+ var text2 = text$1("Prev");
18216
+ append($$anchor6, text2);
16223
18217
  },
16224
18218
  $$slots: { default: true }
16225
18219
  });
@@ -16233,7 +18227,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
16233
18227
  Calendar_NextButton($$anchor5, {
16234
18228
  children: ($$anchor6, $$slotProps2) => {
16235
18229
  next();
16236
- var text_1 = text("Next");
18230
+ var text_1 = text$1("Next");
16237
18231
  append($$anchor6, text_1);
16238
18232
  },
16239
18233
  $$slots: { default: true }