@solvimon/solvimon-web 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (126) hide show
  1. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-0_VYW5Wu.js → BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js} +1 -1
  2. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D8ZeVBWO.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs} +2 -2
  3. package/dist/ContentWithAsideLayout-DHpnJfGA.js +1 -0
  4. package/dist/{ContentWithAsideLayout-DhfUkZZg.mjs → ContentWithAsideLayout-Dy9xgxuF.mjs} +6 -3
  5. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DEqfojR8.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs} +8 -23
  6. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +1 -0
  7. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CFLR4ptB.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js} +1 -1
  8. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-COnrD4ew.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs} +1 -1
  9. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js +1 -0
  10. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs +27 -0
  11. package/dist/{PaymentHistoryBlock-DUeSRR3k.js → PaymentHistoryBlock-BGbTy4Se.js} +1 -1
  12. package/dist/{PaymentHistoryBlock-BTRFc4ki.mjs → PaymentHistoryBlock-BKMttUyk.mjs} +1 -1
  13. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-TgZYSSQe.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js} +1 -1
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-GeyErAW6.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs} +1 -1
  15. package/dist/{PaymentIntegrationForm-DX6kv0_v.mjs → PaymentIntegrationForm-CypW6fZY.mjs} +1 -1
  16. package/dist/{PaymentIntegrationForm-CQntx0TH.js → PaymentIntegrationForm-D4QupHWl.js} +1 -1
  17. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +1 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dkd-Cp8c.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs} +736 -162
  19. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs +145 -0
  20. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +1 -0
  21. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs +139 -0
  22. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +1 -0
  23. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +1 -0
  24. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D-BFQZiM.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs} +24 -23
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-D-hpJL8I.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js} +1 -1
  26. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-B7IOIy-v.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs} +4 -4
  27. package/dist/component-Bg2JVC_O.mjs +933 -0
  28. package/dist/component-Bs8oszfD.js +1 -0
  29. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  30. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  31. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  32. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +3 -3
  33. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  34. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  35. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  36. package/dist/components/Invoice/Invoice.es.js +14 -13
  37. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  38. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  39. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +3 -0
  40. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -0
  41. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +123 -0
  42. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  43. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  44. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  45. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  46. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +11 -110
  48. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +5 -5
  50. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  51. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  52. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  53. package/dist/components/WalletBalances/WalletBalances.es.js +3 -3
  54. package/dist/core/index.cjs.js +1 -1
  55. package/dist/core/index.es.js +1 -1
  56. package/dist/core/types.d.ts +4 -0
  57. package/dist/{customer-Bn6GdxP8.mjs → customer-Bv_fqXzO.mjs} +1 -1
  58. package/dist/{customer-CGyZojAB.js → customer-_W8gIX5m.js} +1 -1
  59. package/dist/{en-US-G2HBHqjq.js → en-US-C0gIE4Q1.js} +1 -1
  60. package/dist/{en-US-BKhsdJQ2.mjs → en-US-DAgOSlgv.mjs} +19 -12
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.es.js +1 -1
  63. package/dist/{invoices-Rs-QBUGS.mjs → invoices-BGb0AwVF.mjs} +2 -2
  64. package/dist/{invoices-DDeL8tvI.js → invoices-D-OKipCg.js} +1 -1
  65. package/dist/{nl-NL-DvVsMfhA.js → nl-NL-Br7muSHK.js} +1 -1
  66. package/dist/{nl-NL-BdeAy1tY.mjs → nl-NL-DCsmrA8A.mjs} +9 -2
  67. package/dist/paymentMethods-DIbB759g.js +1 -0
  68. package/dist/{paymentMethods-DOH9-6M1.mjs → paymentMethods-DvqlWe96.mjs} +11 -3
  69. package/dist/{payments-DGPENXiS.mjs → payments-CpzTVrQM.mjs} +1 -1
  70. package/dist/{payments-C0vYbn5Q.js → payments-DMDDI3MK.js} +1 -1
  71. package/dist/{registry-7UKVW93Q.mjs → registry-B-If1W_u.mjs} +9 -3
  72. package/dist/registry-uG2isab0.js +1 -0
  73. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  74. package/dist/screens/Checkout/Checkout.es.js +103 -70
  75. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  76. package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -13
  77. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  78. package/dist/screens/PayInvoice/PayInvoice.es.js +45 -34
  79. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +3 -0
  80. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -0
  81. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +231 -0
  82. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  83. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +29 -34
  84. package/dist/solvimon-web.css +1 -1
  85. package/dist/{subscriptions-BIGqt2N0.mjs → subscriptions-BPYyv09M.mjs} +2 -2
  86. package/dist/{subscriptions-CcpEwubd.js → subscriptions-CC61I6Nj.js} +1 -1
  87. package/dist/{adyen-D0yvZvq5.mjs → url-1Lbg5Yni.mjs} +35 -35
  88. package/dist/url-B6-3PkW2.js +1 -0
  89. package/dist/{useActionDispatchProvider-aqYyqIdb.js → useActionDispatchProvider-BHTknMoH.js} +1 -1
  90. package/dist/{useActionDispatchProvider-Ca1YbU61.mjs → useActionDispatchProvider-Dz8-e4gZ.mjs} +1 -1
  91. package/dist/{useCustomer-DUA8Y-2I.mjs → useCustomer-VVJi8z2w.mjs} +2 -2
  92. package/dist/{useCustomer-D9ZrqMFY.js → useCustomer-Z24KchWC.js} +1 -1
  93. package/dist/useIncrementalLoading-CuSndpP2.js +1 -0
  94. package/dist/{useIncrementalLoading-C1LKdVP8.mjs → useIncrementalLoading-DmOT2MXH.mjs} +4 -4
  95. package/dist/{useInvoiceData-HNnt3703.js → useInvoiceData-Bl87gzIS.js} +1 -1
  96. package/dist/{useInvoiceData-Bz4a2Mfa.mjs → useInvoiceData-Di5pLPM0.mjs} +2 -2
  97. package/dist/{useInvoicesList-DXBTGdcI.js → useInvoicesList-CFk-_oVK.js} +1 -1
  98. package/dist/{useInvoicesList-b2_fiHsc.mjs → useInvoicesList-z19cteaD.mjs} +4 -4
  99. package/dist/{useLoadInitialData-D0t-Lk3k.js → useLoadInitialData-CTqfiMTN.js} +1 -1
  100. package/dist/{useLoadInitialData-Cyp1xpuv.mjs → useLoadInitialData-CkpryfjF.mjs} +1 -1
  101. package/dist/{usePaymentMethodOptions-r0Opz7BC.mjs → usePaymentMethodOptions-BoGHJjng.mjs} +2 -2
  102. package/dist/{usePaymentMethodOptions-DgGDcVeE.js → usePaymentMethodOptions-BsCZnCQW.js} +1 -1
  103. package/dist/{usePaymentMethods-BHLXXaCa.js → usePaymentMethods-AC-4rrR9.js} +1 -1
  104. package/dist/{usePaymentMethods-C-NCtOom.mjs → usePaymentMethods-ocHmNoP7.mjs} +2 -2
  105. package/dist/{usePayments-DADpdoI7.js → usePayments-CgXZeWrU.js} +1 -1
  106. package/dist/{usePayments-BtByiIMy.mjs → usePayments-D85eB5l4.mjs} +3 -3
  107. package/dist/{usePortal-CpW3EDD-.mjs → usePortal-B1O1zgdV.mjs} +1 -1
  108. package/dist/{usePortal-DhaZBAGi.js → usePortal-DVD7PcWI.js} +1 -1
  109. package/dist/{useService-C0h9UlQW.js → useService-CHrkefKd.js} +1 -1
  110. package/dist/{useService-BcYQRxPS.mjs → useService-DF57xuDd.mjs} +1 -1
  111. package/dist/{useWalletBalanceItems-COzKSpmt.js → useWalletBalanceItems-BL-R5foK.js} +1 -1
  112. package/dist/{useWalletBalanceItems-DKz-2vUy.mjs → useWalletBalanceItems-COQDLfoZ.mjs} +3 -3
  113. package/dist/{vendor-ui-CdOX_IS-.mjs → vendor-ui-B8IlviSs.mjs} +6483 -5867
  114. package/dist/vendor-ui-C3Tq-qY_.js +1 -0
  115. package/package.json +5 -4
  116. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +0 -1
  117. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-zdBaVj-K.js +0 -1
  118. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BhGQB-c9.js +0 -1
  119. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BuJGxitV.js +0 -1
  120. package/dist/adyen-BvNyYAg-.js +0 -1
  121. package/dist/component-By_A1VHh.js +0 -1
  122. package/dist/component-CGfjV_7z.mjs +0 -889
  123. package/dist/paymentMethods-BR9w3qy8.js +0 -1
  124. package/dist/registry-DrV0jFnM.js +0 -1
  125. package/dist/useIncrementalLoading-FNH4k4a3.js +0 -1
  126. package/dist/vendor-ui-1SHma7t1.js +0 -1
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-Bs8oszfD.js"),o=require("../../vendor-ui-C3Tq-qY_.js"),n=require("../../ContentWithAsideLayout-DHpnJfGA.js"),r=require("../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js"),a=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js"),s=require("../../useCustomer-Z24KchWC.js"),i=require("../../usePaymentMethods-AC-4rrR9.js"),l=require("../../usePaymentMethodOptions-BsCZnCQW.js"),m=require("../../useLoadInitialData-CTqfiMTN.js"),p={class:"grid gap-4 sm:grid-cols-1 md:grid-cols-2"},d={key:0},c=e.defineComponent({__name:"ScreenTitle",props:{title:{type:String},description:{type:String}},setup:t=>(n,r)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",null,[e.createVNode(e.unref(o._sfc_main$3),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$3),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})):e.createCommentVNode("",!0)]),n.$slots.right?(e.openBlock(),e.createElementBlock("div",d,[e.renderSlot(n.$slots,"right")])):e.createCommentVNode("",!0)]))}),u=e.defineComponent({__name:"PaymentMethodsManagement",props:{customer:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},error:{type:null}},emits:["set-default"],setup(t,{emit:s}){const i=s,{$t:l}=o.useIntl(),m=e.ref(!1);return(s,p)=>(e.openBlock(),e.createBlock(e.unref(n.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.createVNode(c,{title:e.unref(l)({defaultMessage:"Payment methods",id:"screens.payment_method_management.title",description:"The title for the payment method management screen "}),description:e.unref(l)({defaultMessage:"Add a new payment method or set a default payment method for your payments.",id:"screens.payment_method_management.description",description:"The descriptive text for the payment method management screen"})},null,8,["title","description"])]),content:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{"no-border":"","no-spacing":"","content-background":"none",title:"Your payment methods"},{default:e.withCtx(()=>[e.createVNode(r._sfc_main,{"payment-methods":t.paymentMethods,onSetDefault:p[0]||(p[0]=e=>i("set-default"))},null,8,["payment-methods"])]),_:1}),m.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,customer:t.customer,"payment-method-options":t.paymentMethodOptions},null,8,["customer","payment-method-options"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:1,color:"gray",variant:"outline",onClick:p[1]||(p[1]=e=>m.value=!1)},{default:e.withCtx(()=>[...p[3]||(p[3]=[e.createTextVNode("Cancel",-1)])]),_:1})):(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:2,color:"gray",variant:"outline",onClick:p[2]||(p[2]=e=>m.value=!0)},{default:e.withCtx(()=>[...p[4]||(p[4]=[e.createTextVNode("Add payment method",-1)])]),_:1}))]),_:1}))}}),y=e.defineComponent({__name:"PaymentMethodsManagement.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const o=t,n=o.portalObject.customer_id,{customer:r,get:a}=s.useCustomer({customerId:n}),{items:p,fetchInitial:d}=i.usePaymentMethods({customerId:o.portalObject.customer_id}),{paymentMethodOptions:c,get:u}=l.usePaymentMethodOptions(),{isLoading:y}=m.useLoadInitialData(a.execute(),d(),u({customerId:o.portalObject.customer_id}));return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(r),paymentMethods:e.unref(p),paymentMethodOptions:e.unref(c),isLoading:e.unref(y),refreshPaymentMethods:e.unref(d)})}}),g=e.defineComponent({__name:"PaymentMethodsManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup:o=>(n,r)=>{var a,s,i,l;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(f),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=o.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(l=null==(i=o.branding)?void 0:i.colors)?void 0:l.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:r[0]||(r[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,paymentMethods:o,paymentMethodOptions:n,isLoading:r,refreshPaymentMethods:a})=>[t?(e.openBlock(),e.createBlock(u,{key:0,"is-loading":r,"payment-methods":o,"payment-method-options":n,customer:t,onSetDefault:a},null,8,["is-loading","payment-methods","payment-method-options","customer","onSetDefault"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),h=t.defineCustomElement(g),f=t.getComponentName("payment-methods-management");exports.COMPONENT_NAME=f,exports.SolvimonPaymentMethodsManagement=h,exports.defineSolvimonPaymentMethodsManagement=()=>{customElements.get(f)||customElements.define(f,h)};
@@ -0,0 +1,231 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, createBlock, createCommentVNode, renderSlot, ref, normalizeProps, guardReactiveProps } from "vue";
2
+ import { _ as _sfc_main$9, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
3
+ import { e as _sfc_main$4, u as useIntl, _ as _sfc_main$5, c as _sfc_main$8 } from "../../vendor-ui-B8IlviSs.mjs";
4
+ import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
5
+ import { _ as _sfc_main$6 } from "../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs";
6
+ import { _ as _sfc_main$7 } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs";
7
+ import { u as useCustomer } from "../../useCustomer-VVJi8z2w.mjs";
8
+ import { u as usePaymentMethods } from "../../usePaymentMethods-ocHmNoP7.mjs";
9
+ import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-BoGHJjng.mjs";
10
+ import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
11
+ const _hoisted_1 = { class: "grid gap-4 sm:grid-cols-1 md:grid-cols-2" };
12
+ const _hoisted_2 = { key: 0 };
13
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
14
+ __name: "ScreenTitle",
15
+ props: {
16
+ title: { type: String },
17
+ description: { type: String }
18
+ },
19
+ setup(__props) {
20
+ return (_ctx, _cache) => {
21
+ return openBlock(), createElementBlock("div", _hoisted_1, [
22
+ createElementVNode("div", null, [
23
+ createVNode(unref(_sfc_main$4), { variant: "heading-1" }, {
24
+ default: withCtx(() => [
25
+ createTextVNode(toDisplayString(__props.title), 1)
26
+ ]),
27
+ _: 1
28
+ }),
29
+ __props.description ? (openBlock(), createBlock(unref(_sfc_main$4), {
30
+ key: 0,
31
+ variant: "body-sm",
32
+ shade: "lighter"
33
+ }, {
34
+ default: withCtx(() => [
35
+ createTextVNode(toDisplayString(__props.description), 1)
36
+ ]),
37
+ _: 1
38
+ })) : createCommentVNode("", true)
39
+ ]),
40
+ _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_2, [
41
+ renderSlot(_ctx.$slots, "right")
42
+ ])) : createCommentVNode("", true)
43
+ ]);
44
+ };
45
+ }
46
+ });
47
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48
+ __name: "PaymentMethodsManagement",
49
+ props: {
50
+ customer: { type: Object },
51
+ paymentMethods: { type: Array },
52
+ paymentMethodOptions: { type: Array },
53
+ isLoading: { type: Boolean },
54
+ error: { type: null }
55
+ },
56
+ emits: ["set-default"],
57
+ setup(__props, { emit: __emit }) {
58
+ const emit = __emit;
59
+ const { $t } = useIntl();
60
+ const showPaymentMethodForm = ref(false);
61
+ return (_ctx, _cache) => {
62
+ return openBlock(), createBlock(unref(ContentWithAsideLayout), null, {
63
+ header: withCtx(() => [
64
+ createVNode(_sfc_main$3, {
65
+ title: unref($t)({
66
+ defaultMessage: "Payment methods",
67
+ id: "screens.payment_method_management.title",
68
+ description: "The title for the payment method management screen "
69
+ }),
70
+ description: unref($t)({
71
+ defaultMessage: "Add a new payment method or set a default payment method for your payments.",
72
+ id: "screens.payment_method_management.description",
73
+ description: "The descriptive text for the payment method management screen"
74
+ })
75
+ }, null, 8, ["title", "description"])
76
+ ]),
77
+ content: withCtx(() => [
78
+ createVNode(unref(_sfc_main$5), {
79
+ "no-border": "",
80
+ "no-spacing": "",
81
+ "content-background": "none",
82
+ title: "Your payment methods"
83
+ }, {
84
+ default: withCtx(() => [
85
+ createVNode(_sfc_main$6, {
86
+ "payment-methods": __props.paymentMethods,
87
+ onSetDefault: _cache[0] || (_cache[0] = ($event) => emit("set-default"))
88
+ }, null, 8, ["payment-methods"])
89
+ ]),
90
+ _: 1
91
+ }),
92
+ showPaymentMethodForm.value ? (openBlock(), createBlock(_sfc_main$7, {
93
+ key: 0,
94
+ customer: __props.customer,
95
+ "payment-method-options": __props.paymentMethodOptions
96
+ }, null, 8, ["customer", "payment-method-options"])) : createCommentVNode("", true),
97
+ showPaymentMethodForm.value ? (openBlock(), createBlock(unref(_sfc_main$8), {
98
+ key: 1,
99
+ color: "gray",
100
+ variant: "outline",
101
+ onClick: _cache[1] || (_cache[1] = ($event) => showPaymentMethodForm.value = false)
102
+ }, {
103
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
104
+ createTextVNode("Cancel", -1)
105
+ ])]),
106
+ _: 1
107
+ })) : (openBlock(), createBlock(unref(_sfc_main$8), {
108
+ key: 2,
109
+ color: "gray",
110
+ variant: "outline",
111
+ onClick: _cache[2] || (_cache[2] = ($event) => showPaymentMethodForm.value = true)
112
+ }, {
113
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
114
+ createTextVNode("Add payment method", -1)
115
+ ])]),
116
+ _: 1
117
+ }))
118
+ ]),
119
+ _: 1
120
+ });
121
+ };
122
+ }
123
+ });
124
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
125
+ __name: "PaymentMethodsManagement.entry.view",
126
+ props: {
127
+ environment: { type: String },
128
+ locale: { type: String },
129
+ dateLocale: { type: String },
130
+ messages: { type: Object },
131
+ primaryColor: { type: String },
132
+ secondaryColor: { type: String },
133
+ isShadowRoot: { type: Boolean },
134
+ experimentalFeatures: { type: Array },
135
+ logLevel: { type: String },
136
+ onLog: { type: Function },
137
+ allowedPortalTypes: { type: Array },
138
+ portalObject: { type: Object },
139
+ cssOverrides: { type: [String, Array] },
140
+ branding: { type: Object }
141
+ },
142
+ setup(__props) {
143
+ const props = __props;
144
+ const customerId = props.portalObject.customer_id;
145
+ const { customer, get: fetchCustomer } = useCustomer({ customerId });
146
+ const { items: paymentMethods, fetchInitial } = usePaymentMethods({
147
+ customerId: props.portalObject.customer_id
148
+ });
149
+ const { paymentMethodOptions, get: fetchPaymentMethodOptions } = usePaymentMethodOptions();
150
+ const { isLoading } = useLoadInitialData(
151
+ fetchCustomer.execute(),
152
+ fetchInitial(),
153
+ fetchPaymentMethodOptions({ customerId: props.portalObject.customer_id })
154
+ );
155
+ return (_ctx, _cache) => {
156
+ return renderSlot(_ctx.$slots, "default", {
157
+ customer: unref(customer),
158
+ paymentMethods: unref(paymentMethods),
159
+ paymentMethodOptions: unref(paymentMethodOptions),
160
+ isLoading: unref(isLoading),
161
+ refreshPaymentMethods: unref(fetchInitial)
162
+ });
163
+ };
164
+ }
165
+ });
166
+ const _sfc_main = /* @__PURE__ */ defineComponent({
167
+ __name: "PaymentMethodsManagement.entry",
168
+ props: {
169
+ environment: { type: String },
170
+ locale: { type: String },
171
+ dateLocale: { type: String },
172
+ messages: { type: Object },
173
+ primaryColor: { type: String },
174
+ secondaryColor: { type: String },
175
+ isShadowRoot: { type: Boolean },
176
+ experimentalFeatures: { type: Array },
177
+ logLevel: { type: String },
178
+ onLog: { type: Function },
179
+ allowedPortalTypes: { type: Array },
180
+ portalObject: { type: Object },
181
+ cssOverrides: { type: [String, Array] },
182
+ branding: { type: Object }
183
+ },
184
+ setup(__props) {
185
+ return (_ctx, _cache) => {
186
+ var _a, _b, _c, _d;
187
+ return openBlock(), createBlock(unref(_sfc_main$9), {
188
+ "custom-element-name": unref(COMPONENT_NAME),
189
+ environment: __props.environment,
190
+ locale: __props.locale,
191
+ "portal-object": __props.portalObject,
192
+ "allowed-portal-types": ["CUSTOMER"],
193
+ "primary-color": (_b = (_a = __props.branding) == null ? void 0 : _a.colors) == null ? void 0 : _b.primary,
194
+ "secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
195
+ "experimental-features": __props.experimentalFeatures,
196
+ "log-level": __props.logLevel,
197
+ "on-log": __props.onLog,
198
+ onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
199
+ }, {
200
+ default: withCtx(() => [
201
+ createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(_ctx.$props)), {
202
+ default: withCtx(({ customer, paymentMethods, paymentMethodOptions, isLoading, refreshPaymentMethods }) => [
203
+ customer ? (openBlock(), createBlock(_sfc_main$2, {
204
+ key: 0,
205
+ "is-loading": isLoading,
206
+ "payment-methods": paymentMethods,
207
+ "payment-method-options": paymentMethodOptions,
208
+ customer,
209
+ onSetDefault: refreshPaymentMethods
210
+ }, null, 8, ["is-loading", "payment-methods", "payment-method-options", "customer", "onSetDefault"])) : createCommentVNode("", true)
211
+ ]),
212
+ _: 1
213
+ }, 16)
214
+ ]),
215
+ _: 1
216
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log"]);
217
+ };
218
+ }
219
+ });
220
+ const SolvimonPaymentMethodsManagement = defineCustomElement(_sfc_main);
221
+ const COMPONENT_NAME = getComponentName("payment-methods-management");
222
+ const defineSolvimonPaymentMethodsManagement = () => {
223
+ if (!customElements.get(COMPONENT_NAME)) {
224
+ customElements.define(COMPONENT_NAME, SolvimonPaymentMethodsManagement);
225
+ }
226
+ };
227
+ export {
228
+ COMPONENT_NAME,
229
+ SolvimonPaymentMethodsManagement,
230
+ defineSolvimonPaymentMethodsManagement
231
+ };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-1SHma7t1.js"),i=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BuJGxitV.js"),a=require("../../ContentWithAsideLayout-B5B8Kwaw.js"),n=require("../../component-By_A1VHh.js"),r=require("../../useActionDispatchProvider-aqYyqIdb.js"),o=require("../../usePortal-DhaZBAGi.js"),s=require("../../subscriptions-CcpEwubd.js"),l=require("../../customer-CGyZojAB.js"),c=require("../../paymentMethods-BR9w3qy8.js"),d=require("../../invoices-DDeL8tvI.js"),u=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BhGQB-c9.js"),p=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),m=require("../../adyen-BvNyYAg-.js"),g=require("../../useViewport-CKRY1CKR.js"),v={class:"sv-order-summary__body grid grid-cols-1 gap-1"},_={class:"flex items-center justify-center gap-2 px-3 py-5"},f={class:"flex flex-row gap-3 px-3 py-2"},y={class:"grow"},h={class:"sv-order-summary__items grid grid-cols-1 gap-1"},b={class:"flex flex-row gap-2 px-3 py-2"},w={class:"flex flex-row gap-3 px-3 py-2"},k={class:"grow"},x={class:"flex flex-row gap-2 px-3 py-2"},N=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},loading:{type:Boolean}},setup(i){const a=i,{$t:n}=t.useIntl(),r=e.computed(()=>0===a.selectedPricings.length),o=e=>{var t,i,a,n,r;const o=null==(r=null==(n=null==(a=null==(i=null==(t=e.items)?void 0:t[0])?void 0:i.configs)?void 0:a[0])?void 0:n.bands)?void 0:r[0];return(null==o?void 0:o.fixed_amount)??(null==o?void 0:o.amount)},s=e.computed(()=>{var e,t,i,r,o,s,c,d;const u=null==(r=null==(i=null==(t=null==(e=a.invoice)?void 0:e.periods)?void 0:t[0])?void 0:i.groups)?void 0:r[0],p=null==(o=null==u?void 0:u.products)?void 0:o[0],m=l.value.length;return{title:(null==p?void 0:p.name)??(null==(s=null==u?void 0:u.product_category)?void 0:s.name)??(null==(c=l.value[0])?void 0:c.description),subtitle:m>1?n({defaultMessage:"{count} items",id:"upgrade_subscription.order_summary.item_count",description:"Subtitle shown below the product name when multiple one-off items are selected"},{count:String(m)}):null==(d=l.value[0])?void 0:d.description}}),l=e.computed(()=>{var e;return((null==(e=a.invoice)?void 0:e.periods)??[]).flatMap((e,t)=>e.groups.flatMap((e,i)=>(e.lines??[]).map((a,n)=>{var r,o,s,l,c;return{key:`${t}-${i}-${n}`,description:a.description??(null==(o=null==(r=a.product_items)?void 0:r[0])?void 0:o.name)??(null==(l=null==(s=e.products)?void 0:s[0])?void 0:l.name)??(null==(c=e.product_category)?void 0:c.name)??"—",amount:a.amount_excluding_tax}})))}),c=e.computed(()=>a.selectedPricings.map(e=>{var t,i;return{key:e.id,description:e.name??(null==(i=null==(t=e.products)?void 0:t[0])?void 0:i.name)??"—",amount:o(e)}})),d=e.computed(()=>n({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"}));return(a,o)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-order-summary sv-upgrade-subscription__order-summary","no-border":"","no-spacing":"","content-background":"none",title:d.value},{default:e.withCtx(()=>[e.createElementVNode("div",v,[r.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(t._sfc_main$6),{icon:"shopping_cart",class:"text-gray-500"}),e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",weight:"semibold",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Select your items",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no items are selected in the order summary"})),1)]),_:1})])]),_:1})):i.invoice?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value.title?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.createElementVNode("div",y,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.title),1)]),_:1}),s.value.subtitle?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:i.key,"no-spacing":"",class:"sv-order-summary__item"},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.description),1)]),_:2},1024),i.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"span",variant:"body-xs","no-spacing":""},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.amount},null,8,["value"])]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1024))),128))]),e.createVNode(e.unref(t._sfc_main),{class:"sv-order-summary__totals"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$17),{class:"sv-order-summary__invoice-preview",variant:"without-products",invoice:i.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[i.loading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("div",k,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString(c.value.length>1?e.unref(n)({defaultMessage:"Selected items",id:"upgrade_subscription.order_summary.selected_items_title",description:"Temporary order summary title shown while the invoice preview is loading"}):null==(t=c.value[0])?void 0:t.description),1)]}),_:1}),e.createVNode(e.unref(t._sfc_main$1),{variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.length>1?e.unref(n)({defaultMessage:"{count} items",id:"upgrade_subscription.order_summary.selected_item_count",description:"Temporary order summary subtitle shown while the invoice preview is loading"},{count:String(c.value.length)}):e.unref(n)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})])])]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:i.key,"no-spacing":"",class:"sv-order-summary__item"},{default:e.withCtx(()=>[e.createElementVNode("div",x,[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.description),1)]),_:2},1024),i.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,tag:"span",variant:"body-xs","no-spacing":""},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.amount},null,8,["value"])]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1024))),128)),i.loading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-order-summary__totals"},{default:e.withCtx(()=>[...o[0]||(o[0]=[e.createElementVNode("div",{class:"grid grid-cols-1 gap-2"},[e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-4 w-40 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-4 w-20 animate-pulse rounded bg-gray-100"})]),e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-4 w-16 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-4 w-20 animate-pulse rounded bg-gray-100"})]),e.createElementVNode("div",{class:"border-t border-gray-200 pt-2"},[e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-5 w-36 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-5 w-24 animate-pulse rounded bg-gray-100"})])])],-1)])]),_:1})):e.createCommentVNode("",!0)],64))])]),_:1},8,["title"]))}}),V=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean},loading:{type:Boolean}},emits:["toggle"],setup(a,{emit:n}){const r=a,o=n,{$t:s}=t.useIntl(),l=e.computed(()=>{var e,t,i,a,n,o;return r.pricing.name??(null==(a=null==(i=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.product_items)?void 0:i[0])?void 0:a.name)??(null==(o=null==(n=r.pricing.products)?void 0:n[0])?void 0:o.name)??"—"}),c=e.computed(()=>{var e,t,i,a,n;const o=null==(n=null==(a=null==(i=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:i[0])?void 0:a.bands)?void 0:n[0];return(null==o?void 0:o.fixed_amount)??(null==o?void 0:o.amount)}),d=e.computed(()=>c.value?`${t.formatAmount(c.value)} ${s({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(n,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"content-background":a.selected?"none":"gray","content-classes":a.selected?"!border-primary-600 ring-1 ring-primary-600":void 0},{default:e.withCtx(()=>[e.createVNode(i._sfc_main,{name:l.value,description:d.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",loading:a.loading,onClick:r[0]||(r[0]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1},8,["loading"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,color:"primary",size:"sm","icon-prefix":"add",loading:a.loading,onClick:r[1]||(r[1]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1},8,["loading"]))]),_:1},8,["name","description"])]),_:1},8,["content-background","content-classes"]))}}),B={class:"sv-pricing-list__items grid grid-cols-1 gap-1"},C=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array},loadingPricingId:{type:String}},emits:["toggle"],setup(i,{emit:a}){const n=i,r=a,{$t:o}=t.useIntl(),s=e.computed(()=>[...n.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0))),l=e=>{var t;return(null==(t=e.product_category)?void 0:t.name)??e.name??o({defaultMessage:"Items",id:"on_demand_pricing_list.category_fallback_title",description:"Fallback title for the selectable pricing items when no product category name is available"})};return(a,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id??a.display_order,class:"sv-pricing-list__category flex flex-col gap-2"},[e.createVNode(e.unref(t._sfc_main$1),{variant:"heading-3",tag:"h2",class:"sv-pricing-list__category-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l(a)),1)]),_:2},1024),e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(V,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:i.selectedPricingIds.includes(t.id),loading:i.loadingPricingId===t.id,onToggle:n[0]||(n[0]=e=>r("toggle",e))},null,8,["pricing","selected","loading"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricing_groups,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.id},[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",weight:"semibold",class:"sv-pricing-list__group-title mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(V,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:i.selectedPricingIds.includes(t.id),loading:i.loadingPricingId===t.id,onToggle:n[1]||(n[1]=e=>r("toggle",e))},null,8,["pricing","selected","loading"]))),128))],64))),128))])]))),128))}});const E={key:0,class:"sv-upgrade-subscription sv-root sv-screen sv-upgrade-subscription--purchased flex h-full items-center justify-center p-8"},S={class:"flex flex-col items-center text-center"},T={class:"sv-upgrade-subscription__header"},P={key:1,class:"sv-upgrade-subscription__pricing-list"},I={key:2,class:"sv-upgrade-subscription__loading p-4"},$={class:"sv-upgrade-subscription__payment-methods"},M={key:0,class:"sv-upgrade-subscription__payment-methods-body"},D={key:1,class:"sv-upgrade-subscription__payment-form"},j={class:"sv-upgrade-subscription__payment-method-picker"},O={class:"sv-upgrade-subscription__order-summary"},A={class:"flex flex-col gap-2"},F=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(v){const _=v,{$t:f}=t.useIntl(),{getSubscription:y}=s.createSubscriptionsService(),{getCustomer:h}=l.createCustomerService(),{getOnDemandPricingItems:b}=function(){const e=n.createRequestService(),t=n.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:i,pricingPlanVersionId:a,pricingItemIds:n,startAt:r,finalizeImmediately:o=!0,paymentMethodId:s}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${i}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:n,...r?{start_at:r}:{},finalize_immediately:o,...s?{payment_method_id:s}:{}}})},getOnDemandPricingItems:function({scheduleId:i}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${i}/on-demand-pricing-items`})}}}(),{getPaymentMethodOptions:w}=c.createPaymentMethodsService(),{previewChargeOnDemandPricingItems:k}=d.createInvoicesService(),x=o.usePortal(),V=n.useLogger(),{dispatchAction:B}=r.useActionDispatchProvider(),{isMobileViewport:F}=g.useViewport(),L=e.computed(()=>x.value.customer_id),q={currency:"EUR",quantity:"0"},U=e.ref([]),R=e.ref(!1),z=e.ref([]),W=e.ref([]),H=e.ref(!1),Y=e.ref(!1),G=e.ref(!1),K=e.ref(void 0),Z=e.ref(void 0),J=e.ref(),Q=e.ref(void 0),X=e.ref(void 0),ee=e.ref(void 0),te=e.ref(!1),ie=(e,t=[])=>t.find(t=>t.id===e.id),ae=(e,t)=>(e.items??[]).map(i=>{var a,n,r,o,s,l,c;const d=null==(a=null==t?void 0:t.items)?void 0:a.find(e=>e.id===i.id),u=i.product_items??(null==d?void 0:d.product_items);return{...e,id:i.id,name:(null==(r=null==(n=i.product_items)?void 0:n[0])?void 0:r.name)??(null==(s=null==(o=null==d?void 0:d.product_items)?void 0:o[0])?void 0:s.name)??e.name??(null==t?void 0:t.name)??(null==(c=null==(l=null==t?void 0:t.products)?void 0:l[0])?void 0:c.name),products:e.products??(null==t?void 0:t.products),items:[{...i,product_items:u}]}}),ne=async()=>{var e,i,a;H.value=!0,Z.value=void 0;try{const n=await(async()=>{const e=[...(await y({id:_.configuration.subscriptionId,expanded:!0})).pricing_plan_schedule_infos??[]].sort((e,t)=>Date.parse(t.start_at)-Date.parse(e.start_at)),t=Date.now(),i=e.find(e=>{var i;const a=(null==(i=e.pricing_plan_schedule)?void 0:i.type)??e.type,n=Date.parse(e.start_at),r=e.end_at?Date.parse(e.end_at):void 0,o=Number.isFinite(n)&&n<=t,s=void 0===r||!Number.isFinite(r)||r>t;return"DEFAULT"===a&&o&&s});if(!(null==i?void 0:i.id))throw new Error("No pricing plan schedule found for subscription");return i})();Q.value=n.id;const[r,o,s]=await Promise.all([b({scheduleId:Q.value}),w({customerId:L.value}),h(L.value)]);z.value=(i=r.pricing_categories??[],a=(null==(e=n.pricing_plan_version)?void 0:e.pricing_categories)??[],i.map(e=>{const t=((e,t)=>t.find(t=>t.product_category_id===e.product_category_id||t.id===e.id))(e,a);return{...e,name:e.name??(null==t?void 0:t.name),product_category:e.product_category??(null==t?void 0:t.product_category),pricings:(e.pricings??[]).flatMap(e=>ae(e,ie(e,null==t?void 0:t.pricings))),pricing_groups:(e.pricing_groups??[]).map(e=>{var i;const a=null==(i=null==t?void 0:t.pricing_groups)?void 0:i.find(t=>t.id===e.id);return{...e,name:e.name??(null==a?void 0:a.name),pricings:(e.pricings??[]).flatMap(e=>ae(e,ie(e,null==a?void 0:a.pricings)))}})}})),W.value=o,ee.value=t.getCustomerCountry(s)}catch(n){V.error("INITIAL_DATA_LOAD_FAILED","Failed to load on-demand pricing items",{},n),Z.value=f({defaultMessage:"Unable to load items. Please try again later.",id:"upgrade_subscription.load_error",description:"Error message shown when the one-off items cannot be loaded on the upgrade subscription page"})}finally{H.value=!1}};e.onMounted(()=>{ne()});const re=e.computed(()=>z.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),oe=e.computed(()=>re.value.filter(e=>U.value.includes(e.id))),se=e.computed(()=>oe.value.flatMap(e=>e.items??[]).map(e=>e.id).filter(e=>!!e)),le=e.computed(()=>{var e,t;return null==(t=null==(e=X.value)?void 0:e.tax_summary)?void 0:t.total_amount}),ce=e.computed(()=>le.value??q);let de,ue=0;e.watch([se,Q],([e,t])=>{clearTimeout(de);const i=++ue;if(ve.value=void 0,!t||0===e.length)return X.value=void 0,Y.value=!1,void(K.value=void 0);Y.value=!0,de=setTimeout(()=>{k({pricingPlanScheduleId:t,pricingItemIds:e}).then(e=>{i===ue&&(X.value=e)}).catch(e=>{i===ue&&(V.error("INVOICE_PREVIEW_FAILED","Failed to load charge-on-demand invoice preview",{},e),ve.value=f({defaultMessage:"Unable to calculate the total. Please try again.",id:"upgrade_subscription.preview_error",description:"Error message shown when the upgrade subscription invoice preview cannot be loaded"}),X.value=void 0)}).finally(()=>{i===ue&&(Y.value=!1,K.value=void 0)})},400)});const pe=e.computed(()=>{if(!Q.value)throw new Error("Cannot create charge-on-demand authorization context without a schedule.");return{type:"CHARGE_ON_DEMAND",charge_on_demand:{pricing_plan_schedule_id:Q.value,pricing_items:se.value.map(e=>({pricing_item_id:e}))}}}),me=e=>{K.value=e,U.value.includes(e)?U.value=U.value.filter(t=>t!==e):U.value=[...U.value,e]},ge=e.computed(()=>se.value.length>0&&!!Q.value&&!!le.value&&!Y.value&&W.value.length>0),ve=e.ref(void 0),_e=async()=>{var e;ge.value&&(ve.value=void 0,te.value&&(G.value=!0),null==(e=J.value)||e.submit())},fe=async()=>ge.value,ye=()=>{te.value=!0};let he;const be=()=>{G.value=!1,R.value=!0,he=setTimeout(()=>{B({action:"navigate-to-customer-overview"})},3e3)},we=e=>{G.value=!1,ve.value=e.message||f({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})};return e.onUnmounted(()=>{clearTimeout(de),clearTimeout(he)}),(n,r)=>R.value?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(m._sfc_main,{class:"sv-upgrade-subscription__success",status:"success",title:e.unref(f)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful upgrade purchase"})},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter",tag:"div",class:"sv-upgrade-subscription__success-message mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Your purchase has been completed.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful upgrade purchase"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter",tag:"div",class:"sv-upgrade-subscription__success-redirect mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"You will be redirected shortly…",id:"upgrade_subscription.success.redirect",description:"Shown below the success message while the redirect timer is running"})),1)]),_:1})])]),_:1},8,["title"])])):(e.openBlock(),e.createBlock(e.unref(a.ContentWithAsideLayout),{key:1,class:"sv-upgrade-subscription sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",T,[e.createVNode(e.unref(t._sfc_main$1),{variant:"heading-2",tag:"h1",class:"sv-upgrade-subscription__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Upgrade subscription",id:"upgrade_subscription.title",description:"Title for the upgrade subscription page"})),1)]),_:1})])]),content:e.withCtx(()=>[e.unref(F)?(e.openBlock(),e.createBlock(N,{key:0,class:"sv-upgrade-subscription__mobile-order-summary","selected-pricings":oe.value,invoice:X.value,loading:Y.value},null,8,["selected-pricings","invoice","loading"])):e.createCommentVNode("",!0),!H.value&&!Z.value&&z.value.length>0?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(C,{categories:z.value,"selected-pricing-ids":U.value,"loading-pricing-id":K.value,onToggle:me},null,8,["categories","selected-pricing-ids","loading-pricing-id"])])):H.value?(e.openBlock(),e.createElementBlock("div",I,[...r[0]||(r[0]=[e.createElementVNode("div",{class:"sv-skeleton h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton mt-2 h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton mt-2 h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):Z.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:3,class:"sv-upgrade-subscription__load-error sv-error m-4",title:Z.value},null,8,["title"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:4,variant:"body-sm",shade:"lighter",class:"sv-upgrade-subscription__empty-state p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"No one-off items are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no one-off items available for the subscription"})),1)]),_:1})),e.createElementVNode("div",$,[e.createVNode(p._sfc_main,{variant:"section",class:"min-h-[130px]"},{default:e.withCtx(()=>[!H.value||H.value&&W.value.length>0?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(e.unref(t._sfc_main$1),{variant:"heading-3",tag:"h2",class:"sv-upgrade-subscription__payment-methods-title mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Payment method",id:"upgrade_subscription.payment_method_block.title",description:"The title of the payment method block in the upgrade subscription flow"})),1)]),_:1}),0===W.value.length?(e.openBlock(),e.createBlock(i._sfc_main$2,{key:0,class:"sv-upgrade-subscription__payment-methods-empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"No payment methods available",id:"upgrade_subscription.payment_method_block.no_payment_methods_available_title",description:"The title shown when there are no available payment methods"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"There are no available payment methods. Please contact support for more information.",id:"upgrade_subscription.payment_method_block.no_payment_methods_available_message",description:"The message shown when there are no available payment methods"})),1)]),_:1})):ee.value&&Q.value?(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("div",j,[e.createVNode(u._sfc_main,{ref_key:"paymentIntegrationFormRef",ref:J,"customer-id":L.value,"country-code":ee.value,context:pe.value,amount:ce.value,variant:"AUTHORIZE","payment-method-options":W.value,"validate-on-submit":fe,"force-store-payment-method":"",onSelect:ye,onPaymentSuccess:be,onPaymentFailed:we},null,8,["customer-id","country-code","context","amount","payment-method-options"])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])]),aside:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(p._sfc_main,{variant:"section",class:"min-h-[220px]"},{default:e.withCtx(()=>[e.createVNode(N,{"selected-pricings":oe.value,invoice:X.value,loading:Y.value},null,8,["selected-pricings","invoice","loading"])]),_:1})]),ve.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"sv-upgrade-subscription__error sv-error",title:ve.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",A,[e.createVNode(p._sfc_main,{class:"sv-upgrade-subscription__submit-skeleton min-h-[44px]"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-upgrade-subscription__purchase w-full",type:"button",disabled:!ge.value,loading:G.value,onClick:_e},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"])]),_:1}),e.createVNode(i._sfc_main$1,{"payment-method-options":W.value},null,8,["payment-method-options"])])]),_:1}))}}),L=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var r,o,s,l;return e.openBlock(),e.createBlock(n._sfc_main,{"custom-element-name":e.unref(U),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(r=t.branding)?void 0:r.colors)?void 0:o.primary,"secondary-color":null==(l=null==(s=t.branding)?void 0:s.colors)?void 0:l.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(F,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),q=n.defineCustomElement(L),U=n.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=U,exports.SolvimonUpgradeSubscription=q,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(U)||customElements.define(U,q)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-C3Tq-qY_.js"),i=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js"),a=require("../../ContentWithAsideLayout-DHpnJfGA.js"),n=require("../../component-Bs8oszfD.js"),r=require("../../useActionDispatchProvider-BHTknMoH.js"),o=require("../../usePortal-DVD7PcWI.js"),s=require("../../subscriptions-CC61I6Nj.js"),l=require("../../customer-_W8gIX5m.js"),c=require("../../paymentMethods-DIbB759g.js"),d=require("../../invoices-D-OKipCg.js"),u=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js"),p=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),m=require("../../url-B6-3PkW2.js"),g=require("../../useViewport-CKRY1CKR.js"),v={class:"sv-order-summary__body grid grid-cols-1 gap-1"},_={class:"flex items-center justify-center gap-2 px-3 py-5"},f={class:"flex flex-row gap-3 px-3 py-2"},y={class:"grow"},h={class:"sv-order-summary__items grid grid-cols-1 gap-1"},b={class:"flex flex-row gap-2 px-3 py-2"},w={class:"flex flex-row gap-3 px-3 py-2"},k={class:"grow"},x={class:"flex flex-row gap-2 px-3 py-2"},N=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},loading:{type:Boolean}},setup(i){const a=i,{$t:n}=t.useIntl(),r=e.computed(()=>0===a.selectedPricings.length),o=e=>{var t,i,a,n,r;const o=null==(r=null==(n=null==(a=null==(i=null==(t=e.items)?void 0:t[0])?void 0:i.configs)?void 0:a[0])?void 0:n.bands)?void 0:r[0];return(null==o?void 0:o.fixed_amount)??(null==o?void 0:o.amount)},s=e.computed(()=>{var e,t,i,r,o,s,c,d;const u=null==(r=null==(i=null==(t=null==(e=a.invoice)?void 0:e.periods)?void 0:t[0])?void 0:i.groups)?void 0:r[0],p=null==(o=null==u?void 0:u.products)?void 0:o[0],m=l.value.length;return{title:(null==p?void 0:p.name)??(null==(s=null==u?void 0:u.product_category)?void 0:s.name)??(null==(c=l.value[0])?void 0:c.description),subtitle:m>1?n({defaultMessage:"{count} items",id:"upgrade_subscription.order_summary.item_count",description:"Subtitle shown below the product name when multiple one-off items are selected"},{count:String(m)}):null==(d=l.value[0])?void 0:d.description}}),l=e.computed(()=>{var e;return((null==(e=a.invoice)?void 0:e.periods)??[]).flatMap((e,t)=>e.groups.flatMap((e,i)=>(e.lines??[]).map((a,n)=>{var r,o,s,l,c;return{key:`${t}-${i}-${n}`,description:a.description??(null==(o=null==(r=a.product_items)?void 0:r[0])?void 0:o.name)??(null==(l=null==(s=e.products)?void 0:s[0])?void 0:l.name)??(null==(c=e.product_category)?void 0:c.name)??"—",amount:a.amount_excluding_tax}})))}),c=e.computed(()=>a.selectedPricings.map(e=>{var t,i;return{key:e.id,description:e.name??(null==(i=null==(t=e.products)?void 0:t[0])?void 0:i.name)??"—",amount:o(e)}})),d=e.computed(()=>n({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"}));return(a,o)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-order-summary sv-upgrade-subscription__order-summary","no-border":"","no-spacing":"","content-background":"none",title:d.value},{default:e.withCtx(()=>[e.createElementVNode("div",v,[r.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__empty-state"},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(t._sfc_main$14),{icon:"shopping_cart",class:"text-gray-500"}),e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",weight:"semibold",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Select your items",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no items are selected in the order summary"})),1)]),_:1})])]),_:1})):i.invoice?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value.title?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.createElementVNode("div",y,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.title),1)]),_:1}),s.value.subtitle?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.subtitle),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:i.key,"no-spacing":"",class:"sv-order-summary__item"},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(t._sfc_main$3),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.description),1)]),_:2},1024),i.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,tag:"span",variant:"body-xs","no-spacing":""},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.amount},null,8,["value"])]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1024))),128))]),e.createVNode(e.unref(t._sfc_main),{class:"sv-order-summary__totals"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$18),{class:"sv-order-summary__invoice-preview",variant:"without-products",invoice:i.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[i.loading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("div",k,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString(c.value.length>1?e.unref(n)({defaultMessage:"Selected items",id:"upgrade_subscription.order_summary.selected_items_title",description:"Temporary order summary title shown while the invoice preview is loading"}):null==(t=c.value[0])?void 0:t.description),1)]}),_:1}),e.createVNode(e.unref(t._sfc_main$3),{variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value.length>1?e.unref(n)({defaultMessage:"{count} items",id:"upgrade_subscription.order_summary.selected_item_count",description:"Temporary order summary subtitle shown while the invoice preview is loading"},{count:String(c.value.length)}):e.unref(n)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})])])]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:i.key,"no-spacing":"",class:"sv-order-summary__item"},{default:e.withCtx(()=>[e.createElementVNode("div",x,[e.createVNode(e.unref(t._sfc_main$3),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.description),1)]),_:2},1024),i.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,tag:"span",variant:"body-xs","no-spacing":""},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.amount},null,8,["value"])]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1024))),128)),i.loading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-order-summary__totals"},{default:e.withCtx(()=>[...o[0]||(o[0]=[e.createElementVNode("div",{class:"grid grid-cols-1 gap-2"},[e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-4 w-40 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-4 w-20 animate-pulse rounded bg-gray-100"})]),e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-4 w-16 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-4 w-20 animate-pulse rounded bg-gray-100"})]),e.createElementVNode("div",{class:"border-t border-gray-200 pt-2"},[e.createElementVNode("div",{class:"flex items-center justify-between gap-4"},[e.createElementVNode("div",{class:"h-5 w-36 animate-pulse rounded bg-gray-100"}),e.createElementVNode("div",{class:"h-5 w-24 animate-pulse rounded bg-gray-100"})])])],-1)])]),_:1})):e.createCommentVNode("",!0)],64))])]),_:1},8,["title"]))}}),V=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean},loading:{type:Boolean}},emits:["toggle"],setup(a,{emit:n}){const r=a,o=n,{$t:s}=t.useIntl(),l=e.computed(()=>{var e,t,i,a,n,o;return r.pricing.name??(null==(a=null==(i=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.product_items)?void 0:i[0])?void 0:a.name)??(null==(o=null==(n=r.pricing.products)?void 0:n[0])?void 0:o.name)??"—"}),c=e.computed(()=>{var e,t,i,a,n;const o=null==(n=null==(a=null==(i=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:i[0])?void 0:a.bands)?void 0:n[0];return(null==o?void 0:o.fixed_amount)??(null==o?void 0:o.amount)}),d=e.computed(()=>c.value?`${t.formatAmount(c.value)} ${s({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(n,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"content-background":a.selected?"none":"gray","content-classes":a.selected?"!border-primary-600 ring-1 ring-primary-600":void 0},{default:e.withCtx(()=>[e.createVNode(i._sfc_main,{name:l.value,description:d.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",loading:a.loading,onClick:r[0]||(r[0]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1},8,["loading"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,color:"primary",size:"sm","icon-prefix":"add",loading:a.loading,onClick:r[1]||(r[1]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1},8,["loading"]))]),_:1},8,["name","description"])]),_:1},8,["content-background","content-classes"]))}}),B={class:"sv-pricing-list__items grid grid-cols-1 gap-1"},C=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array},loadingPricingId:{type:String}},emits:["toggle"],setup(i,{emit:a}){const n=i,r=a,{$t:o}=t.useIntl(),s=e.computed(()=>[...n.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0))),l=e=>{var t;return(null==(t=e.product_category)?void 0:t.name)??e.name??o({defaultMessage:"Items",id:"on_demand_pricing_list.category_fallback_title",description:"Fallback title for the selectable pricing items when no product category name is available"})};return(a,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id??a.display_order,class:"sv-pricing-list__category flex flex-col gap-2"},[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-3",tag:"h2",class:"sv-pricing-list__category-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l(a)),1)]),_:2},1024),e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(V,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:i.selectedPricingIds.includes(t.id),loading:i.loadingPricingId===t.id,onToggle:n[0]||(n[0]=e=>r("toggle",e))},null,8,["pricing","selected","loading"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricing_groups,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.id},[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",weight:"semibold",class:"sv-pricing-list__group-title mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(V,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:i.selectedPricingIds.includes(t.id),loading:i.loadingPricingId===t.id,onToggle:n[1]||(n[1]=e=>r("toggle",e))},null,8,["pricing","selected","loading"]))),128))],64))),128))])]))),128))}});const E={key:0,class:"sv-upgrade-subscription sv-root sv-screen sv-upgrade-subscription--purchased flex h-full items-center justify-center p-8"},S={class:"flex flex-col items-center text-center"},T={class:"sv-upgrade-subscription__header"},P={key:1,class:"sv-upgrade-subscription__pricing-list"},I={key:2,class:"sv-upgrade-subscription__loading p-4"},$={class:"sv-upgrade-subscription__payment-methods"},D={key:0,class:"sv-upgrade-subscription__payment-methods-body"},M={key:1,class:"sv-upgrade-subscription__payment-form"},j={class:"sv-upgrade-subscription__order-summary"},O={class:"flex flex-col gap-2"},A=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(v){const _=v,{$t:f}=t.useIntl(),{getSubscription:y}=s.createSubscriptionsService(),{getCustomer:h}=l.createCustomerService(),{getOnDemandPricingItems:b}=function(){const e=n.createRequestService(),t=n.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:i,pricingPlanVersionId:a,pricingItemIds:n,startAt:r,finalizeImmediately:o=!0,paymentMethodId:s}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${i}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:n,...r?{start_at:r}:{},finalize_immediately:o,...s?{payment_method_id:s}:{}}})},getOnDemandPricingItems:function({scheduleId:i}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${i}/on-demand-pricing-items`})}}}(),{getPaymentMethodOptions:w}=c.createPaymentMethodsService(),{previewChargeOnDemandPricingItems:k}=d.createInvoicesService(),x=o.usePortal(),V=n.useLogger(),{dispatchAction:B}=r.useActionDispatchProvider(),{isMobileViewport:A}=g.useViewport(),F=e.computed(()=>x.value.customer_id),L={currency:"EUR",quantity:"0"},q=e.ref([]),U=e.ref(!1),R=e.ref([]),z=e.ref([]),W=e.ref(!1),G=e.ref(!1),H=e.ref(!1),Y=e.ref(void 0),K=e.ref(void 0),Z=e.ref(),J=e.ref(void 0),Q=e.ref(void 0),X=e.ref(void 0),ee=(e,t=[])=>t.find(t=>t.id===e.id),te=(e,t)=>(e.items??[]).map(i=>{var a,n,r,o,s,l,c;const d=null==(a=null==t?void 0:t.items)?void 0:a.find(e=>e.id===i.id),u=i.product_items??(null==d?void 0:d.product_items);return{...e,id:i.id,name:(null==(r=null==(n=i.product_items)?void 0:n[0])?void 0:r.name)??(null==(s=null==(o=null==d?void 0:d.product_items)?void 0:o[0])?void 0:s.name)??e.name??(null==t?void 0:t.name)??(null==(c=null==(l=null==t?void 0:t.products)?void 0:l[0])?void 0:c.name),products:e.products??(null==t?void 0:t.products),items:[{...i,product_items:u}]}}),ie=async()=>{var e,i,a;W.value=!0,K.value=void 0;try{const n=await(async()=>{const e=[...(await y({id:_.configuration.subscriptionId,expanded:!0})).pricing_plan_schedule_infos??[]].sort((e,t)=>Date.parse(t.start_at)-Date.parse(e.start_at)),t=Date.now(),i=e.find(e=>{var i;const a=(null==(i=e.pricing_plan_schedule)?void 0:i.type)??e.type,n=Date.parse(e.start_at),r=e.end_at?Date.parse(e.end_at):void 0,o=Number.isFinite(n)&&n<=t,s=void 0===r||!Number.isFinite(r)||r>t;return"DEFAULT"===a&&o&&s});if(!(null==i?void 0:i.id))throw new Error("No pricing plan schedule found for subscription");return i})();J.value=n.id;const[r,o,s]=await Promise.all([b({scheduleId:J.value}),w({customerId:F.value}),h(F.value)]);R.value=(i=r.pricing_categories??[],a=(null==(e=n.pricing_plan_version)?void 0:e.pricing_categories)??[],i.map(e=>{var t;const i=((e,t)=>t.find(t=>t.product_category_id===e.product_category_id))(e,a);return{...e,name:e.name??(null==(t=null==i?void 0:i.product_category)?void 0:t.name),product_category:e.product_category??(null==i?void 0:i.product_category),pricings:(e.pricings??[]).flatMap(e=>te(e,ee(e,null==i?void 0:i.pricings))),pricing_groups:(e.pricing_groups??[]).map(e=>{var t;const a=null==(t=null==i?void 0:i.pricing_groups)?void 0:t.find(t=>t.id===e.id);return{...e,name:e.name??(null==a?void 0:a.name),pricings:(e.pricings??[]).flatMap(e=>te(e,ee(e,null==a?void 0:a.pricings)))}})}})),z.value=o,X.value=t.getCustomerCountry(s)}catch(n){V.error("INITIAL_DATA_LOAD_FAILED","Failed to load on-demand pricing items",{},n),K.value=f({defaultMessage:"Unable to load items. Please try again later.",id:"upgrade_subscription.load_error",description:"Error message shown when the one-off items cannot be loaded on the upgrade subscription page"})}finally{W.value=!1}};e.onMounted(()=>{ie()});const ae=e.computed(()=>R.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),ne=e.computed(()=>ae.value.filter(e=>q.value.includes(e.id))),re=e.computed(()=>ne.value.flatMap(e=>e.items??[]).map(e=>e.id).filter(e=>!!e)),oe=e.computed(()=>{var e,t;return null==(t=null==(e=Q.value)?void 0:e.tax_summary)?void 0:t.total_amount}),se=e.computed(()=>oe.value??L);let le,ce=0;e.watch([re,J],([e,t])=>{clearTimeout(le);const i=++ce;if(me.value=void 0,!t||0===e.length)return Q.value=void 0,G.value=!1,void(Y.value=void 0);G.value=!0,le=setTimeout(()=>{k({pricingPlanScheduleId:t,pricingItemIds:e}).then(e=>{i===ce&&(Q.value=e)}).catch(e=>{i===ce&&(V.error("INVOICE_PREVIEW_FAILED","Failed to load charge-on-demand invoice preview",{},e),me.value=f({defaultMessage:"Unable to calculate the total. Please try again.",id:"upgrade_subscription.preview_error",description:"Error message shown when the upgrade subscription invoice preview cannot be loaded"}),Q.value=void 0)}).finally(()=>{i===ce&&(G.value=!1,Y.value=void 0)})},400)});const de=e.computed(()=>{if(!J.value)throw new Error("Cannot create charge-on-demand authorization context without a schedule.");return{type:"CHARGE_ON_DEMAND",charge_on_demand:{pricing_plan_schedule_id:J.value,pricing_items:re.value.map(e=>({pricing_item_id:e}))}}}),ue=e=>{Y.value=e,q.value.includes(e)?q.value=q.value.filter(t=>t!==e):q.value=[...q.value,e]},pe=e.computed(()=>re.value.length>0&&!!J.value&&!!oe.value&&!G.value&&z.value.length>0),me=e.ref(void 0),ge=async()=>{var e;pe.value&&!H.value&&(me.value=void 0,H.value=!0,null==(e=Z.value)||e.submit())},ve=async()=>pe.value;let _e;const fe=()=>{H.value=!1,U.value=!0,_e=setTimeout(()=>{B({action:"navigate-to-customer-overview"})},3e3)},ye=e=>{H.value=!1,me.value=e.message||f({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})};return e.onUnmounted(()=>{clearTimeout(le),clearTimeout(_e)}),(n,r)=>U.value?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(m._sfc_main,{class:"sv-upgrade-subscription__success",status:"success",title:e.unref(f)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful upgrade purchase"})},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",shade:"lighter",tag:"div",class:"sv-upgrade-subscription__success-message mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Your purchase has been completed.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful upgrade purchase"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",shade:"lighter",tag:"div",class:"sv-upgrade-subscription__success-redirect mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"You will be redirected shortly…",id:"upgrade_subscription.success.redirect",description:"Shown below the success message while the redirect timer is running"})),1)]),_:1})])]),_:1},8,["title"])])):(e.openBlock(),e.createBlock(e.unref(a.ContentWithAsideLayout),{key:1,class:"sv-upgrade-subscription sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",T,[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-2",tag:"h1",class:"sv-upgrade-subscription__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Upgrade subscription",id:"upgrade_subscription.title",description:"Title for the upgrade subscription page"})),1)]),_:1})])]),content:e.withCtx(()=>[e.unref(A)?(e.openBlock(),e.createBlock(N,{key:0,class:"sv-upgrade-subscription__mobile-order-summary","selected-pricings":ne.value,invoice:Q.value,loading:G.value},null,8,["selected-pricings","invoice","loading"])):e.createCommentVNode("",!0),!W.value&&!K.value&&R.value.length>0?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(C,{categories:R.value,"selected-pricing-ids":q.value,"loading-pricing-id":Y.value,onToggle:ue},null,8,["categories","selected-pricing-ids","loading-pricing-id"])])):W.value?(e.openBlock(),e.createElementBlock("div",I,[...r[0]||(r[0]=[e.createElementVNode("div",{class:"sv-skeleton h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton mt-2 h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton mt-2 h-[72px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):K.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$17),{key:3,class:"sv-upgrade-subscription__load-error sv-error m-4",title:K.value},null,8,["title"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:4,variant:"body-sm",shade:"lighter",class:"sv-upgrade-subscription__empty-state p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"No one-off items are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no one-off items available for the subscription"})),1)]),_:1})),e.createElementVNode("div",$,[e.createVNode(p._sfc_main,{variant:"section",class:"min-h-[130px]"},{default:e.withCtx(()=>[!W.value||W.value&&z.value.length>0?(e.openBlock(),e.createElementBlock("div",D,[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-3",tag:"h2",class:"sv-upgrade-subscription__payment-methods-title mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Payment method",id:"upgrade_subscription.payment_method_block.title",description:"The title of the payment method block in the upgrade subscription flow"})),1)]),_:1}),0===z.value.length?(e.openBlock(),e.createBlock(i._sfc_main$2,{key:0,class:"sv-upgrade-subscription__payment-methods-empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"No payment methods available",id:"upgrade_subscription.payment_method_block.no_payment_methods_available_title",description:"The title shown when there are no available payment methods"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"There are no available payment methods. Please contact support for more information.",id:"upgrade_subscription.payment_method_block.no_payment_methods_available_message",description:"The message shown when there are no available payment methods"})),1)]),_:1})):X.value&&J.value?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{class:e.normalizeClass(["sv-upgrade-subscription__payment-method-picker",{"pointer-events-none opacity-60":H.value}])},[e.createVNode(u._sfc_main,{ref_key:"paymentIntegrationFormRef",ref:Z,"customer-id":F.value,"country-code":X.value,context:de.value,amount:se.value,variant:"AUTHORIZE","payment-method-options":z.value,"validate-on-submit":ve,"force-store-payment-method":"",onPaymentSuccess:fe,onPaymentFailed:ye},null,8,["customer-id","country-code","context","amount","payment-method-options"])],2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])]),aside:e.withCtx(()=>[e.createElementVNode("div",j,[e.createVNode(p._sfc_main,{variant:"section",class:"min-h-[220px]"},{default:e.withCtx(()=>[e.createVNode(N,{"selected-pricings":ne.value,invoice:Q.value,loading:G.value},null,8,["selected-pricings","invoice","loading"])]),_:1})]),me.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$17),{key:0,class:"sv-upgrade-subscription__error sv-error",title:me.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",O,[e.createVNode(p._sfc_main,{class:"sv-upgrade-subscription__submit-skeleton min-h-[44px]"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-upgrade-subscription__purchase w-full",type:"button",disabled:!pe.value||H.value,loading:H.value,onClick:ge},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"])]),_:1}),e.createVNode(i._sfc_main$1,{"payment-method-options":z.value},null,8,["payment-method-options"])])]),_:1}))}}),F=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var r,o,s,l;return e.openBlock(),e.createBlock(n._sfc_main,{"custom-element-name":e.unref(q),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(r=t.branding)?void 0:r.colors)?void 0:o.primary,"secondary-color":null==(l=null==(s=t.branding)?void 0:s.colors)?void 0:l.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(A,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),L=n.defineCustomElement(F),q=n.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=q,exports.SolvimonUpgradeSubscription=L,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(q)||customElements.define(q,L)};
@@ -1,17 +1,17 @@
1
- import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, createCommentVNode, renderList, ref, onMounted, watch, onUnmounted } from "vue";
2
- import { u as useIntl, _ as _sfc_main$5, l as _sfc_main$6, b as _sfc_main$7, t as _sfc_main$8, D as _sfc_main$9, y as formatAmount, e as _sfc_main$b, C as _sfc_main$e, x as getCustomerCountry } from "../../vendor-ui-CdOX_IS-.mjs";
3
- import { _ as _sfc_main$a, a as _sfc_main$f, b as _sfc_main$g } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D-BFQZiM.mjs";
4
- import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-DhfUkZZg.mjs";
5
- import { c as createRequestService, u as useConfig, a as useLogger, _ as _sfc_main$i, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
6
- import { u as useActionDispatchProvider } from "../../useActionDispatchProvider-Ca1YbU61.mjs";
7
- import { u as usePortal } from "../../usePortal-CpW3EDD-.mjs";
8
- import { c as createSubscriptionsService } from "../../subscriptions-BIGqt2N0.mjs";
9
- import { c as createCustomerService } from "../../customer-Bn6GdxP8.mjs";
10
- import { c as createPaymentMethodsService } from "../../paymentMethods-DOH9-6M1.mjs";
11
- import { c as createInvoicesService } from "../../invoices-Rs-QBUGS.mjs";
12
- import { _ as _sfc_main$h } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dkd-Cp8c.mjs";
1
+ import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, createCommentVNode, renderList, ref, onMounted, watch, onUnmounted, normalizeClass } from "vue";
2
+ import { u as useIntl, _ as _sfc_main$5, A as _sfc_main$6, e as _sfc_main$7, x as _sfc_main$8, F as _sfc_main$9, B as formatAmount, c as _sfc_main$b, E as _sfc_main$e, g as getCustomerCountry } from "../../vendor-ui-B8IlviSs.mjs";
3
+ import { _ as _sfc_main$a, a as _sfc_main$f, b as _sfc_main$g } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs";
4
+ import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
5
+ import { c as createRequestService, u as useConfig, a as useLogger, _ as _sfc_main$i, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
6
+ import { u as useActionDispatchProvider } from "../../useActionDispatchProvider-Dz8-e4gZ.mjs";
7
+ import { u as usePortal } from "../../usePortal-B1O1zgdV.mjs";
8
+ import { c as createSubscriptionsService } from "../../subscriptions-BPYyv09M.mjs";
9
+ import { c as createCustomerService } from "../../customer-Bv_fqXzO.mjs";
10
+ import { c as createPaymentMethodsService } from "../../paymentMethods-DvqlWe96.mjs";
11
+ import { c as createInvoicesService } from "../../invoices-BGb0AwVF.mjs";
12
+ import { _ as _sfc_main$h } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs";
13
13
  import { _ as _sfc_main$d } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
14
- import { _ as _sfc_main$c } from "../../adyen-D0yvZvq5.mjs";
14
+ import { _ as _sfc_main$c } from "../../url-1Lbg5Yni.mjs";
15
15
  import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
16
16
  const _hoisted_1$2 = { class: "sv-order-summary__body grid grid-cols-1 gap-1" };
17
17
  const _hoisted_2$1 = { class: "flex items-center justify-center gap-2 px-3 py-5" };
@@ -557,9 +557,8 @@ const _hoisted_8 = {
557
557
  key: 1,
558
558
  class: "sv-upgrade-subscription__payment-form"
559
559
  };
560
- const _hoisted_9 = { class: "sv-upgrade-subscription__payment-method-picker" };
561
- const _hoisted_10 = { class: "sv-upgrade-subscription__order-summary" };
562
- const _hoisted_11 = { class: "flex flex-col gap-2" };
560
+ const _hoisted_9 = { class: "sv-upgrade-subscription__order-summary" };
561
+ const _hoisted_10 = { class: "flex flex-col gap-2" };
563
562
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
564
563
  __name: "UpgradeSubscription",
565
564
  props: {
@@ -595,7 +594,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
595
594
  const activeScheduleId = ref(void 0);
596
595
  const previewInvoice = ref(void 0);
597
596
  const countryCode = ref(void 0);
598
- const hasSelectedPaymentMethod = ref(false);
599
597
  const getActiveSchedule = async () => {
600
598
  const subscription = await getSubscription({
601
599
  id: props.configuration.subscriptionId,
@@ -621,7 +619,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
621
619
  return activeSchedule;
622
620
  };
623
621
  const findSourceCategory = (category, sourceCategories) => sourceCategories.find(
624
- (sourceCategory) => sourceCategory.product_category_id === category.product_category_id || sourceCategory.id === category.id
622
+ (sourceCategory) => sourceCategory.product_category_id === category.product_category_id
625
623
  );
626
624
  const findSourcePricing = (pricing, sourcePricings = []) => sourcePricings.find((sourcePricing) => sourcePricing.id === pricing.id);
627
625
  const normalizePricingRows = (pricing, sourcePricing) => (pricing.items ?? []).map((item) => {
@@ -642,17 +640,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
642
640
  };
643
641
  });
644
642
  const normalizeOnDemandCategories = (categories2, sourceCategories) => categories2.map((category) => {
643
+ var _a;
645
644
  const sourceCategory = findSourceCategory(category, sourceCategories);
646
645
  return {
647
646
  ...category,
648
- name: category.name ?? (sourceCategory == null ? void 0 : sourceCategory.name),
647
+ name: category.name ?? ((_a = sourceCategory == null ? void 0 : sourceCategory.product_category) == null ? void 0 : _a.name),
649
648
  product_category: category.product_category ?? (sourceCategory == null ? void 0 : sourceCategory.product_category),
650
649
  pricings: (category.pricings ?? []).flatMap(
651
650
  (pricing) => normalizePricingRows(pricing, findSourcePricing(pricing, sourceCategory == null ? void 0 : sourceCategory.pricings))
652
651
  ),
653
652
  pricing_groups: (category.pricing_groups ?? []).map((group) => {
654
- var _a;
655
- const sourceGroup = (_a = sourceCategory == null ? void 0 : sourceCategory.pricing_groups) == null ? void 0 : _a.find(
653
+ var _a2;
654
+ const sourceGroup = (_a2 = sourceCategory == null ? void 0 : sourceCategory.pricing_groups) == null ? void 0 : _a2.find(
656
655
  (candidate) => candidate.id === group.id
657
656
  );
658
657
  return {
@@ -793,17 +792,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
793
792
  const purchaseError = ref(void 0);
794
793
  const handlePurchase = async () => {
795
794
  var _a;
796
- if (!canPurchase.value) return;
795
+ if (!canPurchase.value || isPurchasePending.value) return;
797
796
  purchaseError.value = void 0;
798
- if (hasSelectedPaymentMethod.value) {
799
- isPurchasePending.value = true;
800
- }
797
+ isPurchasePending.value = true;
801
798
  (_a = paymentIntegrationFormRef.value) == null ? void 0 : _a.submit();
802
799
  };
803
800
  const handleValidatePaymentSubmit = async () => canPurchase.value;
804
- const handlePaymentMethodSelect = () => {
805
- hasSelectedPaymentMethod.value = true;
806
- };
807
801
  let redirectTimer;
808
802
  const handlePaymentSuccess = () => {
809
803
  isPurchasePending.value = false;
@@ -973,7 +967,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
973
967
  ]),
974
968
  _: 1
975
969
  })) : countryCode.value && activeScheduleId.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
976
- createElementVNode("div", _hoisted_9, [
970
+ createElementVNode("div", {
971
+ class: normalizeClass(["sv-upgrade-subscription__payment-method-picker", { "pointer-events-none opacity-60": isPurchasePending.value }])
972
+ }, [
977
973
  createVNode(_sfc_main$h, {
978
974
  ref_key: "paymentIntegrationFormRef",
979
975
  ref: paymentIntegrationFormRef,
@@ -985,11 +981,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
985
981
  "payment-method-options": paymentMethodOptions.value,
986
982
  "validate-on-submit": handleValidatePaymentSubmit,
987
983
  "force-store-payment-method": "",
988
- onSelect: handlePaymentMethodSelect,
989
984
  onPaymentSuccess: handlePaymentSuccess,
990
985
  onPaymentFailed: handlePaymentFailed
991
986
  }, null, 8, ["customer-id", "country-code", "context", "amount", "payment-method-options"])
992
- ])
987
+ ], 2)
993
988
  ])) : createCommentVNode("", true)
994
989
  ])) : createCommentVNode("", true)
