rebill-web-components-sdk 1.8.6 → 1.8.7

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.
Files changed (63) hide show
  1. package/dist/cjs/rebill-button.cjs.entry.js +2 -2
  2. package/dist/cjs/rebill-button.entry.cjs.js.map +1 -1
  3. package/dist/cjs/rebill-checkout.cjs.entry.js +14 -13
  4. package/dist/cjs/rebill-checkout.entry.cjs.js.map +1 -1
  5. package/dist/collection/components/checkout/rebill-checkout.js +14 -13
  6. package/dist/collection/components/checkout/rebill-checkout.js.map +1 -1
  7. package/dist/collection/components/shared/button/button.css +8 -8
  8. package/dist/collection/components/shared/button/button.js +1 -1
  9. package/dist/collection/components/shared/button/button.js.map +1 -1
  10. package/dist/components/apm-checkout.js +1 -1
  11. package/dist/components/discount-coupon.js +1 -1
  12. package/dist/components/otp-component.js +1 -1
  13. package/dist/components/{p-DZI13wtJ.js → p-C9MOJKD4.js} +3 -3
  14. package/dist/components/{p-DZI13wtJ.js.map → p-C9MOJKD4.js.map} +1 -1
  15. package/dist/components/{p-BwpjM0Zf.js → p-CG7X0Z3m.js} +3 -3
  16. package/dist/components/{p-BwpjM0Zf.js.map → p-CG7X0Z3m.js.map} +1 -1
  17. package/dist/components/{p-CcZQGsZ8.js → p-CL6COaBj.js} +3 -3
  18. package/dist/components/{p-CcZQGsZ8.js.map → p-CL6COaBj.js.map} +1 -1
  19. package/dist/components/{p-C69QonMT.js → p-Cb9WV_NL.js} +3 -3
  20. package/dist/components/{p-C69QonMT.js.map → p-Cb9WV_NL.js.map} +1 -1
  21. package/dist/components/{p-C1THyrZh.js → p-D6oZSjpl.js} +3 -3
  22. package/dist/components/{p-C1THyrZh.js.map → p-D6oZSjpl.js.map} +1 -1
  23. package/dist/components/{p-W2zrB3tA.js → p-D6rWKLL8.js} +3 -3
  24. package/dist/components/{p-W2zrB3tA.js.map → p-D6rWKLL8.js.map} +1 -1
  25. package/dist/components/{p-ByRz5YWN.js → p-DavSndum.js} +3 -3
  26. package/dist/components/{p-ByRz5YWN.js.map → p-DavSndum.js.map} +1 -1
  27. package/dist/components/{p-Cp7iacZh.js → p-DgIOuUN1.js} +4 -4
  28. package/dist/components/p-DgIOuUN1.js.map +1 -0
  29. package/dist/components/{p-CHIajnDg.js → p-DljAUFZC.js} +3 -3
  30. package/dist/components/{p-CHIajnDg.js.map → p-DljAUFZC.js.map} +1 -1
  31. package/dist/components/{p-djD6Hoxd.js → p-Dum_FpHV.js} +3 -3
  32. package/dist/components/{p-djD6Hoxd.js.map → p-Dum_FpHV.js.map} +1 -1
  33. package/dist/components/{p-DJEotc3n.js → p-FFCF5_17.js} +4 -4
  34. package/dist/components/{p-DJEotc3n.js.map → p-FFCF5_17.js.map} +1 -1
  35. package/dist/components/{p-BBiYeY9C.js → p-LoXXimMi.js} +3 -3
  36. package/dist/components/{p-BBiYeY9C.js.map → p-LoXXimMi.js.map} +1 -1
  37. package/dist/components/payment-button.js +1 -1
  38. package/dist/components/rebill-button.js +1 -1
  39. package/dist/components/rebill-checkout.js +25 -24
  40. package/dist/components/rebill-checkout.js.map +1 -1
  41. package/dist/components/rebill-mode-sandbox-mobile.js +1 -1
  42. package/dist/components/rebill-mode-sandbox.js +1 -1
  43. package/dist/components/rebill-renewal.js +5 -5
  44. package/dist/components/rebill-summary.js +1 -1
  45. package/dist/components/renewal-success-page.js +1 -1
  46. package/dist/components/root-component.js +1 -1
  47. package/dist/components/success-page.js +1 -1
  48. package/dist/components/user-information-static.js +1 -1
  49. package/dist/components/user-information.js +1 -1
  50. package/dist/esm/rebill-button.entry.js +2 -2
  51. package/dist/esm/rebill-button.entry.js.map +1 -1
  52. package/dist/esm/rebill-checkout.entry.js +14 -13
  53. package/dist/esm/rebill-checkout.entry.js.map +1 -1
  54. package/dist/rebill-web-components-sdk/{p-91a86735.entry.js → p-297a5c76.entry.js} +2 -2
  55. package/dist/rebill-web-components-sdk/{p-91a86735.entry.js.map → p-297a5c76.entry.js.map} +1 -1
  56. package/dist/rebill-web-components-sdk/p-738fbc04.entry.js +2 -0
  57. package/dist/rebill-web-components-sdk/{p-b3837047.entry.js.map → p-738fbc04.entry.js.map} +1 -1
  58. package/dist/rebill-web-components-sdk/rebill-button.entry.esm.js.map +1 -1
  59. package/dist/rebill-web-components-sdk/rebill-checkout.entry.esm.js.map +1 -1
  60. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  61. package/package.json +1 -1
  62. package/dist/components/p-Cp7iacZh.js.map +0 -1
  63. package/dist/rebill-web-components-sdk/p-b3837047.entry.js +0 -2
