straumur-web-component 1.1.2 → 1.1.3-alpha.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/straumur-checkout.tsx","#style-inject:#style-inject","../src/styles/main.css","../src/env.ts","../src/adapter/straumur-adapter.ts","../src/services/straumur-service.ts","../src/features/straumur-checkout-container.tsx","../src/features/card/card-component.tsx","../src/features/card/card-component.css","../src/components/payment-method-group/payment-method-group-context.tsx","../src/localizations/i18n-context.tsx","../src/assets/icons/card.tsx","../src/utils/renderBrandIcons.tsx","../src/assets/icons/mastercard.tsx","../src/assets/icons/visa.tsx","../src/assets/icons/maestro.tsx","../src/assets/icons/amex.tsx","../src/assets/icons/jcb.tsx","../src/assets/icons/diners.tsx","../src/assets/icons/discover.tsx","../src/assets/icons/cup.tsx","../src/components/tooltip/tooltip.tsx","../src/components/tooltip/tooltip.css","../src/utils/custom-hooks/use-media-query.ts","../src/components/card-form/card-form.tsx","../src/assets/icons/info.tsx","../src/assets/icons/loader.tsx","../src/assets/icons/checkmark.tsx","../src/components/render-dual-brand/render-dual-brand.tsx","../src/features/google-pay/google-pay-component.tsx","../src/features/google-pay/google-pay-component.css","../src/assets/icons/googlepay.tsx","../src/components/google-pay-button/google-pay-button.css","../src/components/google-pay-button/google-pay-button.tsx","../src/models/constants.ts","../src/features/apple-pay/apple-pay-component.tsx","../src/features/apple-pay/apple-pay-component.css","../src/assets/icons/applepay.tsx","../src/components/apple-pay-button/apple-pay-button.css","../src/components/apple-pay-button/apple-pay-button.tsx","../src/features/stored-card/stored-card-container-component.tsx","../src/features/stored-card/stored-card-component.tsx","../src/features/stored-card/stored-card-component.css","../src/assets/icons/warning.tsx","../src/components/payment-method-group/payment-method-group.tsx","../src/components/payment-method-group/payment-method-group.css","../src/features/result-component/result-component.tsx","../src/features/result-component/result-component.css","../src/assets/icons/success.tsx","../src/assets/icons/failure.tsx","../src/features/payment-methods-wrapper/payment-methods-wrapper.tsx","../src/features/instantPayments/instant-payments-component.tsx","../src/features/instantPayments/instant-payments-component.css","../src/localizations/translations.ts","../src/localizations/i18n-service.ts"],"sourcesContent":["import { h, render } from \"preact\";\nimport \"./styles/main.css\";\nimport { StraumurCheckoutConfiguration, StraumurWebConfiguration } from \"./models/models\";\nimport { setupPaymentMethods } from \"./services/straumur-service\";\nimport { Language, TranslationKey } from \"./localizations/translations\";\nimport StraumurCheckoutContainer from \"./features/straumur-checkout-container\";\nimport { SuccessResponse } from \"./services/models\";\nimport FailureIcon from \"./assets/icons/failure\";\nimport LoaderIcon from \"./assets/icons/loader\";\nimport {\n AdyenCheckout,\n AdditionalDetailsData,\n UIElement,\n UIElementProps,\n AdditionalDetailsActions,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody } from \"./adapter/models\";\nimport { createDetailsRequest } from \"./adapter/straumur-adapter\";\nimport SuccessIcon from \"./assets/icons/success\";\nimport { I18nProvider } from \"./localizations/i18n-context\";\nimport { I18nService } from \"./localizations/i18n-service\";\n\nclass StraumurCheckout {\n private configuration: StraumurCheckoutConfiguration;\n private paymentMethods: SuccessResponse | null = null;\n private mountElement: HTMLElement | null = null;\n private i18n: I18nService;\n\n constructor(config: StraumurWebConfiguration) {\n this.configuration = {\n ...config,\n locale: determineLocale(config.locale),\n customLocalizations: config.localizations,\n };\n\n // Create i18n instance\n this.i18n = new I18nService(this.configuration.locale, this.configuration.customLocalizations);\n\n function determineLocale(locale: \"is\" | \"en\" | undefined): Language {\n switch (locale) {\n case \"is\":\n return \"is-IS\";\n case \"en\":\n return \"en-US\";\n default:\n return \"is-IS\";\n }\n }\n }\n\n async mount(selector: HTMLElement | string): Promise<void> {\n try {\n this.mountElement = typeof selector === \"string\" ? document.querySelector(selector) : selector;\n\n if (!this.mountElement) {\n this.handleError(\"error.failedToInitializeStraumurWebComponent\");\n return;\n }\n\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <LoaderIcon />\n </div>\n </RootComponent>,\n this.mountElement\n );\n\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\n\n if (response.resultCode === \"Error\") {\n this.handleError(response.error);\n return;\n }\n\n this.paymentMethods = response;\n\n this.configuration.locale = this.configuration.locale || this.paymentMethods.locale;\n\n this.renderComponent();\n } catch (error) {}\n }\n\n private renderComponent(): void {\n if (!this.mountElement) return;\n\n render(\n <RootComponent>\n <I18nProvider\n i18nService={this.i18n}\n onLanguageChange={(language) => {\n this.configuration.locale = language;\n this.renderComponent();\n }}\n >\n <StraumurCheckoutContainer configuration={this.configuration} paymentMethods={this.paymentMethods!} />\n </I18nProvider>\n </RootComponent>,\n this.mountElement\n );\n }\n\n handleSuccess(message: TranslationKey) {\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <SuccessIcon />\n <p>{this.i18n.t(message)}</p>\n </div>\n </RootComponent>,\n this.mountElement!\n );\n }\n\n handleError(message: TranslationKey) {\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <FailureIcon />\n <p>{this.i18n.t(message)}</p>\n </div>\n </RootComponent>,\n this.mountElement!\n );\n }\n\n async submitDetails(redirectResult: string) {\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\n\n if (response.resultCode === \"Error\") {\n this.handleError(response.error);\n return;\n }\n\n const checkout = await AdyenCheckout({\n environment: this.configuration.environment,\n clientKey: response.clientKey,\n paymentMethodsResponse: response.paymentMethods,\n countryCode: \"IS\",\n onAdditionalDetails: this.handleOnSubmitAdditionalData,\n });\n\n checkout.submitDetails({\n details: {\n redirectResult,\n },\n });\n }\n\n private async handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: this.configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(this.configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n this.handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n this.handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n\n if (resultCode === \"Authorised\") {\n this.handleSuccess(\"success.paymentAuthorized\");\n } else {\n this.handleError(\"error.paymentUnsuccessful\");\n }\n }\n\n updateConfig(newConfig: Partial<StraumurCheckoutConfiguration>): void {\n this.configuration = {\n ...this.configuration,\n ...newConfig,\n };\n\n // Update i18n if locale or customLocalizations changed\n if (newConfig.locale) {\n this.i18n.setLanguage(newConfig.locale);\n }\n if (newConfig.customLocalizations) {\n this.i18n.updateCustomLocalizations(newConfig.customLocalizations);\n }\n\n // Re-render the component with new config\n if (this.mountElement) {\n this.renderComponent();\n }\n }\n\n setLanguage(locale: Language): void {\n this.updateConfig({\n locale: locale,\n });\n }\n\n destroy(): void {\n // Clean up resources\n if (this.mountElement) {\n render(null, this.mountElement);\n this.mountElement = null;\n }\n }\n}\n\nexport default StraumurCheckout;\n\nfunction RootComponent({ children }: { children: h.JSX.Element }) {\n return <div className=\"straumur__root-component\">{children}</div>;\n}\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\":root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-neon-green-zeta: #88a64e;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: 4px}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;max-width:440px;min-width:320px}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:#72889d}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}\\n\")","const getEnv = (): Env => {\n return {\n STAGING_BASE_URL: \"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout\",\n PRODUCTION_BASE_URL: \"https://greidslugatt.straumur.is/api/v1/embeddedcheckout\",\n\n GET_PAYMENT_METHODS_URL: \"payment-methods\",\n POST_PAYMENT_URL: \"payment\",\n POST_DETAILS_URL: \"details\",\n POST_DISABLE_TOKEN_URL: \"disable-token\",\n };\n};\n\ninterface Env {\n STAGING_BASE_URL: string;\n PRODUCTION_BASE_URL: string;\n\n GET_PAYMENT_METHODS_URL: string;\n POST_PAYMENT_URL: string;\n POST_DETAILS_URL: string;\n POST_DISABLE_TOKEN_URL: string;\n}\n\nexport const env = getEnv();\n","import { ICreateDetailsBody, ICreatePaymentBody, IGetPaymentMethodsBody, IPostDisableTokenBody } from \"./models\";\nimport { env } from \"../env\";\n\nfunction getBaseUrl(environment: \"test\" | \"live\"): string {\n switch (environment) {\n case \"test\":\n return env.STAGING_BASE_URL;\n case \"live\":\n return env.PRODUCTION_BASE_URL;\n default:\n throw new Error(`Unknown environment: ${environment}`);\n }\n}\n\nexport function getPaymentMethods(environment: \"test\" | \"live\", body: IGetPaymentMethodsBody) {\n return fetch(`${getBaseUrl(environment)}/${env.GET_PAYMENT_METHODS_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function createPaymentRequest(environment: \"test\" | \"live\", body: ICreatePaymentBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_PAYMENT_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function createDetailsRequest(environment: \"test\" | \"live\", body: ICreateDetailsBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_DETAILS_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function postDisableTokenRequest(environment: \"test\" | \"live\", body: IPostDisableTokenBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_DISABLE_TOKEN_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n","import { getPaymentMethods } from \"../adapter/straumur-adapter\";\nimport { TranslationKey } from \"../localizations/translations\";\nimport { StraumurCheckoutPaymentMethods, StraumurCheckoutPaymentMethodsResponse } from \"./models\";\n\nexport async function setupPaymentMethods(\n environment: \"test\" | \"live\",\n sessionId: string\n): Promise<StraumurCheckoutPaymentMethodsResponse> {\n try {\n const fetchResponse = await getPaymentMethods(environment, {\n sessionId,\n });\n\n if (!fetchResponse.ok) {\n const contentType = fetchResponse.headers.get(\"content-type\");\n let errorMessage: TranslationKey = \"error.failedToInitializePaymentMethods\";\n if (contentType && contentType.includes(\"application/json\")) {\n errorMessage = (await fetchResponse.json()).errorMessage;\n }\n\n return {\n resultCode: \"Error\",\n error: errorMessage,\n };\n }\n\n const data: StraumurCheckoutPaymentMethods = await fetchResponse.json();\n\n return {\n resultCode: \"Success\",\n ...data,\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n return {\n resultCode: \"Error\",\n error: \"error.failedToInitializePaymentMethods\",\n };\n }\n}\n","import { h } from \"preact\";\nimport { StraumurCheckoutConfiguration } from \"../models/models\";\nimport { SuccessResponse } from \"../services/models\";\nimport CardComponent from \"./card/card-component\";\nimport GooglePayComponent from \"./google-pay/google-pay-component\";\nimport ApplePayComponent from \"./apple-pay/apple-pay-component\";\nimport StoredCardContainerComponent from \"./stored-card/stored-card-container-component\";\nimport PaymentMethodGroup from \"../components/payment-method-group/payment-method-group\";\nimport ResultComponent from \"./result-component/result-component\";\nimport PaymentMethodsWrapper from \"./payment-methods-wrapper/payment-methods-wrapper\";\nimport InstantPaymentsComponent from \"./instantPayments/instant-payments-component\";\n\ninterface StraumurCheckoutContainerProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction StraumurCheckoutContainer({ configuration, paymentMethods }: StraumurCheckoutContainerProps): h.JSX.Element {\n return (\n <PaymentMethodGroup initialValue={null}>\n <PaymentMethodsWrapper>\n <InstantPaymentsComponent configuration={configuration} paymentMethods={paymentMethods} />\n <StoredCardContainerComponent configuration={configuration} paymentMethods={paymentMethods} />\n <CardComponent configuration={configuration} paymentMethods={paymentMethods} />\n <GooglePayComponent configuration={configuration} paymentMethods={paymentMethods} />\n <ApplePayComponent configuration={configuration} paymentMethods={paymentMethods} />\n </PaymentMethodsWrapper>\n\n <ResultComponent />\n </PaymentMethodGroup>\n );\n}\n\nexport default StraumurCheckoutContainer;\n","import { h } from \"preact\";\nimport { useState } from \"preact/hooks\";\nimport \"./card-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport CardIcon from \"../../assets/icons/card\";\nimport { BrandHidden, RenderBrandIcons } from \"../../utils/renderBrandIcons\";\nimport { CardComponentProps } from \"./models\";\nimport CardForm from \"../../components/card-form/card-form\";\n\nfunction CardComponent({ configuration, paymentMethods }: CardComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const [brandHidden, setBrandHidden] = useState<BrandHidden[]>([]);\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive } = usePaymentMethodGroup();\n\n const hasCardPaymentMethod = paymentMethods.paymentMethods.paymentMethods?.some((x) => x.type === \"scheme\");\n\n if (!hasCardPaymentMethod || (activePaymentMethod !== \"card\" && threeDSecureActive)) {\n // if threeDSecureActive for some other payment method, do not show card form\n return null;\n }\n\n const schemeBrands = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"scheme\")!.brands!;\n\n const brands = schemeBrands.map((x) => {\n return { brand: x, brandFullName: x };\n });\n\n const handleBoxChange = () => {\n setActivePaymentMethod(\"card\");\n };\n\n return (\n <label className=\"straumur__card-component\">\n <input\n type=\"radio\"\n className=\"straumur__card-component__radio-selector\"\n checked={activePaymentMethod === \"card\"}\n onChange={handleBoxChange}\n />\n <span className=\"straumur__card-component__content\">\n <span className=\"straumur__card-component--circle\"></span>\n <CardIcon />\n <span className=\"straumur__card-component--text\">{i18n.t(\"cards.title\")}</span>\n <span className=\"straumur__card-component--brands\">\n <RenderBrandIcons brands={brands} brandHidden={brandHidden} />\n </span>\n </span>\n <CardForm configuration={configuration} paymentMethods={paymentMethods} onBrandHidden={setBrandHidden} />\n </label>\n );\n}\n\nexport default CardComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__card-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__card-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__card-component__content{display:grid;grid-template-columns:26px 40px auto 1fr;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__card-component__content:hover .straumur__card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__radio-selector:checked~.straumur__card-component__expandable{max-height:600px;opacity:1}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-blue-beta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.straumur__card-component__dual-branding{display:grid;grid-template-columns:1fr 1fr;gap:var(--straumur__space-5xlg)}.straumur__card-component__dual-branding--logo{display:flex;align-items:center;padding:var(--straumur__space-xs);border:1px solid var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-s)}.straumur__card-component__dual-branding--logo--item{display:flex;pointer-events:none}.straumur__card-component__dual-branding--logo--selected{border:1px solid var(--straumur__color-cosmos-blue-delta);justify-content:space-between}\\n\")","import { h } from \"preact\";\nimport { createContext, ComponentChildren } from \"preact\";\nimport { useState, useContext } from \"preact/hooks\";\nimport { PaymentMethod } from \"../../models/constants\";\nimport { TranslationKey } from \"../../localizations/translations\";\n\ntype PaymentMethodContextType = {\n activePaymentMethod: PaymentMethod | null;\n setActivePaymentMethod: (value: PaymentMethod) => void;\n activeStoredPaymentMethodId: string | null;\n setActiveStoredPaymentMethodId: (value: string) => void;\n isPaymentMethodInitialized: Record<PaymentMethod, boolean>;\n updatePaymentMethodInitialization: (paymentMethod: PaymentMethod, isInitialized: boolean) => void;\n isStoredCardInitialized: Record<string, boolean>;\n updateStoredCardInitialization: (storedPaymentMethod: string, isInitialized: boolean) => void;\n handleSuccess: (success: TranslationKey) => void;\n success: TranslationKey | null;\n handleError: (error: TranslationKey) => void;\n error: TranslationKey | null;\n threeDSecureActive: boolean;\n setThreeDSecureActive: (value: boolean) => void;\n};\n\nconst PaymentMethodContext = createContext<PaymentMethodContextType | undefined>(undefined);\n\nconst defaultIsInitialized: Record<PaymentMethod, boolean> = {\n card: false,\n storedcard: false,\n googlepay: false,\n applepay: false,\n};\n\nexport const PaymentMethodGroupContext = ({\n children,\n initialValue,\n}: {\n children: ComponentChildren;\n initialValue: PaymentMethod | null;\n}): h.JSX.Element => {\n const [activePaymentMethod, setActivePaymentMethod] = useState(initialValue);\n const [activeStoredPaymentMethodId, setActiveStoredPaymentMethodId] = useState<string | null>(null);\n const [threeDSecureActive, setThreeDSecureActive] = useState<boolean>(false);\n const [isPaymentMethodInitialized, setIsPaymentMethodInitialized] = useState(defaultIsInitialized);\n const [isStoredCardInitialized, setIsStoredCardInitialized] = useState<Record<string, boolean>>({});\n\n const [success, setSuccess] = useState<TranslationKey | null>(null);\n const [error, setError] = useState<TranslationKey | null>(null);\n\n const updatePaymentMethodInitialization = (paymentMethod: PaymentMethod, isInitialized: boolean) => {\n setIsPaymentMethodInitialized((prevState) => ({\n ...prevState,\n [paymentMethod]: isInitialized,\n }));\n };\n\n const updateStoredCardInitialization = (storedPaymentMethod: string, isInitialized: boolean) => {\n setIsStoredCardInitialized((prevState) => ({\n ...prevState,\n [storedPaymentMethod]: isInitialized,\n }));\n };\n\n const handleError = (error: TranslationKey) => {\n setError(error);\n };\n\n const handleSuccess = (success: TranslationKey) => {\n setSuccess(success);\n };\n\n return (\n <PaymentMethodContext.Provider\n value={{\n activePaymentMethod,\n setActivePaymentMethod,\n activeStoredPaymentMethodId,\n setActiveStoredPaymentMethodId,\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n isStoredCardInitialized,\n updateStoredCardInitialization,\n handleSuccess,\n success,\n handleError,\n error,\n threeDSecureActive,\n setThreeDSecureActive,\n }}\n >\n {children}\n </PaymentMethodContext.Provider>\n );\n};\n\nexport const usePaymentMethodGroup = (): PaymentMethodContextType => {\n const context = useContext(PaymentMethodContext);\n if (context === undefined) {\n throw new Error(\"usePaymentMethodGroup must be used within a PaymentMethodGroup\");\n }\n return context as PaymentMethodContextType;\n};\n","import { h } from \"preact\";\nimport { createContext, ComponentChildren } from \"preact\";\nimport { useContext } from \"preact/hooks\";\nimport { Language } from \"./translations\";\nimport { I18nService } from \"./i18n-service\";\n\ntype I18nContextType = {\n i18n: I18nService;\n changeLanguage: (language: Language) => void;\n};\n\nconst I18nContext = createContext<I18nContextType | undefined>(undefined);\n\nexport const I18nProvider = ({\n children,\n i18nService,\n onLanguageChange,\n}: {\n children: ComponentChildren;\n i18nService: I18nService; // Use existing instance from StraumurCheckout\n onLanguageChange?: (language: Language) => void;\n}): h.JSX.Element => {\n const changeLanguage = (newLanguage: Language) => {\n i18nService.setLanguage(newLanguage);\n onLanguageChange?.(newLanguage);\n };\n\n return <I18nContext.Provider value={{ i18n: i18nService, changeLanguage }}>{children}</I18nContext.Provider>;\n};\n\nexport const useI18n = (): I18nContextType => {\n const context = useContext(I18nContext);\n if (!context) {\n throw new Error(\"useI18n must be used within an I18nProvider\");\n }\n return context;\n};\n","import { h } from \"preact\";\n\nconst CardIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path d=\"M24 11H0V7H24V11Z\" fill=\"#002649\" />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#002649\"\n />\n </svg>\n);\n\nexport default CardIcon;\n","import { Fragment, h } from \"preact\";\nimport MasterCardIcon from \"../assets/icons/mastercard\";\nimport VisaIcon from \"../assets/icons/visa\";\nimport MaestroIcon from \"../assets/icons/maestro\";\nimport AmexIcon from \"../assets/icons/amex\";\nimport JcbIcon from \"../assets/icons/jcb\";\nimport DinersIcon from \"../assets/icons/diners\";\nimport DiscoverIcon from \"../assets/icons/discover\";\nimport CupIcon from \"../assets/icons/cup\";\nimport { Tooltip } from \"../components/tooltip/tooltip\";\nimport { useMediaQuery } from \"./custom-hooks/use-media-query\";\n\ninterface BrandIcon {\n brand: string;\n brandFullName: string;\n}\n\nexport interface BrandHidden {\n brand: string;\n}\n\ninterface RenderBrandIconsProps {\n brands: BrandIcon[];\n brandHidden?: BrandHidden[];\n limit?: number;\n}\n\nexport function RenderBrandIcons({ brands, brandHidden = [], limit = 3 }: RenderBrandIconsProps): h.JSX.Element {\n const isWidth380 = useMediaQuery(\"(max-width: 380px)\");\n const isWidth335 = useMediaQuery(\"(max-width: 335px)\");\n const widthLimit = isWidth335 ? 1 : isWidth380 ? 2 : limit;\n\n const brandToShow = brands.filter((brand) => {\n const { brand: brandName } = brand;\n const hidden = brandHidden.some((x) => x.brand === brandName);\n\n return !hidden;\n });\n\n return (\n <Fragment>\n {brandToShow.map(({ brand }, index) => {\n if (index >= Math.min(limit, widthLimit)) {\n if (index === Math.min(limit, widthLimit)) {\n return (\n <Tooltip\n content={\n <span style={{ display: \"flex\", gap: \"4px\", overflow: \"visible\" }}>\n {brandToShow.slice(Math.min(limit, widthLimit)).map(({ brand }) => (\n <RenderBrandIcon key={brand} brand={brand} />\n ))}\n </span>\n }\n >\n <span key={brand} className=\"straumur__render-brand-icons__overflow\">\n +{brandToShow.length - Math.min(limit, widthLimit)}\n </span>\n </Tooltip>\n );\n }\n return null;\n }\n\n return <RenderBrandIcon key={brand} brand={brand} />;\n })}\n </Fragment>\n );\n}\n\nexport const RenderBrandIcon = ({\n brand,\n defaultToBrandName = true,\n}: {\n brand: string;\n defaultToBrandName?: boolean;\n}): h.JSX.Element => {\n switch (brand) {\n case \"visa\":\n return <VisaIcon />;\n case \"mc\":\n return <MasterCardIcon />;\n case \"maestro\":\n return <MaestroIcon />;\n case \"amex\":\n return <AmexIcon />;\n case \"jcb\":\n return <JcbIcon />;\n case \"diners\":\n return <DinersIcon />;\n case \"discover\":\n return <DiscoverIcon />;\n case \"cup\":\n return <CupIcon />;\n default:\n if (defaultToBrandName) {\n return <span>{brand}</span>;\n }\n return <Fragment></Fragment>;\n }\n};\n","import { h } from \"preact\";\n\ninterface MasterCardIconProps {\n opacity?: number;\n}\n\nconst MasterCardIcon = ({ opacity = 1 }: MasterCardIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path fill=\"#F06022\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\n <path\n fill=\"#EA1D25\"\n 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\"\n />\n <path\n fill=\"#F79D1D\"\n 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\"\n />\n </svg>\n);\n\nexport default MasterCardIcon;\n","import { h } from \"preact\";\n\ninterface VisaIconProps {\n opacity?: number;\n}\n\nconst VisaIcon = ({ opacity = 1 }: VisaIconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"26\" fill=\"none\" viewBox=\"0 0 40 26\" opacity={opacity}>\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path\n fill=\"#1434CB\"\n 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\"\n />\n </svg>\n);\n\nexport default VisaIcon;\n","import { h } from \"preact\";\n\ninterface MaestroIconProps {\n opacity?: number;\n}\n\nconst MaestroIcon = ({ opacity = 1 }: MaestroIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path fill=\"#7773B4\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\n <path\n fill=\"#EA1D25\"\n 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\"\n />\n <path\n fill=\"#139FDA\"\n 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\"\n />\n </svg>\n);\n\nexport default MaestroIcon;\n","import { h } from \"preact\";\n\ninterface AmexIconProps {\n opacity?: number;\n}\n\nconst AmexIcon = ({ opacity = 1 }: AmexIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <path fill=\"#016FD0\" d=\"M0 26h40V0H0v26z\" />\n <path\n fill=\"#fff\"\n fill-rule=\"evenodd\"\n 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\"\n />\n </svg>\n);\n\nexport default AmexIcon;\n","import { h } from \"preact\";\n\ninterface JcbIconProps {\n opacity?: number;\n}\n\nconst JcbIcon = ({ opacity = 1 }: JcbIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <g clip-path=\"url(#a)\">\n <path fill=\"#fff\" d=\"M0 0h40v26H0V0Z\" />\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"url(#b)\"\n 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\"\n />\n <path\n fill=\"url(#c)\"\n 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\"\n />\n <path\n fill=\"url(#d)\"\n 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\"\n />\n <path\n fill=\"url(#e)\"\n 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\"\n />\n <path\n fill=\"url(#f)\"\n 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\"\n />\n </g>\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"14.38\"\n y2=\"14.38\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"c\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"d\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"11.37\"\n y2=\"11.37\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"e\"\n x1=\"4.86\"\n x2=\"14.24\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#1F286F\" />\n <stop offset=\".48\" stop-color=\"#004E94\" />\n <stop offset=\".83\" stop-color=\"#0066B1\" />\n <stop offset=\"1\" stop-color=\"#006FBC\" />\n </linearGradient>\n <linearGradient\n id=\"f\"\n x1=\"15.15\"\n x2=\"24.25\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#6C2C2F\" />\n <stop offset=\".17\" stop-color=\"#882730\" />\n <stop offset=\".57\" stop-color=\"#BE1833\" />\n <stop offset=\".86\" stop-color=\"#DC0436\" />\n <stop offset=\"1\" stop-color=\"#E60039\" />\n </linearGradient>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default JcbIcon;\n","import { h } from \"preact\";\n\ninterface DinersIconProps {\n opacity?: number;\n}\n\nconst DinersIcon = ({ opacity = 1 }: DinersIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <g fill=\"#1a1918\">\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n </g>\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"#154a78\"\n 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\"\n />\n </svg>\n);\n\nexport default DinersIcon;\n","import { h } from \"preact\";\n\ninterface DiscoverIconProps {\n opacity?: number;\n}\n\nconst DiscoverIcon = ({ opacity = 1 }: DiscoverIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <g clip-path=\"url(#a)\">\n <g clip-path=\"url(#b)\">\n <path\n fill=\"#000\"\n 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\"\n />\n </g>\n <path\n fill=\"#000\"\n 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\"\n />\n <path\n fill=\"url(#c)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <path\n fill=\"url(#d)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <mask\n id=\"e\"\n width=\"6\"\n height=\"6\"\n x=\"18\"\n y=\"10\"\n maskUnits=\"userSpaceOnUse\"\n style=\"mask-type:luminance\"\n >\n <path\n fill=\"#fff\"\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\n />\n </mask>\n <g mask=\"url(#e)\">\n <path\n fill=\"url(#f)\"\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\n />\n </g>\n </g>\n <g clip-path=\"url(#g)\">\n <g clip-path=\"url(#h)\">\n <path\n fill=\"#000\"\n 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\"\n />\n </g>\n <path\n fill=\"#000\"\n 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\"\n />\n <path\n fill=\"url(#i)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <path\n fill=\"url(#j)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <mask\n id=\"k\"\n width=\"6\"\n height=\"6\"\n x=\"18\"\n y=\"10\"\n maskUnits=\"userSpaceOnUse\"\n style=\"mask-type:luminance\"\n >\n <path\n fill=\"#fff\"\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\n />\n </mask>\n <g mask=\"url(#k)\">\n <path\n fill=\"url(#l)\"\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\n />\n </g>\n </g>\n <defs>\n <linearGradient\n id=\"c\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F59F00\" />\n <stop offset=\".19\" stop-color=\"#F49B00\" />\n <stop offset=\".37\" stop-color=\"#F29101\" />\n <stop offset=\".5\" stop-color=\"#F08302\" />\n <stop offset=\".6\" stop-color=\"#EE7905\" />\n <stop offset=\".76\" stop-color=\"#EC7008\" />\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\n </linearGradient>\n <linearGradient\n id=\"d\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\n </linearGradient>\n <radialGradient\n id=\"f\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\n </radialGradient>\n <linearGradient\n id=\"i\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F59F00\" />\n <stop offset=\".19\" stop-color=\"#F49B00\" />\n <stop offset=\".37\" stop-color=\"#F29101\" />\n <stop offset=\".5\" stop-color=\"#F08302\" />\n <stop offset=\".6\" stop-color=\"#EE7905\" />\n <stop offset=\".76\" stop-color=\"#EC7008\" />\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\n </linearGradient>\n <linearGradient\n id=\"j\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\n </linearGradient>\n <radialGradient\n id=\"l\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\n </radialGradient>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"b\">\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"g\">\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"h\">\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default DiscoverIcon;\n","import { h } from \"preact\";\n\ninterface CupIconProps {\n opacity?: number;\n}\n\nconst CupIcon = ({ opacity = 1 }: CupIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <rect width=\"45.3\" height=\"27\" x=\"-3.3\" y=\"-.79\" fill=\"#fff\" rx=\"2.82\" />\n <path\n fill=\"#01798a\"\n 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\"\n />\n <rect\n width=\"20.38\"\n height=\"29.02\"\n x=\"-4\"\n y=\"-.79\"\n fill=\"#dc1f2b\"\n rx=\"2.82\"\n />\n <path\n fill=\"#1a4580\"\n 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\"\n />\n <path\n fill=\"#fff\"\n 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\"\n />\n </svg>\n);\n\nexport default CupIcon;\n","import { h, FunctionalComponent, ComponentChildren } from \"preact\";\nimport \"./tooltip.css\";\nimport { useRef, useState } from \"preact/hooks\";\n\ninterface TooltipProps {\n children: ComponentChildren;\n content: ComponentChildren;\n}\n\nexport const Tooltip: FunctionalComponent<TooltipProps> = ({ children, content }): h.JSX.Element | null => {\n const [isVisible, setIsVisible] = useState(false);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n const handleMouseEnter = () => {\n setIsVisible(true);\n };\n\n const handleMouseLeave = () => {\n setIsVisible(false);\n };\n\n return (\n <div style={{ position: \"relative\" }}>\n <div ref={triggerRef} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n {children}\n </div>\n {isVisible && triggerRef && <div className=\"straumur__tooltip__content\">{content}</div>}\n </div>\n );\n};\n","import styleInject from '#style-inject';styleInject(\".straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}\\n\")","import { useEffect, useState } from \"preact/hooks\";\n\n/**\n * Hook to listen for a CSS media query.\n * @param query - The media query string (e.g., '(min-width: 768px)')\n * @returns true if the query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatch = () => window.matchMedia(query).matches;\n\n const [matches, setMatches] = useState(getMatch);\n\n useEffect(() => {\n const mediaQueryList = window.matchMedia(query);\n const listener = (event: MediaQueryListEvent) => setMatches(event.matches);\n\n // Initial match check\n setMatches(mediaQueryList.matches);\n\n // Listen for changes\n mediaQueryList.addEventListener(\"change\", listener);\n\n return () => {\n mediaQueryList.removeEventListener(\"change\", listener);\n };\n }, [query]);\n\n return matches;\n}\n","import { Fragment, h } from \"preact\";\nimport { useRef, useState, useEffect, StateUpdater, Dispatch } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n CustomCard,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport { Tooltip } from \"../tooltip/tooltip\";\nimport InfoIcon from \"../../assets/icons/info\";\nimport { BrandHidden } from \"../../utils/renderBrandIcons\";\nimport LoaderIcon from \"../../assets/icons/loader\";\nimport CheckmarkIcon from \"../../assets/icons/checkmark\";\nimport { RenderDualBrandComponent, DualBrandConfiguration } from \"../render-dual-brand/render-dual-brand\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\n\nexport interface CardFormProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n onBrandHidden: Dispatch<StateUpdater<BrandHidden[]>>;\n}\n\ntype CardFormError = {\n encryptedCardNumber: {\n visible: boolean;\n message?: string;\n };\n encryptedExpiryDate: {\n visible: boolean;\n message?: string;\n };\n encryptedSecurityCode: {\n visible: boolean;\n message?: string;\n };\n};\n\ntype CardFormErrorField = keyof CardFormError;\n\nfunction CardForm({ configuration, paymentMethods, onBrandHidden }: CardFormProps): h.JSX.Element | null {\n const cardElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const customCardRef = useRef<CustomCard>();\n const { i18n } = useI18n();\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\n const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n const [isDualBrand, setIsDualBrand] = useState(false);\n const [dualBrandConfiguration, setDualBrandConfiguration] = useState<DualBrandConfiguration | null>(null);\n const [selectedBrand, setSelectedBrand] = useState<string | null>(null);\n const storePaymentMethodRef = useRef(false);\n const [formErrors, setFormErrors] = useState<CardFormError>({\n encryptedCardNumber: { visible: false },\n encryptedExpiryDate: { visible: false },\n encryptedSecurityCode: { visible: false },\n });\n\n const hasCardPaymentMethod = paymentMethods.paymentMethods.paymentMethods?.some((x) => x.type === \"scheme\");\n\n const {\n activePaymentMethod,\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n } = usePaymentMethodGroup();\n\n if (!hasCardPaymentMethod || (activePaymentMethod !== \"card\" && threeDSecureActive)) {\n // if threeDSecureActive for some other payment method, do not show card form\n return null;\n }\n\n const schemeBrands = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"scheme\")!.brands!;\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: configuration.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onSubmit: handleOnSubmit,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onError: handleOnError,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n customCardRef.current = new CustomCard(adyenCardRef.current, {\n brands: schemeBrands,\n placeholders: configuration.placeholders,\n challengeWindowSize: \"05\",\n onBinLookup: (event) => {\n if (event.supportedBrandsRaw && event.supportedBrandsRaw.length > 1) {\n setIsDualBrand(true);\n\n setDualBrandConfiguration({\n brand1: event.supportedBrandsRaw[0].brand,\n brand1Name: event.supportedBrandsRaw[0].localeBrand,\n brand1ImageUrl: event.supportedBrandsRaw[0].brandImageUrl,\n brand2: event.supportedBrandsRaw[1].brand,\n brand2Name: event.supportedBrandsRaw[1].localeBrand,\n brand2ImageUrl: event.supportedBrandsRaw[1].brandImageUrl,\n });\n }\n },\n onBrand: (event) => {\n setSecurityCodePolicy(event.cvcPolicy);\n if (event.brand === \"card\") {\n onBrandHidden([]);\n setSelectedBrand(null);\n return;\n }\n\n const selectedBrands = schemeBrands\n .filter((x) => x !== event.brand)\n .map((x) => {\n return {\n brand: x,\n };\n });\n\n onBrandHidden(selectedBrands);\n\n if (\n schemeBrands\n .filter((x) => x === event.brand)\n .map((x) => {\n return {\n brand: x,\n };\n }).length === 1\n ) {\n setSelectedBrand(event.brand);\n }\n },\n onConfigSuccess() {\n updatePaymentMethodInitialization(\"card\", true);\n },\n onValidationError: (event) => {\n const defaultErrors: CardFormError = {\n encryptedCardNumber: { visible: false, message: undefined },\n encryptedExpiryDate: { visible: false, message: undefined },\n encryptedSecurityCode: { visible: false, message: undefined },\n };\n\n event\n .filter((x) => x.error)\n .forEach((x) => {\n defaultErrors[x.fieldType as CardFormErrorField].visible = true;\n defaultErrors[x.fieldType as CardFormErrorField].message = x.errorI18n;\n });\n\n setFormErrors(defaultErrors);\n },\n onAllValid: (event) => {\n setPayButtonDisabled(!event.allValid);\n },\n });\n\n if (cardElementRef.current) {\n customCardRef.current.mount(cardElementRef.current);\n }\n };\n\n useEffect(() => {\n if (activePaymentMethod === \"card\" && !isPaymentMethodInitialized.card) {\n initializeAdyenComponent();\n }\n }, [configuration, activePaymentMethod]);\n\n useEffect(() => {\n if (customCardRef.current && isPaymentMethodInitialized.card) {\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n setFormErrors({\n encryptedCardNumber: { visible: false, message: undefined },\n encryptedExpiryDate: { visible: false, message: undefined },\n encryptedSecurityCode: { visible: false, message: undefined },\n });\n }\n }, [configuration]);\n\n if (paymentMethods.paymentMethods?.paymentMethods?.length === 0) {\n return null;\n }\n\n function dualBrandListener(e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) {\n customCardRef.current!.dualBrandingChangeHandler(e);\n }\n\n function handleStorePaymentMethodChange(event: h.JSX.TargetedEvent<HTMLInputElement, Event>) {\n setStorePaymentMethod(event.currentTarget.checked);\n }\n\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\n handleError(\"error.unknownError\");\n }\n\n useEffect(() => {\n storePaymentMethodRef.current = storePaymentMethod;\n }, [storePaymentMethod]);\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n const data: ICreatePaymentBody = {\n ...state.data,\n storePaymentMethod: storePaymentMethodRef.current,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n function handleSubmitClick() {\n if (!customCardRef.current) return;\n\n customCardRef.current!.submit();\n }\n\n return (\n <div\n className=\"straumur__card-component__expandable\"\n ref={cardElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n }}\n >\n {!isPaymentMethodInitialized.card && (\n <div className=\"straumur__card-component__loading-text\">\n <LoaderIcon />\n </div>\n )}\n\n <div\n className=\"straumur__card-component__form\"\n style={{\n opacity: isPaymentMethodInitialized.card && !threeDSecureActive ? 1 : 0,\n position: isPaymentMethodInitialized.card && !threeDSecureActive ? \"relative\" : \"absolute\",\n transition: \"opacity 0.3s ease-in-out\",\n }}\n >\n <div className=\"straumur__card-component__form--wrapper\">\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\n }`}\n >\n {i18n.t(\"cards.cardNumber\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\n }`}\n data-cse=\"encryptedCardNumber\"\n />\n {formErrors.encryptedCardNumber.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedCardNumber.message}\n </span>\n )}\n </div>\n <div className=\"straumur__card-component__form--field-wrapper\">\n <div className=\"straumur__card-component__form--wrapper\">\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\n }`}\n >\n {i18n.t(\"cards.expiryDate\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\n }`}\n data-cse=\"encryptedExpiryDate\"\n />\n {formErrors.encryptedExpiryDate.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedExpiryDate.message}\n </span>\n )}\n </div>\n\n <div className=\"straumur__card-component__form--wrapper\">\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\n <Fragment>\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__card-component__form--wrapper--label--error\"\n : \"\"\n }`}\n >\n {securityCodePolicy === \"optional\"\n ? i18n.t(\"cards.securityCode3DigitsOptional\")\n : i18n.t(\"cards.securityCode3Digits\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__card-component__form--wrapper--input--error\"\n : \"\"\n }`}\n data-cse=\"encryptedSecurityCode\"\n />\n {formErrors.encryptedSecurityCode.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedSecurityCode.message}\n </span>\n )}\n <div className=\"straumur__card-component__form--wrapper--label--info\">\n <Tooltip content={<span>{i18n.t(\"cards.securityCode3DigitsInfo\")}</span>}>\n <InfoIcon />\n </Tooltip>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n\n {isDualBrand && dualBrandConfiguration && (\n <RenderDualBrandComponent\n dualBrandConfiguration={dualBrandConfiguration}\n selectedBrand={selectedBrand}\n onBrandClick={dualBrandListener}\n />\n )}\n\n {paymentMethods.enableStoreDetails === \"AskForConsent\" && (\n <label className=\"straumur__card-component__form--wrapper--label-checkbox\">\n <div\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark\"} ${\n storePaymentMethod ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked\" : \"\"\n }`}\n >\n <div\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon\"} ${\n storePaymentMethod\n ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked\"\n : \"\"\n }`}\n >\n <CheckmarkIcon />\n </div>\n </div>\n <input\n type=\"checkbox\"\n className=\"straumur__card-component__form--wrapper--label-checkbox--checkbox\"\n checked={storePaymentMethod}\n onChange={handleStorePaymentMethodChange}\n />\n {i18n.t(\"cards.storePaymentMethod\")}\n </label>\n )}\n\n <button\n className=\"straumur__card-component__submit-button\"\n disabled={payButtonDisabled}\n onClick={handleSubmitClick}\n >\n {paymentMethods.formattedAmount}\n </button>\n </div>\n </div>\n );\n}\n\nexport default CardForm;\n","import { h } from \"preact\";\n\nconst InfoIcon = () => (\n <svg width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_10626_39119)\">\n <path\n 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\"\n fill=\"#002649\"\n />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#002649\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_10626_39119\">\n <rect width=\"20\" height=\"20\" fill=\"white\" transform=\"translate(0.664062)\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default InfoIcon;\n","import { h } from \"preact\";\n\nconst LoaderIcon = () => (\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"#002649\">\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(2 2)\" stroke-width=\"4\">\n <circle stroke-opacity=\".3\" cx=\"18\" cy=\"18\" r=\"18\" />\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 18 18\"\n to=\"360 18 18\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </g>\n </g>\n </svg>\n);\n\nexport default LoaderIcon;\n","import { h } from \"preact\";\n\nconst CheckmarkIcon = ({ color = \"var(--straumur__color-primary)\" }: { color?: string }) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"13\" viewBox=\"0 0 16 13\" fill=\"none\">\n <path d=\"M2 7L6 11L14 2\" stroke={color} stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n);\n\nexport default CheckmarkIcon;\n","import { h } from \"preact\";\nimport { RenderBrandIcon } from \"../../utils/renderBrandIcons\";\nimport CheckmarkIcon from \"../../assets/icons/checkmark\";\n\ntype DualBrandConfiguration = {\n brand1: string;\n brand1Name?: string;\n brand1ImageUrl?: string;\n brand2: string;\n brand2Name?: string;\n brand2ImageUrl?: string;\n};\n\ninterface RenderDualBrandComponentProps {\n dualBrandConfiguration: DualBrandConfiguration;\n selectedBrand: string | null;\n onBrandClick: (e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) => void;\n}\n\ninterface BrandOptionProps {\n brand: string;\n brandName?: string;\n isSelected: boolean;\n onBrandClick: (e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) => void;\n}\n\nfunction BrandOption({ brand, brandName, isSelected, onBrandClick }: BrandOptionProps): h.JSX.Element {\n return (\n <span\n className={\n `straumur__card-component__dual-branding--logo` +\n (isSelected ? \" straumur__card-component__dual-branding--logo--selected\" : \"\")\n }\n title={brand}\n data-value={brand}\n onClick={onBrandClick}\n >\n <div className=\"straumur__card-component__dual-branding--logo--item\">\n <RenderBrandIcon brand={brand} defaultToBrandName={false} />\n &nbsp;{brandName ?? \"\"}\n </div>\n {isSelected && <CheckmarkIcon color=\"var(--straumur__color-neon-green-zeta)\" />}\n </span>\n );\n}\n\nexport function RenderDualBrandComponent({\n dualBrandConfiguration,\n selectedBrand,\n onBrandClick,\n}: RenderDualBrandComponentProps): h.JSX.Element {\n return (\n <div className=\"straumur__card-component__dual-branding\">\n <BrandOption\n brand={dualBrandConfiguration.brand1}\n brandName={dualBrandConfiguration.brand1Name}\n isSelected={selectedBrand === dualBrandConfiguration.brand1}\n onBrandClick={onBrandClick}\n />\n <BrandOption\n brand={dualBrandConfiguration.brand2}\n brandName={dualBrandConfiguration.brand2Name}\n isSelected={selectedBrand === dualBrandConfiguration.brand2}\n onBrandClick={onBrandClick}\n />\n </div>\n );\n}\n\nexport type { DualBrandConfiguration };\n","import { h } from \"preact\";\nimport \"./google-pay-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport GooglePayIcon from \"../../assets/icons/googlepay\";\nimport GooglePayButton from \"../../components/google-pay-button/google-pay-button\";\n\ninterface GooglePayComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction GooglePayComponent({ configuration, paymentMethods }: GooglePayComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive } = usePaymentMethodGroup();\n\n const handleBoxChange = () => {\n setActivePaymentMethod(\"googlepay\");\n };\n\n if (configuration.instantPayments && configuration.instantPayments.some((x) => x === \"googlepay\")) {\n return null;\n }\n\n if(activePaymentMethod !== \"googlepay\" && threeDSecureActive) {\n return null;\n }\n\n return (\n <label className=\"straumur__google-pay-component\">\n <input\n type=\"radio\"\n className=\"straumur__google-pay-component__radio-selector\"\n checked={activePaymentMethod === \"googlepay\"}\n onChange={handleBoxChange}\n />\n <span className=\"straumur__google-pay-component__content\">\n <span className=\"straumur__google-pay-component--circle\"></span>\n <GooglePayIcon />\n <span className=\"straumur__google-pay-component--text\">{i18n.t(\"googlePay.title\")}</span>\n </span>\n <div className=\"straumur__google-pay-component__expandable\">\n <GooglePayButton\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={activePaymentMethod === \"googlepay\"}\n isInstantPayment={false}\n />\n </div>\n </label>\n );\n}\n\nexport default GooglePayComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__google-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__google-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__google-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__google-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__google-pay-component__content:hover .straumur__google-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__google-pay-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__google-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__google-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__google-pay-component__radio-selector:checked~.straumur__google-pay-component__expandable{max-height:600px;opacity:1}.straumur__google-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}.adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}\\n\")","import { h } from \"preact\";\n\nconst GooglePayIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n >\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"#3C4043\"\n 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\"\n />\n <path\n fill=\"#3C4043\"\n 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\"\n />\n <path\n fill=\"#4285F4\"\n 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\"\n />\n <path\n fill=\"#34A853\"\n 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\"\n />\n <path\n fill=\"#FABB05\"\n 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\"\n />\n <path\n fill=\"#E94235\"\n 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\"\n />\n </svg>\n);\n\nexport default GooglePayIcon;\n","import styleInject from '#style-inject';styleInject(\".straumur__google-pay-button__loading{display:flex;justify-content:center}\\n\")","import \"./google-pay-button.css\";\nimport { Fragment, h } from \"preact\";\nimport { useEffect, useRef } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n GooglePay,\n GooglePayConfiguration,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { CANCEL } from \"../../models/constants\";\nimport LoaderIcon from \"../../assets/icons/loader\";\n\ninterface GooglePayButtonProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n showPaymentButton: boolean;\n isInstantPayment: boolean;\n}\n\nfunction GooglePayButton({\n configuration,\n paymentMethods,\n showPaymentButton,\n isInstantPayment\n}: GooglePayButtonProps): h.JSX.Element | null {\n const googlePayElementRef = useRef<HTMLDivElement>(null);\n const adyenCheckoutRef = useRef<ICore>();\n const googlePayRef = useRef<GooglePay>();\n const {\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n setActivePaymentMethod,\n activePaymentMethod\n } = usePaymentMethodGroup();\n\n const initializeAdyenComponent = async () => {\n adyenCheckoutRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: paymentMethods.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onError: handleOnError,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n const gpayPaymentMethods = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"googlepay\")!;\n const gpayConfig = gpayPaymentMethods.configuration! as { gatewayMerchantId: string; merchantId: string };\n\n const googlePayConfiguration: GooglePayConfiguration = {\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n challengeWindowSize: \"05\",\n countryCode: \"IS\",\n environment: configuration.environment,\n onSubmit: handleOnSubmit,\n buttonSizeMode: \"fill\",\n configuration: {\n ...gpayConfig,\n merchantName: paymentMethods.merchantName,\n },\n };\n\n googlePayRef.current = new GooglePay(adyenCheckoutRef.current, googlePayConfiguration);\n\n googlePayRef.current\n .isAvailable()\n .then(() => {\n googlePayRef.current!.mount(googlePayElementRef.current!);\n updatePaymentMethodInitialization(\"googlepay\", true);\n })\n .catch(() => {\n handleError(\"error.googlePayNotAvailable\");\n });\n };\n\n useEffect(() => {\n if (showPaymentButton && !isPaymentMethodInitialized.googlepay) {\n initializeAdyenComponent();\n }\n }, [configuration, showPaymentButton]);\n\n useEffect(() => {\n if (googlePayRef.current && isPaymentMethodInitialized.googlepay) {\n googlePayRef.current!.remove();\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n }\n }, [configuration]);\n\n function handleOnError(data: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\n if (data.name !== CANCEL) {\n handleError(\"error.unknownError\");\n }\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n if(isInstantPayment){\n setActivePaymentMethod(\"googlepay\")\n }\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n const hasGooglePay = paymentMethods.paymentMethods!.paymentMethods?.some((x) => x.type === \"googlepay\");\n\n if (!hasGooglePay) {\n return null;\n }\n\n if (activePaymentMethod !== \"googlepay\" && threeDSecureActive) {\n // if threeDSecureActive for some other payment method, do not show google pay\n return null;\n }\n\n return (\n <Fragment>\n {isPaymentMethodInitialized.googlepay === false && (\n <div className=\"straumur__google-pay-button__loading\">\n <LoaderIcon />\n </div>\n )}\n <div\n ref={googlePayElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n position: isPaymentMethodInitialized.googlepay ? \"static\" : \"absolute\",\n }}\n />\n </Fragment>\n );\n}\n\nexport default GooglePayButton;\n","export type PaymentMethod = \"card\" | \"storedcard\" | \"googlepay\" | \"applepay\";\n\nexport const NETWORK_ERROR = \"NETWORK_ERROR\";\nexport const CANCEL = \"CANCEL\";\nexport const IMPLEMENTATION_ERROR = \"IMPLEMENTATION_ERROR\";\nexport const API_ERROR = \"API_ERROR\";\nexport const ERROR = \"ERROR\";\nexport const SCRIPT_ERROR = \"SCRIPT_ERROR\";\nexport const SDK_ERROR = \"SDK_ERROR\";\n","import { h } from \"preact\";\nimport \"./apple-pay-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport ApplePayIcon from \"../../assets/icons/applepay\";\nimport ApplePayButton from \"../../components/apple-pay-button/apple-pay-button\";\n\ninterface ApplePayComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction ApplePayComponent({ configuration, paymentMethods }: ApplePayComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive } = usePaymentMethodGroup();\n\n const handleBoxChange = () => {\n setActivePaymentMethod(\"applepay\");\n };\n\n if (configuration.instantPayments && configuration.instantPayments.some((x) => x === \"applepay\")) {\n return null;\n }\n\n if(activePaymentMethod !== \"applepay\" && threeDSecureActive) {\n return null;\n }\n\n return (\n <label className=\"straumur__apple-pay-component\">\n <input\n type=\"radio\"\n className=\"straumur__apple-pay-component__radio-selector\"\n checked={activePaymentMethod === \"applepay\"}\n onChange={handleBoxChange}\n />\n <span className=\"straumur__apple-pay-component__content\">\n <span className=\"straumur__apple-pay-component--circle\"></span>\n <ApplePayIcon />\n <span className=\"straumur__apple-pay-component--text\">{i18n.t(\"applePay.title\")}</span>\n </span>\n <div className=\"straumur__apple-pay-component__expandable\">\n <ApplePayButton\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={activePaymentMethod === \"applepay\"}\n isInstantPayment={false}\n />\n </div>\n </label>\n );\n}\n\nexport default ApplePayComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__apple-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__apple-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__apple-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__apple-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__apple-pay-component__content:hover .straumur__apple-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__apple-pay-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__apple-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__apple-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__apple-pay-component__radio-selector:checked~.straumur__apple-pay-component__expandable{max-height:600px;opacity:1}.straumur__apple-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}\\n\")","import { h } from \"preact\";\n\nconst ApplePayIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"26\" fill=\"none\" viewBox=\"0 0 40 26\">\n <path\n fill=\"#000\"\n d=\"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24\"\n />\n <path\n fill=\"#000\"\n d=\"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z\"\n />\n </svg>\n);\n\nexport default ApplePayIcon;\n","import styleInject from '#style-inject';styleInject(\".straumur__apple-pay-button__loading{display:flex;justify-content:center}\\n\")","import \"./apple-pay-button.css\";\nimport { Fragment, h } from \"preact\";\nimport { useEffect, useRef } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n ApplePay,\n ApplePayConfiguration,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { CANCEL } from \"../../models/constants\";\nimport \"./apple-pay-button.css\";\nimport LoaderIcon from \"../../assets/icons/loader\";\n\ninterface ApplePayButtonProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n showPaymentButton: boolean;\n isInstantPayment: boolean;\n}\n\nfunction ApplePayButton({\n configuration,\n paymentMethods,\n showPaymentButton,\n isInstantPayment,\n}: ApplePayButtonProps): h.JSX.Element | null {\n const applePayElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const applePayRef = useRef<ApplePay>();\n const {\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n setActivePaymentMethod,\n activePaymentMethod,\n } = usePaymentMethodGroup();\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: paymentMethods.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onError: handleOnError,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n const apayPaymentMethods = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"applepay\")!;\n const apayConfig = apayPaymentMethods.configuration! as { gatewayMerchantId: string; merchantId: string };\n\n const applePayConfiguration: ApplePayConfiguration = {\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n environment: configuration.environment,\n onSubmit: handleOnSubmit,\n configuration: {\n ...apayConfig,\n merchantName: paymentMethods.merchantName,\n },\n };\n\n applePayRef.current = new ApplePay(adyenCardRef.current, applePayConfiguration);\n\n applePayRef.current\n .isAvailable()\n .then(() => {\n applePayRef.current!.mount(applePayElementRef.current!);\n updatePaymentMethodInitialization(\"applepay\", true);\n })\n .catch(() => {\n handleError(\"error.applePayNotAvailable\");\n });\n };\n\n useEffect(() => {\n if (showPaymentButton && !isPaymentMethodInitialized.applepay) {\n initializeAdyenComponent();\n }\n }, [configuration, showPaymentButton]);\n\n useEffect(() => {\n if (applePayRef.current && isPaymentMethodInitialized.applepay) {\n applePayRef.current!.remove();\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n }\n }, [configuration]);\n\n function handleOnError(data: AdyenCheckoutError, _?: UIElement<UIElementProps> | undefined): void {\n if (data.name !== CANCEL) {\n handleError(\"error.unknownError\");\n }\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n if(isInstantPayment){\n setActivePaymentMethod(\"applepay\");\n }\n\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n const hasApplePay = paymentMethods.paymentMethods!.paymentMethods?.some((x) => x.type === \"applepay\");\n\n if (!hasApplePay) {\n return null;\n }\n\n if (activePaymentMethod !== \"applepay\" && threeDSecureActive) {\n // if threeDSecureActive for some other payment method, do not show apple pay\n return null;\n }\n\n return (\n <Fragment>\n {isPaymentMethodInitialized.applepay === false && (\n <div className=\"straumur__apple-pay-button__loading\">\n <LoaderIcon />\n </div>\n )}\n <div\n ref={applePayElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n position: isPaymentMethodInitialized.applepay ? \"static\" : \"absolute\",\n }}\n />\n </Fragment>\n );\n}\n\nexport default ApplePayButton;\n","import { Fragment, h } from \"preact\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { StoredPaymentMethod, SuccessResponse } from \"../../services/models\";\nimport StoredCardComponent from \"./stored-card-component\";\nimport { useState } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\n\ninterface StoredCardContainerComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction StoredCardContainerComponent({\n configuration,\n paymentMethods,\n}: StoredCardContainerComponentProps): h.JSX.Element | null {\n const [storedPaymentMethods, setStoredPaymentMethods] = useState<StoredPaymentMethod[]>(\n paymentMethods.paymentMethods.storedPaymentMethods ?? []\n );\n const { activePaymentMethod, threeDSecureActive } = usePaymentMethodGroup();\n\n if (\n !storedPaymentMethods ||\n storedPaymentMethods?.length === 0 ||\n (activePaymentMethod !== \"storedcard\" && threeDSecureActive) // if threeDSecureActive for some other payment method, do not show stored cards\n ) {\n return null;\n }\n\n function handleStoredCardRemoved(storedPaymentMethodId: string): void {\n setStoredPaymentMethods((prevStoredPaymentMethods) =>\n prevStoredPaymentMethods.filter((storedPaymentMethod) => storedPaymentMethod.id !== storedPaymentMethodId)\n );\n }\n\n return (\n <Fragment>\n {storedPaymentMethods?.map((storedPaymentMethod) => (\n <StoredCardComponent\n key={storedPaymentMethod.id}\n configuration={configuration}\n storedPaymentMethod={storedPaymentMethod}\n paymentMethods={paymentMethods}\n onStoredCardRemoved={handleStoredCardRemoved}\n />\n ))}\n </Fragment>\n );\n}\n\nexport default StoredCardContainerComponent;\n","import { Fragment, h } from \"preact\";\nimport { useEffect, useRef, useState } from \"preact/hooks\";\nimport \"./stored-card-component.css\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { Tooltip } from \"../../components/tooltip/tooltip\";\nimport InfoIcon from \"../../assets/icons/info\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n CustomCard,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { RenderBrandIcons } from \"../../utils/renderBrandIcons\";\nimport LoaderIcon from \"../../assets/icons/loader\";\nimport { StoredCardComponentProps, StoredCardFormError, StoredCardFormErrorField } from \"./models\";\nimport WarningIcon from \"../../assets/icons/warning\";\nimport { ICreateDetailsBody, ICreatePaymentBody, IPostDisableTokenBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest, postDisableTokenRequest } from \"../../adapter/straumur-adapter\";\n\nfunction StoredCardComponent({\n configuration,\n paymentMethods,\n storedPaymentMethod,\n onStoredCardRemoved,\n}: StoredCardComponentProps): h.JSX.Element {\n const storedCardElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const customCardRef = useRef<CustomCard>();\n const { i18n } = useI18n();\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\n const [askConfirmRemoveStoredCard, setAskConfirmRemoveStoredCard] = useState<boolean>(false);\n const [formErrors, setFormErrors] = useState<StoredCardFormError>({\n encryptedSecurityCode: { visible: false },\n });\n const {\n activePaymentMethod,\n setActivePaymentMethod,\n activeStoredPaymentMethodId,\n setActiveStoredPaymentMethodId,\n isStoredCardInitialized,\n updateStoredCardInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n } = usePaymentMethodGroup();\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: configuration.locale,\n countryCode: \"IS\",\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n paymentMethodsResponse: paymentMethods.paymentMethods,\n onError: handleOnError,\n\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n customCardRef.current = new CustomCard(adyenCardRef.current, {\n brands: [storedPaymentMethod.brand!],\n onSubmit: handleOnSubmit,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onConfigSuccess() {\n updateStoredCardInitialization(storedPaymentMethod.id, true);\n },\n onBrand: (event) => {\n setSecurityCodePolicy(event.cvcPolicy);\n },\n onValidationError: (event) => {\n const defaultErrors: StoredCardFormError = {\n encryptedSecurityCode: { visible: false, message: undefined },\n };\n\n event\n .filter((x) => x.error)\n .forEach((x) => {\n defaultErrors[x.fieldType as StoredCardFormErrorField].visible = true;\n defaultErrors[x.fieldType as StoredCardFormErrorField].message = x.errorI18n;\n });\n\n setFormErrors(defaultErrors);\n },\n onAllValid: (event) => {\n setPayButtonDisabled(!event.allValid);\n },\n placeholders: configuration.placeholders,\n challengeWindowSize: \"05\", // looks like not working\n });\n\n if (storedCardElementRef.current) {\n customCardRef.current.mount(storedCardElementRef.current);\n }\n };\n\n useEffect(() => {\n if (\n activePaymentMethod === \"storedcard\" &&\n activeStoredPaymentMethodId === storedPaymentMethod.id &&\n !isStoredCardInitialized[activeStoredPaymentMethodId!]\n ) {\n initializeAdyenComponent();\n }\n }, [configuration, activePaymentMethod, activeStoredPaymentMethodId]);\n\n useEffect(() => {\n if (customCardRef.current && isStoredCardInitialized[activeStoredPaymentMethodId!]) {\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n setFormErrors({ encryptedSecurityCode: { visible: false, message: undefined } });\n }\n }, [configuration]);\n\n useEffect(() => {\n setAskConfirmRemoveStoredCard(false);\n }, [activePaymentMethod, activeStoredPaymentMethodId]);\n\n function handleBoxChange() {\n setActivePaymentMethod(\"storedcard\");\n setActiveStoredPaymentMethodId(storedPaymentMethod.id);\n }\n\n function handleAskToConfirmRemoveCard() {\n setAskConfirmRemoveStoredCard(true);\n }\n\n function handleCancelRemoveStoredCard() {\n setAskConfirmRemoveStoredCard(false);\n }\n\n async function handleConfirmRemoveStoredCard() {\n const data: IPostDisableTokenBody = {\n storedPaymentMethodId: storedPaymentMethod.id,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await postDisableTokenRequest(configuration.environment, data);\n\n if (!fetchResponse.ok) {\n handleError(\"error.failedToSubmitRemoveStoredPaymentCard\");\n return;\n }\n\n const disableTokenResponse = await fetchResponse.json();\n\n if (!disableTokenResponse.success) {\n handleError(\"error.failedToRemoveStoredPaymentCard\");\n return;\n }\n\n onStoredCardRemoved(storedPaymentMethod.id);\n }\n\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined) {\n handleError(\"error.unknownError\");\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n paymentMethod: {\n ...state.data.paymentMethod,\n storedPaymentMethodId: storedPaymentMethod.id,\n },\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n // const errorResponse = await fetchResponse.json();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n function handleSubmitClick() {\n if (!customCardRef.current) return;\n\n customCardRef.current!.submit();\n }\n\n return (\n <label className=\"straumur__stored-card-component\">\n <input\n type=\"radio\"\n className=\"straumur__stored-card-component__radio-selector\"\n checked={activePaymentMethod === \"storedcard\" && activeStoredPaymentMethodId === storedPaymentMethod.id}\n onChange={handleBoxChange}\n />\n <span className=\"straumur__stored-card-component__content\">\n <span className=\"straumur__stored-card-component--circle\"></span>\n <RenderBrandIcons\n brands={[\n {\n brand: storedPaymentMethod.brand!,\n brandFullName: storedPaymentMethod.name,\n },\n ]}\n />\n <span className=\"straumur__stored-card-component--text\">•••• {storedPaymentMethod.lastFour}</span>\n {activePaymentMethod === \"storedcard\" &&\n activeStoredPaymentMethodId === storedPaymentMethod.id &&\n isStoredCardInitialized[storedPaymentMethod.id] && (\n <div className=\"straumur__stored-card-component__remove-stored-card-button\">\n <button\n onClick={handleAskToConfirmRemoveCard}\n className=\"straumur__stored-card-component__remove-stored-card-button--text\"\n disabled={askConfirmRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCard\")}\n </button>\n </div>\n )}\n </span>\n <div\n className={`${\"straumur__stored-card-component__confirm-remove-stored-card\"} ${\n askConfirmRemoveStoredCard ? \"straumur__stored-card-component__confirm-remove-stored-card--expanded\" : \"\"\n }`}\n >\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--header\">\n <WarningIcon />\n <span className=\"straumur__stored-card-component__confirm-remove-stored-card--header--title\">\n {i18n.t(\"stored-cards.removeStoredCardQuestion\")}\n </span>\n </div>\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--actions\">\n <button\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\n onClick={handleConfirmRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCardQuestionYesRemove\")}\n </button>\n <button\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\n onClick={handleCancelRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCardQuestionCancel\")}\n </button>\n </div>\n </div>\n <div\n className=\"straumur__stored-card-component__expandable\"\n ref={storedCardElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n }}\n >\n {!isStoredCardInitialized[storedPaymentMethod.id] && (\n <div className=\"straumur__stored-card-component__loading-text\">\n <LoaderIcon />\n </div>\n )}\n\n <div\n className=\"straumur__stored-card-component__form\"\n style={{\n opacity: isStoredCardInitialized[storedPaymentMethod.id] ? 1 : 0,\n position: isStoredCardInitialized[storedPaymentMethod.id] ? \"relative\" : \"absolute\",\n transition: \"opacity 0.3s ease-in-out\",\n }}\n >\n <div className=\"straumur__stored-card-component__form--field-wrapper\">\n <div className=\"straumur__stored-card-component__form--wrapper\">\n <label className=\"straumur__stored-card-component__form--wrapper--label straumur__stored-card-component__form--wrapper--label--readonly\">\n {i18n.t(\"stored-cards.expiryDate\")}\n </label>\n <span className=\"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly\">\n {storedPaymentMethod.expiryMonth}/{storedPaymentMethod.expiryYear}\n </span>\n </div>\n\n <div className=\"straumur__stored-card-component__form--wrapper\">\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\n <Fragment>\n <label\n className={`${\"straumur__stored-card-component__form--wrapper--label\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__stored-card-component__form--wrapper--label--error\"\n : \"\"\n }`}\n >\n {securityCodePolicy === \"optional\"\n ? i18n.t(\"stored-cards.securityCode3DigitsOptional\")\n : i18n.t(\"stored-cards.securityCode3Digits\")}\n </label>\n <span\n className={`${\"straumur__stored-card-component__form--wrapper--input\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__stored-card-component__form--wrapper--input--error\"\n : \"\"\n }`}\n data-cse=\"encryptedSecurityCode\"\n >\n <div className=\"straumur__stored-card-component__form--wrapper--label--info\">\n <Tooltip content={i18n.t(\"stored-cards.securityCode3DigitsInfo\")}>\n <InfoIcon />\n </Tooltip>\n </div>\n </span>\n </Fragment>\n )}\n {formErrors.encryptedSecurityCode.visible && (\n <span className=\"straumur__stored-card-component__form--wrapper--error\">\n {formErrors.encryptedSecurityCode.message}\n </span>\n )}\n </div>\n </div>\n\n <button\n className=\"straumur__stored-card-component__submit-button\"\n disabled={payButtonDisabled}\n onClick={handleSubmitClick}\n >\n {paymentMethods.formattedAmount}\n </button>\n </div>\n </div>\n </label>\n );\n}\n\nexport default StoredCardComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__stored-card-component{position:relative;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg);cursor:pointer}.straumur__stored-card-component:has(.straumur__stored-card-component__radio-selector:checked){cursor:default}.straumur__stored-card-component__radio-selector{position:absolute;opacity:0}.straumur__stored-card-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content{padding-bottom:var(--straumur__space-xxlg);cursor:default}.straumur__stored-card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__stored-card-component__content:hover .straumur__stored-card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__stored-card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__stored-card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__stored-card-component--brands>svg{transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:#d03e00;text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:#72889d}.straumur__stored-card-component__confirm-remove-stored-card{background-color:#fff7db;border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:#262b31;padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:#775d00;background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__radio-selector:checked~.straumur__stored-card-component__expandable{max-height:600px;opacity:1}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__stored-card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}\\n\")","import { h } from \"preact\";\n\nconst WarningIcon = () => (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_10650_34968)\">\n <path\n 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\"\n fill=\"#DFAE00\"\n />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#DFAE00\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_10650_34968\">\n <rect width=\"24\" height=\"24\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default WarningIcon;\n","import { h, ComponentChildren } from \"preact\";\nimport { PaymentMethodGroupContext } from \"./payment-method-group-context\";\nimport \"./payment-method-group.css\";\nimport { PaymentMethod } from \"../../models/constants\";\n\ninterface PaymentMethodGroupProps {\n children: ComponentChildren;\n initialValue: PaymentMethod | null;\n}\n\nfunction PaymentMethodGroup({ children, initialValue }: PaymentMethodGroupProps): h.JSX.Element | null {\n return (\n <PaymentMethodGroupContext initialValue={initialValue}>\n <div className=\"straumur__payment-method-group\">{children}</div>\n </PaymentMethodGroupContext>\n );\n}\n\nexport default PaymentMethodGroup;\n","import styleInject from '#style-inject';styleInject(\".straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%}\\n\")","import { Fragment, h } from \"preact\";\nimport \"./result-component.css\";\nimport SuccessIcon from \"../../assets/icons/success\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport FailureIcon from \"../../assets/icons/failure\";\nimport { useI18n } from \"../../localizations/i18n-context\";\n\nfunction ResultComponent(): h.JSX.Element | null {\n const { error, success } = usePaymentMethodGroup();\n const { i18n } = useI18n();\n\n if (!error && !success) {\n return null;\n }\n\n return (\n <div className=\"straumur__result-component\">\n {error && (\n <Fragment>\n <FailureIcon />\n <p className=\"straumur__result-component__error--message\">{i18n.t(error)}</p>\n </Fragment>\n )}\n\n {success && (\n <Fragment>\n <SuccessIcon />\n <p className=\"straumur__result-component__success--message\">{i18n.t(success)}</p>\n </Fragment>\n )}\n </div>\n );\n}\n\nexport default ResultComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:16px}\\n\")","import { h } from \"preact\";\n\nconst SuccessIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\n <circle\n cx=\"60\"\n cy=\"60\"\n r=\"50\"\n fill=\"none\"\n stroke=\"#5b8206\"\n stroke-width=\"5\"\n stroke-dasharray=\"314\"\n stroke-dashoffset=\"314\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\n </circle>\n\n <g transform=\"translate(60,60)\">\n <path\n d=\"M-25 5 L-5 25 L25 -15\"\n fill=\"none\"\n stroke=\"#5b8206\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-dasharray=\"100\"\n stroke-dashoffset=\"100\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"100\" to=\"0\" dur=\"0.5s\" begin=\"1s\" fill=\"freeze\" />\n <animateTransform\n attributeName=\"transform\"\n type=\"scale\"\n from=\"1 1\"\n to=\"1.2 1.2\"\n begin=\"1.5s\"\n dur=\"0.2s\"\n fill=\"freeze\"\n additive=\"sum\"\n />\n <animateTransform\n attributeName=\"transform\"\n type=\"scale\"\n from=\"1.2 1.2\"\n to=\"1 1\"\n begin=\"1.7s\"\n dur=\"0.2s\"\n fill=\"freeze\"\n additive=\"sum\"\n />\n </path>\n </g>\n </svg>\n);\n\nexport default SuccessIcon;\n","import { h } from \"preact\";\n\nconst FailureIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\n <circle\n cx=\"60\"\n cy=\"60\"\n r=\"50\"\n fill=\"none\"\n stroke=\"#d03e00\"\n stroke-width=\"5\"\n stroke-dasharray=\"314\"\n stroke-dashoffset=\"314\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\n </circle>\n\n <g transform=\"translate(60,60)\">\n <g id=\"crossGroup\">\n <line\n x1=\"-20\"\n y1=\"-20\"\n x2=\"20\"\n y2=\"20\"\n stroke=\"#d03e00\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"57\"\n stroke-dashoffset=\"57\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1s\" fill=\"freeze\" />\n </line>\n\n <line\n x1=\"20\"\n y1=\"-20\"\n x2=\"-20\"\n y2=\"20\"\n stroke=\"#d03e00\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"57\"\n stroke-dashoffset=\"57\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1.3s\" fill=\"freeze\" />\n </line>\n </g>\n </g>\n </svg>\n);\n\nexport default FailureIcon;\n","import { Fragment, h } from \"preact\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\n\ninterface PaymentMethodsWrapperProps {\n children: h.JSX.Element[];\n}\n\nfunction PaymentMethodsWrapper({ children }: PaymentMethodsWrapperProps): h.JSX.Element | null {\n const { error, success } = usePaymentMethodGroup();\n\n if (error || success) {\n return null;\n }\n\n return <Fragment>{children}</Fragment>;\n}\n\nexport default PaymentMethodsWrapper;\n","import { h } from \"preact\";\nimport \"./instant-payments-component.css\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport GooglePayButton from \"../../components/google-pay-button/google-pay-button\";\nimport ApplePayButton from \"../../components/apple-pay-button/apple-pay-button\";\nimport { PaymentMethod } from \"../../models/constants\";\n\ninterface InstantPaymentsComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction InstantPaymentsComponent({\n configuration,\n paymentMethods,\n}: InstantPaymentsComponentProps): h.JSX.Element | null {\n if (!configuration.instantPayments) {\n return null;\n }\n\n // safeguard: filter out any invalid payment methods, only allow applepay and googlepay\n const validInstantPayments: Extract<PaymentMethod, \"googlepay\" | \"applepay\">[] = [\"googlepay\", \"applepay\"];\n const availableInstantPayments = configuration.instantPayments.filter((payment) =>\n validInstantPayments.includes(payment)\n );\n\n const availableWalletPayments = paymentMethods.paymentMethods.paymentMethods?.filter(x => x.type === \"applepay\" || x.type === \"googlepay\") || [];\n\n // another safeguard: ensure that the payment methods are actually available from the paymentMethods response\n const finalAvailableInstantPayments = availableInstantPayments.filter((payment) =>\n availableWalletPayments.some(pm => pm.type === payment)\n );\n\n if (finalAvailableInstantPayments.length === 0) {\n return null;\n }\n\n return (\n <div\n class={`instant-payments ${\n finalAvailableInstantPayments.length > 1 ? \"instant-payments--multiple\" : \"instant-payments--single\"\n }`}\n >\n {finalAvailableInstantPayments.map((paymentMethod) => {\n if (paymentMethod === \"googlepay\") {\n return (\n <GooglePayButton\n key={paymentMethod}\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={true}\n isInstantPayment={true}\n />\n );\n }\n if (paymentMethod === \"applepay\") {\n return (\n <ApplePayButton\n key={paymentMethod}\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={true}\n isInstantPayment={true}\n />\n );\n }\n\n // this should never happen due to our filtering above, but typescript safeguard\n return null;\n })}\n </div>\n );\n}\n\nexport default InstantPaymentsComponent;\n","import styleInject from '#style-inject';styleInject(\".instant-payments{display:grid;gap:var(--straumur__space-md);grid-template-columns:1fr 1fr}.instant-payments--single{grid-template-columns:1fr}\\n\")","export const translations = {\n \"en-US\": {\n \"cards.title\": \"Card payment\",\n \"cards.cardNumber\": \"Card number\",\n \"cards.expiryDate\": \"Expiry date\",\n \"cards.securityCode3Digits\": \"Security code\",\n \"cards.securityCode3DigitsOptional\": \"Security code (optional)\",\n \"cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\n \"cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\n \"cards.storePaymentMethod\": \"Store payment information\",\n \"googlePay.title\": \"Google Pay\",\n \"applePay.title\": \"Apple Pay\",\n \"stored-cards.expiryDate\": \"Expiry date\",\n \"stored-cards.securityCode3Digits\": \"Security code\",\n \"stored-cards.securityCode3DigitsOptional\": \"Security code (optional)\",\n \"stored-cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\n \"stored-cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\n \"stored-cards.removeStoredCard\": \"Remove\",\n \"stored-cards.removeStoredCardQuestion\": \"Remove stored payment method?\",\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Yes, remove\",\n \"stored-cards.removeStoredCardQuestionCancel\": \"Cancel\",\n\n \"success.paymentAuthorized\": \"Payment authorized\",\n\n \"error.unknownError\": \"Unknown error occurred\",\n \"error.failedToInitializeStraumurWebComponent\": \"Failed to initialize Straumur Web component\",\n \"error.failedToInitializePaymentMethods\": \"Failed to initialize payment methods\",\n \"error.failedToSubmitPayment\": \"Failed to submit payment\",\n \"error.paymentFailed\": \"Payment failed\",\n \"error.paymentUnsuccessful\": \"Payment unsuccessful\",\n \"error.failedToSubmitPaymentDetails\": \"Failed to submit payment details\",\n \"error.paymentDetailsFailed\": \"Payment details failed\",\n \"error.googlePayNotAvailable\": \"Google Pay not available\",\n \"error.applePayNotAvailable\": \"Apple Pay not available\",\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Failed to remove stored payment card\",\n \"error.failedToRemoveStoredPaymentCard\": \"Stored payment card was not removed\",\n },\n \"is-IS\": {\n \"cards.title\": \"Greiða með korti\",\n \"cards.cardNumber\": \"Kortanúmer\",\n \"cards.expiryDate\": \"Gildisdagur\",\n \"cards.securityCode3Digits\": \"Öryggiskóði\",\n \"cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\n \"cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\n \"cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\n \"cards.storePaymentMethod\": \"Vista greiðsluupplýsingar\",\n \"googlePay.title\": \"Google Pay\",\n \"applePay.title\": \"Apple Pay\",\n \"stored-cards.expiryDate\": \"Gildisdagur\",\n \"stored-cards.securityCode3Digits\": \"Öryggiskóði\",\n \"stored-cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\n \"stored-cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\n \"stored-cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\n \"stored-cards.removeStoredCard\": \"Fjarlægja\",\n \"stored-cards.removeStoredCardQuestion\": \"Fjarlægja geymdan greiðslumáta?\",\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Já, fjarlægja\",\n \"stored-cards.removeStoredCardQuestionCancel\": \"Hætta við\",\n\n \"success.paymentAuthorized\": \"Greiðsla samþykkt\",\n\n \"error.unknownError\": \"Óþekkt villa kom upp\",\n \"error.failedToInitializeStraumurWebComponent\": \"Mistókst að sækja Straumur Web hluta\",\n \"error.failedToInitializePaymentMethods\": \"Mistókst að sækja greiðslumáta\",\n \"error.failedToSubmitPayment\": \"Mistókst að senda greiðslu\",\n \"error.paymentFailed\": \"Greiðsla mistókst\",\n \"error.paymentUnsuccessful\": \"Greiðsla ekki tekin\",\n \"error.failedToSubmitPaymentDetails\": \"Mistókst að senda greiðsluupplýsingar\",\n \"error.paymentDetailsFailed\": \"Mistókst að sækja greiðsluupplýsingar\",\n \"error.googlePayNotAvailable\": \"Google Pay ekki í boði\",\n \"error.applePayNotAvailable\": \"Apple Pay ekki í boði\",\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Mistókst að fjarlægja geymdan greiðslumáta\",\n \"error.failedToRemoveStoredPaymentCard\": \"Geymdur greiðslumáti var ekki fjarlægður\",\n },\n};\n\nexport type Language = keyof typeof translations;\nexport type TranslationKey = keyof (typeof translations)[\"en-US\"] | keyof (typeof translations)[\"is-IS\"];\n","import { Language, TranslationKey, translations } from \"./translations\";\n\nexport class I18nService {\n constructor(\n private language: Language,\n private customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>\n ) {}\n\n t(key: TranslationKey): string {\n const localizedString = this.customLocalizations?.[this.language]?.[key];\n return localizedString || translations[this.language][key] || key;\n }\n\n setLanguage(language: Language): void {\n this.language = language;\n }\n\n updateCustomLocalizations(\n customLocalizations: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>\n ): void {\n this.customLocalizations = customLocalizations;\n }\n}\n"],"mappings":"AAAA,OAAS,KAAAA,EAAG,UAAAC,OAAc,SCCD,SAARC,EAA6BC,EAAK,CAAE,SAAAC,CAAS,EAAI,CAAC,EAAG,CAC1D,GAAI,CAACD,GAAO,OAAO,SAAa,IAAa,OAE7C,IAAME,EAAO,SAAS,MAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAC/DC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,KAAO,WAETF,IAAa,OACXC,EAAK,WACPA,EAAK,aAAaC,EAAOD,EAAK,UAAU,EAK1CA,EAAK,YAAYC,CAAK,EAGpBA,EAAM,WACRA,EAAM,WAAW,QAAUH,EAE3BG,EAAM,YAAY,SAAS,eAAeH,CAAG,CAAC,CAElD,CCvB8BI,EAAY;AAAA,CAAm4D,ECAv7D,IAAMC,GAAS,KACN,CACL,iBAAkB,mEAClB,oBAAqB,2DAErB,wBAAyB,kBACzB,iBAAkB,UAClB,iBAAkB,UAClB,uBAAwB,eAC1B,GAaWC,GAAMD,GAAO,ECnB1B,SAASE,GAAWC,EAAsC,CACxD,OAAQA,EAAa,CACnB,IAAK,OACH,OAAOC,GAAI,iBACb,IAAK,OACH,OAAOA,GAAI,oBACb,QACE,MAAM,IAAI,MAAM,wBAAwBD,CAAW,EAAE,CACzD,CACF,CAEO,SAASE,GAAkBF,EAA8BG,EAA8B,CAC5F,OAAO,MAAM,GAAGJ,GAAWC,CAAW,CAAC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B,EAE9C,KAAK,YAAY,2BAA2B,CAEhD,CAEA,aAAaE,EAAyD,CACpE,KAAK,cAAgB,CACnB,GAAG,KAAK,cACR,GAAGA,CACL,EAGIA,EAAU,QACZ,KAAK,KAAK,YAAYA,EAAU,MAAM,EAEpCA,EAAU,qBACZ,KAAK,KAAK,0BAA0BA,EAAU,mBAAmB,EAI/D,KAAK,cACP,KAAK,gBAAgB,CAEzB,CAEA,YAAYxB,EAAwB,CAClC,KAAK,aAAa,CAChB,OAAQA,CACV,CAAC,CACH,CAEA,SAAgB,CAEV,KAAK,eACPE,GAAO,KAAM,KAAK,YAAY,EAC9B,KAAK,aAAe,KAExB,CACF,EAEOuB,GAAQ7B,GAEf,SAASQ,GAAc,CAAE,SAAAsB,CAAS,EAAgC,CAChE,OAAOvB,EAAC,OAAI,UAAU,4BAA4BuB,CAAS,CAC7D","names":["h","render","styleInject","css","insertAt","head","style","styleInject","getEnv","env","getBaseUrl","environment","env","getPaymentMethods","body","createPaymentRequest","createDetailsRequest","postDisableTokenRequest","setupPaymentMethods","environment","sessionId","fetchResponse","getPaymentMethods","contentType","errorMessage","h","h","useState","styleInject","h","createContext","useState","useContext","PaymentMethodContext","defaultIsInitialized","PaymentMethodGroupContext","children","initialValue","activePaymentMethod","setActivePaymentMethod","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","threeDSecureActive","setThreeDSecureActive","isPaymentMethodInitialized","setIsPaymentMethodInitialized","isStoredCardInitialized","setIsStoredCardInitialized","success","setSuccess","error","setError","updatePaymentMethodInitialization","paymentMethod","isInitialized","prevState","updateStoredCardInitialization","storedPaymentMethod","handleError","handleSuccess","usePaymentMethodGroup","context","h","createContext","useContext","I18nContext","I18nProvider","children","i18nService","onLanguageChange","changeLanguage","newLanguage","useI18n","context","h","CardIcon","card_default","Fragment","h","h","MasterCardIcon","opacity","mastercard_default","h","VisaIcon","opacity","visa_default","h","MaestroIcon","opacity","maestro_default","h","AmexIcon","opacity","amex_default","h","JcbIcon","opacity","jcb_default","h","DinersIcon","opacity","diners_default","h","DiscoverIcon","opacity","discover_default","h","CupIcon","opacity","cup_default","h","styleInject","useRef","useState","Tooltip","children","content","isVisible","setIsVisible","triggerRef","h","useEffect","useState","useMediaQuery","query","getMatch","matches","setMatches","mediaQueryList","listener","event","RenderBrandIcons","brands","brandHidden","limit","isWidth380","useMediaQuery","widthLimit","brandToShow","brand","brandName","x","h","Fragment","index","Tooltip","RenderBrandIcon","defaultToBrandName","visa_default","mastercard_default","maestro_default","amex_default","jcb_default","diners_default","discover_default","cup_default","Fragment","h","useRef","useState","useEffect","AdyenCheckout","CustomCard","h","InfoIcon","info_default","h","LoaderIcon","loader_default","h","CheckmarkIcon","color","checkmark_default","h","BrandOption","brand","brandName","isSelected","onBrandClick","h","RenderBrandIcon","checkmark_default","RenderDualBrandComponent","dualBrandConfiguration","selectedBrand","CardForm","configuration","paymentMethods","onBrandHidden","cardElementRef","useRef","adyenCardRef","customCardRef","i18n","useI18n","payButtonDisabled","setPayButtonDisabled","useState","securityCodePolicy","setSecurityCodePolicy","storePaymentMethod","setStorePaymentMethod","isDualBrand","setIsDualBrand","dualBrandConfiguration","setDualBrandConfiguration","selectedBrand","setSelectedBrand","storePaymentMethodRef","formErrors","setFormErrors","hasCardPaymentMethod","x","activePaymentMethod","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","schemeBrands","initializeAdyenComponent","AdyenCheckout","handleOnSubmit","handleOnSubmitAdditionalData","handleOnError","handlePaymentCompleted","handlePaymentFailed","CustomCard","event","selectedBrands","defaultErrors","useEffect","dualBrandListener","e","handleStorePaymentMethodChange","_","__","state","actions","data","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","h","loader_default","Fragment","Tooltip","info_default","RenderDualBrandComponent","checkmark_default","card_form_default","CardComponent","configuration","paymentMethods","i18n","useI18n","brandHidden","setBrandHidden","useState","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","usePaymentMethodGroup","x","brands","h","card_default","RenderBrandIcons","card_form_default","card_component_default","h","styleInject","h","GooglePayIcon","googlepay_default","styleInject","Fragment","h","useEffect","useRef","AdyenCheckout","GooglePay","CANCEL","GooglePayButton","configuration","paymentMethods","showPaymentButton","isInstantPayment","googlePayElementRef","useRef","adyenCheckoutRef","googlePayRef","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","setActivePaymentMethod","activePaymentMethod","usePaymentMethodGroup","initializeAdyenComponent","AdyenCheckout","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","gpayConfig","x","googlePayConfiguration","handleOnSubmit","GooglePay","useEffect","data","__","CANCEL","state","_","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","h","Fragment","loader_default","google_pay_button_default","GooglePayComponent","configuration","paymentMethods","i18n","useI18n","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","usePaymentMethodGroup","handleBoxChange","x","h","googlepay_default","google_pay_button_default","google_pay_component_default","h","styleInject","h","ApplePayIcon","applepay_default","styleInject","Fragment","h","useEffect","useRef","AdyenCheckout","ApplePay","ApplePayButton","configuration","paymentMethods","showPaymentButton","isInstantPayment","applePayElementRef","useRef","adyenCardRef","applePayRef","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","setActivePaymentMethod","activePaymentMethod","usePaymentMethodGroup","initializeAdyenComponent","AdyenCheckout","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","apayConfig","x","applePayConfiguration","handleOnSubmit","ApplePay","useEffect","data","_","CANCEL","state","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","h","Fragment","loader_default","apple_pay_button_default","ApplePayComponent","configuration","paymentMethods","i18n","useI18n","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","usePaymentMethodGroup","handleBoxChange","x","h","applepay_default","apple_pay_button_default","apple_pay_component_default","Fragment","h","Fragment","h","useEffect","useRef","useState","styleInject","AdyenCheckout","CustomCard","h","WarningIcon","warning_default","StoredCardComponent","configuration","paymentMethods","storedPaymentMethod","onStoredCardRemoved","storedCardElementRef","useRef","adyenCardRef","customCardRef","i18n","useI18n","payButtonDisabled","setPayButtonDisabled","useState","securityCodePolicy","setSecurityCodePolicy","askConfirmRemoveStoredCard","setAskConfirmRemoveStoredCard","formErrors","setFormErrors","activePaymentMethod","setActivePaymentMethod","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","isStoredCardInitialized","updateStoredCardInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","initializeAdyenComponent","AdyenCheckout","handleOnError","handlePaymentCompleted","handlePaymentFailed","CustomCard","handleOnSubmit","handleOnSubmitAdditionalData","event","defaultErrors","x","useEffect","handleBoxChange","handleAskToConfirmRemoveCard","handleCancelRemoveStoredCard","handleConfirmRemoveStoredCard","data","fetchResponse","postDisableTokenRequest","_","__","state","actions","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","h","RenderBrandIcons","warning_default","loader_default","Fragment","Tooltip","info_default","stored_card_component_default","useState","StoredCardContainerComponent","configuration","paymentMethods","storedPaymentMethods","setStoredPaymentMethods","useState","activePaymentMethod","threeDSecureActive","usePaymentMethodGroup","handleStoredCardRemoved","storedPaymentMethodId","prevStoredPaymentMethods","storedPaymentMethod","h","Fragment","stored_card_component_default","stored_card_container_component_default","h","styleInject","PaymentMethodGroup","children","initialValue","h","PaymentMethodGroupContext","payment_method_group_default","Fragment","h","styleInject","h","SuccessIcon","success_default","h","FailureIcon","failure_default","ResultComponent","error","success","usePaymentMethodGroup","i18n","useI18n","h","Fragment","failure_default","success_default","result_component_default","Fragment","h","PaymentMethodsWrapper","children","error","success","usePaymentMethodGroup","h","Fragment","payment_methods_wrapper_default","h","styleInject","InstantPaymentsComponent","configuration","paymentMethods","validInstantPayments","availableInstantPayments","payment","availableWalletPayments","x","finalAvailableInstantPayments","pm","h","paymentMethod","google_pay_button_default","apple_pay_button_default","instant_payments_component_default","StraumurCheckoutContainer","configuration","paymentMethods","h","payment_method_group_default","payment_methods_wrapper_default","instant_payments_component_default","stored_card_container_component_default","card_component_default","google_pay_component_default","apple_pay_component_default","result_component_default","straumur_checkout_container_default","AdyenCheckout","translations","I18nService","language","customLocalizations","key","translations","StraumurCheckout","config","determineLocale","I18nService","locale","selector","render","h","RootComponent","loader_default","response","setupPaymentMethods","I18nProvider","language","straumur_checkout_container_default","message","success_default","failure_default","redirectResult","AdyenCheckout","state","_","actions","data","fetchResponse","createDetailsRequest","resultCode","action","newConfig","straumur_checkout_default","children"]}
1
+ {"version":3,"sources":["../src/straumur-checkout.tsx","#style-inject:#style-inject","../src/styles/main.css","../src/env.ts","../src/adapter/straumur-adapter.ts","../src/services/straumur-service.ts","../src/features/straumur-checkout-container.tsx","../src/features/card/card-component.tsx","../src/features/card/card-component.css","../src/components/payment-method-group/payment-method-group-context.tsx","../src/localizations/i18n-context.tsx","../src/assets/icons/card.tsx","../src/utils/renderBrandIcons.tsx","../src/assets/icons/mastercard.tsx","../src/assets/icons/visa.tsx","../src/assets/icons/maestro.tsx","../src/assets/icons/amex.tsx","../src/assets/icons/jcb.tsx","../src/assets/icons/diners.tsx","../src/assets/icons/discover.tsx","../src/assets/icons/cup.tsx","../src/components/tooltip/tooltip.tsx","../src/components/tooltip/tooltip.css","../src/utils/custom-hooks/use-media-query.ts","../src/components/card-form/card-form.tsx","../src/assets/icons/info.tsx","../src/assets/icons/loader.tsx","../src/assets/icons/checkmark.tsx","../src/components/render-dual-brand/render-dual-brand.tsx","../src/components/payment-method-item/payment-method-item.tsx","../src/components/payment-method-item/payment-method-item.css","../src/features/google-pay/google-pay-component.tsx","../src/features/google-pay/google-pay-component.css","../src/assets/icons/googlepay.tsx","../src/components/google-pay-button/google-pay-button.css","../src/components/google-pay-button/google-pay-button.tsx","../src/models/constants.ts","../src/features/apple-pay/apple-pay-component.tsx","../src/features/apple-pay/apple-pay-component.css","../src/assets/icons/applepay.tsx","../src/components/apple-pay-button/apple-pay-button.css","../src/components/apple-pay-button/apple-pay-button.tsx","../src/features/stored-card/stored-card-container-component.tsx","../src/features/stored-card/stored-card-component.tsx","../src/features/stored-card/stored-card-component.css","../src/assets/icons/warning.tsx","../src/components/payment-method-group/payment-method-group.tsx","../src/components/payment-method-group/payment-method-group.css","../src/features/result-component/result-component.tsx","../src/features/result-component/result-component.css","../src/assets/icons/success.tsx","../src/assets/icons/failure.tsx","../src/features/payment-methods-wrapper/payment-methods-wrapper.tsx","../src/features/instantPayments/instant-payments-component.tsx","../src/features/instantPayments/instant-payments-component.css","../src/localizations/translations.ts","../src/localizations/i18n-service.ts"],"sourcesContent":["import { h, render } from \"preact\";\nimport \"./styles/main.css\";\nimport { StraumurCheckoutConfiguration, StraumurWebConfiguration } from \"./models/models\";\nimport { setupPaymentMethods } from \"./services/straumur-service\";\nimport { Language, TranslationKey } from \"./localizations/translations\";\nimport StraumurCheckoutContainer from \"./features/straumur-checkout-container\";\nimport { SuccessResponse } from \"./services/models\";\nimport FailureIcon from \"./assets/icons/failure\";\nimport LoaderIcon from \"./assets/icons/loader\";\nimport {\n AdyenCheckout,\n AdditionalDetailsData,\n UIElement,\n UIElementProps,\n AdditionalDetailsActions,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody } from \"./adapter/models\";\nimport { createDetailsRequest } from \"./adapter/straumur-adapter\";\nimport SuccessIcon from \"./assets/icons/success\";\nimport { I18nProvider } from \"./localizations/i18n-context\";\nimport { I18nService } from \"./localizations/i18n-service\";\n\nclass StraumurCheckout {\n private configuration: StraumurCheckoutConfiguration;\n private paymentMethods: SuccessResponse | null = null;\n private mountElement: HTMLElement | null = null;\n private i18n: I18nService;\n\n constructor(config: StraumurWebConfiguration) {\n this.configuration = {\n ...config,\n locale: determineLocale(config.locale),\n customLocalizations: config.localizations,\n };\n\n // Create i18n instance\n this.i18n = new I18nService(this.configuration.locale, this.configuration.customLocalizations);\n\n function determineLocale(locale: \"is\" | \"en\" | undefined): Language {\n switch (locale) {\n case \"is\":\n return \"is-IS\";\n case \"en\":\n return \"en-US\";\n default:\n return \"is-IS\";\n }\n }\n }\n\n async mount(selector: HTMLElement | string): Promise<void> {\n try {\n this.mountElement = typeof selector === \"string\" ? document.querySelector(selector) : selector;\n\n if (!this.mountElement) {\n this.handleError(\"error.failedToInitializeStraumurWebComponent\");\n return;\n }\n\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <LoaderIcon />\n </div>\n </RootComponent>,\n this.mountElement\n );\n\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\n\n if (response.resultCode === \"Error\") {\n this.handleError(response.error);\n return;\n }\n\n this.paymentMethods = response;\n\n this.configuration.locale = this.configuration.locale || this.paymentMethods.locale;\n\n this.renderComponent();\n } catch (error) {}\n }\n\n private renderComponent(): void {\n if (!this.mountElement) return;\n\n render(\n <RootComponent>\n <I18nProvider\n i18nService={this.i18n}\n onLanguageChange={(language) => {\n this.configuration.locale = language;\n this.renderComponent();\n }}\n >\n <StraumurCheckoutContainer configuration={this.configuration} paymentMethods={this.paymentMethods!} />\n </I18nProvider>\n </RootComponent>,\n this.mountElement\n );\n }\n\n handleSuccess(message: TranslationKey) {\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <SuccessIcon />\n <p>{this.i18n.t(message)}</p>\n </div>\n </RootComponent>,\n this.mountElement!\n );\n }\n\n handleError(message: TranslationKey) {\n render(\n <RootComponent>\n <div className=\"straumur__component\">\n <FailureIcon />\n <p>{this.i18n.t(message)}</p>\n </div>\n </RootComponent>,\n this.mountElement!\n );\n }\n\n async submitDetails(redirectResult: string) {\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\n\n if (response.resultCode === \"Error\") {\n this.handleError(response.error);\n return;\n }\n\n const checkout = await AdyenCheckout({\n environment: this.configuration.environment,\n clientKey: response.clientKey,\n paymentMethodsResponse: response.paymentMethods,\n countryCode: \"IS\",\n onAdditionalDetails: this.handleOnSubmitAdditionalData,\n });\n\n checkout.submitDetails({\n details: {\n redirectResult,\n },\n });\n }\n\n private async handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: this.configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(this.configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n this.handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n this.handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n\n if (resultCode === \"Authorised\") {\n this.handleSuccess(\"success.paymentAuthorized\");\n } else {\n this.handleError(\"error.paymentUnsuccessful\");\n }\n }\n\n updateConfig(newConfig: Partial<StraumurCheckoutConfiguration>): void {\n this.configuration = {\n ...this.configuration,\n ...newConfig,\n };\n\n // Update i18n if locale or customLocalizations changed\n if (newConfig.locale) {\n this.i18n.setLanguage(newConfig.locale);\n }\n if (newConfig.customLocalizations) {\n this.i18n.updateCustomLocalizations(newConfig.customLocalizations);\n }\n\n // Re-render the component with new config\n if (this.mountElement) {\n this.renderComponent();\n }\n }\n\n setLanguage(locale: Language): void {\n this.updateConfig({\n locale: locale,\n });\n }\n\n destroy(): void {\n // Clean up resources\n if (this.mountElement) {\n render(null, this.mountElement);\n this.mountElement = null;\n }\n }\n}\n\nexport default StraumurCheckout;\n\nfunction RootComponent({ children }: { children: h.JSX.Element }) {\n return <div className=\"straumur__root-component\">{children}</div>;\n}\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\":root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-neon-green-zeta: #88a64e;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: 4px}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;max-width:440px;min-width:320px}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:#72889d}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}\\n\")","const getEnv = (): Env => {\n return {\n STAGING_BASE_URL: \"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout\",\n PRODUCTION_BASE_URL: \"https://greidslugatt.straumur.is/api/v1/embeddedcheckout\",\n\n GET_PAYMENT_METHODS_URL: \"payment-methods\",\n POST_PAYMENT_URL: \"payment\",\n POST_DETAILS_URL: \"details\",\n POST_DISABLE_TOKEN_URL: \"disable-token\",\n };\n};\n\ninterface Env {\n STAGING_BASE_URL: string;\n PRODUCTION_BASE_URL: string;\n\n GET_PAYMENT_METHODS_URL: string;\n POST_PAYMENT_URL: string;\n POST_DETAILS_URL: string;\n POST_DISABLE_TOKEN_URL: string;\n}\n\nexport const env = getEnv();\n","import { ICreateDetailsBody, ICreatePaymentBody, IGetPaymentMethodsBody, IPostDisableTokenBody } from \"./models\";\nimport { env } from \"../env\";\n\nfunction getBaseUrl(environment: \"test\" | \"live\"): string {\n switch (environment) {\n case \"test\":\n return env.STAGING_BASE_URL;\n case \"live\":\n return env.PRODUCTION_BASE_URL;\n default:\n throw new Error(`Unknown environment: ${environment}`);\n }\n}\n\nexport function getPaymentMethods(environment: \"test\" | \"live\", body: IGetPaymentMethodsBody) {\n return fetch(`${getBaseUrl(environment)}/${env.GET_PAYMENT_METHODS_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function createPaymentRequest(environment: \"test\" | \"live\", body: ICreatePaymentBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_PAYMENT_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function createDetailsRequest(environment: \"test\" | \"live\", body: ICreateDetailsBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_DETAILS_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n\nexport function postDisableTokenRequest(environment: \"test\" | \"live\", body: IPostDisableTokenBody) {\n return fetch(`${getBaseUrl(environment)}/${env.POST_DISABLE_TOKEN_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n });\n}\n","import { getPaymentMethods } from \"../adapter/straumur-adapter\";\nimport { TranslationKey } from \"../localizations/translations\";\nimport { StraumurCheckoutPaymentMethods, StraumurCheckoutPaymentMethodsResponse } from \"./models\";\n\nexport async function setupPaymentMethods(\n environment: \"test\" | \"live\",\n sessionId: string\n): Promise<StraumurCheckoutPaymentMethodsResponse> {\n try {\n const fetchResponse = await getPaymentMethods(environment, {\n sessionId,\n });\n\n if (!fetchResponse.ok) {\n const contentType = fetchResponse.headers.get(\"content-type\");\n let errorMessage: TranslationKey = \"error.failedToInitializePaymentMethods\";\n if (contentType && contentType.includes(\"application/json\")) {\n errorMessage = (await fetchResponse.json()).errorMessage;\n }\n\n return {\n resultCode: \"Error\",\n error: errorMessage,\n };\n }\n\n const data: StraumurCheckoutPaymentMethods = await fetchResponse.json();\n\n return {\n resultCode: \"Success\",\n ...data,\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n return {\n resultCode: \"Error\",\n error: \"error.failedToInitializePaymentMethods\",\n };\n }\n}\n","import { h } from \"preact\";\nimport { StraumurCheckoutConfiguration } from \"../models/models\";\nimport { SuccessResponse } from \"../services/models\";\nimport CardComponent from \"./card/card-component\";\nimport GooglePayComponent from \"./google-pay/google-pay-component\";\nimport ApplePayComponent from \"./apple-pay/apple-pay-component\";\nimport StoredCardContainerComponent from \"./stored-card/stored-card-container-component\";\nimport PaymentMethodGroup from \"../components/payment-method-group/payment-method-group\";\nimport ResultComponent from \"./result-component/result-component\";\nimport PaymentMethodsWrapper from \"./payment-methods-wrapper/payment-methods-wrapper\";\nimport InstantPaymentsComponent from \"./instantPayments/instant-payments-component\";\nimport { PaymentMethod } from \"../models/constants\";\n\ninterface StraumurCheckoutContainerProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction determineInitialState(\n hasCard: boolean,\n hasGooglePay: boolean,\n hasApplePay: boolean,\n storedCount: number,\n instantPayments: StraumurCheckoutConfiguration[\"instantPayments\"]\n): { initialPaymentMethod: PaymentMethod | null; isSolePaymentMethod: boolean } {\n const gpayInStandard = hasGooglePay && !instantPayments?.some((x) => x === \"googlepay\");\n const apayInStandard = hasApplePay && !instantPayments?.some((x) => x === \"applepay\");\n\n const totalOptions = storedCount + (hasCard ? 1 : 0) + (gpayInStandard ? 1 : 0) + (apayInStandard ? 1 : 0);\n\n if (totalOptions !== 1) {\n return { initialPaymentMethod: null, isSolePaymentMethod: false };\n }\n\n if (storedCount === 1) return { initialPaymentMethod: \"storedcard\", isSolePaymentMethod: true };\n if (hasCard) return { initialPaymentMethod: \"card\", isSolePaymentMethod: true };\n if (gpayInStandard) return { initialPaymentMethod: \"googlepay\", isSolePaymentMethod: true };\n if (apayInStandard) return { initialPaymentMethod: \"applepay\", isSolePaymentMethod: true };\n\n return { initialPaymentMethod: null, isSolePaymentMethod: false };\n}\n\nfunction StraumurCheckoutContainer({ configuration, paymentMethods }: StraumurCheckoutContainerProps): h.JSX.Element {\n const methods = paymentMethods.paymentMethods.paymentMethods ?? [];\n const stored = paymentMethods.paymentMethods.storedPaymentMethods ?? [];\n\n const hasCard = methods.some((x) => x.type === \"scheme\");\n const hasGooglePay = methods.some((x) => x.type === \"googlepay\");\n const hasApplePay = methods.some((x) => x.type === \"applepay\");\n const hasStoredPaymentMethods = stored.length > 0;\n\n const { initialPaymentMethod, isSolePaymentMethod } = determineInitialState(\n hasCard,\n hasGooglePay,\n hasApplePay,\n stored.length,\n configuration.instantPayments\n );\n\n return (\n <PaymentMethodGroup\n initialValue={initialPaymentMethod}\n isSolePaymentMethod={isSolePaymentMethod}\n hasCard={hasCard}\n hasGooglePay={hasGooglePay}\n hasApplePay={hasApplePay}\n hasStoredPaymentMethods={hasStoredPaymentMethods}\n >\n <PaymentMethodsWrapper>\n <InstantPaymentsComponent configuration={configuration} paymentMethods={paymentMethods} />\n <StoredCardContainerComponent configuration={configuration} paymentMethods={paymentMethods} />\n <CardComponent configuration={configuration} paymentMethods={paymentMethods} />\n <GooglePayComponent configuration={configuration} paymentMethods={paymentMethods} />\n <ApplePayComponent configuration={configuration} paymentMethods={paymentMethods} />\n </PaymentMethodsWrapper>\n\n <ResultComponent />\n </PaymentMethodGroup>\n );\n}\n\nexport default StraumurCheckoutContainer;\n","import { h } from \"preact\";\nimport { useState } from \"preact/hooks\";\nimport \"./card-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport CardIcon from \"../../assets/icons/card\";\nimport { BrandHidden, RenderBrandIcons } from \"../../utils/renderBrandIcons\";\nimport { CardComponentProps } from \"./models\";\nimport CardForm from \"../../components/card-form/card-form\";\nimport PaymentMethodItem from \"../../components/payment-method-item/payment-method-item\";\n\nfunction CardComponent({ configuration, paymentMethods }: CardComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const [brandHidden, setBrandHidden] = useState<BrandHidden[]>([]);\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive, isSolePaymentMethod, hasCard } =\n usePaymentMethodGroup();\n\n if (!hasCard || (activePaymentMethod !== \"card\" && threeDSecureActive)) {\n return null;\n }\n\n const schemeBrands = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"scheme\")!.brands!;\n\n const brands = schemeBrands.map((x) => {\n return { brand: x, brandFullName: x };\n });\n\n return (\n <PaymentMethodItem\n icon={<CardIcon />}\n title={i18n.t(\"cards.title\")}\n isActive={activePaymentMethod === \"card\"}\n isSole={isSolePaymentMethod}\n onChange={() => setActivePaymentMethod(\"card\")}\n headerRight={\n <span className=\"straumur__card-component--brands\">\n <RenderBrandIcons brands={brands} brandHidden={brandHidden} />\n </span>\n }\n >\n <CardForm configuration={configuration} paymentMethods={paymentMethods} onBrandHidden={setBrandHidden} />\n </PaymentMethodItem>\n );\n}\n\nexport default CardComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white)}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-blue-beta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.straumur__card-component__dual-branding{display:grid;grid-template-columns:1fr 1fr;gap:var(--straumur__space-5xlg)}.straumur__card-component__dual-branding--logo{display:flex;align-items:center;padding:var(--straumur__space-xs);border:1px solid var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-s)}.straumur__card-component__dual-branding--logo--item{display:flex;pointer-events:none}.straumur__card-component__dual-branding--logo--selected{border:1px solid var(--straumur__color-cosmos-blue-delta);justify-content:space-between}\\n\")","import { h } from \"preact\";\nimport { createContext, ComponentChildren } from \"preact\";\nimport { useState, useContext } from \"preact/hooks\";\nimport { PaymentMethod } from \"../../models/constants\";\nimport { TranslationKey } from \"../../localizations/translations\";\n\ntype PaymentMethodContextType = {\n activePaymentMethod: PaymentMethod | null;\n setActivePaymentMethod: (value: PaymentMethod | null) => void;\n activeStoredPaymentMethodId: string | null;\n setActiveStoredPaymentMethodId: (value: string) => void;\n isPaymentMethodInitialized: Record<PaymentMethod, boolean>;\n updatePaymentMethodInitialization: (paymentMethod: PaymentMethod, isInitialized: boolean) => void;\n isStoredCardInitialized: Record<string, boolean>;\n updateStoredCardInitialization: (storedPaymentMethod: string, isInitialized: boolean) => void;\n handleSuccess: (success: TranslationKey) => void;\n success: TranslationKey | null;\n handleError: (error: TranslationKey) => void;\n error: TranslationKey | null;\n threeDSecureActive: boolean;\n setThreeDSecureActive: (value: boolean) => void;\n isSolePaymentMethod: boolean;\n hasCard: boolean;\n hasGooglePay: boolean;\n hasApplePay: boolean;\n hasStoredPaymentMethods: boolean;\n};\n\nconst PaymentMethodContext = createContext<PaymentMethodContextType | undefined>(undefined);\n\nconst defaultIsInitialized: Record<PaymentMethod, boolean> = {\n card: false,\n storedcard: false,\n googlepay: false,\n applepay: false,\n};\n\nexport const PaymentMethodGroupContext = ({\n children,\n initialValue,\n isSolePaymentMethod,\n hasCard,\n hasGooglePay,\n hasApplePay,\n hasStoredPaymentMethods,\n}: {\n children: ComponentChildren;\n initialValue: PaymentMethod | null;\n isSolePaymentMethod: boolean;\n hasCard: boolean;\n hasGooglePay: boolean;\n hasApplePay: boolean;\n hasStoredPaymentMethods: boolean;\n}): h.JSX.Element => {\n const [activePaymentMethod, setActivePaymentMethod] = useState(initialValue);\n const [activeStoredPaymentMethodId, setActiveStoredPaymentMethodId] = useState<string | null>(null);\n const [threeDSecureActive, setThreeDSecureActive] = useState<boolean>(false);\n const [isPaymentMethodInitialized, setIsPaymentMethodInitialized] = useState(defaultIsInitialized);\n const [isStoredCardInitialized, setIsStoredCardInitialized] = useState<Record<string, boolean>>({});\n\n const [success, setSuccess] = useState<TranslationKey | null>(null);\n const [error, setError] = useState<TranslationKey | null>(null);\n\n const updatePaymentMethodInitialization = (paymentMethod: PaymentMethod, isInitialized: boolean) => {\n setIsPaymentMethodInitialized((prevState) => ({\n ...prevState,\n [paymentMethod]: isInitialized,\n }));\n };\n\n const updateStoredCardInitialization = (storedPaymentMethod: string, isInitialized: boolean) => {\n setIsStoredCardInitialized((prevState) => ({\n ...prevState,\n [storedPaymentMethod]: isInitialized,\n }));\n };\n\n const handleError = (error: TranslationKey) => {\n setError(error);\n };\n\n const handleSuccess = (success: TranslationKey) => {\n setSuccess(success);\n };\n\n return (\n <PaymentMethodContext.Provider\n value={{\n activePaymentMethod,\n setActivePaymentMethod,\n activeStoredPaymentMethodId,\n setActiveStoredPaymentMethodId,\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n isStoredCardInitialized,\n updateStoredCardInitialization,\n handleSuccess,\n success,\n handleError,\n error,\n threeDSecureActive,\n setThreeDSecureActive,\n isSolePaymentMethod,\n hasCard,\n hasGooglePay,\n hasApplePay,\n hasStoredPaymentMethods,\n }}\n >\n {children}\n </PaymentMethodContext.Provider>\n );\n};\n\nexport const usePaymentMethodGroup = (): PaymentMethodContextType => {\n const context = useContext(PaymentMethodContext);\n if (context === undefined) {\n throw new Error(\"usePaymentMethodGroup must be used within a PaymentMethodGroup\");\n }\n return context as PaymentMethodContextType;\n};\n","import { h } from \"preact\";\nimport { createContext, ComponentChildren } from \"preact\";\nimport { useContext } from \"preact/hooks\";\nimport { Language } from \"./translations\";\nimport { I18nService } from \"./i18n-service\";\n\ntype I18nContextType = {\n i18n: I18nService;\n changeLanguage: (language: Language) => void;\n};\n\nconst I18nContext = createContext<I18nContextType | undefined>(undefined);\n\nexport const I18nProvider = ({\n children,\n i18nService,\n onLanguageChange,\n}: {\n children: ComponentChildren;\n i18nService: I18nService; // Use existing instance from StraumurCheckout\n onLanguageChange?: (language: Language) => void;\n}): h.JSX.Element => {\n const changeLanguage = (newLanguage: Language) => {\n i18nService.setLanguage(newLanguage);\n onLanguageChange?.(newLanguage);\n };\n\n return <I18nContext.Provider value={{ i18n: i18nService, changeLanguage }}>{children}</I18nContext.Provider>;\n};\n\nexport const useI18n = (): I18nContextType => {\n const context = useContext(I18nContext);\n if (!context) {\n throw new Error(\"useI18n must be used within an I18nProvider\");\n }\n return context;\n};\n","import { h } from \"preact\";\n\nconst CardIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path d=\"M24 11H0V7H24V11Z\" fill=\"#002649\" />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#002649\"\n />\n </svg>\n);\n\nexport default CardIcon;\n","import { Fragment, h } from \"preact\";\nimport MasterCardIcon from \"../assets/icons/mastercard\";\nimport VisaIcon from \"../assets/icons/visa\";\nimport MaestroIcon from \"../assets/icons/maestro\";\nimport AmexIcon from \"../assets/icons/amex\";\nimport JcbIcon from \"../assets/icons/jcb\";\nimport DinersIcon from \"../assets/icons/diners\";\nimport DiscoverIcon from \"../assets/icons/discover\";\nimport CupIcon from \"../assets/icons/cup\";\nimport { Tooltip } from \"../components/tooltip/tooltip\";\nimport { useMediaQuery } from \"./custom-hooks/use-media-query\";\n\ninterface BrandIcon {\n brand: string;\n brandFullName: string;\n}\n\nexport interface BrandHidden {\n brand: string;\n}\n\ninterface RenderBrandIconsProps {\n brands: BrandIcon[];\n brandHidden?: BrandHidden[];\n limit?: number;\n}\n\nexport function RenderBrandIcons({ brands, brandHidden = [], limit = 3 }: RenderBrandIconsProps): h.JSX.Element {\n const isWidth380 = useMediaQuery(\"(max-width: 380px)\");\n const isWidth335 = useMediaQuery(\"(max-width: 335px)\");\n const widthLimit = isWidth335 ? 1 : isWidth380 ? 2 : limit;\n\n const brandToShow = brands.filter((brand) => {\n const { brand: brandName } = brand;\n const hidden = brandHidden.some((x) => x.brand === brandName);\n\n return !hidden;\n });\n\n return (\n <Fragment>\n {brandToShow.map(({ brand }, index) => {\n if (index >= Math.min(limit, widthLimit)) {\n if (index === Math.min(limit, widthLimit)) {\n return (\n <Tooltip\n content={\n <span style={{ display: \"flex\", gap: \"4px\", overflow: \"visible\" }}>\n {brandToShow.slice(Math.min(limit, widthLimit)).map(({ brand }) => (\n <RenderBrandIcon key={brand} brand={brand} />\n ))}\n </span>\n }\n >\n <span key={brand} className=\"straumur__render-brand-icons__overflow\">\n +{brandToShow.length - Math.min(limit, widthLimit)}\n </span>\n </Tooltip>\n );\n }\n return null;\n }\n\n return <RenderBrandIcon key={brand} brand={brand} />;\n })}\n </Fragment>\n );\n}\n\nexport const RenderBrandIcon = ({\n brand,\n defaultToBrandName = true,\n}: {\n brand: string;\n defaultToBrandName?: boolean;\n}): h.JSX.Element => {\n switch (brand) {\n case \"visa\":\n return <VisaIcon />;\n case \"mc\":\n return <MasterCardIcon />;\n case \"maestro\":\n return <MaestroIcon />;\n case \"amex\":\n return <AmexIcon />;\n case \"jcb\":\n return <JcbIcon />;\n case \"diners\":\n return <DinersIcon />;\n case \"discover\":\n return <DiscoverIcon />;\n case \"cup\":\n return <CupIcon />;\n default:\n if (defaultToBrandName) {\n return <span>{brand}</span>;\n }\n return <Fragment></Fragment>;\n }\n};\n","import { h } from \"preact\";\n\ninterface MasterCardIconProps {\n opacity?: number;\n}\n\nconst MasterCardIcon = ({ opacity = 1 }: MasterCardIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path fill=\"#F06022\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\n <path\n fill=\"#EA1D25\"\n 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\"\n />\n <path\n fill=\"#F79D1D\"\n 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\"\n />\n </svg>\n);\n\nexport default MasterCardIcon;\n","import { h } from \"preact\";\n\ninterface VisaIconProps {\n opacity?: number;\n}\n\nconst VisaIcon = ({ opacity = 1 }: VisaIconProps) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"26\" fill=\"none\" viewBox=\"0 0 40 26\" opacity={opacity}>\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path\n fill=\"#1434CB\"\n 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\"\n />\n </svg>\n);\n\nexport default VisaIcon;\n","import { h } from \"preact\";\n\ninterface MaestroIconProps {\n opacity?: number;\n}\n\nconst MaestroIcon = ({ opacity = 1 }: MaestroIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <path fill=\"#7773B4\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\n <path\n fill=\"#EA1D25\"\n 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\"\n />\n <path\n fill=\"#139FDA\"\n 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\"\n />\n </svg>\n);\n\nexport default MaestroIcon;\n","import { h } from \"preact\";\n\ninterface AmexIconProps {\n opacity?: number;\n}\n\nconst AmexIcon = ({ opacity = 1 }: AmexIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <path fill=\"#016FD0\" d=\"M0 26h40V0H0v26z\" />\n <path\n fill=\"#fff\"\n fill-rule=\"evenodd\"\n 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\"\n />\n </svg>\n);\n\nexport default AmexIcon;\n","import { h } from \"preact\";\n\ninterface JcbIconProps {\n opacity?: number;\n}\n\nconst JcbIcon = ({ opacity = 1 }: JcbIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <g clip-path=\"url(#a)\">\n <path fill=\"#fff\" d=\"M0 0h40v26H0V0Z\" />\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"url(#b)\"\n 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\"\n />\n <path\n fill=\"url(#c)\"\n 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\"\n />\n <path\n fill=\"url(#d)\"\n 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\"\n />\n <path\n fill=\"url(#e)\"\n 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\"\n />\n <path\n fill=\"url(#f)\"\n 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\"\n />\n </g>\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"14.38\"\n y2=\"14.38\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"c\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"d\"\n x1=\"25.52\"\n x2=\"34.75\"\n y1=\"11.37\"\n y2=\"11.37\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#007940\" />\n <stop offset=\".23\" stop-color=\"#00873F\" />\n <stop offset=\".74\" stop-color=\"#40A737\" />\n <stop offset=\"1\" stop-color=\"#5CB531\" />\n </linearGradient>\n <linearGradient\n id=\"e\"\n x1=\"4.86\"\n x2=\"14.24\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#1F286F\" />\n <stop offset=\".48\" stop-color=\"#004E94\" />\n <stop offset=\".83\" stop-color=\"#0066B1\" />\n <stop offset=\"1\" stop-color=\"#006FBC\" />\n </linearGradient>\n <linearGradient\n id=\"f\"\n x1=\"15.15\"\n x2=\"24.25\"\n y1=\"12.94\"\n y2=\"12.94\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#6C2C2F\" />\n <stop offset=\".17\" stop-color=\"#882730\" />\n <stop offset=\".57\" stop-color=\"#BE1833\" />\n <stop offset=\".86\" stop-color=\"#DC0436\" />\n <stop offset=\"1\" stop-color=\"#E60039\" />\n </linearGradient>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default JcbIcon;\n","import { h } from \"preact\";\n\ninterface DinersIconProps {\n opacity?: number;\n}\n\nconst DinersIcon = ({ opacity = 1 }: DinersIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <g fill=\"#1a1918\">\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n <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\" />\n </g>\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"#154a78\"\n 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\"\n />\n </svg>\n);\n\nexport default DinersIcon;\n","import { h } from \"preact\";\n\ninterface DiscoverIconProps {\n opacity?: number;\n}\n\nconst DiscoverIcon = ({ opacity = 1 }: DiscoverIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n opacity={opacity}\n >\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\n <g clip-path=\"url(#a)\">\n <g clip-path=\"url(#b)\">\n <path\n fill=\"#000\"\n 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\"\n />\n </g>\n <path\n fill=\"#000\"\n 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\"\n />\n <path\n fill=\"url(#c)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <path\n fill=\"url(#d)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <mask\n id=\"e\"\n width=\"6\"\n height=\"6\"\n x=\"18\"\n y=\"10\"\n maskUnits=\"userSpaceOnUse\"\n style=\"mask-type:luminance\"\n >\n <path\n fill=\"#fff\"\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\n />\n </mask>\n <g mask=\"url(#e)\">\n <path\n fill=\"url(#f)\"\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\n />\n </g>\n </g>\n <g clip-path=\"url(#g)\">\n <g clip-path=\"url(#h)\">\n <path\n fill=\"#000\"\n 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\"\n />\n </g>\n <path\n fill=\"#000\"\n 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\"\n />\n <path\n fill=\"url(#i)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <path\n fill=\"url(#j)\"\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\n />\n <mask\n id=\"k\"\n width=\"6\"\n height=\"6\"\n x=\"18\"\n y=\"10\"\n maskUnits=\"userSpaceOnUse\"\n style=\"mask-type:luminance\"\n >\n <path\n fill=\"#fff\"\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\n />\n </mask>\n <g mask=\"url(#k)\">\n <path\n fill=\"url(#l)\"\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\n />\n </g>\n </g>\n <defs>\n <linearGradient\n id=\"c\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F59F00\" />\n <stop offset=\".19\" stop-color=\"#F49B00\" />\n <stop offset=\".37\" stop-color=\"#F29101\" />\n <stop offset=\".5\" stop-color=\"#F08302\" />\n <stop offset=\".6\" stop-color=\"#EE7905\" />\n <stop offset=\".76\" stop-color=\"#EC7008\" />\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\n </linearGradient>\n <linearGradient\n id=\"d\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\n </linearGradient>\n <radialGradient\n id=\"f\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\n </radialGradient>\n <linearGradient\n id=\"i\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F59F00\" />\n <stop offset=\".19\" stop-color=\"#F49B00\" />\n <stop offset=\".37\" stop-color=\"#F29101\" />\n <stop offset=\".5\" stop-color=\"#F08302\" />\n <stop offset=\".6\" stop-color=\"#EE7905\" />\n <stop offset=\".76\" stop-color=\"#EC7008\" />\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\n </linearGradient>\n <linearGradient\n id=\"j\"\n x1=\"22.25\"\n x2=\"19.35\"\n y1=\"15.06\"\n y2=\"10.42\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\n </linearGradient>\n <radialGradient\n id=\"l\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\n </radialGradient>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"b\">\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"g\">\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n <clipPath id=\"h\">\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default DiscoverIcon;\n","import { h } from \"preact\";\n\ninterface CupIconProps {\n opacity?: number;\n}\n\nconst CupIcon = ({ opacity = 1 }: CupIconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 40 26\"\n width=\"40\"\n height=\"26\"\n opacity={opacity}\n >\n <rect width=\"45.3\" height=\"27\" x=\"-3.3\" y=\"-.79\" fill=\"#fff\" rx=\"2.82\" />\n <path\n fill=\"#01798a\"\n 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\"\n />\n <rect\n width=\"20.38\"\n height=\"29.02\"\n x=\"-4\"\n y=\"-.79\"\n fill=\"#dc1f2b\"\n rx=\"2.82\"\n />\n <path\n fill=\"#1a4580\"\n 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\"\n />\n <path\n fill=\"#fff\"\n 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\"\n />\n </svg>\n);\n\nexport default CupIcon;\n","import { h, FunctionalComponent, ComponentChildren } from \"preact\";\nimport \"./tooltip.css\";\nimport { useRef, useState } from \"preact/hooks\";\n\ninterface TooltipProps {\n children: ComponentChildren;\n content: ComponentChildren;\n}\n\nexport const Tooltip: FunctionalComponent<TooltipProps> = ({ children, content }): h.JSX.Element | null => {\n const [isVisible, setIsVisible] = useState(false);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n const handleMouseEnter = () => {\n setIsVisible(true);\n };\n\n const handleMouseLeave = () => {\n setIsVisible(false);\n };\n\n return (\n <div style={{ position: \"relative\" }}>\n <div ref={triggerRef} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n {children}\n </div>\n {isVisible && triggerRef && <div className=\"straumur__tooltip__content\">{content}</div>}\n </div>\n );\n};\n","import styleInject from '#style-inject';styleInject(\".straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}\\n\")","import { useEffect, useState } from \"preact/hooks\";\n\n/**\n * Hook to listen for a CSS media query.\n * @param query - The media query string (e.g., '(min-width: 768px)')\n * @returns true if the query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatch = () => window.matchMedia(query).matches;\n\n const [matches, setMatches] = useState(getMatch);\n\n useEffect(() => {\n const mediaQueryList = window.matchMedia(query);\n const listener = (event: MediaQueryListEvent) => setMatches(event.matches);\n\n // Initial match check\n setMatches(mediaQueryList.matches);\n\n // Listen for changes\n mediaQueryList.addEventListener(\"change\", listener);\n\n return () => {\n mediaQueryList.removeEventListener(\"change\", listener);\n };\n }, [query]);\n\n return matches;\n}\n","import { Fragment, h } from \"preact\";\nimport { useRef, useState, useEffect, StateUpdater, Dispatch } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n CustomCard,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport { Tooltip } from \"../tooltip/tooltip\";\nimport InfoIcon from \"../../assets/icons/info\";\nimport { BrandHidden } from \"../../utils/renderBrandIcons\";\nimport LoaderIcon from \"../../assets/icons/loader\";\nimport CheckmarkIcon from \"../../assets/icons/checkmark\";\nimport { RenderDualBrandComponent, DualBrandConfiguration } from \"../render-dual-brand/render-dual-brand\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\n\nexport interface CardFormProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n onBrandHidden: Dispatch<StateUpdater<BrandHidden[]>>;\n}\n\ntype CardFormError = {\n encryptedCardNumber: {\n visible: boolean;\n message?: string;\n };\n encryptedExpiryDate: {\n visible: boolean;\n message?: string;\n };\n encryptedSecurityCode: {\n visible: boolean;\n message?: string;\n };\n};\n\ntype CardFormErrorField = keyof CardFormError;\n\nfunction CardForm({ configuration, paymentMethods, onBrandHidden }: CardFormProps): h.JSX.Element | null {\n const cardElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const customCardRef = useRef<CustomCard>();\n const { i18n } = useI18n();\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\n const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n const [isDualBrand, setIsDualBrand] = useState(false);\n const [dualBrandConfiguration, setDualBrandConfiguration] = useState<DualBrandConfiguration | null>(null);\n const [selectedBrand, setSelectedBrand] = useState<string | null>(null);\n const storePaymentMethodRef = useRef(false);\n const [formErrors, setFormErrors] = useState<CardFormError>({\n encryptedCardNumber: { visible: false },\n encryptedExpiryDate: { visible: false },\n encryptedSecurityCode: { visible: false },\n });\n\n const {\n activePaymentMethod,\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n hasCard,\n } = usePaymentMethodGroup();\n\n if (!hasCard || (activePaymentMethod !== \"card\" && threeDSecureActive)) {\n // if threeDSecureActive for some other payment method, do not show card form\n return null;\n }\n\n const schemeBrands = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"scheme\")!.brands!;\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: configuration.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onSubmit: handleOnSubmit,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onError: handleOnError,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n customCardRef.current = new CustomCard(adyenCardRef.current, {\n brands: schemeBrands,\n placeholders: configuration.placeholders,\n challengeWindowSize: \"05\",\n onBinLookup: (event) => {\n if (event.supportedBrandsRaw && event.supportedBrandsRaw.length > 1) {\n setIsDualBrand(true);\n\n setDualBrandConfiguration({\n brand1: event.supportedBrandsRaw[0].brand,\n brand1Name: event.supportedBrandsRaw[0].localeBrand,\n brand1ImageUrl: event.supportedBrandsRaw[0].brandImageUrl,\n brand2: event.supportedBrandsRaw[1].brand,\n brand2Name: event.supportedBrandsRaw[1].localeBrand,\n brand2ImageUrl: event.supportedBrandsRaw[1].brandImageUrl,\n });\n }\n },\n onBrand: (event) => {\n setSecurityCodePolicy(event.cvcPolicy);\n if (event.brand === \"card\") {\n onBrandHidden([]);\n setSelectedBrand(null);\n return;\n }\n\n const selectedBrands = schemeBrands\n .filter((x) => x !== event.brand)\n .map((x) => {\n return {\n brand: x,\n };\n });\n\n onBrandHidden(selectedBrands);\n\n if (\n schemeBrands\n .filter((x) => x === event.brand)\n .map((x) => {\n return {\n brand: x,\n };\n }).length === 1\n ) {\n setSelectedBrand(event.brand);\n }\n },\n onConfigSuccess() {\n updatePaymentMethodInitialization(\"card\", true);\n },\n onValidationError: (event) => {\n const defaultErrors: CardFormError = {\n encryptedCardNumber: { visible: false, message: undefined },\n encryptedExpiryDate: { visible: false, message: undefined },\n encryptedSecurityCode: { visible: false, message: undefined },\n };\n\n event\n .filter((x) => x.error)\n .forEach((x) => {\n defaultErrors[x.fieldType as CardFormErrorField].visible = true;\n defaultErrors[x.fieldType as CardFormErrorField].message = x.errorI18n;\n });\n\n setFormErrors(defaultErrors);\n },\n onAllValid: (event) => {\n setPayButtonDisabled(!event.allValid);\n },\n });\n\n if (cardElementRef.current) {\n customCardRef.current.mount(cardElementRef.current);\n }\n };\n\n useEffect(() => {\n if (activePaymentMethod === \"card\" && !isPaymentMethodInitialized.card) {\n initializeAdyenComponent();\n }\n }, [configuration, activePaymentMethod]);\n\n useEffect(() => {\n if (customCardRef.current && isPaymentMethodInitialized.card) {\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n setFormErrors({\n encryptedCardNumber: { visible: false, message: undefined },\n encryptedExpiryDate: { visible: false, message: undefined },\n encryptedSecurityCode: { visible: false, message: undefined },\n });\n }\n }, [configuration]);\n\n if (paymentMethods.paymentMethods?.paymentMethods?.length === 0) {\n return null;\n }\n\n function dualBrandListener(e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) {\n customCardRef.current!.dualBrandingChangeHandler(e);\n }\n\n function handleStorePaymentMethodChange(event: h.JSX.TargetedEvent<HTMLInputElement, Event>) {\n setStorePaymentMethod(event.currentTarget.checked);\n }\n\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\n handleError(\"error.unknownError\");\n }\n\n useEffect(() => {\n storePaymentMethodRef.current = storePaymentMethod;\n }, [storePaymentMethod]);\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n const data: ICreatePaymentBody = {\n ...state.data,\n storePaymentMethod: storePaymentMethodRef.current,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n function handleSubmitClick() {\n if (!customCardRef.current) return;\n\n customCardRef.current!.submit();\n }\n\n return (\n <div\n className=\"straumur__card-component__expandable\"\n ref={cardElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n }}\n >\n {!isPaymentMethodInitialized.card && (\n <div className=\"straumur__card-component__loading-text\">\n <LoaderIcon />\n </div>\n )}\n\n <div\n className=\"straumur__card-component__form\"\n style={{\n opacity: isPaymentMethodInitialized.card && !threeDSecureActive ? 1 : 0,\n position: isPaymentMethodInitialized.card && !threeDSecureActive ? \"relative\" : \"absolute\",\n transition: \"opacity 0.3s ease-in-out\",\n }}\n >\n <div className=\"straumur__card-component__form--wrapper\">\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\n }`}\n >\n {i18n.t(\"cards.cardNumber\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\n }`}\n data-cse=\"encryptedCardNumber\"\n />\n {formErrors.encryptedCardNumber.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedCardNumber.message}\n </span>\n )}\n </div>\n <div className=\"straumur__card-component__form--field-wrapper\">\n <div className=\"straumur__card-component__form--wrapper\">\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\n }`}\n >\n {i18n.t(\"cards.expiryDate\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\n }`}\n data-cse=\"encryptedExpiryDate\"\n />\n {formErrors.encryptedExpiryDate.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedExpiryDate.message}\n </span>\n )}\n </div>\n\n <div className=\"straumur__card-component__form--wrapper\">\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\n <Fragment>\n <label\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__card-component__form--wrapper--label--error\"\n : \"\"\n }`}\n >\n {securityCodePolicy === \"optional\"\n ? i18n.t(\"cards.securityCode3DigitsOptional\")\n : i18n.t(\"cards.securityCode3Digits\")}\n </label>\n <span\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__card-component__form--wrapper--input--error\"\n : \"\"\n }`}\n data-cse=\"encryptedSecurityCode\"\n />\n {formErrors.encryptedSecurityCode.visible && (\n <span className=\"straumur__card-component__form--wrapper--error\">\n {formErrors.encryptedSecurityCode.message}\n </span>\n )}\n <div className=\"straumur__card-component__form--wrapper--label--info\">\n <Tooltip content={<span>{i18n.t(\"cards.securityCode3DigitsInfo\")}</span>}>\n <InfoIcon />\n </Tooltip>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n\n {isDualBrand && dualBrandConfiguration && (\n <RenderDualBrandComponent\n dualBrandConfiguration={dualBrandConfiguration}\n selectedBrand={selectedBrand}\n onBrandClick={dualBrandListener}\n />\n )}\n\n {paymentMethods.enableStoreDetails === \"AskForConsent\" && (\n <label className=\"straumur__card-component__form--wrapper--label-checkbox\">\n <div\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark\"} ${\n storePaymentMethod ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked\" : \"\"\n }`}\n >\n <div\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon\"} ${\n storePaymentMethod\n ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked\"\n : \"\"\n }`}\n >\n <CheckmarkIcon />\n </div>\n </div>\n <input\n type=\"checkbox\"\n className=\"straumur__card-component__form--wrapper--label-checkbox--checkbox\"\n checked={storePaymentMethod}\n onChange={handleStorePaymentMethodChange}\n />\n {i18n.t(\"cards.storePaymentMethod\")}\n </label>\n )}\n\n <button\n className=\"straumur__card-component__submit-button\"\n disabled={payButtonDisabled}\n onClick={handleSubmitClick}\n >\n {paymentMethods.formattedAmount}\n </button>\n </div>\n </div>\n );\n}\n\nexport default CardForm;\n","import { h } from \"preact\";\n\nconst InfoIcon = () => (\n <svg width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_10626_39119)\">\n <path\n 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\"\n fill=\"#002649\"\n />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#002649\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_10626_39119\">\n <rect width=\"20\" height=\"20\" fill=\"white\" transform=\"translate(0.664062)\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default InfoIcon;\n","import { h } from \"preact\";\n\nconst LoaderIcon = () => (\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"#002649\">\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(2 2)\" stroke-width=\"4\">\n <circle stroke-opacity=\".3\" cx=\"18\" cy=\"18\" r=\"18\" />\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 18 18\"\n to=\"360 18 18\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </g>\n </g>\n </svg>\n);\n\nexport default LoaderIcon;\n","import { h } from \"preact\";\n\nconst CheckmarkIcon = ({ color = \"var(--straumur__color-primary)\" }: { color?: string }) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"13\" viewBox=\"0 0 16 13\" fill=\"none\">\n <path d=\"M2 7L6 11L14 2\" stroke={color} stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n);\n\nexport default CheckmarkIcon;\n","import { h } from \"preact\";\nimport { RenderBrandIcon } from \"../../utils/renderBrandIcons\";\nimport CheckmarkIcon from \"../../assets/icons/checkmark\";\n\ntype DualBrandConfiguration = {\n brand1: string;\n brand1Name?: string;\n brand1ImageUrl?: string;\n brand2: string;\n brand2Name?: string;\n brand2ImageUrl?: string;\n};\n\ninterface RenderDualBrandComponentProps {\n dualBrandConfiguration: DualBrandConfiguration;\n selectedBrand: string | null;\n onBrandClick: (e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) => void;\n}\n\ninterface BrandOptionProps {\n brand: string;\n brandName?: string;\n isSelected: boolean;\n onBrandClick: (e: h.JSX.TargetedMouseEvent<HTMLSpanElement>) => void;\n}\n\nfunction BrandOption({ brand, brandName, isSelected, onBrandClick }: BrandOptionProps): h.JSX.Element {\n return (\n <span\n className={\n `straumur__card-component__dual-branding--logo` +\n (isSelected ? \" straumur__card-component__dual-branding--logo--selected\" : \"\")\n }\n title={brand}\n data-value={brand}\n onClick={onBrandClick}\n >\n <div className=\"straumur__card-component__dual-branding--logo--item\">\n <RenderBrandIcon brand={brand} defaultToBrandName={false} />\n &nbsp;{brandName ?? \"\"}\n </div>\n {isSelected && <CheckmarkIcon color=\"var(--straumur__color-neon-green-zeta)\" />}\n </span>\n );\n}\n\nexport function RenderDualBrandComponent({\n dualBrandConfiguration,\n selectedBrand,\n onBrandClick,\n}: RenderDualBrandComponentProps): h.JSX.Element {\n return (\n <div className=\"straumur__card-component__dual-branding\">\n <BrandOption\n brand={dualBrandConfiguration.brand1}\n brandName={dualBrandConfiguration.brand1Name}\n isSelected={selectedBrand === dualBrandConfiguration.brand1}\n onBrandClick={onBrandClick}\n />\n <BrandOption\n brand={dualBrandConfiguration.brand2}\n brandName={dualBrandConfiguration.brand2Name}\n isSelected={selectedBrand === dualBrandConfiguration.brand2}\n onBrandClick={onBrandClick}\n />\n </div>\n );\n}\n\nexport type { DualBrandConfiguration };\n","import { h, ComponentChildren } from \"preact\";\nimport \"./payment-method-item.css\";\n\ninterface PaymentMethodItemProps {\n icon: h.JSX.Element;\n title: string;\n isActive: boolean;\n isSole: boolean;\n onChange: () => void;\n children: ComponentChildren;\n headerRight?: h.JSX.Element | null;\n confirmSection?: h.JSX.Element;\n}\n\nfunction PaymentMethodItem({\n icon,\n title,\n isActive,\n isSole,\n onChange,\n children,\n headerRight,\n confirmSection,\n}: PaymentMethodItemProps): h.JSX.Element {\n return (\n <label className={`straumur__payment-method-item${isSole ? \" straumur__payment-method-item--sole\" : \"\"}`}>\n {!isSole && (\n <input\n type=\"radio\"\n className=\"straumur__payment-method-item__radio-selector\"\n checked={isActive}\n onChange={onChange}\n />\n )}\n <span\n className={`straumur__payment-method-item__content${isSole ? \" straumur__payment-method-item__content--expanded\" : \"\"}`}\n >\n {!isSole && <span className=\"straumur__payment-method-item--circle\" />}\n {icon}\n <span className=\"straumur__payment-method-item--title\">{title}</span>\n {headerRight}\n </span>\n {confirmSection}\n <div\n className={`straumur__payment-method-item__expandable${isSole ? \" straumur__payment-method-item__expandable--visible\" : \"\"}`}\n >\n {children}\n </div>\n </label>\n );\n}\n\nexport default PaymentMethodItem;\n","import styleInject from '#style-inject';styleInject(\".straumur__payment-method-item{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__payment-method-item--sole{cursor:default}.straumur__payment-method-item:has(.straumur__payment-method-item__radio-selector:checked){cursor:default}.straumur__payment-method-item__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__payment-method-item__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item__content--expanded{padding-bottom:var(--straumur__space-xxlg)}.straumur__payment-method-item--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease;flex-shrink:0}.straumur__payment-method-item__content:hover .straumur__payment-method-item--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__payment-method-item--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__payment-method-item__radio-selector:checked+.straumur__payment-method-item__content .straumur__payment-method-item--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__payment-method-item--title{color:#213547;font-size:1rem;user-select:none}.straumur__payment-method-item__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__payment-method-item__radio-selector:checked~.straumur__payment-method-item__expandable{max-height:600px;opacity:1}.straumur__payment-method-item__expandable--visible{max-height:600px;opacity:1}\\n\")","import { h } from \"preact\";\nimport { useState } from \"preact/hooks\";\nimport \"./google-pay-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport GooglePayIcon from \"../../assets/icons/googlepay\";\nimport GooglePayButton from \"../../components/google-pay-button/google-pay-button\";\nimport PaymentMethodItem from \"../../components/payment-method-item/payment-method-item\";\n\ninterface GooglePayComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction GooglePayComponent({ configuration, paymentMethods }: GooglePayComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive, isSolePaymentMethod, hasGooglePay } =\n usePaymentMethodGroup();\n const [isUnavailable, setIsUnavailable] = useState(false);\n\n if (!hasGooglePay || isUnavailable) {\n return null;\n }\n\n if (configuration.instantPayments && configuration.instantPayments.some((x) => x === \"googlepay\")) {\n return null;\n }\n\n if (activePaymentMethod !== \"googlepay\" && threeDSecureActive) {\n return null;\n }\n\n return (\n <PaymentMethodItem\n icon={<GooglePayIcon />}\n title={i18n.t(\"googlePay.title\")}\n isActive={activePaymentMethod === \"googlepay\"}\n isSole={isSolePaymentMethod}\n onChange={() => setActivePaymentMethod(\"googlepay\")}\n >\n <GooglePayButton\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={activePaymentMethod === \"googlepay\"}\n isInstantPayment={false}\n onUnavailable={() => setIsUnavailable(true)}\n />\n </PaymentMethodItem>\n );\n}\n\nexport default GooglePayComponent;\n","import styleInject from '#style-inject';styleInject(\".adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}\\n\")","import { h } from \"preact\";\n\nconst GooglePayIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"26\"\n fill=\"none\"\n viewBox=\"0 0 40 26\"\n >\n <path\n fill=\"#fff\"\n 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\"\n />\n <path\n fill=\"#3C4043\"\n 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\"\n />\n <path\n fill=\"#3C4043\"\n 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\"\n />\n <path\n fill=\"#4285F4\"\n 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\"\n />\n <path\n fill=\"#34A853\"\n 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\"\n />\n <path\n fill=\"#FABB05\"\n 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\"\n />\n <path\n fill=\"#E94235\"\n 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\"\n />\n </svg>\n);\n\nexport default GooglePayIcon;\n","import styleInject from '#style-inject';styleInject(\".straumur__google-pay-button__loading{display:flex;justify-content:center}\\n\")","import \"./google-pay-button.css\";\nimport { Fragment, h } from \"preact\";\nimport { useEffect, useRef } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n GooglePay,\n GooglePayConfiguration,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { CANCEL } from \"../../models/constants\";\nimport LoaderIcon from \"../../assets/icons/loader\";\n\ninterface GooglePayButtonProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n showPaymentButton: boolean;\n isInstantPayment: boolean;\n onUnavailable?: () => void;\n}\n\nfunction GooglePayButton({\n configuration,\n paymentMethods,\n showPaymentButton,\n isInstantPayment,\n onUnavailable,\n}: GooglePayButtonProps): h.JSX.Element | null {\n const googlePayElementRef = useRef<HTMLDivElement>(null);\n const adyenCheckoutRef = useRef<ICore>();\n const googlePayRef = useRef<GooglePay>();\n const {\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n setActivePaymentMethod,\n activePaymentMethod\n } = usePaymentMethodGroup();\n\n const initializeAdyenComponent = async () => {\n adyenCheckoutRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: paymentMethods.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onError: handleOnError,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n const gpayPaymentMethods = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"googlepay\")!;\n const gpayConfig = gpayPaymentMethods.configuration! as { gatewayMerchantId: string; merchantId: string };\n\n const googlePayConfiguration: GooglePayConfiguration = {\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n challengeWindowSize: \"05\",\n countryCode: \"IS\",\n environment: configuration.environment,\n onSubmit: handleOnSubmit,\n buttonSizeMode: \"fill\",\n configuration: {\n ...gpayConfig,\n merchantName: paymentMethods.merchantName,\n },\n };\n\n googlePayRef.current = new GooglePay(adyenCheckoutRef.current, googlePayConfiguration);\n\n googlePayRef.current\n .isAvailable()\n .then(() => {\n googlePayRef.current!.mount(googlePayElementRef.current!);\n updatePaymentMethodInitialization(\"googlepay\", true);\n })\n .catch(() => {\n updatePaymentMethodInitialization(\"googlepay\", true);\n if (activePaymentMethod === \"googlepay\") {\n setActivePaymentMethod(null);\n }\n onUnavailable?.();\n });\n };\n\n useEffect(() => {\n if (showPaymentButton && !isPaymentMethodInitialized.googlepay) {\n initializeAdyenComponent();\n }\n }, [configuration, showPaymentButton]);\n\n useEffect(() => {\n if (googlePayRef.current && isPaymentMethodInitialized.googlepay) {\n googlePayRef.current!.remove();\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n }\n }, [configuration]);\n\n function handleOnError(data: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\n if (data.name !== CANCEL) {\n handleError(\"error.unknownError\");\n }\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n if(isInstantPayment){\n setActivePaymentMethod(\"googlepay\")\n }\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n if (activePaymentMethod !== \"googlepay\" && threeDSecureActive) {\n // if threeDSecureActive for some other payment method, do not show google pay\n return null;\n }\n\n return (\n <Fragment>\n {isPaymentMethodInitialized.googlepay === false && (\n <div className=\"straumur__google-pay-button__loading\">\n <LoaderIcon />\n </div>\n )}\n <div\n ref={googlePayElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n position: isPaymentMethodInitialized.googlepay ? \"static\" : \"absolute\",\n }}\n />\n </Fragment>\n );\n}\n\nexport default GooglePayButton;\n","export type PaymentMethod = \"card\" | \"storedcard\" | \"googlepay\" | \"applepay\";\n\nexport const NETWORK_ERROR = \"NETWORK_ERROR\";\nexport const CANCEL = \"CANCEL\";\nexport const IMPLEMENTATION_ERROR = \"IMPLEMENTATION_ERROR\";\nexport const API_ERROR = \"API_ERROR\";\nexport const ERROR = \"ERROR\";\nexport const SCRIPT_ERROR = \"SCRIPT_ERROR\";\nexport const SDK_ERROR = \"SDK_ERROR\";\n","import { h } from \"preact\";\nimport { useState } from \"preact/hooks\";\nimport \"./apple-pay-component.css\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport ApplePayIcon from \"../../assets/icons/applepay\";\nimport ApplePayButton from \"../../components/apple-pay-button/apple-pay-button\";\nimport PaymentMethodItem from \"../../components/payment-method-item/payment-method-item\";\n\ninterface ApplePayComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction ApplePayComponent({ configuration, paymentMethods }: ApplePayComponentProps): h.JSX.Element | null {\n const { i18n } = useI18n();\n const { activePaymentMethod, setActivePaymentMethod, threeDSecureActive, isSolePaymentMethod, hasApplePay } =\n usePaymentMethodGroup();\n const [isUnavailable, setIsUnavailable] = useState(false);\n\n if (!hasApplePay || isUnavailable) {\n return null;\n }\n\n if (configuration.instantPayments && configuration.instantPayments.some((x) => x === \"applepay\")) {\n return null;\n }\n\n if (activePaymentMethod !== \"applepay\" && threeDSecureActive) {\n return null;\n }\n\n return (\n <PaymentMethodItem\n icon={<ApplePayIcon />}\n title={i18n.t(\"applePay.title\")}\n isActive={activePaymentMethod === \"applepay\"}\n isSole={isSolePaymentMethod}\n onChange={() => setActivePaymentMethod(\"applepay\")}\n >\n <ApplePayButton\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={activePaymentMethod === \"applepay\"}\n isInstantPayment={false}\n onUnavailable={() => setIsUnavailable(true)}\n />\n </PaymentMethodItem>\n );\n}\n\nexport default ApplePayComponent;\n","import styleInject from '#style-inject';styleInject(\"\")","import { h } from \"preact\";\n\nconst ApplePayIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"26\" fill=\"none\" viewBox=\"0 0 40 26\">\n <path\n fill=\"#000\"\n d=\"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24\"\n />\n <path\n fill=\"#000\"\n d=\"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z\"\n />\n </svg>\n);\n\nexport default ApplePayIcon;\n","import styleInject from '#style-inject';styleInject(\".straumur__apple-pay-button__loading{display:flex;justify-content:center}\\n\")","import \"./apple-pay-button.css\";\nimport { Fragment, h } from \"preact\";\nimport { useEffect, useRef } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../payment-method-group/payment-method-group-context\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n ApplePay,\n ApplePayConfiguration,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\nimport { CANCEL } from \"../../models/constants\";\nimport \"./apple-pay-button.css\";\nimport LoaderIcon from \"../../assets/icons/loader\";\n\ninterface ApplePayButtonProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n showPaymentButton: boolean;\n isInstantPayment: boolean;\n onUnavailable?: () => void;\n}\n\nfunction ApplePayButton({\n configuration,\n paymentMethods,\n showPaymentButton,\n isInstantPayment,\n onUnavailable,\n}: ApplePayButtonProps): h.JSX.Element | null {\n const applePayElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const applePayRef = useRef<ApplePay>();\n const {\n isPaymentMethodInitialized,\n updatePaymentMethodInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n setActivePaymentMethod,\n activePaymentMethod,\n } = usePaymentMethodGroup();\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: paymentMethods.locale,\n countryCode: \"IS\",\n paymentMethodsResponse: paymentMethods.paymentMethods,\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n onError: handleOnError,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n const apayPaymentMethods = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"applepay\")!;\n const apayConfig = apayPaymentMethods.configuration! as { gatewayMerchantId: string; merchantId: string };\n\n const applePayConfiguration: ApplePayConfiguration = {\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n environment: configuration.environment,\n onSubmit: handleOnSubmit,\n configuration: {\n ...apayConfig,\n merchantName: paymentMethods.merchantName,\n },\n };\n\n applePayRef.current = new ApplePay(adyenCardRef.current, applePayConfiguration);\n\n applePayRef.current\n .isAvailable()\n .then(() => {\n applePayRef.current!.mount(applePayElementRef.current!);\n updatePaymentMethodInitialization(\"applepay\", true);\n })\n .catch(() => {\n updatePaymentMethodInitialization(\"applepay\", true);\n if (activePaymentMethod === \"applepay\") {\n setActivePaymentMethod(null);\n }\n onUnavailable?.();\n });\n };\n\n useEffect(() => {\n if (showPaymentButton && !isPaymentMethodInitialized.applepay) {\n initializeAdyenComponent();\n }\n }, [configuration, showPaymentButton]);\n\n useEffect(() => {\n if (applePayRef.current && isPaymentMethodInitialized.applepay) {\n applePayRef.current!.remove();\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n }\n }, [configuration]);\n\n function handleOnError(data: AdyenCheckoutError, _?: UIElement<UIElementProps> | undefined): void {\n if (data.name !== CANCEL) {\n handleError(\"error.unknownError\");\n }\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n if(isInstantPayment){\n setActivePaymentMethod(\"applepay\");\n }\n\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n if (activePaymentMethod !== \"applepay\" && threeDSecureActive) {\n // if threeDSecureActive for some other payment method, do not show apple pay\n return null;\n }\n\n return (\n <Fragment>\n {isPaymentMethodInitialized.applepay === false && (\n <div className=\"straumur__apple-pay-button__loading\">\n <LoaderIcon />\n </div>\n )}\n <div\n ref={applePayElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n position: isPaymentMethodInitialized.applepay ? \"static\" : \"absolute\",\n }}\n />\n </Fragment>\n );\n}\n\nexport default ApplePayButton;\n","import { Fragment, h } from \"preact\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { StoredPaymentMethod, SuccessResponse } from \"../../services/models\";\nimport StoredCardComponent from \"./stored-card-component\";\nimport { useState } from \"preact/hooks\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\n\ninterface StoredCardContainerComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction StoredCardContainerComponent({\n configuration,\n paymentMethods,\n}: StoredCardContainerComponentProps): h.JSX.Element | null {\n const [storedPaymentMethods, setStoredPaymentMethods] = useState<StoredPaymentMethod[]>(\n paymentMethods.paymentMethods.storedPaymentMethods ?? []\n );\n const { activePaymentMethod, threeDSecureActive, hasStoredPaymentMethods } = usePaymentMethodGroup();\n\n if (\n !hasStoredPaymentMethods ||\n (activePaymentMethod !== \"storedcard\" && threeDSecureActive) // if threeDSecureActive for some other payment method, do not show stored cards\n ) {\n return null;\n }\n\n function handleStoredCardRemoved(storedPaymentMethodId: string): void {\n setStoredPaymentMethods((prevStoredPaymentMethods) =>\n prevStoredPaymentMethods.filter((storedPaymentMethod) => storedPaymentMethod.id !== storedPaymentMethodId)\n );\n }\n\n return (\n <Fragment>\n {storedPaymentMethods?.map((storedPaymentMethod) => (\n <StoredCardComponent\n key={storedPaymentMethod.id}\n configuration={configuration}\n storedPaymentMethod={storedPaymentMethod}\n paymentMethods={paymentMethods}\n onStoredCardRemoved={handleStoredCardRemoved}\n />\n ))}\n </Fragment>\n );\n}\n\nexport default StoredCardContainerComponent;\n","import { Fragment, h } from \"preact\";\nimport { useEffect, useRef, useState } from \"preact/hooks\";\nimport \"./stored-card-component.css\";\nimport { useI18n } from \"../../localizations/i18n-context\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport { Tooltip } from \"../../components/tooltip/tooltip\";\nimport InfoIcon from \"../../assets/icons/info\";\nimport {\n AdditionalDetailsActions,\n AdditionalDetailsData,\n AdyenCheckout,\n AdyenCheckoutError,\n CustomCard,\n ICore,\n PaymentCompletedData,\n PaymentFailedData,\n SubmitActions,\n SubmitData,\n UIElement,\n UIElementProps,\n} from \"@adyen/adyen-web\";\nimport { RenderBrandIcons } from \"../../utils/renderBrandIcons\";\nimport LoaderIcon from \"../../assets/icons/loader\";\nimport { StoredCardComponentProps, StoredCardFormError, StoredCardFormErrorField } from \"./models\";\nimport WarningIcon from \"../../assets/icons/warning\";\nimport { ICreateDetailsBody, ICreatePaymentBody, IPostDisableTokenBody } from \"../../adapter/models\";\nimport { createDetailsRequest, createPaymentRequest, postDisableTokenRequest } from \"../../adapter/straumur-adapter\";\nimport PaymentMethodItem from \"../../components/payment-method-item/payment-method-item\";\n\nfunction StoredCardComponent({\n configuration,\n paymentMethods,\n storedPaymentMethod,\n onStoredCardRemoved,\n}: StoredCardComponentProps): h.JSX.Element | null {\n const storedCardElementRef = useRef<HTMLDivElement>(null);\n const adyenCardRef = useRef<ICore>();\n const customCardRef = useRef<CustomCard>();\n const { i18n } = useI18n();\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\n const [askConfirmRemoveStoredCard, setAskConfirmRemoveStoredCard] = useState<boolean>(false);\n const [formErrors, setFormErrors] = useState<StoredCardFormError>({\n encryptedSecurityCode: { visible: false },\n });\n const {\n activePaymentMethod,\n setActivePaymentMethod,\n activeStoredPaymentMethodId,\n setActiveStoredPaymentMethodId,\n isStoredCardInitialized,\n updateStoredCardInitialization,\n handleSuccess,\n handleError,\n setThreeDSecureActive,\n threeDSecureActive,\n isSolePaymentMethod,\n } = usePaymentMethodGroup();\n\n // In sole mode there is only one stored card, so being the active payment method is enough.\n // In normal mode both the method and the specific card ID must match.\n const isActive = isSolePaymentMethod\n ? activePaymentMethod === \"storedcard\"\n : activePaymentMethod === \"storedcard\" && activeStoredPaymentMethodId === storedPaymentMethod.id;\n\n if (threeDSecureActive && !isActive) {\n return null;\n }\n\n const initializeAdyenComponent = async () => {\n adyenCardRef.current = await AdyenCheckout({\n clientKey: paymentMethods.clientKey,\n environment: configuration.environment,\n locale: configuration.locale,\n countryCode: \"IS\",\n amount: {\n value: paymentMethods.minorUnitsAmount,\n currency: paymentMethods.currency,\n },\n paymentMethodsResponse: paymentMethods.paymentMethods,\n onError: handleOnError,\n onAdditionalDetails: handleOnSubmitAdditionalData,\n onPaymentCompleted: handlePaymentCompleted,\n onPaymentFailed: handlePaymentFailed,\n });\n\n customCardRef.current = new CustomCard(adyenCardRef.current, {\n brands: [storedPaymentMethod.brand!],\n onSubmit: handleOnSubmit,\n onConfigSuccess() {\n updateStoredCardInitialization(storedPaymentMethod.id, true);\n },\n onBrand: (event) => {\n setSecurityCodePolicy(event.cvcPolicy);\n },\n onValidationError: (event) => {\n const defaultErrors: StoredCardFormError = {\n encryptedSecurityCode: { visible: false, message: undefined },\n };\n\n event\n .filter((x) => x.error)\n .forEach((x) => {\n defaultErrors[x.fieldType as StoredCardFormErrorField].visible = true;\n defaultErrors[x.fieldType as StoredCardFormErrorField].message = x.errorI18n;\n });\n\n setFormErrors(defaultErrors);\n },\n onAllValid: (event) => {\n setPayButtonDisabled(!event.allValid);\n },\n placeholders: configuration.placeholders,\n challengeWindowSize: \"05\", // looks like not working\n });\n\n if (storedCardElementRef.current) {\n customCardRef.current.mount(storedCardElementRef.current);\n }\n };\n\n useEffect(() => {\n if (isActive && !isStoredCardInitialized[storedPaymentMethod.id]) {\n initializeAdyenComponent();\n }\n }, [configuration, isActive]);\n\n useEffect(() => {\n if (customCardRef.current && isStoredCardInitialized[activeStoredPaymentMethodId!]) {\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\n // So we need to reinitialize the component.\n initializeAdyenComponent();\n setFormErrors({ encryptedSecurityCode: { visible: false, message: undefined } });\n }\n }, [configuration]);\n\n useEffect(() => {\n setAskConfirmRemoveStoredCard(false);\n }, [activePaymentMethod, activeStoredPaymentMethodId]);\n\n function handleBoxChange() {\n setActivePaymentMethod(\"storedcard\");\n setActiveStoredPaymentMethodId(storedPaymentMethod.id);\n }\n\n function handleAskToConfirmRemoveCard() {\n setAskConfirmRemoveStoredCard(true);\n }\n\n function handleCancelRemoveStoredCard() {\n setAskConfirmRemoveStoredCard(false);\n }\n\n async function handleConfirmRemoveStoredCard() {\n const data: IPostDisableTokenBody = {\n storedPaymentMethodId: storedPaymentMethod.id,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await postDisableTokenRequest(configuration.environment, data);\n\n if (!fetchResponse.ok) {\n handleError(\"error.failedToSubmitRemoveStoredPaymentCard\");\n return;\n }\n\n const disableTokenResponse = await fetchResponse.json();\n\n if (!disableTokenResponse.success) {\n handleError(\"error.failedToRemoveStoredPaymentCard\");\n return;\n }\n\n onStoredCardRemoved(storedPaymentMethod.id);\n }\n\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined) {\n handleError(\"error.unknownError\");\n }\n\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\n const data: ICreatePaymentBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n paymentMethod: {\n ...state.data.paymentMethod,\n storedPaymentMethodId: storedPaymentMethod.id,\n },\n };\n\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n handleError(\"error.failedToSubmitPayment\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\n setThreeDSecureActive(true);\n }\n\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\n // You must call this, even if the result of the payment is unsuccessful.\n actions.resolve({ resultCode, action });\n }\n\n async function handleOnSubmitAdditionalData(\n state: AdditionalDetailsData,\n _: UIElement<UIElementProps>,\n actions: AdditionalDetailsActions\n ) {\n const data: ICreateDetailsBody = {\n ...state.data,\n sessionId: configuration.sessionId,\n };\n\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\n\n // We will always get 200 OK unless there is an error in our server code.\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\n if (!fetchResponse.ok) {\n actions.reject();\n // const errorResponse = await fetchResponse.json();\n handleError(\"error.failedToSubmitPaymentDetails\");\n return;\n }\n\n const response = await fetchResponse.json();\n\n // ResultCode should never be empty.\n if (!response.resultCode) {\n actions.reject();\n handleError(\"error.paymentDetailsFailed\");\n return;\n }\n\n const { resultCode, action } = response;\n\n actions.resolve({ resultCode, action });\n }\n\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n configuration.onPaymentCompleted?.({ resultCode: data.resultCode });\n }\n\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\n if (data) {\n if (data.resultCode === \"Authorised\") {\n handleSuccess(\"success.paymentAuthorized\");\n } else {\n handleError(\"error.paymentUnsuccessful\");\n }\n\n configuration.onPaymentFailed?.({ resultCode: data.resultCode });\n } else {\n configuration.onPaymentFailed?.();\n }\n }\n\n function handleSubmitClick() {\n if (!customCardRef.current) return;\n\n customCardRef.current!.submit();\n }\n\n const headerRight = isActive && isStoredCardInitialized[storedPaymentMethod.id] ? (\n <div className=\"straumur__stored-card-component__remove-stored-card-button\">\n <button\n onClick={handleAskToConfirmRemoveCard}\n className=\"straumur__stored-card-component__remove-stored-card-button--text\"\n disabled={askConfirmRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCard\")}\n </button>\n </div>\n ) : null;\n\n const confirmSection = (\n <div\n className={`${\"straumur__stored-card-component__confirm-remove-stored-card\"} ${\n askConfirmRemoveStoredCard ? \"straumur__stored-card-component__confirm-remove-stored-card--expanded\" : \"\"\n }`}\n >\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--header\">\n <WarningIcon />\n <span className=\"straumur__stored-card-component__confirm-remove-stored-card--header--title\">\n {i18n.t(\"stored-cards.removeStoredCardQuestion\")}\n </span>\n </div>\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--actions\">\n <button\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\n onClick={handleConfirmRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCardQuestionYesRemove\")}\n </button>\n <button\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\n onClick={handleCancelRemoveStoredCard}\n >\n {i18n.t(\"stored-cards.removeStoredCardQuestionCancel\")}\n </button>\n </div>\n </div>\n );\n\n return (\n <PaymentMethodItem\n icon={\n <RenderBrandIcons\n brands={[\n {\n brand: storedPaymentMethod.brand!,\n brandFullName: storedPaymentMethod.name,\n },\n ]}\n />\n }\n title={`•••• ${storedPaymentMethod.lastFour}`}\n isActive={isActive}\n isSole={isSolePaymentMethod}\n onChange={handleBoxChange}\n headerRight={headerRight}\n confirmSection={confirmSection}\n >\n <div\n ref={storedCardElementRef}\n style={{\n height: threeDSecureActive ? \"600px\" : \"auto\",\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\n }}\n >\n {!isStoredCardInitialized[storedPaymentMethod.id] && (\n <div className=\"straumur__stored-card-component__loading-text\">\n <LoaderIcon />\n </div>\n )}\n\n <div\n className=\"straumur__stored-card-component__form\"\n style={{\n opacity: isStoredCardInitialized[storedPaymentMethod.id] && !threeDSecureActive ? 1 : 0,\n position: isStoredCardInitialized[storedPaymentMethod.id] && !threeDSecureActive ? \"relative\" : \"absolute\",\n transition: \"opacity 0.3s ease-in-out\",\n }}\n >\n <div className=\"straumur__stored-card-component__form--field-wrapper\">\n <div className=\"straumur__stored-card-component__form--wrapper\">\n <label className=\"straumur__stored-card-component__form--wrapper--label straumur__stored-card-component__form--wrapper--label--readonly\">\n {i18n.t(\"stored-cards.expiryDate\")}\n </label>\n <span className=\"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly\">\n {storedPaymentMethod.expiryMonth}/{storedPaymentMethod.expiryYear}\n </span>\n </div>\n\n <div className=\"straumur__stored-card-component__form--wrapper\">\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\n <Fragment>\n <label\n className={`${\"straumur__stored-card-component__form--wrapper--label\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__stored-card-component__form--wrapper--label--error\"\n : \"\"\n }`}\n >\n {securityCodePolicy === \"optional\"\n ? i18n.t(\"stored-cards.securityCode3DigitsOptional\")\n : i18n.t(\"stored-cards.securityCode3Digits\")}\n </label>\n <span\n className={`${\"straumur__stored-card-component__form--wrapper--input\"} ${\n formErrors.encryptedSecurityCode.visible\n ? \"straumur__stored-card-component__form--wrapper--input--error\"\n : \"\"\n }`}\n data-cse=\"encryptedSecurityCode\"\n >\n <div className=\"straumur__stored-card-component__form--wrapper--label--info\">\n <Tooltip content={i18n.t(\"stored-cards.securityCode3DigitsInfo\")}>\n <InfoIcon />\n </Tooltip>\n </div>\n </span>\n </Fragment>\n )}\n {formErrors.encryptedSecurityCode.visible && (\n <span className=\"straumur__stored-card-component__form--wrapper--error\">\n {formErrors.encryptedSecurityCode.message}\n </span>\n )}\n </div>\n </div>\n\n <button\n className=\"straumur__stored-card-component__submit-button\"\n disabled={payButtonDisabled}\n onClick={handleSubmitClick}\n >\n {paymentMethods.formattedAmount}\n </button>\n </div>\n </div>\n </PaymentMethodItem>\n );\n}\n\nexport default StoredCardComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:#d03e00;text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:#72889d}.straumur__stored-card-component__confirm-remove-stored-card{background-color:#fff7db;border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:#262b31;padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:#775d00;background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__stored-card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}\\n\")","import { h } from \"preact\";\n\nconst WarningIcon = () => (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_10650_34968)\">\n <path\n 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\"\n fill=\"#DFAE00\"\n />\n <path\n opacity=\"0.4\"\n 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\"\n fill=\"#DFAE00\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_10650_34968\">\n <rect width=\"24\" height=\"24\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport default WarningIcon;\n","import { h, ComponentChildren } from \"preact\";\nimport { PaymentMethodGroupContext } from \"./payment-method-group-context\";\nimport \"./payment-method-group.css\";\nimport { PaymentMethod } from \"../../models/constants\";\n\ninterface PaymentMethodGroupProps {\n children: ComponentChildren;\n initialValue: PaymentMethod | null;\n isSolePaymentMethod: boolean;\n hasCard: boolean;\n hasGooglePay: boolean;\n hasApplePay: boolean;\n hasStoredPaymentMethods: boolean;\n}\n\nfunction PaymentMethodGroup({\n children,\n initialValue,\n isSolePaymentMethod,\n hasCard,\n hasGooglePay,\n hasApplePay,\n hasStoredPaymentMethods,\n}: PaymentMethodGroupProps): h.JSX.Element | null {\n return (\n <PaymentMethodGroupContext\n initialValue={initialValue}\n isSolePaymentMethod={isSolePaymentMethod}\n hasCard={hasCard}\n hasGooglePay={hasGooglePay}\n hasApplePay={hasApplePay}\n hasStoredPaymentMethods={hasStoredPaymentMethods}\n >\n <div className=\"straumur__payment-method-group\">{children}</div>\n </PaymentMethodGroupContext>\n );\n}\n\nexport default PaymentMethodGroup;\n","import styleInject from '#style-inject';styleInject(\".straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%}\\n\")","import { Fragment, h } from \"preact\";\nimport \"./result-component.css\";\nimport SuccessIcon from \"../../assets/icons/success\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\nimport FailureIcon from \"../../assets/icons/failure\";\nimport { useI18n } from \"../../localizations/i18n-context\";\n\nfunction ResultComponent(): h.JSX.Element | null {\n const { error, success } = usePaymentMethodGroup();\n const { i18n } = useI18n();\n\n if (!error && !success) {\n return null;\n }\n\n return (\n <div className=\"straumur__result-component\">\n {error && (\n <Fragment>\n <FailureIcon />\n <p className=\"straumur__result-component__error--message\">{i18n.t(error)}</p>\n </Fragment>\n )}\n\n {success && (\n <Fragment>\n <SuccessIcon />\n <p className=\"straumur__result-component__success--message\">{i18n.t(success)}</p>\n </Fragment>\n )}\n </div>\n );\n}\n\nexport default ResultComponent;\n","import styleInject from '#style-inject';styleInject(\".straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:16px}\\n\")","import { h } from \"preact\";\n\nconst SuccessIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\n <circle\n cx=\"60\"\n cy=\"60\"\n r=\"50\"\n fill=\"none\"\n stroke=\"#5b8206\"\n stroke-width=\"5\"\n stroke-dasharray=\"314\"\n stroke-dashoffset=\"314\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\n </circle>\n\n <g transform=\"translate(60,60)\">\n <path\n d=\"M-25 5 L-5 25 L25 -15\"\n fill=\"none\"\n stroke=\"#5b8206\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-dasharray=\"100\"\n stroke-dashoffset=\"100\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"100\" to=\"0\" dur=\"0.5s\" begin=\"1s\" fill=\"freeze\" />\n <animateTransform\n attributeName=\"transform\"\n type=\"scale\"\n from=\"1 1\"\n to=\"1.2 1.2\"\n begin=\"1.5s\"\n dur=\"0.2s\"\n fill=\"freeze\"\n additive=\"sum\"\n />\n <animateTransform\n attributeName=\"transform\"\n type=\"scale\"\n from=\"1.2 1.2\"\n to=\"1 1\"\n begin=\"1.7s\"\n dur=\"0.2s\"\n fill=\"freeze\"\n additive=\"sum\"\n />\n </path>\n </g>\n </svg>\n);\n\nexport default SuccessIcon;\n","import { h } from \"preact\";\n\nconst FailureIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\n <circle\n cx=\"60\"\n cy=\"60\"\n r=\"50\"\n fill=\"none\"\n stroke=\"#d03e00\"\n stroke-width=\"5\"\n stroke-dasharray=\"314\"\n stroke-dashoffset=\"314\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\n </circle>\n\n <g transform=\"translate(60,60)\">\n <g id=\"crossGroup\">\n <line\n x1=\"-20\"\n y1=\"-20\"\n x2=\"20\"\n y2=\"20\"\n stroke=\"#d03e00\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"57\"\n stroke-dashoffset=\"57\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1s\" fill=\"freeze\" />\n </line>\n\n <line\n x1=\"20\"\n y1=\"-20\"\n x2=\"-20\"\n y2=\"20\"\n stroke=\"#d03e00\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"57\"\n stroke-dashoffset=\"57\"\n >\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1.3s\" fill=\"freeze\" />\n </line>\n </g>\n </g>\n </svg>\n);\n\nexport default FailureIcon;\n","import { Fragment, h } from \"preact\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\n\ninterface PaymentMethodsWrapperProps {\n children: h.JSX.Element[];\n}\n\nfunction PaymentMethodsWrapper({ children }: PaymentMethodsWrapperProps): h.JSX.Element | null {\n const { error, success } = usePaymentMethodGroup();\n\n if (error || success) {\n return null;\n }\n\n return <Fragment>{children}</Fragment>;\n}\n\nexport default PaymentMethodsWrapper;\n","import { h } from \"preact\";\nimport { useState } from \"preact/hooks\";\nimport \"./instant-payments-component.css\";\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\nimport { SuccessResponse } from \"../../services/models\";\nimport GooglePayButton from \"../../components/google-pay-button/google-pay-button\";\nimport ApplePayButton from \"../../components/apple-pay-button/apple-pay-button\";\nimport { PaymentMethod } from \"../../models/constants\";\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\n\ninterface InstantPaymentsComponentProps {\n configuration: StraumurCheckoutConfiguration;\n paymentMethods: SuccessResponse;\n}\n\nfunction InstantPaymentsComponent({\n configuration,\n paymentMethods,\n}: InstantPaymentsComponentProps): h.JSX.Element | null {\n const { hasGooglePay, hasApplePay } = usePaymentMethodGroup();\n const [unavailableMethods, setUnavailableMethods] = useState<Set<string>>(new Set());\n\n const handleUnavailable = (method: string) => {\n setUnavailableMethods((prev) => new Set(prev).add(method));\n };\n\n if (!configuration.instantPayments) {\n return null;\n }\n\n // safeguard: filter out any invalid payment methods, only allow applepay and googlepay\n const validInstantPayments: Extract<PaymentMethod, \"googlepay\" | \"applepay\">[] = [\"googlepay\", \"applepay\"];\n const availableInstantPayments = configuration.instantPayments.filter((payment) =>\n validInstantPayments.includes(payment)\n );\n\n // ensure the payment method is actually available from the paymentMethods response\n const finalAvailableInstantPayments = availableInstantPayments.filter((payment) =>\n payment === \"googlepay\" ? hasGooglePay : hasApplePay\n );\n\n const visibleInstantPayments = finalAvailableInstantPayments.filter(\n (payment) => !unavailableMethods.has(payment)\n );\n\n if (finalAvailableInstantPayments.length === 0) {\n return null;\n }\n\n return (\n <div\n class={`instant-payments ${\n visibleInstantPayments.length > 1 ? \"instant-payments--multiple\" : \"instant-payments--single\"\n }`}\n style={{ display: visibleInstantPayments.length === 0 ? \"none\" : undefined }}\n >\n {finalAvailableInstantPayments.map((paymentMethod) => {\n if (paymentMethod === \"googlepay\") {\n return (\n <GooglePayButton\n key={paymentMethod}\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={true}\n isInstantPayment={true}\n onUnavailable={() => handleUnavailable(\"googlepay\")}\n />\n );\n }\n if (paymentMethod === \"applepay\") {\n return (\n <ApplePayButton\n key={paymentMethod}\n configuration={configuration}\n paymentMethods={paymentMethods}\n showPaymentButton={true}\n isInstantPayment={true}\n onUnavailable={() => handleUnavailable(\"applepay\")}\n />\n );\n }\n\n // this should never happen due to our filtering above, but typescript safeguard\n return null;\n })}\n </div>\n );\n}\n\nexport default InstantPaymentsComponent;\n","import styleInject from '#style-inject';styleInject(\".instant-payments{display:grid;gap:var(--straumur__space-md);grid-template-columns:1fr 1fr}.instant-payments--single{grid-template-columns:1fr}\\n\")","export const translations = {\n \"en-US\": {\n \"cards.title\": \"Card payment\",\n \"cards.cardNumber\": \"Card number\",\n \"cards.expiryDate\": \"Expiry date\",\n \"cards.securityCode3Digits\": \"Security code\",\n \"cards.securityCode3DigitsOptional\": \"Security code (optional)\",\n \"cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\n \"cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\n \"cards.storePaymentMethod\": \"Store payment information\",\n \"googlePay.title\": \"Google Pay\",\n \"applePay.title\": \"Apple Pay\",\n \"stored-cards.expiryDate\": \"Expiry date\",\n \"stored-cards.securityCode3Digits\": \"Security code\",\n \"stored-cards.securityCode3DigitsOptional\": \"Security code (optional)\",\n \"stored-cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\n \"stored-cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\n \"stored-cards.removeStoredCard\": \"Remove\",\n \"stored-cards.removeStoredCardQuestion\": \"Remove stored payment method?\",\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Yes, remove\",\n \"stored-cards.removeStoredCardQuestionCancel\": \"Cancel\",\n\n \"success.paymentAuthorized\": \"Payment authorized\",\n\n \"error.unknownError\": \"Unknown error occurred\",\n \"error.failedToInitializeStraumurWebComponent\": \"Failed to initialize Straumur Web component\",\n \"error.failedToInitializePaymentMethods\": \"Failed to initialize payment methods\",\n \"error.failedToSubmitPayment\": \"Failed to submit payment\",\n \"error.paymentFailed\": \"Payment failed\",\n \"error.paymentUnsuccessful\": \"Payment unsuccessful\",\n \"error.failedToSubmitPaymentDetails\": \"Failed to submit payment details\",\n \"error.paymentDetailsFailed\": \"Payment details failed\",\n \"error.googlePayNotAvailable\": \"Google Pay not available\",\n \"error.applePayNotAvailable\": \"Apple Pay not available\",\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Failed to remove stored payment card\",\n \"error.failedToRemoveStoredPaymentCard\": \"Stored payment card was not removed\",\n },\n \"is-IS\": {\n \"cards.title\": \"Greiða með korti\",\n \"cards.cardNumber\": \"Kortanúmer\",\n \"cards.expiryDate\": \"Gildisdagur\",\n \"cards.securityCode3Digits\": \"Öryggiskóði\",\n \"cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\n \"cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\n \"cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\n \"cards.storePaymentMethod\": \"Vista greiðsluupplýsingar\",\n \"googlePay.title\": \"Google Pay\",\n \"applePay.title\": \"Apple Pay\",\n \"stored-cards.expiryDate\": \"Gildisdagur\",\n \"stored-cards.securityCode3Digits\": \"Öryggiskóði\",\n \"stored-cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\n \"stored-cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\n \"stored-cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\n \"stored-cards.removeStoredCard\": \"Fjarlægja\",\n \"stored-cards.removeStoredCardQuestion\": \"Fjarlægja geymdan greiðslumáta?\",\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Já, fjarlægja\",\n \"stored-cards.removeStoredCardQuestionCancel\": \"Hætta við\",\n\n \"success.paymentAuthorized\": \"Greiðsla samþykkt\",\n\n \"error.unknownError\": \"Óþekkt villa kom upp\",\n \"error.failedToInitializeStraumurWebComponent\": \"Mistókst að sækja Straumur Web hluta\",\n \"error.failedToInitializePaymentMethods\": \"Mistókst að sækja greiðslumáta\",\n \"error.failedToSubmitPayment\": \"Mistókst að senda greiðslu\",\n \"error.paymentFailed\": \"Greiðsla mistókst\",\n \"error.paymentUnsuccessful\": \"Greiðsla ekki tekin\",\n \"error.failedToSubmitPaymentDetails\": \"Mistókst að senda greiðsluupplýsingar\",\n \"error.paymentDetailsFailed\": \"Mistókst að sækja greiðsluupplýsingar\",\n \"error.googlePayNotAvailable\": \"Google Pay ekki í boði\",\n \"error.applePayNotAvailable\": \"Apple Pay ekki í boði\",\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Mistókst að fjarlægja geymdan greiðslumáta\",\n \"error.failedToRemoveStoredPaymentCard\": \"Geymdur greiðslumáti var ekki fjarlægður\",\n },\n};\n\nexport type Language = keyof typeof translations;\nexport type TranslationKey = keyof (typeof translations)[\"en-US\"] | keyof (typeof translations)[\"is-IS\"];\n","import { Language, TranslationKey, translations } from \"./translations\";\n\nexport class I18nService {\n constructor(\n private language: Language,\n private customLocalizations?: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>\n ) {}\n\n t(key: TranslationKey): string {\n const localizedString = this.customLocalizations?.[this.language]?.[key];\n return localizedString || translations[this.language][key] || key;\n }\n\n setLanguage(language: Language): void {\n this.language = language;\n }\n\n updateCustomLocalizations(\n customLocalizations: Partial<Record<Language, Partial<Record<TranslationKey, string>>>>\n ): void {\n this.customLocalizations = customLocalizations;\n }\n}\n"],"mappings":"AAAA,OAAS,KAAAA,EAAG,UAAAC,OAAc,SCCD,SAARC,EAA6BC,EAAK,CAAE,SAAAC,CAAS,EAAI,CAAC,EAAG,CAC1D,GAAI,CAACD,GAAO,OAAO,SAAa,IAAa,OAE7C,IAAME,EAAO,SAAS,MAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAC/DC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,KAAO,WAETF,IAAa,OACXC,EAAK,WACPA,EAAK,aAAaC,EAAOD,EAAK,UAAU,EAK1CA,EAAK,YAAYC,CAAK,EAGpBA,EAAM,WACRA,EAAM,WAAW,QAAUH,EAE3BG,EAAM,YAAY,SAAS,eAAeH,CAAG,CAAC,CAElD,CCvB8BI,EAAY;AAAA,CAAm4D,ECAv7D,IAAMC,GAAS,KACN,CACL,iBAAkB,mEAClB,oBAAqB,2DAErB,wBAAyB,kBACzB,iBAAkB,UAClB,iBAAkB,UAClB,uBAAwB,eAC1B,GAaWC,GAAMD,GAAO,ECnB1B,SAASE,GAAWC,EAAsC,CACxD,OAAQA,EAAa,CACnB,IAAK,OACH,OAAOC,GAAI,iBACb,IAAK,OACH,OAAOA,GAAI,oBACb,QACE,MAAM,IAAI,MAAM,wBAAwBD,CAAW,EAAE,CACzD,CACF,CAEO,SAASE,GAAkBF,EAA8BG,EAA8B,CAC5F,OAAO,MAAM,GAAGJ,GAAWC,CAAW,CAAC,IAAIC,GAAI,uBAAuB,GAAI,CACxE,OAAQ,OACR,QAAS,CACP,eAAgB,kBAClB,EACA,KAAM,KAAK,UA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,6BACZE,EACAC,EACAC,EACA,CACA,IAAMC,EAA2B,CAC/B,GAAGH,EAAM,KACT,UAAW,KAAK,cAAc,SAChC,EAEMI,EAAgB,MAAMC,EAAqB,KAAK,cAAc,YAAaF,CAAI,EAIrF,GAAI,CAACC,EAAc,GAAI,CACrBF,EAAQ,OAAO,EACf,KAAK,YAAY,oCAAoC,EACrD,MACF,CAEA,IAAMZ,EAAW,MAAMc,EAAc,KAAK,EAG1C,GAAI,CAACd,EAAS,WAAY,CACxBY,EAAQ,OAAO,EACf,KAAK,YAAY,4BAA4B,EAC7C,MACF,CAEA,GAAM,CAAE,WAAAI,EAAY,OAAAC,CAAO,EAAIjB,EAE/BY,EAAQ,QAAQ,CAAE,WAAAI,EAAY,OAAAC,CAAO,CAAC,EAElCD,IAAe,aACjB,KAAK,cAAc,2BAA2B,EAE9C,KAAK,YAAY,2BAA2B,CAEhD,CAEA,aAAaE,EAAyD,CACpE,KAAK,cAAgB,CACnB,GAAG,KAAK,cACR,GAAGA,CACL,EAGIA,EAAU,QACZ,KAAK,KAAK,YAAYA,EAAU,MAAM,EAEpCA,EAAU,qBACZ,KAAK,KAAK,0BAA0BA,EAAU,mBAAmB,EAI/D,KAAK,cACP,KAAK,gBAAgB,CAEzB,CAEA,YAAYxB,EAAwB,CAClC,KAAK,aAAa,CAChB,OAAQA,CACV,CAAC,CACH,CAEA,SAAgB,CAEV,KAAK,eACPE,GAAO,KAAM,KAAK,YAAY,EAC9B,KAAK,aAAe,KAExB,CACF,EAEOuB,GAAQ7B,GAEf,SAASQ,GAAc,CAAE,SAAAsB,CAAS,EAAgC,CAChE,OAAOvB,EAAC,OAAI,UAAU,4BAA4BuB,CAAS,CAC7D","names":["h","render","styleInject","css","insertAt","head","style","styleInject","getEnv","env","getBaseUrl","environment","env","getPaymentMethods","body","createPaymentRequest","createDetailsRequest","postDisableTokenRequest","setupPaymentMethods","environment","sessionId","fetchResponse","getPaymentMethods","contentType","errorMessage","h","h","useState","styleInject","h","createContext","useState","useContext","PaymentMethodContext","defaultIsInitialized","PaymentMethodGroupContext","children","initialValue","isSolePaymentMethod","hasCard","hasGooglePay","hasApplePay","hasStoredPaymentMethods","activePaymentMethod","setActivePaymentMethod","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","threeDSecureActive","setThreeDSecureActive","isPaymentMethodInitialized","setIsPaymentMethodInitialized","isStoredCardInitialized","setIsStoredCardInitialized","success","setSuccess","error","setError","updatePaymentMethodInitialization","paymentMethod","isInitialized","prevState","updateStoredCardInitialization","storedPaymentMethod","handleError","handleSuccess","usePaymentMethodGroup","context","h","createContext","useContext","I18nContext","I18nProvider","children","i18nService","onLanguageChange","changeLanguage","newLanguage","useI18n","context","h","CardIcon","card_default","Fragment","h","h","MasterCardIcon","opacity","mastercard_default","h","VisaIcon","opacity","visa_default","h","MaestroIcon","opacity","maestro_default","h","AmexIcon","opacity","amex_default","h","JcbIcon","opacity","jcb_default","h","DinersIcon","opacity","diners_default","h","DiscoverIcon","opacity","discover_default","h","CupIcon","opacity","cup_default","h","styleInject","useRef","useState","Tooltip","children","content","isVisible","setIsVisible","triggerRef","h","useEffect","useState","useMediaQuery","query","getMatch","matches","setMatches","mediaQueryList","listener","event","RenderBrandIcons","brands","brandHidden","limit","isWidth380","useMediaQuery","widthLimit","brandToShow","brand","brandName","x","h","Fragment","index","Tooltip","RenderBrandIcon","defaultToBrandName","visa_default","mastercard_default","maestro_default","amex_default","jcb_default","diners_default","discover_default","cup_default","Fragment","h","useRef","useState","useEffect","AdyenCheckout","CustomCard","h","InfoIcon","info_default","h","LoaderIcon","loader_default","h","CheckmarkIcon","color","checkmark_default","h","BrandOption","brand","brandName","isSelected","onBrandClick","h","RenderBrandIcon","checkmark_default","RenderDualBrandComponent","dualBrandConfiguration","selectedBrand","CardForm","configuration","paymentMethods","onBrandHidden","cardElementRef","useRef","adyenCardRef","customCardRef","i18n","useI18n","payButtonDisabled","setPayButtonDisabled","useState","securityCodePolicy","setSecurityCodePolicy","storePaymentMethod","setStorePaymentMethod","isDualBrand","setIsDualBrand","dualBrandConfiguration","setDualBrandConfiguration","selectedBrand","setSelectedBrand","storePaymentMethodRef","formErrors","setFormErrors","activePaymentMethod","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","hasCard","usePaymentMethodGroup","schemeBrands","x","initializeAdyenComponent","AdyenCheckout","handleOnSubmit","handleOnSubmitAdditionalData","handleOnError","handlePaymentCompleted","handlePaymentFailed","CustomCard","event","selectedBrands","defaultErrors","useEffect","dualBrandListener","e","handleStorePaymentMethodChange","_","__","state","actions","data","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","h","loader_default","Fragment","Tooltip","info_default","RenderDualBrandComponent","checkmark_default","card_form_default","h","styleInject","PaymentMethodItem","icon","title","isActive","isSole","onChange","children","headerRight","confirmSection","h","payment_method_item_default","CardComponent","configuration","paymentMethods","i18n","useI18n","brandHidden","setBrandHidden","useState","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","isSolePaymentMethod","hasCard","usePaymentMethodGroup","brands","x","h","payment_method_item_default","card_default","RenderBrandIcons","card_form_default","card_component_default","h","useState","styleInject","h","GooglePayIcon","googlepay_default","styleInject","Fragment","h","useEffect","useRef","AdyenCheckout","GooglePay","CANCEL","GooglePayButton","configuration","paymentMethods","showPaymentButton","isInstantPayment","onUnavailable","googlePayElementRef","useRef","adyenCheckoutRef","googlePayRef","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","setActivePaymentMethod","activePaymentMethod","usePaymentMethodGroup","initializeAdyenComponent","AdyenCheckout","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","gpayConfig","x","googlePayConfiguration","handleOnSubmit","GooglePay","useEffect","data","__","CANCEL","state","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","h","Fragment","loader_default","google_pay_button_default","GooglePayComponent","configuration","paymentMethods","i18n","useI18n","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","isSolePaymentMethod","hasGooglePay","usePaymentMethodGroup","isUnavailable","setIsUnavailable","useState","x","h","payment_method_item_default","googlepay_default","google_pay_button_default","google_pay_component_default","h","useState","styleInject","h","ApplePayIcon","applepay_default","styleInject","Fragment","h","useEffect","useRef","AdyenCheckout","ApplePay","ApplePayButton","configuration","paymentMethods","showPaymentButton","isInstantPayment","onUnavailable","applePayElementRef","useRef","adyenCardRef","applePayRef","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","setActivePaymentMethod","activePaymentMethod","usePaymentMethodGroup","initializeAdyenComponent","AdyenCheckout","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","apayConfig","x","applePayConfiguration","handleOnSubmit","ApplePay","useEffect","data","CANCEL","state","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","h","Fragment","loader_default","apple_pay_button_default","ApplePayComponent","configuration","paymentMethods","i18n","useI18n","activePaymentMethod","setActivePaymentMethod","threeDSecureActive","isSolePaymentMethod","hasApplePay","usePaymentMethodGroup","isUnavailable","setIsUnavailable","useState","x","h","payment_method_item_default","applepay_default","apple_pay_button_default","apple_pay_component_default","Fragment","h","Fragment","h","useEffect","useRef","useState","styleInject","AdyenCheckout","CustomCard","h","WarningIcon","warning_default","StoredCardComponent","configuration","paymentMethods","storedPaymentMethod","onStoredCardRemoved","storedCardElementRef","useRef","adyenCardRef","customCardRef","i18n","useI18n","payButtonDisabled","setPayButtonDisabled","useState","securityCodePolicy","setSecurityCodePolicy","askConfirmRemoveStoredCard","setAskConfirmRemoveStoredCard","formErrors","setFormErrors","activePaymentMethod","setActivePaymentMethod","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","isStoredCardInitialized","updateStoredCardInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","isSolePaymentMethod","usePaymentMethodGroup","isActive","initializeAdyenComponent","AdyenCheckout","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","CustomCard","handleOnSubmit","event","defaultErrors","x","useEffect","handleBoxChange","handleAskToConfirmRemoveCard","handleCancelRemoveStoredCard","handleConfirmRemoveStoredCard","data","fetchResponse","postDisableTokenRequest","_","__","state","actions","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","headerRight","h","confirmSection","warning_default","payment_method_item_default","RenderBrandIcons","loader_default","Fragment","Tooltip","info_default","stored_card_component_default","useState","StoredCardContainerComponent","configuration","paymentMethods","storedPaymentMethods","setStoredPaymentMethods","useState","activePaymentMethod","threeDSecureActive","hasStoredPaymentMethods","usePaymentMethodGroup","handleStoredCardRemoved","storedPaymentMethodId","prevStoredPaymentMethods","storedPaymentMethod","h","Fragment","stored_card_component_default","stored_card_container_component_default","h","styleInject","PaymentMethodGroup","children","initialValue","isSolePaymentMethod","hasCard","hasGooglePay","hasApplePay","hasStoredPaymentMethods","h","PaymentMethodGroupContext","payment_method_group_default","Fragment","h","styleInject","h","SuccessIcon","success_default","h","FailureIcon","failure_default","ResultComponent","error","success","usePaymentMethodGroup","i18n","useI18n","h","Fragment","failure_default","success_default","result_component_default","Fragment","h","PaymentMethodsWrapper","children","error","success","usePaymentMethodGroup","h","Fragment","payment_methods_wrapper_default","h","useState","styleInject","InstantPaymentsComponent","configuration","paymentMethods","hasGooglePay","hasApplePay","usePaymentMethodGroup","unavailableMethods","setUnavailableMethods","useState","handleUnavailable","method","prev","validInstantPayments","finalAvailableInstantPayments","payment","visibleInstantPayments","h","paymentMethod","google_pay_button_default","apple_pay_button_default","instant_payments_component_default","determineInitialState","hasCard","hasGooglePay","hasApplePay","storedCount","instantPayments","gpayInStandard","x","apayInStandard","StraumurCheckoutContainer","configuration","paymentMethods","methods","stored","hasStoredPaymentMethods","initialPaymentMethod","isSolePaymentMethod","h","payment_method_group_default","payment_methods_wrapper_default","instant_payments_component_default","stored_card_container_component_default","card_component_default","google_pay_component_default","apple_pay_component_default","result_component_default","straumur_checkout_container_default","AdyenCheckout","translations","I18nService","language","customLocalizations","key","translations","StraumurCheckout","config","determineLocale","I18nService","locale","selector","render","h","RootComponent","loader_default","response","setupPaymentMethods","I18nProvider","language","straumur_checkout_container_default","message","success_default","failure_default","redirectResult","AdyenCheckout","state","_","actions","data","fetchResponse","createDetailsRequest","resultCode","action","newConfig","straumur_checkout_default","children"]}