@solvimon/solvimon-web 0.1.0-alpha.29 → 0.1.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/{Alert.vue.es-CNrEaLvh.mjs → Alert.vue.es-ZPG49yR_.mjs} +1 -1
- package/dist/{AuthProvider.handle-DKfNs8rr.mjs → AuthProvider.handle-SRR_04XS.mjs} +1 -1
- package/dist/{Avatar.vue.es-r0NbcIib.mjs → Avatar.vue.es-geDQsZwu.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs} +4 -4
- package/dist/{Button.vue.es-Zw--kuaU.mjs → Button.vue.es-j7iYlqtJ.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-B8FDkS9U.mjs → ChargeOnDemandModal-CR01PkP_.mjs} +14 -14
- package/dist/{Checkout.entry.ce-DsGl-5aR.mjs → Checkout.entry.ce-CopWuLJC.mjs} +1784 -1817
- package/dist/{CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs → CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs} +7 -7
- package/dist/{Chip.vue.es-D3UDSyXC.mjs → Chip.vue.es-Dxx_0dte.mjs} +2 -2
- package/dist/{ContextMenu.vue.es-B9mFpUQK.mjs → ContextMenu.vue.es-BJO4U47Q.mjs} +5 -5
- package/dist/{CustomerBillingInformation.vue.es-B8NiQaJs.mjs → CustomerBillingInformation.vue.es-CmNpqcBw.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs} +5 -5
- package/dist/{CustomerShippingAddresses-Bj8Y17O8.mjs → CustomerShippingAddresses-BRPukhRI.mjs} +8 -8
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs} +434 -425
- package/dist/{DividerText.vue.es-CNbgif-3.mjs → DividerText.vue.es-BusbyeAI.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-DNd65mQq.mjs → ErrorNotification.vue.es-F068p7PY.mjs} +2 -2
- package/dist/{FormMessage.vue.es-Cjv358Ab.mjs → FormMessage.vue.es-CwMQpIAW.mjs} +1 -1
- package/dist/{IconButton.vue.es-C8lYFx5_.mjs → IconButton.vue.es-D8DtBW9i.mjs} +2 -2
- package/dist/{IconTitle.vue.es-O2kcqgKm.mjs → IconTitle.vue.es-6VJtjJX2.mjs} +3 -3
- package/dist/{Input.vue.es-D8Oj8MWv.mjs → Input.vue.es-BLyHcmu4.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs} +4 -4
- package/dist/{InvoicePreview.vue.es-4Q2hzaFS.mjs → InvoicePreview.vue.es-Cpf66_xV.mjs} +4 -4
- package/dist/{InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs → InvoicePricingClauseChip.vue.es-CDrAE901.mjs} +3 -3
- package/dist/{Label.vue.es-DtpLM1KH.mjs → Label.vue.es-es7ZUBSP.mjs} +3 -3
- package/dist/{Modal.vue.es-C8ZcO117.mjs → Modal.vue.es-eeR9FmvQ.mjs} +6 -6
- package/dist/{OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs → OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs} +5 -5
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-BvY2nXGV.mjs → PaymentHistoryBlock-CN42ewCn.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-CcfQSzKM.mjs → PaymentIntegrationForm-D3Ye7LZ5.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs} +5 -5
- package/dist/{PaymentIntegrationFormAdyen-DqgDfO6K.mjs → PaymentIntegrationFormAdyen-Fm-diCCO.mjs} +39 -38
- package/dist/{PaymentIntegrationFormStripe-BYdAkvLt.mjs → PaymentIntegrationFormStripe-BANBL6za.mjs} +14 -13
- package/dist/{PaymentMethod.vue.es-b0p3a0L-.mjs → PaymentMethod.vue.es-t3-VyoE8.mjs} +4 -4
- package/dist/{PaymentMethodForm-BsTrTwCg.mjs → PaymentMethodForm-CqP3GoNj.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs} +6 -6
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs} +6 -6
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs} +7 -7
- package/dist/PlanCustomizationEditor-B76UNEMm.mjs +791 -0
- package/dist/{PortalLinkUnverified-B_EE2wTJ.mjs → PortalLinkUnverified-Cp60_kRJ.mjs} +3 -3
- package/dist/{PortalNotAvailable-DPE9y37H.mjs → PortalNotAvailable-DzSQnfzw.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs → PricingGroupRangeInput.vue.es-Srq_3cga.mjs} +156 -206
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs +177 -0
- package/dist/{RadioGroupExtended.vue.es-3nDXqIGi.mjs → RadioGroupExtended.vue.es-BbBMDf6l.mjs} +5 -5
- package/dist/{Section.vue.es-CvX9tg2f.mjs → Section.vue.es-Oqn1wGPZ.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs} +2 -2
- package/dist/{ShippingAddressesModal-C4p1IXXk.mjs → ShippingAddressesModal-c7nqf4Ny.mjs} +10 -10
- package/dist/StepInput.vue.es-ieh4EuJ7.mjs +213 -0
- package/dist/{SubscriptionDetails.entry.ce-D5SwM0YS.mjs → SubscriptionDetails.entry.ce-uYv45FGH.mjs} +91 -92
- package/dist/{SubscriptionSchedules-BZqlpAtk.mjs → SubscriptionSchedules-DMxX3GpK.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs} +1736 -1721
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs} +4 -4
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs} +9 -9
- package/dist/{TooltipParagraph.vue.es-Dw0ndjle.mjs → TooltipParagraph.vue.es-BES3zsYN.mjs} +1 -1
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs} +1 -1
- package/dist/{TrialChip.vue.es-DOopmaXA.mjs → TrialChip.vue.es-C51z1ZiA.mjs} +2 -2
- package/dist/addonQuantity-CCVaA3e-.mjs +758 -0
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +8 -8
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.mjs +14 -14
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/core/index.mjs +1 -1
- package/dist/{customElements-BTj4ii4f.mjs → customElements-DK4GKNJG.mjs} +10 -10
- package/dist/{customer-BIjC0CWJ.mjs → customer-lf6S5DBR.mjs} +1 -1
- package/dist/{de-DE-DBbERiFr.mjs → de-DE-Cyj_NtiI.mjs} +4 -0
- package/dist/{fr-FR-IWJE-urI.mjs → fr-FR-CRFoWQ7J.mjs} +4 -0
- package/dist/{index.es-C7J3WGGo.mjs → index.es-BrVTOW5D.mjs} +4 -4
- package/dist/index.mjs +2 -2
- package/dist/{invoices-e1sKLgxg.mjs → invoices-DdREPDXV.mjs} +1 -1
- package/dist/{it-IT-B7ui2oxO.mjs → it-IT-DObZEc-U.mjs} +4 -0
- package/dist/{nl-NL-Bafh2xoT.mjs → nl-NL-C02xHilF.mjs} +4 -0
- package/dist/paymentFailure-QZdZHBhf.mjs +47 -0
- package/dist/{paymentMethods-B_82JGk_.mjs → paymentMethods-8w-ccfY_.mjs} +1 -1
- package/dist/{paymentMethods-Nfv9HdkS.mjs → paymentMethods-Goa25rTs.mjs} +2 -2
- package/dist/paymentOutcome-B6sW1eCV.mjs +22 -0
- package/dist/{payments-BnxbzQUC.mjs → payments-CKpU1K3t.mjs} +1 -1
- package/dist/{pricing-BOhvWWMj.mjs → pricing-CEaZGgKe.mjs} +1 -1
- package/dist/pricingItem.es-bCPArbTa.mjs +55 -0
- package/dist/{pricingPlanScheduleOverrides-Dxv5FOBd.mjs → pricingPlanScheduleOverrides-BBp-DmpV.mjs} +2 -2
- package/dist/{pricingPlanSchedules-Dv7ZCgNp.mjs → pricingPlanSchedules-DSMptcAh.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +13 -13
- package/dist/screens/PayInvoice/PayInvoice.mjs +33 -32
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +172 -163
- package/dist/{sorting.es-CVyKw23D.mjs → sorting.es-C0pdMgX0.mjs} +1 -1
- package/dist/subscription-BwzkagDI.mjs +212 -0
- package/dist/{subscriptions-BWXZGK0E.mjs → subscriptions-B5bH8hsI.mjs} +1 -1
- package/dist/{taxId.es-DkD3Ltr8.mjs → taxId.es-e6NEvprh.mjs} +2 -2
- package/dist/types/public/core/configuration.d.ts +0 -1
- package/dist/types/public/core/types.d.ts +10 -5
- package/dist/{useActionDispatchProvider-3W2vEyIg.mjs → useActionDispatchProvider-ChAHdwR8.mjs} +1 -1
- package/dist/{useCustomer-cObBvDOu.mjs → useCustomer-CTMhg1nd.mjs} +2 -2
- package/dist/{useCustomerFormLabels-DJWf2O17.mjs → useCustomerFormLabels-D4oDnfxA.mjs} +9 -9
- package/dist/{useIncrementalLoading-CATuO36d.mjs → useIncrementalLoading-CBVutPH8.mjs} +1 -1
- package/dist/{useInvoiceData-DD44HTl7.mjs → useInvoiceData-qUGbBAQK.mjs} +2 -2
- package/dist/{useInvoicesList-CpB-41MQ.mjs → useInvoicesList-wJvZAJpW.mjs} +9 -9
- package/dist/{useLoadInitialData-qzdnBoui.mjs → useLoadInitialData-UvfYXgbi.mjs} +1 -1
- package/dist/{usePaymentFormHold-ByUZi3A-.mjs → usePaymentFormHold-Cwdr-vyc.mjs} +2 -2
- package/dist/{usePaymentMethodAvailability-DUdrs0Ji.mjs → usePaymentMethodAvailability-35l4pWdH.mjs} +4 -4
- package/dist/{usePaymentMethods-ByaKF7mf.mjs → usePaymentMethods-De7hlLHo.mjs} +2 -2
- package/dist/{usePayments-BXABv-lF.mjs → usePayments-hWS7fnOx.mjs} +9 -9
- package/dist/{usePortal-CwR_FxTb.mjs → usePortal-DUfD6hrA.mjs} +1 -1
- package/dist/{useService-BZcbUZHI.mjs → useService-BwzIBIRp.mjs} +1 -1
- package/dist/{useTimePeriod.es-BpdiVwg8.mjs → useTimePeriod.es-BUorDLVK.mjs} +1 -1
- package/package.json +4 -4
- package/dist/PlanCustomizationEditor-D29N4HUM.mjs +0 -711
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs +0 -141
- package/dist/StepInput.vue.es-DweyzpkL.mjs +0 -200
- package/dist/index.es-CpmQmvOg.mjs +0 -633
- package/dist/paymentOutcome-BXEU5-84.mjs +0 -67
- package/dist/pricingPlanSchedule-BPrS2WRd.mjs +0 -132
- package/dist/subscription-BhxoqwcT.mjs +0 -83
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { g as a } from "./sessionReference-B8Dbmx5t.mjs";
|
|
2
|
-
import { f as C } from "./customElements-BTj4ii4f.mjs";
|
|
3
|
-
function c(t) {
|
|
4
|
-
return typeof t == "object" && t !== null && "hasError" in t;
|
|
5
|
-
}
|
|
6
|
-
function o(t) {
|
|
7
|
-
return c(t) ? {
|
|
8
|
-
...t.requestId ? { requestId: t.requestId } : {},
|
|
9
|
-
...typeof t.statusCode == "number" ? { statusCode: t.statusCode } : {},
|
|
10
|
-
...t.message ? { apiMessage: t.message } : {}
|
|
11
|
-
} : {};
|
|
12
|
-
}
|
|
13
|
-
function F({
|
|
14
|
-
reason: t,
|
|
15
|
-
gateway: u,
|
|
16
|
-
paymentAcceptorId: e,
|
|
17
|
-
paymentMethodType: n,
|
|
18
|
-
variant: i,
|
|
19
|
-
invoiceId: s,
|
|
20
|
-
customerId: r,
|
|
21
|
-
cause: f,
|
|
22
|
-
extra: E
|
|
23
|
-
}) {
|
|
24
|
-
return {
|
|
25
|
-
// Groups by what failed and where, so one merchant's broken acceptor stays one issue
|
|
26
|
-
// instead of one issue per customer who ran into it.
|
|
27
|
-
fingerprint: [t, u, ...e ? [e] : []],
|
|
28
|
-
reason: t,
|
|
29
|
-
gateway: u,
|
|
30
|
-
// Carried here as well as on the entry itself: a consumer that forwards only the context
|
|
31
|
-
// to their reporter still ends up able to search for what the customer quoted.
|
|
32
|
-
reference: a(),
|
|
33
|
-
...e ? { paymentAcceptorId: e } : {},
|
|
34
|
-
...n ? { paymentMethodType: n } : {},
|
|
35
|
-
...i ? { variant: i } : {},
|
|
36
|
-
...s ? { invoiceId: s } : {},
|
|
37
|
-
...r ? { customerId: r } : {},
|
|
38
|
-
...o(f),
|
|
39
|
-
...E
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function S(t) {
|
|
43
|
-
return { ...t, reference: a() };
|
|
44
|
-
}
|
|
45
|
-
function U(t) {
|
|
46
|
-
var e;
|
|
47
|
-
if (t.status !== "SUCCESS") return "FAILED";
|
|
48
|
-
const u = (e = t.payment) == null ? void 0 : e.result;
|
|
49
|
-
return u === void 0 || u === "AUTHORIZED" ? "SUCCEEDED" : u === "PENDING" ? "UNCONFIRMED" : "FAILED";
|
|
50
|
-
}
|
|
51
|
-
function g(t) {
|
|
52
|
-
return t.payment_status === "SUCCESS" ? "SUCCEEDED" : t.payment_status === "FAILURE" || t.payment_status === "REFUSED" ? "FAILED" : "UNCONFIRMED";
|
|
53
|
-
}
|
|
54
|
-
function l(t) {
|
|
55
|
-
return t === "succeeded" || t === "requires_capture" ? "SUCCEEDED" : t === "processing" || t === void 0 ? "UNCONFIRMED" : "FAILED";
|
|
56
|
-
}
|
|
57
|
-
function I(t) {
|
|
58
|
-
return C(t) ? t.statusCode < 400 || t.statusCode >= 500 || t.statusCode === 408 : !0;
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
S as a,
|
|
62
|
-
U as b,
|
|
63
|
-
F as c,
|
|
64
|
-
l as d,
|
|
65
|
-
g,
|
|
66
|
-
I as i
|
|
67
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
function D({
|
|
2
|
-
pricingPlanScheduleInfos: r,
|
|
3
|
-
type: i
|
|
4
|
-
}) {
|
|
5
|
-
return (r ?? []).find(
|
|
6
|
-
(t) => {
|
|
7
|
-
var n;
|
|
8
|
-
return (((n = t.pricing_plan_schedule) == null ? void 0 : n.type) ?? t.type) === i;
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
function P(r) {
|
|
13
|
-
var i;
|
|
14
|
-
return (i = S(
|
|
15
|
-
r.flatMap(
|
|
16
|
-
({ pricing_plan_schedule_infos: t }) => t ?? []
|
|
17
|
-
)
|
|
18
|
-
)) == null ? void 0 : i.id;
|
|
19
|
-
}
|
|
20
|
-
const E = (r) => {
|
|
21
|
-
var i;
|
|
22
|
-
return Date.parse(r.start_at ?? ((i = r.pricing_plan_schedule) == null ? void 0 : i.start_at));
|
|
23
|
-
};
|
|
24
|
-
function S(r) {
|
|
25
|
-
const i = Date.now();
|
|
26
|
-
return r.filter((t) => {
|
|
27
|
-
const n = t.pricing_plan_schedule, a = (n == null ? void 0 : n.type) ?? t.type, g = E(t), s = t.end_at ?? (n == null ? void 0 : n.end_at), u = s ? Date.parse(s) : void 0, y = Number.isFinite(g) && g <= i, h = u === void 0 || !Number.isFinite(u) || u > i;
|
|
28
|
-
return a === "DEFAULT" && y && h;
|
|
29
|
-
}).sort((t, n) => E(n) - E(t)).at(0);
|
|
30
|
-
}
|
|
31
|
-
function F({
|
|
32
|
-
pricingPlanScheduleInfo: r,
|
|
33
|
-
pricingId: i
|
|
34
|
-
}) {
|
|
35
|
-
var t;
|
|
36
|
-
return (((t = r.pricing_plan_version) == null ? void 0 : t.pricing_categories) ?? []).flatMap((n) => n.pricing_groups ?? []).find((n) => (n.pricings ?? []).some((a) => a.id === i));
|
|
37
|
-
}
|
|
38
|
-
function M({
|
|
39
|
-
pricingPlanScheduleInfo: r
|
|
40
|
-
}) {
|
|
41
|
-
const i = /* @__PURE__ */ new Map();
|
|
42
|
-
return (r.pricing_plan_version.pricing_categories ?? []).forEach((n) => {
|
|
43
|
-
var a;
|
|
44
|
-
(a = n.pricings) == null || a.forEach((g) => {
|
|
45
|
-
var s;
|
|
46
|
-
(s = g.items) == null || s.forEach((u) => {
|
|
47
|
-
var y, h, m;
|
|
48
|
-
(y = u.billing_period_configs) == null || y.forEach((e) => {
|
|
49
|
-
var d;
|
|
50
|
-
(d = e.configs) == null || d.forEach((o) => {
|
|
51
|
-
var p, c, _, f;
|
|
52
|
-
if (o.id) {
|
|
53
|
-
const l = (f = (_ = (c = (p = o.details) == null ? void 0 : p.bands) == null ? void 0 : c.find(
|
|
54
|
-
(A) => {
|
|
55
|
-
var b;
|
|
56
|
-
return (b = A.amount) == null ? void 0 : b.currency;
|
|
57
|
-
}
|
|
58
|
-
)) == null ? void 0 : _.amount) == null ? void 0 : f.currency;
|
|
59
|
-
i.set(o.id, {
|
|
60
|
-
...l && { currency: l },
|
|
61
|
-
billingPeriod: e.billing_period
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}), (h = u.configs) == null || h.forEach((e) => {
|
|
66
|
-
var d, o, p, c;
|
|
67
|
-
if (e.id) {
|
|
68
|
-
const _ = (c = (p = (o = (d = e.details) == null ? void 0 : d.bands) == null ? void 0 : o.find(
|
|
69
|
-
(f) => {
|
|
70
|
-
var l;
|
|
71
|
-
return (l = f.amount) == null ? void 0 : l.currency;
|
|
72
|
-
}
|
|
73
|
-
)) == null ? void 0 : p.amount) == null ? void 0 : c.currency;
|
|
74
|
-
i.set(e.id, {
|
|
75
|
-
..._ && { currency: _ }
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}), (m = u.pricing_currency_configs) == null || m.forEach((e) => {
|
|
79
|
-
var o, p;
|
|
80
|
-
const d = e.currency;
|
|
81
|
-
(o = e.billing_period_configs) == null || o.forEach((c) => {
|
|
82
|
-
var _;
|
|
83
|
-
(_ = c.configs) == null || _.forEach((f) => {
|
|
84
|
-
f.id && i.set(f.id, {
|
|
85
|
-
currency: d,
|
|
86
|
-
billingPeriod: c.billing_period
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}), (p = e.configs) == null || p.forEach((c) => {
|
|
90
|
-
c.id && i.set(c.id, { currency: d });
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
}), i;
|
|
96
|
-
}
|
|
97
|
-
const v = ({ pricing_item_config_id: r, number: i }) => ({
|
|
98
|
-
pricing_item_config_id: r,
|
|
99
|
-
number: i
|
|
100
|
-
});
|
|
101
|
-
function w({
|
|
102
|
-
enabledPricings: r,
|
|
103
|
-
seatsValues: i,
|
|
104
|
-
unitsValues: t,
|
|
105
|
-
pricingPlanScheduleInfos: n,
|
|
106
|
-
pricingCurrency: a,
|
|
107
|
-
billingPeriod: g
|
|
108
|
-
}) {
|
|
109
|
-
const s = D({
|
|
110
|
-
pricingPlanScheduleInfos: n,
|
|
111
|
-
type: "DEFAULT"
|
|
112
|
-
});
|
|
113
|
-
if (!(!s || !r && !i && !t))
|
|
114
|
-
return [
|
|
115
|
-
{
|
|
116
|
-
pricing_plan_schedule_id: s.id,
|
|
117
|
-
enabled_pricings: r,
|
|
118
|
-
seats_values: i == null ? void 0 : i.map(v),
|
|
119
|
-
...t && { units: t.map(v) },
|
|
120
|
-
...a && { pricing_currency: a },
|
|
121
|
-
...g && { billing_period: g }
|
|
122
|
-
}
|
|
123
|
-
];
|
|
124
|
-
}
|
|
125
|
-
export {
|
|
126
|
-
P as a,
|
|
127
|
-
w as b,
|
|
128
|
-
S as c,
|
|
129
|
-
F as d,
|
|
130
|
-
M as e,
|
|
131
|
-
D as g
|
|
132
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { g as c } from "./pricingPlanSchedule-BPrS2WRd.mjs";
|
|
2
|
-
function l(e) {
|
|
3
|
-
var n;
|
|
4
|
-
return (n = e == null ? void 0 : e.pricing_plan_schedule_infos) == null ? void 0 : n.at(-1);
|
|
5
|
-
}
|
|
6
|
-
function d(e) {
|
|
7
|
-
var n, t;
|
|
8
|
-
return (t = (n = l(e)) == null ? void 0 : n.pricing_plan_version) == null ? void 0 : t.pricing_plan;
|
|
9
|
-
}
|
|
10
|
-
function D({
|
|
11
|
-
subscription: e,
|
|
12
|
-
fallback: n
|
|
13
|
-
}) {
|
|
14
|
-
var t;
|
|
15
|
-
return (e == null ? void 0 : e.name) || ((t = d(e)) == null ? void 0 : t.name) || n;
|
|
16
|
-
}
|
|
17
|
-
function g(e) {
|
|
18
|
-
return (e == null ? void 0 : e.status) === "ACTIVE" && e.type === "BILLING";
|
|
19
|
-
}
|
|
20
|
-
function _(e, n) {
|
|
21
|
-
return ((e == null ? void 0 : e.inactive_periods) ?? []).filter((t) => !t.end_at && (!n || t.type === n)).reduce((t, r) => !t || new Date(r.start_at) <= new Date(t.start_at) ? r : t, void 0);
|
|
22
|
-
}
|
|
23
|
-
function s(e, n = /* @__PURE__ */ new Date()) {
|
|
24
|
-
if (!g(e)) return;
|
|
25
|
-
const t = _(e);
|
|
26
|
-
if (!((t == null ? void 0 : t.type) !== "CANCEL" || new Date(t.start_at) <= n))
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
|
-
function u(e, n) {
|
|
30
|
-
const t = [];
|
|
31
|
-
function r(a) {
|
|
32
|
-
Array.isArray(a) ? a.forEach(r) : a && typeof a == "object" && (a.object_type === "PRICING" && n.includes(a.id) && !t.some(({ id: i }) => i === a.id) && t.push(a), Object.values(a).forEach(r));
|
|
33
|
-
}
|
|
34
|
-
return r(e), t;
|
|
35
|
-
}
|
|
36
|
-
function p(e) {
|
|
37
|
-
return e.pricing_plan_schedule_infos.flatMap(
|
|
38
|
-
(n) => {
|
|
39
|
-
var t;
|
|
40
|
-
return ((t = n.pricing_plan_version.pricing_categories) == null ? void 0 : t.flatMap(
|
|
41
|
-
(r) => r.pricing_groups ?? []
|
|
42
|
-
)) ?? [];
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function m(e) {
|
|
47
|
-
var i;
|
|
48
|
-
const n = {
|
|
49
|
-
trialStartDate: void 0,
|
|
50
|
-
trialEndDate: void 0,
|
|
51
|
-
subscriptionStartDate: void 0,
|
|
52
|
-
subscriptionEndDate: void 0
|
|
53
|
-
};
|
|
54
|
-
if (!((i = e == null ? void 0 : e.pricing_plan_schedule_infos) != null && i.length))
|
|
55
|
-
return n;
|
|
56
|
-
const t = /* @__PURE__ */ new Date(), r = c({
|
|
57
|
-
type: "TRIAL",
|
|
58
|
-
pricingPlanScheduleInfos: e.pricing_plan_schedule_infos
|
|
59
|
-
});
|
|
60
|
-
if (r != null && r.start_at && (n.trialStartDate = t, r.end_at)) {
|
|
61
|
-
const f = new Date(r.end_at).getTime() - new Date(r.start_at).getTime();
|
|
62
|
-
n.trialEndDate = new Date(t.getTime() + f);
|
|
63
|
-
}
|
|
64
|
-
const a = c({
|
|
65
|
-
type: "DEFAULT",
|
|
66
|
-
pricingPlanScheduleInfos: e.pricing_plan_schedule_infos
|
|
67
|
-
});
|
|
68
|
-
if (a != null && a.start_at && (n.trialEndDate ? n.subscriptionStartDate = n.trialEndDate : n.subscriptionStartDate = t, a.end_at)) {
|
|
69
|
-
const f = new Date(a.end_at).getTime() - new Date(a.start_at).getTime();
|
|
70
|
-
n.subscriptionEndDate = new Date(n.subscriptionStartDate.getTime() + f);
|
|
71
|
-
}
|
|
72
|
-
return n;
|
|
73
|
-
}
|
|
74
|
-
export {
|
|
75
|
-
D as a,
|
|
76
|
-
p as b,
|
|
77
|
-
_ as c,
|
|
78
|
-
s as d,
|
|
79
|
-
m as e,
|
|
80
|
-
u as f,
|
|
81
|
-
d as g,
|
|
82
|
-
g as i
|
|
83
|
-
};
|