@swisspost/internet-header 1.13.6 → 1.13.8
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/index.cjs.js +9 -9
- package/dist/cjs/{post-internet-breadcrumbs-71c383de.js → post-internet-breadcrumbs-d8a0a3e6.js} +1 -1
- package/dist/cjs/{post-internet-footer-e3a15ab7.js → post-internet-footer-3e114492.js} +1 -1
- package/dist/cjs/{post-internet-header-89fcf8d8.js → post-internet-header-c487fe28.js} +4 -4
- package/dist/cjs/{post-klp-login-widget-31b98b93.js → post-klp-login-widget-7a867072.js} +1 -1
- package/dist/cjs/post-klp-login-widget.cjs.entry.js +1 -1
- package/dist/cjs/{post-language-switch-4900ac90.js → post-language-switch-89769c16.js} +1 -1
- package/dist/cjs/post-language-switch.cjs.entry.js +1 -1
- package/dist/cjs/{post-logo-332fe8e5.js → post-logo-0b0d8277.js} +1 -1
- package/dist/cjs/post-logo.cjs.entry.js +1 -1
- package/dist/cjs/{post-main-navigation-c09a6d09.js → post-main-navigation-05ac62f4.js} +2 -2
- package/dist/cjs/post-main-navigation.cjs.entry.js +1 -1
- package/dist/cjs/{post-meta-navigation-231a7351.js → post-meta-navigation-19db7f19.js} +1 -1
- package/dist/cjs/post-meta-navigation.cjs.entry.js +1 -1
- package/dist/cjs/post-search-afd1abf7.js +596 -0
- package/dist/cjs/post-search.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.css +1 -1
- package/dist/collection/components/post-internet-footer/post-internet-footer.css +1 -1
- package/dist/collection/components/post-internet-header/post-internet-header.css +1 -1
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-main-navigation/post-main-navigation.css +1 -1
- package/dist/collection/components/post-main-navigation/post-main-navigation.js +1 -1
- package/dist/collection/components/post-meta-navigation/post-meta-navigation.css +1 -1
- package/dist/collection/components/post-search/post-search.css +4 -4
- package/dist/components/post-klp-login-widget2.js +1 -1
- package/dist/components/post-language-switch2.js +1 -1
- package/dist/components/post-logo2.js +1 -1
- package/dist/components/post-main-navigation2.js +2 -2
- package/dist/components/post-meta-navigation2.js +1 -1
- package/dist/components/post-search2.js +1 -1
- package/dist/components/swisspost-internet-breadcrumbs.js +1 -1
- package/dist/components/swisspost-internet-footer.js +1 -1
- package/dist/components/swisspost-internet-header.js +4 -4
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +9 -9
- package/dist/esm/{post-internet-breadcrumbs-d8e2ba4e.js → post-internet-breadcrumbs-959c559a.js} +1 -1
- package/dist/esm/{post-internet-footer-18fbbb39.js → post-internet-footer-f4dcfb3b.js} +1 -1
- package/dist/esm/{post-internet-header-e55f3d07.js → post-internet-header-3ed27a33.js} +4 -4
- package/dist/esm/{post-klp-login-widget-9724347f.js → post-klp-login-widget-519b9ac3.js} +1 -1
- package/dist/esm/post-klp-login-widget.entry.js +1 -1
- package/dist/esm/{post-language-switch-def60b07.js → post-language-switch-f436d101.js} +1 -1
- package/dist/esm/post-language-switch.entry.js +1 -1
- package/dist/esm/{post-logo-5b8e8cfc.js → post-logo-9dbcf2ba.js} +1 -1
- package/dist/esm/post-logo.entry.js +1 -1
- package/dist/esm/{post-main-navigation-c528a0a0.js → post-main-navigation-9fd0b55a.js} +2 -2
- package/dist/esm/post-main-navigation.entry.js +1 -1
- package/dist/esm/{post-meta-navigation-23dc95be.js → post-meta-navigation-8820113b.js} +1 -1
- package/dist/esm/post-meta-navigation.entry.js +1 -1
- package/dist/esm/post-search-cf91f27a.js +594 -0
- package/dist/esm/post-search.entry.js +1 -1
- package/dist/esm/swisspost-internet-breadcrumbs.entry.js +1 -1
- package/dist/esm/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{post-internet-breadcrumbs-d8e2ba4e.js → post-internet-breadcrumbs-959c559a.js} +1 -1
- package/dist/esm-es5/{post-internet-footer-18fbbb39.js → post-internet-footer-f4dcfb3b.js} +1 -1
- package/dist/esm-es5/post-internet-header-3ed27a33.js +1 -0
- package/dist/esm-es5/{post-klp-login-widget-9724347f.js → post-klp-login-widget-519b9ac3.js} +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
- package/dist/esm-es5/{post-language-switch-def60b07.js → post-language-switch-f436d101.js} +1 -1
- package/dist/esm-es5/post-language-switch.entry.js +1 -1
- package/dist/esm-es5/{post-logo-5b8e8cfc.js → post-logo-9dbcf2ba.js} +1 -1
- package/dist/esm-es5/post-logo.entry.js +1 -1
- package/dist/esm-es5/{post-main-navigation-c528a0a0.js → post-main-navigation-9fd0b55a.js} +1 -1
- package/dist/esm-es5/post-main-navigation.entry.js +1 -1
- package/dist/esm-es5/{post-meta-navigation-23dc95be.js → post-meta-navigation-8820113b.js} +1 -1
- package/dist/esm-es5/post-meta-navigation.entry.js +1 -1
- package/dist/esm-es5/post-search-cf91f27a.js +1 -0
- package/dist/esm-es5/post-search.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/swisspost-internet-header/index.esm.js +1 -1
- package/dist/swisspost-internet-header/{p-f7559ce9.system.entry.js → p-041d7100.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-13332cc8.entry.js +1 -0
- package/dist/swisspost-internet-header/p-193b3962.js +1 -0
- package/dist/swisspost-internet-header/p-1cac596c.system.js +1 -0
- package/dist/swisspost-internet-header/{p-7ab28a16.system.js → p-1efced4f.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-f7cdbcbc.js → p-2180a93f.js} +1 -1
- package/dist/swisspost-internet-header/{p-26a93bac.entry.js → p-25add306.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-5a42143f.js → p-2a288ef4.js} +1 -1
- package/dist/swisspost-internet-header/p-328af556.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-294e99d0.js → p-35d3c0e2.js} +1 -1
- package/dist/swisspost-internet-header/p-3d03ece0.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-206de571.entry.js → p-3ff4fe31.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-425336ef.js +1 -0
- package/dist/swisspost-internet-header/{p-3d473c41.system.js → p-458bd664.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-3f76d841.system.entry.js → p-466371f3.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-65a2792c.system.js → p-4f978679.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-957fe503.js → p-50db8a7b.js} +1 -1
- package/dist/swisspost-internet-header/{p-43e357cd.system.entry.js → p-541bd306.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-58d1f7cd.system.js +1 -0
- package/dist/swisspost-internet-header/{p-527eab14.js → p-82cac3b9.js} +1 -1
- package/dist/swisspost-internet-header/{p-fc297f9c.js → p-925f5e31.js} +1 -1
- package/dist/swisspost-internet-header/{p-c7011aad.system.js → p-95753443.system.js} +1 -1
- package/dist/swisspost-internet-header/p-9a06a83e.entry.js +1 -0
- package/dist/swisspost-internet-header/{p-49f730ed.entry.js → p-ae3759d0.entry.js} +1 -1
- package/dist/swisspost-internet-header/p-af355dbc.system.js +1 -1
- package/dist/swisspost-internet-header/{p-cfb10f27.system.entry.js → p-bac2d2ca.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-9e36611e.js → p-bbd5ae03.js} +1 -1
- package/dist/swisspost-internet-header/{p-baad5e09.system.entry.js → p-bfb5f92f.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-75f53ec8.entry.js → p-c47dfca4.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-57309b47.entry.js → p-ce698eb4.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-75f16d36.system.js → p-d3f4cffd.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-1d0456c9.system.js → p-d48da09e.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-31dffcf2.system.entry.js → p-d91c7eb7.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-1332591a.system.js → p-de624726.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-bdc59edc.system.entry.js → p-e0f54a55.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-4864d70d.system.entry.js → p-e7934b4e.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-a0d6839b.system.entry.js → p-ecb3a8d3.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-e59ec9c0.system.js → p-f77d823e.system.js} +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.css +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/package.json +3 -3
- package/readme.md +1 -1
- package/dist/cjs/post-search-8989b949.js +0 -596
- package/dist/esm/post-search-25648398.js +0 -594
- package/dist/esm-es5/post-internet-header-e55f3d07.js +0 -1
- package/dist/esm-es5/post-search-25648398.js +0 -1
- package/dist/swisspost-internet-header/p-0baac965.entry.js +0 -1
- package/dist/swisspost-internet-header/p-319a5cd5.entry.js +0 -1
- package/dist/swisspost-internet-header/p-3910ad50.entry.js +0 -1
- package/dist/swisspost-internet-header/p-51ea35f9.system.js +0 -1
- package/dist/swisspost-internet-header/p-76e9adc7.entry.js +0 -1
- package/dist/swisspost-internet-header/p-8e0cf2c4.js +0 -1
- package/dist/swisspost-internet-header/p-a4ff5fa2.js +0 -1
- package/dist/swisspost-internet-header/p-b54b4016.system.js +0 -1
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-cab594bc.js');
|
|
4
|
+
const index$1 = require('./index-3216e4c8.js');
|
|
5
|
+
const bodyScrollLock_esm = require('./bodyScrollLock.esm-59f17217.js');
|
|
6
|
+
const store = require('./store-9f3cc50a.js');
|
|
7
|
+
const ui_service = require('./ui.service-7334148b.js');
|
|
8
|
+
const svgSprite_component = require('./svg-sprite.component-6d4865e1.js');
|
|
9
|
+
const svgIcon_component = require('./svg-icon.component-980da2bc.js');
|
|
10
|
+
const if_component = require('./if.component-31542061.js');
|
|
11
|
+
const language_service = require('./language.service-94409b3d.js');
|
|
12
|
+
|
|
13
|
+
let parcelController;
|
|
14
|
+
// https://www.post.ch/api/trackandtrace?id=99.00.306600.01004883
|
|
15
|
+
// Track and trace URL
|
|
16
|
+
const getTrackAndTraceApiUrl = (id) => {
|
|
17
|
+
const lang = store.state.currentLanguage;
|
|
18
|
+
return `https://www.post.ch/${lang}/api/trackandtrace?id=${encodeURIComponent(id)}`;
|
|
19
|
+
};
|
|
20
|
+
// Get the redire
|
|
21
|
+
const getTrackAndTraceRedirectUrl = (query, { packageTrackingRedirectUrl }) => {
|
|
22
|
+
return packageTrackingRedirectUrl.replace('{trackingNumber}', encodeURIComponent(query));
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check whether a query is a tracking id
|
|
26
|
+
*
|
|
27
|
+
* @param query User query
|
|
28
|
+
* @returns Boolean
|
|
29
|
+
*/
|
|
30
|
+
const isParcel = async (query, searchConfig) => {
|
|
31
|
+
const parcelInfo = await getParcelInfo(query, searchConfig);
|
|
32
|
+
return 'sending' in parcelInfo;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Try to get parcel info from a query that is possibly a tracking id.
|
|
36
|
+
* This is mainly used to check if a search should redirect to track&trace instead of the regular search.
|
|
37
|
+
*
|
|
38
|
+
* @param query User query that is possibly a tracking number
|
|
39
|
+
* @returns Track and trace info
|
|
40
|
+
*/
|
|
41
|
+
const getParcelInfo = async (query, { redirectPattern }) => {
|
|
42
|
+
const trackingNrPattern = new RegExp(redirectPattern);
|
|
43
|
+
if (trackingNrPattern.test(query)) {
|
|
44
|
+
const url = getTrackAndTraceApiUrl(query);
|
|
45
|
+
if (parcelController)
|
|
46
|
+
parcelController.abort();
|
|
47
|
+
parcelController = new AbortController();
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
fetch(url, { signal: parcelController.signal })
|
|
50
|
+
.then(response => response.json())
|
|
51
|
+
.then((trackAndTraceResult) => {
|
|
52
|
+
resolve(Object.assign(Object.assign({}, trackAndTraceResult), { ok: trackAndTraceResult.ok }));
|
|
53
|
+
})
|
|
54
|
+
.catch(error => {
|
|
55
|
+
if (error.name !== 'AbortError') {
|
|
56
|
+
console.error(`Could not check track and trace API due to error: ${error.message}`);
|
|
57
|
+
reject(error);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return { ok: false, timestamp: new Date().toDateString() };
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Get parcel info if query is a parcel or null
|
|
66
|
+
*
|
|
67
|
+
* @param query Parcel id
|
|
68
|
+
* @returns Parcel info and a redirect url or null if not a parcel
|
|
69
|
+
*/
|
|
70
|
+
const getParcelSuggestion = async (query, searchConfig) => {
|
|
71
|
+
const parcelInfo = await getParcelInfo(query, searchConfig);
|
|
72
|
+
return parcelInfo.ok
|
|
73
|
+
? Object.assign(Object.assign({}, parcelInfo), { url: getTrackAndTraceRedirectUrl(query, searchConfig) }) : null;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Construct a search page url from a query
|
|
78
|
+
*
|
|
79
|
+
* @param query Search term
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
const getSearchRedirectUrl = async (query, searchConfig) => {
|
|
83
|
+
const isTrackTraceId = await isParcel(query, searchConfig);
|
|
84
|
+
return isTrackTraceId
|
|
85
|
+
? getTrackAndTraceRedirectUrl(query, searchConfig)
|
|
86
|
+
: getSearchPageUrl(query);
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Stitch toghether the search page URL
|
|
90
|
+
*
|
|
91
|
+
* @param query Search term
|
|
92
|
+
* @returns Search page URL
|
|
93
|
+
*/
|
|
94
|
+
const getSearchPageUrl = (query) => {
|
|
95
|
+
var _a;
|
|
96
|
+
if (((_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header.search) === undefined) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const { searchPageUrl } = store.state.localizedConfig.header.search;
|
|
100
|
+
const searchParam = `#q=${encodeURIComponent(query)}`;
|
|
101
|
+
return `${searchPageUrl}${searchParam}&t=AllTab`;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Equalize the length of two arrays while filling up empty slots up to max. length
|
|
105
|
+
*
|
|
106
|
+
* @param arrayA First array
|
|
107
|
+
* @param arrayB Second array
|
|
108
|
+
* @param maxLength Max. length of result array
|
|
109
|
+
* @returns Array with two resulting arrays
|
|
110
|
+
*/
|
|
111
|
+
const equalizeArrays = (arrayA, arrayB, maxLength = 7) => {
|
|
112
|
+
const coveoSliced = arrayA.slice(0, Math.max(maxLength / 2, maxLength - arrayB.length));
|
|
113
|
+
return [coveoSliced, arrayB.slice(0, maxLength - coveoSliced.length)];
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// Coveo constants
|
|
117
|
+
const coveo = {
|
|
118
|
+
url: 'https://platform-eu.cloud.coveo.com/rest/search/v2/querySuggest',
|
|
119
|
+
environment: {
|
|
120
|
+
prod: {
|
|
121
|
+
organisation: 'postchagprod6ef4sbet',
|
|
122
|
+
token: 'xx5b629890-23b9-4fbe-b601-0e8719186969',
|
|
123
|
+
},
|
|
124
|
+
int01: {
|
|
125
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
126
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
127
|
+
},
|
|
128
|
+
int02: {
|
|
129
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
130
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
131
|
+
},
|
|
132
|
+
dev01: {
|
|
133
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
134
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
135
|
+
},
|
|
136
|
+
dev02: {
|
|
137
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
138
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
139
|
+
},
|
|
140
|
+
devs1: {
|
|
141
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
142
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
143
|
+
},
|
|
144
|
+
test: {
|
|
145
|
+
organisation: 'postchagnonprods5sq57qt',
|
|
146
|
+
token: 'xx7c0e52ab-3de2-4fbd-b9a7-6ca6abd532b4',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
let suggestionsController;
|
|
152
|
+
/**
|
|
153
|
+
* Get suggestions from coveo
|
|
154
|
+
* https://docs.coveo.com/en/1459/build-a-search-ui/get-query-suggestions#context-object
|
|
155
|
+
*
|
|
156
|
+
* @param query Search term
|
|
157
|
+
* @returns
|
|
158
|
+
*/
|
|
159
|
+
const getCoveoSuggestions = async (query) => {
|
|
160
|
+
var _a, _b, _c, _d;
|
|
161
|
+
if (((_b = (_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.search) === undefined ||
|
|
162
|
+
((_d = (_c = store.state.localizedConfig) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.search.isCustomSuggestionHidden) === true)
|
|
163
|
+
return [];
|
|
164
|
+
const config = store.state.localizedConfig.header.search;
|
|
165
|
+
const { token, organisation } = coveo.environment[store.state.environment];
|
|
166
|
+
const url = `${coveo.url}?q=${query}&locale=${store.state.currentLanguage}&searchHub=${config.searchHubName}&pipeline=${config.searchPipelineName}&organizationId=${organisation}`;
|
|
167
|
+
if (suggestionsController)
|
|
168
|
+
suggestionsController.abort();
|
|
169
|
+
suggestionsController = new AbortController();
|
|
170
|
+
return new Promise((resolve, reject) => {
|
|
171
|
+
fetch(url, {
|
|
172
|
+
signal: suggestionsController.signal,
|
|
173
|
+
method: 'GET',
|
|
174
|
+
headers: {
|
|
175
|
+
Authorization: `Bearer ${token}`,
|
|
176
|
+
},
|
|
177
|
+
})
|
|
178
|
+
.then(response => response.json())
|
|
179
|
+
.then((coveoJSON) => {
|
|
180
|
+
resolve(coveoJSON.completions.map(completion => (Object.assign(Object.assign({}, completion), { redirectUrl: getSearchPageUrl(completion.expression) }))));
|
|
181
|
+
})
|
|
182
|
+
.catch(error => {
|
|
183
|
+
if (error.name !== 'AbortError') {
|
|
184
|
+
console.error(`Fetching coveo suggestions failed, ${error}\nDid you add "*.coveo.com" to your connect-src content security policy and tried turning off your adblocker?`);
|
|
185
|
+
reject(error);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Implement some TOPOS logic into the header search
|
|
192
|
+
const gisAPIUrl = 'https://places.post.ch/StandortSuche/StaoCacheService';
|
|
193
|
+
const placesUrl = 'https://places.post.ch';
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Transform to lowercase, extract accents to separate unicode chars,
|
|
197
|
+
* replace all accent unicode chars so only standard latin chars remain
|
|
198
|
+
* https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
|
|
199
|
+
*
|
|
200
|
+
* @param str Input string
|
|
201
|
+
* @returns
|
|
202
|
+
*/
|
|
203
|
+
const hardNormalize = (str) => str
|
|
204
|
+
.toLowerCase()
|
|
205
|
+
.normalize('NFD')
|
|
206
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
207
|
+
|
|
208
|
+
let placesController;
|
|
209
|
+
/**
|
|
210
|
+
* Query the Gis API for locations and localities (pois)
|
|
211
|
+
*
|
|
212
|
+
* @param query User input string
|
|
213
|
+
* @returns
|
|
214
|
+
*/
|
|
215
|
+
const queryPlaces = async (query) => {
|
|
216
|
+
if (query.length === 0) {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
const searchParameters = Object.entries({
|
|
220
|
+
query: encodeURIComponent(query),
|
|
221
|
+
lang: store.state.currentLanguage,
|
|
222
|
+
limit: 7,
|
|
223
|
+
}).reduce((s, [k, v], i) => `${s}${i === 0 ? '?' : '&'}${k}=${v}`, '');
|
|
224
|
+
const url = `${gisAPIUrl}/Geocode${searchParameters}`;
|
|
225
|
+
if (placesController)
|
|
226
|
+
placesController.abort();
|
|
227
|
+
placesController = new AbortController();
|
|
228
|
+
return new Promise((resolve, reject) => {
|
|
229
|
+
fetch(url, { signal: placesController.signal })
|
|
230
|
+
.then(response => response.json())
|
|
231
|
+
.then((geocodeJSON) => {
|
|
232
|
+
if (!geocodeJSON.ok)
|
|
233
|
+
throw new Error(geocodeJSON.info);
|
|
234
|
+
resolve(geocodeJSON.locations);
|
|
235
|
+
})
|
|
236
|
+
.catch(error => {
|
|
237
|
+
if (error.name !== 'AbortError') {
|
|
238
|
+
console.error(`Fetching places failed, ${error}\nDid you add "places.post.ch" to your connect-src content security policy?`);
|
|
239
|
+
reject(error);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Try to highlight place suggestions
|
|
246
|
+
* Limitation: accented chars are not handled by this basic function
|
|
247
|
+
*
|
|
248
|
+
* @param query Search term
|
|
249
|
+
* @param place Name of the suggested place
|
|
250
|
+
* @returns
|
|
251
|
+
*/
|
|
252
|
+
const highlightPlacesString = (query, place) => {
|
|
253
|
+
if (query === undefined)
|
|
254
|
+
return place;
|
|
255
|
+
// Strip accents from the string
|
|
256
|
+
const reference = hardNormalize(place);
|
|
257
|
+
const q = hardNormalize(query);
|
|
258
|
+
const indexOfQuery = reference.indexOf(q);
|
|
259
|
+
if (indexOfQuery < 0) {
|
|
260
|
+
return place;
|
|
261
|
+
}
|
|
262
|
+
return `${place.substring(0, indexOfQuery)}{${place.substring(indexOfQuery, indexOfQuery + query.length)}}${place.substring(indexOfQuery + query.length, place.length)}`;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Get the deeplink to any location found via geocoder
|
|
266
|
+
*
|
|
267
|
+
* @param location A location from the Gis API Geocode endpoint
|
|
268
|
+
* @returns
|
|
269
|
+
*/
|
|
270
|
+
const getPlacesUrl = (location) => {
|
|
271
|
+
let url;
|
|
272
|
+
if (location.id) {
|
|
273
|
+
url = `${placesUrl}/${store.state.currentLanguage}/${location.id}/detail`;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
url = `${placesUrl}?preselecttext=${encodeURIComponent(location.name)}`;
|
|
277
|
+
}
|
|
278
|
+
return url;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const HighlightedText = (props) => {
|
|
282
|
+
var _a;
|
|
283
|
+
const highlightClass = (_a = props.highlightClass) !== null && _a !== void 0 ? _a : 'bold';
|
|
284
|
+
const highlightedString = props.text
|
|
285
|
+
.replace(/[{(]/g, `<span class="${highlightClass}">`)
|
|
286
|
+
.replace(/[})]/g, '</span>')
|
|
287
|
+
.replace(/[\[\]]/g, '');
|
|
288
|
+
return index.h("span", { innerHTML: highlightedString });
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
const postSearchCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n *//*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.form-label{margin-bottom:.5rem;color:var(--post-contrast-color)}.col-form-label{padding-top:calc(0.875rem + 2px);padding-bottom:calc(0.875rem + 2px);margin-bottom:0;font-size:inherit;line-height:1.5;color:var(--post-contrast-color)}.col-form-label-lg{padding-top:calc(0.6875rem + 2px);padding-bottom:calc(0.6875rem + 2px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(0.375rem + 2px);padding-bottom:calc(0.375rem + 2px);font-size:0.875rem}.form-text{margin-top:.25rem;font-size:0.8125rem;color:var(--post-contrast-color)}.form-control{display:block;width:100%;padding:.875rem 1.125rem;font-size:1rem;font-weight:400;line-height:1.5;color:#000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-clip:padding-box;border:2px solid #666;border-radius:0;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}@media (prefers-reduced-motion: reduce){.form-control{-webkit-transition:none;transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#000;background-color:#fff;border-color:var(--post-contrast-color-rgb);outline:0;-webkit-box-shadow:0 0 0 .125rem rgba(var(--post-contrast-color-rgb), 0.25);box-shadow:0 0 0 .125rem rgba(var(--post-contrast-color-rgb), 0.25)}.form-control::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit{display:block;padding:0}.form-control::-webkit-input-placeholder{color:#666;opacity:1}.form-control::-moz-placeholder{color:#666;opacity:1}.form-control:-ms-input-placeholder{color:#666;opacity:1}.form-control::-ms-input-placeholder{color:#666;opacity:1}.form-control::placeholder{color:#666;opacity:1}.form-control:disabled{color:rgba(var(--post-contrast-color-rgb), 0.6);background-color:rgba(var(--post-contrast-color-inverted-rgb), 0.6);border-color:#999;opacity:1}.form-control::-webkit-file-upload-button{padding:.875rem 1.125rem;margin:-0.875rem -1.125rem;-webkit-margin-end:1.125rem;margin-inline-end:1.125rem;color:#000;background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:2px;border-radius:0;-webkit-transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.form-control::file-selector-button{padding:.875rem 1.125rem;margin:-0.875rem -1.125rem;-webkit-margin-end:1.125rem;margin-inline-end:1.125rem;color:#000;background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:2px;border-radius:0;-webkit-transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}@media (prefers-reduced-motion: reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#fff}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#fff}.form-control-plaintext{display:block;width:100%;padding:.875rem 0;margin-bottom:0;line-height:1.5;color:var(--post-contrast-color);background-color:rgba(0,0,0,0);border:solid rgba(0,0,0,0);border-width:2px 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-sm,.form-control-plaintext.form-control-lg,.form-floating>.form-control-plaintext.form-control,.form-floating>.form-control-plaintext.form-select{padding-right:0;padding-left:0}.form-control-sm{min-height:2rem;padding:.375rem .75rem;font-size:0.875rem;border-radius:0}.form-control-sm::-webkit-file-upload-button{padding:.375rem .75rem;margin:-0.375rem -0.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem}.form-control-sm::file-selector-button{padding:.375rem .75rem;margin:-0.375rem -0.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem}.form-control-lg,.form-floating>.form-control,.form-floating>.form-select{min-height:3rem;padding:.6875rem 1.375rem;font-size:1.25rem;border-radius:0}.form-control-lg::-webkit-file-upload-button,.form-floating>.form-control::-webkit-file-upload-button,.form-floating>.form-select::-webkit-file-upload-button{padding:.6875rem 1.375rem;margin:-0.6875rem -1.375rem;-webkit-margin-end:1.375rem;margin-inline-end:1.375rem}.form-control-lg::file-selector-button,.form-floating>.form-control::file-selector-button,.form-floating>.form-select::file-selector-button{padding:.6875rem 1.375rem;margin:-0.6875rem -1.375rem;-webkit-margin-end:1.375rem;margin-inline-end:1.375rem}textarea.form-control{min-height:3.5rem}textarea.form-control-sm{min-height:2rem}textarea.form-control-lg,.form-floating>textarea.form-control,.form-floating>textarea.form-select{min-height:3rem}.form-control-color{width:3rem;height:3.5rem;padding:.875rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0 !important;border-radius:0}.form-control-color::-webkit-color-swatch{border:0 !important;border-radius:0}.form-control-color.form-control-sm{height:2rem}.form-control-color.form-control-lg,.form-floating>.form-control-color.form-control,.form-floating>.form-control-color.form-select{height:3rem}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select,.input-group>.form-floating{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus,.input-group>.form-floating:focus-within{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.875rem 1.125rem;font-size:1rem;font-weight:400;line-height:1.5;color:#000;text-align:center;white-space:nowrap;background-color:rgba(var(--post-contrast-color-inverted-rgb), 0.6);border:2px solid #666;border-radius:0}.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text,.input-group-lg>.btn{padding:.6875rem 1.375rem;font-size:1.25rem;border-radius:0}.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text,.input-group-sm>.btn{padding:.375rem .75rem;font-size:0.875rem;border-radius:0}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:4.5rem}.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select{border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(2px * -1);border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.form-control-rg{padding:.625rem .875rem;font-size:1rem;line-height:1.5}.form-control-sm{font-size:.875rem;line-height:1.2;min-height:2rem;padding-block:.375rem;padding-inline:.75rem}.form-control-lg{font-size:1rem;line-height:1.5;min-height:3rem}select.form-control-rg:not([size]):not([multiple]){height:calc(2.75rem + 4px)}.form-control{position:relative}.form-control:disabled{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-control[readonly]:not(:disabled){border-color:#666;background-color:#fff}.form-control[type=file]{position:relative}.form-control[type=file]::-webkit-file-upload-button{display:block;position:absolute;top:0;bottom:0;right:0;margin-inline:0;height:auto;background-color:inherit;border-right:0 none;border-left:inherit}.form-control[type=file]::file-selector-button{display:block;position:absolute;top:0;bottom:0;right:0;margin-inline:0;height:auto;background-color:inherit;border-right:0 none;border-left:inherit}@supports (background: -webkit-named-image(i)){.form-control[type=file]::-webkit-file-upload-button{display:initial;position:initial;margin-inline:0;padding-inline:0;width:0;border:0 none}.form-control[type=file]::file-selector-button{display:initial;position:initial;margin-inline:0;padding-inline:0;width:0;border:0 none}.form-control[type=file]::after{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;content:\"Choose File\";position:absolute;top:0;bottom:0;right:0;z-index:2;padding-inline:.875rem;background-color:inherit;border-left:inherit;text-align:center}[lang=de] .form-control[type=file]::after{content:\"Datei auswählen\"}[lang=fr] .form-control[type=file]::after{content:\"Choisir un fichier\"}[lang=it] .form-control[type=file]::after{content:\"Scegli file\"}.form-control[type=file][multiple]::after{content:\"Choose Files\"}[lang=de] .form-control[type=file][multiple]::after{content:\"Dateien auswählen\"}[lang=fr] .form-control[type=file][multiple]::after{content:\"Choisir des fichiers\"}}.form-control[type=file].form-control-sm::after{padding-inline:.375rem}.form-control[type=file].form-control-rg{min-height:calc(2.75rem + 4px)}.form-control[type=file].form-control-rg::after{padding-inline:.625rem}.form-control[type=file].form-control-lg::after{padding-inline:.6875rem}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-control:hover:not(:disabled),.form-control:focus:not(:disabled){border-color:Highlight}.form-control:hover:not(:disabled)::-webkit-file-upload-button,.form-control:focus:not(:disabled)::-webkit-file-upload-button{border-left-color:Highlight}.form-control:hover:not(:disabled)::file-selector-button,.form-control:focus:not(:disabled)::file-selector-button{border-left-color:Highlight}}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:4.5rem;min-height:4.5rem;line-height:1.5}.form-floating>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:.6875rem 1.375rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:2px solid rgba(0,0,0,0);-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1);transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (prefers-reduced-motion: reduce){.form-floating>label{-webkit-transition:none;transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:.6875rem 1.375rem}.form-floating>.form-control::-webkit-input-placeholder,.form-floating>.form-control-plaintext::-webkit-input-placeholder{color:rgba(0,0,0,0)}.form-floating>.form-control::-moz-placeholder,.form-floating>.form-control-plaintext::-moz-placeholder{color:rgba(0,0,0,0)}.form-floating>.form-control:-ms-input-placeholder,.form-floating>.form-control-plaintext:-ms-input-placeholder{color:rgba(0,0,0,0)}.form-floating>.form-control::-ms-input-placeholder,.form-floating>.form-control-plaintext::-ms-input-placeholder{color:rgba(0,0,0,0)}.form-floating>.form-control::placeholder,.form-floating>.form-control-plaintext::placeholder{color:rgba(0,0,0,0)}.form-floating>.form-control:not(:-moz-placeholder-shown),.form-floating>.form-control-plaintext:not(:-moz-placeholder-shown){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:not(:-ms-input-placeholder),.form-floating>.form-control-plaintext:not(:-ms-input-placeholder){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown),.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:-webkit-autofill,.form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.5rem;padding-bottom:0}.form-floating>.form-select{padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{color:rgba(var(--bs-body-color-rgb), 1);transform:scale(0.7647058824)}.form-floating>.form-control:not(:-ms-input-placeholder)~label{color:rgba(var(--bs-body-color-rgb), 1);transform:scale(0.7647058824)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-control-plaintext~label,.form-floating>.form-select~label{color:rgba(var(--bs-body-color-rgb), 1);-webkit-transform:scale(0.7647058824);transform:scale(0.7647058824)}.form-floating>.form-control:not(:-moz-placeholder-shown)~label::after{position:absolute;inset:.6875rem .6875rem;z-index:-1;height:4.5rem;content:\"\";background-color:#fff;border-radius:0}.form-floating>.form-control:not(:-ms-input-placeholder)~label::after{position:absolute;inset:.6875rem .6875rem;z-index:-1;height:4.5rem;content:\"\";background-color:#fff;border-radius:0}.form-floating>.form-control:focus~label::after,.form-floating>.form-control:not(:placeholder-shown)~label::after,.form-floating>.form-control-plaintext~label::after,.form-floating>.form-select~label::after{position:absolute;inset:.6875rem .6875rem;z-index:-1;height:4.5rem;content:\"\";background-color:#fff;border-radius:0}.form-floating>.form-control:-webkit-autofill~label{color:rgba(var(--bs-body-color-rgb), 1);-webkit-transform:scale(0.7647058824);transform:scale(0.7647058824)}.form-floating>.form-control-plaintext~label{border-width:2px 0}.form-floating>:disabled~label,.form-floating>.form-control:disabled~label{color:#6c757d}.form-floating>:disabled~label::after,.form-floating>.form-control:disabled~label::after{background-color:rgba(var(--post-contrast-color-inverted-rgb), 0.6)}.form-floating>label{display:block;top:2px;left:2px;margin:0;padding-inline:1.375rem;padding-top:1.453125rem;padding-bottom:0;border:0;color:#666;font-size:1.0625rem;width:auto;height:auto;max-width:calc(100% - (4px));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-transform-origin:1.375rem 0;transform-origin:1.375rem 0;-webkit-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms linear;transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms linear}.form-floating>.form-control:focus::-webkit-input-placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:focus::-moz-placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:focus:-ms-input-placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:focus::-ms-input-placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:focus::placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:focus::input-placeholder{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:not(:-ms-input-placeholder){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.5rem;padding-bottom:0}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{color:#666;padding-top:.7rem;max-width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px\n );-moz-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1);transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-floating>.form-control:not(:-ms-input-placeholder)~label{color:#666;padding-top:.7rem;max-width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px\n );-ms-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1);transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label{color:#666;padding-top:.7rem;max-width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px\n );-webkit-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1);transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-floating>.form-control:disabled~label{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-control[type=file]:not(:-moz-placeholder-shown){padding-top:1.995rem}.form-floating>.form-control[type=file]:not(:-ms-input-placeholder){padding-top:1.995rem}.form-floating>.form-control[type=file]:focus,.form-floating>.form-control[type=file]:not(:placeholder-shown){padding-top:1.995rem}.form-floating>.form-control[type=week],.form-floating>.form-control[type=month],.form-floating>.form-control[type=date],.form-floating>.form-control[type=time]{background-position:right calc(0.375em + 0.4375rem) bottom .5rem}.form-floating>.form-control.form-control-sm{font-size:.875rem;height:3rem;min-height:3rem;padding-inline:1rem}.form-floating>.form-control.form-control-sm[type=date]::-webkit-calendar-picker-indicator{margin-top:-0.75rem}.form-floating>.form-control.form-control-sm~label{font-size:.875rem;padding-top:.75rem;padding-inline:calc(1rem - 2px)}.form-floating>.form-control.form-control-sm:not(:-moz-placeholder-shown){padding-top:.75rem}.form-floating>.form-control.form-control-sm:not(:-ms-input-placeholder){padding-top:.75rem}.form-floating>.form-control.form-control-sm:focus,.form-floating>.form-control.form-control-sm:not(:placeholder-shown){padding-top:.75rem}.form-floating>.form-control.form-control-sm:not(:-moz-placeholder-shown)~label{padding-top:.375rem;font-size:.75rem}.form-floating>.form-control.form-control-sm:not(:-ms-input-placeholder)~label{padding-top:.375rem;font-size:.75rem}.form-floating>.form-control.form-control-sm:focus~label,.form-floating>.form-control.form-control-sm:not(:placeholder-shown)~label{padding-top:.375rem;font-size:.75rem}.form-floating>.form-select{padding-top:1.5rem;padding-bottom:0}.form-floating>.form-select~label{color:#666;padding-top:.7rem;max-width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px\n );-webkit-transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1);transition:all 250ms cubic-bezier(0.4, 0, 0.2, 1),width 0ms 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-floating>.form-select:disabled~label{color:rgba(var(--post-contrast-color-rgb), 0.6)}.form-floating>.form-select:empty,.form-floating>.form-select.form-select-empty{padding-top:1.5rem;padding-bottom:0}.form-floating>.form-select:empty~label,.form-floating>.form-select.form-select-empty~label{padding-top:1.453125rem;max-width:calc(100% - (4px));-webkit-transform:none;transform:none}.form-floating>.form-select.form-select-sm{padding-inline:1rem;padding-top:.75rem;font-size:.875rem;height:3rem;min-height:3rem}.form-floating>.form-select.form-select-sm~label{padding-top:.375rem;font-size:.75rem;padding-inline:1rem}.form-floating>.form-select.form-select-sm:empty~label,.form-floating>.form-select.form-select-sm.form-select-empty~label{padding-top:.75rem;font-size:.875rem}.form-floating>.form-select[multiple]{padding-top:2rem;padding-bottom:0;height:auto}.form-floating>.form-select[multiple]~label{padding-top:.5257352941rem;padding-bottom:0;width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem\n );height:auto;left:6px}.form-floating>.form-select[multiple].form-select-sm{padding-top:1.5rem}.form-floating>.form-select[multiple].form-select-sm~label{left:4px}.form-floating>.form-select[multiple]:not(:disabled)~label{background:#fff}.form-floating>.form-select[multiple]:empty~label{padding-top:.6875rem;padding-bottom:.6875rem;width:calc(\n 100% - (4px) - 1.375rem\n );height:4.5rem}.form-floating>textarea.form-control{padding-top:1.375rem;padding-bottom:.6875rem;height:auto}.form-floating>textarea.form-control~label{padding-bottom:0;width:calc(100% - (4px));max-width:none;height:unset}.form-floating>textarea.form-control:not(:-moz-placeholder-shown){padding-top:1.375rem;padding-bottom:.6875rem}.form-floating>textarea.form-control:not(:-ms-input-placeholder){padding-top:1.375rem;padding-bottom:.6875rem}.form-floating>textarea.form-control:focus,.form-floating>textarea.form-control:not(:placeholder-shown){padding-top:1.375rem;padding-bottom:.6875rem}.form-floating>textarea.form-control:not(:-moz-placeholder-shown)~label{padding-top:.5257352941rem;width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem\n );max-width:none;background:#fff}.form-floating>textarea.form-control:not(:-ms-input-placeholder)~label{padding-top:.5257352941rem;width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem\n );max-width:none;background:#fff}.form-floating>textarea.form-control:focus~label,.form-floating>textarea.form-control:not(:placeholder-shown)~label{padding-top:.5257352941rem;width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem\n );max-width:none;background:#fff}.form-floating>textarea.form-control:is(.is-valid,.is-invalid)~label{width:calc(\n 100% - (4px) - 1.375rem - 0.5rem -\n 2rem\n )}.form-floating>textarea.form-control:is(.is-valid,.is-invalid):not(:-moz-placeholder-shown)~label{width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem - 0.6538461538rem - 2.6153846154rem\n )}.form-floating>textarea.form-control:is(.is-valid,.is-invalid):not(:-ms-input-placeholder)~label{width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem - 0.6538461538rem - 2.6153846154rem\n )}.form-floating>textarea.form-control:is(.is-valid,.is-invalid):focus~label,.form-floating>textarea.form-control:is(.is-valid,.is-invalid):not(:placeholder-shown)~label{width:calc(\n (100% * 1.3076923077) - 0.8461538462rem - 5.2307692308px - 1.7980769231rem - 0.6538461538rem - 2.6153846154rem\n )}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-floating>input::-webkit-input-placeholder,.form-floating>textarea::-webkit-input-placeholder{opacity:0}.form-floating>input::-moz-placeholder,.form-floating>textarea::-moz-placeholder{opacity:0}.form-floating>input:-ms-input-placeholder,.form-floating>textarea:-ms-input-placeholder{opacity:0}.form-floating>input::-ms-input-placeholder,.form-floating>textarea::-ms-input-placeholder{opacity:0}.form-floating>input::placeholder,.form-floating>textarea::placeholder{opacity:0}.form-floating>input::input-placeholder,.form-floating>textarea::input-placeholder{opacity:0}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:400px;--bs-breakpoint-rg:600px;--bs-breakpoint-md:780px;--bs-breakpoint-lg:1024px;--bs-breakpoint-xl:1280px;--bs-breakpoint-xxl:1440px}.row{--bs-gutter-x:30px;--bs-gutter-y:0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(-1*var(--bs-gutter-y));margin-right:calc(-0.5*var(--bs-gutter-x));margin-left:calc(-0.5*var(--bs-gutter-x))}.row>*{-ms-flex-negative:0;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x)*.5);padding-left:calc(var(--bs-gutter-x)*.5);margin-top:var(--bs-gutter-y)}.col{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width: 400px){.col-sm{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-sm-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-sm-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-sm-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-sm-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-sm-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-sm-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-sm-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-sm-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-sm-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-sm-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-sm-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-sm-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-sm-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-sm-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-sm-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-sm-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-sm-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-sm-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-sm-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width: 600px){.col-rg{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-rg-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-rg-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-rg-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-rg-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-rg-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-rg-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-rg-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-rg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-rg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-rg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-rg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-rg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-rg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-rg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-rg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-rg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-rg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-rg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-rg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-rg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-rg-0{margin-left:0}.offset-rg-1{margin-left:8.33333333%}.offset-rg-2{margin-left:16.66666667%}.offset-rg-3{margin-left:25%}.offset-rg-4{margin-left:33.33333333%}.offset-rg-5{margin-left:41.66666667%}.offset-rg-6{margin-left:50%}.offset-rg-7{margin-left:58.33333333%}.offset-rg-8{margin-left:66.66666667%}.offset-rg-9{margin-left:75%}.offset-rg-10{margin-left:83.33333333%}.offset-rg-11{margin-left:91.66666667%}.g-rg-0,.gx-rg-0{--bs-gutter-x:0}.g-rg-0,.gy-rg-0{--bs-gutter-y:0}.g-rg-1,.gx-rg-1{--bs-gutter-x:0.25rem}.g-rg-1,.gy-rg-1{--bs-gutter-y:0.25rem}.g-rg-2,.gx-rg-2{--bs-gutter-x:0.5rem}.g-rg-2,.gy-rg-2{--bs-gutter-y:0.5rem}.g-rg-3,.gx-rg-3{--bs-gutter-x:1rem}.g-rg-3,.gy-rg-3{--bs-gutter-y:1rem}.g-rg-4,.gx-rg-4{--bs-gutter-x:1.5rem}.g-rg-4,.gy-rg-4{--bs-gutter-y:1.5rem}.g-rg-5,.gx-rg-5{--bs-gutter-x:3rem}.g-rg-5,.gy-rg-5{--bs-gutter-y:3rem}}@media (min-width: 780px){.col-md{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-md-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-md-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-md-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-md-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-md-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-md-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-md-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-md-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-md-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-md-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-md-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-md-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-md-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-md-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-md-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-md-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-md-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-md-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-md-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width: 1024px){.col-lg{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-lg-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-lg-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-lg-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-lg-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-lg-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-lg-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-lg-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-lg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-lg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-lg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-lg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-lg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-lg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-lg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-lg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-lg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-lg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-lg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-lg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width: 1280px){.col-xl{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-xl-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-xl-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-xl-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-xl-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-xl-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-xl-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-xl-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-xl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-xl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-xl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-xl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-xl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-xl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-xl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-xl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-xl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-xl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-xl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width: 1440px){.col-xxl{-ms-flex:1 0 0%;flex:1 0 0%}.row-cols-xxl-auto>*{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.row-cols-xxl-1>*{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.row-cols-xxl-2>*{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.row-cols-xxl-3>*{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.row-cols-xxl-4>*{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.row-cols-xxl-5>*{-ms-flex:0 0 auto;flex:0 0 auto;width:20%}.row-cols-xxl-6>*{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xxl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-xxl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.33333333%}.col-xxl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.66666667%}.col-xxl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.col-xxl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.33333333%}.col-xxl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.66666667%}.col-xxl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.col-xxl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.33333333%}.col-xxl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.66666667%}.col-xxl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.col-xxl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.33333333%}.col-xxl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.66666667%}.col-xxl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.container,.container-fluid,.container-xxl,.container-xl{--bs-gutter-x:30px;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x)*.5);padding-left:calc(var(--bs-gutter-x)*.5);margin-right:auto;margin-left:auto}@media (min-width: 1280px){.container-xl,.container-lg,.container-md,.container-rg,.container-sm,.container{max-width:1280px}}@media (min-width: 1440px){.container-xxl,.container-xl,.container-lg,.container-md,.container-rg,.container-sm,.container{max-width:1440px}}.container{padding-inline:var(--post-container-padding-x)}.container-fluid{padding-inline:var(--post-container-fluid-padding-x)}.container{--post-container-padding-x:12px}.container-fluid{--post-container-fluid-padding-x:12px}.row{--bs-gutter-x:12px}@media (min-width: 400px){.container{--post-container-padding-x:16px}}@media (min-width: 400px){.container-fluid{--post-container-fluid-padding-x:16px}}@media (min-width: 400px){.row{--bs-gutter-x:16px}}@media (min-width: 780px){.container{--post-container-padding-x:32px}}@media (min-width: 780px){.container-fluid{--post-container-fluid-padding-x:32px}}@media (min-width: 1280px){.container{--post-container-padding-x:40px}}@media (min-width: 1440px){.container{--post-container-padding-x:120px}}.g-0,.gx-0{--bs-gutter-x:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}@media (min-width: 400px){.g-sm-0,.gx-sm-0{--bs-gutter-x:0}}@media (min-width: 400px){.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}}@media (min-width: 400px){.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}}@media (min-width: 400px){.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}}@media (min-width: 400px){.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}}@media (min-width: 400px){.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}}@media (min-width: 600px){.g-rg-0,.gx-rg-0{--bs-gutter-x:0}}@media (min-width: 600px){.g-rg-1,.gx-rg-1{--bs-gutter-x:0.25rem}}@media (min-width: 600px){.g-rg-2,.gx-rg-2{--bs-gutter-x:0.5rem}}@media (min-width: 600px){.g-rg-3,.gx-rg-3{--bs-gutter-x:1rem}}@media (min-width: 600px){.g-rg-4,.gx-rg-4{--bs-gutter-x:1.5rem}}@media (min-width: 600px){.g-rg-5,.gx-rg-5{--bs-gutter-x:3rem}}@media (min-width: 780px){.g-md-0,.gx-md-0{--bs-gutter-x:0}}@media (min-width: 780px){.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}}@media (min-width: 780px){.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}}@media (min-width: 780px){.g-md-3,.gx-md-3{--bs-gutter-x:1rem}}@media (min-width: 780px){.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}}@media (min-width: 780px){.g-md-5,.gx-md-5{--bs-gutter-x:3rem}}@media (min-width: 1024px){.g-lg-0,.gx-lg-0{--bs-gutter-x:0}}@media (min-width: 1024px){.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}}@media (min-width: 1024px){.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}}@media (min-width: 1024px){.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}}@media (min-width: 1024px){.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}}@media (min-width: 1024px){.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}}@media (min-width: 1280px){.g-xl-0,.gx-xl-0{--bs-gutter-x:0}}@media (min-width: 1280px){.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}}@media (min-width: 1280px){.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}}@media (min-width: 1280px){.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}}@media (min-width: 1280px){.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}}@media (min-width: 1280px){.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}}@media (min-width: 1440px){.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}}@media (min-width: 1440px){.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}}@media (min-width: 1440px){.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}}@media (min-width: 1440px){.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}}@media (min-width: 1440px){.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}}@media (min-width: 1440px){.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}}.vertical-gutters{margin-bottom:-30px}.vertical-gutters>.col,.vertical-gutters>[class*=col-]{padding-bottom:30px}.row.border-gutters{margin-right:-1px;margin-bottom:-1px;margin-left:0}.row.border-gutters>.col,.row.border-gutters>[class*=col-]{padding-right:1px;padding-bottom:1px;padding-left:0}.container-reset{margin-right:-12px;margin-left:-12px}.container-reset-left{margin-left:-12px}.container-reset-right{margin-right:-12px}@media (max-width: 399.98px){.container-fluid-xs{padding-right:1rem;padding-left:1rem}}@media (min-width: 400px){.container-reset{margin-right:-16px;margin-left:-16px}}@media (min-width: 400px){.container-reset-left{margin-left:-16px}}@media (min-width: 400px){.container-reset-right{margin-right:-16px}}@media (min-width: 400px)and (max-width: 599.98px){.container-fluid-sm{padding-right:1rem;padding-left:1rem}}@media (min-width: 600px)and (max-width: 779.98px){.container-fluid-rg{padding-right:1rem;padding-left:1rem}}@media (min-width: 780px){.container-reset{margin-right:-32px;margin-left:-32px}}@media (min-width: 780px){.container-reset-left{margin-left:-32px}}@media (min-width: 780px){.container-reset-right{margin-right:-32px}}@media (min-width: 780px)and (max-width: 1023.98px){.container-fluid-md{padding-right:1rem;padding-left:1rem}}@media (min-width: 1024px)and (max-width: 1279.98px){.container-fluid-lg{padding-right:1rem;padding-left:1rem}}@media (min-width: 1280px){.container-reset{margin-right:-40px;margin-left:-40px}}@media (min-width: 1280px){.container-reset-left{margin-left:-40px}}@media (min-width: 1280px){.container-reset-right{margin-right:-40px}}@media (min-width: 1280px)and (max-width: 1439.98px){.container-fluid-xl{padding-right:1rem;padding-left:1rem}}@media (min-width: 1440px){.container-reset{margin-right:-120px;margin-left:-120px}}@media (min-width: 1440px){.container-reset-left{margin-left:-120px}}@media (min-width: 1440px){.container-reset-right{margin-right:-120px}}@media (min-width: 1440px){.container-fluid-xxl{padding-right:1rem;padding-left:1rem}}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:700;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff\") format(\"woff\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:700;font-style:italic;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff\") format(\"woff\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:400;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff\") format(\"woff\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:400;font-style:italic;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff\") format(\"woff\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:300;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff\") format(\"woff\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:300;font-style:italic;src:url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff2\") format(\"woff2\"),url(\"https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff\") format(\"woff\")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link,.search-button{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus),.search-button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.search-button:hover,.nav-link:focus,.search-button:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus),.search-button:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg,.search-button>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span,.search-button>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:\"Frutiger Neue For Post\",system-ui,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{display:block}.search,:host{height:100%}.search-button{height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;padding-right:calc(1rem - 1px);padding-left:calc(1rem - 1px)}@media (min-width: 1024px){.search-button{padding:0 calc(1.125rem - 1px)}}@media (min-width: 1280px){.search-button{padding:0 calc(1.5rem - 1px)}}.search-button svg{width:1.5rem;height:1.5rem}@media (min-width: 600px)and (max-width: 1023.98px){.search-button .visually-hidden{position:static;width:auto;height:auto;margin:auto;overflow:visible;clip:auto;visibility:visible;font-weight:300;margin-right:.5rem;cursor:pointer}}.flyout{position:absolute;top:100%;left:0;width:100%;background:#fff;overflow:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding-top:3.25rem;padding-bottom:3.25rem;z-index:-1;-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transition:-webkit-transform .35s,-webkit-box-shadow .35s;transition:-webkit-transform .35s,-webkit-box-shadow .35s;transition:transform .35s,box-shadow .35s;transition:transform .35s,box-shadow .35s,-webkit-transform .35s,-webkit-box-shadow .35s}@media (prefers-reduced-motion: reduce){.flyout{-webkit-transition:none;transition:none}}@media (min-width: 1024px){.flyout{max-height:calc(100vh - var(--header-height) - var(--meta-header-height) - 1px);-webkit-box-shadow:0 0 1px 0 rgba(0,0,0,.4);box-shadow:0 0 1px 0 rgba(0,0,0,.4)}.flyout.open{-webkit-box-shadow:0 0 8px 0 rgba(0,0,0,.4);box-shadow:0 0 8px 0 rgba(0,0,0,.4)}}@media (max-width: 1023.98px){.flyout{height:calc(100vh - var(--header-height) - 1px)}}.flyout.open{-webkit-transform:translateY(0);transform:translateY(0)}.form-floating .form-control,.form-floating .form-control+label{padding-right:5.625rem}.start-search-button,.clear-search-button{position:absolute;top:0;right:0;height:100%;padding-right:1rem;padding-left:.5rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;background:none;border:0;-webkit-box-shadow:none;box-shadow:none}.start-search-button svg,.clear-search-button svg{width:1.5rem;height:1.5rem}.clear-search-button{right:3rem;padding-right:.5rem;visibility:hidden}.suggestions{margin:1.5rem 0}.suggestions a{padding:.75rem 1rem}.suggestions a:hover,.suggestions a:focus,.suggestions a.selected{background:#f4f3f1}.suggestions a.parcel-suggestion{-ms-flex-wrap:wrap;flex-wrap:wrap}.search-recommendation__icon{height:1.5em;width:1.5em}";
|
|
292
|
+
const PostSearchStyle0 = postSearchCss;
|
|
293
|
+
|
|
294
|
+
const PostSearch = class {
|
|
295
|
+
constructor(hostRef) {
|
|
296
|
+
index.registerInstance(this, hostRef);
|
|
297
|
+
this.dropdownToggled = index.createEvent(this, "dropdownToggled", 7);
|
|
298
|
+
this.searchDropdownOpen = false;
|
|
299
|
+
this.coveoSuggestions = [];
|
|
300
|
+
this.placeSuggestions = [];
|
|
301
|
+
this.parcelSuggestion = null;
|
|
302
|
+
}
|
|
303
|
+
connectedCallback() {
|
|
304
|
+
this.throttledResize = index$1.throttle(300, () => this.handleResize());
|
|
305
|
+
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
306
|
+
}
|
|
307
|
+
disconnectedCallback() {
|
|
308
|
+
window.removeEventListener('resize', this.throttledResize);
|
|
309
|
+
bodyScrollLock_esm.clearAllBodyScrollLocks();
|
|
310
|
+
}
|
|
311
|
+
componentWillUpdate() {
|
|
312
|
+
// Check if search flyout got set to close
|
|
313
|
+
if (this.searchFlyout && !this.searchDropdownOpen) {
|
|
314
|
+
this.searchFlyout.classList.remove('open');
|
|
315
|
+
// Check if element has transition applied and whether user prefers to see animations or not
|
|
316
|
+
if (ui_service.elementHasTransition(this.searchFlyout, 'transform') && !ui_service.userPrefersReducedMotion()) {
|
|
317
|
+
// Wait for CSS transition 'transform' to end before continuing
|
|
318
|
+
return new Promise(resolve => {
|
|
319
|
+
if (this.searchFlyout === undefined) {
|
|
320
|
+
return resolve(true);
|
|
321
|
+
}
|
|
322
|
+
this.searchFlyout.addEventListener('transitionend', event => {
|
|
323
|
+
if (event.propertyName === 'transform') {
|
|
324
|
+
resolve(true);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
componentDidUpdate() {
|
|
332
|
+
// Search flyout got set to open
|
|
333
|
+
if (this.searchFlyout && this.searchDropdownOpen) {
|
|
334
|
+
// Force browser to redraw/refresh DOM before adding 'open' class
|
|
335
|
+
this.searchFlyout.getBoundingClientRect();
|
|
336
|
+
this.searchFlyout.classList.add('open');
|
|
337
|
+
}
|
|
338
|
+
// Focus on the searchBox whenever the dropdown is opened
|
|
339
|
+
if (this.searchDropdownOpen && this.searchBox) {
|
|
340
|
+
this.searchBox.focus({ preventScroll: true });
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Toggle the dropdown and optionally force an open/closed state
|
|
345
|
+
* @param force Boolean to force open/closed state
|
|
346
|
+
* @returns Boolean indicating open state of the component
|
|
347
|
+
*/
|
|
348
|
+
async toggleDropdown(force) {
|
|
349
|
+
this.searchDropdownOpen =
|
|
350
|
+
force === undefined || typeof force !== 'boolean' ? !this.searchDropdownOpen : force;
|
|
351
|
+
this.dropdownToggled.emit({ open: this.searchDropdownOpen, element: this.host });
|
|
352
|
+
if (!this.searchDropdownOpen) {
|
|
353
|
+
// Reset suggestions when dropdown closes
|
|
354
|
+
this.coveoSuggestions = [];
|
|
355
|
+
this.placeSuggestions = [];
|
|
356
|
+
if (this.searchBox)
|
|
357
|
+
this.searchBox.value = '';
|
|
358
|
+
void this.setFocus();
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
// Get basic suggestions when dropdown opens
|
|
362
|
+
try {
|
|
363
|
+
this.coveoSuggestions = await getCoveoSuggestions('');
|
|
364
|
+
}
|
|
365
|
+
catch (_a) { }
|
|
366
|
+
}
|
|
367
|
+
this.setBodyScroll();
|
|
368
|
+
return this.searchDropdownOpen;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Sets the focus on the search button
|
|
372
|
+
*/
|
|
373
|
+
async setFocus() {
|
|
374
|
+
const shadowRoot = this.host.shadowRoot;
|
|
375
|
+
if (shadowRoot === null) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const toggleButton = shadowRoot.querySelector('.search-button');
|
|
379
|
+
if (toggleButton) {
|
|
380
|
+
toggleButton.focus();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
handleResize() {
|
|
384
|
+
// Only enable/disable body scroll on resize if the search dropdown is open, otherwise this could lead to side effects in other controls
|
|
385
|
+
if (this.searchDropdownOpen) {
|
|
386
|
+
this.setBodyScroll();
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Disable or re-enable body scrolling, depending on whether search dropdown is open or closed in mobile view (width < 1024px)
|
|
391
|
+
*/
|
|
392
|
+
setBodyScroll() {
|
|
393
|
+
if (!this.searchFlyout) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (this.searchDropdownOpen && window.innerWidth < 1024) {
|
|
397
|
+
bodyScrollLock_esm.disableBodyScroll(this.searchFlyout);
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
bodyScrollLock_esm.enableBodyScroll(this.searchFlyout);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Fetch suggestions from all available sources
|
|
405
|
+
*/
|
|
406
|
+
async handleSearchInput() {
|
|
407
|
+
var _a;
|
|
408
|
+
if (this.searchBox === undefined || ((_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header.search) === undefined) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
const query = this.searchBox.value.trim();
|
|
412
|
+
// shows or hides clearButton depending on the content of the searchbar
|
|
413
|
+
if (this.clearButton) {
|
|
414
|
+
if (query !== '') {
|
|
415
|
+
this.clearButton.style.visibility = 'visible';
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
this.clearButton.style.visibility = 'hidden';
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
const [placeSuggestions, coveoSuggestions, trackAndTraceInfo] = await Promise.all([
|
|
422
|
+
queryPlaces(query),
|
|
423
|
+
getCoveoSuggestions(query),
|
|
424
|
+
getParcelSuggestion(query, store.state.localizedConfig.header.search),
|
|
425
|
+
]);
|
|
426
|
+
this.parcelSuggestion = trackAndTraceInfo;
|
|
427
|
+
// Parcel suggestion is more important than any other
|
|
428
|
+
if (trackAndTraceInfo) {
|
|
429
|
+
this.placeSuggestions = [];
|
|
430
|
+
this.coveoSuggestions = [];
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
[this.coveoSuggestions, this.placeSuggestions] = equalizeArrays(coveoSuggestions, placeSuggestions, 7);
|
|
434
|
+
}
|
|
435
|
+
this.deselectSuggestion();
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* clear Search box
|
|
439
|
+
* calls handleSearchInput to update/remove suggestions
|
|
440
|
+
*/
|
|
441
|
+
handleClearSearchBox() {
|
|
442
|
+
if (this.searchBox !== undefined) {
|
|
443
|
+
this.searchBox.value = '';
|
|
444
|
+
this.handleSearchInput();
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Start search on enter
|
|
449
|
+
* @param event
|
|
450
|
+
*/
|
|
451
|
+
handleKeyDown(event) {
|
|
452
|
+
var _a, _b, _c, _d, _e;
|
|
453
|
+
if (this.searchFlyout === undefined) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const selectedSuggestion = this.searchFlyout.querySelector('.suggestions > li > a.selected');
|
|
457
|
+
const selectedHref = (_a = selectedSuggestion === null || selectedSuggestion === void 0 ? void 0 : selectedSuggestion.getAttribute('href')) !== null && _a !== void 0 ? _a : null;
|
|
458
|
+
const suggestions = this.searchFlyout.querySelectorAll('.suggestions > li > a');
|
|
459
|
+
switch (event.key.toLowerCase()) {
|
|
460
|
+
case 'enter':
|
|
461
|
+
if (selectedHref !== null) {
|
|
462
|
+
window.location.href = selectedHref;
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
void this.startSearch();
|
|
466
|
+
}
|
|
467
|
+
break;
|
|
468
|
+
case 'arrowdown':
|
|
469
|
+
this.deselectSuggestion();
|
|
470
|
+
if ((_c = (_b = selectedSuggestion === null || selectedSuggestion === void 0 ? void 0 : selectedSuggestion.parentElement) === null || _b === void 0 ? void 0 : _b.nextElementSibling) === null || _c === void 0 ? void 0 : _c.firstElementChild) {
|
|
471
|
+
// Select next suggestion if there's any, otherwise none will be selected
|
|
472
|
+
selectedSuggestion.parentElement.nextElementSibling.firstElementChild.classList.add('selected');
|
|
473
|
+
// If there are any suggestions, select first suggestion in list
|
|
474
|
+
}
|
|
475
|
+
else if (suggestions.length > 0) {
|
|
476
|
+
suggestions[0].classList.add('selected');
|
|
477
|
+
}
|
|
478
|
+
this.updateSearchBoxWithSuggestion();
|
|
479
|
+
break;
|
|
480
|
+
case 'arrowup':
|
|
481
|
+
this.deselectSuggestion();
|
|
482
|
+
if ((_e = (_d = selectedSuggestion === null || selectedSuggestion === void 0 ? void 0 : selectedSuggestion.parentElement) === null || _d === void 0 ? void 0 : _d.previousElementSibling) === null || _e === void 0 ? void 0 : _e.firstElementChild) {
|
|
483
|
+
// Select previous suggestion if there's any, otherwise none will be selected
|
|
484
|
+
selectedSuggestion.parentElement.previousElementSibling.firstElementChild.classList.add('selected');
|
|
485
|
+
// If there are any suggestions, select last suggestion in list
|
|
486
|
+
}
|
|
487
|
+
else if (suggestions.length > 0) {
|
|
488
|
+
suggestions[suggestions.length - 1].classList.add('selected');
|
|
489
|
+
}
|
|
490
|
+
this.updateSearchBoxWithSuggestion();
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Set selected suggestion on mouse enter
|
|
496
|
+
* @param event
|
|
497
|
+
*/
|
|
498
|
+
handleMouseEnterSuggestion(event) {
|
|
499
|
+
this.deselectSuggestion();
|
|
500
|
+
// Set hovered suggestion element as selected
|
|
501
|
+
event.target.classList.add('selected');
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Set selected suggestion on mouse enter
|
|
505
|
+
* @param event
|
|
506
|
+
*/
|
|
507
|
+
handleMouseLeaveSuggestions() {
|
|
508
|
+
this.deselectSuggestion();
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Deselect any previously selected suggestion
|
|
512
|
+
*/
|
|
513
|
+
deselectSuggestion() {
|
|
514
|
+
if (this.searchFlyout === undefined)
|
|
515
|
+
return;
|
|
516
|
+
const selectedSuggestion = this.searchFlyout.querySelector('.suggestions .selected');
|
|
517
|
+
if (selectedSuggestion) {
|
|
518
|
+
selectedSuggestion.classList.remove('selected');
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Update search box with selected suggestion
|
|
523
|
+
*/
|
|
524
|
+
updateSearchBoxWithSuggestion() {
|
|
525
|
+
if (this.searchFlyout === undefined)
|
|
526
|
+
return;
|
|
527
|
+
// Get the newly selected suggestion
|
|
528
|
+
const selectedSuggestion = this.searchFlyout.querySelector('.suggestions > li > a.selected');
|
|
529
|
+
const suggestedText = selectedSuggestion === null || selectedSuggestion === void 0 ? void 0 : selectedSuggestion.dataset.suggestionText;
|
|
530
|
+
// Update search box value with selected suggestion text
|
|
531
|
+
if (suggestedText !== undefined && this.searchBox) {
|
|
532
|
+
this.searchBox.value = suggestedText;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Redirect to the post search page
|
|
537
|
+
*/
|
|
538
|
+
async startSearch() {
|
|
539
|
+
var _a;
|
|
540
|
+
if (this.searchBox && ((_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header.search)) {
|
|
541
|
+
const redirectUrl = await getSearchRedirectUrl(this.searchBox.value.trim(), store.state.localizedConfig.header.search);
|
|
542
|
+
if (!redirectUrl)
|
|
543
|
+
return;
|
|
544
|
+
window.location.href = redirectUrl;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
trackRecommendationClick(recommendation) {
|
|
548
|
+
if (!('dataLayer' in window))
|
|
549
|
+
return;
|
|
550
|
+
const trackingAttributes = recommendation.additionalAttributes.reduce((acc, curr) => {
|
|
551
|
+
acc[curr.name] = curr.value;
|
|
552
|
+
return acc;
|
|
553
|
+
}, {});
|
|
554
|
+
window.dataLayer.push({
|
|
555
|
+
event: trackingAttributes['data-event'],
|
|
556
|
+
text: trackingAttributes['data-text'],
|
|
557
|
+
link_url: trackingAttributes['data-linkurl'],
|
|
558
|
+
label: trackingAttributes['data-label'],
|
|
559
|
+
type: trackingAttributes['data-type'],
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
render() {
|
|
563
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
564
|
+
if (((_a = store.state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header) === undefined) {
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
const { translations, search } = store.state.localizedConfig.header;
|
|
568
|
+
const isParcelTrackingNr = this.parcelSuggestion && 'sending' in this.parcelSuggestion;
|
|
569
|
+
const showPortalRecommendations = ((_b = this.searchBox) === null || _b === void 0 ? void 0 : _b.value) === '' && ((_c = search.searchRecommendations) === null || _c === void 0 ? void 0 : _c.links.length) > 0;
|
|
570
|
+
return (index.h(index.Host, { role: "search" }, index.h(svgSprite_component.SvgSprite, null), index.h("div", { class: "search" }, index.h("button", { id: "post-internet-header-search-button", class: "search-button", type: "button", "aria-expanded": `${this.searchDropdownOpen}`, onClick: e => void this.toggleDropdown(e) }, index.h("span", { class: "visually-hidden" }, this.searchDropdownOpen
|
|
571
|
+
? translations.searchToggleExpanded
|
|
572
|
+
: translations.searchToggle), index.h(svgIcon_component.SvgIcon, { name: this.searchDropdownOpen ? 'pi-close' : 'pi-search' })), index.h(if_component.If, { condition: this.searchDropdownOpen }, index.h("div", { class: "flyout", ref: e => (this.searchFlyout = e) }, index.h("div", { class: "container box" }, index.h("div", { class: "row" }, index.h("div", { class: "col-xs-12 col-md-10 col-lg-8" }, index.h("div", { class: "form-group form-floating" }, index.h("input", { type: "text", role: "searchbox", id: "searchBox", class: "form-control form-control-lg", placeholder: translations.flyoutSearchBoxFloatingLabel, autocomplete: "off", ref: el => (this.searchBox = el), onInput: () => void this.handleSearchInput(), onKeyDown: e => this.handleKeyDown(e) }), index.h("label", { htmlFor: "searchBox" }, translations.flyoutSearchBoxFloatingLabel), index.h("button", { onClick: () => this.handleClearSearchBox(), class: "clear-search-button", type: "reset", id: "clearButton", ref: el => (this.clearButton = el) }, index.h("span", { class: "visually-hidden" }, language_service.translate('Delete search term')), index.h(svgIcon_component.SvgIcon, { name: "pi-close" })), index.h("button", { onClick: () => void this.startSearch(), class: "start-search-button" }, index.h("span", { class: "visually-hidden" }, translations.searchSubmit), index.h(svgIcon_component.SvgIcon, { name: "pi-search" }))), showPortalRecommendations && (index.h("h2", { id: "post-internet-header-search-recommendations-title", class: "bold" }, search.searchRecommendations.title)), index.h("ul", { class: "suggestions no-list", onMouseLeave: () => this.handleMouseLeaveSuggestions(), "aria-labelledby": showPortalRecommendations
|
|
573
|
+
? 'post-internet-header-search-recommendations-title'
|
|
574
|
+
: undefined }, showPortalRecommendations &&
|
|
575
|
+
search.searchRecommendations.links.map(recommendation => (index.h("li", { key: recommendation.href }, index.h("a", { class: "nav-link search-recommendation", href: new URL(recommendation.href, 'https://post.ch').href, "data-suggestion-text": recommendation.label, onMouseEnter: e => this.handleMouseEnterSuggestion(e), onClick: () => this.trackRecommendationClick(recommendation) }, index.h("span", { class: "search-recommendation__icon", innerHTML: recommendation.inlineSvg }), index.h("span", null, recommendation.label))))), isParcelTrackingNr && (index.h("li", null, index.h("a", { class: "nav-link parcel-suggestion", href: this.parcelSuggestion.url, "data-suggestion-text": (_d = this.searchBox) === null || _d === void 0 ? void 0 : _d.value, onMouseEnter: e => this.handleMouseEnterSuggestion(e) }, index.h(svgIcon_component.SvgIcon, { name: "pi-letter-parcel" }), index.h("span", { class: "bold" }, (_f = (_e = this.parcelSuggestion) === null || _e === void 0 ? void 0 : _e.sending) === null || _f === void 0 ? void 0 :
|
|
576
|
+
_f.id, ":\u00A0"), index.h("span", null, [
|
|
577
|
+
(_h = (_g = this.parcelSuggestion) === null || _g === void 0 ? void 0 : _g.sending) === null || _h === void 0 ? void 0 : _h.product,
|
|
578
|
+
' ' + ((_k = (_j = this.parcelSuggestion) === null || _j === void 0 ? void 0 : _j.sending) === null || _k === void 0 ? void 0 : _k.recipient.zipcode),
|
|
579
|
+
' ' + ((_m = (_l = this.parcelSuggestion) === null || _l === void 0 ? void 0 : _l.sending) === null || _m === void 0 ? void 0 : _m.recipient.city),
|
|
580
|
+
', ' + ((_p = (_o = this.parcelSuggestion) === null || _o === void 0 ? void 0 : _o.sending) === null || _p === void 0 ? void 0 : _p.state),
|
|
581
|
+
]
|
|
582
|
+
.filter(s => s !== '' && s !== ' ')
|
|
583
|
+
.join(''))))), !showPortalRecommendations &&
|
|
584
|
+
this.coveoSuggestions &&
|
|
585
|
+
this.coveoSuggestions.map(suggestion => (index.h("li", { key: suggestion.objectId }, index.h("a", { class: "nav-link", href: suggestion.redirectUrl, "data-suggestion-text": suggestion.expression, onMouseEnter: e => this.handleMouseEnterSuggestion(e) }, index.h(svgIcon_component.SvgIcon, { name: "pi-search" }), index.h(HighlightedText, { text: suggestion.highlighted }))))), !showPortalRecommendations &&
|
|
586
|
+
this.placeSuggestions &&
|
|
587
|
+
this.placeSuggestions.map(suggestion => {
|
|
588
|
+
var _a, _b;
|
|
589
|
+
return (index.h("li", { key: suggestion.id }, index.h("a", { class: "nav-link", href: getPlacesUrl(suggestion), "data-suggestion-text": suggestion.name, onMouseEnter: e => this.handleMouseEnterSuggestion(e) }, index.h(svgIcon_component.SvgIcon, { name: "pi-place" }), index.h(HighlightedText, { text: highlightPlacesString((_b = (_a = this.searchBox) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim(), suggestion.name) }))));
|
|
590
|
+
}))))))))));
|
|
591
|
+
}
|
|
592
|
+
get host() { return index.getElement(this); }
|
|
593
|
+
};
|
|
594
|
+
PostSearch.style = PostSearchStyle0;
|
|
595
|
+
|
|
596
|
+
exports.PostSearch = PostSearch;
|