straumur-web-component 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2018 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ StraumurCheckout: () => straumur_checkout_default
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/straumur-checkout.tsx
28
+ var import_preact30 = require("preact");
29
+ var import_adyen = require("@adyen/adyen-web/styles/adyen.css");
30
+
31
+ // #style-inject:#style-inject
32
+ function styleInject(css, { insertAt } = {}) {
33
+ if (!css || typeof document === "undefined") return;
34
+ const head = document.head || document.getElementsByTagName("head")[0];
35
+ const style = document.createElement("style");
36
+ style.type = "text/css";
37
+ if (insertAt === "top") {
38
+ if (head.firstChild) {
39
+ head.insertBefore(style, head.firstChild);
40
+ } else {
41
+ head.appendChild(style);
42
+ }
43
+ } else {
44
+ head.appendChild(style);
45
+ }
46
+ if (style.styleSheet) {
47
+ style.styleSheet.cssText = css;
48
+ } else {
49
+ style.appendChild(document.createTextNode(css));
50
+ }
51
+ }
52
+
53
+ // src/styles/main.css
54
+ styleInject('* {\n font-family: "AkzidenzGroteskPro", sans-serif;\n max-width: 440px;\n}\n.render-brand-icons__overflow {\n color: #72889d;\n}\n.component {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 300px;\n background-color: white;\n border-radius: 16px;\n}\n');
55
+
56
+ // src/env.ts
57
+ var getEnv = () => {
58
+ return {
59
+ STAGING_BASE_URL: "https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout",
60
+ PRODUCTION_BASE_URL: "",
61
+ GET_PAYMENT_METHODS_URL: "payment-methods",
62
+ POST_PAYMENT_URL: "payment",
63
+ POST_DETAILS_URL: "details",
64
+ POST_DISABLE_TOKEN_URL: "disable-token"
65
+ };
66
+ };
67
+ var env = getEnv();
68
+
69
+ // src/adapter/straumur-adapter.ts
70
+ function getBaseUrl(environment) {
71
+ switch (environment) {
72
+ case "test":
73
+ return env.STAGING_BASE_URL;
74
+ case "live":
75
+ return env.PRODUCTION_BASE_URL;
76
+ default:
77
+ throw new Error(`Unknown environment: ${environment}`);
78
+ }
79
+ }
80
+ function getPaymentMethods(environment, body) {
81
+ return fetch(`${getBaseUrl(environment)}/${env.GET_PAYMENT_METHODS_URL}`, {
82
+ method: "POST",
83
+ headers: {
84
+ "Content-Type": "application/json"
85
+ },
86
+ body: JSON.stringify(body)
87
+ });
88
+ }
89
+ function createPaymentRequest(environment, body) {
90
+ return fetch(`${getBaseUrl(environment)}/${env.POST_PAYMENT_URL}`, {
91
+ method: "POST",
92
+ headers: {
93
+ "Content-Type": "application/json"
94
+ },
95
+ body: JSON.stringify(body)
96
+ });
97
+ }
98
+ function createDetailsRequest(environment, body) {
99
+ return fetch(`${getBaseUrl(environment)}/${env.POST_DETAILS_URL}`, {
100
+ method: "POST",
101
+ headers: {
102
+ "Content-Type": "application/json"
103
+ },
104
+ body: JSON.stringify(body)
105
+ });
106
+ }
107
+ function postDisableTokenRequest(environment, body) {
108
+ return fetch(`${getBaseUrl(environment)}/${env.POST_DISABLE_TOKEN_URL}`, {
109
+ method: "POST",
110
+ headers: {
111
+ "Content-Type": "application/json"
112
+ },
113
+ body: JSON.stringify(body)
114
+ });
115
+ }
116
+
117
+ // src/services/straumur-service.ts
118
+ async function setupPaymentMethods(environment, sessionId) {
119
+ try {
120
+ const fetchResponse = await getPaymentMethods(environment, {
121
+ sessionId
122
+ });
123
+ if (!fetchResponse.ok) {
124
+ const contentType = fetchResponse.headers.get("content-type");
125
+ let errorMessage = "error.failedToInitializePaymentMethods";
126
+ if (contentType && contentType.includes("application/json")) {
127
+ errorMessage = (await fetchResponse.json()).errorMessage;
128
+ }
129
+ return {
130
+ resultCode: "Error",
131
+ error: errorMessage
132
+ };
133
+ }
134
+ const data = await fetchResponse.json();
135
+ return {
136
+ resultCode: "Success",
137
+ ...data
138
+ };
139
+ } catch (error) {
140
+ return {
141
+ resultCode: "Error",
142
+ error: "error.failedToInitializePaymentMethods"
143
+ };
144
+ }
145
+ }
146
+
147
+ // src/features/straumur-checkout-container.tsx
148
+ var import_preact29 = require("preact");
149
+
150
+ // src/features/card/card-component.tsx
151
+ var import_preact17 = require("preact");
152
+ var import_hooks4 = require("preact/hooks");
153
+
154
+ // src/features/card/card-component.css
155
+ styleInject('.card-component {\n position: relative;\n cursor: pointer;\n background: white;\n border-radius: 12px;\n transition: all 0.3s ease;\n padding: 16px 24px;\n}\n.card-component__radio-selector {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n.card-component__content {\n display: grid;\n grid-template-columns: 26px 40px auto 1fr;\n align-items: center;\n gap: 12px;\n transition: background-color 0.3s ease;\n}\n.card-component__radio-selector:checked + .card-component__content {\n padding-bottom: 16px;\n}\n.card-component--circle {\n width: 24px;\n height: 24px;\n border: 1px solid #e6ebef;\n background: #eef0f2;\n border-radius: 50%;\n position: relative;\n transition: all 0.3s ease;\n}\n.card-component__content:hover .card-component--circle {\n border: 1px solid #cdd8e2;\n}\n.card-component--circle::after {\n content: "";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: transform 0.2s ease;\n}\n.card-component__radio-selector:checked + .card-component__content .card-component--circle {\n background: #bce6f3;\n border-color: transparent;\n}\n.card-component__radio-selector:checked + .card-component__content .card-component--circle::after {\n transform: translate(-50%, -50%) scale(1);\n background: #002649;\n height: 10px;\n width: 10px;\n}\n.card-component--text {\n color: #213547;\n font-size: 1rem;\n user-select: none;\n}\n.card-component--brands {\n display: flex;\n margin-left: auto;\n align-items: center;\n gap: 4px;\n}\n.card-component__expandable {\n background: white;\n max-height: 0;\n overflow: hidden;\n transition: all 0.3s ease;\n opacity: 0;\n}\n.card-component__loading-text {\n display: flex;\n justify-content: center;\n}\n.card-component__radio-selector:checked ~ .card-component__expandable {\n max-height: 400px;\n opacity: 1;\n}\n.card-component__form {\n display: flex;\n padding-top: 16px;\n flex-direction: column;\n gap: 24px;\n}\n.card-component__form--wrapper {\n display: flex;\n flex-direction: column;\n justify-items: start;\n position: relative;\n width: 100%;\n}\n.card-component__form--wrapper--error {\n color: #ff4d4f;\n font-size: 12px;\n}\n.card-component__form--wrapper--label {\n transform: translateX(10px) translateY(-50%);\n z-index: 1;\n background:\n linear-gradient(\n to top,\n #eef0f2 53%,\n transparent 50%);\n position: absolute;\n font-weight: 500;\n font-size: 14px;\n padding: 0 4px;\n}\n.card-component__form--wrapper--label--error {\n color: #ff4d4f;\n background:\n linear-gradient(\n to top,\n #fff8f5 53%,\n transparent 50%);\n}\n.card-component__form--wrapper--label--info {\n position: absolute;\n top: 33%;\n right: 10px;\n}\n.card-component__form--wrapper--input {\n background: #eef0f2;\n color: #00112c;\n display: block;\n font-family: inherit;\n border: 1px solid transparent;\n border-radius: 8px;\n font-size: 1rem;\n height: 48px;\n outline: none;\n padding-left: 12px;\n transition: border 0.2s ease-out, box-shadow 0.2s ease-out;\n}\n.card-component__form--wrapper--input:hover {\n border: 1px solid #cdd8e2;\n}\n.card-component__form--wrapper--input--error {\n background: #fff8f5;\n border: 1px solid #ff4d4f;\n}\n.card-component__form--wrapper--input--error:hover {\n border: 1px solid #ff4d4f;\n}\n.card-component__form--field-wrapper {\n display: flex;\n width: 100%;\n gap: 24px;\n}\n.card-component__submit-button {\n background: #002649;\n border: none;\n border-radius: 8px;\n color: #ffffff;\n cursor: pointer;\n font-size: 1rem;\n height: 40px;\n outline: none;\n padding: 0 16px;\n transition: background 0.2s ease-out;\n width: 100%;\n}\n.card-component__submit-button:hover {\n background: #002649;\n border: 1px solid #dbdee2;\n}\n.card-component__submit-button:disabled {\n background: #72889d;\n border: 1px solid #dbdee2;\n cursor: not-allowed;\n}\n.card-component__form--wrapper--label-checkbox {\n height: 38px;\n display: flex;\n align-items: center;\n padding: 8px;\n gap: 8px;\n border-radius: 8px;\n cursor: pointer;\n user-select: none;\n transition: background-color 0.25s ease-in-out;\n}\n.card-component__form--wrapper--label-checkbox:hover {\n background-color: #eff8fa;\n}\n.card-component__form--wrapper--label-checkbox:hover .card-component__form--wrapper--label-checkbox--checkmark {\n border: 1px solid #cdd8e2;\n}\n.card-component__form--wrapper--label-checkbox--checkmark {\n height: 24px;\n width: 24px;\n background-color: #eef0f2;\n border-radius: 4px;\n flex-shrink: 0;\n border: 1px solid transparent;\n transition: all 0.2s ease-in;\n}\n.card-component__form--wrapper--label-checkbox:hover .card-component__form--wrapper--label-checkbox--checkmark.card-component__form--wrapper--label-checkbox--checkmark--checked {\n border: 1px solid transparent;\n}\n.card-component__form--wrapper--label-checkbox--checkmark--checked {\n background-color: #bce6f3;\n}\n.card-component__form--wrapper--label-checkbox--checkmark--icon {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 9px;\n opacity: 0;\n visibility: hidden;\n transition: all 0.2s ease-in;\n}\n.card-component__form--wrapper--label-checkbox--checkmark--icon--checked {\n opacity: 1;\n visibility: visible;\n}\n.card-component__form--wrapper--label-checkbox--checkbox {\n display: none;\n}\n');
156
+
157
+ // src/components/payment-method-group/payment-method-group-context.tsx
158
+ var import_preact = require("preact");
159
+ var import_preact2 = require("preact");
160
+ var import_hooks = require("preact/hooks");
161
+ var PaymentMethodContext = (0, import_preact2.createContext)(void 0);
162
+ var defaultIsInitialized = {
163
+ card: false,
164
+ storedcard: false,
165
+ googlepay: false,
166
+ applepay: false
167
+ };
168
+ var PaymentMethodGroupContext = ({
169
+ children,
170
+ initialValue
171
+ }) => {
172
+ const [activePaymentMethod, setActivePaymentMethod] = (0, import_hooks.useState)(initialValue);
173
+ const [activeStoredPaymentMethodId, setActiveStoredPaymentMethodId] = (0, import_hooks.useState)(null);
174
+ const [threeDSecureActive, setThreeDSecureActive] = (0, import_hooks.useState)(false);
175
+ const [isPaymentMethodInitialized, setIsPaymentMethodInitialized] = (0, import_hooks.useState)(defaultIsInitialized);
176
+ const [isStoredCardInitialized, setIsStoredCardInitialized] = (0, import_hooks.useState)({});
177
+ const threeDSecureRef = (0, import_hooks.useRef)(null);
178
+ const [success, setSuccess] = (0, import_hooks.useState)(null);
179
+ const [error, setError] = (0, import_hooks.useState)(null);
180
+ const updatePaymentMethodInitialization = (paymentMethod, isInitialized) => {
181
+ setIsPaymentMethodInitialized((prevState) => ({
182
+ ...prevState,
183
+ [paymentMethod]: isInitialized
184
+ }));
185
+ };
186
+ const updateStoredCardInitialization = (storedPaymentMethod, isInitialized) => {
187
+ setIsStoredCardInitialized((prevState) => ({
188
+ ...prevState,
189
+ [storedPaymentMethod]: isInitialized
190
+ }));
191
+ };
192
+ const handleError = (error2) => {
193
+ setError(error2);
194
+ };
195
+ const handleSuccess = (success2) => {
196
+ setSuccess(success2);
197
+ };
198
+ const setThreeDSecureRef = (ref) => {
199
+ threeDSecureRef.current = ref;
200
+ };
201
+ return /* @__PURE__ */ (0, import_preact.h)(
202
+ PaymentMethodContext.Provider,
203
+ {
204
+ value: {
205
+ activePaymentMethod,
206
+ setActivePaymentMethod,
207
+ activeStoredPaymentMethodId,
208
+ setActiveStoredPaymentMethodId,
209
+ isPaymentMethodInitialized,
210
+ updatePaymentMethodInitialization,
211
+ isStoredCardInitialized,
212
+ updateStoredCardInitialization,
213
+ handleSuccess,
214
+ success,
215
+ handleError,
216
+ error,
217
+ threeDSecureRef,
218
+ setThreeDSecureRef,
219
+ threeDSecureActive,
220
+ setThreeDSecureActive
221
+ }
222
+ },
223
+ children
224
+ );
225
+ };
226
+ var usePaymentMethodGroup = () => {
227
+ const context = (0, import_hooks.useContext)(PaymentMethodContext);
228
+ if (context === void 0) {
229
+ throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");
230
+ }
231
+ return context;
232
+ };
233
+
234
+ // src/features/card/card-component.tsx
235
+ var import_adyen_web = require("@adyen/adyen-web");
236
+
237
+ // src/localizations/translations.ts
238
+ var translations = {
239
+ "en-US": {
240
+ "cards.title": "Card payment",
241
+ "cards.cardNumber": "Card number",
242
+ "cards.expiryDate": "Expiry date",
243
+ "cards.securityCode3Digits": "Security code",
244
+ "cards.securityCode3DigitsOptional": "Security code (optional)",
245
+ "cards.securityCode3DigitsInfo": "3-digit on the back of the card",
246
+ "cards.securityCode4DigitsInfo": "4-digit on the back of the card",
247
+ "cards.storePaymentMethod": "Store payment information",
248
+ "googlepay.title": "Google Pay",
249
+ "stored-cards.expiryDate": "Expiry date",
250
+ "stored-cards.securityCode3Digits": "Security code",
251
+ "stored-cards.securityCode3DigitsOptional": "Security code (optional)",
252
+ "stored-cards.securityCode3DigitsInfo": "3-digit on the back of the card",
253
+ "stored-cards.securityCode4DigitsInfo": "4-digit on the back of the card",
254
+ "stored-cards.removeStoredCard": "Remove",
255
+ "stored-cards.removeStoredCardQuestion": "Remove stored payment method?",
256
+ "stored-cards.removeStoredCardQuestionYesRemove": "Yes, remove",
257
+ "stored-cards.removeStoredCardQuestionCancel": "Cancel",
258
+ "success.paymentAuthorized": "Payment authorized",
259
+ "error.unknownError": "Unknown error occurred",
260
+ "error.failedToInitializeStraumurWebComponent": "Failed to initialize Straumur Web component",
261
+ "error.failedToInitializePaymentMethods": "Failed to initialize payment methods",
262
+ "error.failedToSubmitPayment": "Failed to submit payment",
263
+ "error.paymentFailed": "Payment failed",
264
+ "error.paymentUnsuccessful": "Payment unsuccessful",
265
+ "error.failedToSubmitPaymentDetails": "Failed to submit payment details",
266
+ "error.paymentDetailsFailed": "Payment details failed",
267
+ "error.googlePayNotAvailable": "Google Pay not available",
268
+ "error.failedToSubmitRemoveStoredPaymentCard": "Failed to remove stored payment card",
269
+ "error.failedToRemoveStoredPaymentCard": "Stored payment card was not removed"
270
+ },
271
+ "is-IS": {
272
+ "cards.title": "Grei\xF0a me\xF0 korti",
273
+ "cards.cardNumber": "Kortan\xFAmer",
274
+ "cards.expiryDate": "Gildisdagur",
275
+ "cards.securityCode3Digits": "\xD6ryggisk\xF3\xF0i",
276
+ "cards.securityCode3DigitsOptional": "\xD6ryggisk\xF3\xF0i (valkv\xE6tt)",
277
+ "cards.securityCode3DigitsInfo": "3 t\xF6lustafir aftan \xE1 kortinu",
278
+ "cards.securityCode4DigitsInfo": "4 t\xF6lustafir aftan \xE1 kortinu",
279
+ "cards.storePaymentMethod": "Vista grei\xF0sluuppl\xFDsingar",
280
+ "googlepay.title": "Google Pay",
281
+ "stored-cards.expiryDate": "Gildisdagur",
282
+ "stored-cards.securityCode3Digits": "\xD6ryggisk\xF3\xF0i",
283
+ "stored-cards.securityCode3DigitsOptional": "\xD6ryggisk\xF3\xF0i (valkv\xE6tt)",
284
+ "stored-cards.securityCode3DigitsInfo": "3 t\xF6lustafir aftan \xE1 kortinu",
285
+ "stored-cards.securityCode4DigitsInfo": "4 t\xF6lustafir aftan \xE1 kortinu",
286
+ "stored-cards.removeStoredCard": "Fjarl\xE6gja",
287
+ "stored-cards.removeStoredCardQuestion": "Fjarl\xE6gja geymdan grei\xF0slum\xE1ta?",
288
+ "stored-cards.removeStoredCardQuestionYesRemove": "J\xE1, fjarl\xE6gja",
289
+ "stored-cards.removeStoredCardQuestionCancel": "H\xE6tta vi\xF0",
290
+ "success.paymentAuthorized": "Grei\xF0sla sam\xFEykkt",
291
+ "error.unknownError": "\xD3\xFEekkt villa kom upp",
292
+ "error.failedToInitializeStraumurWebComponent": "Mist\xF3kst a\xF0 s\xE6kja Straumur Web hluta",
293
+ "error.failedToInitializePaymentMethods": "Mist\xF3kst a\xF0 s\xE6kja grei\xF0slum\xE1ta",
294
+ "error.failedToSubmitPayment": "Mist\xF3kst a\xF0 senda grei\xF0slu",
295
+ "error.paymentFailed": "Grei\xF0sla mist\xF3kst",
296
+ "error.paymentUnsuccessful": "Grei\xF0sla ekki tekin",
297
+ "error.failedToSubmitPaymentDetails": "Mist\xF3kst a\xF0 senda grei\xF0sluuppl\xFDsingar",
298
+ "error.paymentDetailsFailed": "Mist\xF3kst a\xF0 s\xE6kja grei\xF0sluuppl\xFDsingar",
299
+ "error.googlePayNotAvailable": "Google Pay ekki \xED bo\xF0i",
300
+ "error.failedToSubmitRemoveStoredPaymentCard": "Mist\xF3kst a\xF0 fjarl\xE6gja geymdan grei\xF0slum\xE1ta",
301
+ "error.failedToRemoveStoredPaymentCard": "Geymdur grei\xF0slum\xE1ti var ekki fjarl\xE6g\xF0ur"
302
+ }
303
+ };
304
+
305
+ // src/localizations/i18n.ts
306
+ function i18n(language, key) {
307
+ return translations[language][key] || key;
308
+ }
309
+
310
+ // src/components/tooltip/tooltip.tsx
311
+ var import_preact3 = require("preact");
312
+
313
+ // src/components/tooltip/tooltip.css
314
+ styleInject(".core-tooltip__content {\n position: absolute;\n z-index: 50;\n padding: 0.5rem;\n border-radius: 0.5rem;\n right: 40%;\n top: 100%;\n width: max-content;\n color: #ffffff;\n background-color: #002649;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n}\n");
315
+
316
+ // src/components/tooltip/tooltip.tsx
317
+ var import_hooks2 = require("preact/hooks");
318
+ var Tooltip = ({ children, content }) => {
319
+ const [isVisible, setIsVisible] = (0, import_hooks2.useState)(false);
320
+ const triggerRef = (0, import_hooks2.useRef)(null);
321
+ const handleMouseEnter = () => {
322
+ setIsVisible(true);
323
+ };
324
+ const handleMouseLeave = () => {
325
+ setIsVisible(false);
326
+ };
327
+ return /* @__PURE__ */ (0, import_preact3.h)("div", { style: { position: "relative" } }, /* @__PURE__ */ (0, import_preact3.h)("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, children), isVisible && triggerRef && /* @__PURE__ */ (0, import_preact3.h)("div", { className: "core-tooltip__content" }, content));
328
+ };
329
+
330
+ // src/assets/icons/card.tsx
331
+ var import_preact4 = require("preact");
332
+ var CardIcon = () => /* @__PURE__ */ (0, import_preact4.h)(
333
+ "svg",
334
+ {
335
+ xmlns: "http://www.w3.org/2000/svg",
336
+ width: "40",
337
+ height: "26",
338
+ viewBox: "0 0 24 24",
339
+ fill: "none"
340
+ },
341
+ /* @__PURE__ */ (0, import_preact4.h)("path", { d: "M24 11H0V7H24V11Z", fill: "#002649" }),
342
+ /* @__PURE__ */ (0, import_preact4.h)(
343
+ "path",
344
+ {
345
+ opacity: "0.4",
346
+ d: "M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z",
347
+ fill: "#002649"
348
+ }
349
+ )
350
+ );
351
+ var card_default = CardIcon;
352
+
353
+ // src/assets/icons/info.tsx
354
+ var import_preact5 = require("preact");
355
+ var InfoIcon = () => /* @__PURE__ */ (0, import_preact5.h)("svg", { width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ (0, import_preact5.h)("g", { "clip-path": "url(#clip0_10626_39119)" }, /* @__PURE__ */ (0, import_preact5.h)(
356
+ "path",
357
+ {
358
+ d: "M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z",
359
+ fill: "#002649"
360
+ }
361
+ ), /* @__PURE__ */ (0, import_preact5.h)(
362
+ "path",
363
+ {
364
+ opacity: "0.4",
365
+ d: "M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z",
366
+ fill: "#002649"
367
+ }
368
+ )), /* @__PURE__ */ (0, import_preact5.h)("defs", null, /* @__PURE__ */ (0, import_preact5.h)("clipPath", { id: "clip0_10626_39119" }, /* @__PURE__ */ (0, import_preact5.h)("rect", { width: "20", height: "20", fill: "white", transform: "translate(0.664062)" }))));
369
+ var info_default = InfoIcon;
370
+
371
+ // src/utils/renderBrandIcons.tsx
372
+ var import_preact14 = require("preact");
373
+
374
+ // src/assets/icons/mastercard.tsx
375
+ var import_preact6 = require("preact");
376
+ var MasterCardIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact6.h)(
377
+ "svg",
378
+ {
379
+ xmlns: "http://www.w3.org/2000/svg",
380
+ width: "40",
381
+ height: "26",
382
+ viewBox: "0 0 40 26",
383
+ opacity
384
+ },
385
+ /* @__PURE__ */ (0, import_preact6.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" }),
386
+ /* @__PURE__ */ (0, import_preact6.h)("path", { fill: "#F06022", d: "M16.13 19.29h7.74V6.7h-7.74v12.58z" }),
387
+ /* @__PURE__ */ (0, import_preact6.h)(
388
+ "path",
389
+ {
390
+ fill: "#EA1D25",
391
+ d: "M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"
392
+ }
393
+ ),
394
+ /* @__PURE__ */ (0, import_preact6.h)(
395
+ "path",
396
+ {
397
+ fill: "#F79D1D",
398
+ d: "M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"
399
+ }
400
+ )
401
+ );
402
+ var mastercard_default = MasterCardIcon;
403
+
404
+ // src/assets/icons/visa.tsx
405
+ var import_preact7 = require("preact");
406
+ var VisaIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact7.h)(
407
+ "svg",
408
+ {
409
+ xmlns: "http://www.w3.org/2000/svg",
410
+ width: "40",
411
+ height: "26",
412
+ fill: "none",
413
+ viewBox: "0 0 40 26",
414
+ opacity
415
+ },
416
+ /* @__PURE__ */ (0, import_preact7.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" }),
417
+ /* @__PURE__ */ (0, import_preact7.h)(
418
+ "path",
419
+ {
420
+ fill: "#1434CB",
421
+ d: "m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z"
422
+ }
423
+ )
424
+ );
425
+ var visa_default = VisaIcon;
426
+
427
+ // src/assets/icons/maestro.tsx
428
+ var import_preact8 = require("preact");
429
+ var MaestroIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact8.h)(
430
+ "svg",
431
+ {
432
+ xmlns: "http://www.w3.org/2000/svg",
433
+ width: "40",
434
+ height: "26",
435
+ fill: "none",
436
+ viewBox: "0 0 40 26",
437
+ opacity
438
+ },
439
+ /* @__PURE__ */ (0, import_preact8.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" }),
440
+ /* @__PURE__ */ (0, import_preact8.h)("path", { fill: "#7773B4", d: "M16.13 19.29h7.74V6.7h-7.74v12.58z" }),
441
+ /* @__PURE__ */ (0, import_preact8.h)(
442
+ "path",
443
+ {
444
+ fill: "#EA1D25",
445
+ d: "M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"
446
+ }
447
+ ),
448
+ /* @__PURE__ */ (0, import_preact8.h)(
449
+ "path",
450
+ {
451
+ fill: "#139FDA",
452
+ d: "M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"
453
+ }
454
+ )
455
+ );
456
+ var maestro_default = MaestroIcon;
457
+
458
+ // src/assets/icons/amex.tsx
459
+ var import_preact9 = require("preact");
460
+ var AmexIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact9.h)(
461
+ "svg",
462
+ {
463
+ xmlns: "http://www.w3.org/2000/svg",
464
+ viewBox: "0 0 40 26",
465
+ width: "40",
466
+ height: "26",
467
+ opacity
468
+ },
469
+ /* @__PURE__ */ (0, import_preact9.h)("path", { fill: "#016FD0", d: "M0 26h40V0H0v26z" }),
470
+ /* @__PURE__ */ (0, import_preact9.h)(
471
+ "path",
472
+ {
473
+ fill: "#fff",
474
+ "fill-rule": "evenodd",
475
+ d: "M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z"
476
+ }
477
+ )
478
+ );
479
+ var amex_default = AmexIcon;
480
+
481
+ // src/assets/icons/jcb.tsx
482
+ var import_preact10 = require("preact");
483
+ var JcbIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact10.h)(
484
+ "svg",
485
+ {
486
+ xmlns: "http://www.w3.org/2000/svg",
487
+ width: "40",
488
+ height: "26",
489
+ fill: "none",
490
+ viewBox: "0 0 40 26",
491
+ opacity
492
+ },
493
+ /* @__PURE__ */ (0, import_preact10.h)("g", { "clip-path": "url(#a)" }, /* @__PURE__ */ (0, import_preact10.h)("path", { fill: "#fff", d: "M0 0h40v26H0V0Z" }), /* @__PURE__ */ (0, import_preact10.h)(
494
+ "path",
495
+ {
496
+ fill: "#fff",
497
+ d: "M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z"
498
+ }
499
+ ), /* @__PURE__ */ (0, import_preact10.h)(
500
+ "path",
501
+ {
502
+ fill: "url(#b)",
503
+ d: "M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z"
504
+ }
505
+ ), /* @__PURE__ */ (0, import_preact10.h)(
506
+ "path",
507
+ {
508
+ fill: "url(#c)",
509
+ d: "M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z"
510
+ }
511
+ ), /* @__PURE__ */ (0, import_preact10.h)(
512
+ "path",
513
+ {
514
+ fill: "url(#d)",
515
+ d: "M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z"
516
+ }
517
+ ), /* @__PURE__ */ (0, import_preact10.h)(
518
+ "path",
519
+ {
520
+ fill: "url(#e)",
521
+ d: "M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z"
522
+ }
523
+ ), /* @__PURE__ */ (0, import_preact10.h)(
524
+ "path",
525
+ {
526
+ fill: "url(#f)",
527
+ d: "M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z"
528
+ }
529
+ )),
530
+ /* @__PURE__ */ (0, import_preact10.h)("defs", null, /* @__PURE__ */ (0, import_preact10.h)(
531
+ "linearGradient",
532
+ {
533
+ id: "b",
534
+ x1: "25.52",
535
+ x2: "34.75",
536
+ y1: "14.38",
537
+ y2: "14.38",
538
+ gradientUnits: "userSpaceOnUse"
539
+ },
540
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "0", "stop-color": "#007940" }),
541
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".23", "stop-color": "#00873F" }),
542
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".74", "stop-color": "#40A737" }),
543
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "1", "stop-color": "#5CB531" })
544
+ ), /* @__PURE__ */ (0, import_preact10.h)(
545
+ "linearGradient",
546
+ {
547
+ id: "c",
548
+ x1: "25.52",
549
+ x2: "34.75",
550
+ y1: "12.94",
551
+ y2: "12.94",
552
+ gradientUnits: "userSpaceOnUse"
553
+ },
554
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "0", "stop-color": "#007940" }),
555
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".23", "stop-color": "#00873F" }),
556
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".74", "stop-color": "#40A737" }),
557
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "1", "stop-color": "#5CB531" })
558
+ ), /* @__PURE__ */ (0, import_preact10.h)(
559
+ "linearGradient",
560
+ {
561
+ id: "d",
562
+ x1: "25.52",
563
+ x2: "34.75",
564
+ y1: "11.37",
565
+ y2: "11.37",
566
+ gradientUnits: "userSpaceOnUse"
567
+ },
568
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "0", "stop-color": "#007940" }),
569
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".23", "stop-color": "#00873F" }),
570
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".74", "stop-color": "#40A737" }),
571
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "1", "stop-color": "#5CB531" })
572
+ ), /* @__PURE__ */ (0, import_preact10.h)(
573
+ "linearGradient",
574
+ {
575
+ id: "e",
576
+ x1: "4.86",
577
+ x2: "14.24",
578
+ y1: "12.94",
579
+ y2: "12.94",
580
+ gradientUnits: "userSpaceOnUse"
581
+ },
582
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "0", "stop-color": "#1F286F" }),
583
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".48", "stop-color": "#004E94" }),
584
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".83", "stop-color": "#0066B1" }),
585
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "1", "stop-color": "#006FBC" })
586
+ ), /* @__PURE__ */ (0, import_preact10.h)(
587
+ "linearGradient",
588
+ {
589
+ id: "f",
590
+ x1: "15.15",
591
+ x2: "24.25",
592
+ y1: "12.94",
593
+ y2: "12.94",
594
+ gradientUnits: "userSpaceOnUse"
595
+ },
596
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "0", "stop-color": "#6C2C2F" }),
597
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".17", "stop-color": "#882730" }),
598
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".57", "stop-color": "#BE1833" }),
599
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: ".86", "stop-color": "#DC0436" }),
600
+ /* @__PURE__ */ (0, import_preact10.h)("stop", { offset: "1", "stop-color": "#E60039" })
601
+ ), /* @__PURE__ */ (0, import_preact10.h)("clipPath", { id: "a" }, /* @__PURE__ */ (0, import_preact10.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" })))
602
+ );
603
+ var jcb_default = JcbIcon;
604
+
605
+ // src/assets/icons/diners.tsx
606
+ var import_preact11 = require("preact");
607
+ var DinersIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact11.h)(
608
+ "svg",
609
+ {
610
+ xmlns: "http://www.w3.org/2000/svg",
611
+ viewBox: "0 0 40 26",
612
+ width: "40",
613
+ height: "26",
614
+ opacity
615
+ },
616
+ /* @__PURE__ */ (0, import_preact11.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" }),
617
+ /* @__PURE__ */ (0, import_preact11.h)("g", { fill: "#1a1918" }, /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z" }), /* @__PURE__ */ (0, import_preact11.h)("path", { d: "m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z" })),
618
+ /* @__PURE__ */ (0, import_preact11.h)(
619
+ "path",
620
+ {
621
+ fill: "#fff",
622
+ d: "M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78"
623
+ }
624
+ ),
625
+ /* @__PURE__ */ (0, import_preact11.h)(
626
+ "path",
627
+ {
628
+ fill: "#154a78",
629
+ d: "M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z"
630
+ }
631
+ )
632
+ );
633
+ var diners_default = DinersIcon;
634
+
635
+ // src/assets/icons/discover.tsx
636
+ var import_preact12 = require("preact");
637
+ var DiscoverIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact12.h)(
638
+ "svg",
639
+ {
640
+ xmlns: "http://www.w3.org/2000/svg",
641
+ width: "40",
642
+ height: "26",
643
+ fill: "none",
644
+ viewBox: "0 0 40 26",
645
+ opacity
646
+ },
647
+ /* @__PURE__ */ (0, import_preact12.h)("path", { fill: "#fff", d: "M0 0h40v26H0z" }),
648
+ /* @__PURE__ */ (0, import_preact12.h)("g", { "clip-path": "url(#a)" }, /* @__PURE__ */ (0, import_preact12.h)("g", { "clip-path": "url(#b)" }, /* @__PURE__ */ (0, import_preact12.h)(
649
+ "path",
650
+ {
651
+ fill: "#000",
652
+ d: "M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"
653
+ }
654
+ )), /* @__PURE__ */ (0, import_preact12.h)(
655
+ "path",
656
+ {
657
+ fill: "#000",
658
+ d: "M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"
659
+ }
660
+ ), /* @__PURE__ */ (0, import_preact12.h)(
661
+ "path",
662
+ {
663
+ fill: "url(#c)",
664
+ d: "M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"
665
+ }
666
+ ), /* @__PURE__ */ (0, import_preact12.h)(
667
+ "path",
668
+ {
669
+ fill: "url(#d)",
670
+ d: "M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"
671
+ }
672
+ ), /* @__PURE__ */ (0, import_preact12.h)(
673
+ "mask",
674
+ {
675
+ id: "e",
676
+ width: "6",
677
+ height: "6",
678
+ x: "18",
679
+ y: "10",
680
+ maskUnits: "userSpaceOnUse",
681
+ style: "mask-type:luminance"
682
+ },
683
+ /* @__PURE__ */ (0, import_preact12.h)(
684
+ "path",
685
+ {
686
+ fill: "#fff",
687
+ d: "M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"
688
+ }
689
+ )
690
+ ), /* @__PURE__ */ (0, import_preact12.h)("g", { mask: "url(#e)" }, /* @__PURE__ */ (0, import_preact12.h)(
691
+ "path",
692
+ {
693
+ fill: "url(#f)",
694
+ d: "M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"
695
+ }
696
+ ))),
697
+ /* @__PURE__ */ (0, import_preact12.h)("g", { "clip-path": "url(#g)" }, /* @__PURE__ */ (0, import_preact12.h)("g", { "clip-path": "url(#h)" }, /* @__PURE__ */ (0, import_preact12.h)(
698
+ "path",
699
+ {
700
+ fill: "#000",
701
+ d: "M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"
702
+ }
703
+ )), /* @__PURE__ */ (0, import_preact12.h)(
704
+ "path",
705
+ {
706
+ fill: "#000",
707
+ d: "M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"
708
+ }
709
+ ), /* @__PURE__ */ (0, import_preact12.h)(
710
+ "path",
711
+ {
712
+ fill: "url(#i)",
713
+ d: "M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"
714
+ }
715
+ ), /* @__PURE__ */ (0, import_preact12.h)(
716
+ "path",
717
+ {
718
+ fill: "url(#j)",
719
+ d: "M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"
720
+ }
721
+ ), /* @__PURE__ */ (0, import_preact12.h)(
722
+ "mask",
723
+ {
724
+ id: "k",
725
+ width: "6",
726
+ height: "6",
727
+ x: "18",
728
+ y: "10",
729
+ maskUnits: "userSpaceOnUse",
730
+ style: "mask-type:luminance"
731
+ },
732
+ /* @__PURE__ */ (0, import_preact12.h)(
733
+ "path",
734
+ {
735
+ fill: "#fff",
736
+ d: "M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"
737
+ }
738
+ )
739
+ ), /* @__PURE__ */ (0, import_preact12.h)("g", { mask: "url(#k)" }, /* @__PURE__ */ (0, import_preact12.h)(
740
+ "path",
741
+ {
742
+ fill: "url(#l)",
743
+ d: "M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"
744
+ }
745
+ ))),
746
+ /* @__PURE__ */ (0, import_preact12.h)("defs", null, /* @__PURE__ */ (0, import_preact12.h)(
747
+ "linearGradient",
748
+ {
749
+ id: "c",
750
+ x1: "22.25",
751
+ x2: "19.35",
752
+ y1: "15.06",
753
+ y2: "10.42",
754
+ gradientUnits: "userSpaceOnUse"
755
+ },
756
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F59F00" }),
757
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".19", "stop-color": "#F49B00" }),
758
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".37", "stop-color": "#F29101" }),
759
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".5", "stop-color": "#F08302" }),
760
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".6", "stop-color": "#EE7905" }),
761
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".76", "stop-color": "#EC7008" }),
762
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "1", "stop-color": "#EC6D09" })
763
+ ), /* @__PURE__ */ (0, import_preact12.h)(
764
+ "linearGradient",
765
+ {
766
+ id: "d",
767
+ x1: "22.25",
768
+ x2: "19.35",
769
+ y1: "15.06",
770
+ y2: "10.42",
771
+ gradientUnits: "userSpaceOnUse"
772
+ },
773
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F3941E", "stop-opacity": "0" }),
774
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".04", "stop-color": "#F48C1C", "stop-opacity": ".08" }),
775
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".2", "stop-color": "#F77314", "stop-opacity": ".32" }),
776
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".35", "stop-color": "#F95D0E", "stop-opacity": ".53" }),
777
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".5", "stop-color": "#FB4B09", "stop-opacity": ".7" }),
778
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".64", "stop-color": "#FD3D05", "stop-opacity": ".83" }),
779
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".77", "stop-color": "#FE3302", "stop-opacity": ".92" }),
780
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".9", "stop-color": "#FF2D01", "stop-opacity": ".98" }),
781
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "1", "stop-color": "#FF2B00" })
782
+ ), /* @__PURE__ */ (0, import_preact12.h)(
783
+ "radialGradient",
784
+ {
785
+ id: "f",
786
+ cx: "0",
787
+ cy: "0",
788
+ r: "1",
789
+ gradientTransform: "rotate(4.24 -167.26 291.02) scale(3.3208)",
790
+ gradientUnits: "userSpaceOnUse"
791
+ },
792
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F3941E", "stop-opacity": "0" }),
793
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".45", "stop-color": "#EA8D1D", "stop-opacity": ".05" }),
794
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".66", "stop-color": "#CA7618", "stop-opacity": ".2" }),
795
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".83", "stop-color": "#924D10", "stop-opacity": ".48" }),
796
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".96", "stop-color": "#441304", "stop-opacity": ".87" }),
797
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".99", "stop-color": "#2F0401", "stop-opacity": ".97" })
798
+ ), /* @__PURE__ */ (0, import_preact12.h)(
799
+ "linearGradient",
800
+ {
801
+ id: "i",
802
+ x1: "22.25",
803
+ x2: "19.35",
804
+ y1: "15.06",
805
+ y2: "10.42",
806
+ gradientUnits: "userSpaceOnUse"
807
+ },
808
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F59F00" }),
809
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".19", "stop-color": "#F49B00" }),
810
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".37", "stop-color": "#F29101" }),
811
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".5", "stop-color": "#F08302" }),
812
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".6", "stop-color": "#EE7905" }),
813
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".76", "stop-color": "#EC7008" }),
814
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "1", "stop-color": "#EC6D09" })
815
+ ), /* @__PURE__ */ (0, import_preact12.h)(
816
+ "linearGradient",
817
+ {
818
+ id: "j",
819
+ x1: "22.25",
820
+ x2: "19.35",
821
+ y1: "15.06",
822
+ y2: "10.42",
823
+ gradientUnits: "userSpaceOnUse"
824
+ },
825
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F3941E", "stop-opacity": "0" }),
826
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".04", "stop-color": "#F48C1C", "stop-opacity": ".08" }),
827
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".2", "stop-color": "#F77314", "stop-opacity": ".32" }),
828
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".35", "stop-color": "#F95D0E", "stop-opacity": ".53" }),
829
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".5", "stop-color": "#FB4B09", "stop-opacity": ".7" }),
830
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".64", "stop-color": "#FD3D05", "stop-opacity": ".83" }),
831
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".77", "stop-color": "#FE3302", "stop-opacity": ".92" }),
832
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".9", "stop-color": "#FF2D01", "stop-opacity": ".98" }),
833
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "1", "stop-color": "#FF2B00" })
834
+ ), /* @__PURE__ */ (0, import_preact12.h)(
835
+ "radialGradient",
836
+ {
837
+ id: "l",
838
+ cx: "0",
839
+ cy: "0",
840
+ r: "1",
841
+ gradientTransform: "rotate(4.24 -167.26 291.02) scale(3.3208)",
842
+ gradientUnits: "userSpaceOnUse"
843
+ },
844
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: "0", "stop-color": "#F3941E", "stop-opacity": "0" }),
845
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".45", "stop-color": "#EA8D1D", "stop-opacity": ".05" }),
846
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".66", "stop-color": "#CA7618", "stop-opacity": ".2" }),
847
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".83", "stop-color": "#924D10", "stop-opacity": ".48" }),
848
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".96", "stop-color": "#441304", "stop-opacity": ".87" }),
849
+ /* @__PURE__ */ (0, import_preact12.h)("stop", { offset: ".99", "stop-color": "#2F0401", "stop-opacity": ".97" })
850
+ ), /* @__PURE__ */ (0, import_preact12.h)("clipPath", { id: "a" }, /* @__PURE__ */ (0, import_preact12.h)("path", { fill: "#fff", d: "M0 0h33v5.55H0z", transform: "translate(3.5 10)" })), /* @__PURE__ */ (0, import_preact12.h)("clipPath", { id: "b" }, /* @__PURE__ */ (0, import_preact12.h)("path", { fill: "#fff", d: "M0 0h33v5.86H0z", transform: "translate(3.5 10)" })), /* @__PURE__ */ (0, import_preact12.h)("clipPath", { id: "g" }, /* @__PURE__ */ (0, import_preact12.h)("path", { fill: "#fff", d: "M0 0h33v5.55H0z", transform: "translate(3.5 10)" })), /* @__PURE__ */ (0, import_preact12.h)("clipPath", { id: "h" }, /* @__PURE__ */ (0, import_preact12.h)("path", { fill: "#fff", d: "M0 0h33v5.86H0z", transform: "translate(3.5 10)" })))
851
+ );
852
+ var discover_default = DiscoverIcon;
853
+
854
+ // src/assets/icons/cup.tsx
855
+ var import_preact13 = require("preact");
856
+ var CupIcon = ({ opacity = 1 }) => /* @__PURE__ */ (0, import_preact13.h)(
857
+ "svg",
858
+ {
859
+ xmlns: "http://www.w3.org/2000/svg",
860
+ viewBox: "0 0 40 26",
861
+ width: "40",
862
+ height: "26",
863
+ opacity
864
+ },
865
+ /* @__PURE__ */ (0, import_preact13.h)("rect", { width: "45.3", height: "27", x: "-3.3", y: "-.79", fill: "#fff", rx: "2.82" }),
866
+ /* @__PURE__ */ (0, import_preact13.h)(
867
+ "path",
868
+ {
869
+ fill: "#01798a",
870
+ d: "M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8"
871
+ }
872
+ ),
873
+ /* @__PURE__ */ (0, import_preact13.h)(
874
+ "rect",
875
+ {
876
+ width: "20.38",
877
+ height: "29.02",
878
+ x: "-4",
879
+ y: "-.79",
880
+ fill: "#dc1f2b",
881
+ rx: "2.82"
882
+ }
883
+ ),
884
+ /* @__PURE__ */ (0, import_preact13.h)(
885
+ "path",
886
+ {
887
+ fill: "#1a4580",
888
+ d: "M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z"
889
+ }
890
+ ),
891
+ /* @__PURE__ */ (0, import_preact13.h)(
892
+ "path",
893
+ {
894
+ fill: "#fff",
895
+ d: "M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2"
896
+ }
897
+ )
898
+ );
899
+ var cup_default = CupIcon;
900
+
901
+ // src/utils/custom-hooks/use-media-query.ts
902
+ var import_hooks3 = require("preact/hooks");
903
+ function useMediaQuery(query) {
904
+ const getMatch = () => window.matchMedia(query).matches;
905
+ const [matches, setMatches] = (0, import_hooks3.useState)(getMatch);
906
+ (0, import_hooks3.useEffect)(() => {
907
+ const mediaQueryList = window.matchMedia(query);
908
+ const listener = (event) => setMatches(event.matches);
909
+ setMatches(mediaQueryList.matches);
910
+ mediaQueryList.addEventListener("change", listener);
911
+ return () => {
912
+ mediaQueryList.removeEventListener("change", listener);
913
+ };
914
+ }, [query]);
915
+ return matches;
916
+ }
917
+
918
+ // src/utils/renderBrandIcons.tsx
919
+ function RenderBrandIcons({ brands, brandHidden = [], limit = 3 }) {
920
+ const isWidth380 = useMediaQuery("(max-width: 380px)");
921
+ const isWidth335 = useMediaQuery("(max-width: 335px)");
922
+ const widthLimit = isWidth335 ? 1 : isWidth380 ? 2 : limit;
923
+ const brandToShow = brands.filter((brand) => {
924
+ const { brand: brandName } = brand;
925
+ const hidden = brandHidden.some((x) => x.brand === brandName);
926
+ return !hidden;
927
+ });
928
+ return /* @__PURE__ */ (0, import_preact14.h)(import_preact14.Fragment, null, brandToShow.map(({ brand }, index) => {
929
+ if (index >= Math.min(limit, widthLimit)) {
930
+ if (index === Math.min(limit, widthLimit)) {
931
+ return /* @__PURE__ */ (0, import_preact14.h)(
932
+ Tooltip,
933
+ {
934
+ content: /* @__PURE__ */ (0, import_preact14.h)("span", { style: { display: "flex", gap: "4px", overflow: "visible" } }, brandToShow.slice(Math.min(limit, widthLimit)).map(({ brand: brand2 }) => /* @__PURE__ */ (0, import_preact14.h)(RenderBrandIcon, { key: brand2, brand: brand2 })))
935
+ },
936
+ /* @__PURE__ */ (0, import_preact14.h)("span", { key: brand, className: "render-brand-icons__overflow" }, "+", brandToShow.length - Math.min(limit, widthLimit))
937
+ );
938
+ }
939
+ return null;
940
+ }
941
+ return /* @__PURE__ */ (0, import_preact14.h)(RenderBrandIcon, { key: brand, brand });
942
+ }));
943
+ }
944
+ var RenderBrandIcon = ({ brand }) => {
945
+ switch (brand) {
946
+ case "visa":
947
+ return /* @__PURE__ */ (0, import_preact14.h)(visa_default, null);
948
+ case "mc":
949
+ return /* @__PURE__ */ (0, import_preact14.h)(mastercard_default, null);
950
+ case "maestro":
951
+ return /* @__PURE__ */ (0, import_preact14.h)(maestro_default, null);
952
+ case "amex":
953
+ return /* @__PURE__ */ (0, import_preact14.h)(amex_default, null);
954
+ case "jcb":
955
+ return /* @__PURE__ */ (0, import_preact14.h)(jcb_default, null);
956
+ case "diners":
957
+ return /* @__PURE__ */ (0, import_preact14.h)(diners_default, null);
958
+ case "discover":
959
+ return /* @__PURE__ */ (0, import_preact14.h)(discover_default, null);
960
+ case "cup":
961
+ return /* @__PURE__ */ (0, import_preact14.h)(cup_default, null);
962
+ default:
963
+ return /* @__PURE__ */ (0, import_preact14.h)("span", null, brand);
964
+ }
965
+ };
966
+
967
+ // src/assets/icons/loader.tsx
968
+ var import_preact15 = require("preact");
969
+ var LoaderIcon = () => /* @__PURE__ */ (0, import_preact15.h)("svg", { width: "40", height: "40", viewBox: "0 0 40 40", xmlns: "http://www.w3.org/2000/svg", stroke: "#002649" }, /* @__PURE__ */ (0, import_preact15.h)("g", { fill: "none", "fill-rule": "evenodd" }, /* @__PURE__ */ (0, import_preact15.h)("g", { transform: "translate(2 2)", "stroke-width": "4" }, /* @__PURE__ */ (0, import_preact15.h)("circle", { "stroke-opacity": ".3", cx: "18", cy: "18", r: "18" }), /* @__PURE__ */ (0, import_preact15.h)("path", { d: "M36 18c0-9.94-8.06-18-18-18" }, /* @__PURE__ */ (0, import_preact15.h)(
970
+ "animateTransform",
971
+ {
972
+ attributeName: "transform",
973
+ type: "rotate",
974
+ from: "0 18 18",
975
+ to: "360 18 18",
976
+ dur: "1s",
977
+ repeatCount: "indefinite"
978
+ }
979
+ )))));
980
+ var loader_default = LoaderIcon;
981
+
982
+ // src/assets/icons/checkmark.tsx
983
+ var import_preact16 = require("preact");
984
+ var CheckmarkIcon = () => /* @__PURE__ */ (0, import_preact16.h)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "13", viewBox: "0 0 16 13", fill: "none" }, /* @__PURE__ */ (0, import_preact16.h)("path", { d: "M2 7L6 11L14 2", stroke: "#002649", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" }));
985
+ var checkmark_default = CheckmarkIcon;
986
+
987
+ // src/features/card/card-component.tsx
988
+ function CardComponent({ configuration, paymentMethods }) {
989
+ var _a, _b, _c;
990
+ const cardElementRef = (0, import_hooks4.useRef)(null);
991
+ const adyenCardRef = (0, import_hooks4.useRef)();
992
+ const customCardRef = (0, import_hooks4.useRef)();
993
+ const [payButtonDisabled, setPayButtonDisabled] = (0, import_hooks4.useState)(true);
994
+ const [securityCodePolicy, setSecurityCodePolicy] = (0, import_hooks4.useState)("required");
995
+ const [storePaymentMethod, setStorePaymentMethod] = (0, import_hooks4.useState)(false);
996
+ const storePaymentMethodRef = (0, import_hooks4.useRef)(false);
997
+ const [brandHidden, setBrandHidden] = (0, import_hooks4.useState)([]);
998
+ const [formErrors, setFormErrors] = (0, import_hooks4.useState)({
999
+ encryptedCardNumber: { visible: false },
1000
+ encryptedExpiryDate: { visible: false },
1001
+ encryptedSecurityCode: { visible: false }
1002
+ });
1003
+ if (!((_a = paymentMethods.paymentMethods.paymentMethods) == null ? void 0 : _a.some((x) => x.type === "scheme"))) {
1004
+ return null;
1005
+ }
1006
+ const {
1007
+ activePaymentMethod,
1008
+ setActivePaymentMethod,
1009
+ isPaymentMethodInitialized,
1010
+ updatePaymentMethodInitialization,
1011
+ threeDSecureRef,
1012
+ handleSuccess,
1013
+ handleError,
1014
+ setThreeDSecureActive
1015
+ } = usePaymentMethodGroup();
1016
+ const schemeBrands = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "scheme").brands;
1017
+ const initializeAdyenComponent = async () => {
1018
+ adyenCardRef.current = await (0, import_adyen_web.AdyenCheckout)({
1019
+ clientKey: paymentMethods.clientKey,
1020
+ locale: configuration.locale,
1021
+ environment: configuration.environment,
1022
+ countryCode: "IS",
1023
+ paymentMethodsResponse: paymentMethods.paymentMethods,
1024
+ onError: handleOnError,
1025
+ onSubmit: handleOnSubmit,
1026
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1027
+ onPaymentCompleted: configuration.onPaymentCompleted,
1028
+ onPaymentFailed: configuration.onPaymentFailed
1029
+ });
1030
+ customCardRef.current = new import_adyen_web.CustomCard(adyenCardRef.current, {
1031
+ placeholders: configuration.placeholders,
1032
+ challengeWindowSize: "05",
1033
+ // looks like not working
1034
+ brands: schemeBrands,
1035
+ onBrand: (event) => {
1036
+ setSecurityCodePolicy(event.cvcPolicy);
1037
+ if (event.brand === "card") {
1038
+ setBrandHidden([]);
1039
+ return;
1040
+ }
1041
+ setBrandHidden(
1042
+ schemeBrands.filter((x) => x !== event.brand).map((x) => {
1043
+ return {
1044
+ brand: x
1045
+ };
1046
+ })
1047
+ );
1048
+ },
1049
+ onConfigSuccess() {
1050
+ updatePaymentMethodInitialization("card", true);
1051
+ },
1052
+ onValidationError: (event) => {
1053
+ const defaultErrors = {
1054
+ encryptedCardNumber: { visible: false, message: void 0 },
1055
+ encryptedExpiryDate: { visible: false, message: void 0 },
1056
+ encryptedSecurityCode: { visible: false, message: void 0 }
1057
+ };
1058
+ event.filter((x) => x.error).forEach((x) => {
1059
+ defaultErrors[x.fieldType].visible = true;
1060
+ defaultErrors[x.fieldType].message = x.errorI18n;
1061
+ });
1062
+ setFormErrors(defaultErrors);
1063
+ },
1064
+ onAllValid: (event) => {
1065
+ setPayButtonDisabled(!event.allValid);
1066
+ }
1067
+ });
1068
+ if (cardElementRef.current) {
1069
+ customCardRef.current.mount(cardElementRef.current);
1070
+ }
1071
+ };
1072
+ (0, import_hooks4.useEffect)(() => {
1073
+ if (activePaymentMethod === "card" && !isPaymentMethodInitialized.card) {
1074
+ initializeAdyenComponent();
1075
+ }
1076
+ }, [configuration, activePaymentMethod]);
1077
+ (0, import_hooks4.useEffect)(() => {
1078
+ if (customCardRef.current && isPaymentMethodInitialized.card) {
1079
+ initializeAdyenComponent();
1080
+ setFormErrors({
1081
+ encryptedCardNumber: { visible: false, message: void 0 },
1082
+ encryptedExpiryDate: { visible: false, message: void 0 },
1083
+ encryptedSecurityCode: { visible: false, message: void 0 }
1084
+ });
1085
+ }
1086
+ }, [configuration]);
1087
+ const handleBoxChange = () => {
1088
+ setActivePaymentMethod("card");
1089
+ };
1090
+ if (((_c = (_b = paymentMethods.paymentMethods) == null ? void 0 : _b.paymentMethods) == null ? void 0 : _c.length) === 0) {
1091
+ return null;
1092
+ }
1093
+ const brands = schemeBrands.map((x) => {
1094
+ return { brand: x, brandFullName: x };
1095
+ });
1096
+ function handleStorePaymentMethodChange(event) {
1097
+ setStorePaymentMethod(event.currentTarget.checked);
1098
+ }
1099
+ function handleOnError(_, __) {
1100
+ handleError("error.unknownError");
1101
+ }
1102
+ (0, import_hooks4.useEffect)(() => {
1103
+ storePaymentMethodRef.current = storePaymentMethod;
1104
+ }, [storePaymentMethod]);
1105
+ async function handleOnSubmit(state, _, actions) {
1106
+ const data = {
1107
+ ...state.data,
1108
+ origin: window.location.origin,
1109
+ storePaymentMethod: storePaymentMethodRef.current,
1110
+ sessionId: configuration.sessionId
1111
+ };
1112
+ const fetchResponse = await createPaymentRequest(configuration.environment, data);
1113
+ if (!fetchResponse.ok) {
1114
+ actions.reject();
1115
+ handleError("error.failedToSubmitPayment");
1116
+ return;
1117
+ }
1118
+ const response = await fetchResponse.json();
1119
+ if (!response.resultCode) {
1120
+ actions.reject();
1121
+ handleError("error.paymentFailed");
1122
+ return;
1123
+ }
1124
+ const { resultCode, action } = response;
1125
+ if (resultCode === "RedirectShopper" || resultCode === "IdentifyShopper") {
1126
+ setThreeDSecureActive(true);
1127
+ adyenCardRef.current.createFromAction(action).mount(threeDSecureRef == null ? void 0 : threeDSecureRef.current);
1128
+ return;
1129
+ }
1130
+ actions.resolve({ resultCode, action });
1131
+ if (resultCode === "Authorised") {
1132
+ handleSuccess("success.paymentAuthorized");
1133
+ } else {
1134
+ handleError("error.paymentUnsuccessful");
1135
+ }
1136
+ }
1137
+ async function handleOnSubmitAdditionalData(state, _, actions) {
1138
+ const data = {
1139
+ ...state.data,
1140
+ sessionId: configuration.sessionId
1141
+ };
1142
+ const fetchResponse = await createDetailsRequest(configuration.environment, data);
1143
+ if (!fetchResponse.ok) {
1144
+ actions.reject();
1145
+ handleError("error.failedToSubmitPaymentDetails");
1146
+ return;
1147
+ }
1148
+ const response = await fetchResponse.json();
1149
+ if (!response.resultCode) {
1150
+ actions.reject();
1151
+ handleError("error.paymentDetailsFailed");
1152
+ return;
1153
+ }
1154
+ const { resultCode, action } = response;
1155
+ actions.resolve({ resultCode, action });
1156
+ if (resultCode === "Authorised") {
1157
+ handleSuccess("success.paymentAuthorized");
1158
+ } else {
1159
+ handleError("error.paymentUnsuccessful");
1160
+ }
1161
+ }
1162
+ function handleSubmitClick() {
1163
+ if (!customCardRef.current) return;
1164
+ customCardRef.current.submit();
1165
+ }
1166
+ return /* @__PURE__ */ (0, import_preact17.h)("label", { className: "card-component" }, /* @__PURE__ */ (0, import_preact17.h)(
1167
+ "input",
1168
+ {
1169
+ type: "radio",
1170
+ className: "card-component__radio-selector",
1171
+ checked: activePaymentMethod === "card",
1172
+ onChange: handleBoxChange
1173
+ }
1174
+ ), /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component__content" }, /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component--circle" }), /* @__PURE__ */ (0, import_preact17.h)(card_default, null), /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component--text" }, i18n(configuration.locale, "cards.title")), /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component--brands" }, /* @__PURE__ */ (0, import_preact17.h)(RenderBrandIcons, { brands, brandHidden }))), /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__expandable", ref: cardElementRef }, !isPaymentMethodInitialized.card && /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__loading-text" }, /* @__PURE__ */ (0, import_preact17.h)(loader_default, null)), /* @__PURE__ */ (0, import_preact17.h)(
1175
+ "div",
1176
+ {
1177
+ className: "card-component__form",
1178
+ style: {
1179
+ opacity: isPaymentMethodInitialized.card ? 1 : 0,
1180
+ position: isPaymentMethodInitialized.card ? "relative" : "absolute",
1181
+ transition: "opacity 0.3s ease-in-out"
1182
+ }
1183
+ },
1184
+ /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__form--wrapper" }, /* @__PURE__ */ (0, import_preact17.h)(
1185
+ "label",
1186
+ {
1187
+ className: `${"card-component__form--wrapper--label"} ${formErrors.encryptedCardNumber.visible ? "card-component__form--wrapper--label--error" : ""}`
1188
+ },
1189
+ i18n(configuration.locale, "cards.cardNumber")
1190
+ ), /* @__PURE__ */ (0, import_preact17.h)(
1191
+ "span",
1192
+ {
1193
+ className: `${"card-component__form--wrapper--input"} ${formErrors.encryptedCardNumber.visible ? "card-component__form--wrapper--input--error" : ""}`,
1194
+ "data-cse": "encryptedCardNumber"
1195
+ }
1196
+ ), formErrors.encryptedCardNumber.visible && /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component__form--wrapper--error" }, formErrors.encryptedCardNumber.message)),
1197
+ /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__form--field-wrapper" }, /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__form--wrapper" }, /* @__PURE__ */ (0, import_preact17.h)(
1198
+ "label",
1199
+ {
1200
+ className: `${"card-component__form--wrapper--label"} ${formErrors.encryptedExpiryDate.visible ? "card-component__form--wrapper--label--error" : ""}`
1201
+ },
1202
+ i18n(configuration.locale, "cards.expiryDate")
1203
+ ), /* @__PURE__ */ (0, import_preact17.h)(
1204
+ "span",
1205
+ {
1206
+ className: `${"card-component__form--wrapper--input"} ${formErrors.encryptedExpiryDate.visible ? "card-component__form--wrapper--input--error" : ""}`,
1207
+ "data-cse": "encryptedExpiryDate"
1208
+ }
1209
+ ), formErrors.encryptedExpiryDate.visible && /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component__form--wrapper--error" }, formErrors.encryptedExpiryDate.message)), /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__form--wrapper" }, (securityCodePolicy === "optional" || securityCodePolicy === "required") && /* @__PURE__ */ (0, import_preact17.h)(import_preact17.Fragment, null, /* @__PURE__ */ (0, import_preact17.h)(
1210
+ "label",
1211
+ {
1212
+ className: `${"card-component__form--wrapper--label"} ${formErrors.encryptedSecurityCode.visible ? "card-component__form--wrapper--label--error" : ""}`
1213
+ },
1214
+ securityCodePolicy === "optional" ? i18n(configuration.locale, "cards.securityCode3DigitsOptional") : i18n(configuration.locale, "cards.securityCode3Digits")
1215
+ ), /* @__PURE__ */ (0, import_preact17.h)(
1216
+ "span",
1217
+ {
1218
+ className: `${"card-component__form--wrapper--input"} ${formErrors.encryptedSecurityCode.visible ? "card-component__form--wrapper--input--error" : ""}`,
1219
+ "data-cse": "encryptedSecurityCode"
1220
+ }
1221
+ ), formErrors.encryptedSecurityCode.visible && /* @__PURE__ */ (0, import_preact17.h)("span", { className: "card-component__form--wrapper--error" }, formErrors.encryptedSecurityCode.message), /* @__PURE__ */ (0, import_preact17.h)("div", { className: "card-component__form--wrapper--label--info" }, /* @__PURE__ */ (0, import_preact17.h)(Tooltip, { content: /* @__PURE__ */ (0, import_preact17.h)("span", null, i18n(configuration.locale, "cards.securityCode3DigitsInfo")) }, /* @__PURE__ */ (0, import_preact17.h)(info_default, null)))))),
1222
+ paymentMethods.enableStoreDetails === "AskForConsent" && /* @__PURE__ */ (0, import_preact17.h)("label", { className: "card-component__form--wrapper--label-checkbox" }, /* @__PURE__ */ (0, import_preact17.h)(
1223
+ "div",
1224
+ {
1225
+ className: `${"card-component__form--wrapper--label-checkbox--checkmark"} ${storePaymentMethod ? "card-component__form--wrapper--label-checkbox--checkmark--checked" : ""}`
1226
+ },
1227
+ /* @__PURE__ */ (0, import_preact17.h)(
1228
+ "div",
1229
+ {
1230
+ className: `${"card-component__form--wrapper--label-checkbox--checkmark--icon"} ${storePaymentMethod ? "card-component__form--wrapper--label-checkbox--checkmark--icon--checked" : ""}`
1231
+ },
1232
+ /* @__PURE__ */ (0, import_preact17.h)(checkmark_default, null)
1233
+ )
1234
+ ), /* @__PURE__ */ (0, import_preact17.h)(
1235
+ "input",
1236
+ {
1237
+ type: "checkbox",
1238
+ className: "card-component__form--wrapper--label-checkbox--checkbox",
1239
+ checked: storePaymentMethod,
1240
+ onChange: handleStorePaymentMethodChange
1241
+ }
1242
+ ), i18n(configuration.locale, "cards.storePaymentMethod")),
1243
+ /* @__PURE__ */ (0, import_preact17.h)("button", { className: "card-component__submit-button", disabled: payButtonDisabled, onClick: handleSubmitClick }, paymentMethods.formattedAmount)
1244
+ )));
1245
+ }
1246
+ var card_component_default = CardComponent;
1247
+
1248
+ // src/features/google-pay/google-pay-component.tsx
1249
+ var import_preact19 = require("preact");
1250
+ var import_hooks5 = require("preact/hooks");
1251
+
1252
+ // src/features/google-pay/google-pay-component.css
1253
+ styleInject('.google-pay-component {\n position: relative;\n cursor: pointer;\n background: white;\n border-radius: 12px;\n transition: all 0.3s ease;\n padding: 16px 24px;\n}\n.google-pay-component__radio-selector {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n}\n.google-pay-component__content {\n display: flex;\n align-items: center;\n gap: 12px;\n transition: background-color 0.3s ease;\n}\n.google-pay-component__radio-selector:checked + .google-pay-component__content {\n padding-bottom: 16px;\n}\n.google-pay-component--circle {\n width: 24px;\n height: 24px;\n border: 1px solid #e6ebef;\n background: #eef0f2;\n border-radius: 50%;\n position: relative;\n transition: all 0.3s ease;\n}\n.google-pay-component__content:hover .google-pay-component--circle {\n border: 1px solid #cdd8e2;\n}\n.google-pay-component--circle::after {\n content: "";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: transform 0.2s ease;\n}\n.google-pay-component__radio-selector:checked + .google-pay-component__content .google-pay-component--circle {\n background: #bce6f3;\n border-color: transparent;\n}\n.google-pay-component__radio-selector:checked + .google-pay-component__content .google-pay-component--circle::after {\n transform: translate(-50%, -50%) scale(1);\n background: #002649;\n height: 10px;\n width: 10px;\n}\n.google-pay-component--text {\n color: #213547;\n font-size: 1rem;\n user-select: none;\n}\n.google-pay-component__expandable {\n background: white;\n max-height: 0;\n overflow: hidden;\n transition: all 0.3s ease;\n opacity: 0;\n}\n.google-pay-component__radio-selector:checked ~ .google-pay-component__expandable {\n max-height: 400px;\n opacity: 1;\n}\n.google-pay-component__expandable p {\n margin: 0;\n color: #213547;\n font-size: 0.9rem;\n}\n');
1254
+
1255
+ // src/features/google-pay/google-pay-component.tsx
1256
+ var import_adyen_web2 = require("@adyen/adyen-web");
1257
+
1258
+ // src/assets/icons/googlepay.tsx
1259
+ var import_preact18 = require("preact");
1260
+ var GooglePayIcon = () => /* @__PURE__ */ (0, import_preact18.h)(
1261
+ "svg",
1262
+ {
1263
+ xmlns: "http://www.w3.org/2000/svg",
1264
+ width: "40",
1265
+ height: "26",
1266
+ fill: "none",
1267
+ viewBox: "0 0 40 26"
1268
+ },
1269
+ /* @__PURE__ */ (0, import_preact18.h)(
1270
+ "path",
1271
+ {
1272
+ fill: "#fff",
1273
+ d: "M29.13 2.41H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"
1274
+ }
1275
+ ),
1276
+ /* @__PURE__ */ (0, import_preact18.h)(
1277
+ "path",
1278
+ {
1279
+ fill: "#3C4043",
1280
+ d: "M29.13 3.27c1.28 0 2.52.26 3.7.77a9.6 9.6 0 0 1 5.08 5.19 9.78 9.78 0 0 1 0 7.55 9.83 9.83 0 0 1-5.08 5.18 9.26 9.26 0 0 1-3.7.77H10.87a9.24 9.24 0 0 1-3.7-.77 9.6 9.6 0 0 1-5.08-5.18 9.78 9.78 0 0 1 0-7.55 9.83 9.83 0 0 1 5.08-5.19 9.24 9.24 0 0 1 3.7-.77h18.26Zm0-.86H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"
1281
+ }
1282
+ ),
1283
+ /* @__PURE__ */ (0, import_preact18.h)(
1284
+ "path",
1285
+ {
1286
+ fill: "#3C4043",
1287
+ d: "M19.1 13.75v3.2h-1v-7.9h2.64c.67 0 1.24.23 1.7.68.49.46.72 1.01.72 1.67a2.2 2.2 0 0 1-.71 1.68c-.46.45-1.03.67-1.7.67H19.1Zm0-3.73v2.76h1.66c.4 0 .73-.14.99-.4.26-.28.4-.6.4-.98 0-.36-.14-.68-.4-.95a1.28 1.28 0 0 0-.99-.42H19.1Zm6.67 1.35c.73 0 1.31.2 1.74.6.42.4.64.95.64 1.65v3.34h-.95v-.76h-.04a1.9 1.9 0 0 1-1.65.93 2.1 2.1 0 0 1-1.46-.53c-.4-.35-.6-.8-.6-1.32 0-.56.21-1 .63-1.34.41-.33.97-.5 1.66-.5.59 0 1.07.12 1.45.34v-.23c0-.36-.13-.65-.4-.9a1.4 1.4 0 0 0-.97-.37c-.56 0-1 .24-1.32.72l-.88-.56a2.42 2.42 0 0 1 2.15-1.07Zm-1.29 3.92c0 .27.11.5.33.67.22.17.48.26.78.26.42 0 .79-.16 1.12-.48.32-.31.49-.68.49-1.11a2.02 2.02 0 0 0-1.3-.38c-.4 0-.74.1-1.01.3a.9.9 0 0 0-.4.74Zm9.08-3.75-3.32 7.8h-1.02l1.23-2.73-2.19-5.07h1.09l1.57 3.89h.02l1.54-3.89h1.08Z"
1288
+ }
1289
+ ),
1290
+ /* @__PURE__ */ (0, import_preact18.h)(
1291
+ "path",
1292
+ {
1293
+ fill: "#4285F4",
1294
+ d: "M15.14 13.1c0-.32-.03-.64-.09-.95h-4.17v1.75h2.4a2.1 2.1 0 0 1-.89 1.4v1.14h1.43a4.49 4.49 0 0 0 1.32-3.33Z"
1295
+ }
1296
+ ),
1297
+ /* @__PURE__ */ (0, import_preact18.h)(
1298
+ "path",
1299
+ {
1300
+ fill: "#34A853",
1301
+ d: "M12.4 15.3a2.66 2.66 0 0 1-4-1.44H6.9v1.18a4.43 4.43 0 0 0 6.91 1.4l-1.43-1.13Z"
1302
+ }
1303
+ ),
1304
+ /* @__PURE__ */ (0, import_preact18.h)(
1305
+ "path",
1306
+ {
1307
+ fill: "#FABB05",
1308
+ d: "M8.25 13c0-.3.05-.59.14-.86v-1.17H6.9a4.59 4.59 0 0 0 0 4.07l1.48-1.17a2.79 2.79 0 0 1-.14-.86Z"
1309
+ }
1310
+ ),
1311
+ /* @__PURE__ */ (0, import_preact18.h)(
1312
+ "path",
1313
+ {
1314
+ fill: "#E94235",
1315
+ d: "M10.88 10.27c.66 0 1.24.23 1.7.68l1.27-1.3a4.22 4.22 0 0 0-2.97-1.18 4.44 4.44 0 0 0-3.97 2.5l1.48 1.17a2.66 2.66 0 0 1 2.5-1.87Z"
1316
+ }
1317
+ )
1318
+ );
1319
+ var googlepay_default = GooglePayIcon;
1320
+
1321
+ // src/features/google-pay/google-pay-component.tsx
1322
+ function GooglePayComponent({ configuration, paymentMethods }) {
1323
+ var _a;
1324
+ const googlePayElementRef = (0, import_hooks5.useRef)(null);
1325
+ const adyenCardRef = (0, import_hooks5.useRef)();
1326
+ const googlePayRef = (0, import_hooks5.useRef)();
1327
+ const {
1328
+ activePaymentMethod,
1329
+ setActivePaymentMethod,
1330
+ isPaymentMethodInitialized,
1331
+ updatePaymentMethodInitialization,
1332
+ threeDSecureRef,
1333
+ handleSuccess,
1334
+ handleError,
1335
+ setThreeDSecureActive
1336
+ } = usePaymentMethodGroup();
1337
+ const initializeAdyenComponent = async () => {
1338
+ adyenCardRef.current = await (0, import_adyen_web2.AdyenCheckout)({
1339
+ clientKey: paymentMethods.clientKey,
1340
+ locale: paymentMethods.locale,
1341
+ environment: configuration.environment,
1342
+ countryCode: "IS",
1343
+ onError: handleOnError,
1344
+ onSubmit: handleOnSubmit,
1345
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1346
+ onPaymentCompleted: configuration.onPaymentCompleted,
1347
+ onPaymentFailed: configuration.onPaymentFailed
1348
+ });
1349
+ const gpayConfig = paymentMethods.paymentMethods.paymentMethods.find((x) => x.type === "googlepay").configuration;
1350
+ const googlePayConfiguration = {
1351
+ amount: {
1352
+ value: paymentMethods.minorUnitsAmount,
1353
+ currency: paymentMethods.currency
1354
+ },
1355
+ countryCode: "IS",
1356
+ environment: configuration.environment,
1357
+ configuration: {
1358
+ ...gpayConfig,
1359
+ merchantName: paymentMethods.merchantName
1360
+ }
1361
+ };
1362
+ googlePayRef.current = new import_adyen_web2.GooglePay(adyenCardRef.current, googlePayConfiguration);
1363
+ googlePayRef.current.isAvailable().then(() => {
1364
+ googlePayRef.current.mount(googlePayElementRef.current);
1365
+ updatePaymentMethodInitialization("googlepay", true);
1366
+ }).catch((e) => {
1367
+ handleError("error.googlePayNotAvailable");
1368
+ });
1369
+ };
1370
+ (0, import_hooks5.useEffect)(() => {
1371
+ if (activePaymentMethod === "googlepay" && !isPaymentMethodInitialized.googlepay) {
1372
+ initializeAdyenComponent();
1373
+ }
1374
+ }, [configuration, activePaymentMethod]);
1375
+ (0, import_hooks5.useEffect)(() => {
1376
+ if (googlePayRef.current && isPaymentMethodInitialized.googlepay) {
1377
+ initializeAdyenComponent();
1378
+ }
1379
+ }, [configuration]);
1380
+ const handleBoxChange = () => {
1381
+ setActivePaymentMethod("googlepay");
1382
+ };
1383
+ function handleOnError(error, _) {
1384
+ handleError("error.unknownError");
1385
+ }
1386
+ async function handleOnSubmit(state, _, actions) {
1387
+ const data = {
1388
+ ...state.data,
1389
+ origin: window.location.origin,
1390
+ sessionId: configuration.sessionId
1391
+ };
1392
+ const fetchResponse = await createPaymentRequest(configuration.environment, data);
1393
+ if (!fetchResponse.ok) {
1394
+ actions.reject();
1395
+ handleError("error.failedToSubmitPayment");
1396
+ return;
1397
+ }
1398
+ const response = await fetchResponse.json();
1399
+ if (!response.resultCode) {
1400
+ actions.reject();
1401
+ handleError("error.paymentFailed");
1402
+ return;
1403
+ }
1404
+ const { resultCode, action } = response;
1405
+ if (resultCode === "RedirectShopper" || resultCode === "IdentifyShopper") {
1406
+ setThreeDSecureActive(true);
1407
+ adyenCardRef.current.createFromAction(action).mount(threeDSecureRef == null ? void 0 : threeDSecureRef.current);
1408
+ return;
1409
+ }
1410
+ actions.resolve({ resultCode, action });
1411
+ if (resultCode === "Authorised") {
1412
+ handleSuccess("success.paymentAuthorized");
1413
+ } else {
1414
+ handleError("error.paymentUnsuccessful");
1415
+ }
1416
+ }
1417
+ async function handleOnSubmitAdditionalData(state, _, actions) {
1418
+ const data = {
1419
+ ...state.data,
1420
+ sessionId: configuration.sessionId
1421
+ };
1422
+ const fetchResponse = await createDetailsRequest(configuration.environment, data);
1423
+ if (!fetchResponse.ok) {
1424
+ actions.reject();
1425
+ handleError("error.failedToSubmitPaymentDetails");
1426
+ return;
1427
+ }
1428
+ const response = await fetchResponse.json();
1429
+ if (!response.resultCode) {
1430
+ actions.reject();
1431
+ handleError("error.paymentDetailsFailed");
1432
+ return;
1433
+ }
1434
+ const { resultCode, action } = response;
1435
+ actions.resolve({ resultCode, action });
1436
+ if (resultCode === "Authorised") {
1437
+ handleSuccess("success.paymentAuthorized");
1438
+ } else {
1439
+ handleError("error.paymentUnsuccessful");
1440
+ }
1441
+ }
1442
+ const hasGooglePay = (_a = paymentMethods.paymentMethods.paymentMethods) == null ? void 0 : _a.some((x) => x.type === "googlepay");
1443
+ if (!hasGooglePay) {
1444
+ return null;
1445
+ }
1446
+ return /* @__PURE__ */ (0, import_preact19.h)("label", { className: "google-pay-component" }, /* @__PURE__ */ (0, import_preact19.h)(
1447
+ "input",
1448
+ {
1449
+ type: "radio",
1450
+ className: "google-pay-component__radio-selector",
1451
+ checked: activePaymentMethod === "googlepay",
1452
+ onChange: handleBoxChange
1453
+ }
1454
+ ), /* @__PURE__ */ (0, import_preact19.h)("span", { className: "google-pay-component__content" }, /* @__PURE__ */ (0, import_preact19.h)("span", { className: "google-pay-component--circle" }), /* @__PURE__ */ (0, import_preact19.h)(googlepay_default, null), /* @__PURE__ */ (0, import_preact19.h)("span", { className: "google-pay-component--text" }, i18n(configuration.locale, "googlepay.title"))), /* @__PURE__ */ (0, import_preact19.h)("div", { className: "google-pay-component__expandable" }, /* @__PURE__ */ (0, import_preact19.h)("div", { ref: googlePayElementRef })));
1455
+ }
1456
+ var google_pay_component_default = GooglePayComponent;
1457
+
1458
+ // src/features/stored-card/stored-card-container-component.tsx
1459
+ var import_preact22 = require("preact");
1460
+
1461
+ // src/features/stored-card/stored-card-component.tsx
1462
+ var import_preact21 = require("preact");
1463
+ var import_hooks6 = require("preact/hooks");
1464
+
1465
+ // src/features/stored-card/stored-card-component.css
1466
+ styleInject('.stored-card-component {\n position: relative;\n background: white;\n border-radius: 12px;\n transition: all 0.3s ease;\n padding: 16px 24px;\n cursor: pointer;\n}\n.stored-card-component:has(.stored-card-component__radio-selector:checked) {\n cursor: default;\n}\n.stored-card-component__radio-selector {\n position: absolute;\n opacity: 0;\n}\n.stored-card-component__content {\n display: flex;\n align-items: center;\n gap: 12px;\n transition: background-color 0.3s ease;\n}\n.stored-card-component__radio-selector:checked + .stored-card-component__content {\n padding-bottom: 16px;\n cursor: default;\n}\n.stored-card-component--circle {\n width: 24px;\n height: 24px;\n border: 1px solid #e6ebef;\n background: #eef0f2;\n border-radius: 50%;\n position: relative;\n transition: all 0.3s ease;\n}\n.stored-card-component__content:hover .stored-card-component--circle {\n border: 1px solid #cdd8e2;\n}\n.stored-card-component--circle::after {\n content: "";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: transform 0.2s ease;\n}\n.stored-card-component__radio-selector:checked + .stored-card-component__content .stored-card-component--circle {\n background: #bce6f3;\n border-color: transparent;\n}\n.stored-card-component__radio-selector:checked + .stored-card-component__content .stored-card-component--circle::after {\n transform: translate(-50%, -50%) scale(1);\n background: #002649;\n height: 10px;\n width: 10px;\n}\n.stored-card-component--text {\n color: #213547;\n font-size: 1rem;\n user-select: none;\n}\n.stored-card-component--brands {\n display: flex;\n margin-left: auto;\n align-items: center;\n gap: 4px;\n}\n.stored-card-component--brands > svg {\n transition: all 0.2s ease;\n}\n.stored-card-component__remove-stored-card-button {\n margin-left: auto;\n}\n.stored-card-component__remove-stored-card-button--text {\n color: #d03e00;\n text-decoration: none;\n background: none;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n.stored-card-component__remove-stored-card-button--text:disabled {\n cursor: not-allowed;\n color: #72889d;\n}\n.stored-card-component__confirm-remove-stored-card {\n background-color: #fff7db;\n border-radius: 8px;\n max-height: 0;\n overflow: hidden;\n transition: all 0.3s ease;\n opacity: 0;\n}\n.stored-card-component__confirm-remove-stored-card--expanded {\n padding: 16px;\n max-height: 400px;\n opacity: 1;\n}\n.stored-card-component__confirm-remove-stored-card--header {\n display: flex;\n align-items: center;\n gap: 12px;\n color: #262b31;\n padding-bottom: 16px;\n}\n.stored-card-component__confirm-remove-stored-card--actions {\n display: flex;\n gap: 12px;\n justify-content: end;\n}\n.stored-card-component__confirm-remove-stored-card--actions--button {\n color: #775d00;\n background: none;\n border: none;\n cursor: pointer;\n text-decoration: none;\n font-weight: bold;\n}\n.stored-card-component__expandable {\n background: white;\n max-height: 0;\n overflow: hidden;\n transition: all 0.3s ease;\n opacity: 0;\n}\n.stored-card-component__loading-text {\n display: flex;\n justify-content: center;\n}\n.stored-card-component__radio-selector:checked ~ .stored-card-component__expandable {\n max-height: 400px;\n opacity: 1;\n}\n.stored-card-component__form {\n display: flex;\n padding-top: 16px;\n flex-direction: column;\n gap: 24px;\n}\n.stored-card-component__form--wrapper {\n display: flex;\n flex-direction: column;\n justify-items: start;\n position: relative;\n width: 100%;\n}\n.stored-card-component__form--wrapper--error {\n color: #ff4d4f;\n font-size: 12px;\n}\n.stored-card-component__form--wrapper--label {\n transform: translateX(10px) translateY(-50%);\n z-index: 1;\n background:\n linear-gradient(\n to top,\n #eef0f2 53%,\n transparent 50%);\n position: absolute;\n font-weight: 500;\n font-size: 14px;\n padding: 0 4px;\n}\n.stored-card-component__form--wrapper--label--readonly {\n background:\n linear-gradient(\n to top,\n #e7e7e7 53%,\n transparent 50%);\n}\n.stored-card-component__form--wrapper--label--error {\n color: #ff4d4f;\n background:\n linear-gradient(\n to top,\n #fff8f5 53%,\n transparent 50%);\n font-size: 13px;\n font-weight: 500;\n}\n.stored-card-component__form--wrapper--label--info {\n position: absolute;\n top: 33%;\n right: 10px;\n}\n.stored-card-component__form--wrapper--input {\n background: #eef0f2;\n color: #00112c;\n display: flex;\n align-items: center;\n border: 1px solid transparent;\n border-radius: 8px;\n font-size: 1rem;\n height: 48px;\n outline: none;\n padding-left: 12px;\n transition: border 0.2s ease-out, box-shadow 0.2s ease-out;\n position: relative;\n}\n.stored-card-component__form--wrapper--input--readonly {\n background-color: #e7e7e7;\n}\n.stored-card-component__form--wrapper--input:hover {\n border: 1px solid #cdd8e2;\n}\n.stored-card-component__form--wrapper--input--readonly:hover {\n border: 1px solid transparent;\n}\n.stored-card-component__form--wrapper--input--error {\n background: #fff8f5;\n border: 1px solid #ff4d4f;\n}\n.stored-card-component__form--wrapper--input--error:hover {\n border: 1px solid #ff4d4f;\n}\n.stored-card-component__form--field-wrapper {\n display: flex;\n width: 100%;\n gap: 24px;\n}\n.stored-card-component__submit-button {\n background: #002649;\n border: none;\n border-radius: 8px;\n color: #ffffff;\n cursor: pointer;\n font-size: 1rem;\n height: 40px;\n outline: none;\n padding: 0 16px;\n transition: background 0.2s ease-out;\n width: 100%;\n}\n.stored-card-component__submit-button:hover {\n background: #002649;\n border: 1px solid #dbdee2;\n}\n.stored-card-component__submit-button:disabled {\n background: #72889d;\n border: 1px solid #dbdee2;\n cursor: not-allowed;\n}\n');
1467
+
1468
+ // src/features/stored-card/stored-card-component.tsx
1469
+ var import_adyen_web3 = require("@adyen/adyen-web");
1470
+
1471
+ // src/assets/icons/warning.tsx
1472
+ var import_preact20 = require("preact");
1473
+ var WarningIcon = () => /* @__PURE__ */ (0, import_preact20.h)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ (0, import_preact20.h)("g", { "clip-path": "url(#clip0_10650_34968)" }, /* @__PURE__ */ (0, import_preact20.h)(
1474
+ "path",
1475
+ {
1476
+ d: "M12.0011 15C12.6245 15 13.1261 14.4984 13.1261 13.875V7.875C13.1261 7.25391 12.6222 6.75 12.0433 6.75C11.4644 6.75 10.8761 7.25625 10.8761 7.875V13.875C10.8761 14.4984 11.3823 15 12.0011 15ZM12.0011 16.5516C11.1873 16.5516 10.5273 17.2116 10.5273 18.0253C10.5292 18.8391 11.1855 19.5 12.0011 19.5C12.8167 19.5 13.4748 18.84 13.4748 18.0262C13.473 17.2125 12.8167 16.5516 12.0011 16.5516Z",
1477
+ fill: "#DFAE00"
1478
+ }
1479
+ ), /* @__PURE__ */ (0, import_preact20.h)(
1480
+ "path",
1481
+ {
1482
+ opacity: "0.4",
1483
+ d: "M23.7312 19.5469L13.7328 2.48438C12.9673 1.17188 11.0356 1.17188 10.2649 2.48438L0.271188 19.5469C-0.49803 20.8547 0.460048 22.5 2.00181 22.5H21.9987C23.5343 22.5 24.4953 20.8594 23.7312 19.5469ZM10.8734 7.875C10.8734 7.25391 11.3773 6.75 11.9984 6.75C12.6195 6.75 13.1234 7.25625 13.1234 7.875V13.875C13.1234 14.4961 12.6195 15 12.0406 15C11.4617 15 10.8734 14.4984 10.8734 13.875V7.875ZM11.9984 19.5C11.1846 19.5 10.5246 18.84 10.5246 18.0262C10.5246 17.2125 11.1842 16.5525 11.9984 16.5525C12.8126 16.5525 13.4721 17.2125 13.4721 18.0262C13.4703 18.8391 12.814 19.5 11.9984 19.5Z",
1484
+ fill: "#DFAE00"
1485
+ }
1486
+ )), /* @__PURE__ */ (0, import_preact20.h)("defs", null, /* @__PURE__ */ (0, import_preact20.h)("clipPath", { id: "clip0_10650_34968" }, /* @__PURE__ */ (0, import_preact20.h)("rect", { width: "24", height: "24", fill: "white" }))));
1487
+ var warning_default = WarningIcon;
1488
+
1489
+ // src/features/stored-card/stored-card-component.tsx
1490
+ function StoredCardComponent({
1491
+ configuration,
1492
+ paymentMethods,
1493
+ storedPaymentMethod,
1494
+ onStoredCardRemoved
1495
+ }) {
1496
+ const storedCardElementRef = (0, import_hooks6.useRef)(null);
1497
+ const adyenCardRef = (0, import_hooks6.useRef)();
1498
+ const customCardRef = (0, import_hooks6.useRef)();
1499
+ const [payButtonDisabled, setPayButtonDisabled] = (0, import_hooks6.useState)(true);
1500
+ const [securityCodePolicy, setSecurityCodePolicy] = (0, import_hooks6.useState)("required");
1501
+ const [askConfirmRemoveStoredCard, setAskConfirmRemoveStoredCard] = (0, import_hooks6.useState)(false);
1502
+ const [formErrors, setFormErrors] = (0, import_hooks6.useState)({
1503
+ encryptedSecurityCode: { visible: false }
1504
+ });
1505
+ const {
1506
+ activePaymentMethod,
1507
+ setActivePaymentMethod,
1508
+ activeStoredPaymentMethodId,
1509
+ setActiveStoredPaymentMethodId,
1510
+ isStoredCardInitialized,
1511
+ updateStoredCardInitialization,
1512
+ threeDSecureRef,
1513
+ handleSuccess,
1514
+ handleError,
1515
+ setThreeDSecureActive
1516
+ } = usePaymentMethodGroup();
1517
+ const initializeAdyenComponent = async () => {
1518
+ adyenCardRef.current = await (0, import_adyen_web3.AdyenCheckout)({
1519
+ clientKey: paymentMethods.clientKey,
1520
+ locale: configuration.locale,
1521
+ environment: configuration.environment,
1522
+ countryCode: "IS",
1523
+ paymentMethodsResponse: paymentMethods.paymentMethods,
1524
+ onError: handleOnError,
1525
+ onSubmit: handleOnSubmit,
1526
+ onAdditionalDetails: handleOnSubmitAdditionalData,
1527
+ onPaymentCompleted: configuration.onPaymentCompleted,
1528
+ onPaymentFailed: configuration.onPaymentFailed
1529
+ });
1530
+ customCardRef.current = new import_adyen_web3.CustomCard(adyenCardRef.current, {
1531
+ brands: [storedPaymentMethod.brand],
1532
+ onConfigSuccess() {
1533
+ updateStoredCardInitialization(storedPaymentMethod.id, true);
1534
+ },
1535
+ onBrand: (event) => {
1536
+ setSecurityCodePolicy(event.cvcPolicy);
1537
+ },
1538
+ onValidationError: (event) => {
1539
+ const defaultErrors = {
1540
+ encryptedSecurityCode: { visible: false, message: void 0 }
1541
+ };
1542
+ event.filter((x) => x.error).forEach((x) => {
1543
+ defaultErrors[x.fieldType].visible = true;
1544
+ defaultErrors[x.fieldType].message = x.errorI18n;
1545
+ });
1546
+ setFormErrors(defaultErrors);
1547
+ },
1548
+ onAllValid: (event) => {
1549
+ setPayButtonDisabled(!event.allValid);
1550
+ },
1551
+ placeholders: configuration.placeholders,
1552
+ challengeWindowSize: "05"
1553
+ // looks like not working
1554
+ });
1555
+ if (storedCardElementRef.current) {
1556
+ customCardRef.current.mount(storedCardElementRef.current);
1557
+ }
1558
+ };
1559
+ (0, import_hooks6.useEffect)(() => {
1560
+ if (activePaymentMethod === "storedcard" && activeStoredPaymentMethodId === storedPaymentMethod.id && !isStoredCardInitialized[activeStoredPaymentMethodId]) {
1561
+ initializeAdyenComponent();
1562
+ }
1563
+ }, [configuration, activePaymentMethod, activeStoredPaymentMethodId]);
1564
+ (0, import_hooks6.useEffect)(() => {
1565
+ if (customCardRef.current && isStoredCardInitialized[activeStoredPaymentMethodId]) {
1566
+ initializeAdyenComponent();
1567
+ setFormErrors({ encryptedSecurityCode: { visible: false, message: void 0 } });
1568
+ }
1569
+ }, [configuration]);
1570
+ (0, import_hooks6.useEffect)(() => {
1571
+ setAskConfirmRemoveStoredCard(false);
1572
+ }, [activePaymentMethod, activeStoredPaymentMethodId]);
1573
+ function handleBoxChange() {
1574
+ setActivePaymentMethod("storedcard");
1575
+ setActiveStoredPaymentMethodId(storedPaymentMethod.id);
1576
+ }
1577
+ function handleAskToConfirmRemoveCard() {
1578
+ setAskConfirmRemoveStoredCard(true);
1579
+ }
1580
+ function handleCancelRemoveStoredCard() {
1581
+ setAskConfirmRemoveStoredCard(false);
1582
+ }
1583
+ async function handleConfirmRemoveStoredCard() {
1584
+ const data = {
1585
+ storedPaymentMethodId: storedPaymentMethod.id,
1586
+ sessionId: configuration.sessionId
1587
+ };
1588
+ const fetchResponse = await postDisableTokenRequest(configuration.environment, data);
1589
+ if (!fetchResponse.ok) {
1590
+ handleError("error.failedToSubmitRemoveStoredPaymentCard");
1591
+ return;
1592
+ }
1593
+ const disableTokenResponse = await fetchResponse.json();
1594
+ if (!disableTokenResponse.success) {
1595
+ handleError("error.failedToRemoveStoredPaymentCard");
1596
+ return;
1597
+ }
1598
+ onStoredCardRemoved(storedPaymentMethod.id);
1599
+ }
1600
+ function handleOnError(_, __) {
1601
+ handleError("error.unknownError");
1602
+ }
1603
+ async function handleOnSubmit(state, _, actions) {
1604
+ const data = {
1605
+ ...state.data,
1606
+ origin: window.location.origin,
1607
+ sessionId: configuration.sessionId,
1608
+ paymentMethod: {
1609
+ ...state.data.paymentMethod,
1610
+ storedPaymentMethodId: storedPaymentMethod.id
1611
+ }
1612
+ };
1613
+ const fetchResponse = await createPaymentRequest(configuration.environment, data);
1614
+ if (!fetchResponse.ok) {
1615
+ actions.reject();
1616
+ handleError("error.failedToSubmitPayment");
1617
+ return;
1618
+ }
1619
+ const response = await fetchResponse.json();
1620
+ if (!response.resultCode) {
1621
+ actions.reject();
1622
+ handleError("error.paymentFailed");
1623
+ return;
1624
+ }
1625
+ const { resultCode, action } = response;
1626
+ if (resultCode === "RedirectShopper" || resultCode === "IdentifyShopper") {
1627
+ setThreeDSecureActive(true);
1628
+ adyenCardRef.current.createFromAction(action).mount(threeDSecureRef == null ? void 0 : threeDSecureRef.current);
1629
+ return;
1630
+ }
1631
+ actions.resolve({ resultCode, action });
1632
+ if (resultCode === "Authorised") {
1633
+ handleSuccess("success.paymentAuthorized");
1634
+ } else {
1635
+ handleError("error.paymentUnsuccessful");
1636
+ }
1637
+ }
1638
+ async function handleOnSubmitAdditionalData(state, _, actions) {
1639
+ const data = {
1640
+ ...state.data,
1641
+ sessionId: configuration.sessionId
1642
+ };
1643
+ const fetchResponse = await createDetailsRequest(configuration.environment, data);
1644
+ if (!fetchResponse.ok) {
1645
+ actions.reject();
1646
+ handleError("error.failedToSubmitPaymentDetails");
1647
+ return;
1648
+ }
1649
+ const response = await fetchResponse.json();
1650
+ if (!response.resultCode) {
1651
+ actions.reject();
1652
+ handleError("error.paymentDetailsFailed");
1653
+ return;
1654
+ }
1655
+ const { resultCode, action } = response;
1656
+ actions.resolve({ resultCode, action });
1657
+ if (resultCode === "Authorised") {
1658
+ handleSuccess("success.paymentAuthorized");
1659
+ } else {
1660
+ handleError("error.paymentUnsuccessful");
1661
+ }
1662
+ }
1663
+ function handleSubmitClick() {
1664
+ if (!customCardRef.current) return;
1665
+ customCardRef.current.submit();
1666
+ }
1667
+ return /* @__PURE__ */ (0, import_preact21.h)("label", { className: "stored-card-component" }, /* @__PURE__ */ (0, import_preact21.h)(
1668
+ "input",
1669
+ {
1670
+ type: "radio",
1671
+ className: "stored-card-component__radio-selector",
1672
+ checked: activePaymentMethod === "storedcard" && activeStoredPaymentMethodId === storedPaymentMethod.id,
1673
+ onChange: handleBoxChange
1674
+ }
1675
+ ), /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component__content" }, /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component--circle" }), /* @__PURE__ */ (0, import_preact21.h)(
1676
+ RenderBrandIcons,
1677
+ {
1678
+ brands: [
1679
+ {
1680
+ brand: storedPaymentMethod.brand,
1681
+ brandFullName: storedPaymentMethod.name
1682
+ }
1683
+ ]
1684
+ }
1685
+ ), /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component--text" }, "\u2022\u2022\u2022\u2022 ", storedPaymentMethod.lastFour), activePaymentMethod === "storedcard" && activeStoredPaymentMethodId === storedPaymentMethod.id && /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__remove-stored-card-button" }, /* @__PURE__ */ (0, import_preact21.h)(
1686
+ "button",
1687
+ {
1688
+ onClick: handleAskToConfirmRemoveCard,
1689
+ className: "stored-card-component__remove-stored-card-button--text",
1690
+ disabled: askConfirmRemoveStoredCard
1691
+ },
1692
+ i18n(configuration.locale, "stored-cards.removeStoredCard")
1693
+ ))), /* @__PURE__ */ (0, import_preact21.h)(
1694
+ "div",
1695
+ {
1696
+ className: `${"stored-card-component__confirm-remove-stored-card"} ${askConfirmRemoveStoredCard ? "stored-card-component__confirm-remove-stored-card--expanded" : ""}`
1697
+ },
1698
+ /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__confirm-remove-stored-card--header" }, /* @__PURE__ */ (0, import_preact21.h)(warning_default, null), /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component__confirm-remove-stored-card--header--title" }, i18n(configuration.locale, "stored-cards.removeStoredCardQuestion"))),
1699
+ /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__confirm-remove-stored-card--actions" }, /* @__PURE__ */ (0, import_preact21.h)(
1700
+ "button",
1701
+ {
1702
+ className: "stored-card-component__confirm-remove-stored-card--actions--button",
1703
+ onClick: handleConfirmRemoveStoredCard
1704
+ },
1705
+ i18n(configuration.locale, "stored-cards.removeStoredCardQuestionYesRemove")
1706
+ ), /* @__PURE__ */ (0, import_preact21.h)(
1707
+ "button",
1708
+ {
1709
+ className: "stored-card-component__confirm-remove-stored-card--actions--button",
1710
+ onClick: handleCancelRemoveStoredCard
1711
+ },
1712
+ i18n(configuration.locale, "stored-cards.removeStoredCardQuestionCancel")
1713
+ ))
1714
+ ), /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__expandable", ref: storedCardElementRef }, !isStoredCardInitialized[storedPaymentMethod.id] && /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__loading-text" }, /* @__PURE__ */ (0, import_preact21.h)(loader_default, null)), /* @__PURE__ */ (0, import_preact21.h)(
1715
+ "div",
1716
+ {
1717
+ className: "stored-card-component__form",
1718
+ style: {
1719
+ opacity: isStoredCardInitialized[storedPaymentMethod.id] ? 1 : 0,
1720
+ position: isStoredCardInitialized[storedPaymentMethod.id] ? "relative" : "absolute",
1721
+ transition: "opacity 0.3s ease-in-out"
1722
+ }
1723
+ },
1724
+ /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__form--field-wrapper" }, /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__form--wrapper" }, /* @__PURE__ */ (0, import_preact21.h)("label", { className: "stored-card-component__form--wrapper--label stored-card-component__form--wrapper--label--readonly" }, i18n(configuration.locale, "stored-cards.expiryDate")), /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component__form--wrapper--input stored-card-component__form--wrapper--input--readonly" }, storedPaymentMethod.expiryMonth, "/", storedPaymentMethod.expiryYear)), /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__form--wrapper" }, (securityCodePolicy === "optional" || securityCodePolicy === "required") && /* @__PURE__ */ (0, import_preact21.h)(import_preact21.Fragment, null, /* @__PURE__ */ (0, import_preact21.h)(
1725
+ "label",
1726
+ {
1727
+ className: `${"stored-card-component__form--wrapper--label"} ${formErrors.encryptedSecurityCode.visible ? "stored-card-component__form--wrapper--label--error" : ""}`
1728
+ },
1729
+ securityCodePolicy === "optional" ? i18n(configuration.locale, "stored-cards.securityCode3DigitsOptional") : i18n(configuration.locale, "stored-cards.securityCode3Digits")
1730
+ ), /* @__PURE__ */ (0, import_preact21.h)(
1731
+ "span",
1732
+ {
1733
+ className: `${"stored-card-component__form--wrapper--input"} ${formErrors.encryptedSecurityCode.visible ? "stored-card-component__form--wrapper--input--error" : ""}`,
1734
+ "data-cse": "encryptedSecurityCode"
1735
+ },
1736
+ /* @__PURE__ */ (0, import_preact21.h)("div", { className: "stored-card-component__form--wrapper--label--info" }, /* @__PURE__ */ (0, import_preact21.h)(Tooltip, { content: i18n(configuration.locale, "stored-cards.securityCode3DigitsInfo") }, /* @__PURE__ */ (0, import_preact21.h)(info_default, null)))
1737
+ )), formErrors.encryptedSecurityCode.visible && /* @__PURE__ */ (0, import_preact21.h)("span", { className: "stored-card-component__form--wrapper--error" }, formErrors.encryptedSecurityCode.message))),
1738
+ /* @__PURE__ */ (0, import_preact21.h)(
1739
+ "button",
1740
+ {
1741
+ id: "stored-card-component-submit-button",
1742
+ className: "stored-card-component__submit-button",
1743
+ disabled: payButtonDisabled,
1744
+ onClick: handleSubmitClick
1745
+ },
1746
+ paymentMethods.formattedAmount
1747
+ )
1748
+ )));
1749
+ }
1750
+ var stored_card_component_default = StoredCardComponent;
1751
+
1752
+ // src/features/stored-card/stored-card-container-component.tsx
1753
+ var import_hooks7 = require("preact/hooks");
1754
+ function StoredCardContainerComponent({
1755
+ configuration,
1756
+ paymentMethods
1757
+ }) {
1758
+ var _a;
1759
+ const [storedPaymentMethods, setStoredPaymentMethods] = (0, import_hooks7.useState)(
1760
+ (_a = paymentMethods.paymentMethods.storedPaymentMethods) != null ? _a : []
1761
+ );
1762
+ if (!storedPaymentMethods || (storedPaymentMethods == null ? void 0 : storedPaymentMethods.length) === 0) {
1763
+ return null;
1764
+ }
1765
+ function handleStoredCardRemoved(storedPaymentMethodId) {
1766
+ setStoredPaymentMethods(
1767
+ (prevStoredPaymentMethods) => prevStoredPaymentMethods.filter((storedPaymentMethod) => storedPaymentMethod.id !== storedPaymentMethodId)
1768
+ );
1769
+ }
1770
+ return /* @__PURE__ */ (0, import_preact22.h)(import_preact22.Fragment, null, storedPaymentMethods == null ? void 0 : storedPaymentMethods.map((storedPaymentMethod) => /* @__PURE__ */ (0, import_preact22.h)(
1771
+ stored_card_component_default,
1772
+ {
1773
+ key: storedPaymentMethod.id,
1774
+ configuration,
1775
+ storedPaymentMethod,
1776
+ paymentMethods,
1777
+ onStoredCardRemoved: handleStoredCardRemoved
1778
+ }
1779
+ )));
1780
+ }
1781
+ var stored_card_container_component_default = StoredCardContainerComponent;
1782
+
1783
+ // src/components/payment-method-group/payment-method-group.tsx
1784
+ var import_preact23 = require("preact");
1785
+
1786
+ // src/components/payment-method-group/payment-method-group.css
1787
+ styleInject(".payment-method-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n}\n");
1788
+
1789
+ // src/components/payment-method-group/payment-method-group.tsx
1790
+ function PaymentMethodGroup({ children, initialValue }) {
1791
+ return /* @__PURE__ */ (0, import_preact23.h)(PaymentMethodGroupContext, { initialValue }, /* @__PURE__ */ (0, import_preact23.h)("div", { className: "payment-method-group" }, children));
1792
+ }
1793
+ var payment_method_group_default = PaymentMethodGroup;
1794
+
1795
+ // src/features/result-component/result-component.tsx
1796
+ var import_preact26 = require("preact");
1797
+
1798
+ // src/features/result-component/result-component.css
1799
+ styleInject(".result-component {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 300px;\n background-color: white;\n border-radius: 16px;\n}\n");
1800
+
1801
+ // src/assets/icons/success.tsx
1802
+ var import_preact24 = require("preact");
1803
+ var SuccessIcon = () => /* @__PURE__ */ (0, import_preact24.h)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", viewBox: "0 0 120 120" }, /* @__PURE__ */ (0, import_preact24.h)(
1804
+ "circle",
1805
+ {
1806
+ cx: "60",
1807
+ cy: "60",
1808
+ r: "50",
1809
+ fill: "none",
1810
+ stroke: "#5b8206",
1811
+ "stroke-width": "5",
1812
+ "stroke-dasharray": "314",
1813
+ "stroke-dashoffset": "314"
1814
+ },
1815
+ /* @__PURE__ */ (0, import_preact24.h)("animate", { attributeName: "stroke-dashoffset", from: "314", to: "0", dur: "1s", fill: "freeze" })
1816
+ ), /* @__PURE__ */ (0, import_preact24.h)("g", { transform: "translate(60,60)" }, /* @__PURE__ */ (0, import_preact24.h)(
1817
+ "path",
1818
+ {
1819
+ d: "M-25 5 L-5 25 L25 -15",
1820
+ fill: "none",
1821
+ stroke: "#5b8206",
1822
+ "stroke-width": "6",
1823
+ "stroke-linecap": "round",
1824
+ "stroke-linejoin": "round",
1825
+ "stroke-dasharray": "100",
1826
+ "stroke-dashoffset": "100"
1827
+ },
1828
+ /* @__PURE__ */ (0, import_preact24.h)("animate", { attributeName: "stroke-dashoffset", from: "100", to: "0", dur: "0.5s", begin: "1s", fill: "freeze" }),
1829
+ /* @__PURE__ */ (0, import_preact24.h)(
1830
+ "animateTransform",
1831
+ {
1832
+ attributeName: "transform",
1833
+ type: "scale",
1834
+ from: "1 1",
1835
+ to: "1.2 1.2",
1836
+ begin: "1.5s",
1837
+ dur: "0.2s",
1838
+ fill: "freeze",
1839
+ additive: "sum"
1840
+ }
1841
+ ),
1842
+ /* @__PURE__ */ (0, import_preact24.h)(
1843
+ "animateTransform",
1844
+ {
1845
+ attributeName: "transform",
1846
+ type: "scale",
1847
+ from: "1.2 1.2",
1848
+ to: "1 1",
1849
+ begin: "1.7s",
1850
+ dur: "0.2s",
1851
+ fill: "freeze",
1852
+ additive: "sum"
1853
+ }
1854
+ )
1855
+ )));
1856
+ var success_default = SuccessIcon;
1857
+
1858
+ // src/assets/icons/failure.tsx
1859
+ var import_preact25 = require("preact");
1860
+ var FailureIcon = () => /* @__PURE__ */ (0, import_preact25.h)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "120", height: "120", viewBox: "0 0 120 120" }, /* @__PURE__ */ (0, import_preact25.h)(
1861
+ "circle",
1862
+ {
1863
+ cx: "60",
1864
+ cy: "60",
1865
+ r: "50",
1866
+ fill: "none",
1867
+ stroke: "#d03e00",
1868
+ "stroke-width": "5",
1869
+ "stroke-dasharray": "314",
1870
+ "stroke-dashoffset": "314"
1871
+ },
1872
+ /* @__PURE__ */ (0, import_preact25.h)("animate", { attributeName: "stroke-dashoffset", from: "314", to: "0", dur: "1s", fill: "freeze" })
1873
+ ), /* @__PURE__ */ (0, import_preact25.h)("g", { transform: "translate(60,60)" }, /* @__PURE__ */ (0, import_preact25.h)("g", { id: "crossGroup" }, /* @__PURE__ */ (0, import_preact25.h)(
1874
+ "line",
1875
+ {
1876
+ x1: "-20",
1877
+ y1: "-20",
1878
+ x2: "20",
1879
+ y2: "20",
1880
+ stroke: "#d03e00",
1881
+ "stroke-width": "6",
1882
+ "stroke-linecap": "round",
1883
+ "stroke-dasharray": "57",
1884
+ "stroke-dashoffset": "57"
1885
+ },
1886
+ /* @__PURE__ */ (0, import_preact25.h)("animate", { attributeName: "stroke-dashoffset", from: "57", to: "0", dur: "0.3s", begin: "1s", fill: "freeze" })
1887
+ ), /* @__PURE__ */ (0, import_preact25.h)(
1888
+ "line",
1889
+ {
1890
+ x1: "20",
1891
+ y1: "-20",
1892
+ x2: "-20",
1893
+ y2: "20",
1894
+ stroke: "#d03e00",
1895
+ "stroke-width": "6",
1896
+ "stroke-linecap": "round",
1897
+ "stroke-dasharray": "57",
1898
+ "stroke-dashoffset": "57"
1899
+ },
1900
+ /* @__PURE__ */ (0, import_preact25.h)("animate", { attributeName: "stroke-dashoffset", from: "57", to: "0", dur: "0.3s", begin: "1.3s", fill: "freeze" })
1901
+ ))));
1902
+ var failure_default = FailureIcon;
1903
+
1904
+ // src/features/result-component/result-component.tsx
1905
+ function ResultComponent({ configuration }) {
1906
+ const { error, success } = usePaymentMethodGroup();
1907
+ if (!error && !success) {
1908
+ return null;
1909
+ }
1910
+ return /* @__PURE__ */ (0, import_preact26.h)("div", { className: "result-component" }, error && /* @__PURE__ */ (0, import_preact26.h)("div", { className: "result-component__error" }, /* @__PURE__ */ (0, import_preact26.h)(failure_default, null), /* @__PURE__ */ (0, import_preact26.h)("p", { className: "result-component__error--message" }, i18n(configuration.locale, error))), success && /* @__PURE__ */ (0, import_preact26.h)("div", { className: "result-component__success" }, /* @__PURE__ */ (0, import_preact26.h)(success_default, null), /* @__PURE__ */ (0, import_preact26.h)("p", { className: "result-component__success--message" }, i18n(configuration.locale, success))));
1911
+ }
1912
+ var result_component_default = ResultComponent;
1913
+
1914
+ // src/features/three-d-secure-component/three-d-secure-component.tsx
1915
+ var import_preact27 = require("preact");
1916
+ var import_hooks8 = require("preact/hooks");
1917
+
1918
+ // src/features/three-d-secure-component/three-d-secure-component.css
1919
+ styleInject(".three-d-secure {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-color: white;\n border-radius: 16px;\n}\n");
1920
+
1921
+ // src/features/three-d-secure-component/three-d-secure-component.tsx
1922
+ function StraumurCheckoutContainer() {
1923
+ const threeDSecureRef = (0, import_hooks8.useRef)(null);
1924
+ const { setThreeDSecureRef } = usePaymentMethodGroup();
1925
+ (0, import_hooks8.useEffect)(() => {
1926
+ if (threeDSecureRef.current) {
1927
+ setThreeDSecureRef(threeDSecureRef.current);
1928
+ }
1929
+ }, []);
1930
+ return /* @__PURE__ */ (0, import_preact27.h)("div", { className: "three-d-secure", ref: threeDSecureRef });
1931
+ }
1932
+ var three_d_secure_component_default = StraumurCheckoutContainer;
1933
+
1934
+ // src/features/payment-methods-wrapper/payment-methods-wrapper.tsx
1935
+ var import_preact28 = require("preact");
1936
+ function PaymentMethodsWrapper({ children }) {
1937
+ const { error, success, threeDSecureActive } = usePaymentMethodGroup();
1938
+ if (error || success || threeDSecureActive) {
1939
+ return null;
1940
+ }
1941
+ return /* @__PURE__ */ (0, import_preact28.h)(import_preact28.Fragment, null, children);
1942
+ }
1943
+ var payment_methods_wrapper_default = PaymentMethodsWrapper;
1944
+
1945
+ // src/features/straumur-checkout-container.tsx
1946
+ function StraumurCheckoutContainer2({ configuration, paymentMethods }) {
1947
+ return /* @__PURE__ */ (0, import_preact29.h)(payment_method_group_default, { initialValue: null }, /* @__PURE__ */ (0, import_preact29.h)(payment_methods_wrapper_default, null, /* @__PURE__ */ (0, import_preact29.h)(stored_card_container_component_default, { configuration, paymentMethods }), /* @__PURE__ */ (0, import_preact29.h)(card_component_default, { configuration, paymentMethods }), /* @__PURE__ */ (0, import_preact29.h)(google_pay_component_default, { configuration, paymentMethods })), /* @__PURE__ */ (0, import_preact29.h)(three_d_secure_component_default, null), /* @__PURE__ */ (0, import_preact29.h)(result_component_default, { configuration }));
1948
+ }
1949
+ var straumur_checkout_container_default = StraumurCheckoutContainer2;
1950
+
1951
+ // src/straumur-checkout.tsx
1952
+ var StraumurCheckout = class {
1953
+ constructor(config) {
1954
+ this.paymentMethods = null;
1955
+ this.mountElement = null;
1956
+ this.configuration = { ...config, locale: config.locale || "en-US" };
1957
+ }
1958
+ async mount(selector) {
1959
+ try {
1960
+ this.mountElement = typeof selector === "string" ? document.querySelector(selector) : selector;
1961
+ if (!this.mountElement) {
1962
+ this.handleError("error.failedToInitializeStraumurWebComponent");
1963
+ return;
1964
+ }
1965
+ (0, import_preact30.render)(
1966
+ /* @__PURE__ */ (0, import_preact30.h)("div", { className: "component" }, /* @__PURE__ */ (0, import_preact30.h)(loader_default, null)),
1967
+ this.mountElement
1968
+ );
1969
+ const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);
1970
+ if (response.resultCode === "Error") {
1971
+ this.handleError(response.error);
1972
+ return;
1973
+ }
1974
+ this.paymentMethods = response;
1975
+ this.configuration.locale = this.configuration.locale || this.paymentMethods.locale;
1976
+ this.renderComponent();
1977
+ } catch (error) {
1978
+ }
1979
+ }
1980
+ renderComponent() {
1981
+ if (!this.mountElement) return;
1982
+ (0, import_preact30.render)(
1983
+ /* @__PURE__ */ (0, import_preact30.h)(straumur_checkout_container_default, { configuration: this.configuration, paymentMethods: this.paymentMethods }),
1984
+ this.mountElement
1985
+ );
1986
+ }
1987
+ updateConfig(newConfig) {
1988
+ this.configuration = {
1989
+ ...this.configuration,
1990
+ ...newConfig
1991
+ };
1992
+ if (this.mountElement) {
1993
+ this.renderComponent();
1994
+ }
1995
+ }
1996
+ setLanguage(locale) {
1997
+ this.updateConfig({
1998
+ locale
1999
+ });
2000
+ }
2001
+ destroy() {
2002
+ if (this.mountElement) {
2003
+ (0, import_preact30.render)(null, this.mountElement);
2004
+ this.mountElement = null;
2005
+ }
2006
+ }
2007
+ handleError(message) {
2008
+ (0, import_preact30.render)(
2009
+ /* @__PURE__ */ (0, import_preact30.h)("div", { className: "component" }, /* @__PURE__ */ (0, import_preact30.h)(failure_default, null), /* @__PURE__ */ (0, import_preact30.h)("p", null, i18n(this.configuration.locale, message))),
2010
+ this.mountElement
2011
+ );
2012
+ }
2013
+ };
2014
+ var straumur_checkout_default = StraumurCheckout;
2015
+ // Annotate the CommonJS export names for ESM import in node:
2016
+ 0 && (module.exports = {
2017
+ StraumurCheckout
2018
+ });