rebill-web-components-sdk 1.8.22 → 1.8.24

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 (131) hide show
  1. package/dist/cjs/apm-checkout_19.cjs.entry.js +11 -5
  2. package/dist/cjs/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.cjs.js.map +1 -1
  3. package/dist/cjs/card-identification_5.cjs.entry.js +1 -1
  4. package/dist/cjs/index-C-VTnc0I.js.map +1 -1
  5. package/dist/cjs/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.cjs.js.map +1 -1
  6. package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
  7. package/dist/cjs/rebill-container.rebill-input-checkbox.entry.cjs.js.map +1 -1
  8. package/dist/cjs/rebill-container_2.cjs.entry.js +1 -1
  9. package/dist/cjs/rebill-input-select.cjs.entry.js +1 -1
  10. package/dist/cjs/rebill-input-select.entry.cjs.js.map +1 -1
  11. package/dist/cjs/rebill-input-text.cjs.entry.js +1 -1
  12. package/dist/cjs/rebill-input-text.entry.cjs.js.map +1 -1
  13. package/dist/collection/components/checkout/address/address.js +10 -4
  14. package/dist/collection/components/checkout/address/address.js.map +1 -1
  15. package/dist/collection/components/shared/inputs/input-checkbox/input-checkbox.css +11 -0
  16. package/dist/collection/components/shared/inputs/input-combo/input-combo.css +30 -0
  17. package/dist/collection/components/shared/inputs/input-phone/input-phone.css +39 -1
  18. package/dist/collection/components/shared/inputs/input-select/input-select.css +42 -0
  19. package/dist/collection/components/shared/inputs/input-text/input-text.css +11 -0
  20. package/dist/collection/components/shared/modal-overlay/modal-overlay.css +11 -4
  21. package/dist/components/card-fields-wrapper.js +1 -1
  22. package/dist/components/card-identification.js +1 -1
  23. package/dist/components/discount-coupon.js +1 -1
  24. package/dist/components/{p-Mgbx0b10.js → p--RloWBLk.js} +3 -3
  25. package/dist/components/{p-Mgbx0b10.js.map → p--RloWBLk.js.map} +1 -1
  26. package/dist/components/{p-B8GIr65u.js → p--gCxFWo3.js} +7 -7
  27. package/dist/components/{p-B8GIr65u.js.map → p--gCxFWo3.js.map} +1 -1
  28. package/dist/components/p-8BpuJ_V5.js.map +1 -1
  29. package/dist/components/{p-DVmistTq.js → p-BIHeH7ht.js} +3 -3
  30. package/dist/components/{p-DVmistTq.js.map → p-BIHeH7ht.js.map} +1 -1
  31. package/dist/components/{p-DStRg6vz.js → p-BJHx0OQj.js} +3 -3
  32. package/dist/components/{p-DStRg6vz.js.map → p-BJHx0OQj.js.map} +1 -1
  33. package/dist/components/{p-BgJ9ZORq.js → p-BZj9nSOY.js} +3 -3
  34. package/dist/components/{p-BgJ9ZORq.js.map → p-BZj9nSOY.js.map} +1 -1
  35. package/dist/components/{p-c9SkZ__E.js → p-Bb1L1oJK.js} +3 -3
  36. package/dist/components/{p-c9SkZ__E.js.map → p-Bb1L1oJK.js.map} +1 -1
  37. package/dist/components/{p-zU9a56AF.js → p-BeNxLLvH.js} +3 -3
  38. package/dist/components/{p-zU9a56AF.js.map → p-BeNxLLvH.js.map} +1 -1
  39. package/dist/components/{p-D9Eow84L.js → p-BnUMlZY9.js} +4 -4
  40. package/dist/components/{p-D9Eow84L.js.map → p-BnUMlZY9.js.map} +1 -1
  41. package/dist/components/{p-CWdTbodL.js → p-Bw7Jq0SL.js} +3 -3
  42. package/dist/components/{p-CWdTbodL.js.map → p-Bw7Jq0SL.js.map} +1 -1
  43. package/dist/components/{p-DTjDV-2m.js → p-BxXWkB7L.js} +6 -6
  44. package/dist/components/{p-DTjDV-2m.js.map → p-BxXWkB7L.js.map} +1 -1
  45. package/dist/components/{p-8eukGNL9.js → p-C2gtk16s.js} +3 -3
  46. package/dist/components/{p-8eukGNL9.js.map → p-C2gtk16s.js.map} +1 -1
  47. package/dist/components/{p-D2wX2Bnk.js → p-C4TcKKa8.js} +4 -4
  48. package/dist/components/{p-D2wX2Bnk.js.map → p-C4TcKKa8.js.map} +1 -1
  49. package/dist/components/{p-CHUzEc6D.js → p-C8lHS2ZV.js} +5 -5
  50. package/dist/components/{p-CHUzEc6D.js.map → p-C8lHS2ZV.js.map} +1 -1
  51. package/dist/components/{p-DQIG3sUQ.js → p-CH8Qt-7B.js} +3 -3
  52. package/dist/components/{p-DQIG3sUQ.js.map → p-CH8Qt-7B.js.map} +1 -1
  53. package/dist/components/{p-CN4bVlrI.js → p-CK6dlS5z.js} +5 -5
  54. package/dist/components/{p-CN4bVlrI.js.map → p-CK6dlS5z.js.map} +1 -1
  55. package/dist/components/{p-s8WhwKwq.js → p-CVQ9SnQp.js} +16 -10
  56. package/dist/components/p-CVQ9SnQp.js.map +1 -0
  57. package/dist/components/{p-6aqJA2NI.js → p-CYC_SbCo.js} +3 -3
  58. package/dist/components/{p-6aqJA2NI.js.map → p-CYC_SbCo.js.map} +1 -1
  59. package/dist/components/{p-y5rBN7LS.js → p-Coc_KFqp.js} +4 -4
  60. package/dist/components/{p-y5rBN7LS.js.map → p-Coc_KFqp.js.map} +1 -1
  61. package/dist/components/{p-ti0gvUO5.js → p-CpCPsj5Y.js} +3 -3
  62. package/dist/components/{p-ti0gvUO5.js.map → p-CpCPsj5Y.js.map} +1 -1
  63. package/dist/components/{p-DuW9_9Co.js → p-Cqrdj1mj.js} +3 -3
  64. package/dist/components/{p-DuW9_9Co.js.map → p-Cqrdj1mj.js.map} +1 -1
  65. package/dist/components/{p-B9fIqz0z.js → p-DSnJHRr3.js} +3 -3
  66. package/dist/components/{p-B9fIqz0z.js.map → p-DSnJHRr3.js.map} +1 -1
  67. package/dist/components/{p-BpkqlhjE.js → p-DUxs56Lj.js} +3 -3
  68. package/dist/components/{p-BpkqlhjE.js.map → p-DUxs56Lj.js.map} +1 -1
  69. package/dist/components/{p-DLh7v0Ng.js → p-Dzeq5BdH.js} +5 -5
  70. package/dist/components/{p-DLh7v0Ng.js.map → p-Dzeq5BdH.js.map} +1 -1
  71. package/dist/components/payment-method-selector.js +1 -1
  72. package/dist/components/rebill-address-form.js +1 -1
  73. package/dist/components/rebill-address-search.js +1 -1
  74. package/dist/components/rebill-address.js +1 -1
  75. package/dist/components/rebill-bank-selector.js +1 -1
  76. package/dist/components/rebill-checkout-single-column.js +1 -1
  77. package/dist/components/rebill-checkout.js +21 -21
  78. package/dist/components/rebill-footer.js +1 -1
  79. package/dist/components/rebill-input-checkbox.js +1 -1
  80. package/dist/components/rebill-input-combo.js +1 -1
  81. package/dist/components/rebill-input-phone.js +1 -1
  82. package/dist/components/rebill-input-select.js +1 -1
  83. package/dist/components/rebill-input-text.js +1 -1
  84. package/dist/components/rebill-installments.js +1 -1
  85. package/dist/components/rebill-modal-overlay.js +1 -1
  86. package/dist/components/rebill-processing-payment.js +1 -1
  87. package/dist/components/rebill-renewal.js +17 -17
  88. package/dist/components/rebill-summary.js +1 -1
  89. package/dist/components/renewal-success-page.js +1 -1
  90. package/dist/components/root-component.js +3 -3
  91. package/dist/components/success-page.js +1 -1
  92. package/dist/components/user-information-phone.js +1 -1
  93. package/dist/components/user-information.js +1 -1
  94. package/dist/esm/apm-checkout_19.entry.js +11 -5
  95. package/dist/esm/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.js.map +1 -1
  96. package/dist/esm/card-identification_5.entry.js +1 -1
  97. package/dist/esm/index-D8cwEAmw.js.map +1 -1
  98. package/dist/esm/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.js.map +1 -1
  99. package/dist/esm/otp-component_7.entry.js +1 -1
  100. package/dist/esm/rebill-container.rebill-input-checkbox.entry.js.map +1 -1
  101. package/dist/esm/rebill-container_2.entry.js +1 -1
  102. package/dist/esm/rebill-input-select.entry.js +1 -1
  103. package/dist/esm/rebill-input-select.entry.js.map +1 -1
  104. package/dist/esm/rebill-input-text.entry.js +1 -1
  105. package/dist/esm/rebill-input-text.entry.js.map +1 -1
  106. package/dist/rebill-web-components-sdk/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.esm.js.map +1 -1
  107. package/dist/rebill-web-components-sdk/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.esm.js.map +1 -1
  108. package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js → p-1bbc702a.entry.js} +2 -2
  109. package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js.map → p-1bbc702a.entry.js.map} +1 -1
  110. package/dist/rebill-web-components-sdk/p-2354c848.entry.js +2 -0
  111. package/dist/rebill-web-components-sdk/{p-33238246.entry.js.map → p-2354c848.entry.js.map} +1 -1
  112. package/dist/rebill-web-components-sdk/p-61e86126.entry.js +2 -0
  113. package/dist/rebill-web-components-sdk/{p-c7c48b15.entry.js.map → p-61e86126.entry.js.map} +1 -1
  114. package/dist/rebill-web-components-sdk/p-7b33865e.entry.js +2 -0
  115. package/dist/rebill-web-components-sdk/p-7b33865e.entry.js.map +1 -0
  116. package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
  117. package/dist/rebill-web-components-sdk/p-ca2882ea.entry.js +2 -0
  118. package/dist/rebill-web-components-sdk/{p-a758a555.entry.js.map → p-ca2882ea.entry.js.map} +1 -1
  119. package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js → p-f3afcd86.entry.js} +2 -2
  120. package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js.map → p-f3afcd86.entry.js.map} +1 -1
  121. package/dist/rebill-web-components-sdk/rebill-container.rebill-input-checkbox.entry.esm.js.map +1 -1
  122. package/dist/rebill-web-components-sdk/rebill-input-select.entry.esm.js.map +1 -1
  123. package/dist/rebill-web-components-sdk/rebill-input-text.entry.esm.js.map +1 -1
  124. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  125. package/package.json +1 -1
  126. package/dist/components/p-s8WhwKwq.js.map +0 -1
  127. package/dist/rebill-web-components-sdk/p-33238246.entry.js +0 -2
  128. package/dist/rebill-web-components-sdk/p-6bcff3c5.entry.js +0 -2
  129. package/dist/rebill-web-components-sdk/p-6bcff3c5.entry.js.map +0 -1
  130. package/dist/rebill-web-components-sdk/p-a758a555.entry.js +0 -2
  131. package/dist/rebill-web-components-sdk/p-c7c48b15.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-9afddef2",[[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-4a8ad442",[[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-e937918d",[[256,"root-component",{"isLoading":[32],"currentLang":[32],"formData":[32]}]]],["p-6c7962fd",[[256,"rebill-card-carousel",{"interval":[2],"size":[1],"color":[1],"showAllCards":[4,"show-all-cards"],"currentIndex":[32]}]]],["p-fe8302ef",[[260,"rebill-flex-container",{"direction":[1],"wrap":[1],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-d486597b",[[260,"rebill-grid-container",{"columns":[2],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-2390b2f0",[[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-782cd61c",[[256,"input-otp",{"error":[1],"otp":[1],"clearable":[4],"placeholder":[1],"otpValue":[32]}]]],["p-d8aa7baf",[[256,"rebill-card",{"cardTitle":[1,"card-title"],"cardLabels":[16]}]]],["p-a758a555",[[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-38ea4f03",[[256,"rebill-divider"]]],["p-1212f7d2",[[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-fa04bbb1",[[256,"rebill-vertical-divider",{"height":[1],"color":[1],"thickness":[1],"dashed":[4],"connectorActive":[4,"connector-active"],"withDot":[4,"with-dot"]}]]],["p-f1b1c4b9",[[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-ff607c54",[[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-19018019",[[260,"collapsible-card",{"header":[1],"open":[4],"variant":[1],"isOpen":[32]}]]],["p-e1b86d84",[[256,"rebill-alert",{"type":[1],"message":[1],"alertTitle":[1,"alert-title"],"icon":[1],"variant":[1],"size":[1],"colorIcon":[1,"color-icon"]}]]],["p-c7c48b15",[[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-33238246",[[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-567ae839",[[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-b1ca383c",[[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-d7eaf879",[[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-fc6b9d89",[[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"],"disabled":[4],"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-6bcff3c5",[[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,"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"],"bankTransferData":[8,"bank-transfer-data"],"showRedirectMessage":[32],"isPolling":[32],"minutesLeft":[32],"qrStartTime":[32],"downloadData":[32]}],[256,"rebill-processing-payment",{"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[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],"disabled":[4],"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,"bank-transfer",{"bankTransferData":[8,"bank-transfer-data"]}],[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,"apm-download",{"data":[16]}],[256,"single-payment-method",{"paymentMethod":[1,"payment-method"],"currencyCountry":[1,"currency-country"],"paymentMethodDetails":[16],"icons":[16]}],[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-9afddef2",[[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-4a8ad442",[[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-e937918d",[[256,"root-component",{"isLoading":[32],"currentLang":[32],"formData":[32]}]]],["p-6c7962fd",[[256,"rebill-card-carousel",{"interval":[2],"size":[1],"color":[1],"showAllCards":[4,"show-all-cards"],"currentIndex":[32]}]]],["p-fe8302ef",[[260,"rebill-flex-container",{"direction":[1],"wrap":[1],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-d486597b",[[260,"rebill-grid-container",{"columns":[2],"gap":[1],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"]}]]],["p-2390b2f0",[[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-782cd61c",[[256,"input-otp",{"error":[1],"otp":[1],"clearable":[4],"placeholder":[1],"otpValue":[32]}]]],["p-d8aa7baf",[[256,"rebill-card",{"cardTitle":[1,"card-title"],"cardLabels":[16]}]]],["p-ca2882ea",[[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-38ea4f03",[[256,"rebill-divider"]]],["p-1212f7d2",[[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-fa04bbb1",[[256,"rebill-vertical-divider",{"height":[1],"color":[1],"thickness":[1],"dashed":[4],"connectorActive":[4,"connector-active"],"withDot":[4,"with-dot"]}]]],["p-f1b1c4b9",[[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-ff607c54",[[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-19018019",[[260,"collapsible-card",{"header":[1],"open":[4],"variant":[1],"isOpen":[32]}]]],["p-e1b86d84",[[256,"rebill-alert",{"type":[1],"message":[1],"alertTitle":[1,"alert-title"],"icon":[1],"variant":[1],"size":[1],"colorIcon":[1,"color-icon"]}]]],["p-61e86126",[[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-2354c848",[[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-567ae839",[[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-b1ca383c",[[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-f3afcd86",[[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-1bbc702a",[[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"],"disabled":[4],"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-7b33865e",[[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,"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"],"bankTransferData":[8,"bank-transfer-data"],"showRedirectMessage":[32],"isPolling":[32],"minutesLeft":[32],"qrStartTime":[32],"downloadData":[32]}],[256,"rebill-processing-payment",{"currentLocale":[32],"breakpoint":[32],"loaderProgress":[32],"isLoadingLottie":[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],"disabled":[4],"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,"bank-transfer",{"bankTransferData":[8,"bank-transfer-data"]}],[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,"apm-download",{"data":[16]}],[256,"single-payment-method",{"paymentMethod":[1,"payment-method"],"currencyCountry":[1,"currency-country"],"paymentMethodDetails":[16],"icons":[16]}],[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.22",
3
+ "version": "1.8.24",
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-s8WhwKwq.js","mappings":";;;;;;;;;;AAAA,MAAM,UAAU,GAAG,opFAAopF;;MCW1pF,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEsB,WAAW,GAAsB,QAAQ;IACxE,0BAA0B,GAAuC,EAAE;IACnE,gBAAgB,GAAY,KAAK;IAClC,QAAQ,GAAY,KAAK;IAEzB,cAAc,GAAuC,EAAE;IAEvD,MAAM,GAMH,IAAI;AAEP,IAAA,uBAAuB;AAEvB,IAAA,cAAc,CAAC,QAA4B,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ;AAAE,YAAA,OAAO,EAAE;AACxB,QAAA,I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AAC;AACjD,gBAAA,EAAE;YACJ,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACG,IAAI,CAAC,mBAAmB,EAAE,EAC3B,CAAA,CAAA,uBAAA,EAAA,EACE,iBAAiB,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,EAC5D,sBAAsB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EACtD,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,CACE;;AAIV,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM;AAE/D,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACG,IAAI,CAAC,mBAAmB,EAAE,EAC3B,CACE,CAAA,qBAAA,EAAA,EAAA,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAC7C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACrE,iBAAiB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAA,CACjD,CACE;;IAIV,MAAM,GAAA;AACJ,QAAA,QACE,8DAEG,IAAI,CAAC,iBAAiB,EAAE,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState"],"sources":["src/components/checkout/address/address.css?tag=rebill-address","src/components/checkout/address/address.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n:host {\n display: block;\n}\n\n.billing-header-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n}\n\n.address-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n}\n\n.state-zip-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n.state-zip-row rebill-input-select,\n.state-zip-row rebill-input-text {\n flex: 1;\n}\n\n.search-input-container {\n margin-top: 8px;\n}\n\n.manual-entry-link-wrapper {\n margin-top: 8px;\n text-align: left;\n}\n\n.manual-entry-link {\n background: none;\n border: none;\n color: var(--rebill-color-primary);\n cursor: pointer;\n text-decoration: underline;\n font-size: 14px;\n padding: 4px 8px;\n transition: color 0.2s ease;\n text-decoration: none;\n}\n\n.manual-entry-link:hover {\n text-decoration: underline;\n text-decoration-color: var(--rebill-color-text-secondary);\n}\n\n.same-as-shipping-section {\n margin: 24px 0;\n padding: 16px 0;\n}\n\n.shipping-address-section {\n margin-top: 24px;\n padding-top: 24px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { onChange, sessionState, SessionStore } from '../../../store/session.store';\nimport { AddressComponents } from '../../../utils';\n\n@Component({\n tag: 'rebill-address',\n styleUrl: 'address.css',\n shadow: false,\n})\nexport class Address {\n @Element() el: HTMLElement;\n @Prop({ mutable: true, reflect: true }) billingView: 'search' | 'form' = 'search';\n @State() currentBillingStateOptions: { label: string; value: string }[] = [];\n @State() isLoadingAddress: boolean = false;\n @Prop() disabled: boolean = false;\n\n @Prop() countryOptions: { label: string; value: string }[] = [];\n\n @Prop() errors?: {\n 'billing-country': string;\n 'billing-state': string;\n 'billing-address': string;\n 'billing-city': string;\n 'billing-zip': string;\n } | null = null;\n\n private unsubscribeAddressStore?: () => void;\n\n private translateError(errorKey: string | undefined): string {\n if (!errorKey) return '';\n if (errorKey.includes('validation.') || errorKey.includes('paymentErrors.')) {\n return I18nService.translate(errorKey);\n }\n return errorKey;\n }\n\n @Event() addressUpdated: EventEmitter<{\n country: string;\n state: string;\n address: string;\n city: string;\n zip: string;\n }>;\n\n componentDidLoad() {\n this.unsubscribeAddressStore = onChange('data', () => {\n const billingAddress = sessionState.data.userInformation.address?.billingAddress;\n\n if (billingAddress) {\n const addressData: AddressComponents = {\n country: billingAddress.country || '',\n state: billingAddress.state || '',\n address: billingAddress.address || '',\n city: billingAddress.city || '',\n zip: billingAddress.zip || '',\n };\n\n this.emitInputEventsForAddress(addressData);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribeAddressStore) {\n this.unsubscribeAddressStore();\n }\n }\n\n private async handleAddressSelected(address: AddressComponents) {\n this.isLoadingAddress = true;\n\n // Normalize text function for handling accents and special characters\n const normalizeText = (text: string) => {\n return text\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '') // Remove accents\n .trim();\n };\n\n SessionStore.setBillingAddress(address);\n this.billingView = 'form';\n\n if (address.country) {\n await this.loadStatesForCountry(address.country);\n\n // Compare Google state with API states\n if (address.state && this.currentBillingStateOptions.length > 0) {\n const exactMatch = this.currentBillingStateOptions.find(\n option => option.value.toLowerCase() === address.state.toLowerCase(),\n );\n\n const partialMatch = this.currentBillingStateOptions.find(\n option =>\n option.value.toLowerCase().includes(address.state.toLowerCase()) ||\n address.state.toLowerCase().includes(option.value.toLowerCase()),\n );\n\n // Try to find matches with common variations\n const normalizedGoogleState = normalizeText(address.state)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const normalizedMatch = this.currentBillingStateOptions.find(option => {\n const normalizedOption = normalizeText(option.value)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const matches =\n normalizedOption === normalizedGoogleState ||\n normalizedOption.startsWith(normalizedGoogleState + ' ') ||\n normalizedGoogleState.startsWith(normalizedOption + ' ');\n return matches;\n });\n\n if (exactMatch) {\n address.state = exactMatch.value;\n } else if (normalizedMatch) {\n address.state = normalizedMatch.value;\n } else address.state = partialMatch.value;\n }\n }\n this.addressUpdated.emit({\n country: address.country || '',\n address: address.address || '',\n city: address.city || '',\n state: address.state || '',\n zip: address.zip || '',\n });\n\n // Use requestAnimationFrame to ensure the form is rendered with the new state options\n // before emitting events. This ensures the state field can be properly populated.\n requestAnimationFrame(() => {\n this.emitInputEventsForAddress(address);\n setTimeout(() => {\n this.isLoadingAddress = false;\n }, 500);\n });\n }\n\n private emitInputEventsForAddress(address: AddressComponents) {\n // Emit input events for each address field that has a value\n // This mimics user input to properly clear validation errors\n const fields = [\n { id: `billing-country`, value: address.country },\n { id: `billing-address`, value: address.address },\n { id: `billing-city`, value: address.city },\n { id: `billing-state`, value: address.state },\n { id: `billing-zip`, value: address.zip },\n ];\n\n fields.forEach(field => {\n if (field.value) {\n this.emitInputEvent(field.id, field.value);\n }\n });\n }\n\n private emitInputEvent(id: string, value: string) {\n if (value) {\n // Create and dispatch a custom input event that the form component can listen to\n const inputEvent = new CustomEvent('input', {\n detail: { id, value },\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(inputEvent);\n }\n }\n\n private async loadStatesForCountry(countryCode: string) {\n try {\n const response = await api.data.getStates(countryCode);\n const statesResponse = response.data;\n const stateOptions =\n statesResponse && statesResponse.states\n ? statesResponse.states.map(state => ({ label: state, value: state }))\n : [];\n\n this.currentBillingStateOptions = stateOptions;\n } catch (error) {\n this.currentBillingStateOptions = [];\n }\n }\n\n private handleManualEntry = () => {\n this.billingView = 'form';\n };\n\n private handleSearchEntry = () => {\n this.billingView = 'search';\n };\n\n private async handleInput(field: string, value: string) {\n if (value === undefined) return;\n SessionStore.setBillingAddress({ [field]: value } as any);\n // Emit input event to form to sync with form data\n this.emitInputEvent(`billing-${field}`, value);\n\n // If country changes, load states for the new country\n if (field === 'country') {\n await this.loadStatesForCountry(value);\n // Clear the current state selection since the country changed\n SessionStore.setBillingAddress({ state: '' } as any);\n }\n }\n\n private renderAddressHeader() {\n return (\n <div class=\"billing-header-row\">\n <rebill-typography variant=\"body2\">\n {I18nService.translate('billingAddress.title')}\n </rebill-typography>\n </div>\n );\n }\n\n private renderAddressForm() {\n if (this.billingView === 'search') {\n const addressError =\n this.translateError(this.errors?.['billing-address']) ||\n this.translateError(this.errors?.['billing-country']) ||\n this.translateError(this.errors?.['billing-state']) ||\n this.translateError(this.errors?.['billing-city']) ||\n this.translateError(this.errors?.['billing-zip']) ||\n '';\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-search\n onAddressSelected={e => this.handleAddressSelected(e.detail)}\n onManualEntryRequested={() => this.handleManualEntry()}\n error={addressError}\n disabled={this.disabled}\n />\n </div>\n );\n }\n\n const errorsToShow = this.isLoadingAddress ? null : this.errors;\n\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-form\n countryOptions={this.countryOptions}\n stateOptions={this.currentBillingStateOptions}\n errors={errorsToShow}\n disabled={this.disabled}\n onFieldChanged={e => this.handleInput(e.detail.field, e.detail.value)}\n onSearchRequested={() => this.handleSearchEntry()}\n />\n </div>\n );\n }\n\n render() {\n return (\n <div>\n {/* Billing Address */}\n {this.renderAddressForm()}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{r as e,c as r,h as o}from"./p-D8cwEAmw.js";import{a as i,I as t}from"./p-DrG7nhj2.js";const l=".input-container{display:flex;flex-direction:column}.input-label{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-bottom:0.375rem}.input-label.disabled{cursor:not-allowed}.input-element{border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);height:38.33px;box-sizing:border-box}.input-element.input-error{border-color:var(--rebill-color-error)}.input-element:disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}select.input-element{padding:10px 30px 10px 14px;appearance:none;cursor:pointer}select.input-element:disabled{cursor:not-allowed}.input-element:focus{border-color:var(--rebill-color-primary)}.input-element:disabled:focus{border-color:var(--rebill-color-disabled)}.input-element::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}:host{display:block;width:100%;box-sizing:border-box}.select-wrapper{position:relative;width:100%;box-sizing:border-box}.select-trigger{width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;padding-right:30px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;min-width:0;}.select-trigger:focus{outline:none;border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.select-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-trigger.input-error{border-color:var(--rebill-color-error) !important}.select-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.select-wrapper.disabled .select-trigger{background-color:var(--rebill-color-background);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-wrapper{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;height:20px;width:20px}.select-icon{color:var(--rebill-color-text-secondary);transition:transform 0.2s ease;transform-origin:50% 50%;display:block}.select-icon.rotated{transform:rotateX(180deg)}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-trigger.underlined{width:100%;height:38.33px;padding:10px 14px;padding-right:40px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;min-width:0;border:none}.select-trigger.underlined:focus{border:none;box-shadow:none}.select-dropPosition.open-down{position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-top:0.25rem;max-height:200px;overflow-y:auto;animation:slideDown 0.15s ease-out;box-sizing:border-box;width:100%}.select-dropPosition.open-up{position:absolute;bottom:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-bottom:0.25rem;margin-top:0;max-height:200px;overflow-y:auto;animation:slideUp 0.15s ease-out;box-sizing:border-box;width:100%}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.select-option{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;border-bottom:1px solid var(--rebill-color-border);transition:background-color 0.15s ease}.select-option:last-child{border-bottom:none}.select-option:hover,.select-option.highlighted{background-color:#f0f9ff}.select-option.selected{background-color:var(--rebill-color-primary);color:white}.select-option.selected:hover,.select-option.selected.highlighted{background-color:var(--rebill-color-primary)}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.search-container{padding:0.75rem;border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.search-input-wrapper{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:0.75rem;color:var(--rebill-color-text-secondary);z-index:1;pointer-events:none}.search-input{width:100%;padding:0.5rem 0.75rem 0.5rem 2.5rem;border:1px solid var(--rebill-color-border);border-radius:0.375rem;font-size:0.875rem;color:var(--rebill-color-text-primary);background-color:var(--rebill-color-background);outline:none;transition:border-color 0.2s ease;box-sizing:border-box}.search-input:focus{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.search-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.clear-search{position:absolute;right:0.75rem;background:none;border:none;cursor:pointer;padding:0.25rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:var(--rebill-color-text-secondary);transition:background-color 0.2s ease}.clear-search:hover{background-color:var(--rebill-color-background-hover);color:var(--rebill-color-text-primary)}.no-results{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);font-style:italic;border-bottom:1px solid var(--rebill-color-border)}.loading-message{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);display:flex;align-items:center;justify-content:center;gap:0.5rem;border-bottom:1px solid var(--rebill-color-border)}.loading-message .spinner{width:14px;height:14px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite}.spinner{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}";const s=class{constructor(o){e(this,o);this.input=r(this,"input")}dropdownRef;triggerRef;searchInputRef;unsubscribeCurrentLocaleStore;label="";options=[];value="";error="";id="";disabled=false;placeholder="Selecciona una opción";variant;arrowIcon="up-down";dropPosition="down";fontSize="14px";backgroundColor="";searchable=false;searchPlaceholder="Search for options...";loading=false;isOpen=false;componentId="";highlightedIndex=-1;searchTerm="";filteredOptions=[];languageUpdateTrigger=0;input;componentWillLoad(){this.filteredOptions=[...this.options];this.componentId=this.id||`select-${Math.random().toString(36).substr(2,9)}`}componentDidLoad(){this.unsubscribeCurrentLocaleStore=i.onChange("currentLocale",(()=>{this.languageUpdateTrigger++}))}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}}componentWillUpdate(){this.filteredOptions=[...this.options];if(this.searchable){this.filterOptions()}}handleFormChange(e){const r=e.detail;if(r&&this.id in r){const e=r[this.id];if(e!==this.value&&typeof e==="string"){this.value=e;this.input.emit({id:this.id,value:this.value})}}}handleCloseAllSelects(e){if(e.detail!==this.componentId){this.closeDropdown()}}handleDocumentClick(e){if(this.dropdownRef&&this.triggerRef&&!this.dropdownRef.contains(e.target)&&!this.triggerRef.contains(e.target)){this.closeDropdown()}}handleKeyDown(e){if(this.disabled)return;if(this.searchable&&this.searchInputRef&&e.target===this.searchInputRef){return}switch(e.key){case"Enter":case" ":e.preventDefault();if(this.isOpen&&this.highlightedIndex>=0){this.selectOption(this.filteredOptions[this.highlightedIndex])}else{this.toggleDropdown()}break;case"Escape":e.preventDefault();this.closeDropdown();break;case"ArrowDown":e.preventDefault();if(!this.isOpen){this.openDropdown()}else{this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1)}break;case"ArrowUp":e.preventDefault();if(this.isOpen){this.highlightedIndex=Math.max(this.highlightedIndex-1,0)}break}}toggleDropdown=()=>{if(this.disabled)return;const e=this.isOpen;this.isOpen=!this.isOpen;if(this.isOpen){if(!e){document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}))}this.highlightedIndex=this.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}}else{this.searchTerm="";this.filterOptions()}};openDropdown=()=>{if(this.disabled)return;document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}));this.isOpen=true;this.highlightedIndex=this.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}};focusSearchInput=()=>{const e=()=>{if(this.searchInputRef){this.searchInputRef.focus();this.searchInputRef.select()}};e();requestAnimationFrame((()=>{e()}));setTimeout((()=>{e()}),10)};closeDropdown=()=>{this.isOpen=false;this.highlightedIndex=-1;this.searchTerm="";this.filterOptions()};selectOption=e=>{if(this.disabled)return;this.value=e.value;this.closeDropdown();this.input.emit({id:this.id,value:this.value,disabled:this.disabled})};getSelectedOptionLabel=()=>{const e=this.options.find((e=>e.value===this.value));return e?e.label:this.placeholder};getArrowIcon=()=>{if(this.arrowIcon==="up-down")return"chevron-up-down";return"chevron-down"};filterOptions=()=>{if(!this.searchTerm.trim()){this.filteredOptions=[...this.options]}else{this.filteredOptions=this.options.filter((e=>e.label.toLowerCase().includes(this.searchTerm.toLowerCase())))}this.highlightedIndex=-1};handleSearchInput=e=>{const r=e.target;this.searchTerm=r.value;this.filterOptions()};clearSearch=()=>{this.searchTerm="";this.filterOptions()};handleSearchClick=e=>{e.stopPropagation()};render(){const e=this.getSelectedOptionLabel();const r=this.value!=="";return o("div",{key:"14b02056098595a3aeadee17f6dd45a59f41b79f",class:"input-container"},this.label&&o("label",{key:"f72a815471c9ae211c60a6c59c3ea31e042ba970",class:`input-label ${this.disabled?"disabled":""}`},this.label),o("div",{key:"69e8390de0d1ee25550365df748207795d4f64c6",class:`select-wrapper ${this.disabled?"disabled":""} ${this.isOpen?"open":""}`},o("div",{key:"45d19c166a283b5d8d2701d111f5e63404b19e53",ref:e=>this.triggerRef=e,class:`input-element select-trigger ${this.error?"input-error":""} ${!r?"placeholder":""} ${this.variant==="underlined"?"underlined":""}`,style:{backgroundColor:this.backgroundColor},onClick:this.toggleDropdown,tabIndex:this.disabled?-1:0,role:"combobox","aria-expanded":this.isOpen.toString(),"aria-haspopup":"listbox","aria-labelledby":this.label?`${this.id}-label`:undefined},o("span",{key:"f1405a951262d61c2b8cf2d565b4b5fbd9438ec0",class:"select-value",style:{fontSize:this.fontSize},innerHTML:e}),o("div",{key:"e617f20cc3e2548a2fd3ff891abc67c6ea39ae6d",class:"icon-wrapper"},this.loading?o("div",{class:"spinner"}):o("rebill-icon",{name:this.getArrowIcon(),size:"20px",class:`select-icon ${this.isOpen&&this.arrowIcon==="down"?"rotated":""}`}))),this.isOpen&&o("div",{key:"e2fc3853a8e3e9e8af2930828f5a86ebbc5457c0",ref:e=>this.dropdownRef=e,class:`select-dropPosition ${this.dropPosition==="up"?"open-up":"open-down"}`,role:"listbox"},this.searchable&&o("div",{key:"ae39a72b8eebdc568cf637a844d83551770d8ed9",class:"search-container",onClick:this.handleSearchClick},o("div",{key:"c8de92a2efb546a1082bfa10c7247b94111e57d2",class:"search-input-wrapper"},o("rebill-icon",{key:"c9c4102addfebfc26a994f28c338d123c858b8a3",name:"search",size:"16px",class:"search-icon"}),o("input",{key:"9fb805d572782a8b5fa7a0687db40f9c5fea40e2",ref:e=>this.searchInputRef=e,type:"text",class:"search-input",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:this.handleSearchInput,onClick:this.handleSearchClick,style:{fontSize:this.fontSize}}),this.searchTerm&&o("button",{key:"de94c9188cd58f558aaf3c5a09579aff0d644104",type:"button",class:"clear-search",onClick:e=>{e.stopPropagation();this.clearSearch()},"aria-label":"Clear search"},o("rebill-icon",{key:"065b142bc16aa6b304efd83dfd3396a85c86224e",name:"x",size:"16px"})))),this.loading&&this.filteredOptions.length===0?o("div",{class:"loading-message",style:{fontSize:this.fontSize}},o("div",{class:"spinner"}),t.translate("common.loadingOptions")):this.filteredOptions.length>0?this.filteredOptions.map(((e,r)=>o("div",{class:`select-option ${this.value===e.value?"selected":""} ${this.highlightedIndex===r?"highlighted":""}`,style:{fontSize:this.fontSize},onClick:()=>this.selectOption(e),role:"option","aria-selected":this.value===e.value?"true":"false"},o("span",{innerHTML:e.label})))):o("div",{class:"no-results",style:{fontSize:this.fontSize}},"No se encontraron resultados"))),this.error&&o("span",{key:"569d27562c7244280f0614ad7ce1d9458f240d77",class:"error-message"},this.error))}};s.style=l;export{s as rebill_input_select};
2
- //# sourceMappingURL=p-33238246.entry.js.map