@@ -1,2 +1,2 @@
1
- import{p as e,b as t}from"./p-D8cwEAmw.js";export{s as setNonce}from"./p-D8cwEAmw.js";import{g as r}from"./p-DQuL1Twl.js";var a=()=>{const t=import.meta.url;const r={};if(t!==""){r.resourcesUrl=new URL(".",t).href}return e(r)};a().then((async e=>{await r();return t(JSON.parse('[["p-b3837047",[[256,"rebill-checkout",{"productId":[1,"product-id"],"planId":[1,"plan-id"],"publicKey":[1,"public-key"],"instantProduct":[1,"instant-product"],"instantPlan":[1,"instant-plan"],"display":[1],"customerInformation":[1,"customer-information"],"oneClickCheckout":[4,"one-click-checkout"],"css":[1],"language":[1],"checkoutLandingSession":[1,"checkout-landing-session"],"externalPayment":[1,"external-payment"],"rejectedPaymentCard":[32],"rejectedPaymentAPM":[32],"countries":[32],"currentPaymentMethod":[32],"checkoutResponse":[32],"isSubmitting":[32],"isCardSubmitting":[32],"isCardSuccess":[32],"isAPMSubmitting":[32],"isAPMSuccess":[32],"storedCheckoutResults":[32],"alertErrorKeys":[32],"currentApmPaymentMethod":[32],"breakpoint":[32],"showRefreshModal":[32],"cardError":[32],"initialData":[32],"allRequiredFields":[32],"currentRequiredFields":[32],"customerExists":[32],"showOtp":[32],"otpVerified":[32],"responseCheckoutCard":[32],"cardMode":[32],"submit":[64]},[[0,"paymentMethodSelected","handlePaymentMethodSelected"],[0,"input","handleInputChange"],[0,"onRebillAccountClick","handleRebillAccountClick"],[0,"returnForm","handleReturnForm"],[0,"signOut","handleSignOut"],[0,"codeVerified","handleCodeVerified"]],{"language":["handleLanguageChange"]}]]],["p-d65ef616",[[256,"rebill-renewal",{"renewalData":[1,"renewal-data"],"renewalToken":[1,"renewal-token"],"currentPaymentMethod":[32],"isSubmitting":[32],"isCardSubmitting":[32],"isCardSuccess":[32],"errorMessage":[32],"breakpoint":[32],"errorPaymentCard":[32],"errorPaymentAPM":[32],"initialData":[32],"checkoutResponse":[32],"currentApmPaymentMethod":[32],"countries":[32],"allRequiredFields":[32],"currentRequiredFields":[32],"errorCardInvalid":[32],"cardMode":[32]},[[0,"paymentMethodSelected","handlePaymentMethodSelected"],[0,"bankSelected","handleBankSelected"],[0,"cardSelected","handleCardSelected"]]]]],["p-1aeb03d6",[[256,"root-component",{"isLoading":[32],"currentLang":[32],"formData":[32]}]]],["p-149a0557",[[256,"rebill-card-carousel",{"interval":[2],"size":[1],"color":[1],"showAllCards":[4,"show-all-cards"],"currentIndex":[32]}]]],["p-ad293474",[[260,"rebill-flex-container",{"direction":[1],"wrap":[1],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-9535c260",[[260,"rebill-grid-container",{"columns":[2],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-ce0793c8",[[256,"renewal-success-page",{"typePaymentMethod":[1,"type-payment-method"],"country":[1],"bank":[1],"paymentMethodName":[1,"payment-method-name"],"cardLastFour":[1,"card-last-four"],"paymentDate":[1,"payment-date"],"referenceNumber":[1,"reference-number"],"trialPeriodDays":[2,"trial-period-days"],"debitDay":[2,"debit-day"],"planAmount":[2,"plan-amount"],"timeToRedirect":[2,"time-to-redirect"],"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32],"showRedirectMessage":[32]}],[256,"renewal-summary",{"displayedComponents":[16],"totalAmount":[8,"total-amount"],"subscriptionTitle":[1,"subscription-title"],"subscriptionAmount":[8,"subscription-amount"],"nextChargeDate":[1,"next-charge-date"],"frequency":[16],"currency":[1],"forceUpdate":[32]}]]],["p-c61125f7",[[256,"input-otp",{"error":[1],"otp":[1],"clearable":[4],"placeholder":[1],"otpValue":[32]}]]],["p-a0642017",[[256,"rebill-card",{"cardTitle":[1,"card-title"],"cardLabels":[16]}]]],["p-639098ea",[[260,"rebill-container",{"maxWidth":[1,"max-width"],"padding":[1],"fluid":[4]}],[256,"rebill-input-checkbox",{"label":[1],"checked":[1540],"error":[1],"id":[1],"disabled":[4]},[[4,"change","handleFormChange"]]]]],["p-75f55dbc",[[260,"rebill-form",{"validationSchema":[8,"validation-schema"],"initialData":[16],"renderForm":[16],"formData":[32],"errors":[32],"submitForm":[64],"resetValidation":[64],"clearError":[64]},[[0,"input","handleInputChange"],[0,"blur","handleBlur"]],{"initialData":["handleInitialDataChange"],"validationSchema":["handleValidationSchemaChange"]}]]],["p-bc5bf9f3",[[256,"rebill-vertical-divider",{"height":[1],"color":[1],"thickness":[1],"dashed":[4],"connectorActive":[4,"connector-active"],"withDot":[4,"with-dot"]}]]],["p-55603be3",[[260,"rebill-typography",{"variant":[1],"color":[1],"align":[1],"noWrap":[4,"no-wrap"],"gutterBottom":[4,"gutter-bottom"],"paragraph":[4]}],[256,"rebill-icon",{"name":[1],"size":[1],"color":[1],"svgContent":[32]}]]],["p-a7404680",[[256,"rebill-alert",{"type":[1],"message":[1],"alertTitle":[1,"alert-title"],"icon":[1],"variant":[1],"size":[1],"colorIcon":[1,"color-icon"]}]]],["p-1b2d661e",[[256,"rebill-input-text",{"label":[1],"placeholder":[1],"value":[1537],"error":[1],"id":[1],"disabled":[4],"leftIcon":[1,"left-icon"],"rightIcon":[1,"right-icon"],"clearable":[4],"variant":[1],"uppercase":[4],"getInputElement":[64]},[[4,"change","handleFormChange"]]]]],["p-f203ccac",[[256,"discount-coupon",{"hideLabel":[4,"hide-label"],"couponCode":[32],"actionStatus":[32],"isLoading":[32],"isError":[32],"currentLocale":[32]}],[256,"rebill-timeline-debit-day",{"debitDay":[2,"debit-day"],"totalAmount":[2,"total-amount"],"planAmount":[2,"plan-amount"],"currency":[1],"debitStrategy":[1,"debit-strategy"],"language":[1],"discountApplied":[4,"discount-applied"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"currentLanguage":[32]}],[256,"rebill-timeline-free-trial",{"trialPeriodEndsAt":[1,"trial-period-ends-at"],"trialPeriodEndsReminderAt":[1,"trial-period-ends-reminder-at"],"trialPeriodDays":[2,"trial-period-days"],"subtotal":[2],"currency":[1],"language":[1],"discountApplied":[4,"discount-applied"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"currentLanguage":[32]}]]],["p-e31b0d59",[[256,"rebill-divider"],[260,"collapsible-card",{"header":[1],"open":[4],"variant":[1],"isOpen":[32]}]]],["p-91a86735",[[260,"rebill-button",{"type":[1],"disabled":[4],"id":[1],"loading":[4],"showSpinnerWithText":[4,"show-spinner-with-text"],"nonClickable":[4,"non-clickable"],"variant":[1],"theme":[1],"size":[1],"icon":[1],"iconColor":[1,"icon-color"]}]]],["p-947bde02",[[256,"rebill-input-select",{"label":[1],"options":[16],"value":[1537],"error":[1],"id":[1],"disabled":[4],"placeholder":[1],"variant":[1],"arrowIcon":[1,"arrow-icon"],"dropPosition":[1,"drop-position"],"fontSize":[1,"font-size"],"backgroundColor":[1,"background-color"],"searchable":[4],"searchPlaceholder":[1,"search-placeholder"],"loading":[4],"isOpen":[32],"componentId":[32],"highlightedIndex":[32],"searchTerm":[32],"filteredOptions":[32],"languageUpdateTrigger":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"],[0,"keydown","handleKeyDown"]]]]],["p-22ecf27c",[[256,"rebill-card-icon",{"cardBrand":[1,"card-brand"],"width":[2],"height":[2]}],[260,"rebill-checkout-single-column"],[256,"rebill-footer",{"breakpoint":[32]}],[256,"organization-logo",{"organization":[16]}]]],["p-4e35c3c8",[[256,"rebill-summary",{"totalAmount":[8,"total-amount"],"itemTitle":[1,"item-title"],"itemDescription":[1,"item-description"],"itemAmount":[8,"item-amount"],"planFrequency":[1,"plan-frequency"],"planFrequencyCount":[2,"plan-frequency-count"],"subtotal":[8],"discount":[8],"currency":[1],"displayedComponents":[16],"allowCoupon":[4,"allow-coupon"],"currentBreakpoint":[1,"current-breakpoint"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"discountApplied":[32]},[[0,"discountApplied","handleDiscountApplied"]]],[256,"success-page",{"typePaymentMethod":[1,"type-payment-method"],"country":[1],"bank":[1],"paymentMethodName":[1,"payment-method-name"],"cardLastFour":[1,"card-last-four"],"paymentDate":[1,"payment-date"],"referenceNumber":[1,"reference-number"],"trialPeriodDays":[2,"trial-period-days"],"debitDay":[2,"debit-day"],"planAmount":[2,"plan-amount"],"timeToRedirect":[2,"time-to-redirect"],"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32],"showRedirectMessage":[32]}],[256,"otp-component",{"timeLeft":[32],"isTimerRunning":[32],"codeResent":[32],"isVerifying":[32],"otpValue":[32],"error":[32]}],[256,"user-information",{"userInformation":[16],"errors":[16],"customerExists":[4,"customer-exists"],"disabled":[4]},[[0,"input","handleInputChange"],[0,"blur","handleBlur"]]],[256,"rebill-mode-sandbox",{"isPanelVisible":[32],"isPanelClosing":[32],"isCardsPanelVisible":[32],"isCardsPanelClosing":[32],"currentLanguage":[32]}],[256,"rebill-mode-sandbox-mobile",{"isPanelVisible":[32],"currentLanguage":[32]}],[256,"rebill-modal-overlay",{"visible":[32],"languageUpdateTrigger":[32]}]]],["p-fff07656",[[256,"rebill-installments",{"error":[1],"currentValue":[32],"isDisabled":[32],"value":[32],"placeholder":[32]}],[256,"card-identification",{"documentTypeError":[1,"document-type-error"],"documentNumberError":[1,"document-number-error"],"documentTypes":[32],"country":[32],"currentLanguage":[32]}],[256,"card-iframe",{"customCSS":[1,"custom-c-s-s"],"iframeLoaded":[32],"currentLang":[32],"initialLang":[32],"iframeHeight":[32]}],[256,"rebill-input-combo",{"label":[1],"options":[16],"selectValue":[1537,"select-value"],"inputValue":[1537,"input-value"],"inputPlaceholder":[1,"input-placeholder"],"selectPlaceholder":[1,"select-placeholder"],"error":[1],"selectId":[1,"select-id"],"inputId":[1,"input-id"],"disabled":[4],"selectWidth":[1,"select-width"],"isOpen":[32],"highlightedIndex":[32],"componentId":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"]]],[256,"card-skeleton"]]],["p-07de4442",[[256,"payment-method-selector",{"enabledPaymentMethods":[16],"defaultSelected":[1,"default-selected"],"showErrorComponent":[4,"show-error-component"],"cardError":[16],"country":[1],"installmentsError":[1,"installments-error"],"documentTypeError":[1,"document-type-error"],"showDocument":[4,"show-document"],"documentNumberError":[1,"document-number-error"],"customCSS":[1,"custom-c-s-s"],"errorComponent":[16],"disabled":[4],"icon":[32],"selectedPaymentMethod":[32],"saveCard":[32]},[[0,"selectableCardClick","handleSelectableCardClick"]]],[256,"rebill-processing-payment",{"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32]}],[256,"apm-checkout",{"paymentMethod":[1,"payment-method"],"referenceId":[1,"reference-id"],"qrCodeData":[1,"qr-code-data"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"country":[1],"redirectUrl":[1,"redirect-url"],"timeToRedirect":[2,"time-to-redirect"],"checkoutRequestId":[1,"checkout-request-id"],"bearerToken":[1,"bearer-token"],"showRedirectMessage":[32],"isPolling":[32],"minutesLeft":[32],"qrStartTime":[32]}],[256,"rebill-address",{"billingView":[1537,"billing-view"],"disabled":[4],"countryOptions":[16],"errors":[16],"currentBillingStateOptions":[32],"isLoadingAddress":[32]}],[256,"user-information-static",{"userInfo":[16],"variant":[1]}],[256,"payment-button",{"isDisabled":[4,"is-disabled"],"isLoading":[4,"is-loading"],"paymentMethod":[1,"payment-method"],"isRenewal":[4,"is-renewal"],"trialPeriodDays":[2,"trial-period-days"],"redirectUrl":[4,"redirect-url"],"timeToRedirect":[2,"time-to-redirect"],"country":[1],"currentLanguage":[32],"countdownSeconds":[32],"paymentMethodDisplayName":[32]},null,{"redirectUrl":["onRedirectPropsChange"],"timeToRedirect":["onRedirectPropsChange"]}],[256,"rebill-bank-selector",{"banks":[16],"defaultSelectedBankId":[1,"default-selected-bank-id"],"error":[1],"selectedBankId":[32],"languageUpdateTrigger":[32]}],[256,"user-information-phone",{"error":[1],"countryCode":[1,"country-code"],"disabled":[4],"languageUpdateTrigger":[32]}],[256,"rebill-checkout-form",{"validationSchema":[8,"validation-schema"],"initialData":[16],"renderForm":[16],"resetValidation":[64]},[[0,"change","handleFormChange"]]],[256,"card-fields-wrapper",{"installmentsError":[1,"installments-error"],"documentTypeError":[1,"document-type-error"],"documentNumberError":[1,"document-number-error"],"showDocument":[4,"show-document"],"customCSS":[1,"custom-c-s-s"]}],[256,"rebill-address-form",{"addressType":[1,"address-type"],"countryOptions":[16],"stateOptions":[16],"errors":[16],"disabled":[4]}],[256,"qr-code",{"qrCodeData":[1,"qr-code-data"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"paymentMethod":[1,"payment-method"],"qrCodeSvg":[32],"isImage":[32],"timeLeft":[32],"formattedTime":[32]}],[256,"rebill-address-search",{"addressType":[1,"address-type"],"placeholder":[1],"error":[1],"disabled":[4],"isInitialized":[32],"currentLocale":[32]}],[256,"rebill-input-phone",{"placeholder":[1],"value":[1537],"error":[1],"phoneNumberId":[1,"phone-number-id"],"countryCodeId":[1,"country-code-id"],"validationErrorId":[1,"validation-error-id"],"disabled":[4],"initialCountry":[1,"initial-country"],"required":[4],"searchable":[4],"searchPlaceholder":[1,"search-placeholder"],"selectedCountry":[32],"isDropdownOpen":[32],"validationError":[32],"searchTerm":[32],"filteredCountries":[32],"componentId":[32],"languageUpdateTrigger":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"]]],[256,"reference-code",{"referenceId":[1,"reference-id"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"instructions":[16],"showInstructions":[32]}],[260,"selectable-card",{"selected":[4],"label":[1],"cardKey":[1,"card-key"],"disabled":[4]}]]]]'),e)}));
1
+ import{p as e,b as t}from"./p-D8cwEAmw.js";export{s as setNonce}from"./p-D8cwEAmw.js";import{g as r}from"./p-DQuL1Twl.js";var a=()=>{const t=import.meta.url;const r={};if(t!==""){r.resourcesUrl=new URL(".",t).href}return e(r)};a().then((async e=>{await r();return t(JSON.parse('[["p-738fbc04",[[256,"rebill-checkout",{"productId":[1,"product-id"],"planId":[1,"plan-id"],"publicKey":[1,"public-key"],"instantProduct":[1,"instant-product"],"instantPlan":[1,"instant-plan"],"display":[1],"customerInformation":[1,"customer-information"],"oneClickCheckout":[4,"one-click-checkout"],"css":[1],"language":[1],"checkoutLandingSession":[1,"checkout-landing-session"],"externalPayment":[1,"external-payment"],"rejectedPaymentCard":[32],"rejectedPaymentAPM":[32],"countries":[32],"currentPaymentMethod":[32],"checkoutResponse":[32],"isSubmitting":[32],"isCardSubmitting":[32],"isCardSuccess":[32],"isAPMSubmitting":[32],"isAPMSuccess":[32],"storedCheckoutResults":[32],"alertErrorKeys":[32],"currentApmPaymentMethod":[32],"breakpoint":[32],"showRefreshModal":[32],"cardError":[32],"initialData":[32],"allRequiredFields":[32],"currentRequiredFields":[32],"customerExists":[32],"showOtp":[32],"otpVerified":[32],"responseCheckoutCard":[32],"cardMode":[32],"submit":[64]},[[0,"paymentMethodSelected","handlePaymentMethodSelected"],[0,"input","handleInputChange"],[0,"onRebillAccountClick","handleRebillAccountClick"],[0,"returnForm","handleReturnForm"],[0,"signOut","handleSignOut"],[0,"codeVerified","handleCodeVerified"]],{"language":["handleLanguageChange"]}]]],["p-d65ef616",[[256,"rebill-renewal",{"renewalData":[1,"renewal-data"],"renewalToken":[1,"renewal-token"],"currentPaymentMethod":[32],"isSubmitting":[32],"isCardSubmitting":[32],"isCardSuccess":[32],"errorMessage":[32],"breakpoint":[32],"errorPaymentCard":[32],"errorPaymentAPM":[32],"initialData":[32],"checkoutResponse":[32],"currentApmPaymentMethod":[32],"countries":[32],"allRequiredFields":[32],"currentRequiredFields":[32],"errorCardInvalid":[32],"cardMode":[32]},[[0,"paymentMethodSelected","handlePaymentMethodSelected"],[0,"bankSelected","handleBankSelected"],[0,"cardSelected","handleCardSelected"]]]]],["p-1aeb03d6",[[256,"root-component",{"isLoading":[32],"currentLang":[32],"formData":[32]}]]],["p-149a0557",[[256,"rebill-card-carousel",{"interval":[2],"size":[1],"color":[1],"showAllCards":[4,"show-all-cards"],"currentIndex":[32]}]]],["p-ad293474",[[260,"rebill-flex-container",{"direction":[1],"wrap":[1],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-9535c260",[[260,"rebill-grid-container",{"columns":[2],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-ce0793c8",[[256,"renewal-success-page",{"typePaymentMethod":[1,"type-payment-method"],"country":[1],"bank":[1],"paymentMethodName":[1,"payment-method-name"],"cardLastFour":[1,"card-last-four"],"paymentDate":[1,"payment-date"],"referenceNumber":[1,"reference-number"],"trialPeriodDays":[2,"trial-period-days"],"debitDay":[2,"debit-day"],"planAmount":[2,"plan-amount"],"timeToRedirect":[2,"time-to-redirect"],"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32],"showRedirectMessage":[32]}],[256,"renewal-summary",{"displayedComponents":[16],"totalAmount":[8,"total-amount"],"subscriptionTitle":[1,"subscription-title"],"subscriptionAmount":[8,"subscription-amount"],"nextChargeDate":[1,"next-charge-date"],"frequency":[16],"currency":[1],"forceUpdate":[32]}]]],["p-c61125f7",[[256,"input-otp",{"error":[1],"otp":[1],"clearable":[4],"placeholder":[1],"otpValue":[32]}]]],["p-a0642017",[[256,"rebill-card",{"cardTitle":[1,"card-title"],"cardLabels":[16]}]]],["p-639098ea",[[260,"rebill-container",{"maxWidth":[1,"max-width"],"padding":[1],"fluid":[4]}],[256,"rebill-input-checkbox",{"label":[1],"checked":[1540],"error":[1],"id":[1],"disabled":[4]},[[4,"change","handleFormChange"]]]]],["p-75f55dbc",[[260,"rebill-form",{"validationSchema":[8,"validation-schema"],"initialData":[16],"renderForm":[16],"formData":[32],"errors":[32],"submitForm":[64],"resetValidation":[64],"clearError":[64]},[[0,"input","handleInputChange"],[0,"blur","handleBlur"]],{"initialData":["handleInitialDataChange"],"validationSchema":["handleValidationSchemaChange"]}]]],["p-bc5bf9f3",[[256,"rebill-vertical-divider",{"height":[1],"color":[1],"thickness":[1],"dashed":[4],"connectorActive":[4,"connector-active"],"withDot":[4,"with-dot"]}]]],["p-55603be3",[[260,"rebill-typography",{"variant":[1],"color":[1],"align":[1],"noWrap":[4,"no-wrap"],"gutterBottom":[4,"gutter-bottom"],"paragraph":[4]}],[256,"rebill-icon",{"name":[1],"size":[1],"color":[1],"svgContent":[32]}]]],["p-a7404680",[[256,"rebill-alert",{"type":[1],"message":[1],"alertTitle":[1,"alert-title"],"icon":[1],"variant":[1],"size":[1],"colorIcon":[1,"color-icon"]}]]],["p-1b2d661e",[[256,"rebill-input-text",{"label":[1],"placeholder":[1],"value":[1537],"error":[1],"id":[1],"disabled":[4],"leftIcon":[1,"left-icon"],"rightIcon":[1,"right-icon"],"clearable":[4],"variant":[1],"uppercase":[4],"getInputElement":[64]},[[4,"change","handleFormChange"]]]]],["p-f203ccac",[[256,"discount-coupon",{"hideLabel":[4,"hide-label"],"couponCode":[32],"actionStatus":[32],"isLoading":[32],"isError":[32],"currentLocale":[32]}],[256,"rebill-timeline-debit-day",{"debitDay":[2,"debit-day"],"totalAmount":[2,"total-amount"],"planAmount":[2,"plan-amount"],"currency":[1],"debitStrategy":[1,"debit-strategy"],"language":[1],"discountApplied":[4,"discount-applied"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"currentLanguage":[32]}],[256,"rebill-timeline-free-trial",{"trialPeriodEndsAt":[1,"trial-period-ends-at"],"trialPeriodEndsReminderAt":[1,"trial-period-ends-reminder-at"],"trialPeriodDays":[2,"trial-period-days"],"subtotal":[2],"currency":[1],"language":[1],"discountApplied":[4,"discount-applied"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"currentLanguage":[32]}]]],["p-e31b0d59",[[256,"rebill-divider"],[260,"collapsible-card",{"header":[1],"open":[4],"variant":[1],"isOpen":[32]}]]],["p-297a5c76",[[260,"rebill-button",{"type":[1],"disabled":[4],"id":[1],"loading":[4],"showSpinnerWithText":[4,"show-spinner-with-text"],"nonClickable":[4,"non-clickable"],"variant":[1],"theme":[1],"size":[1],"icon":[1],"iconColor":[1,"icon-color"]}]]],["p-947bde02",[[256,"rebill-input-select",{"label":[1],"options":[16],"value":[1537],"error":[1],"id":[1],"disabled":[4],"placeholder":[1],"variant":[1],"arrowIcon":[1,"arrow-icon"],"dropPosition":[1,"drop-position"],"fontSize":[1,"font-size"],"backgroundColor":[1,"background-color"],"searchable":[4],"searchPlaceholder":[1,"search-placeholder"],"loading":[4],"isOpen":[32],"componentId":[32],"highlightedIndex":[32],"searchTerm":[32],"filteredOptions":[32],"languageUpdateTrigger":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"],[0,"keydown","handleKeyDown"]]]]],["p-22ecf27c",[[256,"rebill-card-icon",{"cardBrand":[1,"card-brand"],"width":[2],"height":[2]}],[260,"rebill-checkout-single-column"],[256,"rebill-footer",{"breakpoint":[32]}],[256,"organization-logo",{"organization":[16]}]]],["p-4e35c3c8",[[256,"rebill-summary",{"totalAmount":[8,"total-amount"],"itemTitle":[1,"item-title"],"itemDescription":[1,"item-description"],"itemAmount":[8,"item-amount"],"planFrequency":[1,"plan-frequency"],"planFrequencyCount":[2,"plan-frequency-count"],"subtotal":[8],"discount":[8],"currency":[1],"displayedComponents":[16],"allowCoupon":[4,"allow-coupon"],"currentBreakpoint":[1,"current-breakpoint"],"discountType":[1,"discount-type"],"discountedPercentage":[2,"discounted-percentage"],"discountDuration":[2,"discount-duration"],"discountAmount":[2,"discount-amount"],"discountApplied":[32]},[[0,"discountApplied","handleDiscountApplied"]]],[256,"success-page",{"typePaymentMethod":[1,"type-payment-method"],"country":[1],"bank":[1],"paymentMethodName":[1,"payment-method-name"],"cardLastFour":[1,"card-last-four"],"paymentDate":[1,"payment-date"],"referenceNumber":[1,"reference-number"],"trialPeriodDays":[2,"trial-period-days"],"debitDay":[2,"debit-day"],"planAmount":[2,"plan-amount"],"timeToRedirect":[2,"time-to-redirect"],"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32],"showRedirectMessage":[32]}],[256,"otp-component",{"timeLeft":[32],"isTimerRunning":[32],"codeResent":[32],"isVerifying":[32],"otpValue":[32],"error":[32]}],[256,"user-information",{"userInformation":[16],"errors":[16],"customerExists":[4,"customer-exists"],"disabled":[4]},[[0,"input","handleInputChange"],[0,"blur","handleBlur"]]],[256,"rebill-mode-sandbox",{"isPanelVisible":[32],"isPanelClosing":[32],"isCardsPanelVisible":[32],"isCardsPanelClosing":[32],"currentLanguage":[32]}],[256,"rebill-mode-sandbox-mobile",{"isPanelVisible":[32],"currentLanguage":[32]}],[256,"rebill-modal-overlay",{"visible":[32],"languageUpdateTrigger":[32]}]]],["p-fff07656",[[256,"rebill-installments",{"error":[1],"currentValue":[32],"isDisabled":[32],"value":[32],"placeholder":[32]}],[256,"card-identification",{"documentTypeError":[1,"document-type-error"],"documentNumberError":[1,"document-number-error"],"documentTypes":[32],"country":[32],"currentLanguage":[32]}],[256,"card-iframe",{"customCSS":[1,"custom-c-s-s"],"iframeLoaded":[32],"currentLang":[32],"initialLang":[32],"iframeHeight":[32]}],[256,"rebill-input-combo",{"label":[1],"options":[16],"selectValue":[1537,"select-value"],"inputValue":[1537,"input-value"],"inputPlaceholder":[1,"input-placeholder"],"selectPlaceholder":[1,"select-placeholder"],"error":[1],"selectId":[1,"select-id"],"inputId":[1,"input-id"],"disabled":[4],"selectWidth":[1,"select-width"],"isOpen":[32],"highlightedIndex":[32],"componentId":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"]]],[256,"card-skeleton"]]],["p-07de4442",[[256,"payment-method-selector",{"enabledPaymentMethods":[16],"defaultSelected":[1,"default-selected"],"showErrorComponent":[4,"show-error-component"],"cardError":[16],"country":[1],"installmentsError":[1,"installments-error"],"documentTypeError":[1,"document-type-error"],"showDocument":[4,"show-document"],"documentNumberError":[1,"document-number-error"],"customCSS":[1,"custom-c-s-s"],"errorComponent":[16],"disabled":[4],"icon":[32],"selectedPaymentMethod":[32],"saveCard":[32]},[[0,"selectableCardClick","handleSelectableCardClick"]]],[256,"rebill-processing-payment",{"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[32]}],[256,"apm-checkout",{"paymentMethod":[1,"payment-method"],"referenceId":[1,"reference-id"],"qrCodeData":[1,"qr-code-data"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"country":[1],"redirectUrl":[1,"redirect-url"],"timeToRedirect":[2,"time-to-redirect"],"checkoutRequestId":[1,"checkout-request-id"],"bearerToken":[1,"bearer-token"],"showRedirectMessage":[32],"isPolling":[32],"minutesLeft":[32],"qrStartTime":[32]}],[256,"rebill-address",{"billingView":[1537,"billing-view"],"disabled":[4],"countryOptions":[16],"errors":[16],"currentBillingStateOptions":[32],"isLoadingAddress":[32]}],[256,"user-information-static",{"userInfo":[16],"variant":[1]}],[256,"payment-button",{"isDisabled":[4,"is-disabled"],"isLoading":[4,"is-loading"],"paymentMethod":[1,"payment-method"],"isRenewal":[4,"is-renewal"],"trialPeriodDays":[2,"trial-period-days"],"redirectUrl":[4,"redirect-url"],"timeToRedirect":[2,"time-to-redirect"],"country":[1],"currentLanguage":[32],"countdownSeconds":[32],"paymentMethodDisplayName":[32]},null,{"redirectUrl":["onRedirectPropsChange"],"timeToRedirect":["onRedirectPropsChange"]}],[256,"rebill-bank-selector",{"banks":[16],"defaultSelectedBankId":[1,"default-selected-bank-id"],"error":[1],"selectedBankId":[32],"languageUpdateTrigger":[32]}],[256,"user-information-phone",{"error":[1],"countryCode":[1,"country-code"],"disabled":[4],"languageUpdateTrigger":[32]}],[256,"rebill-checkout-form",{"validationSchema":[8,"validation-schema"],"initialData":[16],"renderForm":[16],"resetValidation":[64]},[[0,"change","handleFormChange"]]],[256,"card-fields-wrapper",{"installmentsError":[1,"installments-error"],"documentTypeError":[1,"document-type-error"],"documentNumberError":[1,"document-number-error"],"showDocument":[4,"show-document"],"customCSS":[1,"custom-c-s-s"]}],[256,"rebill-address-form",{"addressType":[1,"address-type"],"countryOptions":[16],"stateOptions":[16],"errors":[16],"disabled":[4]}],[256,"qr-code",{"qrCodeData":[1,"qr-code-data"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"paymentMethod":[1,"payment-method"],"qrCodeSvg":[32],"isImage":[32],"timeLeft":[32],"formattedTime":[32]}],[256,"rebill-address-search",{"addressType":[1,"address-type"],"placeholder":[1],"error":[1],"disabled":[4],"isInitialized":[32],"currentLocale":[32]}],[256,"rebill-input-phone",{"placeholder":[1],"value":[1537],"error":[1],"phoneNumberId":[1,"phone-number-id"],"countryCodeId":[1,"country-code-id"],"validationErrorId":[1,"validation-error-id"],"disabled":[4],"initialCountry":[1,"initial-country"],"required":[4],"searchable":[4],"searchPlaceholder":[1,"search-placeholder"],"selectedCountry":[32],"isDropdownOpen":[32],"validationError":[32],"searchTerm":[32],"filteredCountries":[32],"componentId":[32],"languageUpdateTrigger":[32]},[[4,"change","handleFormChange"],[4,"closeAllSelects","handleCloseAllSelects"],[4,"click","handleDocumentClick"]]],[256,"reference-code",{"referenceId":[1,"reference-id"],"providerName":[1,"provider-name"],"expirationDate":[1,"expiration-date"],"instructions":[16],"showInstructions":[32]}],[260,"selectable-card",{"selected":[4],"label":[1],"cardKey":[1,"card-key"],"disabled":[4]}]]]]'),e)}));
2
2
  //# sourceMappingURL=rebill-web-components-sdk.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebill-web-components-sdk",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- {"file":"p-Cp7iacZh.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,soJAAsoJ;;MCU3oJ,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAAC,CAAA,CAAA;;;;;;;IACT,IAAI,GAAkC,QAAQ;IAC9C,QAAQ,GAAG,KAAK;AAChB,IAAA,EAAE;IACF,OAAO,GAAG,KAAK;IACf,mBAAmB,GAAG,KAAK;IAC3B,YAAY,GAAG,KAAK;IACpB,OAAO,GAA6D,QAAQ;IAC5E,KAAK,GAAuD,SAAS;IACrE,IAAI,GAAiC,QAAQ;AAC7C,IAAA,IAAI;AACJ,IAAA,SAAS;AAET,IAAA,WAAW,CAAC,KAAY,EAAA;AAC9B,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE;YACtB,KAAK,CAAC,eAAe,EAAE;AACvB,YAAA,OAAO,KAAK;;;IAIhB,MAAM,GAAA;QACJ,QACE,+DACE,KAAK,EAAE,CAAU,OAAA,EAAA,IAAI,CAAC,OAAO,CAAI,CAAA,EAAA,IAAI,CAAC,KAAK,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,GAAG,WAAW,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC,OAAO,GAAG,mBAAmB,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,YAAY,GAAG,eAAe,GAAG,EAAE,CAAA,CAAE,EAC9O,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EACvC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,YAAY,GAAG,aAAa,GAAG,SAAS;aACtD,EAAA,EAEA,IAAI,CAAC,IAAI,IAAI,oEAAa,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAI,CAAA,EAChF,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,IACxC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,SAAS,EAAO,CAAA,IACzB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,mBAAmB,IAC1C,CAAA,CAAA,CAAA,CAAA,QAAA,EAAA,IAAA,EACE,CAAa,CAAA,MAAA,EAAA,IAAA,CAAA,EACb,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,SAAS,EAAA,CAAO,CAC1B,KAEH,CAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACd,CACM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/shared/button/button.css?tag=rebill-button","src/components/shared/button/button.tsx"],"sourcesContent":[".button {\n border: 1px solid transparent;\n border-radius: 0.375rem;\n padding: 0.75rem 1.5rem;\n width: 100%;\n font-size: 1rem;\n font-family: inherit;\n box-shadow: 0 2px 4px var(--rebill-color-shadow);\n cursor: pointer;\n transition:\n background 0.2s,\n color 0.2s,\n border-color 0.2s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Size variants */\n.button.small {\n padding: 4px 8px;\n font-size: 14px;\n min-height: 2rem;\n}\n\n.button.medium {\n padding: 0.75rem 1.5rem;\n font-size: 1rem;\n min-height: 2.5rem;\n}\n\n.button.large {\n padding: 1rem 2rem;\n font-size: 1.125rem;\n min-height: 3rem;\n}\n/* Filled variant */\n.button.filled.primary {\n background: var(--rebill-color-primary);\n color: var(--rebill-color-text-on-primary);\n}\n.button.filled.primary:hover {\n background: var(--rebill-color-primary-hover);\n}\n.button.filled.error {\n background: var(--rebill-color-error);\n color: var(--rebill-color-text-on-primary);\n}\n.button.filled.primary-dark {\n background: var(--rebill-color-primary-dark);\n color: var(--rebill-color-text-on-primary);\n}\n.button.filled.primary-dark:hover {\n background: var(--rebill-color-primary-dark-hover);\n}\n\n.button.filled.button.secondary {\n background: var(--rebill-color-border);\n color: var(--rebill-color-neutrals-700);\n}\n\n/* Outline variant */\n.button.outline {\n background: transparent;\n box-shadow: none;\n}\n.button.outline.primary {\n border-color: var(--rebill-color-primary);\n color: var(--rebill-color-primary);\n}\n.button.outline.primary:hover {\n background: var(--rebill-color-primary-light);\n}\n.button.outline.primary-dark {\n border-color: var(--rebill-color-primary-dark);\n color: var(--rebill-color-primary-dark);\n}\n.button.outline.primary-dark:hover {\n background: var(--rebill-color-primary-dark-light);\n}\n.button.outline.error {\n border-color: var(--rebill-color-error);\n color: var(--rebill-color-error);\n}\n.button.outline.error:hover {\n background: var(--rebill-color-error-light);\n}\n\n/* Text variant */\n.button.text {\n background: transparent;\n box-shadow: none;\n}\n.button.text.primary {\n color: var(--rebill-color-primary);\n}\n.button.text.primary:hover {\n background: var(--rebill-color-background-secondary-light);\n}\n.button.text.primary-dark {\n color: var(--rebill-color-primary-dark);\n}\n.button.text.primary-dark:hover {\n background: var(--rebill-color-primary-dark-light);\n}\n.button.text.error {\n color: var(--rebill-color-error);\n}\n.button.text.error:hover {\n background: var(--rebill-color-error-light);\n}\n\n/* Secundary variant */\n.button.secondary {\n background: var(--rebill-color-background);\n color: var(--rebill-color-text-primary);\n border: 1px solid var(--rebill-color-border-primary);\n border-radius: 6px;\n padding: 4px 8px;\n font-weight: 500;\n font-size: 14px;\n box-sizing: border-box;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n font-family: Inter, sans-serif;\n}\n.button.secondary:hover {\n background: var(--rebill-color-background-secondary);\n border-color: var(--rebill-color-border);\n}\n/* Download variant */\n.button.download {\n background: transparent;\n box-shadow: none;\n border: none;\n padding: 4px 8px;\n font-family: Inter, semibold;\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: 0%;\n color: #000000;\n cursor: pointer;\n transition: none;\n min-height: auto;\n width: auto;\n}\n\n.button.download:hover {\n background: transparent;\n color: #000000;\n transform: none;\n}\n\n.button.download:focus {\n background: transparent;\n color: #000000;\n outline: none;\n}\n\n.button.download:active {\n background: transparent;\n color: #000000;\n transform: none;\n}\n\n/* Button */\n.button:disabled {\n background: var(--rebill-color-disabled);\n color: var(--rebill-color-text-on-primary);\n opacity: 0.7;\n cursor: not-allowed;\n box-shadow: none;\n border-color: transparent;\n}\n\n.button:disabled:hover {\n background: var(--rebill-color-disabled);\n}\n\n.button.outline:disabled,\n.button.text:disabled {\n background: transparent;\n border-color: var(--rebill-color-disabled, #ccc);\n color: var(--rebill-color-disabled, #ccc);\n}\n\n.button.outline:disabled:hover,\n.button.text:disabled:hover {\n background: transparent;\n}\n\n.spinner {\n width: 15px;\n height: 15px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-radius: 50%;\n border-top-color: white;\n animation: spin 1s linear infinite;\n display: inline-block;\n flex-shrink: 0;\n vertical-align: middle;\n}\n\n.button.outline .spinner,\n.button.text .spinner {\n border: 2px solid var(--rebill-color-primary-light, rgba(0, 0, 0, 0.1));\n border-top-color: var(--rebill-color-primary);\n}\n\n.button.outline.primary-dark .spinner,\n.button.text.primary-dark .spinner {\n border: 2px solid var(--rebill-color-primary-light, rgba(0, 0, 0, 0.1));\n border-top-color: var(--rebill-color-primary-dark);\n}\n\n.button.outline.error .spinner,\n.button.text.error .spinner {\n border: 2px solid var(--rebill-color-error-light, rgba(0, 0, 0, 0.1));\n border-top-color: var(--rebill-color-error);\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Spinner with text styles */\n.button.spinner-with-text {\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n\n flex-direction: row !important;\n}\n\n.button.spinner-with-text .spinner {\n margin-left: 12px;\n vertical-align: middle;\n}\n\n/* Icon styles */\n.button.with-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n\n.button.secondary.with-icon {\n font-weight: 500;\n}\n\n.button.non-clickable {\n cursor: not-allowed !important;\n pointer-events: none;\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport '../icon/icon';\nimport './button.css';\n\n@Component({\n tag: 'rebill-button',\n styleUrl: 'button.css',\n shadow: false,\n})\nexport class Button {\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n @Prop() disabled = false;\n @Prop() id: string;\n @Prop() loading = false;\n @Prop() showSpinnerWithText = false;\n @Prop() nonClickable = false;\n @Prop() variant: 'filled' | 'outline' | 'secondary' | 'text' | 'download' = 'filled';\n @Prop() theme: 'primary' | 'error' | 'primary-dark' | 'secondary' = 'primary';\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n @Prop() icon?: string;\n @Prop() iconColor: COLORS_ENUM;\n\n private handleClick(event: Event) {\n if (this.nonClickable) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n }\n\n render() {\n return (\n <button\n class={`button ${this.variant} ${this.theme} ${this.size} ${this.loading ? 'loading' : ''} ${this.icon ? 'with-icon' : ''} ${this.showSpinnerWithText && this.loading ? 'spinner-with-text' : ''} ${this.nonClickable ? 'non-clickable' : ''}`}\n id={this.id}\n type={this.type}\n disabled={this.disabled || this.loading}\n onClick={this.handleClick}\n style={{\n cursor: this.nonClickable ? 'not-allowed' : undefined,\n }}\n >\n {this.icon && <rebill-icon name={this.icon} size=\"16px\" color={this.iconColor} />}\n {this.loading && !this.showSpinnerWithText ? (\n <div class=\"spinner\"></div>\n ) : this.loading && this.showSpinnerWithText ? (\n <>\n <slot></slot>\n <div class=\"spinner\"></div>\n </>\n ) : (\n <slot></slot>\n )}\n </button>\n );\n }\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e}from"./p-D8cwEAmw.js";import{c as s}from"./p-MMCcKmy_.js";import{a as n}from"./p-CTo1s54i.js";import{m as a,g as o,P as r,C as l,i as c,a as h,b as d}from"./p-DPFqzU0J.js";import{s as u,S as m,I as p,a as f,i as y,P as b,o as g,b as w}from"./p-_KJrM-e7.js";import{S as k}from"./p-vsLqF4hk.js";import{B as x,g as v,i as C}from"./p-Do_vNuMa.js";import{P as I,G as P}from"./p-NfoZGdrg.js";import"./p-E-ZsRS8r.js";import"./p-D339jHg4.js";const S={checkoutSummary:true,submitButton:true,billingAddress:true,customerInformation:true,discountCode:true,logo:true,footer:true,sandboxMode:true,processingPayment:true,successPage:true,errorMessage:true};var M;(function(t){t["BAMBOO"]="bamboo_payment";t["FISERV"]="fiserv";t["KUSHKI"]="kushki";t["PAYWAY"]="payway";t["DOCK"]="dock";t["KLAP"]="klap";t["MOVII"]="movii";t["STRIPE"]="stripe";t["DECIDIR"]="decidir"})(M||(M={}));const N=async(t,i,e)=>{const s=await n.checkout.getRequiredFields({currency:t,method:i},e);return{fields:a(s.data),original:s.data}};const j=async()=>{const t=u.data?.itemInformation?.paymentMethods;const i=t.map((async t=>{try{const i=I.mapToAPMPaymentMethod(t,u.data?.pricing?.country);const e=await N(u.data.pricing.currency,i,u.data.organization.id);return{paymentMethod:t,...e}}catch(i){console.error(`Error getting required fields for ${t}:`,i);return{paymentMethod:t,fields:[],original:[]}}}));const e=await Promise.all(i);const s={};e.forEach((t=>{s[t.paymentMethod]={fields:t.fields,original:t.original}}));return s};const R=(t,i)=>{const e=i[t];if(e){return e}else{return{fields:[],original:[]}}};const D=t=>typeof t==="string"?JSON.parse(t):t;const q=t=>D(t);const z=()=>"190.188.127.250";const T=async({publicKey:t,instantProduct:i,instantPlan:e})=>{const s=D(i?i:e);const a=await n.sessions.createSDKInstantSessionRequest(s,o(),z(),t);const r={...a.data,...a.data.plan&&{plan:{...a.data.plan,description:s.description||[]}},...a.data.product&&{product:{...a.data.product,description:s.description||[]}}};const l=r;return l};const A=async({publicKey:t,productId:i,planId:e})=>{const s=await n.sessions.createSDKItemSessionRequest({...i?{productId:i}:{},...e?{planId:e}:{},idempotencyKey:o(),deviceId:"123123123",clientIP:z(),publicKey:t});const a=s.data;return a};const E=async({publicKey:t,checkoutLandingSession:i,instantProduct:e,instantPlan:s,productId:n,planId:a})=>{if(i){const t=await q(i);return{session:t,type:m.CHECKOUT_LANDING}}if(e||s){const i=await T({publicKey:t,instantProduct:e,instantPlan:s});return{session:i,type:m.INSTANT}}if(n||a){const i=await A({publicKey:t,productId:n,planId:a});return{session:i,type:m.SDK_ITEM}}};const F="@media (max-width: 1024px){.rebill-checkout{width:100%;flex-direction:column;gap:0;justify-content:flex-start;background:var(--rebill-color-background);padding:20px}.right-section-checkout .left-section{width:100%;height:100%;background:var(--rebill-color-background)}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;gap:24px;height:100%}.otp-container{display:flex;flex-direction:column;justify-content:flex-start;gap:24px}.rebill-checkout.full-width-layout .left-section{width:100%}.rebill-checkout.full-width-layout .left-section-container{max-width:none;width:100%}}@media (min-width: 1025px){.rebill-checkout{width:100%;min-height:600px;display:flex;flex-direction:row;justify-content:center;overflow-y:auto}.left-section{display:flex;width:60%;background:var(--rebill-color-background-left);justify-content:space-around}.right-section-checkout{display:flex;padding-top:72px;width:40%;background:var(--rebill-color-background-right);position:sticky;top:0;justify-content:center}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;margin-bottom:36px;gap:32px}.left-section-container{max-width:450px;min-width:450px;margin:2.5rem 2rem 1.5rem 2rem;display:flex;flex-direction:column}.checkout-summary-section{max-width:450px;min-width:350px;margin:0rem 2rem;background:var(--rebill-color-background-right);display:flex;flex-direction:column;justify-content:flex-start;width:100%}.checkout-form-section user-information,.checkout-form-section payment-method-selector,.checkout-form-section rebill-address,.checkout-summary-section rebill-summary{width:100%}.rebill-checkout.full-width-layout .left-section{width:100%;justify-content:stretch}.rebill-checkout.full-width-layout .left-section-container{max-width:none;min-width:auto;width:100%;margin:2.5rem 2rem 1.5rem 2rem}.pac-container{border-radius:4px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:1px solid #e0e0e0;margin-top:4px;font-family:inherit}.pac-item{padding:10px 12px;cursor:pointer;border-top:none}.pac-item:first-child{border-top:none}.pac-item:hover{background-color:#f5f5f5}.pac-item-query{font-weight:500}.pac-icon{display:none}}.payment-button-container{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.animated-component{transition:all 0.3s ease-in-out;overflow:visible}.fade-in{animation:fadeIn 0.4s ease-in-out}.slide-in{animation:slideIn 0.5s ease-out}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{from{opacity:0;transform:translateX(-20px);max-height:0}to{opacity:1;transform:translateX(0);max-height:450px}}.animated-component.hide{animation:fadeOut 0.3s ease-in-out forwards}@keyframes fadeOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}rebill-mode-sandbox{position:fixed;bottom:50px;left:50%;transform:translateX(-50%);z-index:1000}@media (max-width: 1024px){rebill-test-mode-chip{bottom:46px}}@media (min-width: 1025px){rebill-test-mode-chip{bottom:46px}}.mode-sandbox-mobile-container{display:flex;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}@media (min-width: 1451px){.left-section-container{min-width:450px;margin:2.5rem 5rem 1.5rem 5rem}.checkout-summary-section{min-width:450px;margin:0rem 5rem}}";const O=class{constructor(e){t(this,e);this.error=i(this,"error");this.success=i(this,"success");this.successRedirect=i(this,"successRedirect");this.formChange=i(this,"formChange");this.paymentMethodSelected=i(this,"paymentMethodSelected")}productId;planId;publicKey;instantProduct;instantPlan;display;customerInformation;oneClickCheckout=true;css;language;async handleLanguageChange(t,i){if(t&&t!==i){try{await p.changeLanguage(t);f.changeLanguage(t);console.log(`[RebillCheckout] Language changed from ${i} to ${t}`)}catch(t){console.error("[RebillCheckout] Failed to change language:",t)}}}error;success;successRedirect;formChange;checkoutLandingSession;externalPayment;rejectedPaymentCard=false;rejectedPaymentAPM=false;countries=[];currentPaymentMethod;checkoutResponse=null;isSubmitting=false;isCardSubmitting=false;isCardSuccess=false;isAPMSubmitting=false;isAPMSuccess=false;storedCheckoutResults=new Map;alertErrorKeys=null;currentApmPaymentMethod=null;breakpoint=x.DESKTOP;showRefreshModal=false;cardError={showCardInvalid:false,type:null};initialData={};allRequiredFields={};currentRequiredFields=[];customerExists=false;showOtp=false;otpVerified=false;responseCheckoutCard=null;cardMode=null;formElement;emailDebounceTimeout=null;injectedStyleElement=null;get displayConfig(){if(!this.display){return S}if(typeof this.display==="string"){try{const t=JSON.parse(this.display);return{...S,...t}}catch(t){console.warn("Invalid display configuration string, using defaults:",t);return S}}return{...S,...this.display}}get parsedCustomerInformation(){if(!this.customerInformation){return null}if(typeof this.customerInformation==="string"){try{return JSON.parse(this.customerInformation)}catch(t){console.warn("Invalid customerInformation configuration string, ignoring:",t);return null}}return this.customerInformation}get filteredPaymentMethods(){const t=u.data?.itemInformation?.paymentMethods||[];const i=this.displayConfig.excludePaymentMethods;if(!i||i.length===0){return t}return t.filter((t=>!i.includes(t)))}getCombinedUserData(t={}){const i=u.data.userInformation;const e=this.parsedCustomerInformation;return{email:t.email||e?.email||i.email,fullName:t.fullName||e?.fullName||i.fullName,countryCodePhoneNumber:t.countryCodePhoneNumber||e?.phoneNumber?.countryCode||e?.countryCode||i.countryCode,phoneNumber:t.phoneNumber||e?.phoneNumber?.number||i.phoneNumber,documentType:t.documentType||e?.documentType||i.documentType,documentNumber:t.documentNumber||e?.documentNumber||i.documentNumber,"billing-country":t["billing-country"]||e?.address?.billingAddress?.country||i.address?.billingAddress?.country,"billing-state":t["billing-state"]||e?.address?.billingAddress?.state||i.address?.billingAddress?.state,"billing-address":t["billing-address"]||e?.address?.billingAddress?.address||i.address?.billingAddress?.address,"billing-city":t["billing-city"]||e?.address?.billingAddress?.city||i.address?.billingAddress?.city,"billing-zip":t["billing-zip"]||e?.address?.billingAddress?.zip||i.address?.billingAddress?.zip}}injectCustomCSS(){if(!this.css){return}this.cleanupInjectedCSS();const t=`rebill-checkout-css-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;if(this.css.startsWith("http://")||this.css.startsWith("https://")||this.css.startsWith("//")){const i=document.createElement("link");i.rel="stylesheet";i.href=this.css;i.id=t;i.setAttribute("data-rebill-injected","true");document.head.appendChild(i);this.injectedStyleElement=i}else{const i=document.createElement("style");i.id=t;i.setAttribute("data-rebill-injected","true");i.textContent=this.css;document.head.appendChild(i);this.injectedStyleElement=i}}cleanupInjectedCSS(){if(this.injectedStyleElement){try{this.injectedStyleElement.remove()}catch(t){console.warn("Error removing injected CSS:",t)}this.injectedStyleElement=null}}timeToRedirectAPM=5e3;resizeHandler=()=>{const t=v(window.innerWidth);if(t!==this.breakpoint){this.breakpoint=t}};disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler);if(this.emailDebounceTimeout){clearTimeout(this.emailDebounceTimeout);this.emailDebounceTimeout=null}this.cleanupInjectedCSS()}async componentWillLoad(){try{this.resizeHandler();window.addEventListener("resize",this.resizeHandler);this.injectCustomCSS();if(this.language){await p.changeLanguage(this.language)}else{y()}const{session:t,type:i}=await E({publicKey:this.publicKey,checkoutLandingSession:this.checkoutLandingSession,instantProduct:this.instantProduct,instantPlan:this.instantPlan,productId:this.productId,planId:this.planId});f.initializeSession({session:t,type:i,payment:typeof this.externalPayment==="string"?JSON.parse(this.externalPayment):this.externalPayment});if(u.sessionRefreshed){this.showRefreshModal=true}P.loadGoogleMapsScript();const e=await n.data.getCountries();this.countries=e.data;this.initialData=this.getInitialData();this.allRequiredFields=await j();if(this.filteredPaymentMethods.length>0){if(u.data.paymentStatus===r.REJECTED||u.data.paymentStatus===r.APPROVED&&this.filteredPaymentMethods.includes(b.BANK_TRANSFER)){const t=this.filteredPaymentMethods.find((t=>t===b.BANK_TRANSFER));if(t){this.changePaymentMethod(t);f.setPaymentMethodSelected(t)}}else{this.changePaymentMethod(this.filteredPaymentMethods[0])}}if(this.oneClickCheckout){n.customers.exists({email:u.data?.prefilledData?.email},this.publicKey).then((t=>{this.customerExists=t.data.exists}))}this.cardMode=u.cardMode;g("cardMode",(()=>{this.cardMode=u.cardMode}))}catch(t){console.error("Error initializing checkout:",t)}}componentWillUpdate(){this.injectCustomCSS()}async changePaymentMethod(t){if(t!==this.currentPaymentMethod&&this.filteredPaymentMethods.includes(t)){if(this.checkoutResponse){this.checkoutResponse=null;f.clearCheckoutResponse()}this.currentPaymentMethod=t;f.setPaymentMethodSelected(t);if(t!==b.CARD){this.cardMode="input";f.setCardMode("input")}this.isSubmitting=false;this.currentApmPaymentMethod=I.mapToAPMPaymentMethod(t,u.data?.pricing?.country);if(t!==b.CASH&&t!==b.BANK_TRANSFER){this.checkoutResponse=null;f.clearCheckoutResponse()}else{this.checkoutResponse=null;f.clearCheckoutResponse()}this.paymentMethodSelected.emit(t);try{this.currentRequiredFields=R(t,this.allRequiredFields).fields;const i=await n.sessions.updateCurrentSessionPaymentMethod(u.data.sessionId,{paymentMethodName:I.mapToAPMPaymentMethod(t,u.data.pricing.country),paymentMethodType:t,currency:u.data.pricing.currency});f.setProviderKey(i.providerKey);if(i.providerKey===M.DECIDIR||u.data.providerKey===M.DECIDIR){const t=crypto.randomUUID();const i=await n.fingerPrint.getFingerPrint(t);u.deviceId=t;const e=i.result.script;const s=document.createElement("script");s.innerHTML=e;document.body.appendChild(s)}}catch(t){console.error("Failed to update payment method or get required fields:",t)}}}get currentPaymentError(){if(this.currentPaymentMethod===b.CARD){return this.rejectedPaymentCard}else if(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER){return this.rejectedPaymentAPM}return false}paymentMethodSelected;async handlePaymentMethodSelected(t){t.stopPropagation();const i=t.detail;this.changePaymentMethod(i);if(this.formElement){this.formElement.resetValidation()}}async handleSubmit(t){if(this.isSubmitting){return}this.rejectedPaymentCard=false;this.rejectedPaymentAPM=false;if(this.currentPaymentMethod===b.CARD){this.handleSubmitCard(t)}else if(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER){this.handleSubmitAPM(t)}}handleFormChange(t){const i=t.detail;let e=true;let s={};if(this.formElement?.errors){s=this.formElement.errors;e=Object.keys(s).length===0}this.formChange.emit({data:i,isValid:e,errors:Object.keys(s).length>0?s:undefined})}async handleSubmitCard(t){const i=t.detail;const e=this.getCombinedUserData(i);if(!u.data.cardTokenId&&!u.data.cardId){this.cardError={showCardInvalid:true,type:"card_error"};return}if(!u.data.cardInformation&&!u.data.cardId){this.cardError={showCardInvalid:true,type:"tokenization_error"};return}this.cardError={showCardInvalid:false,type:null};const s={transaction:{quantity:1,...u.data.discount.couponCode&&{couponCode:u.data.discount.couponCode}},installments:Number(i.installments||u.data.cardInformation?.installments?.selectedInstallment?.installment),...u.data.cardTokenId&&{cardTokenId:u.data.cardTokenId,...u.data?.itemInformation?.type!==w.PLAN&&{saveCard:u.saveCard}},...u.data.cardId&&{cardId:u.data.cardId},...(!this.otpVerified||this.cardMode==="input")&&{customer:{firstName:e.fullName?.split(" ")[0],lastName:e.fullName?.split(" ").slice(1).join(" "),email:e.email,phone:{countryCode:e.countryCodePhoneNumber,number:e.phoneNumber}}},billingDetails:{address:{lineOne:e["billing-address"],city:e["billing-city"],state:e["billing-state"],country:e["billing-country"],zipCode:e["billing-zip"]},identification:{type:e.documentType,value:e.documentNumber}},customAttributes:{...u.deviceId&&{deviceId:u.deviceId}},...u.metadata&&{paymentMetadata:u.metadata}};const a=o();this.isSubmitting=true;this.isCardSubmitting=true;try{const t=await n.checkout.createCardCheckoutRequest(u.data.sessionId,a,s,u.data.accessToken||undefined);f.setCheckoutResponse(t.data);this.responseCheckoutCard=t.data;if(t.data.result?.status.toUpperCase()===l.APPROVED){this.isCardSuccess=true;f.setPaymentStatus(r.APPROVED);this.success.emit({paymentMethod:this.currentPaymentMethod,data:t.data});u.data.cardInformation.lastFour=t.data.result?.cardLastFour}else{this.error.emit({paymentMethod:this.currentPaymentMethod,data:t.data});f.setCheckoutResponse(t.data);this.rejectedPaymentCard=true;this.alertErrorKeys={message:t.data.result?.statusDetail.toLowerCase()??t.data.error?.error?.message?.toLowerCase()}}}catch(t){this.error.emit({paymentMethod:this.currentPaymentMethod,data:t.data});f.setCheckoutResponse(t.data);this.responseCheckoutCard=t.data;this.rejectedPaymentCard=true;this.alertErrorKeys={message:t.data?.error?.type?.toLowerCase()??t.data?.result?.statusDetail?.toLowerCase()}}finally{this.isSubmitting=false;this.isCardSubmitting=false}}async handleSubmitAPM(t){if(this.currentPaymentMethod!==b.CASH&&this.currentPaymentMethod!==b.BANK_TRANSFER){return}this.isSubmitting=true;const i=t.detail;const e=this.getCombinedUserData(i);try{const t={address:{country:e["billing-country"]||"",state:e["billing-state"]||"",city:e["billing-city"]||"",zipCode:e["billing-zip"]||"",lineOne:e["billing-address"]||""},identification:{type:e.documentType,value:e.documentNumber}};const s=this.currentApmPaymentMethod||I.mapToAPMPaymentMethod(this.currentPaymentMethod,u.data?.pricing?.country);const a={transaction:{quantity:1,...u.data.discount.couponCode&&{couponCode:u.data.discount.couponCode}},method:s,billingDetails:t,redirect:{approved:window.location.origin+"/payment/success",rejected:window.location.origin+"/payment/failure"},paymentMetadata:u.metadata,customAttributes:{bank:i.bankId||u.data?.bankId?.code}};{a.customer={firstName:e.fullName?.split(" ")[0]||"",lastName:e.fullName?.split(" ").slice(1).join(" ")||"",email:e.email,phone:{countryCode:e.countryCodePhoneNumber||"",number:e.phoneNumber||""}}}const r=o();const l=await n.checkout.createAPMCheckoutRequest(u.data.sessionId,r,a);this.isSubmitting=false;this.checkoutResponse=l.data;this.storedCheckoutResults.set(this.currentPaymentMethod,l.data);if(l.data?.date){u.data.paymentDate=l.data.date;u.createdAt=l.data.date}if(l.data?.traceId){u.data.paymentReference=l.data.traceId}}catch(t){this.isSubmitting=false;this.checkoutResponse=t.data;this.alertErrorKeys={message:t.data?.error?.type?.toLowerCase()??t.data?.result?.statusDetail?.toLowerCase()};this.rejectedPaymentAPM=true}}async submit(){if(this.formElement&&typeof this.formElement.submit==="function"){this.formElement.submit()}else{await this.handleSubmit({detail:{}})}}handlePaymentStatusChange=t=>{if(t.isCompleted){if(t.status===k.APPROVED){f.setPaymentStatus(r.APPROVED);this.success.emit({paymentMethod:this.currentPaymentMethod,data:this.checkoutResponse})}else if(t.status===k.REJECTED){f.setPaymentStatus(r.REJECTED);this.alertErrorKeys={alertTitle:r.APM_ERROR_GENERIC,message:r.APM_MESSAGE_ERROR}}}};async handleInputChange(t){if(t?.detail?.id==="email"&&this.oneClickCheckout){if(this.emailDebounceTimeout){clearTimeout(this.emailDebounceTimeout)}if(!t.detail.value||t.detail.value.trim()===""){this.customerExists=false;f.clearCustomerIdAndToken();return}this.emailDebounceTimeout=setTimeout((async()=>{try{const t=await n.customers.exists({email:u.data.userInformation.email},this.publicKey);this.customerExists=t.data.exists}catch(t){this.customerExists=false}}),500)}}validationSchema={email:s().when([],{is:()=>!this.otpVerified,then:t=>t.email("validation.emailInvalid").matches(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,"validation.emailInvalid").required("validation.emailRequired"),otherwise:t=>t.notRequired()}),fullName:s().when([],{is:()=>!this.otpVerified,then:t=>t.required("validation.fullNameRequired").matches(/^[a-zA-ZÀ-ÿ\u00f1\u00d1\s]{2,}\s+[a-zA-ZÀ-ÿ\u00f1\u00d1\s]{2,}$/,"validation.fullNameInvalid"),otherwise:t=>t.notRequired()}),isValidPhoneNumber:s().when([],{is:()=>c("phoneNumber",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.equals(["true"],"validation.phoneRequired"),otherwise:t=>t.notRequired()}),"billing-country":s().when([],{is:()=>c("billing-country",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.countryRequired"),otherwise:t=>t.notRequired()}),"billing-state":s().when([],{is:()=>c("billing-state",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.stateRequired"),otherwise:t=>t.notRequired()}),"billing-address":s().when([],{is:()=>c("billing-address",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.addressRequired"),otherwise:t=>t.notRequired()}),"billing-city":s().when([],{is:()=>c("billing-city",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.cityRequired"),otherwise:t=>t.notRequired()}),"billing-zip":s().when([],{is:()=>c("billing-zip",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.zipRequired"),otherwise:t=>t.notRequired()}),bankId:s().when([],{is:()=>c("bankId",this.currentRequiredFields),then:t=>t.required("validation.bankRequired"),otherwise:t=>t.notRequired()}),installments:s().when([],{is:()=>this.currentPaymentMethod===b.CARD&&u.data.cardInformation.installments.isAvailableInstallments&&u.data.cardInformation?.installments?.installments.length>0&&u.data.itemInformation.type!==w.PLAN,then:t=>t.required("validation.installmentsRequired"),otherwise:t=>t.notRequired()}),documentType:s().when([],{is:()=>c("documentType",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.documentTypeRequired"),otherwise:t=>t.notRequired()}),documentNumber:s().when([],{is:()=>c("documentNumber",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.documentNumberRequired").min(7,"validation.documentInvalid"),otherwise:t=>t.notRequired()})};getInitialData=()=>({email:u.data.userInformation.email||"",fullName:u.data.userInformation.fullName||"",phoneNumber:u.data.userInformation.phoneNumber?.number||"",countryCodePhoneNumber:u.data.userInformation.countryCode||"",documentType:"",documentNumber:"","billing-country":u.data.userInformation.address?.billingAddress?.country||"","billing-state":u.data.userInformation?.address?.billingAddress?.state||"","billing-address":u.data.userInformation?.address?.billingAddress?.address||"","billing-city":u.data.userInformation?.address?.billingAddress?.city||"","billing-zip":u.data.userInformation?.address?.billingAddress?.zip||"",bankId:u.data.bankId?.code||"",card:"",installments:u.data.cardInformation?.installments?.selectedInstallment?.installment?.toString()||""});hasPrefilledAddress=()=>{const t=["billing-country","billing-state","billing-address","billing-city","billing-zip"];return t.some((t=>{const i=this.initialData[t];return i&&i.trim()!==""}))};get isQrCodeVisible(){return!!this.checkoutResponse?.result?.data?.qrCode}isPaymentApproved=()=>{if(u.data.paymentStatus===r.APPROVED){return true}return false};handleRebillAccountClick(t){this.showOtp=t.detail}handleReturnForm(t){this.showOtp=t.detail;f.clearCustomerIdAndToken()}handleSignOut(){this.showOtp=false;this.otpVerified=false;if(!u?.data?.prefilledData?.email){this.customerExists=false}f.clearCustomerIdAndToken();f.clearUserInformation();this.cardError={showCardInvalid:false,type:null};this.alertErrorKeys=null;this.rejectedPaymentCard=false;this.rejectedPaymentAPM=false}handleCodeVerified(){this.otpVerified=true;this.showOtp=false;this.rejectedPaymentCard=false;this.alertErrorKeys=null;this.cardError={showCardInvalid:false,type:null};if(this.formElement){this.formElement.resetValidation()}}isPaymentRejected(){return u.data.paymentStatus===r.REJECTED&&this.currentPaymentMethod===b.BANK_TRANSFER}render(){const t=this.countries.map((t=>({label:t.country,value:t.isoCountryCode})));const i=(t={})=>e("rebill-summary",{key:"2ceac473a4a03440363d53f1a8367e6a884a0919",totalAmount:u.data.pricing.total,currency:u.data.pricing.currency,itemTitle:u._session?.getTitle(),itemDescription:u._session?.getDescription(),itemAmount:u.data.pricing.subtotal,subtotal:u.data.pricing.subtotal,allowCoupon:u._session?.getAllowCoupon(this.displayConfig),currentBreakpoint:this.breakpoint,planFrequency:u._session?.getPlanFrequency(),planFrequencyCount:u._session?.getPlanFrequencyCount(),discountType:u.data.discount.discountType,discountedPercentage:u.data.discount.discountedPercentage,discountDuration:u.data.discount.discountDuration,discountAmount:u.data.discount.discountAmount,...t});return u.isInitialized&&e(e.Fragment,null,this.showRefreshModal&&e("rebill-modal-overlay",{key:"c545ffd6021816b2fbcc0a47b85e79827dd8889a"}),this.displayConfig.processingPayment&&e("rebill-processing-payment",{key:"17a806c91368f6c70d3481bb3c8c67cc7adb5b9c",style:{display:this.isCardSubmitting?"block":"none"}}),this.displayConfig.successPage&&this.isPaymentApproved()&&u.isInitialized?e("success-page",{typePaymentMethod:u.data.paymentMethodSelected,paymentMethodName:I.mapToAPMPaymentMethod(u.data.paymentMethodSelected||u.data.payment?.paymentMethodType,u.data?.pricing?.country),country:u.data?.pricing?.country,bank:u.data.payment?.paymentMethodMetadata?.bank||u.data.payment?.paymentMethodMetadata?.bank,cardLastFour:this.responseCheckoutCard?.result?.cardLastFour||u.data.cardInformation?.lastFour,paymentDate:u.data.paymentDate||this.responseCheckoutCard?.date||u.data.payment?.createdAt||this.checkoutResponse?.result?.data?.createdAt,referenceNumber:u.data.paymentReference||u.data.payment?.traceId||this.responseCheckoutCard?.traceId,onSuccessRedirect:t=>{this.successRedirect.emit(t.detail)},trialPeriodDays:u.data?.itemInformation?.trial?.trialPeriodDays,debitDay:u.data?.itemInformation?.debitDay,planAmount:u.data?.pricing?.planAmount}):e(e.Fragment,null,this.displayConfig.sandboxMode&&u.isSandbox&&u.data.sessionType===m.CHECKOUT_LANDING&&C(this.breakpoint,x.DESKTOP)&&e("div",{class:"mode-sandbox-mobile-container",style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"}},e("rebill-mode-sandbox-mobile",null)),e("rebill-checkout-form",{ref:t=>this.formElement=t,style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"},validationSchema:this.validationSchema,initialData:this.initialData,onSubmit:t=>this.handleSubmit(t),onChange:t=>this.handleFormChange(t),renderForm:({submit:s,formData:n,errors:a})=>{const o=!this.isCardSuccess&&this.checkoutResponse?.result&&(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER);return e("div",{class:`rebill-checkout ${!this.displayConfig.checkoutSummary?"full-width-layout":""}`},e("div",{class:"left-section"},e("div",{class:"left-section-container"},this.displayConfig.logo&&e("organization-logo",{organization:u.data.organization}),e("div",{class:"otp-container",style:{display:this.showOtp?"block":"none"}},e("otp-component",null)),e("div",{style:{display:this.showOtp?"none":"block"}},e("div",{class:"checkout-form-section"},this.displayConfig.checkoutSummary&&e("div",{class:"summary-mobile-tablet",style:{display:C(this.breakpoint,x.DESKTOP)?"block":"none"}},i({displayedComponents:["totalAmount","discount","timelineFreeTrial","timelineDebitDay","itemDetails"]})),!this.otpVerified&&this.displayConfig.customerInformation&&e("user-information",{customerExists:this.customerExists,disabled:this.isSubmitting,errors:{email:a.email,fullName:a.fullName}}),this.otpVerified&&this.displayConfig.customerInformation&&e("user-information-static",{variant:"otp",userInfo:{customerName:u.data.userInformation.fullName?.split(" ")[0],customerEmail:u.data.userInformation.email}}),e("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e("payment-method-selector",{enabledPaymentMethods:this.filteredPaymentMethods,defaultSelected:this.currentPaymentMethod,disabled:this.isSubmitting,errorComponent:{showErrorComponent:this.displayConfig.errorMessage&&(this.currentPaymentError||this.isPaymentRejected()),alertTitle:h.getErrorTitle(this.currentPaymentMethod,u.data?.pricing?.country||"",this.alertErrorKeys?.alertTitle),message:h.getErrorMessage(this.alertErrorKeys?.message,this.currentPaymentMethod,u.data?.pricing?.country)},country:u.data?.pricing?.country,installmentsError:a.installments,showDocument:(!this.otpVerified||this.otpVerified&&this.cardMode==="input")&&!o&&!this.isQrCodeVisible&&(c("documentNumber",this.currentRequiredFields)||c("documentType",this.currentRequiredFields)),documentTypeError:a.documentType,documentNumberError:a.documentNumber,cardError:this.cardError,customCSS:this.css}),!o&&(()=>{const t=c("bankId",this.currentRequiredFields);return t})()&&e("div",{class:"animated-component fade-in"},e("rebill-bank-selector",{banks:d("bank",this.allRequiredFields[this.currentPaymentMethod].original)||[],defaultSelectedBankId:n.bankId||"",error:a?.bankId}))),!o&&(!this.otpVerified||this.cardMode==="input")&&e(e.Fragment,null,this.displayConfig.billingAddress&&(c("billing-country",this.currentRequiredFields)||c("billing-state",this.currentRequiredFields)||c("billing-address",this.currentRequiredFields)||c("billing-city",this.currentRequiredFields)||c("billing-zip",this.currentRequiredFields))&&e("div",{class:"animated-component slide-in"},e("rebill-address",{disabled:this.isSubmitting,countryOptions:t,billingView:this.hasPrefilledAddress()?"form":"search",errors:{"billing-country":a["billing-country"],"billing-state":a["billing-state"],"billing-address":a["billing-address"],"billing-city":a["billing-city"],"billing-zip":a["billing-zip"]}})),this.displayConfig.customerInformation&&c("phoneNumber",this.currentRequiredFields)&&e("div",{class:"animated-component fade-in"},e("user-information-phone",{disabled:this.isSubmitting,error:a?.phoneNumber,countryCode:u.data.userInformation?.countryCode||u.data.country}))),o&&e("apm-checkout",{paymentMethod:this.currentPaymentMethod,referenceId:this.currentPaymentMethod===b.CASH?this.checkoutResponse?.result?.data?.referenceId:undefined,qrCodeData:this.currentPaymentMethod===b.BANK_TRANSFER?this.checkoutResponse?.result?.data?.qrCode:undefined,checkoutRequestId:this.checkoutResponse?.result?.checkoutRequestId,providerName:u.data.providerKey,expirationDate:(()=>{const t=new Date;t.setDate(t.getDate()+30);return t.toISOString()})(),onPaymentStatusChange:t=>this.handlePaymentStatusChange(t.detail),country:u.data?.pricing?.country,redirectUrl:this.checkoutResponse?.result?.data?.url,timeToRedirect:this.timeToRedirectAPM,bearerToken:this.checkoutResponse?.result?.data?.bearerToken}),this.displayConfig.checkoutSummary&&e("div",{class:"summary-price-details",style:{display:C(this.breakpoint,x.DESKTOP)?"block":"none"}},i({displayedComponents:["priceDetails"]})),this.displayConfig.submitButton&&!this.isQrCodeVisible&&e("div",{class:"payment-button-container"},e("payment-button",{paymentMethod:this.currentPaymentMethod,isLoading:this.isSubmitting,trialPeriodDays:u.data?.itemInformation?.trial?.trialPeriodDays,onSubmit:()=>{s()},redirectUrl:!!this.checkoutResponse?.result?.data?.url,timeToRedirect:this.timeToRedirectAPM,isDisabled:u.data.fetchingInstallments,country:u.data?.pricing?.country}),e("rebill-alert",{type:"secure",variant:"variant-secure",icon:"lock-outline",message:p.translate("otp.secureMessage")}))),this.displayConfig.sandboxMode&&u.isSandbox&&u.data.sessionType===m.CHECKOUT_LANDING&&!C(this.breakpoint,x.DESKTOP)&&e("rebill-mode-sandbox",null)),this.displayConfig.footer&&e("rebill-footer",{style:{marginTop:C(this.breakpoint,x.DESKTOP)?"16px":"auto"}}))),this.displayConfig.checkoutSummary&&e("div",{class:"right-section-checkout"},e("div",{class:"checkout-summary-section"},e("div",{class:"summary-desktop",style:{display:!C(this.breakpoint,x.DESKTOP)?"block":"none"}},i()))))}})))}static get watchers(){return{language:["handleLanguageChange"]}}};O.style=F;export{O as rebill_checkout};
2
- //# sourceMappingURL=p-b3837047.entry.js.map