@oiz/stzh-components 3.3.0-beta6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-2cd4f46b.js → app-globals-333c7ab2.js} +2 -2
- package/dist/cjs/{app-globals-2cd4f46b.js.map → app-globals-333c7ab2.js.map} +1 -1
- package/dist/cjs/index-92254d32.js +6 -10
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-appointments.cjs.entry.js +19 -2
- package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-dialog.cjs.entry.js → stzh-dialog_2.cjs.entry.js} +141 -1
- package/dist/cjs/stzh-dialog_2.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-header.cjs.entry.js +6 -6
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-saptcha.cjs.entry.js +9 -1
- package/dist/cjs/stzh-saptcha.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +25 -14
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +6 -4
- package/dist/collection/assets/i18n/en.json +6 -4
- package/dist/collection/components/stzh-header/stzh-header.css +1 -1
- package/dist/collection/components/stzh-header/stzh-header.js +5 -5
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-header/stzh-header.stories.js +0 -2
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.css +6 -0
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.stories.js +10 -0
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.js +16 -1
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.js.map +1 -1
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.stories.js +2 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +26 -15
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.stories.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-appointments.js +18 -1
- package/dist/components/stzh-appointments.js.map +1 -1
- package/dist/components/stzh-header.js +6 -6
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-radiogroup2.js +1 -1
- package/dist/components/stzh-radiogroup2.js.map +1 -1
- package/dist/components/stzh-saptcha.js +12 -2
- package/dist/components/stzh-saptcha.js.map +1 -1
- package/dist/components/stzh-toastbar.js +1 -185
- package/dist/components/stzh-toastbar.js.map +1 -1
- package/dist/{esm/stzh-toastbar.entry.js → components/stzh-toastbar2.js} +56 -11
- package/dist/components/stzh-toastbar2.js.map +1 -0
- package/dist/components/stzh-upload.js +53 -30
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-0aad39a2.js → app-globals-cff24d08.js} +2 -2
- package/dist/esm/{app-globals-0aad39a2.js.map → app-globals-cff24d08.js.map} +1 -1
- package/dist/esm/index-e3050b18.js +6 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-appointments.entry.js +18 -1
- package/dist/esm/stzh-appointments.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/{stzh-dialog.entry.js → stzh-dialog_2.entry.js} +141 -2
- package/dist/esm/stzh-dialog_2.entry.js.map +1 -0
- package/dist/esm/stzh-header.entry.js +6 -6
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-saptcha.entry.js +9 -1
- package/dist/esm/stzh-saptcha.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +25 -14
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +6 -4
- package/dist/stzh-components/assets/i18n/en.json +6 -4
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-487b6e52.entry.js → p-35bf0d6a.entry.js} +2 -2
- package/dist/stzh-components/{p-487b6e52.entry.js.map → p-35bf0d6a.entry.js.map} +1 -1
- package/dist/stzh-components/p-37a50532.entry.js +2 -0
- package/dist/stzh-components/p-37a50532.entry.js.map +1 -0
- package/dist/stzh-components/{p-9d050177.entry.js → p-50c32fd1.entry.js} +2 -2
- package/dist/stzh-components/p-50c32fd1.entry.js.map +1 -0
- package/dist/stzh-components/p-5d9912f3.entry.js +2 -0
- package/dist/stzh-components/p-5d9912f3.entry.js.map +1 -0
- package/dist/stzh-components/p-cf4727ad.entry.js +2 -0
- package/dist/stzh-components/p-cf4727ad.entry.js.map +1 -0
- package/dist/stzh-components/p-e45e3147.js +2 -0
- package/dist/stzh-components/{p-49fcbbfb.js.map → p-e45e3147.js.map} +1 -1
- package/dist/stzh-components/p-f63a00c1.entry.js +2 -0
- package/dist/stzh-components/p-f63a00c1.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-saptcha/stzh-saptcha.d.ts +4 -0
- package/dist/types/components/stzh-upload/stzh-upload.d.ts +1 -0
- package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +2 -0
- package/dist/types/index.d.ts +5 -5
- package/package.json +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-toastbar.cjs.entry.js +0 -148
- package/dist/cjs/stzh-toastbar.cjs.entry.js.map +0 -1
- package/dist/cjs/translation-utils-18767769.js +0 -23
- package/dist/cjs/translation-utils-18767769.js.map +0 -1
- package/dist/components/translation-utils.js +0 -21
- package/dist/components/translation-utils.js.map +0 -1
- package/dist/esm/stzh-dialog.entry.js.map +0 -1
- package/dist/esm/stzh-toastbar.entry.js.map +0 -1
- package/dist/esm/translation-utils-ffb7823c.js +0 -21
- package/dist/esm/translation-utils-ffb7823c.js.map +0 -1
- package/dist/stzh-components/p-16581003.entry.js +0 -2
- package/dist/stzh-components/p-16581003.entry.js.map +0 -1
- package/dist/stzh-components/p-24feb79f.entry.js +0 -2
- package/dist/stzh-components/p-24feb79f.entry.js.map +0 -1
- package/dist/stzh-components/p-287f518f.entry.js +0 -2
- package/dist/stzh-components/p-287f518f.entry.js.map +0 -1
- package/dist/stzh-components/p-41529de9.js +0 -2
- package/dist/stzh-components/p-41529de9.js.map +0 -1
- package/dist/stzh-components/p-49fcbbfb.js +0 -2
- package/dist/stzh-components/p-9d050177.entry.js.map +0 -1
- package/dist/stzh-components/p-acd03caf.entry.js +0 -2
- package/dist/stzh-components/p-acd03caf.entry.js.map +0 -1
- package/dist/stzh-components/p-bb4dea97.entry.js +0 -2
- package/dist/stzh-components/p-bb4dea97.entry.js.map +0 -1
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-92254d32.js');
|
|
6
|
-
const js_cookie = require('./js.cookie-b422ea10.js');
|
|
7
|
-
require('./_commonjsHelpers-dcc4cf71.js');
|
|
8
|
-
|
|
9
|
-
const stzhToastbarCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{bottom:var(--stzh-space-medium);z-index:var(--stzh-z-index-overlay);position:fixed;pointer-events:none;left:1.25rem;right:1.25rem;bottom:calc( var(--stzh-pagetitle-disturber-stuck-height, 0px) + var(--stzh-sticky-cta-stuck-bottom-height, 0px) )}@media screen and (min-width: 600px){:host{bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){:host{bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){:host{bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){:host{left:2rem;right:auto;max-width:26.8125rem}}@media screen and (min-width: 900px){:host{left:2.5rem;max-width:27.5rem}}@media screen and (min-width: 1260px){:host{left:4rem;max-width:30.3125rem}}@media screen and (min-width: 1600px){:host{left:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2);max-width:34.625rem}}:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-small)}.stzh-toastbar{display:flex;flex-direction:column;justify-content:flex-end}@media screen and (min-width: 600px){.stzh-toastbar{align-items:flex-start}}";
|
|
10
|
-
|
|
11
|
-
const KEY_PREFIX_CLOSED = "stzh-components-toastbar-closed";
|
|
12
|
-
const StzhToastbar = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this._initialToasts = [];
|
|
16
|
-
this.handleSlotchange = () => {
|
|
17
|
-
this.toastsAppended();
|
|
18
|
-
this.hideOverflowingItems();
|
|
19
|
-
};
|
|
20
|
-
this.hideAfter = 30;
|
|
21
|
-
this.max = 5;
|
|
22
|
-
this.initialToasts = [];
|
|
23
|
-
}
|
|
24
|
-
/** Create new toast. */
|
|
25
|
-
async toast(label, { type, link } = { type: "info" }) {
|
|
26
|
-
const toast = document.createElement("stzh-toast");
|
|
27
|
-
toast.hidden = true;
|
|
28
|
-
toast.label = label;
|
|
29
|
-
toast.role = "alert";
|
|
30
|
-
toast.type = type || "info";
|
|
31
|
-
toast.initialOpenAnimation = true;
|
|
32
|
-
if (link) {
|
|
33
|
-
link.slot = "link";
|
|
34
|
-
link.size = "small";
|
|
35
|
-
toast.appendChild(link);
|
|
36
|
-
}
|
|
37
|
-
this.element.appendChild(toast);
|
|
38
|
-
return toast;
|
|
39
|
-
}
|
|
40
|
-
initialToastsWatcher(newValue) {
|
|
41
|
-
if (typeof newValue === "string") {
|
|
42
|
-
this._initialToasts = JSON.parse(newValue);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this._initialToasts = newValue;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
toastAppended(toast) {
|
|
49
|
-
if (toast.getAttribute('data-stzh-toastbar-managed')) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
toast.setAttribute('data-stzh-toastbar-managed', '');
|
|
53
|
-
toast.addEventListener("stzhClosed", () => {
|
|
54
|
-
toast.remove();
|
|
55
|
-
});
|
|
56
|
-
if (toast.type !== "error") {
|
|
57
|
-
let timeoutStarted = new Date().getTime();
|
|
58
|
-
let restTime = this.hideAfter * 1000;
|
|
59
|
-
let currentTimeout = window.setTimeout(() => {
|
|
60
|
-
toast.hide();
|
|
61
|
-
}, restTime);
|
|
62
|
-
toast.addEventListener("pointerenter", () => {
|
|
63
|
-
if (currentTimeout) {
|
|
64
|
-
window.clearTimeout(currentTimeout);
|
|
65
|
-
const timePassed = new Date().getTime() - timeoutStarted;
|
|
66
|
-
restTime = restTime - timePassed;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
toast.addEventListener("pointerleave", () => {
|
|
70
|
-
timeoutStarted = new Date().getTime();
|
|
71
|
-
currentTimeout = window.setTimeout(() => {
|
|
72
|
-
toast.hide();
|
|
73
|
-
}, restTime);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
toastsAppended() {
|
|
78
|
-
var _a;
|
|
79
|
-
const host = ((_a = this.element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) || this.element;
|
|
80
|
-
Array.from(host.children).forEach((toast) => {
|
|
81
|
-
this.toastAppended(toast);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
hideOverflowingItems() {
|
|
85
|
-
var _a;
|
|
86
|
-
const host = ((_a = this.element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) || this.element;
|
|
87
|
-
const childCount = host.children.length;
|
|
88
|
-
Array.from(host.children)
|
|
89
|
-
.splice(0, childCount - this.max)
|
|
90
|
-
.forEach((toast) => {
|
|
91
|
-
toast.hide();
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
componentWillLoad() {
|
|
95
|
-
this.initialToastsWatcher(this.initialToasts);
|
|
96
|
-
}
|
|
97
|
-
componentDidLoad() {
|
|
98
|
-
this._initialToasts.forEach(async (data) => {
|
|
99
|
-
if (data.cookie) {
|
|
100
|
-
const alreadyClosedBefore = js_cookie.js_cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);
|
|
101
|
-
if (alreadyClosedBefore) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
let link = data.link;
|
|
106
|
-
if (!(link instanceof HTMLElement)) {
|
|
107
|
-
const generatedLink = document.createElement("stzh-button");
|
|
108
|
-
generatedLink.slot = "link";
|
|
109
|
-
generatedLink.size = "small";
|
|
110
|
-
Object.assign(generatedLink, data.link);
|
|
111
|
-
link = generatedLink;
|
|
112
|
-
}
|
|
113
|
-
const toast = await this.toast(data.label, {
|
|
114
|
-
type: data.type,
|
|
115
|
-
link: link
|
|
116
|
-
});
|
|
117
|
-
if (data.cookie) {
|
|
118
|
-
let cookieExpires = 365;
|
|
119
|
-
if (data.cookieExpires === 0) {
|
|
120
|
-
cookieExpires = null;
|
|
121
|
-
}
|
|
122
|
-
else if (data.cookieExpires) {
|
|
123
|
-
cookieExpires = data.cookieExpires;
|
|
124
|
-
}
|
|
125
|
-
toast.addEventListener("stzhClosed", () => {
|
|
126
|
-
js_cookie.js_cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {
|
|
127
|
-
expires: cookieExpires
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
render() {
|
|
134
|
-
const classes = {
|
|
135
|
-
"stzh-toastbar": true,
|
|
136
|
-
};
|
|
137
|
-
return (index.h(index.Host, null, index.h("div", { class: classes }, index.h("slot", { onSlotchange: this.handleSlotchange }))));
|
|
138
|
-
}
|
|
139
|
-
get element() { return index.getElement(this); }
|
|
140
|
-
static get watchers() { return {
|
|
141
|
-
"initialToasts": ["initialToastsWatcher"]
|
|
142
|
-
}; }
|
|
143
|
-
};
|
|
144
|
-
StzhToastbar.style = stzhToastbarCss;
|
|
145
|
-
|
|
146
|
-
exports.stzh_toastbar = StzhToastbar;
|
|
147
|
-
|
|
148
|
-
//# sourceMappingURL=stzh-toastbar.cjs.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"stzh-toastbar.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,0iEAA0iE;;ACiBlkE,MAAM,iBAAiB,GAAG,iCAAiC,CAAC;MAU/C,YAAY;;;IAuBf,mBAAc,GAA+B,EAAE,CAAC;IA0FhD,qBAAgB,GAAG;MACzB,IAAI,CAAC,cAAc,EAAE,CAAC;MACtB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC7B,CAAA;qBA/G2B,EAAE;eAMR,CAAC;yBAWsC,EAAE;;;EAO/D,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pC;QAED,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE;UACnCA,mBAAM,CAAC,GAAG,CAAC,GAAG,iBAAiB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE;YACrD,OAAO,EAAE,aAAa;WACvB,CAAC,CAAC;SACJ,CAAC,CAAC;OACJ;KACF,CAAC,CAAA;GACH;EAED,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,eAAe,EAAE,IAAI;KACtB,CAAC;IAEF,QACEC,QAACC,UAAI,QACHD,iBAAK,KAAK,EAAE,OAAO,IACjBA,kBAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C,CACD,EACP;GACH;;;;;;;;;;","names":["Cookie","h","Host"],"sources":["src/components/stzh-toastbar/stzh-toastbar.scss?tag=stzh-toastbar&encapsulation=shadow","src/components/stzh-toastbar/stzh-toastbar.tsx"],"sourcesContent":[":host {\n @include spaceCurve('bottom', 'regular');\n z-index: $zIndexOverlay;\n position: fixed;\n pointer-events: none;\n left: $containerMargin;\n right: $containerMargin;\n bottom: calc(\n var(--stzh-pagetitle-disturber-stuck-height, 0px)\n + var(--stzh-sticky-cta-stuck-bottom-height, 0px)\n );\n\n @include mq($from: small) {\n left: $containerMarginSmall;\n right: auto;\n max-width: 429px;\n }\n\n @include mq($from: medium) {\n left: $containerMarginMedium;\n max-width: 440px;\n }\n\n @include mq($from: large) {\n left: $containerMarginLarge;\n max-width: 485px;\n }\n\n @include mq($from: ultra) {\n left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / 2);\n max-width: 554px;\n }\n\n ::slotted(*:not([hidden]):not([slot])) {\n margin-bottom: space('small');\n }\n}\n\n.stzh-toastbar {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n @include mq($from: small) {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastbarInitialToast,\n StzhToastType,\n} from \"../../index\";\n\nimport Cookie from \"js-cookie\";\n\nconst KEY_PREFIX_CLOSED = \"stzh-components-toastbar-closed\";\n\n/**\n * @slot - Slot for stzh-toast elements\n */\n@Component({\n tag: \"stzh-toastbar\",\n styleUrl: \"stzh-toastbar.scss\",\n shadow: true\n})\nexport class StzhToastbar {\n /**\n * Time after toasts are hidden (in seconds).\n * Toasts with type `error` will stay, until the user closes them manually.\n */\n @Prop() hideAfter: number = 30;\n\n /**\n * Maximum of toasts allowed to be shown.\n * If more are created, oldest will be hidden, even if timeout not ended yet or toast type is `error`.\n */\n @Prop() max: number = 5;\n\n /**\n * Initial toasts.\n *\n * Array of objects that at least includes `label` and optionally `type`, `link` (object with `href` and `label`) `cookie` and `cookieExpires`:\n * `[{\"label\": \"Lorem ipsum\", \"link\": { \"label\": \"More info\", \"href\": \"https://example.com\" }, \"cookie\": \"cookie-banner\", \"cookieExpires\": 365 }]`\n *\n * If `cookie` exists in an object, it will check for that cookie name first (prefixed with `stzh-components-toastbar-closed-`) and only show if cookie doesn't exist.\n * `cookieExpires` sets the cookie lifetime (default 365 days, set 0 for session cookie).\n */\n @Prop() initialToasts: StzhToastbarInitialToast[] | string = [];\n private _initialToasts: StzhToastbarInitialToast[] = [];\n\n @Element() element: HTMLStzhToastbarElement;\n\n /** Create new toast. */\n @Method()\n async toast(\n label: string,\n { type, link }: { type?: StzhToastType, link?: HTMLStzhButtonElement } = { type: \"info\" }\n ): Promise<HTMLStzhToastElement> {\n const toast = document.createElement(\"stzh-toast\");\n toast.hidden = true;\n toast.label = label;\n toast.role = \"alert\";\n toast.type = type || \"info\";\n toast.initialOpenAnimation = true;\n\n if (link) {\n link.slot = \"link\";\n link.size = \"small\";\n toast.appendChild(link);\n }\n\n this.element.appendChild(toast);\n\n return toast;\n }\n\n @Watch(\"initialToasts\")\n initialToastsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._initialToasts = JSON.parse(newValue);\n } else {\n this._initialToasts = newValue;\n }\n }\n\n private toastAppended(toast: HTMLStzhToastElement) {\n if (toast.getAttribute('data-stzh-toastbar-managed')) {\n return;\n }\n\n toast.setAttribute('data-stzh-toastbar-managed', '');\n\n toast.addEventListener(\"stzhClosed\", () => {\n toast.remove();\n });\n\n if (toast.type !== \"error\") {\n let timeoutStarted = new Date().getTime();\n let restTime = this.hideAfter * 1000;\n let currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n\n toast.addEventListener(\"pointerenter\", () => {\n if (currentTimeout) {\n window.clearTimeout(currentTimeout);\n const timePassed = new Date().getTime() - timeoutStarted;\n restTime = restTime - timePassed;\n }\n });\n\n toast.addEventListener(\"pointerleave\", () => {\n timeoutStarted = new Date().getTime();\n currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n });\n }\n }\n\n private toastsAppended() {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n Array.from(host.children).forEach((toast: HTMLStzhToastElement) => {\n this.toastAppended(toast);\n });\n }\n\n private hideOverflowingItems() {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const childCount = host.children.length;\n\n Array.from(host.children)\n .splice(0, childCount - this.max)\n .forEach((toast: HTMLStzhToastElement) => {\n toast.hide();\n });\n }\n\n private handleSlotchange = () => {\n this.toastsAppended();\n this.hideOverflowingItems();\n }\n\n componentWillLoad() {\n this.initialToastsWatcher(this.initialToasts);\n }\n\n componentDidLoad() {\n this._initialToasts.forEach(async (data) => {\n if (data.cookie) {\n const alreadyClosedBefore = Cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);\n\n if (alreadyClosedBefore) {\n return;\n }\n }\n\n let link = data.link;\n\n if (!(link instanceof HTMLElement)) {\n const generatedLink = document.createElement(\"stzh-button\");\n generatedLink.slot = \"link\";\n generatedLink.size = \"small\";\n\n Object.assign(generatedLink, data.link);\n link = generatedLink;\n }\n\n const toast = await this.toast(data.label, {\n type: data.type,\n link: link as HTMLStzhButtonElement\n })\n\n if (data.cookie) {\n let cookieExpires = 365;\n\n if (data.cookieExpires === 0) {\n cookieExpires = null;\n } else if (data.cookieExpires) {\n cookieExpires = data.cookieExpires;\n }\n\n toast.addEventListener(\"stzhClosed\", () => {\n Cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {\n expires: cookieExpires\n });\n });\n }\n })\n }\n\n render() {\n const classes = {\n \"stzh-toastbar\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot onSlotchange={this.handleSlotchange}></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function tc(translation, count) {
|
|
4
|
-
if (!translation) {
|
|
5
|
-
return "";
|
|
6
|
-
}
|
|
7
|
-
const parts = translation.split('|');
|
|
8
|
-
let part = parts[0].trim();
|
|
9
|
-
if (parts.length === 3 && count === 1) {
|
|
10
|
-
part = parts[1].trim();
|
|
11
|
-
}
|
|
12
|
-
else if (parts.length === 3 && (count > 1 || count === null)) {
|
|
13
|
-
part = parts[2].trim();
|
|
14
|
-
}
|
|
15
|
-
if (parts.length === 2 && count !== 1) {
|
|
16
|
-
part = parts[1].trim();
|
|
17
|
-
}
|
|
18
|
-
return part.replace(/\{n\}/ig, (count === null || count === void 0 ? void 0 : count.toString()) || '');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.tc = tc;
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=translation-utils-18767769.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"translation-utils-18767769.js","mappings":";;SAqEgB,EAAE,CAAC,WAAmB,EAAE,KAAa;EACnD,IAAI,CAAC,WAAW,EAAE;IAChB,OAAO,EAAE,CAAC;GACX;EAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;EACrC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;OAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,EAAE;IAC9D,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,KAAI,EAAE,CAAC,CAAC;AAC1D;;;;","names":[],"sources":["src/utils/translation-utils.ts"],"sourcesContent":["import {\n StzhDateFormat,\n StzhDateParse\n} from \"./date-adapter\";\n\nexport type StzhLocaleFormats = {\n datetime?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n date?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n time?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n timeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n}\n\ntype MonthsNames = [string, string, string, string, string, string, string, string, string, string, string, string]\ntype DayNames = [string, string, string, string, string, string, string]\n\nexport type StzhLocaleGlobals = {\n dateRange: string,\n timeRange: string,\n externalLinkLabel: string\n downloadLinkLabel: string\n requiredFieldMarker: string\n requiredFieldText: string\n optionalFieldMarker: string\n optionalFieldText: string\n invalidFieldText: string\n clearButtonLabel: string\n moreInfoButtonLabel: string\n dayNames: DayNames\n dayNamesShort: DayNames\n monthNames: MonthsNames\n monthNamesShort: MonthsNames\n}\n\nexport type StzhLocaleComponent = {\n $locale: \"de\" | \"en\",\n $formats: StzhLocaleFormats,\n $formatsIso: StzhLocaleFormats,\n $formatsLegacy: StzhLocaleFormats,\n $globals: StzhLocaleGlobals\n}\n\nexport function tc(translation: string, count: number): string {\n if (!translation) {\n return \"\";\n }\n\n const parts = translation.split('|');\n let part = parts[0].trim();\n\n if (parts.length === 3 && count === 1) {\n part = parts[1].trim();\n } else if (parts.length === 3 && (count > 1 || count === null)) {\n part = parts[2].trim();\n }\n\n if (parts.length === 2 && count !== 1) {\n part = parts[1].trim();\n }\n\n return part.replace(/\\{n\\}/ig, count?.toString() || '');\n}\n"],"version":3}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function tc(translation, count) {
|
|
2
|
-
if (!translation) {
|
|
3
|
-
return "";
|
|
4
|
-
}
|
|
5
|
-
const parts = translation.split('|');
|
|
6
|
-
let part = parts[0].trim();
|
|
7
|
-
if (parts.length === 3 && count === 1) {
|
|
8
|
-
part = parts[1].trim();
|
|
9
|
-
}
|
|
10
|
-
else if (parts.length === 3 && (count > 1 || count === null)) {
|
|
11
|
-
part = parts[2].trim();
|
|
12
|
-
}
|
|
13
|
-
if (parts.length === 2 && count !== 1) {
|
|
14
|
-
part = parts[1].trim();
|
|
15
|
-
}
|
|
16
|
-
return part.replace(/\{n\}/ig, (count === null || count === void 0 ? void 0 : count.toString()) || '');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { tc as t };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=translation-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"translation-utils.js","mappings":"SAqEgB,EAAE,CAAC,WAAmB,EAAE,KAAa;EACnD,IAAI,CAAC,WAAW,EAAE;IAChB,OAAO,EAAE,CAAC;GACX;EAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;EACrC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;OAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,EAAE;IAC9D,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,KAAI,EAAE,CAAC,CAAC;AAC1D;;;;","names":[],"sources":["src/utils/translation-utils.ts"],"sourcesContent":["import {\n StzhDateFormat,\n StzhDateParse\n} from \"./date-adapter\";\n\nexport type StzhLocaleFormats = {\n datetime?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n date?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n time?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n timeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n}\n\ntype MonthsNames = [string, string, string, string, string, string, string, string, string, string, string, string]\ntype DayNames = [string, string, string, string, string, string, string]\n\nexport type StzhLocaleGlobals = {\n dateRange: string,\n timeRange: string,\n externalLinkLabel: string\n downloadLinkLabel: string\n requiredFieldMarker: string\n requiredFieldText: string\n optionalFieldMarker: string\n optionalFieldText: string\n invalidFieldText: string\n clearButtonLabel: string\n moreInfoButtonLabel: string\n dayNames: DayNames\n dayNamesShort: DayNames\n monthNames: MonthsNames\n monthNamesShort: MonthsNames\n}\n\nexport type StzhLocaleComponent = {\n $locale: \"de\" | \"en\",\n $formats: StzhLocaleFormats,\n $formatsIso: StzhLocaleFormats,\n $formatsLegacy: StzhLocaleFormats,\n $globals: StzhLocaleGlobals\n}\n\nexport function tc(translation: string, count: number): string {\n if (!translation) {\n return \"\";\n }\n\n const parts = translation.split('|');\n let part = parts[0].trim();\n\n if (parts.length === 3 && count === 1) {\n part = parts[1].trim();\n } else if (parts.length === 3 && (count > 1 || count === null)) {\n part = parts[2].trim();\n }\n\n if (parts.length === 2 && count !== 1) {\n part = parts[1].trim();\n }\n\n return part.replace(/\\{n\\}/ig, count?.toString() || '');\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"stzh-dialog.entry.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,s7KAAs7K;;ACwB58K,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C,IAAI,YAAY,GAAe,IAAI,CAAC;AACpC,IAAI,aAAa,GAAG,CAAC,CAAC;MAWT,UAAU;;;;;IA4Gb,sBAAiB,GAAG,CAAC,KAAiB;MAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;MAC3C,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE;QAClC,IAAI,CAAC,IAAI,EAAE,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AM,EACzC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,IAAI,CAAC,OAAO;MACX,oBACE,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,UAAU,EACxB,KAAK,EAAC,sBAAsB,EAC5B,KAAK,EAAC,GAAG,IAER,IAAI,CAAC,OAAO,CACA,EAGjB,WAAK,KAAK,EAAC,6BAA6B,IACtC,eAAa,CACT,EAEN,WAAK,KAAK,EAAC,sBAAsB,IAC/B,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,EAEL,CAAC,IAAI,CAAC,SAAS;MACd,mBACE,KAAK,EAAC,2BAA2B,EACjC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,IAAI,CAAC,sBAAsB,EACpC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAClC,WAAW,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,GAChD,CAEb,CACF,CACF,CACD,EACP;GACH;;;;;;;","names":[],"sources":["src/components/stzh-dialog/stzh-dialog.scss?tag=stzh-dialog&encapsulation=scoped","src/components/stzh-dialog/stzh-dialog.tsx"],"sourcesContent":["/**\n * @prop --width: Width of dialog\n * @prop --padding-top: Padding top of dialog\n * @prop --padding-bottom: Padding bottom of dialog\n * @prop --padding-left: Padding left of dialog\n * @prop --padding-right: Padding right of dialog\n * @prop --backdrop-opacity: Opacity of dialog backdrop\n * @prop --backdrop-background-color: Opacity of dialog background color\n *\n * @prop --stzh-dialog-backdrop-opacity: **Global**: Opacity of backdrops\n * @prop --stzh-dialog-backdrop-background-color: **Global**: Background color of backdrops\n */\n\n:host {\n @include spaceCurve('--padding-top', 'large');\n @include spaceCurve('--padding-bottom', 'large');\n @include spaceCurve('--padding-left', 'medium');\n @include spaceCurve('--padding-right', 'medium');\n --width: 100%;\n --backdrop-opacity: #{$dialogBackdropOpacity};\n --backdrop-background-color: #{$dialogBackdropBackgroundColor};\n\n @include mq($from: small) {\n --width: 536px;\n }\n\n @include mq($from: medium) {\n --width: 610px; // 786 before\n }\n\n @include mq($from: large) {\n --width: 866px; // 832 before\n }\n\n @include mq($from: ultra) {\n --width: 888px;\n }\n\n &[size=\"small\"] {\n @include mq($from: small) {\n --width: 395px;\n }\n\n @include mq($from: medium) {\n --width: 460px;\n }\n\n @include mq($from: large) {\n --width: 512px;\n }\n }\n}\n\n.stzh-dialog {\n z-index: $zIndexDialog;\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: stretch;\n justify-content: stretch;\n\n &__content {\n z-index: 2;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n overflow: auto;\n }\n\n &__dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n margin: auto;\n border: none;\n background-color: $colorWhite;\n width: var(--width);\n max-width: 100%;\n box-shadow: $boxShadowOverlay;\n height: 100vh;\n max-height: 100vh;\n // overflow: visible;\n overflow: hidden;\n outline: none;\n\n @include mq($from: small) {\n height: auto;\n }\n }\n\n &__backdrop {\n z-index: 1;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n text-align: center;\n background-color: var(--backdrop-background-color);\n opacity: var(--backdrop-opacity);\n }\n\n &__heading {\n @include spaceCurve('padding-bottom', 'regular');\n padding-top: var(--padding-top);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n }\n\n &__dialog-content {\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n @include spaceCurve('padding-top', 'medium');\n @include spaceCurve('padding-bottom', 'medium');\n overflow: auto;\n flex-grow: 1;\n }\n\n &__actions {\n &:not(:empty) {\n padding-top: space('medium');\n padding-bottom: var(--padding-bottom);\n padding-left: var(--padding-left);\n padding-right: var(--padding-right);\n }\n }\n\n &__close-button {\n position: absolute;\n top: space('xsmall');\n right: space('xsmall');\n\n @include mq($from: medium) {\n top: space('large');\n right: space('large');\n }\n }\n\n &--is-open {\n display: flex;\n }\n}\n","import {\n Host,\n Component,\n Element,\n Method,\n Listen,\n Prop,\n Event,\n EventEmitter,\n h,\n} from \"@stencil/core\";\n\nimport {\n StzhDialogOpenEvent,\n StzhDialogCloseEvent\n} from \"../../index\";\n\nimport { setPropsIfNull } from \"../../utils/utils\";\nimport { createBaseFocusTrapOptions } from \"../../utils/overlay-utils\";\n\nimport { StzhDialogLocalizedText } from \"./stzh-dialog.localization\"\n\nimport { createFocusTrap, FocusTrap } from 'focus-trap';\n\nconst CLASS_BODY_OPEN = \"stzh-dialog-open\";\n\nlet activeDialog: StzhDialog = null;\nlet dialogCounter = 0;\n\n/**\n * @slot actions - Slot for actions element\n * @slot - Slot for any content inside the dialog\n */\n@Component({\n tag: \"stzh-dialog\",\n styleUrl: \"stzh-dialog.scss\",\n scoped: true\n})\nexport class StzhDialog {\n /** Translation strings */\n @Prop() localization: StzhDialogLocalizedText;\n\n /** Close dialog when pressing ESC */\n @Prop() closeOnEscapeKey: boolean = false;\n\n /** Close dialog when clicking outside of it */\n @Prop() closeOnBackdropClick: boolean = false;\n\n /** Open status */\n @Prop({ mutable: true }) open: boolean = false;\n\n /** Stay in original position (true) or move to body (false) */\n @Prop() stay: boolean = true;\n\n /** Size */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Whether to hide close button */\n @Prop() hideClose: boolean = false;\n\n /** Heading text */\n @Prop() heading: string = \"\";\n\n /** Accessibility role */\n @Prop({ attribute: \"a11y-role\" }) a11yRole: \"dialog\" | \"alertdialog\" = \"alertdialog\";\n\n /** Accessible label for dialog (use if no heading is used) */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the close button element.\n * Default value will be taken from translations.\n */\n @Prop() closeAnalyticsId: string;\n\n /** Dialog open event */\n @Event() stzhOpen: EventEmitter<StzhDialogOpenEvent>;\n\n /** Dialog close event */\n @Event() stzhClose: EventEmitter<StzhDialogCloseEvent>;\n\n @Element() element: HTMLStzhDialogElement;\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleOutsideClick(event: MouseEvent) {\n if (!this.open || !this.closeOnBackdropClick) {\n return\n }\n\n const isClickOutside = event.target !== this.dialogElement\n && this.dialogElement.contains(event.target as HTMLElement) === false\n\n if (isClickOutside) {\n this.hide()\n }\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeydown(event: KeyboardEvent) {\n if (\n event.key === \"Escape\"\n && activeDialog === this\n && this.closeOnEscapeKey\n ) {\n this.hide();\n }\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleOpenTriggerClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (target.dataset.stzhDialogTrigger === this.element.id) {\n this.show();\n } else {\n const closest = target.closest(\"[data-stzh-dialog-trigger]\") as HTMLElement;\n\n if (closest && closest.dataset.stzhDialogTrigger === this.element.id) {\n this.show();\n }\n }\n }\n\n @Method()\n async show() {\n this.open = true;\n this.stzhOpen.emit({\n component: \"stzh-dialog\"\n });\n }\n\n @Method()\n async hide() {\n this.open = false;\n this.stzhClose.emit({\n component: \"stzh-dialog\"\n });\n }\n\n private observer: MutationObserver;\n private id: string;\n private trap: FocusTrap;\n private parentElement: HTMLElement;\n private dialogElement: HTMLDivElement;\n\n private handleDialogClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (target.dataset.stzhDialogClose) {\n this.hide();\n } else {\n const closest = target.closest(\"[data-stzh-dialog-close]\");\n\n if (closest) {\n this.hide();\n }\n }\n }\n\n private handleCloseButtonClick = () => {\n this.hide();\n }\n\n private init = () => {\n const actions = this.element.querySelector('stzh-actions[slot=\"actions\"]');\n\n if (actions) {\n setPropsIfNull(actions, {\n variant: \"dialog\"\n } as HTMLStzhActionsElement)\n }\n }\n\n private getSiblings() {\n if (!this.parentElement) {\n return [];\n }\n\n return Array.from(this.parentElement.children).filter(\n (child) => child !== this.element\n );\n }\n\n private disableSiblings() {\n this.getSiblings().forEach((sibling) => {\n sibling.setAttribute(\"aria-hidden\", \"true\");\n });\n }\n\n private enableSiblings() {\n this.getSiblings().forEach((sibling) => {\n sibling.removeAttribute(\"aria-hidden\");\n });\n }\n\n private dialogShown() {\n activeDialog = this;\n document.body.classList.add(CLASS_BODY_OPEN);\n this.disableSiblings();\n\n if (this.trap) {\n this.trap.activate();\n }\n }\n\n private dialogHidden() {\n document.body.classList.remove(CLASS_BODY_OPEN);\n this.enableSiblings();\n\n if (this.trap) {\n this.trap.deactivate();\n }\n\n activeDialog = null;\n }\n\n async componentWillLoad() {\n this.id = `stzh-dialog-${dialogCounter}`;\n dialogCounter++;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"dialog\");\n }\n }\n\n componentDidRender() {\n this.open ? this.dialogShown() : this.dialogHidden();\n }\n\n componentDidUpdate() {\n this.trap.updateContainerElements(this.element);\n }\n\n componentDidLoad() {\n this.trap = createFocusTrap(this.element, {\n fallbackFocus: this.dialogElement,\n ...createBaseFocusTrapOptions()\n });\n\n if (this.open) {\n this.dialogShown();\n }\n }\n\n connectedCallback() {\n if (!this.stay && this.element.parentElement !== document.body) {\n document.body.appendChild(this.element);\n }\n\n this.parentElement = this.element.parentElement;\n\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.dialogHidden();\n\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n return (\n <Host>\n <div\n class={{\n \"stzh-dialog\": true,\n \"stzh-dialog--is-open\": this.open,\n \"stzh-dialog--has-heading\": !!this.heading,\n \"stzh-dialog--has-close-hidden\": this.hideClose,\n [`stzh-dialog--size-${this.size}`]: !!this.size,\n }}\n >\n <div class=\"stzh-dialog__backdrop\"></div>\n <div class=\"stzh-dialog__content\">\n <div\n class=\"stzh-dialog__dialog\"\n ref={(el) => (this.dialogElement = el as HTMLDivElement)}\n tabindex=\"-1\"\n role={this.a11yRole}\n aria-label={this.a11yLabel || null}\n aria-labelledby={this.heading ? `${this.id}-heading` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onClick={this.handleDialogClick}\n >\n {this.heading &&\n <stzh-heading\n id={`${this.id}-heading`}\n class=\"stzh-dialog__heading\"\n level=\"2\"\n >\n {this.heading}\n </stzh-heading>\n }\n\n <div class=\"stzh-dialog__dialog-content\">\n <slot></slot>\n </div>\n\n <div class=\"stzh-dialog__actions\">\n <slot name=\"actions\"></slot>\n </div>\n\n {!this.hideClose &&\n <stzh-button\n class=\"stzh-dialog__close-button\"\n variant=\"tertiary\"\n size=\"small\"\n icon=\"close\"\n iconOnly={true}\n onClick={this.handleCloseButtonClick}\n a11yLabel={this.localization.close}\n analyticsId={this.closeAnalyticsId || this.localization.close}\n ></stzh-button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"stzh-toastbar.entry.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,0iEAA0iE;;ACiBlkE,MAAM,iBAAiB,GAAG,iCAAiC,CAAC;MAU/C,YAAY;;;IAuBf,mBAAc,GAA+B,EAAE,CAAC;IA0FhD,qBAAgB,GAAG;MACzB,IAAI,CAAC,cAAc,EAAE,CAAC;MACtB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC7B,CAAA;qBA/G2B,EAAE;eAMR,CAAC;yBAWsC,EAAE;;;EAO/D,MAAM,KAAK,CACT,KAAa,EACb,EAAE,IAAI,EAAE,IAAI,KAA6D,EAAE,IAAI,EAAE,MAAM,EAAE;IAEzF,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACnD,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,KAAK,GAA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EAED,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,eAAe,EAAE,IAAI;KACtB,CAAC;IAEF,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,OAAO,IACjB,YAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C,CACD,EACP;GACH;;;;;;;;;;","names":["Cookie"],"sources":["src/components/stzh-toastbar/stzh-toastbar.scss?tag=stzh-toastbar&encapsulation=shadow","src/components/stzh-toastbar/stzh-toastbar.tsx"],"sourcesContent":[":host {\n @include spaceCurve('bottom', 'regular');\n z-index: $zIndexOverlay;\n position: fixed;\n pointer-events: none;\n left: $containerMargin;\n right: $containerMargin;\n bottom: calc(\n var(--stzh-pagetitle-disturber-stuck-height, 0px)\n + var(--stzh-sticky-cta-stuck-bottom-height, 0px)\n );\n\n @include mq($from: small) {\n left: $containerMarginSmall;\n right: auto;\n max-width: 429px;\n }\n\n @include mq($from: medium) {\n left: $containerMarginMedium;\n max-width: 440px;\n }\n\n @include mq($from: large) {\n left: $containerMarginLarge;\n max-width: 485px;\n }\n\n @include mq($from: ultra) {\n left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / 2);\n max-width: 554px;\n }\n\n ::slotted(*:not([hidden]):not([slot])) {\n margin-bottom: space('small');\n }\n}\n\n.stzh-toastbar {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n @include mq($from: small) {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastbarInitialToast,\n StzhToastType,\n} from \"../../index\";\n\nimport Cookie from \"js-cookie\";\n\nconst KEY_PREFIX_CLOSED = \"stzh-components-toastbar-closed\";\n\n/**\n * @slot - Slot for stzh-toast elements\n */\n@Component({\n tag: \"stzh-toastbar\",\n styleUrl: \"stzh-toastbar.scss\",\n shadow: true\n})\nexport class StzhToastbar {\n /**\n * Time after toasts are hidden (in seconds).\n * Toasts with type `error` will stay, until the user closes them manually.\n */\n @Prop() hideAfter: number = 30;\n\n /**\n * Maximum of toasts allowed to be shown.\n * If more are created, oldest will be hidden, even if timeout not ended yet or toast type is `error`.\n */\n @Prop() max: number = 5;\n\n /**\n * Initial toasts.\n *\n * Array of objects that at least includes `label` and optionally `type`, `link` (object with `href` and `label`) `cookie` and `cookieExpires`:\n * `[{\"label\": \"Lorem ipsum\", \"link\": { \"label\": \"More info\", \"href\": \"https://example.com\" }, \"cookie\": \"cookie-banner\", \"cookieExpires\": 365 }]`\n *\n * If `cookie` exists in an object, it will check for that cookie name first (prefixed with `stzh-components-toastbar-closed-`) and only show if cookie doesn't exist.\n * `cookieExpires` sets the cookie lifetime (default 365 days, set 0 for session cookie).\n */\n @Prop() initialToasts: StzhToastbarInitialToast[] | string = [];\n private _initialToasts: StzhToastbarInitialToast[] = [];\n\n @Element() element: HTMLStzhToastbarElement;\n\n /** Create new toast. */\n @Method()\n async toast(\n label: string,\n { type, link }: { type?: StzhToastType, link?: HTMLStzhButtonElement } = { type: \"info\" }\n ): Promise<HTMLStzhToastElement> {\n const toast = document.createElement(\"stzh-toast\");\n toast.hidden = true;\n toast.label = label;\n toast.role = \"alert\";\n toast.type = type || \"info\";\n toast.initialOpenAnimation = true;\n\n if (link) {\n link.slot = \"link\";\n link.size = \"small\";\n toast.appendChild(link);\n }\n\n this.element.appendChild(toast);\n\n return toast;\n }\n\n @Watch(\"initialToasts\")\n initialToastsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._initialToasts = JSON.parse(newValue);\n } else {\n this._initialToasts = newValue;\n }\n }\n\n private toastAppended(toast: HTMLStzhToastElement) {\n if (toast.getAttribute('data-stzh-toastbar-managed')) {\n return;\n }\n\n toast.setAttribute('data-stzh-toastbar-managed', '');\n\n toast.addEventListener(\"stzhClosed\", () => {\n toast.remove();\n });\n\n if (toast.type !== \"error\") {\n let timeoutStarted = new Date().getTime();\n let restTime = this.hideAfter * 1000;\n let currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n\n toast.addEventListener(\"pointerenter\", () => {\n if (currentTimeout) {\n window.clearTimeout(currentTimeout);\n const timePassed = new Date().getTime() - timeoutStarted;\n restTime = restTime - timePassed;\n }\n });\n\n toast.addEventListener(\"pointerleave\", () => {\n timeoutStarted = new Date().getTime();\n currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n });\n }\n }\n\n private toastsAppended() {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n Array.from(host.children).forEach((toast: HTMLStzhToastElement) => {\n this.toastAppended(toast);\n });\n }\n\n private hideOverflowingItems() {\n const host = (this.element.getRootNode() as ShadowRoot)?.host || this.element;\n const childCount = host.children.length;\n\n Array.from(host.children)\n .splice(0, childCount - this.max)\n .forEach((toast: HTMLStzhToastElement) => {\n toast.hide();\n });\n }\n\n private handleSlotchange = () => {\n this.toastsAppended();\n this.hideOverflowingItems();\n }\n\n componentWillLoad() {\n this.initialToastsWatcher(this.initialToasts);\n }\n\n componentDidLoad() {\n this._initialToasts.forEach(async (data) => {\n if (data.cookie) {\n const alreadyClosedBefore = Cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);\n\n if (alreadyClosedBefore) {\n return;\n }\n }\n\n let link = data.link;\n\n if (!(link instanceof HTMLElement)) {\n const generatedLink = document.createElement(\"stzh-button\");\n generatedLink.slot = \"link\";\n generatedLink.size = \"small\";\n\n Object.assign(generatedLink, data.link);\n link = generatedLink;\n }\n\n const toast = await this.toast(data.label, {\n type: data.type,\n link: link as HTMLStzhButtonElement\n })\n\n if (data.cookie) {\n let cookieExpires = 365;\n\n if (data.cookieExpires === 0) {\n cookieExpires = null;\n } else if (data.cookieExpires) {\n cookieExpires = data.cookieExpires;\n }\n\n toast.addEventListener(\"stzhClosed\", () => {\n Cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {\n expires: cookieExpires\n });\n });\n }\n })\n }\n\n render() {\n const classes = {\n \"stzh-toastbar\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot onSlotchange={this.handleSlotchange}></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function tc(translation, count) {
|
|
2
|
-
if (!translation) {
|
|
3
|
-
return "";
|
|
4
|
-
}
|
|
5
|
-
const parts = translation.split('|');
|
|
6
|
-
let part = parts[0].trim();
|
|
7
|
-
if (parts.length === 3 && count === 1) {
|
|
8
|
-
part = parts[1].trim();
|
|
9
|
-
}
|
|
10
|
-
else if (parts.length === 3 && (count > 1 || count === null)) {
|
|
11
|
-
part = parts[2].trim();
|
|
12
|
-
}
|
|
13
|
-
if (parts.length === 2 && count !== 1) {
|
|
14
|
-
part = parts[1].trim();
|
|
15
|
-
}
|
|
16
|
-
return part.replace(/\{n\}/ig, (count === null || count === void 0 ? void 0 : count.toString()) || '');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { tc as t };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=translation-utils-ffb7823c.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"translation-utils-ffb7823c.js","mappings":"SAqEgB,EAAE,CAAC,WAAmB,EAAE,KAAa;EACnD,IAAI,CAAC,WAAW,EAAE;IAChB,OAAO,EAAE,CAAC;GACX;EAED,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;EACrC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;OAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,EAAE;IAC9D,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;GACxB;EAED,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,KAAI,EAAE,CAAC,CAAC;AAC1D;;;;","names":[],"sources":["src/utils/translation-utils.ts"],"sourcesContent":["import {\n StzhDateFormat,\n StzhDateParse\n} from \"./date-adapter\";\n\nexport type StzhLocaleFormats = {\n datetime?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n date?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n time?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n timeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n}\n\ntype MonthsNames = [string, string, string, string, string, string, string, string, string, string, string, string]\ntype DayNames = [string, string, string, string, string, string, string]\n\nexport type StzhLocaleGlobals = {\n dateRange: string,\n timeRange: string,\n externalLinkLabel: string\n downloadLinkLabel: string\n requiredFieldMarker: string\n requiredFieldText: string\n optionalFieldMarker: string\n optionalFieldText: string\n invalidFieldText: string\n clearButtonLabel: string\n moreInfoButtonLabel: string\n dayNames: DayNames\n dayNamesShort: DayNames\n monthNames: MonthsNames\n monthNamesShort: MonthsNames\n}\n\nexport type StzhLocaleComponent = {\n $locale: \"de\" | \"en\",\n $formats: StzhLocaleFormats,\n $formatsIso: StzhLocaleFormats,\n $formatsLegacy: StzhLocaleFormats,\n $globals: StzhLocaleGlobals\n}\n\nexport function tc(translation: string, count: number): string {\n if (!translation) {\n return \"\";\n }\n\n const parts = translation.split('|');\n let part = parts[0].trim();\n\n if (parts.length === 3 && count === 1) {\n part = parts[1].trim();\n } else if (parts.length === 3 && (count > 1 || count === null)) {\n part = parts[2].trim();\n }\n\n if (parts.length === 2 && count !== 1) {\n part = parts[1].trim();\n }\n\n return part.replace(/\\{n\\}/ig, count?.toString() || '');\n}\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,e as s,w as a,h,F as i,a as r,g as n}from"./p-c7bfac7a.js";import{h as d}from"./p-d789f265.js";import{m as o}from"./p-10e2901a.js";import{t as l,c}from"./p-ed63ed76.js";import{c as m}from"./p-3d5f9ac0.js";import"./p-9b063923.js";const z=".sc-stzh-header-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-header-h{display:none}.sc-stzh-header-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-header-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-header-h *.sc-stzh-header,.sc-stzh-header-h *.sc-stzh-header::before,.sc-stzh-header-h *.sc-stzh-header::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-header-h .has-focus.sc-stzh-header{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header{outline-style:none !important}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header::-moz-focus-inner{border:0 !important}.sc-stzh-header-h{--logo-width:auto;--logo-height:100%;--logobar-background-color:var(--stzh-header-logobar-background-color)}@media print{.sc-stzh-header-h{display:none}}[logo-type=aoz].sc-stzh-header-h,[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h{--logo-height:1.9375rem}@media screen and (min-width: 900px){[logo-type=aoz].sc-stzh-header-h,[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h{--logo-height:2.1875rem}}@media screen and (min-width: 1600px){[logo-type=aoz].sc-stzh-header-h,[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h{--logo-height:3.3125rem}}[logo-type=vbz].sc-stzh-header-h{--logo-height:1.8125rem}@media screen and (min-width: 900px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.3125rem}}@media screen and (min-width: 1600px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.75rem}}.sc-stzh-header-h[logo-type=vbz] .sc-stzh-header-s>[slot=logo]{align-self:center}.sc-stzh-header-h .sc-stzh-header-s>[slot=logo]{width:var(--logo-width);height:var(--logo-height)}.stzh-header.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--stzh-color-grey90)}.stzh-header__inner.sc-stzh-header,.stzh-header__main.sc-stzh-header{max-width:calc(100vw - var(--stzh-scrollbar-width))}@media screen and (min-width: 600px){.stzh-header__inner.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__main.sc-stzh-header{display:flex;flex-direction:column;background-color:var(--stzh-color-white)}@media screen and (max-width: 599px){.stzh-header__main.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__metabar.sc-stzh-header{background-color:var(--stzh-color-coolgrey10)}.stzh-header__metabar-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem;display:flex;align-items:center;height:4rem}@media screen and (min-width: 600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:4rem;margin-right:4rem}}@media screen and (min-width: 1600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:auto;margin-right:auto;max-width:84.25rem}}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{height:4rem}}.stzh-header__burger.sc-stzh-header,.stzh-header__search.sc-stzh-header,.stzh-header__metanav-item.sc-stzh-header{color:var(--stzh-color-grey90);transition:color var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__burger.sc-stzh-header:hover,.stzh-header__search.sc-stzh-header:hover,.stzh-header__metanav-item.sc-stzh-header:hover{color:var(--stzh-color-black)}.stzh-header__burger.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;padding:0;margin-right:var(--stzh-space-medium);gap:var(--stzh-space-medium);color:var(--stzh-color-primary70)}@media screen and (min-width: 600px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__burger-icon.is-open.sc-stzh-header{display:none}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-close.sc-stzh-header{display:none}.stzh-header__metabar-search.sc-stzh-header{overflow:hidden;margin-right:var(--stzh-space-medium);transition-property:width;transition-duration:var(--stzh-base-transition-animation-speed);width:2.5rem;max-width:21.5625rem}.stzh-header__metabar-search.sc-stzh-header:focus-within{width:100%}@media screen and (min-width: 600px){.stzh-header__metabar-search.sc-stzh-header{width:6rem;margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-search.sc-stzh-header{width:10rem;margin-left:0;margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__search.sc-stzh-header{position:relative;display:block;width:100%}.stzh-header__search-input.sc-stzh-header{width:100%;max-width:100%;background-color:transparent;color:transparent;font-family:inherit;font-size:inherit;border:none;padding:var(--stzh-space-xsmall);padding-left:0;padding-right:0;height:var(--stzh-form-input-small-height);transition-property:padding-left, padding-right, background-color, color;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__search-input.sc-stzh-header{color:var(--stzh-color-secondary60);padding-left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}}.stzh-header__search-input.sc-stzh-header:focus{color:var(--stzh-color-secondary60);background-color:var(--stzh-color-white);padding-left:calc(var(--stzh-space-medium) + var(--stzh-icon-size) + var(--stzh-space-medium));padding-right:var(--stzh-space-xlarge)}.stzh-header__search-input.sc-stzh-header:-webkit-autofill{-webkit-background-clip:text;background-clip:text}.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-decoration,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-cancel-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-decoration{-webkit-appearance:none}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-icon.sc-stzh-header,.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{transform:translate(var(--stzh-space-medium), -50%)}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{color:var(--stzh-color-grey70)}.stzh-header__search-text.sc-stzh-header,.stzh-header__search-icon.sc-stzh-header{position:absolute;top:50%;transform:translate(0, -50%);transition:transform var(--stzh-base-transition-animation-speed)}.stzh-header__search-icon.sc-stzh-header{left:0px}@media screen and (max-width: 599px){.stzh-header__search-icon.sc-stzh-header{transform:translate(0.5rem, -50%)}}.stzh-header__search-text.sc-stzh-header{pointer-events:none;left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}@media screen and (max-width: 599px){.stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metabar-nav.sc-stzh-header{display:flex;align-items:center;margin-left:auto;gap:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xxlarge)}}.stzh-header__metanav-popover.sc-stzh-header{--width:auto;--min-width:15.875rem}.stzh-header__metanav-popover.is-langnav.sc-stzh-header{--min-width:8.75rem}.stzh-header__metanav-item.sc-stzh-header{display:none;gap:var(--stzh-space-small);align-items:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;padding:0;border:none;text-decoration:none;font-size:100%;font-family:inherit;white-space:nowrap;min-width:2.5rem}@media screen and (min-width: 900px){.stzh-header__metanav-item.sc-stzh-header{display:flex}}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header{color:var(--stzh-color-primary70)}.stzh-header__metanav-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-item.is-stay.sc-stzh-header{display:flex}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-mobile.sc-stzh-header{display:none}}.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:flex}}.stzh-header__metanav-menu-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-item-text.sc-stzh-header{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-header__metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}@media screen and (max-width: 899px){.stzh-header__metanav-item-text.has-no-short-label.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}@media screen and (max-width: 899px){.stzh-header__metanav-item-text-label-long.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:none}@media screen and (min-width: 600px){.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:flex}}@media screen and (min-width: 900px){.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:none}}.stzh-header__metanav-icon-wrapper.sc-stzh-header{position:relative;display:flex;align-items:center;justify-content:center}.stzh-header__metanav-icon-badge.sc-stzh-header{position:absolute;top:-0.25rem;right:-0.25rem}.stzh-header__metanav-icon.is-open.sc-stzh-header{display:none}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-close.sc-stzh-header{display:none}.stzh-header__logobar.sc-stzh-header{display:flex}@media screen and (min-width: 1600px){.stzh-header__logobar.sc-stzh-header{margin-left:auto;margin-right:auto;width:84.25rem}}.stzh-header__logobar-logo.sc-stzh-header{box-sizing:content-box;display:flex;overflow:hidden;flex-shrink:0}.stzh-header__logobar-decoration.sc-stzh-header{background-color:var(--logobar-background-color);flex-grow:1}@media screen and (min-width: 1600px){.stzh-header__logobar-decoration.sc-stzh-header{width:calc((100% - 34.5625rem) + ((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2));margin-right:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);padding-top:0.875rem;padding-bottom:0.6875rem;padding-left:1.25rem;display:inline-flex;width:18rem;height:4.125rem;transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{width:18.75rem;padding-left:2rem}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{width:24.9375rem;height:5.5rem;padding-top:1.125rem;padding-bottom:1.125rem;padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{width:38.5625rem;height:8.4375rem;padding-top:1.75rem;padding-bottom:1.5rem;padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__logo-link.sc-stzh-header{width:34.5625rem;padding-left:0}}.stzh-header__flyout.sc-stzh-header,.stzh-header__flyout-search.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);z-index:calc(var(--stzh-z-index-header) - 1);position:fixed;visibility:hidden;top:0;left:0;right:0;bottom:0;width:100dvw;height:100dvh;overflow:auto;transition:visibility var(--stzh-base-transition-animation-speed)}@media (min-height: 580px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}@media screen and (min-width: 900px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}.stzh-header__flyout-backdrop.sc-stzh-header{position:absolute;width:100%;height:100%;background-color:var(--stzh-color-black40op);opacity:0;transition:opacity var(--stzh-base-transition-animation-speed)}.stzh-header__menu.sc-stzh-header{position:absolute;width:100%;height:auto;background-color:var(--stzh-color-secondary30);display:grid;grid-template-rows:auto auto;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateX(-100%);opacity:0}@media (min-height: 580px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{width:20.9375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:23.375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:27.4375rem}}@media screen and (min-width: 1600px){.stzh-header__menu.sc-stzh-header{width:calc((27.4375rem - 4rem) + ((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2))}}.stzh-header__menu-nav.sc-stzh-header{position:relative;overflow-x:hidden;overflow-y:hidden}@media (min-height: 580px){.stzh-header__menu-nav.sc-stzh-header{overflow-y:auto}}@media screen and (min-width: 900px){.stzh-header__menu-nav.sc-stzh-header{overflow-y:auto;position:static}}.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xlarge);background-color:var(--stzh-color-secondary20)}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{display:none}}.stzh-header__menu-metanav-nav.sc-stzh-header{max-width:23.4375rem}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.sc-stzh-header{display:block;list-style:none;padding:0;margin:0}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-xxxlarge));padding-bottom:var(--stzh-space-xxxlarge)}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-huge))}}.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{overflow:auto;background-color:var(--stzh-color-secondary20);visibility:hidden;opacity:0;transform:translateX(100%);position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;transition-property:opacity, visibility, transform;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{z-index:initial;width:19.6875rem;transform:none;left:100%;transition-property:opacity, visibility}}@media screen and (min-width: 1260px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:20.875rem}}@media screen and (min-width: 1600px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:21.5625rem}}.stzh-header__menu-list.is-level-2.sc-stzh-header{height:-webkit-max-content;height:-moz-max-content;height:max-content}@media (min-height: 580px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{background-color:var(--stzh-color-secondary30);transform:none;transition-property:opacity, visibility}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-list).sc-stzh-header>.stzh-header__menu-list-item.sc-stzh-header>.stzh-header__menu-list).sc-stzh-header,.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-list).sc-stzh-header>.stzh-header__menu-list-item.sc-stzh-header>.stzh-header__menu-list).sc-stzh-header{transition-delay:var(--stzh-base-transition-animation-speed)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-list.sc-stzh-header{z-index:200;transition-delay:0ms;visibility:visible;opacity:1}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.sc-stzh-header{background-color:var(--stzh-color-secondary40)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.is-level-2.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.is-level-2.sc-stzh-header{background-color:var(--stzh-color-secondary10)}}@media screen and (max-width: 899px){.stzh-header__menu-nav.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open) .stzh-header__menu-nav.sc-stzh-header,.stzh-header__menu-list.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu-metanav-list.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open){transition-property:visibility;transition-duration:0ms;transition-delay:var(--stzh-base-transition-animation-speed);visibility:hidden}}@media screen and (max-width: 899px){.stzh-header__menu-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-list),.stzh-header__menu-metanav-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-metanav-list){transform:translateX(0);opacity:1;visibility:visible}}.stzh-header__menu-list-item.sc-stzh-header,.stzh-header__menu-metanav-list-item.sc-stzh-header{display:grid}.stzh-header__menu-list-item.is-backlink.sc-stzh-header{display:block}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);text-align:left;display:flex;align-items:center;gap:var(--stzh-space-xsmall);-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;text-decoration:none;background-color:transparent;color:var(--stzh-color-primary70);padding-left:var(--stzh-space-xxxlarge);padding-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);padding-right:var(--stzh-space-large);transition-property:color, background-color;transition-duration:var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-size:var(--stzh-font-deci-font-size);line-height:var(--stzh-font-deci-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3.5rem}@media screen and (min-width: 900px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-1.sc-stzh-header{padding-left:calc(((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2))}}@media screen and (min-width: 900px){.stzh-header__menu-item.has-items.sc-stzh-header{cursor:default}}.stzh-header__menu-item.is-level-2.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3rem}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);margin-bottom:var(--stzh-space-medium);padding-top:var(--stzh-space-medium);padding-bottom:var(--stzh-space-small);min-height:none;padding-left:1.25rem;padding-right:1.25rem;gap:var(--stzh-space-xxsmall)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-left:2rem;padding-right:2rem}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{display:none}}.stzh-header__menu-item.is-level-2.is-main.sc-stzh-header{font-size:var(--stzh-font-centi-font-size);line-height:var(--stzh-font-centi-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);margin-bottom:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header{min-height:2.75rem;padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item.is-level-2.sc-stzh-header{min-height:3.5rem;gap:var(--stzh-space-medium);padding-right:var(--stzh-space-xxlarge)}.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);justify-content:space-between;padding-top:0;padding-bottom:0;padding-right:var(--stzh-space-medium);margin-bottom:var(--stzh-space-xlarge);cursor:default}.stzh-header__menu-metanav-item.is-language.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);justify-content:space-between}.stzh-header__menu-metanav-item.is-action.sc-stzh-header{display:grid;padding-right:var(--stzh-space-xxxlarge);margin-top:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-hidden.sc-stzh-header{display:none}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header .stzh-header__menu-metanav-item-icon.sc-stzh-header{--size:var(--stzh-icon-size-small)}.stzh-header__menu-metanav-item-text.sc-stzh-header{display:flex;gap:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__menu-metanav-item-counter.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-header__app-nav.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__app-nav.sc-stzh-header{display:block}}.stzh-header__app-nav-bottom.sc-stzh-header{position:fixed;bottom:0;left:0;width:calc(100vw - var(--stzh-scrollbar-width));z-index:var(--stzh-z-index-header)}@media screen and (min-width: 900px){.stzh-header__app-nav-bottom.sc-stzh-header{display:none}}.stzh-header--is-search-filled.sc-stzh-header .stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header--hide-logo.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:0}@media screen and (min-width: 600px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (min-width: 600px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}@media screen and (max-width: 599px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__logobar.sc-stzh-header{transition-property:opacity, visibility;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform, margin-top;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(0)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(0)}}@media screen and (min-width: 600px) and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__metabar.sc-stzh-header{visibility:hidden}}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__metabar.sc-stzh-header{visibility:hidden}.stzh-header--is-sticky.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:hidden;opacity:0}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__main.sc-stzh-header{margin-top:0px}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:visible;opacity:1}.stzh-header__flyout-search-main.sc-stzh-header{position:absolute;width:100%;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateY(-6.25rem);opacity:0;margin-top:var(--stzh-header-main-height);overflow:auto}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:none;z-index:999;position:absolute;top:0;right:0;bottom:0;width:var(--stzh-scrollbar-width);background-color:var(--stzh-color-grey10);border-left:calc(0.5px * var(--stzh-scrollbar-active)) solid var(--stzh-color-grey30)}@media (min-height: 580px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}@media screen and (min-width: 900px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__menu.sc-stzh-header{opacity:1;transform:translateX(0)}.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search-main.sc-stzh-header{opacity:1;transform:translateX(0)}@media screen and (min-width: 600px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__inner.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}@media screen and (max-width: 599px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__main.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__main.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:1;transition:none}.stzh-header__search-button--is-hidden.sc-stzh-header{display:none}";const p="stzh-header-open";const _=class{constructor(h){e(this,h);this.stzhMetanavItemClick=t(this,"stzhMetanavItemClick",7);this.stzhMetanavItemChildClick=t(this,"stzhMetanavItemChildClick",7);this.stzhMetanavItemButtonClick=t(this,"stzhMetanavItemButtonClick",7);this.stzhMenuItemClick=t(this,"stzhMenuItemClick",7);this.stzhLanguageChange=t(this,"stzhLanguageChange",7);this.stzhSearchChange=t(this,"stzhSearchChange",7);this.stzhSearchChanged=t(this,"stzhSearchChanged",7);this.lastOpener=null;this.flyoutOpenedByMetanavItem=null;this.handleMenuListFocusout=e=>{const t=!e.currentTarget.contains(e.relatedTarget);if(this.isMedium&&t){this.closeMenuItem(false)}};this.handleBurgerClick=async()=>{if(this.flyoutOpenedByMetanavItem){this.flyoutOpenedByMetanavItem=false;this.closeMetanavItem()}else{this.flyoutSearchOpen=false;this.flyoutOpen=!this.flyoutOpen}const e=this.element.querySelector(".stzh-header__menu-item");if(e){window.setTimeout((()=>{e.focus()}),100)}this.updatePosition()};this.handleSearchButtonClick=async()=>{this.flyoutOpen=false;this.flyoutSearchOpen=!this.flyoutSearchOpen;const e=this.element.querySelector(".stzh-search input[type='search']");if(e){window.setTimeout((()=>{e.focus()}),100)}this.updatePosition()};this.handleBackdropClick=async()=>{this.flyoutOpen=false;this.updatePosition()};this.handleBackdropSearchClick=async()=>{this.flyoutSearchOpen=false;this.updatePosition()};this.handleMetanavItemClick=(e,t)=>{this.stzhMetanavItemClick.emit({component:"stzh-header",item:t,originalEvent:e})};this.handleMetanavItemChildClick=(e,t)=>{this.stzhMetanavItemChildClick.emit({component:"stzh-header",itemChild:t,originalEvent:e})};this.handleMetanavItemButtonClick=(e,t)=>{this.stzhMetanavItemButtonClick.emit({component:"stzh-header",itemButton:t,originalEvent:e})};this.handleMenuItemClick=(e,t)=>{this.flyoutOpen=false;this.stzhMenuItemClick.emit({component:"stzh-header",item:t,originalEvent:e})};this.handleSearchInput=e=>{this.searchValue=this.searchInput.value;this.stzhSearchChange.emit({component:"stzh-header",originalEvent:e,value:this.searchValue})};this.handleSearchChange=e=>{this.searchValue=this.searchInput.value;this.stzhSearchChanged.emit({component:"stzh-header",originalEvent:e,value:this.searchValue})};this.handleLanguageClick=(e,t)=>{if(this.languagePreventUrlchange){e.preventDefault()}this.languageActive=t.value;this.stzhLanguageChange.emit({component:"stzh-header",value:this.languageActive})};this.handleFlyoutResize=()=>{this.resizeMenunavElement()};this.handleResize=()=>{if(this.sticky==="disabled"){return}if(this.debounceResize){window.cancelAnimationFrame(this.debounceResize)}this.debounceResize=requestAnimationFrame((()=>{s((()=>{var e,t,s;this.isMedium=o("medium").matches;this.mainHeight=((e=this.mainElement)===null||e===void 0?void 0:e.offsetHeight)||0;this.metabarHeight=((t=this.metabarElement)===null||t===void 0?void 0:t.offsetHeight)||0;this.logobarHeight=((s=this.logobarElement)===null||s===void 0?void 0:s.offsetHeight)||0;this.headerTop=this.element.offsetTop;this.headerHeight=this.metabarHeight+this.logobarHeight}));a((()=>{document.documentElement.style.setProperty("--stzh-header-height",`${this.headerHeight}px`);document.documentElement.style.setProperty("--stzh-header-main-height",`${this.mainHeight}px`);document.documentElement.style.setProperty("--stzh-header-metabar-height",`${this.metabarHeight}px`);document.documentElement.style.setProperty("--stzh-header-logobar-height",`${this.logobarHeight}px`)}));this.scrollListener()}))};this.localization=undefined;this.href="https://www.stadt-zuerich.ch";this.menuId="anchorNavMain";this.searchId="anchorSearch";this.metanavId="anchorNavMeta";this.languageId="anchorNavLang";this.logoType="default";this.menuItems=[];this.menuBackLabel=undefined;this.metanavItems=[];this.userSpecificMetanavItemsNotLoggedIn=[];this.appNavItems=[];this.userSpecificMetanavItemsEndpoint=undefined;this.languageActive=undefined;this.languages=[];this.languagePreventUrlchange=false;this.languageStay=false;this.hideMetabar=false;this.searchAction=undefined;this.searchFieldName="q";this.searchValue="";this.sticky="default";this.loginErrorMessage="";this.logoAnalyticsId=undefined;this.hideLogo=false;this.headerHeight=undefined;this.paddingTop=undefined;this.stickyActive=false;this.flyoutOpen=false;this.flyoutSearchOpen=false;this.searchFilled=undefined;this.fixed=false;this.fixedTransition=false;this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=false;this.userSpecificMetanavItemsLoggedIn=[];this.combinedMetanavItems=[]}handleKeydown(e){if(e.key==="Escape"){this.flyoutOpen=false;this.flyoutSearchOpen=false}}flyoutCloseClicked(){this.flyoutSearchOpen=false;this.updatePosition()}async flyoutOpenWatcher(e){if(!e){this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=null;this.flyoutOpenedByMetanavItem=false;document.body.classList.remove(p);this.enableSiblings();if(this.trap){this.trap.deactivate()}}else{document.body.classList.add(p);this.disableSiblings();if(this.trap){this.trap.activate()}}}async fixedWatcher(){this.paddingTop=this.fixed||this.flyoutOpen||this.flyoutSearchOpen?this.headerHeight:0;await this.waitForNextRender();this.fixedTransition=this.fixed||this.flyoutOpen||this.flyoutSearchOpen}stickyWatcher(){this.updatePosition()}async updatePosition(){if(this.flyoutOpen||this.flyoutSearchOpen){return}const e=()=>{this.stickyActive=true;document.documentElement.style.setProperty("--stzh-header-is-stuck","1");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","0")};const t=()=>{document.documentElement.style.setProperty("--stzh-header-is-stuck","0");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","1");this.stickyActive=false};if(this.sticky==="disabled"){t()}else if(this.sticky==="always-full"){e()}else if(this.sticky==="always"){if(this.belowStayStickyPoint){e()}else{t()}}else{if(this.scrollingUp&&this.belowStayStickyPoint){if(!this.stickyActive&&this.belowStartStickyPoint){e()}}else{if(this.stickyActive&&this.belowStayStickyPoint){t()}else{t()}}}}scrollListener(){if(this.sticky==="disabled"){return}s((()=>{this.currentScrollY=window.scrollY;this.scrollingUp=this.lastScrollY&&this.lastScrollY>this.currentScrollY;this.lastScrollY=this.currentScrollY;this.belowStayStickyPoint=this.currentScrollY>this.logobarHeight;this.belowStartStickyPoint=this.currentScrollY>this.headerHeight;this.fixed=this.belowStartStickyPoint||this.scrollingUp&&this.belowStayStickyPoint&&this.stickyActive||this.sticky==="always"&&this.belowStayStickyPoint||this.sticky==="always-full";this.headerOverlap=(this.headerTop-this.currentScrollY)/-1;this.hideLogo=this.sticky!=="always-full"&&this.isMedium&&this.headerOverlap>1}));a((()=>{this.updatePosition()}))}searchValueWatcher(e){this.searchFilled=e!==""}menuItemsWatcher(e){if(typeof e==="string"){this._menuItems=JSON.parse(e)}else{this._menuItems=e}this._menuItems=this._menuItems.map(((e,t)=>Object.assign({id:`submenu-${t}`},e)))}metanavItemsWatcher(e){if(typeof e==="string"){this._metanavItems=JSON.parse(e)}else{this._metanavItems=e}this._metanavItems=this._metanavItems.map(((e,t)=>Object.assign({id:`metanav-submenu-${t}`},e)))}appNavItemsWatcher(e){if(typeof e==="string"){this._appNavItems=JSON.parse(e)}else{this._appNavItems=e}}userSpecificMetanavItemsNotLoggedInWatcher(e){this._userSpecificMetanavItemsNotLoggedIn=e}languagesWatcher(e){if(typeof e==="string"){this._languages=JSON.parse(e)}else{this._languages=e}}getSiblings(){if(!this._parentElement){return[]}return Array.from(this._parentElement.children).filter((e=>e!==this.element))}disableSiblings(){this.getSiblings().forEach((e=>{e.setAttribute("aria-hidden","true")}))}enableSiblings(){this.getSiblings().forEach((e=>{e.removeAttribute("aria-hidden")}))}waitForNextRender(){return new Promise((e=>this.renderPromiseResolve=e))}resizeMenunavElement(){if(o("headerMetanavSticky").matches||o("medium").matches||!this.openSubmenuElement){Object.assign(this.menunavElement.style,{height:null})}else{const{height:e}=this.openSubmenuElement.getBoundingClientRect();Object.assign(this.menunavElement.style,{height:`${e}px`})}}async openMenuItem(e,t){this.flyoutOpen=true;this.lastOpener=e.currentTarget;this.openSubmenuElement=this.element.querySelector(`#${t.id}`);this.currentOpenMenuItem=t;await this.waitForNextRender();requestAnimationFrame((()=>{this.menunavElement.scrollTop=0;const e=this.openSubmenuElement&&l(this.openSubmenuElement)[0];e===null||e===void 0?void 0:e.focus();this.resizeMenunavElement()}))}async closeMenuItem(e=true){this.openSubmenuElement=null;this.currentOpenMenuItem=null;await this.waitForNextRender();if(e){requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null;this.resizeMenunavElement()}))}}async openMetanavItem(e,t){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=e.currentTarget;this.currentOpenMetanavItem=t;await this.waitForNextRender();requestAnimationFrame((()=>{const e=this.element.querySelector(`#${t.id}`);const s=e&&l(e)[0];s===null||s===void 0?void 0:s.focus()}))}async closeMetanavItem(){this.currentOpenMetanavItem=null;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async openLanguage(e){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=e.currentTarget;this.currentOpenLanguage=true;await this.waitForNextRender();requestAnimationFrame((()=>{const e=this.element.querySelector("#submenu-languages");const t=e&&l(e)[0];t===null||t===void 0?void 0:t.focus()}))}async closeLanguage(){this.currentOpenLanguage=false;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async requestUserSpecificMetanavItems(){if(!this.userSpecificMetanavItemsEndpoint){this.combinedMetanavItems=[...this._metanavItems,...this._userSpecificMetanavItemsNotLoggedIn];return}try{const e=await fetch(this.userSpecificMetanavItemsEndpoint);this.userSpecificMetanavItemsLoggedIn=await e.json();this.combinedMetanavItems=[...this._metanavItems,...this.userSpecificMetanavItemsLoggedIn]}catch(e){this.combinedMetanavItems=[...this._metanavItems,...this._userSpecificMetanavItemsNotLoggedIn];console.error("Error fetching data:",e);if(this.loginErrorMessage){document.querySelector("stzh-toastbar").toast(this.loginErrorMessage,{type:"error"})}}}async componentWillLoad(){this.menuItemsWatcher(this.menuItems);this.metanavItemsWatcher(this.metanavItems);this.appNavItemsWatcher(this.appNavItems);this.languagesWatcher(this.languages);this.searchValueWatcher(this.searchValue);this.userSpecificMetanavItemsNotLoggedInWatcher(this.userSpecificMetanavItemsNotLoggedIn);this.requestUserSpecificMetanavItems();if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"header")}}componentDidRender(){if(this.renderPromiseResolve){this.renderPromiseResolve()}if(this.flyoutElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutElement)}if(this.flyoutSearchElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutSearchElement)}}componentDidLoad(){this.trap=c(this.element,Object.assign(Object.assign({},m()),{initialFocus:false}));this.flyoutResizeObserver=new ResizeObserver(this.handleFlyoutResize);if(this.flyoutElement){this.flyoutResizeObserver.observe(this.flyoutElement)}}connectedCallback(){this._parentElement=this.element.parentElement;this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(this.element)}disconnectedCallback(){var e,t;this.flyoutOpenWatcher(false);(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();(t=this.flyoutResizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){var e,t,s,a,n,o;const l=d(this.element,"metanav-before");const c=d(this.element,"metanav-after");const m={"stzh-header":true,"stzh-header--is-flyout-open":this.flyoutOpen,"stzh-header--is-flyout-search-open":this.flyoutSearchOpen,"stzh-header--is-search-filled":this.searchFilled,"stzh-header--is-fixed":this.fixed,"stzh-header--is-fixed-transition":this.fixedTransition,"stzh-header--is-sticky":this.stickyActive,"stzh-header--is-sticky-transition":this.stickyActive&&this.fixedTransition,"stzh-header--hide-logo":this.hideLogo,"stzh-header--has-empty-metabar-mobile":!l&&!c&&this._metanavItems.filter((e=>e.stay||e.stayAndShowInMobileMenu)).length===0&&this._menuItems.length===0&&(this._languages.length===0||this._languages.length>0&&!this.languageStay)&&!this.searchAction,"stzh-header--has-empty-metabar":!l&&!c&&this._metanavItems.length===0&&this._menuItems.length===0&&this._languages.length===0&&!this.searchAction,[`stzh-header--sticky-${this.sticky}`]:!!this.sticky};const z=this.languageActive||window.stzhComponents.utils.getLocale(this.element);const p=((e=this._languages)===null||e===void 0?void 0:e.find((({value:e})=>e===z)))||((t=this._languages)===null||t===void 0?void 0:t[0])||null;const _=(e,t,s)=>{var a;const i=((a=e.items)===null||a===void 0?void 0:a.length)>0||e.itemButton||!e.href?"button":"a";return h(i,Object.assign({},s,{href:i==="a"&&e.href,target:i==="a"&&e.target,style:{order:e.cssOrder},class:Object.assign({"stzh-header__metanav-item":true,"is-heavy":e.important,"is-stay":e.stay||e.stayAndShowInMobileMenu},t||{})}),h("span",{class:{"stzh-header__metanav-item-text":true,"is-vhidden":e.labelHidden,"has-no-short-label":!e.labelShort}},h("span",{class:"stzh-header__metanav-item-text-label-long"},e.label),h("span",{class:"stzh-header__metanav-item-text-label-short","aria-hidden":"true"},e.labelShort)),e.icon&&h("span",{class:"stzh-header__metanav-icon-wrapper"},e.icon&&h("stzh-icon",{class:`stzh-header__metanav-icon ${e.iconOpen?"is-close":""}`,name:e.icon}),e.iconOpen&&h("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:e.iconOpen}),(e.badge||e.badgeEmpty)&&h("stzh-badge",{class:"stzh-header__metanav-icon-badge",label:e.badge,type:typeof e.badgeType==="undefined"?"error":e.badgeType})))};return h(r,null,h("header",{class:m},h("div",{class:"stzh-header__header",style:{paddingTop:`${this.paddingTop}px`}},this._appNavItems.length>0&&h("div",{class:"stzh-header__app-nav-bottom"},h("stzh-app-nav",{items:this._appNavItems})),h("div",{class:"stzh-header__inner"},h("div",{class:"stzh-header__main",ref:e=>this.mainElement=e},h("div",{class:"stzh-header__logobar",ref:e=>this.logobarElement=e},h("div",{class:"stzh-header__logobar-logo"},h("a",{href:this.href,class:"stzh-header__logo-link","s-object-id":this.logoAnalyticsId||"Header Logo"},h("slot",{name:"logo"}))),h("div",{class:"stzh-header__logobar-decoration"})),!this.hideMetabar&&h("div",{class:"stzh-header__metabar",ref:e=>this.metabarElement=e},h("div",{class:"stzh-header__metabar-inner"},h("slot",{name:"menu-before"}),this._menuItems.length>0&&h("button",{id:this.menuId,class:`stzh-header__burger ${this.flyoutOpen&&!this.flyoutOpenedByMetanavItem&&"is-open"}`,onClick:this.handleBurgerClick},h("stzh-icon",{class:"stzh-header__burger-icon is-close",name:"menu"}),h("stzh-icon",{class:"stzh-header__burger-icon is-open",name:"close"}),h("div",{class:"stzh-header__burger-text"},this.localization.menuLabel)),this.searchAction&&!d(this.element,"search")&&h("form",{class:"stzh-header__metabar-search",action:this.searchAction,role:"search"},h("label",{class:"stzh-header__search"},h("input",{id:this.searchId,ref:e=>this.searchInput=e,class:"stzh-header__search-input",type:"search",name:this.searchFieldName,onChange:this.handleSearchChange,onInput:this.handleSearchInput}),h("stzh-icon",{class:"stzh-header__search-icon",name:"search"}),h("div",{class:"stzh-header__search-text"},this.localization.searchLabel))),d(this.element,"search")&&h("stzh-button",{iconPosition:"left",onClick:this.handleSearchButtonClick,variant:"tertiary-plain",size:"small"},h("stzh-icon",{slot:"icon",name:"search",class:this.flyoutSearchOpen?"stzh-header__search-button--is-hidden":""}),h("stzh-icon",{slot:"icon",name:"close",class:this.flyoutSearchOpen?"":"stzh-header__search-button--is-hidden"}),this.localization.searchLabel),h("slot",{name:"menu-after"}),this._appNavItems.length>0&&h("div",{class:"stzh-header__app-nav"},h("stzh-app-nav",{items:this._appNavItems})),h("div",{class:"stzh-header__metabar-nav",id:this.metanavId},h("slot",{name:"metanav-before"}),this.combinedMetanavItems.map((e=>{var t,s;return((t=e.items)===null||t===void 0?void 0:t.length)>0||e.itemButton?h(i,null,_(e,{"is-popover-mobile":true},{"aria-expanded":e===this.currentOpenMetanavItem?"true":"false","aria-controls":e.id,onClick:t=>{if(e===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(t,e)}this.handleMetanavItemClick(t,e)}}),h("stzh-popover",{class:{"stzh-header__metanav-popover":true},placement:"bottom-end",distance:20,variant:e.variant,size:typeof e.size==="undefined"?"large":e.size},_(e,{"is-popover-desktop":true},{onClick:t=>{this.handleMetanavItemClick(t,e)}}),h("div",{slot:"content"},((s=e.items)===null||s===void 0?void 0:s.length)>0&&h("stzh-menu",null,e.items.map((t=>h("stzh-menu-item",{class:{"stzh-header__metanav-menu-item":true,"is-heavy":typeof e.importantSubmenu==="undefined"||e.importantSubmenu},size:typeof e.size==="undefined"?"large":e.size,variant:e.variant,href:t.href,target:t.target,icon:t.icon,counter:t.counter,badge:t.badge,badgeType:t.badgeType,onClick:e=>{this.handleMetanavItemChildClick(e,t)}},t.label))))),e.itemButton&&h("stzh-button",{slot:"action",size:e.itemButton.size,href:e.itemButton.href,target:e.itemButton.target,onClick:t=>{this.handleMetanavItemButtonClick(t,e.itemButton)}},e.itemButton.label))):_(e,{},{onClick:t=>{this.handleMetanavItemClick(t,e)}})})),((s=this._languages)===null||s===void 0?void 0:s.length)>0&&h(i,null,h("h2",{id:this.languageId,class:"stzh-header__vhidden"},this.localization.languageLabel),this._menuItems.length>0&&this.languageStay&&h("button",{class:{"stzh-header__metanav-item":true,"is-popover-mobile":true,"is-stay":this.languageStay},"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",onClick:e=>{if(this.currentOpenLanguage){this.closeLanguage()}else{this.openLanguage(e)}}},h("span",{class:"stzh-header__metanav-item-text"},p===null||p===void 0?void 0:p.text),h("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),h("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),h("stzh-popover",{class:"stzh-header__metanav-popover is-langnav",placement:"bottom-end",distance:20},h("button",{class:{"stzh-header__metanav-item":true,"is-popover-desktop":this._menuItems.length>0,"is-stay":this.languageStay}},h("span",{class:"stzh-header__metanav-item-text"},p===null||p===void 0?void 0:p.text),h("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),h("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),h("div",{slot:"content"},h("stzh-menu",null,this._languages.map((e=>h("stzh-menu-item",{class:"stzh-header__metanav-menu-item",active:(p===null||p===void 0?void 0:p.value)===e.value,href:e.value,onClick:t=>this.handleLanguageClick(t,e)},e.text))))))),h("slot",{name:"metanav-after"}))))))),this._menuItems.length>0&&h("div",{ref:e=>this.flyoutElement=e,class:"stzh-header__flyout"},h("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropClick}),h("div",{class:"stzh-header__flyout-scrollbar"}),h("div",{class:"stzh-header__menu"},h("nav",{class:"stzh-header__menu-nav",ref:e=>this.menunavElement=e,"aria-label":this.localization.navigationLabel},h("ul",{class:"stzh-header__menu-list is-level-1"},this._menuItems.map((e=>{var t,s;return h("li",{class:{"stzh-header__menu-list-item":true,"is-open":e===this.currentOpenMenuItem}},((t=e.items)===null||t===void 0?void 0:t.length)>0?h("button",{"aria-expanded":e===this.currentOpenMenuItem?"true":"false","aria-controls":e.id,class:"stzh-header__menu-item is-level-1 has-items",onClick:e===this.currentOpenMenuItem?()=>this.closeMenuItem():t=>this.openMenuItem(t,e)},e.label):h("a",{href:e.href,onClick:t=>this.handleMenuItemClick(t,e),class:"stzh-header__menu-item is-level-1"},e.label),((s=e.items)===null||s===void 0?void 0:s.length)>0&&h("ul",{id:e.id,class:"stzh-header__menu-list is-level-2",onFocusout:this.handleMenuListFocusout},h("li",{class:"stzh-header__menu-list-item is-backlink"},h("button",{class:"stzh-header__menu-item is-level-2 is-backlink",onClick:()=>this.closeMenuItem()},h("stzh-icon",{name:"angle-left"}),h("span",null,this.menuBackLabel?this.menuBackLabel:this.localization.menuBackLabel))),h("li",{class:"stzh-header__menu-list-item"},h("a",{href:e.href,onClick:t=>this.handleMenuItemClick(t,e),class:"stzh-header__menu-item is-level-2 is-main"},e.label)),e.items.map((e=>h("li",{class:"stzh-header__menu-list-item"},h("a",{href:e.href,onClick:t=>this.handleMenuItemClick(t,e),class:"stzh-header__menu-item is-level-2"},e.label))))))})))),(((a=this.combinedMetanavItems)===null||a===void 0?void 0:a.length)>0||((n=this._languages)===null||n===void 0?void 0:n.length)>0)&&h("div",{class:"stzh-header__menu-metanav"},h("nav",{class:"stzh-header__menu-metanav-nav"},h("ul",{class:"stzh-header__menu-metanav-list is-level-1"},this.combinedMetanavItems.map((e=>{var t,s,a;return h("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":e===this.currentOpenMetanavItem}},((t=e.items)===null||t===void 0?void 0:t.length)>0?h("button",{"aria-expanded":e===this.currentOpenMetanavItem?"true":"false","aria-controls":e.id,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":e.stay&&!e.stayAndShowInMobileMenu},onClick:t=>{if(e===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(t,e)}this.handleMetanavItemClick(t,e)}},h("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":e.labelHidden}},e.label),e.icon&&h("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:e.icon})):h("a",{href:e.href,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":e.stay&&!e.stayAndShowInMobileMenu},onClick:t=>{this.handleMetanavItemClick(t,e)}},h("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":e.labelHidden}},e.label),e.icon&&h("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:e.icon})),((s=e.items)===null||s===void 0?void 0:s.length)>0&&h("ul",{id:e.id,class:"stzh-header__menu-metanav-list is-level-2"},h("li",{class:"stzh-header__menu-metanav-list-item"},h("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},h("span",null,e.label),h("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:(a=this.localization.closeMetanavMenuLabel)===null||a===void 0?void 0:a.replace(/\{itemLabel\}/gi,e.label),onClick:()=>this.closeMetanavItem()}))),e.items.map((e=>h("li",{class:"stzh-header__menu-metanav-list-item"},h("a",{href:e.href,class:"stzh-header__menu-metanav-item is-level-2"},e.icon&&h("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:e.icon}),h("span",{class:"stzh-header__menu-metanav-item-text"},h("span",null,e.label),e.counter&&h("span",{class:"stzh-header__menu-metanav-item-counter"},"(",e.counter,")")))))),e.itemButton&&h("li",{class:"stzh-header__menu-metanav-list-item"},h("div",{class:"stzh-header__menu-metanav-item is-level-2 is-action"},h("stzh-button",{href:e.itemButton.href,target:e.itemButton.target},e.itemButton.label)))))})),((o=this._languages)===null||o===void 0?void 0:o.length)>0&&h("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":this.currentOpenLanguage}},h("button",{"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",class:"stzh-header__menu-metanav-item is-level-1",onClick:e=>this.openLanguage(e)},h("span",null,p===null||p===void 0?void 0:p.text),h("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"angle-down"})),h("ul",{id:"submenu-languages",class:"stzh-header__menu-metanav-list is-level-2"},h("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},h("span",null,this.localization.dialogLanguageTitle),h("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:"Sprach-Dialog schliessen",onClick:()=>this.closeLanguage()})),this._languages.map((e=>h("li",{class:"stzh-header__menu-metanav-list-item"},h("a",{class:"stzh-header__menu-metanav-item is-level-2 is-language",href:e.value,onClick:t=>this.handleLanguageClick(t,e)},h("span",null,e.text),(p===null||p===void 0?void 0:p.value)===e.value&&h("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"checkmark"})))))))))))),d(this.element,"search")&&h("div",{ref:e=>this.flyoutSearchElement=e,class:"stzh-header__flyout-search"},h("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropSearchClick}),h("div",{class:"stzh-header__flyout-scrollbar"}),h("div",{class:"stzh-header__flyout-search-main"},h("slot",{name:"search"})))))}get element(){return n(this)}static get watchers(){return{flyoutOpen:["flyoutOpenWatcher","fixedWatcher"],flyoutSearchOpen:["flyoutOpenWatcher","fixedWatcher"],fixed:["fixedWatcher"],headerHeight:["fixedWatcher"],sticky:["stickyWatcher"],searchValue:["searchValueWatcher"],menuItems:["menuItemsWatcher"],metanavItems:["metanavItemsWatcher"],appNavItems:["appNavItemsWatcher"],userSpecificMetanavItemsNotLoggedIn:["userSpecificMetanavItemsNotLoggedInWatcher"],languages:["languagesWatcher"]}}};_.style=z;export{_ as stzh_header};
|
|
2
|
-
//# sourceMappingURL=p-16581003.entry.js.map
|