995
990
  ]),
@@ -998,7 +993,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
998
993
  ])
999
994
  ]),
1000
995
  aside: withCtx(() => [
1001
- createElementVNode("div", _hoisted_10, [
996
+ createElementVNode("div", _hoisted_9, [
1002
997
  createVNode(_sfc_main$d, {
1003
998
  variant: "section",
1004
999
  class: "min-h-[220px]"
@@ -1018,14 +1013,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1018
1013
  class: "sv-upgrade-subscription__error sv-error",
1019
1014
  title: purchaseError.value
1020
1015
  }, null, 8, ["title"])) : createCommentVNode("", true),
1021
- createElementVNode("div", _hoisted_11, [
1016
+ createElementVNode("div", _hoisted_10, [
1022
1017
  createVNode(_sfc_main$d, { class: "sv-upgrade-subscription__submit-skeleton min-h-[44px]" }, {
1023
1018
  default: withCtx(() => [
1024
1019
  createVNode(unref(_sfc_main$b), {
1025
1020
  size: "lg",
1026
1021
  class: "sv-action sv-action--primary sv-action--full-width sv-upgrade-subscription__purchase w-full",
1027
1022
  type: "button",
1028
- disabled: !canPurchase.value,
1023
+ disabled: !canPurchase.value || isPurchasePending.value,
1029
1024
  loading: isPurchasePending.value,
1030
1025
  onClick: handlePurchase
1031
1026
  }, {
@@ -1 +1 @@
1
- .to-right-enter-active[data-v-ce4df87e],.to-right-leave-to[data-v-ce4df87e]{opacity:0;transform:translate(-10px)}.to-right-leave[data-v-ce4df87e],.to-right-enter-to[data-v-ce4df87e]{opacity:1;transform:translate(0)}.to-right-enter-active[data-v-ce4df87e],.to-right-leave-active[data-v-ce4df87e]{transition:all .25s}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-to[data-v-ce4df87e]{opacity:0;transform:translate(10px)}.to-left-leave[data-v-ce4df87e],.to-left-enter-to[data-v-ce4df87e]{opacity:1;transform:translate(0)}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-active[data-v-ce4df87e]{transition:all .25s}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-to[data-v-ce4df87e]{opacity:0;transform:translateY(10px)}.to-top-leave[data-v-ce4df87e],.to-top-enter-to[data-v-ce4df87e]{opacity:1;transform:translateY(0)}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-active[data-v-ce4df87e]{transition:all .25s}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-to[data-v-ce4df87e]{opacity:0;transform:translateY(-10px)}.to-bottom-leave[data-v-ce4df87e],.to-bottom-enter-to[data-v-ce4df87e]{opacity:1;transform:translateY(0)}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-active[data-v-ce4df87e]{transition:all .25s}@media print{.card-print-avoid[data-v-9ba3ddf0]{break-inside:avoid-page;page-break-inside:avoid}}.expand-enter-active,.expand-leave-active{transition:height .3s ease-in-out;overflow:hidden}.expand-enter,.expand-leave-to{height:0}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;background:transparent;margin:.5rem 0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-webkit-slider-thumb{cursor:not-allowed}input[type=range]::-moz-range-thumb{-moz-appearance:none;-webkit-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-moz-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-moz-range-thumb{cursor:not-allowed}input[type=range]:not(:disabled):hover::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):hover::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-webkit-slider-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-moz-range-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]::-webkit-slider-runnable-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-webkit-slider-runnable-track{background:#e0e5eb;cursor:not-allowed}input[type=range]::-moz-range-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-moz-range-track{background:#e0e5eb;cursor:not-allowed}input[type=range].range-sm::-webkit-slider-thumb{width:.8rem;height:.8rem;margin-top:-.2rem}input[type=range].range-sm::-moz-range-thumb{width:.8rem;height:.8rem}input[type=range].range-sm::-webkit-slider-runnable-track{height:.4rem;border-radius:.2rem}input[type=range].range-sm::-moz-range-track{height:.4rem;border-radius:.2rem}input[type=range].range-md::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem}input[type=range].range-md::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-md::-webkit-slider-runnable-track{height:.5rem;border-radius:.25rem}input[type=range].range-md::-moz-range-track{height:.5rem;border-radius:.25rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.4rem;height:1.4rem;margin-top:-.35rem}input[type=range].range-lg::-moz-range-thumb{width:1.4rem;height:1.4rem}input[type=range].range-lg::-webkit-slider-runnable-track{height:.7rem;border-radius:.35rem}input[type=range].range-lg::-moz-range-track{height:.7rem;border-radius:.35rem}input[type=range].range-xl::-webkit-slider-thumb{width:1.8rem;height:1.8rem;margin-top:-.5rem}input[type=range].range-xl::-moz-range-thumb{width:1.8rem;height:1.8rem}input[type=range].range-xl::-webkit-slider-runnable-track{height:.9rem;border-radius:.45rem}input[type=range].range-xl::-moz-range-track{height:.9rem;border-radius:.45rem}thead th:first-of-type,tr td:first-of-type{position:sticky;left:0;background:inherit;z-index:2}thead th:last-of-type,tr td:last-of-type{position:sticky;right:0;background:inherit;z-index:2}@media print{.card-header-print-root[data-v-9316d9b2]{-moz-column-break-after:avoid;break-after:avoid-page;page-break-after:avoid}}@media print{.collapsible-card-print-root[data-v-6f1525c7],.collapsible-card-print-content[data-v-6f1525c7]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.collapsible-card-print-content[data-v-6f1525c7]{display:block!important}}@media print{.collapsible-list-item-content[data-v-9da2d94d]{display:block!important}}.tiptap h1,.editor-content-typography h1{margin-top:0;font-size:2.1428571em;font-weight:700;line-height:1.2}.tiptap h2,.editor-content-typography h2{margin-top:0;font-size:1.5em;font-weight:700;line-height:1.3333333}.tiptap h3,.editor-content-typography h3{margin-top:0;font-size:1.2857143em;font-weight:600;line-height:1.4444444}.tiptap h4,.editor-content-typography h4{margin-top:0;font-size:1.1em;font-weight:600;line-height:1.4444444}.tiptap p,.editor-content-typography p{margin-top:0;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap ul,.tiptap ol,.editor-content-typography ul,.editor-content-typography ol{margin-top:0;padding-left:1.625em}.tiptap ul,.editor-content-typography ul{list-style-type:disc}.tiptap ol,.editor-content-typography ol{list-style-type:decimal}.tiptap li,.editor-content-typography li{margin-top:.2em;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap blockquote,.editor-content-typography blockquote{margin-top:0;margin-bottom:1rem;border-left-width:3px;--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1));padding-left:.875rem;font-style:italic;line-height:1.45;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.tiptap blockquote p,.editor-content-typography blockquote p{margin-bottom:0;color:inherit}.tiptap pre,.editor-content-typography pre{margin-top:0;margin-bottom:1rem;white-space:pre-wrap;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap pre code,.editor-content-typography pre code{background-color:transparent;padding:0;color:inherit}.tiptap code:not(pre code),.editor-content-typography code:not(pre code){border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap a,.editor-content-typography a{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1));text-decoration-line:none}.tiptap a:hover,.editor-content-typography a:hover{text-decoration-line:underline}.tiptap>*:last-child,.editor-content-typography *:last-child{margin-bottom:0}[data-v-438af34f] .tiptap .is-empty:before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;font-weight:400;font-style:italic;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.animated-gradient[data-v-f1f0dadf]{background:repeating-linear-gradient(to right,#fff0,#ffffffbf,#fff0);width:100%;background-size:200% auto;background-position:0 100%;animation:gradient-f1f0dadf 2s infinite;animation-fill-mode:forwards;animation-timing-function:linear}@keyframes gradient-f1f0dadf{0%{background-position:0 0}to{background-position:-200% 0}}@media print{.tiered-rule-header[data-v-9e78b558]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.tiered-table-print-wrapper[data-v-9e78b558]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.tiered-table-print thead[data-v-9e78b558]{display:table-header-group}.tiered-table-print-row[data-v-9e78b558]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}.conditions-root:focus-within>.conditions-with-context-menu[data-v-ecf44f22],.conditions-root:hover>.conditions-with-context-menu[data-v-ecf44f22]{padding-right:3rem}.conditions-root:focus-within>.conditions-with-context-menu+.context-menu-wrapper[data-v-ecf44f22],.conditions-root:hover>.conditions-with-context-menu+.context-menu-wrapper[data-v-ecf44f22]{opacity:1}.nested-conditions-border:before{background-image:url("data:image/svg+xml,%3Csvg width='4' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='m0 0 4 4v1L0 1V0Z' fill='%23CDD6DF'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h4v5H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}@media print{.pricing-item-heading[data-v-3d026d53]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.pricing-item-block[data-v-3d026d53]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}@media print{.section-label[data-v-f430a83c]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}}@media print{.category-heading[data-v-2ac99a3d]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}[data-v-2ac99a3d] .collapsible-card-print-root .card-header-print-root{border-bottom-width:0}}@media print{[data-v-82e565eb] .card-surface{box-shadow:none!important;border-color:#e5e7eb!important}}.slide-left-enter-active[data-v-1a3d5742],.slide-left-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-left-enter-from[data-v-1a3d5742],.slide-left-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(30px)}.slide-right-enter-active[data-v-1a3d5742],.slide-right-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-right-enter-from[data-v-1a3d5742],.slide-right-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(-30px)}.slide-top-enter-active[data-v-1a3d5742],.slide-top-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-top-enter-from[data-v-1a3d5742],.slide-top-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(30px)}.slide-bottom-enter-active[data-v-1a3d5742],.slide-bottom-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-bottom-enter-from[data-v-1a3d5742],.slide-bottom-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(-30px)}.fade-enter-active[data-v-1a3d5742],.fade-leave-active[data-v-1a3d5742]{transition:all .5s ease}.fade-enter-from[data-v-1a3d5742],.fade-leave-to[data-v-1a3d5742]{opacity:0}
1
+ .to-right-enter-active[data-v-ce4df87e],.to-right-leave-to[data-v-ce4df87e]{opacity:0;transform:translate(-10px)}.to-right-leave[data-v-ce4df87e],.to-right-enter-to[data-v-ce4df87e]{opacity:1;transform:translate(0)}.to-right-enter-active[data-v-ce4df87e],.to-right-leave-active[data-v-ce4df87e]{transition:all .25s}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-to[data-v-ce4df87e]{opacity:0;transform:translate(10px)}.to-left-leave[data-v-ce4df87e],.to-left-enter-to[data-v-ce4df87e]{opacity:1;transform:translate(0)}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-active[data-v-ce4df87e]{transition:all .25s}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-to[data-v-ce4df87e]{opacity:0;transform:translateY(10px)}.to-top-leave[data-v-ce4df87e],.to-top-enter-to[data-v-ce4df87e]{opacity:1;transform:translateY(0)}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-active[data-v-ce4df87e]{transition:all .25s}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-to[data-v-ce4df87e]{opacity:0;transform:translateY(-10px)}.to-bottom-leave[data-v-ce4df87e],.to-bottom-enter-to[data-v-ce4df87e]{opacity:1;transform:translateY(0)}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-active[data-v-ce4df87e]{transition:all .25s}.expand{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease-in-out}.expand--open{grid-template-rows:1fr}.expand__inner{overflow:hidden;min-height:0}@media print{.expand{grid-template-rows:1fr}.expand__inner{overflow:visible}}@media print{.card-print-avoid[data-v-9ba3ddf0]{break-inside:avoid-page;page-break-inside:avoid}}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;background:transparent;margin:.5rem 0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-webkit-slider-thumb{cursor:not-allowed}input[type=range]::-moz-range-thumb{-moz-appearance:none;-webkit-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-moz-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-moz-range-thumb{cursor:not-allowed}input[type=range]:not(:disabled):hover::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):hover::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-webkit-slider-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-moz-range-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]::-webkit-slider-runnable-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-webkit-slider-runnable-track{background:#e0e5eb;cursor:not-allowed}input[type=range]::-moz-range-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-moz-range-track{background:#e0e5eb;cursor:not-allowed}input[type=range].range-sm::-webkit-slider-thumb{width:.8rem;height:.8rem;margin-top:-.2rem}input[type=range].range-sm::-moz-range-thumb{width:.8rem;height:.8rem}input[type=range].range-sm::-webkit-slider-runnable-track{height:.4rem;border-radius:.2rem}input[type=range].range-sm::-moz-range-track{height:.4rem;border-radius:.2rem}input[type=range].range-md::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem}input[type=range].range-md::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-md::-webkit-slider-runnable-track{height:.5rem;border-radius:.25rem}input[type=range].range-md::-moz-range-track{height:.5rem;border-radius:.25rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.4rem;height:1.4rem;margin-top:-.35rem}input[type=range].range-lg::-moz-range-thumb{width:1.4rem;height:1.4rem}input[type=range].range-lg::-webkit-slider-runnable-track{height:.7rem;border-radius:.35rem}input[type=range].range-lg::-moz-range-track{height:.7rem;border-radius:.35rem}input[type=range].range-xl::-webkit-slider-thumb{width:1.8rem;height:1.8rem;margin-top:-.5rem}input[type=range].range-xl::-moz-range-thumb{width:1.8rem;height:1.8rem}input[type=range].range-xl::-webkit-slider-runnable-track{height:.9rem;border-radius:.45rem}input[type=range].range-xl::-moz-range-track{height:.9rem;border-radius:.45rem}thead th:first-of-type,tr td:first-of-type{position:sticky;left:0;background:inherit;z-index:2}thead th:last-of-type,tr td:last-of-type{position:sticky;right:0;background:inherit;z-index:2}@media print{.card-header-print-root[data-v-7ffd9c3a]{-moz-column-break-after:avoid;break-after:avoid-page;page-break-after:avoid}}@media print{.collapsible-card-print-root[data-v-f07d4bc8],.collapsible-card-print-content[data-v-f07d4bc8]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.collapsible-card-print-content[data-v-f07d4bc8]{display:block!important}}.collapsible-list-item-content[data-v-0845ebd1]{content-visibility:auto}@media print{.collapsible-list-item-content[data-v-0845ebd1]{content-visibility:visible;display:block!important}}.tiptap h1,.editor-content-typography h1{margin-top:0;font-size:2.1428571em;font-weight:700;line-height:1.2}.tiptap h2,.editor-content-typography h2{margin-top:0;font-size:1.5em;font-weight:700;line-height:1.3333333}.tiptap h3,.editor-content-typography h3{margin-top:0;font-size:1.2857143em;font-weight:600;line-height:1.4444444}.tiptap h4,.editor-content-typography h4{margin-top:0;font-size:1.1em;font-weight:600;line-height:1.4444444}.tiptap p,.editor-content-typography p{margin-top:0;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap ul,.tiptap ol,.editor-content-typography ul,.editor-content-typography ol{margin-top:0;padding-left:1.625em}.tiptap ul,.editor-content-typography ul{list-style-type:disc}.tiptap ol,.editor-content-typography ol{list-style-type:decimal}.tiptap li,.editor-content-typography li{margin-top:.2em;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap blockquote,.editor-content-typography blockquote{margin-top:0;margin-bottom:1rem;border-left-width:3px;--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1));padding-left:.875rem;font-style:italic;line-height:1.45;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.tiptap blockquote p,.editor-content-typography blockquote p{margin-bottom:0;color:inherit}.tiptap pre,.editor-content-typography pre{margin-top:0;margin-bottom:1rem;white-space:pre-wrap;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap pre code,.editor-content-typography pre code{background-color:transparent;padding:0;color:inherit}.tiptap code:not(pre code),.editor-content-typography code:not(pre code){border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap a,.editor-content-typography a{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1));text-decoration-line:none}.tiptap a:hover,.editor-content-typography a:hover{text-decoration-line:underline}.tiptap>*:last-child,.editor-content-typography *:last-child{margin-bottom:0}[data-v-30f7434b] .tiptap .is-empty:before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;font-weight:400;font-style:italic;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.animated-gradient[data-v-f1f0dadf]{background:repeating-linear-gradient(to right,#fff0,#ffffffbf,#fff0);width:100%;background-size:200% auto;background-position:0 100%;animation:gradient-f1f0dadf 2s infinite;animation-fill-mode:forwards;animation-timing-function:linear}@keyframes gradient-f1f0dadf{0%{background-position:0 0}to{background-position:-200% 0}}@media print{.tiered-rule-header[data-v-9e78b558]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.tiered-table-print-wrapper[data-v-9e78b558]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.tiered-table-print thead[data-v-9e78b558]{display:table-header-group}.tiered-table-print-row[data-v-9e78b558]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}.conditions-root:focus-within>.conditions-with-context-menu[data-v-d6f7792d],.conditions-root:hover>.conditions-with-context-menu[data-v-d6f7792d]{padding-right:3rem}.conditions-root:focus-within>.conditions-with-context-menu+.context-menu-wrapper[data-v-d6f7792d],.conditions-root:hover>.conditions-with-context-menu+.context-menu-wrapper[data-v-d6f7792d]{opacity:1}.nested-conditions-border:before{background-image:url("data:image/svg+xml,%3Csvg width='4' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='m0 0 4 4v1L0 1V0Z' fill='%23CDD6DF'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h4v5H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}@media print{.pricing-item-heading[data-v-adc4d4bb]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.pricing-item-block[data-v-adc4d4bb]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}@media print{.section-label[data-v-9c62e0e7]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}}@media print{.category-heading[data-v-cb4bc141]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}[data-v-cb4bc141] .collapsible-card-print-root .card-header-print-root{border-bottom-width:0}}@media print{[data-v-e3ba2515] .card-surface{box-shadow:none!important;border-color:#e5e7eb!important}}.slide-left-enter-active[data-v-1a3d5742],.slide-left-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-left-enter-from[data-v-1a3d5742],.slide-left-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(30px)}.slide-right-enter-active[data-v-1a3d5742],.slide-right-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-right-enter-from[data-v-1a3d5742],.slide-right-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(-30px)}.slide-top-enter-active[data-v-1a3d5742],.slide-top-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-top-enter-from[data-v-1a3d5742],.slide-top-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(30px)}.slide-bottom-enter-active[data-v-1a3d5742],.slide-bottom-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-bottom-enter-from[data-v-1a3d5742],.slide-bottom-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(-30px)}.fade-enter-active[data-v-1a3d5742],.fade-leave-active[data-v-1a3d5742]{transition:all .5s ease}.fade-enter-from[data-v-1a3d5742],.fade-leave-to[data-v-1a3d5742]{opacity:0}
@@ -1,5 +1,5 @@
1
- import { w as withExpand, s as serializeQueryParams, a as withPagination } from "./vendor-ui-CdOX_IS-.mjs";
2
- import { u as useConfig, c as createRequestService } from "./component-CGfjV_7z.mjs";
1
+ import { w as withExpand, s as serializeQueryParams, a as withPagination } from "./vendor-ui-B8IlviSs.mjs";
2
+ import { u as useConfig, c as createRequestService } from "./component-Bg2JVC_O.mjs";
3
3
  const ENDPOINT = "/portal/pricing-plan-subscriptions";
4
4
  function createSubscriptionsService() {
5
5
  const config = useConfig();