@qonto/embed-sdk 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +56 -56
- package/dist/mocks/handlers.d.ts +3 -0
- package/dist/mocks/handlers.d.ts.map +1 -1
- package/dist/organizations/index.d.ts +1 -0
- package/dist/organizations/index.d.ts.map +1 -1
- package/dist/organizations/organizations.api.d.ts +14 -2
- package/dist/organizations/organizations.api.d.ts.map +1 -1
- package/dist/organizations/organizations.d.ts +12 -1
- package/dist/organizations/organizations.d.ts.map +1 -1
- package/dist/organizations/organizations.public-api.d.ts +2 -2
- package/dist/organizations/organizations.public-api.d.ts.map +1 -1
- package/dist/organizations/organizations.serializer.d.ts +2 -1
- package/dist/organizations/organizations.serializer.d.ts.map +1 -1
- package/dist/organizations/organizations.types.d.ts +40 -10
- package/dist/organizations/organizations.types.d.ts.map +1 -1
- package/dist/src/organizations/organizations.api.js +1 -1
- package/dist/src/organizations/organizations.js +1 -1
- package/dist/src/organizations/organizations.public-api.js +1 -1
- package/dist/src/organizations/organizations.serializer.js +1 -1
- package/dist/src/ui/ui-elements/transfer-list/create-transfer-list-element.js +1 -0
- package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.js +3 -3
- package/dist/src/ui/ui-elements/transfer-list/transfer-list.utils.js +1 -0
- package/dist/src/ui/ui-elements.js +1 -1
- package/dist/ui/ui-elements/localize/configure-localization.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locale-codes.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/de.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/es.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/fr.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/it.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/nl.d.ts.map +1 -0
- package/dist/ui/ui-elements/localize/generated/locales/pt.d.ts.map +1 -0
- package/dist/ui/ui-elements/{transfer-list.d.ts → transfer-list/create-transfer-list-element.d.ts} +2 -1
- package/dist/ui/ui-elements/transfer-list/create-transfer-list-element.d.ts.map +1 -0
- package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.d.ts +2 -2
- package/dist/ui/ui-elements/transfer-list/transfer-list.d.ts.map +1 -0
- package/dist/ui/ui-elements/transfer-list/transfer-list.events.d.ts.map +1 -0
- package/dist/ui/ui-elements/transfer-list/transfer-list.styles.d.ts.map +1 -0
- package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.utils.d.ts +2 -2
- package/dist/ui/ui-elements/transfer-list/transfer-list.utils.d.ts.map +1 -0
- package/dist/ui/ui-elements.d.ts +0 -1
- package/dist/ui/ui-elements.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src/ui/customizable-components/transfer-list/transfer-list.utils.js +0 -1
- package/dist/src/ui/ui-elements/transfer-list.js +0 -1
- package/dist/ui/customizable-components/index.d.ts +0 -2
- package/dist/ui/customizable-components/index.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/configure-localization.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locale-codes.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/de.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/es.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/fr.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/it.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/nl.d.ts.map +0 -1
- package/dist/ui/customizable-components/localize/generated/locales/pt.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.events.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.styles.d.ts.map +0 -1
- package/dist/ui/customizable-components/transfer-list/transfer-list.utils.d.ts.map +0 -1
- package/dist/ui/ui-elements/transfer-list.d.ts.map +0 -1
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/configure-localization.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locale-codes.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/de.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/es.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/fr.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/it.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/nl.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/localize/generated/locales/pt.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.events.js +0 -0
- /package/dist/src/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.styles.js +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/configure-localization.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locale-codes.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/de.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/es.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/fr.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/it.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/nl.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/localize/generated/locales/pt.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.events.d.ts +0 -0
- /package/dist/ui/{customizable-components → ui-elements}/transfer-list/transfer-list.styles.d.ts +0 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QontoEmbed={})}(this,(function(e){"use strict";class t{constructor(){this.accessToken=null,this.stagingToken=null}static getInstance(){return t.instance||(t.instance=new t),t.instance}setAccessToken(e){this.accessToken=e}getAccessToken(){return this.accessToken}hasAccessToken(){return null!==this.accessToken&&""!==this.accessToken}clearAccessToken(){this.accessToken=null}setStagingToken(e){this.stagingToken=e}getStagingToken(){return this.stagingToken}hasStagingToken(){return null!==this.stagingToken&&""!==this.stagingToken}clearStagingToken(){this.stagingToken=null}}const n=t.getInstance();class a extends Error{constructor(){super(),this.stack=""}toString(){return`${this.name}: ${this.message}`}}class r extends a{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid access token.\nEnsure you have called the initialize function with a valid access token."}}function o(){if(!n.hasAccessToken())throw new r;return n.getAccessToken()}class i extends a{constructor(e){super(),this.name="InvalidParametersError",this.invalidParameters=Array.isArray(e)?e:[e],this.message=`Invalid parameters were passed to the function:\n${this.invalidParameters.map((e=>e)).join("\n")}`}}const s={READY:"qonto.ready"},c={CARD_SEE:"card.see",CARD_SEE_DETAILS:"card.see-details",CARD_ORDER:"card.order",CARD_UNLOCK:"card.unlock",CARD_SHOW_PIN:"card.show.pin",CARD_SET_PIN:"card.set.pin",TRANSFER_SINGLE_CREATE:"transfer.single.create",TRANSFER_BULK_CREATE:"transfer.bulk.create",BENEFICIARIES_TRUST:"beneficiary.trust"},d={PRODUCTION:"production",STAGING:"staging",LOCAL:"local"},l={MASTER:"master",SANDBOX:"sandbox",QA:"qa"},u={EN:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt"},g={PENDING:"pending",PROCESSING:"processing",CANCELED:"canceled",DECLINED:"declined",SETTLED:"settled",FAILED:"failed",COMPLETED:"completed"},f={PASSKEY:"passkey",SMS_OTP:"sms-otp",PAIRED_DEVICE:"paired-device",MOCK:"mock"},p=3e4,h={ACCEPT:"ACCEPT",REJECT:"REJECT"},m={CARD_DISPLAY:"display_card",PAYMENT_LINK_CREATE:"create_payment_link",SEPA_TRANSFER_CREATE:"create_sepa_transfer"};var b=Object.freeze({__proto__:null,ACTIONS:c,ACTIVITY_TAGS:{ATM:"atm",FALLBACK:"fallback",FEES:"fees",FINANCE:"finance",FOOD_AND_GROCERY:"food_and_grocery",GAS_STATION:"gas_station",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",HOTEL_AND_LODGING:"hotel_and_lodging",INSURANCE:"insurance",IT_AND_ELECTRONICS:"it_and_electronics",LEGAL_AND_ACCOUNTING:"legal_and_accounting",LOGISTICS:"logistics",MANUFACTURING:"manufacturing",MARKETING:"marketing",OFFICE_RENTAL:"office_rental",OFFICE_SUPPLY:"office_supply",ONLINE_SERVICE:"online_service",OTHER_EXPENSE:"other_expense",OTHER_INCOME:"other_income",OTHER_SERVICE:"other_service",PENDING:"pending",REFUND:"refund",RESTAURANT_AND_BAR:"restaurant_and_bar",SALES:"sales",SALARY:"salary",SUBSCRIPTION:"subscription",TAX:"tax",TRANSPORT:"transport",TREASURY_AND_INTERCO:"treasury_and_interco",UTILITY:"utility",VOUCHER:"voucher"},AMOUNT_REQUIRING_ATTACHMENTS:p,AUTH_LINK_ACTIONS:m,BENEFICIARY_STATUSES:{PENDING:"pending",VALIDATED:"validated",DECLINED:"declined"},BRANCHES:l,ENVIRONMENTS:d,IFRAME_EVENTS:s,LOCALES:u,MFA_METHODS:f,TRANSACTION_STATUSES:{PENDING:"pending",DECLINED:"declined",COMPLETED:"completed"},TRANSFER_DECLINE_REASONS:{BENEFICIARY_BIC_INVALID:"beneficiary_bic_invalid",BENEFICIARY_IBAN_INVALID:"beneficiary_iban_invalid",BENEFICIARY_STATUS:"beneficiary_status",BENEFICIARY_NETWORK_RULES_ERROR:"beneficiary_network_rules_error",ORGANISATION_COMPLIANCE_REASONS:"organisation_compliance_reasons",DEBIT_ACCOUNT_INSUFFICIENT_FUNDS:"debit_account_insufficient_funds",QONTO_PROCESSING_FAILED:"qonto_processing_failed"},TRANSFER_STATUSES:g,VOP_CHECK_RESULTS:{MATCH_RESULT_MATCH:"MATCH_RESULT_MATCH",MATCH_RESULT_NO_MATCH:"MATCH_RESULT_NO_MATCH",MATCH_RESULT_CLOSE_MATCH:"MATCH_RESULT_CLOSE_MATCH",MATCH_RESULT_NOT_POSSIBLE:"MATCH_RESULT_NOT_POSSIBLE",MATCH_RESULT_UNSPECIFIED:"MATCH_RESULT_UNSPECIFIED"},VOP_DECISIONS:h});class y{constructor(){this.mfaPreference=f.PASSKEY,this.debugMode=!1}static getInstance(){return y.instance||(y.instance=new y),y.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=f.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}}const v=y.getInstance(),_="https://embed.qonto.com",w="https://embed-js{branch}.staging.qonto.co",T="https://embed.dev.qonto.co",k={[d.PRODUCTION]:{IFRAME_BASE_URL:_,IFRAME_URL:`${_}/connect`,THIRD_PARTY_API_URL:"https://thirdparty.qonto.com"},[d.STAGING]:{IFRAME_BASE_URL:w,IFRAME_URL:`${w}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"},[d.LOCAL]:{IFRAME_BASE_URL:T,IFRAME_URL:`${T}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"}};class E{constructor(){this.environment=d.PRODUCTION,this.branch=l.SANDBOX;const e=process.env.QONTO_EMBED_ENVIRONMENT,t=process.env.QONTO_EMBED_BRANCH;this.environment=Object.values(d).includes(e)?e:d.PRODUCTION,this.branch=Object.values(l).includes(t)?t:l.SANDBOX}static getInstance(){return E.instance||(E.instance=new E),E.instance}setEnvironment(e){this.environment=e}getEnvironment(){return this.environment}isProductionEnvironment(){return this.environment===d.PRODUCTION}setBranch(e){this.branch=e}getBranch(){return this.branch}clear(){this.environment=d.PRODUCTION,this.branch=l.MASTER}getEnvironmentUrls(){if(this.environment===d.PRODUCTION)return k.production;{const e=k[this.environment];return Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:n.replace("{branch}",`-${this.branch}`)})),{})}}}const A=E.getInstance(),S={requiresUI:!1};function I(e,{requiresUI:t}=S){const n=e?.uiParentElementId||v.getUIParentElementId();if(t&&!n)throw new i("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");const a=e?.mfaPreference||v.getMFAPreference();if(a){const e=(r=Object.values(f),A.isProductionEnvironment()?r.filter((e=>e!==f.MOCK)):r);if(!e.includes(a))throw new i(`operationSettings.mfaPreference must be one of ${e.join(", ")}`);if(A.isProductionEnvironment()&&a===f.MOCK)throw new i("operationSettings.mfaPreference cannot be set to mock in production environment.")}var r;const o=e?.debugMode||v.getDebugMode();if(void 0!==o&&"boolean"!=typeof o)throw new i("operationSettings.debugMode must be a boolean.");const s=e?.proxyRequestFunction||v.getProxyRequestFunction();if(s&&"function"!=typeof s)throw new i("operationSettings.proxyRequestFunction must be a function.");return{...e,uiParentElementId:n,mfaPreference:a,debugMode:o,proxyRequestFunction:s}}const $=Object.values(u);function R(e){if(!function(e){return $.includes(e)}(e))throw new i(`Unsupported locale: ${e}. The locale must be one of: ${$.join(", ")}.`);return e}function P(e){if(!e?.accessToken&&!e?.operationSettings?.proxyRequestFunction)throw new i("Either operationSettings.proxyRequestFunction or access token is required when calling initialize()");return e?.operationSettings&&I(e.operationSettings),function(e){if(e.environment){if(!["production","staging","local"].includes(e.environment))throw new i('If provided, environment must be either "production" or "staging"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.environment.PRODUCTION" or "constants.environment.STAGING"');if(e.branch&&!["master","sandbox","qa"].includes(e.branch))throw new i('If provided, branch must be either "master", "sandbox" or "qa"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.branch.MASTER" or "constants.environment.SANDBOX" and so on')}}(e),e.locale&&R(e.locale),e}class C{constructor(){this.currentLocale="en"}static getInstance(){return C.instance||(C.instance=new C),C.instance}setLocale(e){this.currentLocale=e}getLocale(){return this.currentLocale}setDefaultLocale(){this.currentLocale="en"}}const L=C.getInstance();const N={initialize:function(e){const{accessToken:t,stagingToken:a,operationSettings:r,environment:o,branch:i,locale:s}=P(e);t&&n.setAccessToken(t),a&&n.setStagingToken(a),s&&L.setLocale(s),r&&v.setSettings(r),o&&(A.setEnvironment(o),i&&A.setBranch(i))},logout:function(){n.clearAccessToken(),n.clearStagingToken(),L.setDefaultLocale(),v.clearSettings()},constants:b},{initialize:q,logout:O,constants:D}=N;class U extends a{constructor(e){super();const t=Array.isArray(e)?e.join("\n"):e;this.name="EmbedApiError",this.message=`The call to the Embed API failed with the following errors:\n${t}`}}function x(){return"undefined"!=typeof window&&"undefined"!=typeof document}function M(){return!x()}function z({accessToken:e,stagingToken:t,idempotencyKey:a,mfaPreference:r}){const o=new Headers;o.append("Authorization",`Bearer ${e}`);const i=t||n.getStagingToken();i&&o.append("X-Qonto-Staging-Token",i),a&&o.append("X-Qonto-Idempotency-Key",a);const s=r||v.getMFAPreference();return s&&o.append("X-Qonto-2fa-Preference",s),o.append("Content-Type","application/json"),o.append("Accept-Language",L.getLocale()),o}async function j({path:e,options:t}){const n=`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${e}`,a=await fetch(n,{...t,headers:z(t.headers),body:t.body?JSON.stringify(t.body):void 0});if(204===a.status)return;const r=await a.json();if(!a.ok)throw r.errors?new U(r.errors.map((e=>`${e.code}: ${e.detail}`))):new U(`${r.code}: ${r.detail}`);return r}function F(e){const t={method:e.options.method,headers:e.options.headers,path:e.path,payload:e.options?.body},n=JSON.stringify(t);return a=n,M()?Buffer.from(a).toString("base64"):btoa(a);var a}function B(e){return JSON.parse((t=e,M()?Buffer.from(t,"base64").toString("utf-8"):atob(t)));var t}function H({accessToken:e,stagingToken:t,action:n,callbackUrl:a}){const r={post_authn_action:n};return a&&(r.callback_url=a),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:e,stagingToken:t},body:{embed_auth_link:r}}}}function G({membershipId:e,accessToken:t,stagingToken:n}){return{path:e?`/v2/cards?holder_ids[]=${e}`:"/v2/cards",options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function K({cardId:e,accessToken:t,stagingToken:n}){return{path:`/v2/cards?ids[]=${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function Y({accessToken:e,stagingToken:t}){return H({accessToken:e,stagingToken:t,action:m.CARD_DISPLAY})}var V;!function(e){e.PENDING="pending",e.ONHOLD="onhold",e.ORDER_CANCELED="order_canceled",e.LIVE="live",e.PAUSED="paused",e.STOLEN="stolen",e.LOST="lost",e.PIN_BLOCKED="pin_blocked",e.DELETED="deleted",e.PRE_EXPIRED="pre_expired",e.EXPIRED="expired",e.DISCARDED="discarded",e.SHIPPED_LOST="shipped_lost",e.ABUSIVE="abusive"}(V||(V={}));const W={TRANSPORT:"transport",RESTAURANT_AND_BAR:"restaurant_and_bar",FOOD_AND_GROCERY:"food_and_grocery",IT_AND_ELECTRONICS:"it_and_electronics",UTILITY:"utility",TAX:"tax",LEGAL_AND_ACCOUNTING:"legal_and_accounting",ATM:"atm",OFFICE_SUPPLY:"office_supply",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",FINANCE:"finance"};var Z,J;function Q(e,t){const n=t.filter((t=>t.requiredIfPresent?!e[t.name]&&e[t.requiredIfPresent]:void 0===e[t.name])).map((e=>e.name));if(n.length>0)throw new i(n.map((e=>`Missing required parameter: ${e}`)))}function X(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"string"!=typeof e)).map((([e])=>`${e} must be a string`))}function ee(e){return Object.entries(e).filter((([,e])=>void 0!==e&&!1!==e&&!0!==e)).map((([e])=>`${e} must be a boolean`))}function te(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"number"!=typeof e)).map((([e])=>`${e} must be a number`))}!function(e){e.VIRTUAL="virtual"}(Z||(Z={})),function(e){e.METAL="metal",e.PLUS="plus",e.STANDARD="standard"}(J||(J={}));const ne=[{name:"organizationId"},{name:"membershipId"},{name:"bankAccountId"},{name:"monthlyLimit"},{name:"cardLevel"}],ae=[...ne,{name:"atmDailyLimit",requiredIfPresent:"hasAtmDailyLimit"},{name:"hasAtmDailyLimit",requiredIfPresent:"hasAtmOption"},{name:"atmMonthlyLimit",requiredIfPresent:"hasAtmOption"},{name:"shipToBusiness"},{name:"cardLevel"}];function re(e){if(!e)throw new i("cardSettings parameter is required for the called function");return"virtual"===e.cardLevel?function(e){return Q(e,ne),function(e){const{membershipId:t,organizationId:n,bankAccountId:a,hasDailyLimit:r,hasTransactionLimit:o,monthlyLimit:s,dailyLimit:c,transactionLimit:d,activeDays:l,categories:u,cardLevel:g}=e,f=function(e){return"virtual"!==e?['cardLevel must be "virtual"']:[]}(g),p=X({membershipId:t,organizationId:n,bankAccountId:a}),h=ee({hasDailyLimit:r,hasTransactionLimit:o}),m=te({monthlyLimit:s,dailyLimit:c,transactionLimit:d}),b=oe(l),y=ie(u),v=[...f,...p,...h,...m,...b,...y];if(v.length>0)throw new i(v)}(e),e}(e):function(e){Q(e,ae),function(e){const{membershipId:t,organizationId:n,bankAccountId:a,hasDailyLimit:r,hasTransactionLimit:o,monthlyLimit:s,dailyLimit:c,transactionLimit:d,activeDays:l,categories:u,cardLevel:g,hasNfcOption:f,hasForeignPaymentOption:p,hasOnlinePaymentOption:h,shipToBusiness:m,hasAtmOption:b,hasAtmDailyLimit:y,atmDailyLimit:v,atmMonthlyLimit:_,address:w,cardDesign:T,typeOfPrint:k}=e,E=function(e){return Object.values(J).includes(e)?[]:['cardLevel must be one of "standard", "plus", "metal"']}(g),A=function(e){const t=null!=e&&"string"!=typeof e,n=!["print","embossed",void 0,null].includes(e);return t||n?['typeOfPrint must be one of "print", "embossed" or null']:[]}(k),S=X({membershipId:t,organizationId:n,bankAccountId:a}),I=ee({hasDailyLimit:r,hasTransactionLimit:o,hasAtmOption:b,hasNfcOption:f,hasForeignPaymentOption:p,hasOnlinePaymentOption:h,hasAtmDailyLimit:y,shipToBusiness:m}),$=te({monthlyLimit:s,dailyLimit:c,transactionLimit:d,atmDailyLimit:v,atmMonthlyLimit:_}),R=oe(l),P=ie(u),C=function(e){return["undefined","string"].includes(typeof e)?[]:["cardDesign must be a string"]}(T),L=function(e,t){if(t)return[];return!e||e.contactName&&e.firstLine&&e.zipCode&&e.city&&e.country?[]:["address must contain at least contactName, firstLine, zipCode, city and country properties"]}(w,m),N=[...E,...S,...I,...$,...R,...P,...A,...C,...L];if(N.length>0)throw new i(N)}(e)}(e)}function oe(e){const t=!Array.isArray(e)||!e.every((e=>Number.isInteger(e)&&e>0&&e<8));return void 0!==e&&t?["activeDays must be an array of integers between 1 and 7"]:[]}function ie(e){const t=!Array.isArray(e)||e.some((e=>"string"!=typeof e));return void 0!==e&&t?["categories must be an array of strings"]:[]}class se extends a{constructor(e){super(),this.name="EmbedOperationError",this.message=e}}const ce=[];for(let e=0;e<256;++e)ce.push((e+256).toString(16).slice(1));let de;const le=new Uint8Array(16);var ue={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ge(e,t,n){if(ue.randomUUID&&!e)return ue.randomUUID();const a=(e=e||{}).random??e.rng?.()??function(){if(!de){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");de=crypto.getRandomValues.bind(crypto)}return de(le)}();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=15&a[6]|64,a[8]=63&a[8]|128,function(e,t=0){return(ce[e[t+0]]+ce[e[t+1]]+ce[e[t+2]]+ce[e[t+3]]+"-"+ce[e[t+4]]+ce[e[t+5]]+"-"+ce[e[t+6]]+ce[e[t+7]]+"-"+ce[e[t+8]]+ce[e[t+9]]+"-"+ce[e[t+10]]+ce[e[t+11]]+ce[e[t+12]]+ce[e[t+13]]+ce[e[t+14]]+ce[e[t+15]]).toLowerCase()}(a)}function fe({actionId:e,actionData:t}){const n=v.getMFAPreference();return{actionId:e,actionData:{...t,scaPreference:t.scaPreference||n,idempotencyKey:t.idempotencyKey||ge()}}}class pe{constructor(e){this.options=e,this.iframe=null,this.parentElement=null,this.messageListeners=new Map,this.defaultTimeout=3e4;const t=new URL(e.iframeUrl);this.targetOrigin=`${t.protocol}//${t.host}`}async initialize(){if(this.iframe)return this;if(this.parentElement=document.getElementById(this.options.parentElementId),!this.parentElement)throw new se(`Could not install the authentication UI because the parent element with id ${this.options.parentElementId} was not found.\nPlease make sure to pass a valid parentElementId when calling the method.`);return new Promise(((e,t)=>{this.iframe=document.createElement("iframe"),this.iframe.src=this.options.iframeUrl,this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none";const n=this.options.timeout||this.defaultTimeout,a=setTimeout((()=>{window.removeEventListener("message",r),t(new se(`Could not install the authentication UI because the timeout of ${n}ms was reached.\nPlease make sure the application can reach the Internet.`))}),n),r=t=>{t.data.eventId===s.READY&&(clearTimeout(a),window.removeEventListener("message",r),e(this))};window.addEventListener("message",r),this.parentElement?.appendChild(this.iframe)}))}postMessage(e){if(!this.iframe||!this.iframe.contentWindow)return Promise.reject(new se("Attempted to perform an Embed operation without having the authentication UI initialized."));const t=fe(e);return new Promise(((e,n)=>{const a=r=>{if(r.data?.actionId===t.actionId){if("error"===r.data.status)return this.removeMessageListener(t.actionId,a),n(new se(`An error occurred when performing the action ${t.actionId}.\n${JSON.stringify(r.data.payload)}`));this.removeMessageListener(t.actionId,a),e(r.data.payload)}};this.addMessageListener(t.actionId,a),this.iframe?.contentWindow?.postMessage(t,this.targetOrigin)}))}addMessageListener(e,t){this.messageListeners.has(e)||this.messageListeners.set(e,[]);this.messageListeners.get(e).push(t),window.addEventListener("message",t)}removeMessageListener(e,t){const n=this.messageListeners.get(e);if(n){const e=n.indexOf(t);-1!==e&&(n.splice(e,1),window.removeEventListener("message",t))}}destroy(){this.messageListeners.forEach((e=>{e.forEach((e=>{window.removeEventListener("message",e)}))})),this.messageListeners.clear(),this.iframe&&this.parentElement&&(this.parentElement.removeChild(this.iframe),this.iframe=null)}}function he({accessToken:e,stagingToken:t,locale:n,debugMode:a}){const r=a||!1,o=n||L.getLocale(),i=A.getEnvironmentUrls().IFRAME_URL,s=t?`;staging_token=${encodeURIComponent(t)}`:"";return`${i}?debug=${r}&lang=${encodeURIComponent(o)}#access_token=${encodeURIComponent(e)}${s}`}function me({parentElementId:e,iframeUrl:t}){return new pe({parentElementId:e,iframeUrl:t}).initialize()}function be(e){return"virtual"===e.cardLevel?function(e){const t=ve(e.categories);return{actionId:c.CARD_ORDER,actionData:{idempotencyKey:ge(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel}}}}}(e):function(e){const t=ve(e.categories);return{actionId:c.CARD_ORDER,actionData:{idempotencyKey:ge(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel,card_design:e.cardDesign,..."plus"===e.cardLevel&&{type_of_print:e.typeOfPrint},ship_to_business_address:e.shipToBusiness,atm_option:e.hasAtmOption,nfc_option:e.hasNfcOption,foreign_option:e.hasForeignPaymentOption,online_option:e.hasOnlinePaymentOption,atm_daily_limit:e.atmDailyLimit,atm_monthly_limit:e.atmMonthlyLimit,...!e.shipToBusiness&&{address:{contact_name:e.address?.contactName,first_line:e.address?.firstLine,second_line:e.address?.secondLine,third_line:e.address?.thirdLine,zipcode:e.address?.zipCode,city:e.address?.city,country:e.address?.country}}}}}}}(e)}function ye(e){return{id:e.id,nickname:e.nickname,embossedName:e.embossed_name,status:e.status,maskPan:e.mask_pan,expMonth:parseInt(e.exp_month,10),expYear:parseInt(e.exp_year,10),lastActivityAt:new Date(e.last_activity_at),lastDigits:e.last_digits,shipToBusiness:e.ship_to_business,atmOption:e.atm_option,atmDailyLimitOption:e.atm_daily_limit_option,nfcOption:e.nfc_option,onlineOption:e.online_option,foreignOption:e.foreign_option,atmMonthlyLimit:e.atm_monthly_limit,atmMonthlySpent:e.atm_monthly_spent,atmDailyLimit:e.atm_daily_limit,atmDailySpent:e.atm_daily_spent,paymentMonthlyLimit:e.payment_monthly_limit,paymentMonthlySpent:e.payment_monthly_spent,paymentDailyLimit:e.payment_daily_limit,paymentDailySpent:e.payment_daily_spent,paymentDailyLimitOption:e.payment_daily_limit_option,paymentTransactionLimit:e.payment_transaction_limit,paymentTransactionLimitOption:e.payment_transaction_limit_option,activeDays:e.active_days,holderId:e.holder_id,bankAccountId:e.bank_account_id,organizationId:e.organization_id,updatedAt:new Date(e.updated_at),createdAt:new Date(e.created_at),shippedAt:new Date(e.shipped_at),cardType:e.card_type,cardLevel:e.card_level,paymentLifespanLimit:e.payment_lifespan_limit,paymentLifespanSpent:e.payment_lifespan_spent,preExpiresAt:new Date(e.pre_expires_at),categories:e.categories,renewed:e.renewed,renewal:e.renewal,...e.parent_card_summary&&{parentCardSummary:{id:e.parent_card_summary.id,lastDigits:e.parent_card_summary.last_digits}},hadOperation:e.had_operation,hadPinOperation:e.had_pin_operation,cardDesign:e.card_design,typeOfPrint:e.type_of_print,upsold:e.upsold,upsell:e.upsell,discardOn:new Date(e.discard_on),reordered:e.reordered}}function ve(e){const t=Object.values(W);return(e||[]).filter((e=>t.includes(e)))}const _e="--qonto-embed";function we(e){return!e.href||e.href.startsWith(window.location.origin)}function Te(e){return"CSSStyleRule"===e.constructor.name}function ke(e=_e){return x()?function(e,t){return[...e].filter(we).reduce(((e,n)=>[...n.cssRules].filter(Te).reduce(((e,n)=>{if("style"in n){const a=[...n.style].map((e=>[e.trim(),n.style.getPropertyValue(e).trim()])).filter((([e])=>e.startsWith(t))).reduce(((e,[n,a])=>({...e,[n.replace(`${t}-`,"")]:a})),{});return{...e,...a}}return e}),e)),{})}(document.styleSheets,e):{}}async function Ee({decorationParams:e,operationSettings:t,cardIframeUrl:n}){const{cardId:a,allowPinReveal:r,allowBlocking:o}=e,{uiParentElementId:i,debugMode:s}=t,c=function(e,t){const n=new URL(e);n.searchParams.set("cardId",t.cardId),"boolean"==typeof t.allowPinReveal&&n.searchParams.set("canSeePin",t.allowPinReveal.toString()),"boolean"==typeof t.allowBlocking&&n.searchParams.set("canBlock",t.allowBlocking.toString()),!0===t.debugMode&&n.searchParams.set("debug",t.debugMode.toString());const a=ke(_e);return Object.keys(a).length>0&&n.searchParams.set("customization",JSON.stringify(a)),n.toString()}(n,{cardId:a,allowPinReveal:r,allowBlocking:o,debugMode:s}),d=await me({iframeUrl:c,parentElementId:i});return{destroyEmbedUI:()=>{d.destroy()}}}const Ae={getCards:async function(e){try{const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new i("membershipId must be a string");const{proxyRequestFunction:n,stagingToken:a}=I(e?.operationSettings||{});if(n){const e=F(G({membershipId:t,stagingToken:a})),r=await n(e);return B(r).body.cards.map((e=>ye(e)))}{const n=e?.operationSettings?.accessToken||o(),r=await async function({membershipId:e,accessToken:t,stagingToken:n}){const a=G({membershipId:e,accessToken:t,stagingToken:n}),{cards:r}=await j(a);return r}({membershipId:t,accessToken:n,stagingToken:a});return r.map((e=>ye(e)))}}catch(e){return Promise.reject(e)}},getCard:async function({cardSettings:e,operationSettings:t}){try{!function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId parameter is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t)}(e);const n=e.cardId,{proxyRequestFunction:a,stagingToken:r}=I(t||{});if(a){const e=F(K({cardId:n,stagingToken:r})),t=await a(e),o=B(t).body.cards;if(Array.isArray(o)&&o.length>0)return ye(o[0]);throw new i("Unable to retrieve card data")}{const e=t?.accessToken||o(),a=await async function({cardId:e,accessToken:t,stagingToken:n}){const a=K({cardId:e,accessToken:t,stagingToken:n}),{cards:r}=await j(a);return r[0]}({cardId:n,accessToken:e,stagingToken:r});return ye(a)}}catch(e){return Promise.reject(e)}},orderCard:async function(e){try{const t=o(),{uiParentElementId:a,debugMode:r}=I(e.operationSettings,{requiresUI:!0});re(e.cardSettings);const i=he({accessToken:t,stagingToken:n.getStagingToken()||void 0,debugMode:r}),s=await me({iframeUrl:i,parentElementId:a}),c=be(e.cardSettings),d=await s.postMessage(c);return s.destroy(),ye(d)}catch(e){return Promise.reject(e)}},unlockCard:async function(e){try{const t=o(),{uiParentElementId:a,debugMode:r}=I(e.operationSettings,{requiresUI:!0});!function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t)}(e.cardSettings);const s=he({accessToken:t,stagingToken:n.getStagingToken()||void 0,debugMode:r}),d=await me({iframeUrl:s,parentElementId:a}),l=function(e){return{actionId:c.CARD_UNLOCK,actionData:{body:{cardId:e.cardSettings.cardId}}}}(e),u=await d.postMessage(l);return d.destroy(),ye(u)}catch(e){return Promise.reject(e)}},displayCard:async function(e){try{const{uiParentElementId:t,accessToken:n,stagingToken:a,debugMode:r,mfaPreference:s,proxyRequestFunction:c}=I(e.operationSettings,{requiresUI:!0});if(function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t);let n={};void 0!==e.allowPinReveal&&(n={allowPinReveal:e.allowPinReveal}),void 0!==e.allowBlocking&&(n={...n,allowBlocking:e.allowBlocking});const a=ee(n);if(a.length>0)throw new i(a)}(e.cardSettings),c){const n=F(Y({stagingToken:a})),o=await c(n),i=B(o).body;return Ee({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:r},cardIframeUrl:i.url})}{const i=n||o(),c=await async function(e){const t=Y(e),{embed_auth_link:n}=await j(t);return n}({...e.cardSettings,accessToken:i,stagingToken:a});return Ee({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:r,mfaPreference:s},cardIframeUrl:c.url})}}catch(e){return Promise.reject(e)}}},Se=Ae;function Ie(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function $e({endpointUrl:e,paginationSettings:t}){return function({url:e,searchParams:t}){const n=new URL(e.toString());for(const[e,a]of t.entries())n.searchParams.append(e,a);return n}({url:new URL(e),searchParams:Ie(t)})}function Re(e){if(e)return{totalItems:e?.total_count,totalPages:e?.total_pages,currentPage:e?.current_page,itemsPerPage:e?.per_page,previousPage:e?.prev_page||null,nextPage:e?.next_page||null}}function Pe(e){return{id:e.id,name:e.name,email:e.email,activityTag:e.activity_tag,iban:e.iban,bic:e.bic,currency:e.currency,status:e.status,trusted:e.trusted,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function Ce(e){return{name:e.name,...e.email&&{email:e.email},...e.activityTag&&{activity_tag:e.activityTag},iban:e.iban,...e.bic&&{bic:e.bic}}}const Le="/v2/sepa/beneficiaries";function Ne({paginationSettings:e,accessToken:t,stagingToken:n}){const a={method:"GET",headers:{accessToken:t,stagingToken:n}},r=Ie(e),o=r.size?`?${r.toString()}`:"";return{path:`${Le}${o}`,options:a}}function qe({beneficiaryId:e,accessToken:t,stagingToken:n}){return{path:`${Le}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}async function Oe({accessToken:e,stagingToken:t,beneficiaryId:n}){const a=qe({beneficiaryId:n,accessToken:e,stagingToken:t}),{beneficiary:r}=await j(a);return r}function De({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a=ge()}){return{path:Le,options:{method:"POST",headers:{accessToken:t,stagingToken:n,idempotencyKey:a},body:{beneficiary:Ce(e)}}}}function Ue({beneficiaryIds:e,accessToken:t,stagingToken:n}){return{path:`${Le}/untrust`,options:{method:"PATCH",headers:{accessToken:t,stagingToken:n},body:{ids:e}}}}function xe({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}){const{name:o,email:i,activityTag:s}=e,c={method:"PATCH",headers:{accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r},body:{beneficiary:{name:o,email:i,activity_tag:s}}};return{path:`${Le}/${e.id}`,options:c}}const Me=[{name:"name"},{name:"iban"}];const ze={getBeneficiaries:async function(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{});if(n){const e=F(Ne({paginationSettings:r})),t=B(await n(e)),a=t.body.beneficiaries.map((e=>Pe(e))),o=Re(t.body.meta);return{beneficiaries:a,...o?{meta:o}:{}}}{const e=a||o(),n=await async function({paginationSettings:e,accessToken:t,stagingToken:n}){const a=Ne({paginationSettings:e,accessToken:t,stagingToken:n}),{beneficiaries:r,meta:o}=await j(a);return{beneficiaries:r,meta:o}}({accessToken:e,stagingToken:t,paginationSettings:r}),i=n.beneficiaries.map((e=>Pe(e))),s=Re(n.meta);return{beneficiaries:i,...s?{meta:s}:{}}}},getBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new i("beneficiaryId must be a string");return e}(e?.beneficiaryId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(qe({beneficiaryId:n}));return Pe(B(await a(e)).body.beneficiary)}{const e=r||o();return Pe(await Oe({beneficiaryId:n,accessToken:e,stagingToken:s}))}},addBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiary parameter is required for the called function");if("object"!=typeof e)throw new i("beneficiary must be an object");Q(e,Me);const t=X({name:e.name,iban:e.iban,email:e.email,activityTag:e.activityTag,bic:e.bic});if(t.length>0)throw new i(t);return e}(e),{proxyRequestFunction:a,accessToken:r,stagingToken:s,idempotencyKey:c}=I(t||{});if(a){const e=F(De({beneficiary:n,idempotencyKey:c}));return Pe(B(await a(e)).body.beneficiary)}{const e=r||o(),t=await async function({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a=ge()}){const r=De({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a}),{beneficiary:o}=await j(r);return o}({beneficiary:n,accessToken:e,stagingToken:s,idempotencyKey:c});return Pe(t)}},updateBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){const{id:t,name:n,email:a,activityTag:r}=e||{};if(!t)throw new i("Invalid parameters were passed to the function:\nA beneficiary ID is required for the called function");if(!n&&!a&&!r)throw new i("Invalid parameters were passed to the function:\nAt least one of the following properties must be provided: name, email, activityTag");const o=X({name:n,email:a,activityTag:r});if(o.length>0)throw new i(o);return{id:t,name:n,email:a,activityTag:r}}(e),{stagingToken:a,idempotencyKey:r,mfaPreference:s,proxyRequestFunction:c}=I(t),d={beneficiaryParamsBeingEdited:n,idempotencyKey:r,mfaPreference:s};if(c){const e=F(xe(d));return Pe(B(await c(e)).body.beneficiary)}{const e=t?.accessToken||o(),n=await async function({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}){const o=xe({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}),{beneficiary:i}=await j(o);return i}({...d,accessToken:e,stagingToken:a});return Pe(n)}},untrustBeneficiaries:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiaryIds parameter is required for the called function");if(!Array.isArray(e)||!e.every((e=>"string"==typeof e)))throw new i("beneficiaryIds must be an array of strings");return e}(e?.beneficiaryIds),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Ue({beneficiaryIds:n}));return B(await a(e)).body.beneficiaries.map(Pe)}{const e=r||o(),t=await async function({beneficiaryIds:e,accessToken:t,stagingToken:n}){const a=Ue({beneficiaryIds:e,accessToken:t,stagingToken:n}),{beneficiaries:r}=await j(a);return r}({beneficiaryIds:n,accessToken:e,stagingToken:s});return t.map(Pe)}}},je=ze;function Fe(e){return{id:e.id,initiatorId:e.initiator_id,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),totalCount:Number(e.total_count),completedCount:Number(e.completed_count),failedCount:Number(e.failed_count),pendingCount:Number(e.pending_count),results:e.results.map((e=>({clientTransferId:e.client_transfer_id,transferId:e.transfer_id??null,errors:e.errors||null,status:e.status})))}}function Be(e){return{id:e.id,response:{matchResult:e.response.match_result,matchedName:e.response.matched_name}}}function He(e){return{id:e.id,initiatorId:e.initiator_id,bankAccountId:e.bank_account_id,amount:Number(e.amount),amountCents:Number(e.amount_cents),amountCurrency:e.amount_currency,status:e.status,beneficiaryId:e.beneficiary_id,reference:e.reference,note:e.note,declinedReason:e.declined_reason,scheduledDate:new Date(e.scheduled_date),createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),processedAt:new Date(e.processed_at),completedAt:new Date(e.completed_at),transactionId:e.transaction_id}}function Ge(e){const t=e.beneficiaryId||e.beneficiary?.id;return{bank_account_id:e.bankAccountId,beneficiary_id:t,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentIds?{attachment_ids:e.attachmentIds}:{}}}function Ke(e){return{name:e.name,iban:e.iban}}const Ye="/v2/sepa",Ve=`${Ye}/transfers`;function We({paginationSettings:e,accessToken:t,stagingToken:n}){const a={method:"GET",headers:{accessToken:t,stagingToken:n}},r=Ie(e),o=r.size?`?${r.toString()}`:"";return{path:`${Ve}${o}`,options:a}}function Ze({sepaTransferId:e,accessToken:t,stagingToken:n}){return{path:`${Ve}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function Je({sepaTransferId:e,accessToken:t,stagingToken:n}){return{path:`${Ve}/${e}/cancel`,options:{method:"POST",headers:{accessToken:t,stagingToken:n}}}}async function Qe({sepaPayee:e,accessToken:t,stagingToken:n}){const a=function({sepaPayee:e,accessToken:t,stagingToken:n}){return{path:`${Ye}/verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:n},body:{beneficiary_name:e.name,iban:e.iban}}}}({sepaPayee:e,accessToken:t,stagingToken:n});return await j(a)}const Xe="/v2/sepa/bulk_transfers";async function et({sepaPayees:e,accessToken:t,stagingToken:n}){const a=function({sepaPayees:e,accessToken:t,stagingToken:n}){return{path:`${Ye}/bulk_verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:n},body:{requests:e.map(Ke)}}}}({sepaPayees:e,accessToken:t,stagingToken:n});return await j(a)}function tt(e){if(!e)throw new i("bulkTransferSettings parameter is required for the called function.");if(!e.bankAccountId)throw new i("bankAccountId is required");if(!Array.isArray(e.bulkTransfers))throw new i("bulkTransfers must be an array");if(e.bulkTransfers.length>400)throw new i("Maximum of 400 bulk transfers allowed");return e.bulkTransfers.forEach(((e,t)=>{!function(e,t){if(!e)throw new i(`Invalid bulkTransfer at index ${t}: bulkTransfer object is required`);if(!e.beneficiary)throw new i(`Invalid bulkTransfer at index ${t}: Beneficiary details must be provided in the bulkTransferSettings.beneficiary field`);if(!e.beneficiary.iban)throw new i(`Invalid bulkTransfer at index ${t}: IBAN is required as part of the beneficiary details`);if(!e.beneficiary.name)throw new i(`Invalid bulkTransfer at index ${t}: Beneficiary name is required as part of the beneficiary details`);const n=X({reference:e.reference,clientTransferId:e.clientTransferId,note:e.note}),a=te({amount:e.amount}),r=[...n,...a].flat();if(r.length>0)throw new i(r);if(e.amount>p&&(!e.attachmentsIds||0===e.attachmentsIds.length))throw new i(`Invalid bulkTransfer at index ${t}: Attachments are required for transfers over €30000`)}(e,t)})),e}const nt="browser",at="server";class rt extends Error{constructor(e){switch(super(),this.name="InvalidRuntimeError",e){case nt:this.message="This code is running in a browser environment, but it is expected to run in a server environment.";break;case at:this.message="This code is running in a server environment, but it is expected to run in a browser environment.";break;default:this.message="This code is not expected to run in this environment. Check if the function was server-only or browser-only."}}}const ot=[{name:"bankAccountId"},{name:"reference"},{name:"amount"}];function it(e,t){const n=t?.locale||L.getLocale(),a=new URL(e);return n&&a.searchParams.append("lang",n),t?.mfaPreference&&a.searchParams.append("mfaPreference",t.mfaPreference),t?.idempotencyKey&&a.searchParams.append("idempotencyKey",t.idempotencyKey),a.toString()}function st(e){return{url:e.url,postAuthAction:e.post_authn_action,callbackUrl:e.callback_url,expiresAt:e.expired_at,usedAt:e.used_at}}const ct={request:async function({requestSettings:e,operationSettings:t}){!function(e){if(!e||"object"!=typeof e)throw new i("requestSettings must be an object");const t=e,{action:n,callbackUrl:a}=e;Q(t,[{name:"action"}]);const r=X(t),o=Object.values(m);if(o.includes(n)||r.push(`action must be one of ${o.join(", ")}`),r.length>0)throw new i(r);if(void 0!==a&&""===a.trim())throw new i("callbackUrl cannot be empty")}(e);const{proxyRequestFunction:n,stagingToken:a}=I(t||{});if(n){const t=F(H({stagingToken:a,action:e.action,callbackUrl:e.callbackUrl}));return st(B(await n(t)).body)}{const n=t?.accessToken||o();return st(await async function(e){const t=H({accessToken:e.accessToken,stagingToken:e.stagingToken,action:e.action,callbackUrl:e.callbackUrl}),{embed_auth_link:n}=await j(t);return{url:n.url,post_authn_action:n.post_authn_action,callback_url:n.callback_url,expired_at:n.expired_at,used_at:n.used_at}}({accessToken:n,stagingToken:a,action:e.action,callbackUrl:e.callbackUrl}))}}};async function dt(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{});if(n){const e=F(We({paginationSettings:r})),t=B(await n(e)),a=t.body.transfers.map(He),o=Re(t.body.meta);return{transfers:a,...o?{meta:o}:{}}}{const e=a||o(),n=await async function({accessToken:e,stagingToken:t,paginationSettings:n}){const a=We({paginationSettings:n,accessToken:e,stagingToken:t}),{transfers:r,meta:o}=await j(a);return{transfers:r,meta:o}}({accessToken:e,stagingToken:t,paginationSettings:r}),i=n.transfers.map(He),s=Re(n.meta);return{transfers:i,...s?{meta:s}:{}}}}const lt={getSepaTransfers:dt,getSepaTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("sepaTransferId parameter is required for the called function");if(e&&"string"!=typeof e)throw new i("sepaTransferId must be a string");return e}(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Ze({sepaTransferId:n}));return He(B(await a(e)).body.transfer)}{const e=r||o(),t=await async function({accessToken:e,stagingToken:t,sepaTransferId:n}){const a=Ze({sepaTransferId:n,accessToken:e,stagingToken:t}),{transfer:r}=await j(a);return r}({sepaTransferId:n,accessToken:e,stagingToken:s});return He(t)}},createSepaTransfer:async function*({sepaTransferSettings:e,operationSettings:t}){const a=t?.accessToken||o(),r=t?.stagingToken||n.getStagingToken(),s=t?.idempotencyKey||ge();let d;!function(e){if(!e)throw new i("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new i("sepaTransferSettings must be an object");if(!e.beneficiaryId&&!e.beneficiary)throw new i("Either beneficiaryId or beneficiary must be provided");const t=X({beneficiaryId:e.beneficiaryId});if(t.length>0)throw new i(t)}(e);const l=await async function({sepaTransferSettings:e,operationSettings:t}){return e?.beneficiary?e.beneficiary:Pe(await Oe({beneficiaryId:e?.beneficiaryId,accessToken:t?.accessToken,stagingToken:t?.stagingToken}))}({sepaTransferSettings:e,operationSettings:{accessToken:a,stagingToken:r||void 0}}),u={name:l.name,iban:l.iban},g=await Qe({sepaPayee:u,accessToken:a,stagingToken:r||void 0}),f=yield(m=g,{matchResult:m.match_result,matchedName:m.matched_name});var m;let b;if("string"==typeof f){if(f===h.REJECT)return}else{if(f.vopDecision===h.REJECT)return;b=f.sepaTransferSettings}const y={...e,...b};!function(e){if(!e)throw new i("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new i("sepaTransferSettings must be an object");Q(e,ot);const t=[...X({bankAccountId:e.bankAccountId,note:e.note,reference:e.reference}),...te({amount:e.amount})].flat();if(t.length>0)throw new i(t);if(e.amount>p&&(!e.attachmentIds||0===e.attachmentIds.length))throw new i("Attachments are required for transfers over €30,000")}(y);const v={...y,beneficiary:l};if(v.beneficiary?.trusted)d=await async function({transfer:e,vopProofToken:t,accessToken:n,stagingToken:a,idempotencyKey:r}){const o=Ge(e),i={method:"POST",headers:z({accessToken:n,stagingToken:a,idempotencyKey:r}),body:JSON.stringify({transfer:o,vop_proof_token:t})},s=`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Ve}`,c=await fetch(s,i),d=await c.json();if(d.errors)throw new U(d.errors.map((e=>`${e.code}: ${e.detail}`)));return d.transfer}({transfer:v,vopProofToken:g.proof_token.token,accessToken:a,stagingToken:r||void 0,idempotencyKey:s});else{if(!x())throw new rt(nt);const{uiParentElementId:e,debugMode:n}=I(t,{requiresUI:!0});let o;try{const t=he({accessToken:a,stagingToken:r||void 0,debugMode:n});o=await me({iframeUrl:t,parentElementId:e});const i=Ge(v);d=await o.postMessage(fe({actionId:c.TRANSFER_SINGLE_CREATE,actionData:{body:{transfer:{...i}},idempotencyKey:s}}))}finally{o?.destroy()}}return He(d)},cancelSepaTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("sepaTransferId parameter is required for the called function");if("string"!=typeof e)throw new i("sepaTransferId must be a string");return e}(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Je({sepaTransferId:n}));B(await a(e))}else{const e=r||o();await async function({sepaTransferId:e,accessToken:t,stagingToken:n}){const a=Je({sepaTransferId:e,accessToken:t,stagingToken:n});await j(a)}({sepaTransferId:n,accessToken:e,stagingToken:s})}},getSepaTransferCreationFlowLink:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e||!e.callbackUrl)throw new i("callbackUrl parameter is required for the getSepaTransferCreationFlowLink function");if("string"!=typeof e.callbackUrl)throw new i("callbackUrl must be a string");return e.callbackUrl}(e),{proxyRequestFunction:a,stagingToken:r,accessToken:s}=I(t||{}),c=a?{proxyRequestFunction:a}:{stagingToken:r,accessToken:s||o()},d=await ct.request({requestSettings:{action:m.SEPA_TRANSFER_CREATE,callbackUrl:n},operationSettings:c});return{...d,url:it(d.url,t)}},bulkTransfers:{getBulkTransfers:async function(e){const{operationSettings:t}=e||{},n=t?.accessToken||o(),{stagingToken:a,paginationSettings:r}=I(t||{}),i=await async function({accessToken:e,stagingToken:t,paginationSettings:n}){const a={method:"GET",headers:z({accessToken:e,stagingToken:t})},r=$e({endpointUrl:new URL(`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Xe}`),paginationSettings:n}),o=await fetch(r,a);if(!o.ok)throw new U("Failed to fetch SEPA bulk transfers");const i=await o.json();if(i.errors)throw new U(i.errors.map((e=>`${e.code}: ${e.detail}`)));return{bulkTransfers:i.bulk_transfers,meta:i.meta}}({accessToken:n,stagingToken:a,paginationSettings:r}),s=i.bulkTransfers?.map(Fe),c=Re(i.meta);return{bulkTransfers:s,...c?{meta:c}:{}}},getBulkTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=t?.accessToken||o(),{stagingToken:a}=I(t||{}),r=function(e){if(!e)throw new i("bulkTransferId parameter is required for the called function.");if("string"!=typeof e)throw new i("bulkTransferId must be a string.");return e}(e?.bulkTransferId);return Fe(await async function({accessToken:e,stagingToken:t,bulkTransferId:n}){const a={method:"GET",headers:z({accessToken:e,stagingToken:t})},r=new URL(`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Xe}/${n}`),o=await fetch(r,a),i=await o.json();if(i.errors)throw new U(i.errors.map((e=>`${e.code}: ${e.detail}`)));return i.bulk_transfer}({accessToken:n,stagingToken:a,bulkTransferId:r}))},createBulkTransfer:async function*({bulkTransferSettings:e,operationSettings:t}){const a=t?.accessToken||o(),r=t?.stagingToken||n.getStagingToken(),i=t?.idempotencyKey||ge();tt(e);const{uiParentElementId:s,debugMode:d}=I(t,{requiresUI:!0});if(!x())throw new rt(nt);const l=new Map;for(const t of e.bulkTransfers){const e=t.beneficiary.iban;e&&!l.has(e)&&l.set(e,{name:t.beneficiary.name,iban:e})}const u=Array.from(l.values()),g=await et({sepaPayees:u,accessToken:a,stagingToken:r||void 0});if((yield g.requests.map(Be))===h.REJECT)return;let f,p;try{const t=he({accessToken:a,stagingToken:r||void 0,debugMode:d});p=await me({iframeUrl:t,parentElementId:s});const n={bankAccountId:e.bankAccountId,bulkTransfers:e.bulkTransfers.map((e=>function(e){return{beneficiary_id:e.beneficiaryId||e.beneficiary?.id,client_transfer_id:e.clientTransferId,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentsIds?{attachment_ids:e.attachmentsIds}:{}}}(e)))};f=await p.postMessage(fe({actionId:c.TRANSFER_BULK_CREATE,actionData:{body:n,idempotencyKey:i}}))}finally{p?.destroy()}return Fe(f)}}},ut={GOOD:"good",SERVICE:"service"},gt={AED:"AED",AUD:"AUD",BGN:"BGN",CAD:"CAD",CHF:"CHF",CNY:"CNY",CZK:"CZK",DKK:"DKK",EUR:"EUR",GBP:"GBP",GHS:"GHS",HKD:"HKD",HUF:"HUF",ILS:"ILS",INR:"INR",MXN:"MXN",NOK:"NOK",NZD:"NZD",PEN:"PEN",PLN:"PLN",RON:"RON",RSD:"RSD",SAR:"SAR",SEK:"SEK",SGD:"SGD",TRY:"TRY",USD:"USD",ZAR:"ZAR",ZMW:"ZMW"},ft=e=>{if(!(e=>Object.values(gt).includes(e))(e))throw new i(`currency ${e} is not valid, valid currencies are ${Object.values(gt).join(", ")}`)},pt={UNIT:"unit",HOUR:"hour",DAY:"day",MONTH:"month",GRAM:"gram",KILOGRAM:"kilogram",LITER:"liter",METER:"meter",SQUARE_METER:"square_meter",CUBIC_METER:"cubic_meter",AMPERE:"ampere",NUMBER_OF_ARTICLES:"number_of_articles",CENTIMETER:"centimeter",CUBIC_METER_PER_HOUR:"cubic_meter_per_hour",GIGAJOULE:"gigajoule",GIGAWATT:"gigawatt",GIGAWATT_HOUR:"gigawatt_hour",HALF_YEAR:"half_year",JOULE:"joule",KILOJOULE:"kilojoule",KILOVAR:"kilovar",KILOWATT:"kilowatt",KILOWATT_HOUR:"kilowatt_hour",MEGAJOULE:"megajoule",MEGAWATT:"megawatt",MEGAWATT_HOUR:"megawatt_hour",MILLIGRAM:"milligram",MILLILITER:"milliliter",MILLIMETER:"millimeter",MINUTE:"minute",PAIR:"pair",QUARTER:"quarter",SECOND:"second",SET:"set",TON:"ton",TWO_WEEK:"two_week",WATT_HOUR:"watt_hour",WEEK:"week",YEAR:"year"},ht=e=>{if(!(e=>Object.values(pt).includes(e))(e))throw new i(`unit ${e} is not valid, valid units are ${Object.values(pt).join(", ")}`)},mt=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],bt=[{name:"currency"},{name:"value"}];const yt=e=>{if(!Object.values(ut).includes(e))throw new i(`type ${e} is not valid, valid types are ${Object.values(ut).join(", ")}`)},vt={getPaymentLinkCreationFlowUrl:({paymentLinkSettings:e})=>{const{items:t,authUrl:n}=e;!function(e){if(!e)throw new i("authUrl is required for the called function");const t=X({authUrl:e});if(t.length>0)throw new i(t);try{new URL(e)}catch{throw new i("authUrl is not a valid URL")}}(n),function(e){if(!e||!Array.isArray(e))return[];e.forEach((e=>{Q(e,mt),Q(e.unitPrice,bt);const t=[...X({id:e.id,title:e.title,vatRate:e.vatRate,currency:e.unitPrice.currency,measureUnit:e.measureUnit,unitPrice:e.unitPrice.value,...e.description?{description:e.description}:{}}),...te({quantity:e.quantity})].flat();if(t.length>0)throw new i(t);yt(e.type),ft(e.unitPrice.currency),ht(e.measureUnit)}))}(t);const a=new URLSearchParams({...t?{items:JSON.stringify(t)}:{}});return a.toString()?`${n}?${a.toString()}`:n}},_t=({accessToken:e,stagingToken:t})=>({path:"/v2/organization/",options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),wt=e=>({slug:e.slug,iban:e.iban,bic:e.bic,currency:e.currency,balance:e.balance,balanceCents:e.balance_cents,authorizedBalance:e.authorized_balance,authorizedBalanceCents:e.authorized_balance_cents,name:e.name,updatedAt:new Date(e.updated_at),status:e.status,main:e.main}),Tt={getBankAccounts:async e=>{const{stagingToken:t,proxyRequestFunction:n}=I(e);if(n){const e=_t({stagingToken:t}),a=await n(F(e)),{body:r}=B(a);return r.organization.bank_accounts.map(wt)}{const n=e.accessToken||o(),a=await(async({accessToken:e,stagingToken:t})=>{const n=_t({accessToken:e,stagingToken:t});return await j(n)})({accessToken:n,stagingToken:t});return a.organization.bank_accounts.map(wt)}}},kt="/v2/transactions";function Et({bankAccountId:e,iban:t,status:n,updatedAtFrom:a,updatedAtTo:r,emittedAtFrom:o,emittedAtTo:i,settledAtFrom:s,settledAtTo:c,side:d,operationType:l,withAttachments:u,paginationSettings:g,accessToken:f,stagingToken:p}){const h={method:"GET",headers:{accessToken:f,stagingToken:p}},m=new URLSearchParams;e&&m.append("bank_account_id",e),t&&m.append("iban",t),n&&m.append("status",n),a&&m.append("updated_at_from",a),r&&m.append("updated_at_to",r),o&&m.append("emitted_at_from",o),i&&m.append("emitted_at_to",i),s&&m.append("settled_at_from",s),c&&m.append("settled_at_to",c),d&&m.append("side",d),l&&m.append("operation_type",l),void 0!==u&&m.append("with_attachments",String(u));const b=Ie(g);for(const[e,t]of b)m.append(e,t);const y=m.toString();return{path:`${kt}${y?`?${y}`:""}`,options:h}}function At({transactionId:e,accessToken:t,stagingToken:n}){return{path:`${kt}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function St(e){return{transactionId:e.transaction_id,amount:e.amount,amountCents:e.amount_cents,settledBalance:e.settled_balance,settledBalanceCents:e.settled_balance_cents,attachmentIds:e.attachment_ids,localAmount:e.local_amount,localAmountCents:e.local_amount_cents,side:e.side,operationType:e.operation_type,currency:e.currency,localCurrency:e.local_currency,label:e.label,settledAt:new Date(e.settled_at),emittedAt:new Date(e.emitted_at),updatedAt:new Date(e.updated_at),status:e.status,note:e.note,reference:e.reference,vatAmount:e.vat_amount,vatAmountCents:e.vat_amount_cents,vatRate:e.vat_rate,initiatorId:e.initiator_id,labelIds:e.label_ids,attachmentLost:e.attachment_lost,attachmentRequired:e.attachment_required,cardLastDigits:e.card_last_digits,category:e.category,cashflowCategory:{name:e.cashflow_category?.name||""},cashflowSubcategory:{name:e.cashflow_subcategory?.name||""},id:e.id,subjectType:e.subject_type,...e.transfer?{transfer:{counterpartyAccountNumber:e.transfer.counterparty_account_number,counterpartyName:e.transfer.counterparty_name,counterpartyBic:e.transfer.counterparty_bic,counterpartyIban:e.transfer.counterparty_iban}}:{}}}const It={getTransactions:async function(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{}),i={...e?.transactionSettings||{},paginationSettings:r};if(n){const e=F(Et(i)),t=B(await n(e));return{transactions:t.body.transactions.map(St),meta:t.body.meta}}{const e=a||o(),n=await async function(e){const t=Et(e),{transactions:n,meta:a}=await j(t);return{transactions:n,meta:a}}({...i,accessToken:e,stagingToken:t});return{transactions:n.transactions.map(St),meta:n.meta}}},getTransaction:async function({transactionSettings:e,operationSettings:t}){const{proxyRequestFunction:n,accessToken:a,stagingToken:r}=I(t||{}),{transactionId:s}=function(e){if(!e)throw new i("transactionSettings parameter is required for the called function");if(!e.transactionId)throw new i("transactionSettings.transactionId parameter is required for the called function");if(e.transactionId&&"string"!=typeof e.transactionId)throw new i("transactionSettings.transactionId must be a string.");return e}(e);if(n){const e=F(At({transactionId:s}));return St(B(await n(e)).body.transaction)}{const e=a||o();return St(await async function(e){const t=At(e),{transaction:n}=await j(t);return n}({transactionId:s,accessToken:e,stagingToken:r}))}}},$t=It;function Rt(e,t,n,a){var r,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}"function"==typeof SuppressedError&&SuppressedError;
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QontoEmbed={})}(this,(function(e){"use strict";class t{constructor(){this.accessToken=null,this.stagingToken=null}static getInstance(){return t.instance||(t.instance=new t),t.instance}setAccessToken(e){this.accessToken=e}getAccessToken(){return this.accessToken}hasAccessToken(){return null!==this.accessToken&&""!==this.accessToken}clearAccessToken(){this.accessToken=null}setStagingToken(e){this.stagingToken=e}getStagingToken(){return this.stagingToken}hasStagingToken(){return null!==this.stagingToken&&""!==this.stagingToken}clearStagingToken(){this.stagingToken=null}}const n=t.getInstance();class a extends Error{constructor(){super(),this.stack=""}toString(){return`${this.name}: ${this.message}`}}class r extends a{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid access token.\nEnsure you have called the initialize function with a valid access token."}}function o(){if(!n.hasAccessToken())throw new r;return n.getAccessToken()}class i extends a{constructor(e){super(),this.name="InvalidParametersError",this.invalidParameters=Array.isArray(e)?e:[e],this.message=`Invalid parameters were passed to the function:\n${this.invalidParameters.map((e=>e)).join("\n")}`}}const s={READY:"qonto.ready"},c={CARD_SEE:"card.see",CARD_SEE_DETAILS:"card.see-details",CARD_ORDER:"card.order",CARD_UNLOCK:"card.unlock",CARD_SHOW_PIN:"card.show.pin",CARD_SET_PIN:"card.set.pin",TRANSFER_SINGLE_CREATE:"transfer.single.create",TRANSFER_BULK_CREATE:"transfer.bulk.create",BENEFICIARIES_TRUST:"beneficiary.trust"},d={PRODUCTION:"production",STAGING:"staging",LOCAL:"local"},l={MASTER:"master",SANDBOX:"sandbox",QA:"qa"},u={EN:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt"},g={PENDING:"pending",PROCESSING:"processing",CANCELED:"canceled",DECLINED:"declined",SETTLED:"settled",FAILED:"failed",COMPLETED:"completed"},f={PASSKEY:"passkey",SMS_OTP:"sms-otp",PAIRED_DEVICE:"paired-device",MOCK:"mock"},p=3e4,h={ACCEPT:"ACCEPT",REJECT:"REJECT"},m={CARD_DISPLAY:"display_card",PAYMENT_LINK_CREATE:"create_payment_link",SEPA_TRANSFER_CREATE:"create_sepa_transfer"};var b=Object.freeze({__proto__:null,ACTIONS:c,ACTIVITY_TAGS:{ATM:"atm",FALLBACK:"fallback",FEES:"fees",FINANCE:"finance",FOOD_AND_GROCERY:"food_and_grocery",GAS_STATION:"gas_station",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",HOTEL_AND_LODGING:"hotel_and_lodging",INSURANCE:"insurance",IT_AND_ELECTRONICS:"it_and_electronics",LEGAL_AND_ACCOUNTING:"legal_and_accounting",LOGISTICS:"logistics",MANUFACTURING:"manufacturing",MARKETING:"marketing",OFFICE_RENTAL:"office_rental",OFFICE_SUPPLY:"office_supply",ONLINE_SERVICE:"online_service",OTHER_EXPENSE:"other_expense",OTHER_INCOME:"other_income",OTHER_SERVICE:"other_service",PENDING:"pending",REFUND:"refund",RESTAURANT_AND_BAR:"restaurant_and_bar",SALES:"sales",SALARY:"salary",SUBSCRIPTION:"subscription",TAX:"tax",TRANSPORT:"transport",TREASURY_AND_INTERCO:"treasury_and_interco",UTILITY:"utility",VOUCHER:"voucher"},AMOUNT_REQUIRING_ATTACHMENTS:p,AUTH_LINK_ACTIONS:m,BENEFICIARY_STATUSES:{PENDING:"pending",VALIDATED:"validated",DECLINED:"declined"},BRANCHES:l,ENVIRONMENTS:d,IFRAME_EVENTS:s,LOCALES:u,MFA_METHODS:f,TRANSACTION_STATUSES:{PENDING:"pending",DECLINED:"declined",COMPLETED:"completed"},TRANSFER_DECLINE_REASONS:{BENEFICIARY_BIC_INVALID:"beneficiary_bic_invalid",BENEFICIARY_IBAN_INVALID:"beneficiary_iban_invalid",BENEFICIARY_STATUS:"beneficiary_status",BENEFICIARY_NETWORK_RULES_ERROR:"beneficiary_network_rules_error",ORGANISATION_COMPLIANCE_REASONS:"organisation_compliance_reasons",DEBIT_ACCOUNT_INSUFFICIENT_FUNDS:"debit_account_insufficient_funds",QONTO_PROCESSING_FAILED:"qonto_processing_failed"},TRANSFER_STATUSES:g,VOP_CHECK_RESULTS:{MATCH_RESULT_MATCH:"MATCH_RESULT_MATCH",MATCH_RESULT_NO_MATCH:"MATCH_RESULT_NO_MATCH",MATCH_RESULT_CLOSE_MATCH:"MATCH_RESULT_CLOSE_MATCH",MATCH_RESULT_NOT_POSSIBLE:"MATCH_RESULT_NOT_POSSIBLE",MATCH_RESULT_UNSPECIFIED:"MATCH_RESULT_UNSPECIFIED"},VOP_DECISIONS:h});class y{constructor(){this.mfaPreference=f.PASSKEY,this.debugMode=!1}static getInstance(){return y.instance||(y.instance=new y),y.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=f.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}}const v=y.getInstance(),_="https://embed.qonto.com",w="https://embed-js{branch}.staging.qonto.co",T="https://embed.dev.qonto.co",k={[d.PRODUCTION]:{IFRAME_BASE_URL:_,IFRAME_URL:`${_}/connect`,THIRD_PARTY_API_URL:"https://thirdparty.qonto.com"},[d.STAGING]:{IFRAME_BASE_URL:w,IFRAME_URL:`${w}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"},[d.LOCAL]:{IFRAME_BASE_URL:T,IFRAME_URL:`${T}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"}};class E{constructor(){this.environment=d.PRODUCTION,this.branch=l.SANDBOX;const e=process.env.QONTO_EMBED_ENVIRONMENT,t=process.env.QONTO_EMBED_BRANCH;this.environment=Object.values(d).includes(e)?e:d.PRODUCTION,this.branch=Object.values(l).includes(t)?t:l.SANDBOX}static getInstance(){return E.instance||(E.instance=new E),E.instance}setEnvironment(e){this.environment=e}getEnvironment(){return this.environment}isProductionEnvironment(){return this.environment===d.PRODUCTION}setBranch(e){this.branch=e}getBranch(){return this.branch}clear(){this.environment=d.PRODUCTION,this.branch=l.MASTER}getEnvironmentUrls(){if(this.environment===d.PRODUCTION)return k.production;{const e=k[this.environment];return Object.entries(e).reduce(((e,[t,n])=>({...e,[t]:n.replace("{branch}",`-${this.branch}`)})),{})}}}const A=E.getInstance(),S={requiresUI:!1};function I(e,{requiresUI:t}=S){const n=e?.uiParentElementId||v.getUIParentElementId();if(t&&!n)throw new i("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");const a=e?.mfaPreference||v.getMFAPreference();if(a){const e=(r=Object.values(f),A.isProductionEnvironment()?r.filter((e=>e!==f.MOCK)):r);if(!e.includes(a))throw new i(`operationSettings.mfaPreference must be one of ${e.join(", ")}`);if(A.isProductionEnvironment()&&a===f.MOCK)throw new i("operationSettings.mfaPreference cannot be set to mock in production environment.")}var r;const o=e?.debugMode||v.getDebugMode();if(void 0!==o&&"boolean"!=typeof o)throw new i("operationSettings.debugMode must be a boolean.");const s=e?.proxyRequestFunction||v.getProxyRequestFunction();if(s&&"function"!=typeof s)throw new i("operationSettings.proxyRequestFunction must be a function.");return{...e,uiParentElementId:n,mfaPreference:a,debugMode:o,proxyRequestFunction:s}}const $=Object.values(u);function R(e){if(!function(e){return $.includes(e)}(e))throw new i(`Unsupported locale: ${e}. The locale must be one of: ${$.join(", ")}.`);return e}function P(e){if(!e?.accessToken&&!e?.operationSettings?.proxyRequestFunction)throw new i("Either operationSettings.proxyRequestFunction or access token is required when calling initialize()");return e?.operationSettings&&I(e.operationSettings),function(e){if(e.environment){if(!["production","staging","local"].includes(e.environment))throw new i('If provided, environment must be either "production" or "staging"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.environment.PRODUCTION" or "constants.environment.STAGING"');if(e.branch&&!["master","sandbox","qa"].includes(e.branch))throw new i('If provided, branch must be either "master", "sandbox" or "qa"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.branch.MASTER" or "constants.environment.SANDBOX" and so on')}}(e),e.locale&&R(e.locale),e}class C{constructor(){this.currentLocale="en"}static getInstance(){return C.instance||(C.instance=new C),C.instance}setLocale(e){this.currentLocale=e}getLocale(){return this.currentLocale}setDefaultLocale(){this.currentLocale="en"}}const L=C.getInstance();const N={initialize:function(e){const{accessToken:t,stagingToken:a,operationSettings:r,environment:o,branch:i,locale:s}=P(e);t&&n.setAccessToken(t),a&&n.setStagingToken(a),s&&L.setLocale(s),r&&v.setSettings(r),o&&(A.setEnvironment(o),i&&A.setBranch(i))},logout:function(){n.clearAccessToken(),n.clearStagingToken(),L.setDefaultLocale(),v.clearSettings()},constants:b},{initialize:q,logout:O,constants:D}=N;class U extends a{constructor(e){super();const t=Array.isArray(e)?e.join("\n"):e;this.name="EmbedApiError",this.message=`The call to the Embed API failed with the following errors:\n${t}`}}function x(){return"undefined"!=typeof window&&"undefined"!=typeof document}function M(){return!x()}function z({accessToken:e,stagingToken:t,idempotencyKey:a,mfaPreference:r}){const o=new Headers;o.append("Authorization",`Bearer ${e}`);const i=t||n.getStagingToken();i&&o.append("X-Qonto-Staging-Token",i),a&&o.append("X-Qonto-Idempotency-Key",a);const s=r||v.getMFAPreference();return s&&o.append("X-Qonto-2fa-Preference",s),o.append("Content-Type","application/json"),o.append("Accept-Language",L.getLocale()),o}async function j({path:e,options:t}){const n=`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${e}`,a=await fetch(n,{...t,headers:z(t.headers),body:t.body?JSON.stringify(t.body):void 0});if(204===a.status)return;const r=await a.json();if(!a.ok)throw r.errors?new U(r.errors.map((e=>`${e.code}: ${e.detail}`))):new U(`${r.code}: ${r.detail}`);return r}function F(e){const t={method:e.options.method,headers:e.options.headers,path:e.path,payload:e.options?.body},n=JSON.stringify(t);return a=n,M()?Buffer.from(a).toString("base64"):btoa(a);var a}function B(e){return JSON.parse((t=e,M()?Buffer.from(t,"base64").toString("utf-8"):atob(t)));var t}function H({accessToken:e,stagingToken:t,action:n,callbackUrl:a}){const r={post_authn_action:n};return a&&(r.callback_url=a),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:e,stagingToken:t},body:{embed_auth_link:r}}}}function G({membershipId:e,accessToken:t,stagingToken:n}){return{path:e?`/v2/cards?holder_ids[]=${e}`:"/v2/cards",options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function K({cardId:e,accessToken:t,stagingToken:n}){return{path:`/v2/cards?ids[]=${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function Y({accessToken:e,stagingToken:t}){return H({accessToken:e,stagingToken:t,action:m.CARD_DISPLAY})}var V;!function(e){e.PENDING="pending",e.ONHOLD="onhold",e.ORDER_CANCELED="order_canceled",e.LIVE="live",e.PAUSED="paused",e.STOLEN="stolen",e.LOST="lost",e.PIN_BLOCKED="pin_blocked",e.DELETED="deleted",e.PRE_EXPIRED="pre_expired",e.EXPIRED="expired",e.DISCARDED="discarded",e.SHIPPED_LOST="shipped_lost",e.ABUSIVE="abusive"}(V||(V={}));const W={TRANSPORT:"transport",RESTAURANT_AND_BAR:"restaurant_and_bar",FOOD_AND_GROCERY:"food_and_grocery",IT_AND_ELECTRONICS:"it_and_electronics",UTILITY:"utility",TAX:"tax",LEGAL_AND_ACCOUNTING:"legal_and_accounting",ATM:"atm",OFFICE_SUPPLY:"office_supply",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",FINANCE:"finance"};var Z,J;function Q(e,t){const n=t.filter((t=>t.requiredIfPresent?!e[t.name]&&e[t.requiredIfPresent]:void 0===e[t.name])).map((e=>e.name));if(n.length>0)throw new i(n.map((e=>`Missing required parameter: ${e}`)))}function X(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"string"!=typeof e)).map((([e])=>`${e} must be a string`))}function ee(e){return Object.entries(e).filter((([,e])=>void 0!==e&&!1!==e&&!0!==e)).map((([e])=>`${e} must be a boolean`))}function te(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"number"!=typeof e)).map((([e])=>`${e} must be a number`))}!function(e){e.VIRTUAL="virtual"}(Z||(Z={})),function(e){e.METAL="metal",e.PLUS="plus",e.STANDARD="standard"}(J||(J={}));const ne=[{name:"organizationId"},{name:"membershipId"},{name:"bankAccountId"},{name:"monthlyLimit"},{name:"cardLevel"}],ae=[...ne,{name:"atmDailyLimit",requiredIfPresent:"hasAtmDailyLimit"},{name:"hasAtmDailyLimit",requiredIfPresent:"hasAtmOption"},{name:"atmMonthlyLimit",requiredIfPresent:"hasAtmOption"},{name:"shipToBusiness"},{name:"cardLevel"}];function re(e){if(!e)throw new i("cardSettings parameter is required for the called function");return"virtual"===e.cardLevel?function(e){return Q(e,ne),function(e){const{membershipId:t,organizationId:n,bankAccountId:a,hasDailyLimit:r,hasTransactionLimit:o,monthlyLimit:s,dailyLimit:c,transactionLimit:d,activeDays:l,categories:u,cardLevel:g}=e,f=function(e){return"virtual"!==e?['cardLevel must be "virtual"']:[]}(g),p=X({membershipId:t,organizationId:n,bankAccountId:a}),h=ee({hasDailyLimit:r,hasTransactionLimit:o}),m=te({monthlyLimit:s,dailyLimit:c,transactionLimit:d}),b=oe(l),y=ie(u),v=[...f,...p,...h,...m,...b,...y];if(v.length>0)throw new i(v)}(e),e}(e):function(e){Q(e,ae),function(e){const{membershipId:t,organizationId:n,bankAccountId:a,hasDailyLimit:r,hasTransactionLimit:o,monthlyLimit:s,dailyLimit:c,transactionLimit:d,activeDays:l,categories:u,cardLevel:g,hasNfcOption:f,hasForeignPaymentOption:p,hasOnlinePaymentOption:h,shipToBusiness:m,hasAtmOption:b,hasAtmDailyLimit:y,atmDailyLimit:v,atmMonthlyLimit:_,address:w,cardDesign:T,typeOfPrint:k}=e,E=function(e){return Object.values(J).includes(e)?[]:['cardLevel must be one of "standard", "plus", "metal"']}(g),A=function(e){const t=null!=e&&"string"!=typeof e,n=!["print","embossed",void 0,null].includes(e);return t||n?['typeOfPrint must be one of "print", "embossed" or null']:[]}(k),S=X({membershipId:t,organizationId:n,bankAccountId:a}),I=ee({hasDailyLimit:r,hasTransactionLimit:o,hasAtmOption:b,hasNfcOption:f,hasForeignPaymentOption:p,hasOnlinePaymentOption:h,hasAtmDailyLimit:y,shipToBusiness:m}),$=te({monthlyLimit:s,dailyLimit:c,transactionLimit:d,atmDailyLimit:v,atmMonthlyLimit:_}),R=oe(l),P=ie(u),C=function(e){return["undefined","string"].includes(typeof e)?[]:["cardDesign must be a string"]}(T),L=function(e,t){if(t)return[];return!e||e.contactName&&e.firstLine&&e.zipCode&&e.city&&e.country?[]:["address must contain at least contactName, firstLine, zipCode, city and country properties"]}(w,m),N=[...E,...S,...I,...$,...R,...P,...A,...C,...L];if(N.length>0)throw new i(N)}(e)}(e)}function oe(e){const t=!Array.isArray(e)||!e.every((e=>Number.isInteger(e)&&e>0&&e<8));return void 0!==e&&t?["activeDays must be an array of integers between 1 and 7"]:[]}function ie(e){const t=!Array.isArray(e)||e.some((e=>"string"!=typeof e));return void 0!==e&&t?["categories must be an array of strings"]:[]}class se extends a{constructor(e){super(),this.name="EmbedOperationError",this.message=e}}const ce=[];for(let e=0;e<256;++e)ce.push((e+256).toString(16).slice(1));let de;const le=new Uint8Array(16);var ue={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ge(e,t,n){if(ue.randomUUID&&!e)return ue.randomUUID();const a=(e=e||{}).random??e.rng?.()??function(){if(!de){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");de=crypto.getRandomValues.bind(crypto)}return de(le)}();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=15&a[6]|64,a[8]=63&a[8]|128,function(e,t=0){return(ce[e[t+0]]+ce[e[t+1]]+ce[e[t+2]]+ce[e[t+3]]+"-"+ce[e[t+4]]+ce[e[t+5]]+"-"+ce[e[t+6]]+ce[e[t+7]]+"-"+ce[e[t+8]]+ce[e[t+9]]+"-"+ce[e[t+10]]+ce[e[t+11]]+ce[e[t+12]]+ce[e[t+13]]+ce[e[t+14]]+ce[e[t+15]]).toLowerCase()}(a)}function fe({actionId:e,actionData:t}){const n=v.getMFAPreference();return{actionId:e,actionData:{...t,scaPreference:t.scaPreference||n,idempotencyKey:t.idempotencyKey||ge()}}}class pe{constructor(e){this.options=e,this.iframe=null,this.parentElement=null,this.messageListeners=new Map,this.defaultTimeout=3e4;const t=new URL(e.iframeUrl);this.targetOrigin=`${t.protocol}//${t.host}`}async initialize(){if(this.iframe)return this;if(this.parentElement=document.getElementById(this.options.parentElementId),!this.parentElement)throw new se(`Could not install the authentication UI because the parent element with id ${this.options.parentElementId} was not found.\nPlease make sure to pass a valid parentElementId when calling the method.`);return new Promise(((e,t)=>{this.iframe=document.createElement("iframe"),this.iframe.src=this.options.iframeUrl,this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none";const n=this.options.timeout||this.defaultTimeout,a=setTimeout((()=>{window.removeEventListener("message",r),t(new se(`Could not install the authentication UI because the timeout of ${n}ms was reached.\nPlease make sure the application can reach the Internet.`))}),n),r=t=>{t.data.eventId===s.READY&&(clearTimeout(a),window.removeEventListener("message",r),e(this))};window.addEventListener("message",r),this.parentElement?.appendChild(this.iframe)}))}postMessage(e){if(!this.iframe||!this.iframe.contentWindow)return Promise.reject(new se("Attempted to perform an Embed operation without having the authentication UI initialized."));const t=fe(e);return new Promise(((e,n)=>{const a=r=>{if(r.data?.actionId===t.actionId){if("error"===r.data.status)return this.removeMessageListener(t.actionId,a),n(new se(`An error occurred when performing the action ${t.actionId}.\n${JSON.stringify(r.data.payload)}`));this.removeMessageListener(t.actionId,a),e(r.data.payload)}};this.addMessageListener(t.actionId,a),this.iframe?.contentWindow?.postMessage(t,this.targetOrigin)}))}addMessageListener(e,t){this.messageListeners.has(e)||this.messageListeners.set(e,[]);this.messageListeners.get(e).push(t),window.addEventListener("message",t)}removeMessageListener(e,t){const n=this.messageListeners.get(e);if(n){const e=n.indexOf(t);-1!==e&&(n.splice(e,1),window.removeEventListener("message",t))}}destroy(){this.messageListeners.forEach((e=>{e.forEach((e=>{window.removeEventListener("message",e)}))})),this.messageListeners.clear(),this.iframe&&this.parentElement&&(this.parentElement.removeChild(this.iframe),this.iframe=null)}}function he({accessToken:e,stagingToken:t,locale:n,debugMode:a}){const r=a||!1,o=n||L.getLocale(),i=A.getEnvironmentUrls().IFRAME_URL,s=t?`;staging_token=${encodeURIComponent(t)}`:"";return`${i}?debug=${r}&lang=${encodeURIComponent(o)}#access_token=${encodeURIComponent(e)}${s}`}function me({parentElementId:e,iframeUrl:t}){return new pe({parentElementId:e,iframeUrl:t}).initialize()}function be(e){return"virtual"===e.cardLevel?function(e){const t=ve(e.categories);return{actionId:c.CARD_ORDER,actionData:{idempotencyKey:ge(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel}}}}}(e):function(e){const t=ve(e.categories);return{actionId:c.CARD_ORDER,actionData:{idempotencyKey:ge(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel,card_design:e.cardDesign,..."plus"===e.cardLevel&&{type_of_print:e.typeOfPrint},ship_to_business_address:e.shipToBusiness,atm_option:e.hasAtmOption,nfc_option:e.hasNfcOption,foreign_option:e.hasForeignPaymentOption,online_option:e.hasOnlinePaymentOption,atm_daily_limit:e.atmDailyLimit,atm_monthly_limit:e.atmMonthlyLimit,...!e.shipToBusiness&&{address:{contact_name:e.address?.contactName,first_line:e.address?.firstLine,second_line:e.address?.secondLine,third_line:e.address?.thirdLine,zipcode:e.address?.zipCode,city:e.address?.city,country:e.address?.country}}}}}}}(e)}function ye(e){return{id:e.id,nickname:e.nickname,embossedName:e.embossed_name,status:e.status,maskPan:e.mask_pan,expMonth:parseInt(e.exp_month,10),expYear:parseInt(e.exp_year,10),lastActivityAt:new Date(e.last_activity_at),lastDigits:e.last_digits,shipToBusiness:e.ship_to_business,atmOption:e.atm_option,atmDailyLimitOption:e.atm_daily_limit_option,nfcOption:e.nfc_option,onlineOption:e.online_option,foreignOption:e.foreign_option,atmMonthlyLimit:e.atm_monthly_limit,atmMonthlySpent:e.atm_monthly_spent,atmDailyLimit:e.atm_daily_limit,atmDailySpent:e.atm_daily_spent,paymentMonthlyLimit:e.payment_monthly_limit,paymentMonthlySpent:e.payment_monthly_spent,paymentDailyLimit:e.payment_daily_limit,paymentDailySpent:e.payment_daily_spent,paymentDailyLimitOption:e.payment_daily_limit_option,paymentTransactionLimit:e.payment_transaction_limit,paymentTransactionLimitOption:e.payment_transaction_limit_option,activeDays:e.active_days,holderId:e.holder_id,bankAccountId:e.bank_account_id,organizationId:e.organization_id,updatedAt:new Date(e.updated_at),createdAt:new Date(e.created_at),shippedAt:new Date(e.shipped_at),cardType:e.card_type,cardLevel:e.card_level,paymentLifespanLimit:e.payment_lifespan_limit,paymentLifespanSpent:e.payment_lifespan_spent,preExpiresAt:new Date(e.pre_expires_at),categories:e.categories,renewed:e.renewed,renewal:e.renewal,...e.parent_card_summary&&{parentCardSummary:{id:e.parent_card_summary.id,lastDigits:e.parent_card_summary.last_digits}},hadOperation:e.had_operation,hadPinOperation:e.had_pin_operation,cardDesign:e.card_design,typeOfPrint:e.type_of_print,upsold:e.upsold,upsell:e.upsell,discardOn:new Date(e.discard_on),reordered:e.reordered}}function ve(e){const t=Object.values(W);return(e||[]).filter((e=>t.includes(e)))}const _e="--qonto-embed";function we(e){return!e.href||e.href.startsWith(window.location.origin)}function Te(e){return"CSSStyleRule"===e.constructor.name}function ke(e=_e){return x()?function(e,t){return[...e].filter(we).reduce(((e,n)=>[...n.cssRules].filter(Te).reduce(((e,n)=>{if("style"in n){const a=[...n.style].map((e=>[e.trim(),n.style.getPropertyValue(e).trim()])).filter((([e])=>e.startsWith(t))).reduce(((e,[n,a])=>({...e,[n.replace(`${t}-`,"")]:a})),{});return{...e,...a}}return e}),e)),{})}(document.styleSheets,e):{}}async function Ee({decorationParams:e,operationSettings:t,cardIframeUrl:n}){const{cardId:a,allowPinReveal:r,allowBlocking:o}=e,{uiParentElementId:i,debugMode:s}=t,c=function(e,t){const n=new URL(e);n.searchParams.set("cardId",t.cardId),"boolean"==typeof t.allowPinReveal&&n.searchParams.set("canSeePin",t.allowPinReveal.toString()),"boolean"==typeof t.allowBlocking&&n.searchParams.set("canBlock",t.allowBlocking.toString()),!0===t.debugMode&&n.searchParams.set("debug",t.debugMode.toString());const a=ke(_e);return Object.keys(a).length>0&&n.searchParams.set("customization",JSON.stringify(a)),n.toString()}(n,{cardId:a,allowPinReveal:r,allowBlocking:o,debugMode:s}),d=await me({iframeUrl:c,parentElementId:i});return{destroyEmbedUI:()=>{d.destroy()}}}const Ae={getCards:async function(e){try{const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new i("membershipId must be a string");const{proxyRequestFunction:n,stagingToken:a}=I(e?.operationSettings||{});if(n){const e=F(G({membershipId:t,stagingToken:a})),r=await n(e);return B(r).body.cards.map((e=>ye(e)))}{const n=e?.operationSettings?.accessToken||o(),r=await async function({membershipId:e,accessToken:t,stagingToken:n}){const a=G({membershipId:e,accessToken:t,stagingToken:n}),{cards:r}=await j(a);return r}({membershipId:t,accessToken:n,stagingToken:a});return r.map((e=>ye(e)))}}catch(e){return Promise.reject(e)}},getCard:async function({cardSettings:e,operationSettings:t}){try{!function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId parameter is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t)}(e);const n=e.cardId,{proxyRequestFunction:a,stagingToken:r}=I(t||{});if(a){const e=F(K({cardId:n,stagingToken:r})),t=await a(e),o=B(t).body.cards;if(Array.isArray(o)&&o.length>0)return ye(o[0]);throw new i("Unable to retrieve card data")}{const e=t?.accessToken||o(),a=await async function({cardId:e,accessToken:t,stagingToken:n}){const a=K({cardId:e,accessToken:t,stagingToken:n}),{cards:r}=await j(a);return r[0]}({cardId:n,accessToken:e,stagingToken:r});return ye(a)}}catch(e){return Promise.reject(e)}},orderCard:async function(e){try{const t=o(),{uiParentElementId:a,debugMode:r}=I(e.operationSettings,{requiresUI:!0});re(e.cardSettings);const i=he({accessToken:t,stagingToken:n.getStagingToken()||void 0,debugMode:r}),s=await me({iframeUrl:i,parentElementId:a}),c=be(e.cardSettings),d=await s.postMessage(c);return s.destroy(),ye(d)}catch(e){return Promise.reject(e)}},unlockCard:async function(e){try{const t=o(),{uiParentElementId:a,debugMode:r}=I(e.operationSettings,{requiresUI:!0});!function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t)}(e.cardSettings);const s=he({accessToken:t,stagingToken:n.getStagingToken()||void 0,debugMode:r}),d=await me({iframeUrl:s,parentElementId:a}),l=function(e){return{actionId:c.CARD_UNLOCK,actionData:{body:{cardId:e.cardSettings.cardId}}}}(e),u=await d.postMessage(l);return d.destroy(),ye(u)}catch(e){return Promise.reject(e)}},displayCard:async function(e){try{const{uiParentElementId:t,accessToken:n,stagingToken:a,debugMode:r,mfaPreference:s,proxyRequestFunction:c}=I(e.operationSettings,{requiresUI:!0});if(function(e){if(!e)throw new i("cardSettings parameter is required for the called function");if(!e.cardId)throw new i("cardId is required for the called function");const t=X({cardId:e.cardId});if(t.length>0)throw new i(t);let n={};void 0!==e.allowPinReveal&&(n={allowPinReveal:e.allowPinReveal}),void 0!==e.allowBlocking&&(n={...n,allowBlocking:e.allowBlocking});const a=ee(n);if(a.length>0)throw new i(a)}(e.cardSettings),c){const n=F(Y({stagingToken:a})),o=await c(n),i=B(o).body;return Ee({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:r},cardIframeUrl:i.url})}{const i=n||o(),c=await async function(e){const t=Y(e),{embed_auth_link:n}=await j(t);return n}({...e.cardSettings,accessToken:i,stagingToken:a});return Ee({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:r,mfaPreference:s},cardIframeUrl:c.url})}}catch(e){return Promise.reject(e)}}},Se=Ae;function Ie(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function $e({endpointUrl:e,paginationSettings:t}){return function({url:e,searchParams:t}){const n=new URL(e.toString());for(const[e,a]of t.entries())n.searchParams.append(e,a);return n}({url:new URL(e),searchParams:Ie(t)})}function Re(e){if(e)return{totalItems:e?.total_count,totalPages:e?.total_pages,currentPage:e?.current_page,itemsPerPage:e?.per_page,previousPage:e?.prev_page||null,nextPage:e?.next_page||null}}function Pe(e){return{id:e.id,name:e.name,email:e.email,activityTag:e.activity_tag,iban:e.iban,bic:e.bic,currency:e.currency,status:e.status,trusted:e.trusted,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function Ce(e){return{name:e.name,...e.email&&{email:e.email},...e.activityTag&&{activity_tag:e.activityTag},iban:e.iban,...e.bic&&{bic:e.bic}}}const Le="/v2/sepa/beneficiaries";function Ne({paginationSettings:e,accessToken:t,stagingToken:n}){const a={method:"GET",headers:{accessToken:t,stagingToken:n}},r=Ie(e),o=r.size?`?${r.toString()}`:"";return{path:`${Le}${o}`,options:a}}function qe({beneficiaryId:e,accessToken:t,stagingToken:n}){return{path:`${Le}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}async function Oe({accessToken:e,stagingToken:t,beneficiaryId:n}){const a=qe({beneficiaryId:n,accessToken:e,stagingToken:t}),{beneficiary:r}=await j(a);return r}function De({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a=ge()}){return{path:Le,options:{method:"POST",headers:{accessToken:t,stagingToken:n,idempotencyKey:a},body:{beneficiary:Ce(e)}}}}function Ue({beneficiaryIds:e,accessToken:t,stagingToken:n}){return{path:`${Le}/untrust`,options:{method:"PATCH",headers:{accessToken:t,stagingToken:n},body:{ids:e}}}}function xe({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}){const{name:o,email:i,activityTag:s}=e,c={method:"PATCH",headers:{accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r},body:{beneficiary:{name:o,email:i,activity_tag:s}}};return{path:`${Le}/${e.id}`,options:c}}const Me=[{name:"name"},{name:"iban"}];const ze={getBeneficiaries:async function(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{});if(n){const e=F(Ne({paginationSettings:r})),t=B(await n(e)),a=t.body.beneficiaries.map((e=>Pe(e))),o=Re(t.body.meta);return{beneficiaries:a,...o?{meta:o}:{}}}{const e=a||o(),n=await async function({paginationSettings:e,accessToken:t,stagingToken:n}){const a=Ne({paginationSettings:e,accessToken:t,stagingToken:n}),{beneficiaries:r,meta:o}=await j(a);return{beneficiaries:r,meta:o}}({accessToken:e,stagingToken:t,paginationSettings:r}),i=n.beneficiaries.map((e=>Pe(e))),s=Re(n.meta);return{beneficiaries:i,...s?{meta:s}:{}}}},getBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new i("beneficiaryId must be a string");return e}(e?.beneficiaryId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(qe({beneficiaryId:n}));return Pe(B(await a(e)).body.beneficiary)}{const e=r||o();return Pe(await Oe({beneficiaryId:n,accessToken:e,stagingToken:s}))}},addBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiary parameter is required for the called function");if("object"!=typeof e)throw new i("beneficiary must be an object");Q(e,Me);const t=X({name:e.name,iban:e.iban,email:e.email,activityTag:e.activityTag,bic:e.bic});if(t.length>0)throw new i(t);return e}(e),{proxyRequestFunction:a,accessToken:r,stagingToken:s,idempotencyKey:c}=I(t||{});if(a){const e=F(De({beneficiary:n,idempotencyKey:c}));return Pe(B(await a(e)).body.beneficiary)}{const e=r||o(),t=await async function({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a=ge()}){const r=De({beneficiary:e,accessToken:t,stagingToken:n,idempotencyKey:a}),{beneficiary:o}=await j(r);return o}({beneficiary:n,accessToken:e,stagingToken:s,idempotencyKey:c});return Pe(t)}},updateBeneficiary:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){const{id:t,name:n,email:a,activityTag:r}=e||{};if(!t)throw new i("Invalid parameters were passed to the function:\nA beneficiary ID is required for the called function");if(!n&&!a&&!r)throw new i("Invalid parameters were passed to the function:\nAt least one of the following properties must be provided: name, email, activityTag");const o=X({name:n,email:a,activityTag:r});if(o.length>0)throw new i(o);return{id:t,name:n,email:a,activityTag:r}}(e),{stagingToken:a,idempotencyKey:r,mfaPreference:s,proxyRequestFunction:c}=I(t),d={beneficiaryParamsBeingEdited:n,idempotencyKey:r,mfaPreference:s};if(c){const e=F(xe(d));return Pe(B(await c(e)).body.beneficiary)}{const e=t?.accessToken||o(),n=await async function({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}){const o=xe({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:n,idempotencyKey:a,mfaPreference:r}),{beneficiary:i}=await j(o);return i}({...d,accessToken:e,stagingToken:a});return Pe(n)}},untrustBeneficiaries:async function({beneficiarySettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("beneficiaryIds parameter is required for the called function");if(!Array.isArray(e)||!e.every((e=>"string"==typeof e)))throw new i("beneficiaryIds must be an array of strings");return e}(e?.beneficiaryIds),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Ue({beneficiaryIds:n}));return B(await a(e)).body.beneficiaries.map(Pe)}{const e=r||o(),t=await async function({beneficiaryIds:e,accessToken:t,stagingToken:n}){const a=Ue({beneficiaryIds:e,accessToken:t,stagingToken:n}),{beneficiaries:r}=await j(a);return r}({beneficiaryIds:n,accessToken:e,stagingToken:s});return t.map(Pe)}}},je=ze;function Fe(e){return{id:e.id,initiatorId:e.initiator_id,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),totalCount:Number(e.total_count),completedCount:Number(e.completed_count),failedCount:Number(e.failed_count),pendingCount:Number(e.pending_count),results:e.results.map((e=>({clientTransferId:e.client_transfer_id,transferId:e.transfer_id??null,errors:e.errors||null,status:e.status})))}}function Be(e){return{id:e.id,response:{matchResult:e.response.match_result,matchedName:e.response.matched_name}}}function He(e){return{id:e.id,initiatorId:e.initiator_id,bankAccountId:e.bank_account_id,amount:Number(e.amount),amountCents:Number(e.amount_cents),amountCurrency:e.amount_currency,status:e.status,beneficiaryId:e.beneficiary_id,reference:e.reference,note:e.note,declinedReason:e.declined_reason,scheduledDate:new Date(e.scheduled_date),createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),processedAt:new Date(e.processed_at),completedAt:new Date(e.completed_at),transactionId:e.transaction_id}}function Ge(e){const t=e.beneficiaryId||e.beneficiary?.id;return{bank_account_id:e.bankAccountId,beneficiary_id:t,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentIds?{attachment_ids:e.attachmentIds}:{}}}function Ke(e){return{name:e.name,iban:e.iban}}const Ye="/v2/sepa",Ve=`${Ye}/transfers`;function We({paginationSettings:e,accessToken:t,stagingToken:n}){const a={method:"GET",headers:{accessToken:t,stagingToken:n}},r=Ie(e),o=r.size?`?${r.toString()}`:"";return{path:`${Ve}${o}`,options:a}}function Ze({sepaTransferId:e,accessToken:t,stagingToken:n}){return{path:`${Ve}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function Je({sepaTransferId:e,accessToken:t,stagingToken:n}){return{path:`${Ve}/${e}/cancel`,options:{method:"POST",headers:{accessToken:t,stagingToken:n}}}}async function Qe({sepaPayee:e,accessToken:t,stagingToken:n}){const a=function({sepaPayee:e,accessToken:t,stagingToken:n}){return{path:`${Ye}/verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:n},body:{beneficiary_name:e.name,iban:e.iban}}}}({sepaPayee:e,accessToken:t,stagingToken:n});return await j(a)}const Xe="/v2/sepa/bulk_transfers";async function et({sepaPayees:e,accessToken:t,stagingToken:n}){const a=function({sepaPayees:e,accessToken:t,stagingToken:n}){return{path:`${Ye}/bulk_verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:n},body:{requests:e.map(Ke)}}}}({sepaPayees:e,accessToken:t,stagingToken:n});return await j(a)}function tt(e){if(!e)throw new i("bulkTransferSettings parameter is required for the called function.");if(!e.bankAccountId)throw new i("bankAccountId is required");if(!Array.isArray(e.bulkTransfers))throw new i("bulkTransfers must be an array");if(e.bulkTransfers.length>400)throw new i("Maximum of 400 bulk transfers allowed");return e.bulkTransfers.forEach(((e,t)=>{!function(e,t){if(!e)throw new i(`Invalid bulkTransfer at index ${t}: bulkTransfer object is required`);if(!e.beneficiary)throw new i(`Invalid bulkTransfer at index ${t}: Beneficiary details must be provided in the bulkTransferSettings.beneficiary field`);if(!e.beneficiary.iban)throw new i(`Invalid bulkTransfer at index ${t}: IBAN is required as part of the beneficiary details`);if(!e.beneficiary.name)throw new i(`Invalid bulkTransfer at index ${t}: Beneficiary name is required as part of the beneficiary details`);const n=X({reference:e.reference,clientTransferId:e.clientTransferId,note:e.note}),a=te({amount:e.amount}),r=[...n,...a].flat();if(r.length>0)throw new i(r);if(e.amount>p&&(!e.attachmentsIds||0===e.attachmentsIds.length))throw new i(`Invalid bulkTransfer at index ${t}: Attachments are required for transfers over €30000`)}(e,t)})),e}const nt="browser",at="server";class rt extends Error{constructor(e){switch(super(),this.name="InvalidRuntimeError",e){case nt:this.message="This code is running in a browser environment, but it is expected to run in a server environment.";break;case at:this.message="This code is running in a server environment, but it is expected to run in a browser environment.";break;default:this.message="This code is not expected to run in this environment. Check if the function was server-only or browser-only."}}}const ot=[{name:"bankAccountId"},{name:"reference"},{name:"amount"}];function it(e,t){const n=t?.locale||L.getLocale(),a=new URL(e);return n&&a.searchParams.append("lang",n),t?.mfaPreference&&a.searchParams.append("mfaPreference",t.mfaPreference),t?.idempotencyKey&&a.searchParams.append("idempotencyKey",t.idempotencyKey),a.toString()}function st(e){return{url:e.url,postAuthAction:e.post_authn_action,callbackUrl:e.callback_url,expiresAt:e.expired_at,usedAt:e.used_at}}const ct={request:async function({requestSettings:e,operationSettings:t}){!function(e){if(!e||"object"!=typeof e)throw new i("requestSettings must be an object");const t=e,{action:n,callbackUrl:a}=e;Q(t,[{name:"action"}]);const r=X(t),o=Object.values(m);if(o.includes(n)||r.push(`action must be one of ${o.join(", ")}`),r.length>0)throw new i(r);if(void 0!==a&&""===a.trim())throw new i("callbackUrl cannot be empty")}(e);const{proxyRequestFunction:n,stagingToken:a}=I(t||{});if(n){const t=F(H({stagingToken:a,action:e.action,callbackUrl:e.callbackUrl}));return st(B(await n(t)).body)}{const n=t?.accessToken||o();return st(await async function(e){const t=H({accessToken:e.accessToken,stagingToken:e.stagingToken,action:e.action,callbackUrl:e.callbackUrl}),{embed_auth_link:n}=await j(t);return{url:n.url,post_authn_action:n.post_authn_action,callback_url:n.callback_url,expired_at:n.expired_at,used_at:n.used_at}}({accessToken:n,stagingToken:a,action:e.action,callbackUrl:e.callbackUrl}))}}};async function dt(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{});if(n){const e=F(We({paginationSettings:r})),t=B(await n(e)),a=t.body.transfers.map(He),o=Re(t.body.meta);return{transfers:a,...o?{meta:o}:{}}}{const e=a||o(),n=await async function({accessToken:e,stagingToken:t,paginationSettings:n}){const a=We({paginationSettings:n,accessToken:e,stagingToken:t}),{transfers:r,meta:o}=await j(a);return{transfers:r,meta:o}}({accessToken:e,stagingToken:t,paginationSettings:r}),i=n.transfers.map(He),s=Re(n.meta);return{transfers:i,...s?{meta:s}:{}}}}const lt={getSepaTransfers:dt,getSepaTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("sepaTransferId parameter is required for the called function");if(e&&"string"!=typeof e)throw new i("sepaTransferId must be a string");return e}(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Ze({sepaTransferId:n}));return He(B(await a(e)).body.transfer)}{const e=r||o(),t=await async function({accessToken:e,stagingToken:t,sepaTransferId:n}){const a=Ze({sepaTransferId:n,accessToken:e,stagingToken:t}),{transfer:r}=await j(a);return r}({sepaTransferId:n,accessToken:e,stagingToken:s});return He(t)}},createSepaTransfer:async function*({sepaTransferSettings:e,operationSettings:t}){const a=t?.accessToken||o(),r=t?.stagingToken||n.getStagingToken(),s=t?.idempotencyKey||ge();let d;!function(e){if(!e)throw new i("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new i("sepaTransferSettings must be an object");if(!e.beneficiaryId&&!e.beneficiary)throw new i("Either beneficiaryId or beneficiary must be provided");const t=X({beneficiaryId:e.beneficiaryId});if(t.length>0)throw new i(t)}(e);const l=await async function({sepaTransferSettings:e,operationSettings:t}){return e?.beneficiary?e.beneficiary:Pe(await Oe({beneficiaryId:e?.beneficiaryId,accessToken:t?.accessToken,stagingToken:t?.stagingToken}))}({sepaTransferSettings:e,operationSettings:{accessToken:a,stagingToken:r||void 0}}),u={name:l.name,iban:l.iban},g=await Qe({sepaPayee:u,accessToken:a,stagingToken:r||void 0}),f=yield(m=g,{matchResult:m.match_result,matchedName:m.matched_name});var m;let b;if("string"==typeof f){if(f===h.REJECT)return}else{if(f.vopDecision===h.REJECT)return;b=f.sepaTransferSettings}const y={...e,...b};!function(e){if(!e)throw new i("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new i("sepaTransferSettings must be an object");Q(e,ot);const t=[...X({bankAccountId:e.bankAccountId,note:e.note,reference:e.reference}),...te({amount:e.amount})].flat();if(t.length>0)throw new i(t);if(e.amount>p&&(!e.attachmentIds||0===e.attachmentIds.length))throw new i("Attachments are required for transfers over €30,000")}(y);const v={...y,beneficiary:l};if(v.beneficiary?.trusted)d=await async function({transfer:e,vopProofToken:t,accessToken:n,stagingToken:a,idempotencyKey:r}){const o=Ge(e),i={method:"POST",headers:z({accessToken:n,stagingToken:a,idempotencyKey:r}),body:JSON.stringify({transfer:o,vop_proof_token:t})},s=`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Ve}`,c=await fetch(s,i),d=await c.json();if(d.errors)throw new U(d.errors.map((e=>`${e.code}: ${e.detail}`)));return d.transfer}({transfer:v,vopProofToken:g.proof_token.token,accessToken:a,stagingToken:r||void 0,idempotencyKey:s});else{if(!x())throw new rt(nt);const{uiParentElementId:e,debugMode:n}=I(t,{requiresUI:!0});let o;try{const t=he({accessToken:a,stagingToken:r||void 0,debugMode:n});o=await me({iframeUrl:t,parentElementId:e});const i=Ge(v);d=await o.postMessage(fe({actionId:c.TRANSFER_SINGLE_CREATE,actionData:{body:{transfer:{...i}},idempotencyKey:s}}))}finally{o?.destroy()}}return He(d)},cancelSepaTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e)throw new i("sepaTransferId parameter is required for the called function");if("string"!=typeof e)throw new i("sepaTransferId must be a string");return e}(e?.sepaTransferId),{proxyRequestFunction:a,accessToken:r,stagingToken:s}=I(t||{});if(a){const e=F(Je({sepaTransferId:n}));B(await a(e))}else{const e=r||o();await async function({sepaTransferId:e,accessToken:t,stagingToken:n}){const a=Je({sepaTransferId:e,accessToken:t,stagingToken:n});await j(a)}({sepaTransferId:n,accessToken:e,stagingToken:s})}},getSepaTransferCreationFlowLink:async function({sepaTransferSettings:e,operationSettings:t}){const n=function(e){if(!e||!e.callbackUrl)throw new i("callbackUrl parameter is required for the getSepaTransferCreationFlowLink function");if("string"!=typeof e.callbackUrl)throw new i("callbackUrl must be a string");return e.callbackUrl}(e),{proxyRequestFunction:a,stagingToken:r,accessToken:s}=I(t||{}),c=a?{proxyRequestFunction:a}:{stagingToken:r,accessToken:s||o()},d=await ct.request({requestSettings:{action:m.SEPA_TRANSFER_CREATE,callbackUrl:n},operationSettings:c});return{...d,url:it(d.url,t)}},bulkTransfers:{getBulkTransfers:async function(e){const{operationSettings:t}=e||{},n=t?.accessToken||o(),{stagingToken:a,paginationSettings:r}=I(t||{}),i=await async function({accessToken:e,stagingToken:t,paginationSettings:n}){const a={method:"GET",headers:z({accessToken:e,stagingToken:t})},r=$e({endpointUrl:new URL(`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Xe}`),paginationSettings:n}),o=await fetch(r,a);if(!o.ok)throw new U("Failed to fetch SEPA bulk transfers");const i=await o.json();if(i.errors)throw new U(i.errors.map((e=>`${e.code}: ${e.detail}`)));return{bulkTransfers:i.bulk_transfers,meta:i.meta}}({accessToken:n,stagingToken:a,paginationSettings:r}),s=i.bulkTransfers?.map(Fe),c=Re(i.meta);return{bulkTransfers:s,...c?{meta:c}:{}}},getBulkTransfer:async function({sepaTransferSettings:e,operationSettings:t}){const n=t?.accessToken||o(),{stagingToken:a}=I(t||{}),r=function(e){if(!e)throw new i("bulkTransferId parameter is required for the called function.");if("string"!=typeof e)throw new i("bulkTransferId must be a string.");return e}(e?.bulkTransferId);return Fe(await async function({accessToken:e,stagingToken:t,bulkTransferId:n}){const a={method:"GET",headers:z({accessToken:e,stagingToken:t})},r=new URL(`${A.getEnvironmentUrls().THIRD_PARTY_API_URL}${Xe}/${n}`),o=await fetch(r,a),i=await o.json();if(i.errors)throw new U(i.errors.map((e=>`${e.code}: ${e.detail}`)));return i.bulk_transfer}({accessToken:n,stagingToken:a,bulkTransferId:r}))},createBulkTransfer:async function*({bulkTransferSettings:e,operationSettings:t}){const a=t?.accessToken||o(),r=t?.stagingToken||n.getStagingToken(),i=t?.idempotencyKey||ge();tt(e);const{uiParentElementId:s,debugMode:d}=I(t,{requiresUI:!0});if(!x())throw new rt(nt);const l=new Map;for(const t of e.bulkTransfers){const e=t.beneficiary.iban;e&&!l.has(e)&&l.set(e,{name:t.beneficiary.name,iban:e})}const u=Array.from(l.values()),g=await et({sepaPayees:u,accessToken:a,stagingToken:r||void 0});if((yield g.requests.map(Be))===h.REJECT)return;let f,p;try{const t=he({accessToken:a,stagingToken:r||void 0,debugMode:d});p=await me({iframeUrl:t,parentElementId:s});const n={bankAccountId:e.bankAccountId,bulkTransfers:e.bulkTransfers.map((e=>function(e){return{beneficiary_id:e.beneficiaryId||e.beneficiary?.id,client_transfer_id:e.clientTransferId,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentsIds?{attachment_ids:e.attachmentsIds}:{}}}(e)))};f=await p.postMessage(fe({actionId:c.TRANSFER_BULK_CREATE,actionData:{body:n,idempotencyKey:i}}))}finally{p?.destroy()}return Fe(f)}}},ut={GOOD:"good",SERVICE:"service"},gt={AED:"AED",AUD:"AUD",BGN:"BGN",CAD:"CAD",CHF:"CHF",CNY:"CNY",CZK:"CZK",DKK:"DKK",EUR:"EUR",GBP:"GBP",GHS:"GHS",HKD:"HKD",HUF:"HUF",ILS:"ILS",INR:"INR",MXN:"MXN",NOK:"NOK",NZD:"NZD",PEN:"PEN",PLN:"PLN",RON:"RON",RSD:"RSD",SAR:"SAR",SEK:"SEK",SGD:"SGD",TRY:"TRY",USD:"USD",ZAR:"ZAR",ZMW:"ZMW"},ft=e=>{if(!(e=>Object.values(gt).includes(e))(e))throw new i(`currency ${e} is not valid, valid currencies are ${Object.values(gt).join(", ")}`)},pt={UNIT:"unit",HOUR:"hour",DAY:"day",MONTH:"month",GRAM:"gram",KILOGRAM:"kilogram",LITER:"liter",METER:"meter",SQUARE_METER:"square_meter",CUBIC_METER:"cubic_meter",AMPERE:"ampere",NUMBER_OF_ARTICLES:"number_of_articles",CENTIMETER:"centimeter",CUBIC_METER_PER_HOUR:"cubic_meter_per_hour",GIGAJOULE:"gigajoule",GIGAWATT:"gigawatt",GIGAWATT_HOUR:"gigawatt_hour",HALF_YEAR:"half_year",JOULE:"joule",KILOJOULE:"kilojoule",KILOVAR:"kilovar",KILOWATT:"kilowatt",KILOWATT_HOUR:"kilowatt_hour",MEGAJOULE:"megajoule",MEGAWATT:"megawatt",MEGAWATT_HOUR:"megawatt_hour",MILLIGRAM:"milligram",MILLILITER:"milliliter",MILLIMETER:"millimeter",MINUTE:"minute",PAIR:"pair",QUARTER:"quarter",SECOND:"second",SET:"set",TON:"ton",TWO_WEEK:"two_week",WATT_HOUR:"watt_hour",WEEK:"week",YEAR:"year"},ht=e=>{if(!(e=>Object.values(pt).includes(e))(e))throw new i(`unit ${e} is not valid, valid units are ${Object.values(pt).join(", ")}`)},mt=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],bt=[{name:"currency"},{name:"value"}];const yt=e=>{if(!Object.values(ut).includes(e))throw new i(`type ${e} is not valid, valid types are ${Object.values(ut).join(", ")}`)},vt={getPaymentLinkCreationFlowUrl:({paymentLinkSettings:e})=>{const{items:t,authUrl:n}=e;!function(e){if(!e)throw new i("authUrl is required for the called function");const t=X({authUrl:e});if(t.length>0)throw new i(t);try{new URL(e)}catch{throw new i("authUrl is not a valid URL")}}(n),function(e){if(!e||!Array.isArray(e))return[];e.forEach((e=>{Q(e,mt),Q(e.unitPrice,bt);const t=[...X({id:e.id,title:e.title,vatRate:e.vatRate,currency:e.unitPrice.currency,measureUnit:e.measureUnit,unitPrice:e.unitPrice.value,...e.description?{description:e.description}:{}}),...te({quantity:e.quantity})].flat();if(t.length>0)throw new i(t);yt(e.type),ft(e.unitPrice.currency),ht(e.measureUnit)}))}(t);const a=new URLSearchParams({...t?{items:JSON.stringify(t)}:{}});return a.toString()?`${n}?${a.toString()}`:n}},_t=({accessToken:e,stagingToken:t})=>({path:"/v2/organization/",options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),wt=({accessToken:e,stagingToken:t})=>({path:"/v2/bank_accounts/",options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),Tt=e=>({id:e.id,slug:e.slug,legalName:e.legal_name,legalNumber:e.legal_number,legalSector:e.legal_sector,legalRegistrationDate:e.legal_registration_date,legalAddress:e.legal_address,legalForm:e.legal_form,legalCountry:e.legal_country,legalShareCapital:e.legal_share_capital,locale:e.locale,contractSignedAt:e.contract_signed_at,bankAccounts:e.bank_accounts.map(kt)}),kt=e=>({id:e?.id,slug:e.slug,iban:e.iban,bic:e.bic,currency:e.currency,balance:parseFloat(e.balance),balanceCents:e.balance_cents,authorizedBalance:e.authorized_balance,authorizedBalanceCents:e.authorized_balance_cents,name:e.name,updatedAt:new Date(e.updated_at),status:e.status,main:e.main}),Et={getOrganization:async e=>{const{stagingToken:t,proxyRequestFunction:n}=I(e);if(n){const e=_t({stagingToken:t}),a=await n(F(e)),{body:r}=B(a);return Tt(r.organization)}{const n=e.accessToken||o(),a=await(async({accessToken:e,stagingToken:t})=>{const n=_t({accessToken:e,stagingToken:t});return await j(n)})({accessToken:n,stagingToken:t});return Tt(a.organization)}},getBankAccounts:async e=>{const{stagingToken:t,proxyRequestFunction:n}=I(e);if(n){const e=wt({stagingToken:t}),a=await n(F(e)),{body:r}=B(a);return r.bank_accounts.map(kt)}{const n=e.accessToken||o(),a=await(async({accessToken:e,stagingToken:t})=>{const n=wt({accessToken:e,stagingToken:t});return await j(n)})({accessToken:n,stagingToken:t});return a.bank_accounts.map(kt)}}},At="/v2/transactions";function St({bankAccountId:e,iban:t,status:n,updatedAtFrom:a,updatedAtTo:r,emittedAtFrom:o,emittedAtTo:i,settledAtFrom:s,settledAtTo:c,side:d,operationType:l,withAttachments:u,paginationSettings:g,accessToken:f,stagingToken:p}){const h={method:"GET",headers:{accessToken:f,stagingToken:p}},m=new URLSearchParams;e&&m.append("bank_account_id",e),t&&m.append("iban",t),n&&m.append("status",n),a&&m.append("updated_at_from",a),r&&m.append("updated_at_to",r),o&&m.append("emitted_at_from",o),i&&m.append("emitted_at_to",i),s&&m.append("settled_at_from",s),c&&m.append("settled_at_to",c),d&&m.append("side",d),l&&m.append("operation_type",l),void 0!==u&&m.append("with_attachments",String(u));const b=Ie(g);for(const[e,t]of b)m.append(e,t);const y=m.toString();return{path:`${At}${y?`?${y}`:""}`,options:h}}function It({transactionId:e,accessToken:t,stagingToken:n}){return{path:`${At}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:n}}}}function $t(e){return{transactionId:e.transaction_id,amount:e.amount,amountCents:e.amount_cents,settledBalance:e.settled_balance,settledBalanceCents:e.settled_balance_cents,attachmentIds:e.attachment_ids,localAmount:e.local_amount,localAmountCents:e.local_amount_cents,side:e.side,operationType:e.operation_type,currency:e.currency,localCurrency:e.local_currency,label:e.label,settledAt:new Date(e.settled_at),emittedAt:new Date(e.emitted_at),updatedAt:new Date(e.updated_at),status:e.status,note:e.note,reference:e.reference,vatAmount:e.vat_amount,vatAmountCents:e.vat_amount_cents,vatRate:e.vat_rate,initiatorId:e.initiator_id,labelIds:e.label_ids,attachmentLost:e.attachment_lost,attachmentRequired:e.attachment_required,cardLastDigits:e.card_last_digits,category:e.category,cashflowCategory:{name:e.cashflow_category?.name||""},cashflowSubcategory:{name:e.cashflow_subcategory?.name||""},id:e.id,subjectType:e.subject_type,...e.transfer?{transfer:{counterpartyAccountNumber:e.transfer.counterparty_account_number,counterpartyName:e.transfer.counterparty_name,counterpartyBic:e.transfer.counterparty_bic,counterpartyIban:e.transfer.counterparty_iban}}:{}}}const Rt={getTransactions:async function(e){const{stagingToken:t,proxyRequestFunction:n,accessToken:a,paginationSettings:r}=I(e?.operationSettings||{}),i={...e?.transactionSettings||{},paginationSettings:r};if(n){const e=F(St(i)),t=B(await n(e));return{transactions:t.body.transactions.map($t),meta:t.body.meta}}{const e=a||o(),n=await async function(e){const t=St(e),{transactions:n,meta:a}=await j(t);return{transactions:n,meta:a}}({...i,accessToken:e,stagingToken:t});return{transactions:n.transactions.map($t),meta:n.meta}}},getTransaction:async function({transactionSettings:e,operationSettings:t}){const{proxyRequestFunction:n,accessToken:a,stagingToken:r}=I(t||{}),{transactionId:s}=function(e){if(!e)throw new i("transactionSettings parameter is required for the called function");if(!e.transactionId)throw new i("transactionSettings.transactionId parameter is required for the called function");if(e.transactionId&&"string"!=typeof e.transactionId)throw new i("transactionSettings.transactionId must be a string.");return e}(e);if(n){const e=F(It({transactionId:s}));return $t(B(await n(e)).body.transaction)}{const e=a||o();return $t(await async function(e){const t=It(e),{transaction:n}=await j(t);return n}({transactionId:s,accessToken:e,stagingToken:r}))}}},Pt=Rt,Ct={TRANSFER_LIST:"transfer-list"};function Lt(e,t,n,a){var r,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}"function"==typeof SuppressedError&&SuppressedError;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const Nt=globalThis,qt=Nt.ShadowRoot&&(void 0===Nt.ShadyCSS||Nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),Dt=new WeakMap;let Ut=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(qt&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Dt.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Dt.set(t,e))}return e}toString(){return this.cssText}};const xt=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,a)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[a+1]),e[0]);return new Ut(n,e,Ot)},Mt=qt?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Ut("string"==typeof e?e:e+"",void 0,Ot))(t)})(e):e
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/,{is:
|
|
12
|
+
*/,{is:zt,defineProperty:jt,getOwnPropertyDescriptor:Ft,getOwnPropertyNames:Bt,getOwnPropertySymbols:Ht,getPrototypeOf:Gt}=Object,Kt=globalThis,Yt=Kt.trustedTypes,Vt=Yt?Yt.emptyScript:"",Wt=Kt.reactiveElementPolyfillSupport,Zt=(e,t)=>e,Jt={toAttribute(e,t){switch(t){case Boolean:e=e?Vt:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Qt=(e,t)=>!zt(e,t),Xt={attribute:!0,type:String,converter:Jt,reflect:!1,useDefault:!1,hasChanged:Qt};Symbol.metadata??=Symbol("metadata"),Kt.litPropertyMetadata??=new WeakMap;let en=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Xt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),a=this.getPropertyDescriptor(e,n,t);void 0!==a&&jt(this.prototype,e,a)}}static getPropertyDescriptor(e,t,n){const{get:a,set:r}=Ft(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:a,set(t){const o=a?.call(this);r?.call(this,t),this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Xt}static _$Ei(){if(this.hasOwnProperty(Zt("elementProperties")))return;const e=Gt(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Zt("properties"))){const e=this.properties,t=[...Bt(e),...Ht(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Mt(e))}else void 0!==e&&t.push(Mt(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(qt)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),a=Nt.litNonce;void 0!==a&&t.setAttribute("nonce",a),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(void 0!==a&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:Jt).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(a):this.setAttribute(a,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,a=n._$Eh.get(e);if(void 0!==a&&this._$Em!==a){const e=n.getPropertyOptions(a),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Jt;this._$Em=a;const o=r.fromAttribute(t,e.type);this[a]=o??this._$Ej?.get(a)??o,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const a=this.constructor,r=this[e];if(n??=a.getPropertyOptions(e),!((n.hasChanged??Qt)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:a,wrapped:r},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==r||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===a&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,a=this[t];!0!==e||this._$AL.has(t)||void 0===a||this.C(t,void 0,n,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};en.elementStyles=[],en.shadowRootOptions={mode:"open"},en[Zt("elementProperties")]=new Map,en[Zt("finalized")]=new Map,Wt?.({ReactiveElement:en}),(Kt.reactiveElementVersions??=[]).push("2.1.1");
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const tn=globalThis,nn=tn.trustedTypes,an=nn?nn.createPolicy("lit-html",{createHTML:e=>e}):void 0,rn="$lit$",on=`lit$${Math.random().toFixed(9).slice(2)}$`,sn="?"+on,cn=`<${sn}>`,dn=document,ln=()=>dn.createComment(""),un=e=>null===e||"object"!=typeof e&&"function"!=typeof e,gn=Array.isArray,fn="[ \t\n\f\r]",pn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hn=/-->/g,mn=/>/g,bn=RegExp(`>|${fn}(?:([^\\s"'>=/]+)(${fn}*=${fn}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),yn=/'/g,vn=/"/g,_n=/^(?:script|style|textarea|title)$/i,wn=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Tn=wn(1),kn=wn(2),En=Symbol.for("lit-noChange"),An=Symbol.for("lit-nothing"),Sn=new WeakMap,In=dn.createTreeWalker(dn,129);function $n(e,t){if(!gn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==an?an.createHTML(t):t}const Rn=(e,t)=>{const n=e.length-1,a=[];let r,o=2===t?"<svg>":3===t?"<math>":"",i=pn;for(let t=0;t<n;t++){const n=e[t];let s,c,d=-1,l=0;for(;l<n.length&&(i.lastIndex=l,c=i.exec(n),null!==c);)l=i.lastIndex,i===pn?"!--"===c[1]?i=hn:void 0!==c[1]?i=mn:void 0!==c[2]?(_n.test(c[2])&&(r=RegExp("</"+c[2],"g")),i=bn):void 0!==c[3]&&(i=bn):i===bn?">"===c[0]?(i=r??pn,d=-1):void 0===c[1]?d=-2:(d=i.lastIndex-c[2].length,s=c[1],i=void 0===c[3]?bn:'"'===c[3]?vn:yn):i===vn||i===yn?i=bn:i===hn||i===mn?i=pn:(i=bn,r=void 0);const u=i===bn&&e[t+1].startsWith("/>")?" ":"";o+=i===pn?n+cn:d>=0?(a.push(s),n.slice(0,d)+rn+n.slice(d)+on+u):n+on+(-2===d?t:u)}return[$n(e,o+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]};class Pn{constructor({strings:e,_$litType$:t},n){let a;this.parts=[];let r=0,o=0;const i=e.length-1,s=this.parts,[c,d]=Rn(e,t);if(this.el=Pn.createElement(c,n),In.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(a=In.nextNode())&&s.length<i;){if(1===a.nodeType){if(a.hasAttributes())for(const e of a.getAttributeNames())if(e.endsWith(rn)){const t=d[o++],n=a.getAttribute(e).split(on),i=/([.?@])?(.*)/.exec(t);s.push({type:1,index:r,name:i[2],strings:n,ctor:"."===i[1]?On:"?"===i[1]?Dn:"@"===i[1]?Un:qn}),a.removeAttribute(e)}else e.startsWith(on)&&(s.push({type:6,index:r}),a.removeAttribute(e));if(_n.test(a.tagName)){const e=a.textContent.split(on),t=e.length-1;if(t>0){a.textContent=nn?nn.emptyScript:"";for(let n=0;n<t;n++)a.append(e[n],ln()),In.nextNode(),s.push({type:2,index:++r});a.append(e[t],ln())}}}else if(8===a.nodeType)if(a.data===sn)s.push({type:2,index:r});else{let e=-1;for(;-1!==(e=a.data.indexOf(on,e+1));)s.push({type:7,index:r}),e+=on.length-1}r++}}static createElement(e,t){const n=dn.createElement("template");return n.innerHTML=e,n}}function Cn(e,t,n=e,a){if(t===En)return t;let r=void 0!==a?n._$Co?.[a]:n._$Cl;const o=un(t)?void 0:t._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(e),r._$AT(e,n,a)),void 0!==a?(n._$Co??=[])[a]=r:n._$Cl=r),void 0!==r&&(t=Cn(e,r._$AS(e,t.values),r,a)),t}class Ln{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,a=(e?.creationScope??dn).importNode(t,!0);In.currentNode=a;let r=In.nextNode(),o=0,i=0,s=n[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new Nn(r,r.nextSibling,this,e):1===s.type?t=new s.ctor(r,s.name,s.strings,this,e):6===s.type&&(t=new xn(r,this,e)),this._$AV.push(t),s=n[++i]}o!==s?.index&&(r=In.nextNode(),o++)}return In.currentNode=dn,a}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Nn{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,a){this.type=2,this._$AH=An,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Cn(this,e,t),un(e)?e===An||null==e||""===e?(this._$AH!==An&&this._$AR(),this._$AH=An):e!==this._$AH&&e!==En&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>gn(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==An&&un(this._$AH)?this._$AA.nextSibling.data=e:this.T(dn.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,a="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Pn.createElement($n(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(t);else{const e=new Ln(a,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Sn.get(e.strings);return void 0===t&&Sn.set(e.strings,t=new Pn(e)),t}k(e){gn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,a=0;for(const r of e)a===t.length?t.push(n=new Nn(this.O(ln()),this.O(ln()),this,this.options)):n=t[a],n._$AI(r),a++;a<t.length&&(this._$AR(n&&n._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class qn{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,a,r){this.type=1,this._$AH=An,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=An}_$AI(e,t=this,n,a){const r=this.strings;let o=!1;if(void 0===r)e=Cn(this,e,t,0),o=!un(e)||e!==this._$AH&&e!==En,o&&(this._$AH=e);else{const a=e;let i,s;for(e=r[0],i=0;i<r.length-1;i++)s=Cn(this,a[n+i],t,i),s===En&&(s=this._$AH[i]),o||=!un(s)||s!==this._$AH[i],s===An?e=An:e!==An&&(e+=(s??"")+r[i+1]),this._$AH[i]=s}o&&!a&&this.j(e)}j(e){e===An?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class On extends qn{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===An?void 0:e}}class Dn extends qn{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==An)}}class Un extends qn{constructor(e,t,n,a,r){super(e,t,n,a,r),this.type=5}_$AI(e,t=this){if((e=Cn(this,e,t,0)??An)===En)return;const n=this._$AH,a=e===An&&n!==An||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==An&&(n===An||a);a&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class xn{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Cn(this,e)}}const Mn=tn.litHtmlPolyfillSupport;Mn?.(Pn,Nn),(tn.litHtmlVersions??=[]).push("3.3.1");const zn=globalThis;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/let
|
|
23
|
+
*/let jn=class extends en{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const a=n?.renderBefore??t;let r=a._$litPart$;if(void 0===r){const e=n?.renderBefore??null;a._$litPart$=r=new Nn(t.insertBefore(ln(),e),e,void 0,n??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return En}};jn._$litElement$=!0,jn.finalized=!0,zn.litElementHydrateSupport?.({LitElement:jn});const Fn=zn.litElementPolyfillSupport;Fn?.({LitElement:jn}),(zn.litElementVersions??=[]).push("4.2.1");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const Bn=e=>(t,n)=>{void 0!==n?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)}
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/,
|
|
34
|
+
*/,Hn={attribute:!0,type:String,converter:Jt,reflect:!1,hasChanged:Qt},Gn=(e=Hn,t,n)=>{const{kind:a,metadata:r}=n;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),o.set(n.name,e),"accessor"===a){const{name:a}=n;return{set(n){const r=t.get.call(this);t.set.call(this,n),this.requestUpdate(a,r,e)},init(t){return void 0!==t&&this.C(a,void 0,e,t),t}}}if("setter"===a){const{name:a}=n;return function(n){const r=this[a];t.call(this,n),this.requestUpdate(a,r,e)}}throw Error("Unsupported decorator location: "+a)};function Kn(e){return(t,n)=>"object"==typeof n?Gn(e,t,n):((e,t,n)=>{const a=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),a?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/}function
|
|
39
|
+
*/}function Yn(e){return Kn({...e,state:!0,attribute:!1})}
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2021 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const
|
|
44
|
+
*/const Vn="lit-localize-status",Wn=(e,...t)=>({strTag:!0,strings:e,values:t}),Zn=(e,t,n)=>{let a=e[0];for(let r=1;r<e.length;r++)a+=t[n?n[r-1]:r-1],a+=e[r];return a},Jn=e=>{return"string"!=typeof(t=e)&&"strTag"in t?Zn(e.strings,e.values):e;var t};
|
|
45
45
|
/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2021 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/let
|
|
49
|
+
*/let Qn=Jn,Xn=!1;
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2021 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
54
|
*/
|
|
55
|
-
class
|
|
55
|
+
class ea{constructor(e){this.__litLocalizeEventHandler=e=>{"ready"===e.detail.status&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(Vn,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(Vn,this.__litLocalizeEventHandler)}}const ta=e=>e.addController(new ea(e));
|
|
56
56
|
/**
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright 2020 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
60
|
*/
|
|
61
|
-
class
|
|
61
|
+
class na{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}
|
|
62
62
|
/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2014 Travis Webb
|
|
65
65
|
* SPDX-License-Identifier: MIT
|
|
66
|
-
*/const
|
|
66
|
+
*/const aa=[];for(let e=0;e<256;e++)aa[e]=(e>>4&15).toString(16)+(15&e).toString(16);function ra(e,t){return(t?"h":"s")+function(e){let t=0,n=8997,a=0,r=33826,o=0,i=40164,s=0,c=52210;for(let d=0;d<e.length;d++)n^=e.charCodeAt(d),t=435*n,a=435*r,o=435*i,s=435*c,o+=n<<8,s+=r<<8,a+=t>>>16,n=65535&t,o+=a>>>16,r=65535&a,c=s+(o>>>16)&65535,i=65535&o;return aa[c>>8]+aa[255&c]+aa[i>>8]+aa[255&i]+aa[r>>8]+aa[255&r]+aa[n>>8]+aa[255&n]}
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright 2020 Google LLC
|
|
@@ -73,12 +73,12 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2021 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
76
|
-
*/const
|
|
76
|
+
*/const oa=new WeakMap,ia=new Map;function sa(e,t,n){if(e){const a=n?.id??function(e){const t="string"==typeof e?e:e.strings;let n=ia.get(t);void 0===n&&(n=ra(t,"string"!=typeof e&&!("strTag"in e)),ia.set(t,n));return n}
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
79
79
|
* Copyright 2021 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
|
-
*/(t),r=e[a];if(r){if("string"==typeof r)return r;if("strTag"in r)return
|
|
81
|
+
*/(t),r=e[a];if(r){if("string"==typeof r)return r;if("strTag"in r)return Zn(r.strings,t.values,r.values);{let e=oa.get(r);return void 0===e&&(e=r.values,oa.set(r,e)),{...r,values:e.map((e=>t.values[e]))}}}}return Jn(t)}function ca(e){window.dispatchEvent(new CustomEvent(Vn,{detail:e}))}let da,la,ua,ga,fa,pa="",ha=new na;ha.resolve();let ma=0;const ba=()=>pa,ya=e=>{if(e===(da??pa))return ha.promise;if(!ua||!ga)throw new Error("Internal error");if(!ua.has(e))throw new Error("Invalid locale code");ma++;const t=ma;da=e,ha.settled&&(ha=new na),ca({status:"loading",loadingLocale:e});return(e===la?Promise.resolve({templates:void 0}):ga(e)).then((n=>{ma===t&&(pa=e,da=void 0,fa=n.templates,ca({status:"ready",readyLocale:e}),ha.resolve())}),(n=>{ma===t&&(ca({status:"error",errorLocale:e,errorMessage:n.toString()}),ha.reject(n))})),ha.promise},va=xt`
|
|
82
82
|
:host {
|
|
83
83
|
--default-table-border: 1px solid var(--border-tertiary);
|
|
84
84
|
|
|
@@ -237,7 +237,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
237
237
|
display: flex;
|
|
238
238
|
gap: 8px;
|
|
239
239
|
}
|
|
240
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:500 900;src:url(/fonts/polysans-median.woff2) format("woff2"),url(/fonts/polysans-median.woff) format("woff")}@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:400;src:url(/fonts/polysans-neutral.woff2) format("woff2"),url(/fonts/polysans-neutral.woff) format("woff")}@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:100 300;src:url(/fonts/polysans-slim.woff2) format("woff2"),url(/fonts/polysans-slim.woff) format("woff")}:root *{--default-font-family:PolySans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-family:var(--qonto-font-family,var(--default-font-family))}:root{--font-weight-median:600;--font-weight-neutral:400;--font-weight-slim:300;--title-1-font-size:32px;--title-1-font-weight:var(--font-weight-median);--title-1-line-height:40px;--title-2-font-size:24px;--title-2-font-weight:var(--font-weight-median);--title-2-line-height:32px;--title-3-font-size:20px;--title-3-font-weight:var(--font-weight-neutral);--title-3-line-height:32px;--title-4-font-size:16px;--title-4-font-weight:var(--font-weight-neutral);--title-4-line-height:24px;--body-1-font-size:14px;--body-1-font-weight:var(--font-weight-neutral);--body-1-line-height:24px;--body-2-font-size:14px;--body-2-font-weight:var(--font-weight-slim);--body-2-line-height:24px;--body-link-font-size:14px;--body-link-font-weight:var(--font-weight-neutral);--body-link-line-height:24px;--caption-font-size:12px;--caption-font-weight:var(--font-weight-neutral);--caption-line-height:16px;--caption-bold-font-size:12px;--caption-bold-font-weight:var(--font-weight-median);--caption-bold-line-height:16px;--caption-link-font-size:12px;--caption-link-font-weight:var(--font-weight-neutral);--caption-link-line-height:16px;--primary-black:#050505;--primary-white:#fff;--plum1000:#461068;--plum900:#7b4db8;--plum800:#a585db;--plum100:#bfa6ea;--plum50:#d5c8ff;--sakura1000:#7e0f4c;--sakura900:#c24b89;--sakura800:#e975b2;--sakura100:#ffacd6;--sakura50:#ffdfea;--mint1000:#0d5563;--mint900:#2f95a0;--mint800:#66c8c8;--mint100:#9be5da;--mint50:#c8ffec;--blueberry1000:#093b75;--blueberry900:#3275c4;--blueberry800:#71a5e0;--blueberry100:#9bc5ea;--blueberry50:#c6e6fb;--mustard1000:#705208;--mustard900:#c5a635;--mustard800:#f0e060;--mustard100:#f5f596;--mustard50:#faffa4;--peach1000:#7a250c;--peach900:#ce6033;--peach800:#ff9e75;--peach100:#ffb590;--peach50:#ffc9a6;--gray900:#1a1a1a;--gray800:#262626;--gray700:#3d3d3d;--gray600:#616161;--gray500:#8f8f8f;--gray400:#b8b8b8;--gray300:#ccc;--gray200:#e0e0e0;--gray100:#e8e8e8;--gray50:#f5f5f5;--gray25:#f9f9f9;--success1000:#0f7a3d;--success800:#2bad5f;--success400:#66db7c;--success300:#a5f2a3;--success50:#e6ffe4;--warning1000:#b04e10;--warning800:#dc9433;--warning400:#ffd870;--warning300:#ffe5aa;--warning50:#fff2d9;--error1000:#b81818;--error800:#e04545;--error400:#ff8585;--error300:#ffbabe;--error50:#ffe8e8;--elevation-default:var(--primary-white);--elevation-low:var(--gray25);--elevation-mid:var(--primary-white);--elevation-high:var(--primary-white);--background-primary:var(--qonto-color-primary,var(--primary-black));--background-secondary:var(--gray100);--background-tertiary:var(--gray50);--background-accent-low:var(--blueberry50);--background-accent-high:var(--blueberry900);--background-accent-static:var(--blueberry800);--background-success-low:var(--success50);--background-success-high:var(--success800);--background-warning-low:var(--warning50);--background-warning-high:var(--warning800);--background-error-low:var(--error50);--background-error-high:var(--error800);--background-modal-overlay:#61616199;--background-panel-overlay:#6161611a;--background-toggle:var(--gray400);--background-toggle-button:var(--primary-white);--background-skeleton-shimmer:var(--gray200);--background-feature-discoverability:var(--mustard50);--background-free-trial:var(--mint50);--background-upgrade-low:var(--peach50);--background-upgrade-high:var(--peach1000);--background-activate:var(--plum50);--background-splitscreen-peach:var(--peach50);--content-primary-a:var(--qonto-content-color-primary,var(--primary-black));--content-primary-b:var(--primary-white);--content-secondary:var(--gray600);--content-tertiary:var(--gray500);--content-accent:var(--blueberry900);--content-success:var(--success1000);--content-warning:var(--warning1000);--content-error:var(--error1000);--content-primary-a-static:var(--primary-black);--content-primary-b-static:var(--primary-white);--border-primary:var(--primary-black);--border-secondary:var(--gray300);--border-tertiary:var(--gray100);--border-avatar:#05050533;--border-accent-low:var(--blueberry50);--border-accent-high:var(--blueberry900);--border-accent-static:var(--blueberry100);--border-success:var(--success800);--border-warning:var(--warning800);--border-error:var(--error800);--border-upsell:var(--mint800);--dataviz-balance:var(--blueberry800);--dataviz-change:var(--warning800);--dataviz-inflows:var(--success400);--dataviz-outflows:var(--error400);--dataviz-slice-1:var(--plum800);--dataviz-slice-2:var(--mint800);--dataviz-slice-3:var(--blueberry800);--dataviz-slice-4:var(--mustard800);--dataviz-slice-5:var(--peach800);--dataviz-slice-6:var(--plum50);--dataviz-slice-7:var(--sakura800);--dataviz-other:var(--gray400);--dataviz-uncategorized:var(--gray200);--dataviz-empty:var(--gray50);--analytic-label-cat-1:var(--error800);--analytic-label-cat-2:var(--success800);--analytic-label-cat-3:var(--warning800);--analytic-label-cat-4:var(--mint800);--analytic-label-cat-5:var(--mustard800);--analytic-label-cat-6:var(--peach800);--analytic-label-cat-7:var(--blueberry800);--analytic-label-cat-8:var(--plum800);--analytic-label-cat-9:var(--sakura800);--analytic-label-cat10:var(--plum50);--category-purple:var(--plum100);--category-mint:var(--mint100);--category-mustard:var(--mustard100);--category-peach:var(--peach100);--category-blue:var(--blueberry100);--category-green:var(--success300);--category-pink:var(--sakura100);--category-gray:var(--gray100);--shadow-color-low:#0505050f;--shadow-color-high:#0505051f;--state-selected:var(--gray50);--state-primary-a-hover:#05050514;--state-disabled:#f5f5f573;--state-primary-a-pressed:#0505051f;--state-primary-b-hover:#ffffff14;--state-primary-b-pressed:#ffffff1f}:root .dark-theme{--elevation-default:var(--primary-black);--elevation-low:var(--gray900);--elevation-mid:var(--gray900);--elevation-high:var(--gray800);--background-primary:var(--gray25);--background-secondary:var(--gray600);--background-tertiary:var(--gray700);--background-accent-low:var(--blueberry1000);--background-accent-high:var(--blueberry900);--background-accent-static:var(--blueberry800);--background-success-low:var(--success1000);--background-success-high:var(--success800);--background-warning-low:var(--warning1000);--background-warning-high:var(--warning300);--background-error-low:var(--error1000);--background-error-high:var(--error800);--background-modal-overlay:#05050599;--background-panel-overlay:#05050566;--background-toggle:var(--gray600);--background-toggle-button:var(--gray300);--background-skeleton-shimmer:var(--gray700);--background-feature-discoverability:var(--mustard1000);--background-free-trial:var(--mint900);--background-upgrade-low:var(--peach900);--background-upgrade-high:var(--peach50);--background-activate:var(--plum900);--background-splitscreen-peach:var(--peach900);--content-primary-a:var(--gray25);--content-primary-b:var(--primary-black);--content-secondary:var(--gray300);--content-tertiary:var(--gray500);--content-accent:var(--blueberry800);--content-success:var(--success400);--content-warning:var(--warning400);--content-error:var(--error400);--content-primary-a-static:var(--primary-black);--content-primary-b-static:var(--primary-white);--border-primary:var(--gray25);--border-secondary:var(--gray500);--border-tertiary:#ffffff29;--border-avatar:#ffffff40;--border-accent-low:var(--blueberry1000);--border-accent-high:var(--blueberry800);--border-accent-static:var(--blueberry100);--border-success:var(--success400);--border-warning:var(--warning800);--border-error:var(--error400);--border-upsell:var(--mint100);--dataviz-balance:var(--blueberry800);--dataviz-change:var(--warning800);--dataviz-inflows:var(--success800);--dataviz-outflows:var(--error800);--dataviz-slice-1:var(--plum800);--dataviz-slice-2:var(--mint800);--dataviz-slice-3:var(--blueberry800);--dataviz-slice-4:var(--mustard800);--dataviz-slice-5:var(--peach800);--dataviz-slice-6:var(--plum50);--dataviz-slice-7:var(--sakura800);--dataviz-other:var(--gray400);--dataviz-uncategorized:var(--gray600);--dataviz-empty:var(--gray700);--category-purple:var(--plum100);--category-mint:var(--mint100);--category-mustard:var(--mustard100);--category-peach:var(--peach100);--category-blue:var(--blueberry100);--category-green:var(--success300);--category-pink:var(--sakura100);--category-gray:var(--gray100);--shadow-color-low:#05050552;--shadow-color-high:#050505a3;--state-selected:var(--gray700);--state-primary-a-hover:#ffffff14;--state-disabled:#f5f5f573;--state-primary-a-pressed:#ffffff1f;--state-primary-b-hover:#05050514;--state-primary-b-pressed:#0505051f;color-scheme:dark}:root,:root .dark-theme{--separator-bottom:inset 0 -1px 0 0 var(--border-tertiary);--shadow-low:0 3px 3px 0 var(--shadow-color-low);--shadow-high:0 3px 12px 0 var(--shadow-color-high);--background-placeholder:linear-gradient(to right,var(--background-secondary) 8%,var(--background-skeleton-shimmer) 18%,var(--background-secondary) 33%);--gradient-50:linear-gradient(90deg,var(--plum50),var(--blueberry50),var(--mint50));--gradient-800:linear-gradient(90deg,var(--plum800),var(--blueberry800),var(--mint800));--gradient-900:linear-gradient(90deg,var(--plum900),var(--blueberry900),var(--mint800));--gradient-1000:linear-gradient(90deg,var(--plum1000),var(--blueberry1000),var(--mint1000));--qonto-intelligence-gradient-content:var(--gradient-900);--qonto-intelligence-gradient-stroke:var(--gradient-900);--qonto-intelligence-gradient-background-high:var(--gradient-1000);--qonto-intelligence-gradient-background-low:var(--gradient-50);--qintelligence50:linear-gradient(90deg,var(--plum50) 0%,var(--blueberry50) 50%,var(--mint50) 100%);--qintelligence100:linear-gradient(90deg,var(--plum800) 0%,var(--blueberry800) 51.92%,var(--mint800) 100%);--qintelligence800:linear-gradient(90deg,var(--plum900) 0%,var(--blueberry900) 47.6%,var(--mint800) 100%);--qintelligence1000:linear-gradient(90deg,var(--plum1000) 0%,var(--blueberry1000) 50%,var(--mint900) 100%);--qintelligence-border:linear-gradient(90deg,var(--plum900) 0%,var(--blueberry900) 50%,var(--mint800) 100%)}:root{--overlay-primary-a-color:var(--primary-black);--overlay-primary-b-color:var(--primary-white);--qintelligence-low:var(--qintelligence50);--qintelligence-high:var(--qintelligence1000)}:root .dark-theme{--overlay-primary-a-color:var(--primary-white);--overlay-primary-b-color:var(--primary-black);--qintelligence-low:var(--qintelligence1000);--qintelligence-high:var(--qintelligence50)}:root{--overlay-opacity:0;--hover-opacity:0.08;--pressed-opacity:0.12;--disabled-opacity:0.45}.overlay{position:relative;&:after{background-color:var(--overlay-primary-a-color);content:"";height:100%;left:0;opacity:var(--overlay-opacity);pointer-events:none;position:absolute;top:0;width:100%}&:hover:after{--overlay-opacity:var(--hover-opacity)}&:active:after{--overlay-opacity:var(--pressed-opacity)}&[disabled]{cursor:not-allowed;&:after{--overlay-primary-a-color:var(--primary-white);--overlay-opacity:var(--disabled-opacity);cursor:not-allowed}}}');const ba=Object.values({EN:{name:"English",code:"en",locale:"en-US"},FR:{name:"Français",code:"fr",locale:"fr-FR"},IT:{name:"Italiano",code:"it",locale:"it-IT"},DE:{name:"Deutsch",code:"de",locale:"de-DE"},ES:{name:"Español",code:"es",locale:"es-ES"},PT:{name:"Português",code:"pt",locale:"pt-PT"},NL:{name:"Nederlands",code:"nl",locale:"nl-NL"}}),ya=ba.map((e=>e.code)),va={compact:{day:"2-digit",month:"2-digit",year:"numeric"},"date-s":{month:"short",day:"2-digit"},"month-year-l":{month:"long",year:"numeric"},"month-year-s":{month:"short",year:"numeric"},"date-year-s":{day:"2-digit",month:"short",year:"numeric"},"date-year-l":{day:"2-digit",month:"long",year:"numeric"},"week-date-l":{month:"long",weekday:"long",day:"2-digit"},"date-time-l":{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"},"date-time-s":{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"},"time-hm":{hour:"2-digit",minute:"2-digit"}},_a={en:{compact:([e,,t,,n])=>`${t?.value}-${e?.value}-${n?.value}`,"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},fr:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},de:{"date-time-l":e=>e.map((({value:e},t)=>[3,5].includes(t)?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},it:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},es:{compact:e=>e.map((({type:e,value:t})=>"literal"===e?"-":t)).join(""),"week-date-l":e=>e.map((({value:e},t)=>1===t?" ":e)).join("")},pt:{"date-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"month-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":e)).join(""),"date-time-s":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":"literal"===t&&" de "===e?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join("")},nl:{"date-s":e=>e.map((({value:e,type:t})=>"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).reverse().join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" om "===e?", ":e)).join(""),"week-date-l":e=>e.map((({value:e,type:t},n)=>1===n&&"literal"===t?", ":e)).join("")}},wa=({date:e,locale:t,token:n="compact"})=>{const a=Array.isArray(t)?t[0].toLocaleLowerCase():t.toLocaleLowerCase();if(!(e=>ya.includes(e))(a))return"";const r=va[n],o=_a[a][n],i=new Intl.DateTimeFormat(t,r);try{return o?.(i.formatToParts(new Date(e)))??i.format(new Date(e))}catch{return""}},Ta="money-iso",ka="money-iso-compact",Ea="money-iso-sign-compact",Aa="money-iso-sign-decimal",Sa="money-symbol",Ia="money-symbol-compact",$a="money-symbol-sign-compact",Ra="money-symbol-sign-decimal",Pa={[Ta]:{useSymbol:!1,sign:"auto",decimals:"always"},[ka]:{useSymbol:!1,sign:"auto",decimals:"if-needed"},[Ea]:{useSymbol:!1,sign:"always",decimals:"if-needed"},[Aa]:{useSymbol:!1,sign:"always",decimals:"always"},[Sa]:{useSymbol:!0,sign:"auto",decimals:"always"},[Ia]:{useSymbol:!0,sign:"auto",decimals:"if-needed"},[$a]:{useSymbol:!0,sign:"always",decimals:"if-needed"},[Ra]:{useSymbol:!0,sign:"always",decimals:"always"}},Ca={"pt-PT":(e,{amount:t})=>e.map((({type:e,value:n})=>"group"===e?Math.abs(t)>=1e4?n.replace(/\s/g,"."):n.replace(/\s/g,""):n)).join(""),"en-US":(e,{useSymbol:t})=>e.map((({type:e,value:n})=>t&&"literal"===e?n.replace(/\s/g,""):n)).join(""),"es-ES":e=>{const t=[];for(const n of e)if("integer"===n.type){const e=n.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(n.value);return t.join("")},"it-IT":e=>{const t=[];for(const n of e)if("integer"===n.type){const e=n.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(n.value);return t.join("")}};function La({amount:e,locale:t="en-US",currency:n="EUR",token:a=Ta,placeholder:r="--",overrides:o={}}){const i=Number(e);if(!Number.isFinite(i))return r;const s=function(e){const t=ba.find((t=>t.code===e));return t?.locale||e}(t),{useSymbol:c,sign:d,decimals:l}=Pa[a],u={style:"currency",currency:n,currencyDisplay:c?"symbol":"code",signDisplay:"always"===d&&0===i?"exceptZero":d,..."if-needed"!==l||i%1!=0?{}:{minimumFractionDigits:0,maximumFractionDigits:0},...o},g=new Intl.NumberFormat(s,u),f=Ca[s];if(f){return f(g.formatToParts(i),{amount:i,useSymbol:c})}return g.format(i)}class Na extends CustomEvent{constructor(e){super("transfer-selected",{detail:e,bubbles:!0,composed:!0})}}const qa=_n`<svg
|
|
240
|
+
`,_a=Object.values({EN:{name:"English",code:"en",locale:"en-US"},FR:{name:"Français",code:"fr",locale:"fr-FR"},IT:{name:"Italiano",code:"it",locale:"it-IT"},DE:{name:"Deutsch",code:"de",locale:"de-DE"},ES:{name:"Español",code:"es",locale:"es-ES"},PT:{name:"Português",code:"pt",locale:"pt-PT"},NL:{name:"Nederlands",code:"nl",locale:"nl-NL"}}),wa=_a.map((e=>e.code)),Ta={compact:{day:"2-digit",month:"2-digit",year:"numeric"},"date-s":{month:"short",day:"2-digit"},"month-year-l":{month:"long",year:"numeric"},"month-year-s":{month:"short",year:"numeric"},"date-year-s":{day:"2-digit",month:"short",year:"numeric"},"date-year-l":{day:"2-digit",month:"long",year:"numeric"},"week-date-l":{month:"long",weekday:"long",day:"2-digit"},"date-time-l":{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"},"date-time-s":{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"},"time-hm":{hour:"2-digit",minute:"2-digit"}},ka={en:{compact:([e,,t,,n])=>`${t?.value}-${e?.value}-${n?.value}`,"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},fr:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},de:{"date-time-l":e=>e.map((({value:e},t)=>[3,5].includes(t)?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},it:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},es:{compact:e=>e.map((({type:e,value:t})=>"literal"===e?"-":t)).join(""),"week-date-l":e=>e.map((({value:e},t)=>1===t?" ":e)).join("")},pt:{"date-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"month-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":e)).join(""),"date-time-s":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":"literal"===t&&" de "===e?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join("")},nl:{"date-s":e=>e.map((({value:e,type:t})=>"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).reverse().join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" om "===e?", ":e)).join(""),"week-date-l":e=>e.map((({value:e,type:t},n)=>1===n&&"literal"===t?", ":e)).join("")}},Ea=({date:e,locale:t,token:n="compact"})=>{const a=Array.isArray(t)?t[0].toLocaleLowerCase():t.toLocaleLowerCase();if(!(e=>wa.includes(e))(a))return"";const r=Ta[n],o=ka[a][n],i=new Intl.DateTimeFormat(t,r);try{return o?.(i.formatToParts(new Date(e)))??i.format(new Date(e))}catch{return""}},Aa="money-iso",Sa="money-iso-compact",Ia="money-iso-sign-compact",$a="money-iso-sign-decimal",Ra="money-symbol",Pa="money-symbol-compact",Ca="money-symbol-sign-compact",La="money-symbol-sign-decimal",Na={[Aa]:{useSymbol:!1,sign:"auto",decimals:"always"},[Sa]:{useSymbol:!1,sign:"auto",decimals:"if-needed"},[Ia]:{useSymbol:!1,sign:"always",decimals:"if-needed"},[$a]:{useSymbol:!1,sign:"always",decimals:"always"},[Ra]:{useSymbol:!0,sign:"auto",decimals:"always"},[Pa]:{useSymbol:!0,sign:"auto",decimals:"if-needed"},[Ca]:{useSymbol:!0,sign:"always",decimals:"if-needed"},[La]:{useSymbol:!0,sign:"always",decimals:"always"}},qa={"pt-PT":(e,{amount:t})=>e.map((({type:e,value:n})=>"group"===e?Math.abs(t)>=1e4?n.replace(/\s/g,"."):n.replace(/\s/g,""):n)).join(""),"en-US":(e,{useSymbol:t})=>e.map((({type:e,value:n})=>t&&"literal"===e?n.replace(/\s/g,""):n)).join(""),"es-ES":e=>{const t=[];for(const n of e)if("integer"===n.type){const e=n.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(n.value);return t.join("")},"it-IT":e=>{const t=[];for(const n of e)if("integer"===n.type){const e=n.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(n.value);return t.join("")}};function Oa({amount:e,locale:t="en-US",currency:n="EUR",token:a=Aa,placeholder:r="--",overrides:o={}}){const i=Number(e);if(!Number.isFinite(i))return r;const s=function(e){const t=_a.find((t=>t.code===e));return t?.locale||e}(t),{useSymbol:c,sign:d,decimals:l}=Na[a],u={style:"currency",currency:n,currencyDisplay:c?"symbol":"code",signDisplay:"always"===d&&0===i?"exceptZero":d,..."if-needed"!==l||i%1!=0?{}:{minimumFractionDigits:0,maximumFractionDigits:0},...o},g=new Intl.NumberFormat(s,u),f=qa[s];if(f){return f(g.formatToParts(i),{amount:i,useSymbol:c})}return g.format(i)}class Da extends CustomEvent{constructor(e){super("transfer-selected",{detail:e,bubbles:!0,composed:!0})}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:500 900;src:url(/fonts/polysans-median.woff2) format("woff2"),url(/fonts/polysans-median.woff) format("woff")}@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:400;src:url(/fonts/polysans-neutral.woff2) format("woff2"),url(/fonts/polysans-neutral.woff) format("woff")}@font-face{font-display:swap;font-family:PolySans;font-style:normal;font-weight:100 300;src:url(/fonts/polysans-slim.woff2) format("woff2"),url(/fonts/polysans-slim.woff) format("woff")}:root *{--default-font-family:PolySans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-family:var(--qonto-font-family,var(--default-font-family))}:root{--font-weight-median:600;--font-weight-neutral:400;--font-weight-slim:300;--title-1-font-size:32px;--title-1-font-weight:var(--font-weight-median);--title-1-line-height:40px;--title-2-font-size:24px;--title-2-font-weight:var(--font-weight-median);--title-2-line-height:32px;--title-3-font-size:20px;--title-3-font-weight:var(--font-weight-neutral);--title-3-line-height:32px;--title-4-font-size:16px;--title-4-font-weight:var(--font-weight-neutral);--title-4-line-height:24px;--body-1-font-size:14px;--body-1-font-weight:var(--font-weight-neutral);--body-1-line-height:24px;--body-2-font-size:14px;--body-2-font-weight:var(--font-weight-slim);--body-2-line-height:24px;--body-link-font-size:14px;--body-link-font-weight:var(--font-weight-neutral);--body-link-line-height:24px;--caption-font-size:12px;--caption-font-weight:var(--font-weight-neutral);--caption-line-height:16px;--caption-bold-font-size:12px;--caption-bold-font-weight:var(--font-weight-median);--caption-bold-line-height:16px;--caption-link-font-size:12px;--caption-link-font-weight:var(--font-weight-neutral);--caption-link-line-height:16px;--primary-black:#050505;--primary-white:#fff;--plum1000:#461068;--plum900:#7b4db8;--plum800:#a585db;--plum100:#bfa6ea;--plum50:#d5c8ff;--sakura1000:#7e0f4c;--sakura900:#c24b89;--sakura800:#e975b2;--sakura100:#ffacd6;--sakura50:#ffdfea;--mint1000:#0d5563;--mint900:#2f95a0;--mint800:#66c8c8;--mint100:#9be5da;--mint50:#c8ffec;--blueberry1000:#093b75;--blueberry900:#3275c4;--blueberry800:#71a5e0;--blueberry100:#9bc5ea;--blueberry50:#c6e6fb;--mustard1000:#705208;--mustard900:#c5a635;--mustard800:#f0e060;--mustard100:#f5f596;--mustard50:#faffa4;--peach1000:#7a250c;--peach900:#ce6033;--peach800:#ff9e75;--peach100:#ffb590;--peach50:#ffc9a6;--gray900:#1a1a1a;--gray800:#262626;--gray700:#3d3d3d;--gray600:#616161;--gray500:#8f8f8f;--gray400:#b8b8b8;--gray300:#ccc;--gray200:#e0e0e0;--gray100:#e8e8e8;--gray50:#f5f5f5;--gray25:#f9f9f9;--success1000:#0f7a3d;--success800:#2bad5f;--success400:#66db7c;--success300:#a5f2a3;--success50:#e6ffe4;--warning1000:#b04e10;--warning800:#dc9433;--warning400:#ffd870;--warning300:#ffe5aa;--warning50:#fff2d9;--error1000:#b81818;--error800:#e04545;--error400:#ff8585;--error300:#ffbabe;--error50:#ffe8e8;--elevation-default:var(--primary-white);--elevation-low:var(--gray25);--elevation-mid:var(--primary-white);--elevation-high:var(--primary-white);--background-primary:var(--qonto-color-primary,var(--primary-black));--background-secondary:var(--gray100);--background-tertiary:var(--gray50);--background-accent-low:var(--blueberry50);--background-accent-high:var(--blueberry900);--background-accent-static:var(--blueberry800);--background-success-low:var(--success50);--background-success-high:var(--success800);--background-warning-low:var(--warning50);--background-warning-high:var(--warning800);--background-error-low:var(--error50);--background-error-high:var(--error800);--background-modal-overlay:#61616199;--background-panel-overlay:#6161611a;--background-toggle:var(--gray400);--background-toggle-button:var(--primary-white);--background-skeleton-shimmer:var(--gray200);--background-feature-discoverability:var(--mustard50);--background-free-trial:var(--mint50);--background-upgrade-low:var(--peach50);--background-upgrade-high:var(--peach1000);--background-activate:var(--plum50);--background-splitscreen-peach:var(--peach50);--content-primary-a:var(--qonto-content-color-primary,var(--primary-black));--content-primary-b:var(--primary-white);--content-secondary:var(--gray600);--content-tertiary:var(--gray500);--content-accent:var(--blueberry900);--content-success:var(--success1000);--content-warning:var(--warning1000);--content-error:var(--error1000);--content-primary-a-static:var(--primary-black);--content-primary-b-static:var(--primary-white);--border-primary:var(--primary-black);--border-secondary:var(--gray300);--border-tertiary:var(--gray100);--border-avatar:#05050533;--border-accent-low:var(--blueberry50);--border-accent-high:var(--blueberry900);--border-accent-static:var(--blueberry100);--border-success:var(--success800);--border-warning:var(--warning800);--border-error:var(--error800);--border-upsell:var(--mint800);--dataviz-balance:var(--blueberry800);--dataviz-change:var(--warning800);--dataviz-inflows:var(--success400);--dataviz-outflows:var(--error400);--dataviz-slice-1:var(--plum800);--dataviz-slice-2:var(--mint800);--dataviz-slice-3:var(--blueberry800);--dataviz-slice-4:var(--mustard800);--dataviz-slice-5:var(--peach800);--dataviz-slice-6:var(--plum50);--dataviz-slice-7:var(--sakura800);--dataviz-other:var(--gray400);--dataviz-uncategorized:var(--gray200);--dataviz-empty:var(--gray50);--analytic-label-cat-1:var(--error800);--analytic-label-cat-2:var(--success800);--analytic-label-cat-3:var(--warning800);--analytic-label-cat-4:var(--mint800);--analytic-label-cat-5:var(--mustard800);--analytic-label-cat-6:var(--peach800);--analytic-label-cat-7:var(--blueberry800);--analytic-label-cat-8:var(--plum800);--analytic-label-cat-9:var(--sakura800);--analytic-label-cat10:var(--plum50);--category-purple:var(--plum100);--category-mint:var(--mint100);--category-mustard:var(--mustard100);--category-peach:var(--peach100);--category-blue:var(--blueberry100);--category-green:var(--success300);--category-pink:var(--sakura100);--category-gray:var(--gray100);--shadow-color-low:#0505050f;--shadow-color-high:#0505051f;--state-selected:var(--gray50);--state-primary-a-hover:#05050514;--state-disabled:#f5f5f573;--state-primary-a-pressed:#0505051f;--state-primary-b-hover:#ffffff14;--state-primary-b-pressed:#ffffff1f}:root .dark-theme{--elevation-default:var(--primary-black);--elevation-low:var(--gray900);--elevation-mid:var(--gray900);--elevation-high:var(--gray800);--background-primary:var(--gray25);--background-secondary:var(--gray600);--background-tertiary:var(--gray700);--background-accent-low:var(--blueberry1000);--background-accent-high:var(--blueberry900);--background-accent-static:var(--blueberry800);--background-success-low:var(--success1000);--background-success-high:var(--success800);--background-warning-low:var(--warning1000);--background-warning-high:var(--warning300);--background-error-low:var(--error1000);--background-error-high:var(--error800);--background-modal-overlay:#05050599;--background-panel-overlay:#05050566;--background-toggle:var(--gray600);--background-toggle-button:var(--gray300);--background-skeleton-shimmer:var(--gray700);--background-feature-discoverability:var(--mustard1000);--background-free-trial:var(--mint900);--background-upgrade-low:var(--peach900);--background-upgrade-high:var(--peach50);--background-activate:var(--plum900);--background-splitscreen-peach:var(--peach900);--content-primary-a:var(--gray25);--content-primary-b:var(--primary-black);--content-secondary:var(--gray300);--content-tertiary:var(--gray500);--content-accent:var(--blueberry800);--content-success:var(--success400);--content-warning:var(--warning400);--content-error:var(--error400);--content-primary-a-static:var(--primary-black);--content-primary-b-static:var(--primary-white);--border-primary:var(--gray25);--border-secondary:var(--gray500);--border-tertiary:#ffffff29;--border-avatar:#ffffff40;--border-accent-low:var(--blueberry1000);--border-accent-high:var(--blueberry800);--border-accent-static:var(--blueberry100);--border-success:var(--success400);--border-warning:var(--warning800);--border-error:var(--error400);--border-upsell:var(--mint100);--dataviz-balance:var(--blueberry800);--dataviz-change:var(--warning800);--dataviz-inflows:var(--success800);--dataviz-outflows:var(--error800);--dataviz-slice-1:var(--plum800);--dataviz-slice-2:var(--mint800);--dataviz-slice-3:var(--blueberry800);--dataviz-slice-4:var(--mustard800);--dataviz-slice-5:var(--peach800);--dataviz-slice-6:var(--plum50);--dataviz-slice-7:var(--sakura800);--dataviz-other:var(--gray400);--dataviz-uncategorized:var(--gray600);--dataviz-empty:var(--gray700);--category-purple:var(--plum100);--category-mint:var(--mint100);--category-mustard:var(--mustard100);--category-peach:var(--peach100);--category-blue:var(--blueberry100);--category-green:var(--success300);--category-pink:var(--sakura100);--category-gray:var(--gray100);--shadow-color-low:#05050552;--shadow-color-high:#050505a3;--state-selected:var(--gray700);--state-primary-a-hover:#ffffff14;--state-disabled:#f5f5f573;--state-primary-a-pressed:#ffffff1f;--state-primary-b-hover:#05050514;--state-primary-b-pressed:#0505051f;color-scheme:dark}:root,:root .dark-theme{--separator-bottom:inset 0 -1px 0 0 var(--border-tertiary);--shadow-low:0 3px 3px 0 var(--shadow-color-low);--shadow-high:0 3px 12px 0 var(--shadow-color-high);--background-placeholder:linear-gradient(to right,var(--background-secondary) 8%,var(--background-skeleton-shimmer) 18%,var(--background-secondary) 33%);--gradient-50:linear-gradient(90deg,var(--plum50),var(--blueberry50),var(--mint50));--gradient-800:linear-gradient(90deg,var(--plum800),var(--blueberry800),var(--mint800));--gradient-900:linear-gradient(90deg,var(--plum900),var(--blueberry900),var(--mint800));--gradient-1000:linear-gradient(90deg,var(--plum1000),var(--blueberry1000),var(--mint1000));--qonto-intelligence-gradient-content:var(--gradient-900);--qonto-intelligence-gradient-stroke:var(--gradient-900);--qonto-intelligence-gradient-background-high:var(--gradient-1000);--qonto-intelligence-gradient-background-low:var(--gradient-50);--qintelligence50:linear-gradient(90deg,var(--plum50) 0%,var(--blueberry50) 50%,var(--mint50) 100%);--qintelligence100:linear-gradient(90deg,var(--plum800) 0%,var(--blueberry800) 51.92%,var(--mint800) 100%);--qintelligence800:linear-gradient(90deg,var(--plum900) 0%,var(--blueberry900) 47.6%,var(--mint800) 100%);--qintelligence1000:linear-gradient(90deg,var(--plum1000) 0%,var(--blueberry1000) 50%,var(--mint900) 100%);--qintelligence-border:linear-gradient(90deg,var(--plum900) 0%,var(--blueberry900) 50%,var(--mint800) 100%)}:root{--overlay-primary-a-color:var(--primary-black);--overlay-primary-b-color:var(--primary-white);--qintelligence-low:var(--qintelligence50);--qintelligence-high:var(--qintelligence1000)}:root .dark-theme{--overlay-primary-a-color:var(--primary-white);--overlay-primary-b-color:var(--primary-black);--qintelligence-low:var(--qintelligence1000);--qintelligence-high:var(--qintelligence50)}:root{--overlay-opacity:0;--hover-opacity:0.08;--pressed-opacity:0.12;--disabled-opacity:0.45}.overlay{position:relative;&:after{background-color:var(--overlay-primary-a-color);content:"";height:100%;left:0;opacity:var(--overlay-opacity);pointer-events:none;position:absolute;top:0;width:100%}&:hover:after{--overlay-opacity:var(--hover-opacity)}&:active:after{--overlay-opacity:var(--pressed-opacity)}&[disabled]{cursor:not-allowed;&:after{--overlay-primary-a-color:var(--primary-white);--overlay-opacity:var(--disabled-opacity);cursor:not-allowed}}}');const Ua=kn`<svg
|
|
241
241
|
fill="none"
|
|
242
242
|
viewBox="0 0 12 12"
|
|
243
243
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -249,7 +249,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
249
249
|
fill="currentColor"
|
|
250
250
|
fill-rule="evenodd"
|
|
251
251
|
/>
|
|
252
|
-
</svg>`,
|
|
252
|
+
</svg>`,xa=kn`
|
|
253
253
|
<svg fill="none" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
|
|
254
254
|
<path
|
|
255
255
|
clip-rule="evenodd"
|
|
@@ -258,7 +258,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
258
258
|
fill-rule="evenodd"
|
|
259
259
|
/>
|
|
260
260
|
</svg>
|
|
261
|
-
`,
|
|
261
|
+
`,Ma=kn`
|
|
262
262
|
<svg
|
|
263
263
|
fill="none"
|
|
264
264
|
viewBox="0 0 12 12"
|
|
@@ -272,7 +272,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
272
272
|
fill-rule="evenodd"
|
|
273
273
|
/>
|
|
274
274
|
</svg>
|
|
275
|
-
`,
|
|
275
|
+
`,za=kn`
|
|
276
276
|
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
|
|
277
277
|
<path
|
|
278
278
|
d="M0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8Z"
|
|
@@ -283,7 +283,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
283
283
|
fill="white"
|
|
284
284
|
/>
|
|
285
285
|
</svg>
|
|
286
|
-
`,
|
|
286
|
+
`,ja=kn`
|
|
287
287
|
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
|
|
288
288
|
<path
|
|
289
289
|
fill-rule="evenodd"
|
|
@@ -291,7 +291,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
291
291
|
d="M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm.235-9.036a.5.5 0 0 0-1 0V6.37a.5.5 0 0 0 .5.5h2.844a.5.5 0 0 0 0-1H6.235V2.964Z"
|
|
292
292
|
fill="currentColor"/>
|
|
293
293
|
</svg>
|
|
294
|
-
`,
|
|
294
|
+
`,Fa=kn`
|
|
295
295
|
<svg
|
|
296
296
|
fill="none"
|
|
297
297
|
viewBox="0 0 12 12"
|
|
@@ -305,7 +305,7 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
305
305
|
fill-rule="evenodd"
|
|
306
306
|
/>
|
|
307
307
|
</svg>
|
|
308
|
-
`,
|
|
308
|
+
`,Ba=xt`
|
|
309
309
|
span {
|
|
310
310
|
--badge-border: 1px solid var(--border-tertiary);
|
|
311
311
|
--badge-default-font-color: var(
|
|
@@ -434,21 +434,10 @@ class Xn{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._r
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
`,
|
|
438
|
-
${
|
|
437
|
+
`,Ha="error",Ga="inactive",Ka="in-progress",Ya="validated",Va="waiting",Wa="declined",Za={error:xa,inactive:null,"in-progress":Ua,validated:Ma,waiting:ja,warning:Fa,declined:za};let Ja=class extends jn{constructor(){super(...arguments),this.level="waiting"}render(){return Tn`<span data-level="${this.level}">
|
|
438
|
+
${Za[this.level]}
|
|
439
439
|
<slot></slot>
|
|
440
|
-
</span>`}};
|
|
441
|
-
/**
|
|
442
|
-
* @license
|
|
443
|
-
* Copyright 2017 Google LLC
|
|
444
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
445
|
-
*/
|
|
446
|
-
const Wa=2;class Za{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
447
|
-
/**
|
|
448
|
-
* @license
|
|
449
|
-
* Copyright 2017 Google LLC
|
|
450
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
451
|
-
*/class Ja extends Za{constructor(e){if(super(e),this.it=Tn,e.type!==Wa)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Tn||null==e)return this._t=void 0,this.it=e;if(e===wn)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ja.directiveName="unsafeHTML",Ja.resultType=1;const Qa=(e=>(...t)=>({_$litDirective$:e,values:t}))(Ja),Xa=Ot`
|
|
440
|
+
</span>`}};Ja.styles=Ba,Lt([Kn({type:String})],Ja.prototype,"level",void 0),Ja=Lt([Bn("qonto-badge-status")],Ja);const Qa=xt`
|
|
452
441
|
:host {
|
|
453
442
|
display: block;
|
|
454
443
|
}
|
|
@@ -473,14 +462,25 @@ const Wa=2;class Za{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n)
|
|
|
473
462
|
background-position: -200% 0;
|
|
474
463
|
}
|
|
475
464
|
}
|
|
476
|
-
`;let
|
|
465
|
+
`;let Xa=class extends jn{constructor(){super(...arguments),this.standalone=!1}render(){return Tn`<div
|
|
477
466
|
class="skeleton-line"
|
|
478
467
|
style="
|
|
479
468
|
${this.width?`width: ${this.width};`:""}
|
|
480
469
|
${this.height?`height: ${this.height};`:""}
|
|
481
470
|
${this.borderRadius?`border-radius: ${this.borderRadius};`:""}
|
|
482
471
|
"
|
|
483
|
-
></div>`}};
|
|
472
|
+
></div>`}};Xa.styles=Qa,Lt([Kn({type:String})],Xa.prototype,"width",void 0),Lt([Kn({type:String})],Xa.prototype,"height",void 0),Lt([Kn({type:String})],Xa.prototype,"borderRadius",void 0),Lt([Kn({type:Boolean})],Xa.prototype,"standalone",void 0),Xa=Lt([Bn("qonto-skeleton-loader-line")],Xa);
|
|
473
|
+
/**
|
|
474
|
+
* @license
|
|
475
|
+
* Copyright 2017 Google LLC
|
|
476
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
477
|
+
*/
|
|
478
|
+
const er=2;class tr{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
479
|
+
/**
|
|
480
|
+
* @license
|
|
481
|
+
* Copyright 2017 Google LLC
|
|
482
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
483
|
+
*/class nr extends tr{constructor(e){if(super(e),this.it=An,e.type!==er)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===An||null==e)return this._t=void 0,this.it=e;if(e===En)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}nr.directiveName="unsafeHTML",nr.resultType=1;const ar=(e=>(...t)=>({_$litDirective$:e,values:t}))(nr);const rr=["de","es","fr","it","nl","pt"],or={s09ca90bfc68e29fc:"Fecha prevista",s0fbf6dc6a1966408:"Siguiente",s12bda6ed4915b346:"En proceso",s270283cc22e1d66b:Wn`Mostrando página ${0} de ${1} (${2} elementos en total)`,s5033dab8c17f05f2:"Completado",s6686fcc6d2c8f0bd:"Nota",s78636b92c1a3909c:"Pendiente",s9b6901ac422f46a7:"Rechazado",sa30c4d3b566b6b1a:"Cancelado",sad3e3c8146fc920f:"Estado",sba98a7152d80b949:"Importe",sbf9c5c5a8e5efad4:"Fallido",sf3ff78cc329d3528:"Anterior",sfda3e4a519cfc5ba:"Liquidado",sfe88d270aa3e71da:"Referencia"};const ir={s09ca90bfc68e29fc:"Date prévue",s0fbf6dc6a1966408:"Suivant",s12bda6ed4915b346:"En cours",s270283cc22e1d66b:Wn`Affichage de la page ${0} sur ${1} (${2} éléments au total)`,s5033dab8c17f05f2:"Terminé",s6686fcc6d2c8f0bd:"Note",s78636b92c1a3909c:"En attente",s9b6901ac422f46a7:"Refusé",sa30c4d3b566b6b1a:"Annulé",sad3e3c8146fc920f:"Statut",sba98a7152d80b949:"Montant",sbf9c5c5a8e5efad4:"Échoué",sf3ff78cc329d3528:"Précédent",sfda3e4a519cfc5ba:"Réglé",sfe88d270aa3e71da:"Référence"};const sr={s09ca90bfc68e29fc:"Geplantes Datum",s0fbf6dc6a1966408:"Nächste",s12bda6ed4915b346:"In Bearbeitung",s270283cc22e1d66b:Wn`Seite ${0} von ${1} anzeigen (${2} Gesamtelemente)`,s5033dab8c17f05f2:"Abgeschlossen",s6686fcc6d2c8f0bd:"Notiz",s78636b92c1a3909c:"Ausstehend",s9b6901ac422f46a7:"Abgelehnt",sa30c4d3b566b6b1a:"Abgebrochen",sad3e3c8146fc920f:"Status",sba98a7152d80b949:"Betrag",sbf9c5c5a8e5efad4:"Fehlgeschlagen",sf3ff78cc329d3528:"Vorherige",sfda3e4a519cfc5ba:"Abgerechnet",sfe88d270aa3e71da:"Referenz"};const cr={s09ca90bfc68e29fc:"Geplande datum",s0fbf6dc6a1966408:"Volgende",s12bda6ed4915b346:"Bezig met verwerken",s270283cc22e1d66b:Wn`Pagina ${0} van ${1} weergeven (${2} totaal aantal items)`,s5033dab8c17f05f2:"Voltooid",s6686fcc6d2c8f0bd:"Notitie",s78636b92c1a3909c:"In afwachting",s9b6901ac422f46a7:"Geweigerd",sa30c4d3b566b6b1a:"Geannuleerd",sad3e3c8146fc920f:"Status",sba98a7152d80b949:"Bedrag",sbf9c5c5a8e5efad4:"Mislukt",sf3ff78cc329d3528:"Vorige",sfda3e4a519cfc5ba:"Afgehandeld",sfe88d270aa3e71da:"Referentie"};const dr={s09ca90bfc68e29fc:"Data agendada",s0fbf6dc6a1966408:"Próximo",s12bda6ed4915b346:"Em processamento",s270283cc22e1d66b:Wn`Mostrando página ${0} de ${1} (${2} itens no total)`,s5033dab8c17f05f2:"Concluído",s6686fcc6d2c8f0bd:"Nota",s78636b92c1a3909c:"Pendente",s9b6901ac422f46a7:"Recusado",sa30c4d3b566b6b1a:"Cancelado",sad3e3c8146fc920f:"Estado",sba98a7152d80b949:"Quantidade",sbf9c5c5a8e5efad4:"Falhou",sf3ff78cc329d3528:"Anterior",sfda3e4a519cfc5ba:"Liquidado",sfe88d270aa3e71da:"Referência"};const lr={s09ca90bfc68e29fc:"Data programmata",s0fbf6dc6a1966408:"Successivo",s12bda6ed4915b346:"In elaborazione",s270283cc22e1d66b:Wn`Mostra pagina ${0} di ${1} (${2} elementi totali)`,s5033dab8c17f05f2:"Completato",s6686fcc6d2c8f0bd:"Nota",s78636b92c1a3909c:"In sospeso",s9b6901ac422f46a7:"Rifiutato",sa30c4d3b566b6b1a:"Annullato",sad3e3c8146fc920f:"Stato",sba98a7152d80b949:"Importo",sbf9c5c5a8e5efad4:"Non riuscito",sf3ff78cc329d3528:"Precedente",sfda3e4a519cfc5ba:"Regolato",sfe88d270aa3e71da:"Causale"};const ur={es:Object.freeze({__proto__:null,templates:or}),fr:Object.freeze({__proto__:null,templates:ir}),de:Object.freeze({__proto__:null,templates:sr}),nl:Object.freeze({__proto__:null,templates:cr}),pt:Object.freeze({__proto__:null,templates:dr}),it:Object.freeze({__proto__:null,templates:lr})},{getLocale:gr,setLocale:fr}=(pr={sourceLocale:"en",targetLocales:rr,loadLocale:(e="en")=>new Promise((t=>t(ur[e])))},function(e){if(Xn)throw new Error("lit-localize can only be configured once");Qn=e,Xn=!0}(((e,t)=>sa(fa,e,t))),pa=la=pr.sourceLocale,ua=new Set(pr.targetLocales),ua.add(pr.sourceLocale),ga=pr.loadLocale,{getLocale:ba,setLocale:ya});var pr;const hr=xt`
|
|
484
484
|
button {
|
|
485
485
|
--focus-outline-color: var(--border-accent-low);
|
|
486
486
|
--bg-color: var(--qonto-embed-color-primary, var(--background-primary));
|
|
@@ -632,59 +632,59 @@ const Wa=2;class Za{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n)
|
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
`;let
|
|
635
|
+
`;let mr=class extends jn{constructor(){super(...arguments),this.variant="primary",this.disabled=!1}render(){return Tn`<button
|
|
636
636
|
data-variant="${this.variant}"
|
|
637
637
|
.disabled=${this.disabled}
|
|
638
638
|
>
|
|
639
639
|
<slot></slot>
|
|
640
|
-
</button>`}};
|
|
640
|
+
</button>`}};mr.styles=hr,Lt([Kn({type:String})],mr.prototype,"variant",void 0),Lt([Kn({type:Boolean})],mr.prototype,"disabled",void 0),mr=Lt([Bn("qonto-button")],mr);let br=class extends jn{constructor(){super(...arguments),this.locale="en",this.isLoading=!1}connectedCallback(){super.connectedCallback(),fr(this.locale),this.fetchTransfers()}updated(e){e.has("locale")&&fr(this.locale)}async fetchTransfers(e){if(this.operationSettings){this.isLoading=!0,this.error=void 0;try{const{paginationSettings:t={}}=this.operationSettings,n=await dt({operationSettings:{...this.operationSettings,paginationSettings:{page:e??t.page??1,itemsPerPage:t.itemsPerPage??20}}});this.transfers=n.transfers,this.paginationState=n.meta}catch(e){console.error("Failed to load SEPA transfers:",e),this.error="Failed to load transfers. Please try again."}finally{this.isLoading=!1}}else console.error("operationSettings is required to fetch transfers")}handleRowClick(e){this.dispatchEvent(new Da({transfer:e}))}handlePreviousPage(){this.paginationState?.previousPage&&(this.transfers=void 0,this.fetchTransfers(this.paginationState.previousPage))}handleNextPage(){this.paginationState?.nextPage&&(this.transfers=void 0,this.fetchTransfers(this.paginationState.nextPage))}render(){return this.error?Tn`<div data-error>${this.error}</div>`:Tn`
|
|
641
641
|
<table>
|
|
642
642
|
<thead>
|
|
643
643
|
<tr>
|
|
644
|
-
<th>${
|
|
645
|
-
<th>${
|
|
646
|
-
<th>${
|
|
647
|
-
<th>${
|
|
648
|
-
<th>${
|
|
644
|
+
<th>${Qn("Scheduled Date")}</th>
|
|
645
|
+
<th>${Qn("Reference")}</th>
|
|
646
|
+
<th>${Qn("Note")}</th>
|
|
647
|
+
<th>${Qn("Status")}</th>
|
|
648
|
+
<th>${Qn("Amount")}</th>
|
|
649
649
|
</tr>
|
|
650
650
|
</thead>
|
|
651
651
|
<tbody>
|
|
652
|
-
${this.isLoading||!this.transfers?function(e=3){const t=Array.from({length:e},(()=>'\n <tr>\n <td><qonto-skeleton-loader-line width="80px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="120px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="150px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="100px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="60px"></qonto-skeleton-loader-line></td>\n </tr>\n ')).join("");return
|
|
653
|
-
${0===this.transfers?.length?"There are no transfers yet":this.transfers?.map((e=>
|
|
652
|
+
${this.isLoading||!this.transfers?function(e=3){const t=Array.from({length:e},(()=>'\n <tr>\n <td><qonto-skeleton-loader-line width="80px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="120px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="150px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="100px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="60px"></qonto-skeleton-loader-line></td>\n </tr>\n ')).join("");return ar(t)}(this.paginationState?.itemsPerPage):""}
|
|
653
|
+
${0===this.transfers?.length?"There are no transfers yet":this.transfers?.map((e=>Tn`
|
|
654
654
|
<tr @click=${()=>this.handleRowClick(e)}>
|
|
655
655
|
<td>
|
|
656
|
-
${
|
|
656
|
+
${Ea({date:e.scheduledDate,locale:gr(),token:"date-year-s"})}
|
|
657
657
|
</td>
|
|
658
658
|
<td>${e.reference}</td>
|
|
659
659
|
<td>${e.note}</td>
|
|
660
660
|
<td>
|
|
661
661
|
<qonto-badge-status
|
|
662
|
-
level="${function(e){switch(e){case g.SETTLED:return
|
|
663
|
-
>${function(e){switch(e){case g.PENDING:return
|
|
662
|
+
level="${function(e){switch(e){case g.SETTLED:return Ya;case g.DECLINED:return Wa;case g.PENDING:return Va;case g.PROCESSING:return Ka;case g.CANCELED:return Ha;default:return Ga}}(e.status)}"
|
|
663
|
+
>${function(e){switch(e){case g.PENDING:return Qn("Pending");case g.PROCESSING:return Qn("Processing");case g.CANCELED:return Qn("Canceled");case g.DECLINED:return Qn("Declined");case g.SETTLED:return Qn("Settled");case g.FAILED:return Qn("Failed");case g.COMPLETED:return Qn("Completed");default:return e}}(e.status)}</qonto-badge-status
|
|
664
664
|
>
|
|
665
665
|
</td>
|
|
666
666
|
<td>
|
|
667
|
-
${
|
|
667
|
+
${Oa({amount:e.amount,currency:e.amountCurrency,locale:gr(),token:"money-iso-sign-decimal"})}
|
|
668
668
|
</td>
|
|
669
669
|
</tr>
|
|
670
670
|
`))}
|
|
671
671
|
</tbody>
|
|
672
672
|
</table>
|
|
673
|
-
${this.paginationState?
|
|
673
|
+
${this.paginationState?Tn`<div data-pagination>
|
|
674
674
|
<span
|
|
675
|
-
>${Wn
|
|
675
|
+
>${Qn(Wn`Showing page ${this.paginationState.currentPage} of ${this.paginationState.totalPages} (${this.paginationState.totalItems} total items)`)}</span
|
|
676
676
|
>
|
|
677
677
|
<div data-pagination-buttons>
|
|
678
678
|
<qonto-button
|
|
679
679
|
variant="secondary"
|
|
680
680
|
?disabled=${null===this.paginationState.previousPage||this.isLoading}
|
|
681
681
|
@click=${this.handlePreviousPage}
|
|
682
|
-
>${
|
|
682
|
+
>${Qn("Previous")}</qonto-button
|
|
683
683
|
><qonto-button
|
|
684
684
|
variant="secondary"
|
|
685
685
|
?disabled=${null===this.paginationState.nextPage||this.isLoading}
|
|
686
686
|
@click=${this.handleNextPage}
|
|
687
|
-
>${
|
|
687
|
+
>${Qn("Next")}</qonto-button
|
|
688
688
|
</div>
|
|
689
689
|
</div>`:""}
|
|
690
|
-
`}};
|
|
690
|
+
`}};br.styles=va,Lt([Kn({type:Object})],br.prototype,"operationSettings",void 0),Lt([Kn({type:String})],br.prototype,"locale",void 0),Lt([Yn()],br.prototype,"transfers",void 0),Lt([Yn()],br.prototype,"paginationState",void 0),Lt([Yn()],br.prototype,"isLoading",void 0),Lt([Yn()],br.prototype,"error",void 0),br=Lt([(e,t)=>(e.addInitializer(ta),e),Bn("qonto-transfer-list")],br);class yr extends a{constructor(e){super(),this.name="EmbedUIElementError",this.message=e}}const vr={createUIElement:async e=>{if(M())return;const{uiElementSettings:t,operationSettings:n={}}=e,{uiElementName:a}=function(e){if(!e?.uiElementName)throw new i("uiElementSettings.uiElementName is required when calling createUIElement");const t=Object.values(Ct);if(!t.includes(e?.uiElementName))throw new i(`uiElementSettings.uiElementName must be one of ${t.join(", ")}`);return{uiElementName:e.uiElementName}}(t),{uiParentElementId:r}=I(n,{requiresUI:!0}),o=document.getElementById(r);if(!o)throw new yr(`Could not find container element with id: ${r}`);if(a===Ct.TRANSFER_LIST)return void function({containerElement:e,uiElementSettings:t,operationSettings:n}){const a=document.createElement("qonto-transfer-list");a.operationSettings=n,a.locale=n?.locale||L.getLocale(),a.addEventListener("transfer-selected",(e=>{t?.uiElementEventListener?.({eventName:"transfer-selected",eventDetail:e.detail})})),e.appendChild(a)}({containerElement:o,uiElementSettings:t,operationSettings:n});const s=document.createElement(`qonto-${a}`);o.appendChild(s)}};e.authLinks=ct,e.beneficiaries=je,e.cards=Se,e.constants=D,e.initialize=q,e.logout=O,e.organizations=Et,e.paymentLinks=vt,e.sepaTransfers=lt,e.transactions=Pt,e.ui=vr}));
|