@vue-stripe/vue-stripe 5.2.1 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/index.js +1 -1
- package/dist/es/index.js +398 -341
- package/dist/types/components/VueStripePricingTable.vue.d.ts +32 -0
- package/dist/types/components/VueStripePricingTable.vue.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/types/index.d.ts +26 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/utils/injection-keys.d.ts +7 -0
- package/dist/types/utils/injection-keys.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/vue-stripe.css +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { loadStripe as
|
|
2
|
-
import { loadStripe as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
const A = Symbol("stripe"),
|
|
1
|
+
import { loadStripe as D } from "@stripe/stripe-js";
|
|
2
|
+
import { loadStripe as Tt } from "@stripe/stripe-js";
|
|
3
|
+
import { defineComponent as S, ref as m, onMounted as $, provide as B, createElementBlock as f, unref as p, openBlock as h, renderSlot as b, createElementVNode as g, toDisplayString as P, inject as _, watch as y, nextTick as J, onUnmounted as T, createCommentVNode as k, normalizeClass as x, h as M, onBeforeUnmount as Q, readonly as C, useSlots as Y, computed as Z, Fragment as N, createTextVNode as j, resolveComponent as O, withDirectives as ee, createVNode as te, vShow as re } from "vue-demi";
|
|
4
|
+
const A = Symbol("stripe"), w = Symbol("stripe-elements"), G = Symbol("vue-stripe-config");
|
|
5
5
|
class E extends Error {
|
|
6
6
|
constructor(d) {
|
|
7
7
|
super(d), this.name = "VueStripeProviderError";
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
class
|
|
10
|
+
class V extends Error {
|
|
11
11
|
constructor(d) {
|
|
12
12
|
super(d), this.name = "VueStripeElementsError";
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
class
|
|
15
|
+
class se extends Error {
|
|
16
16
|
constructor(d) {
|
|
17
17
|
super(d), this.name = "VueStripeLoadError";
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function lt(o, d) {
|
|
21
21
|
switch (o) {
|
|
22
22
|
case "provider":
|
|
23
23
|
return new E(d);
|
|
24
24
|
case "elements":
|
|
25
|
-
return new
|
|
25
|
+
return new V(d);
|
|
26
26
|
case "load":
|
|
27
|
-
return new
|
|
27
|
+
return new se(d);
|
|
28
28
|
default:
|
|
29
29
|
return new Error(d);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const W = {
|
|
33
33
|
name: "vue-stripe",
|
|
34
|
-
version: "5.
|
|
34
|
+
version: "5.3.0",
|
|
35
35
|
url: "https://vuestripe.com",
|
|
36
36
|
partner_id: "pp_partner_IqtOXpBSuz0IE2"
|
|
37
|
-
},
|
|
37
|
+
}, ne = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "vue-stripe-error"
|
|
40
|
-
},
|
|
40
|
+
}, ae = { class: "vue-stripe-error-message" }, le = {
|
|
41
41
|
key: 1,
|
|
42
42
|
class: "vue-stripe-loading"
|
|
43
|
-
},
|
|
43
|
+
}, oe = { key: 2 }, ue = /* @__PURE__ */ S({
|
|
44
44
|
__name: "VueStripeProvider",
|
|
45
45
|
props: {
|
|
46
46
|
publishableKey: {},
|
|
@@ -52,58 +52,58 @@ const D = {
|
|
|
52
52
|
},
|
|
53
53
|
emits: ["load", "error"],
|
|
54
54
|
setup(o, { emit: d }) {
|
|
55
|
-
const
|
|
55
|
+
const v = o, a = d, n = m(null), l = m(!0), e = m(null), r = v.publishableKey || v.stripeKey;
|
|
56
56
|
if (!r)
|
|
57
57
|
throw new E("publishableKey or stripeKey is required");
|
|
58
58
|
const s = {
|
|
59
59
|
publishableKey: r,
|
|
60
|
-
stripeAccount:
|
|
61
|
-
apiVersion:
|
|
62
|
-
locale:
|
|
60
|
+
stripeAccount: v.stripeAccount || v.options?.stripeAccount,
|
|
61
|
+
apiVersion: v.apiVersion || v.options?.apiVersion,
|
|
62
|
+
locale: v.locale || v.options?.locale
|
|
63
63
|
}, u = async () => {
|
|
64
64
|
try {
|
|
65
65
|
l.value = !0, e.value = null;
|
|
66
|
-
const
|
|
67
|
-
if (t && (
|
|
66
|
+
const i = {}, t = v.stripeAccount || v.options?.stripeAccount, c = v.apiVersion || v.options?.apiVersion, R = v.locale || v.options?.locale;
|
|
67
|
+
if (t && (i.stripeAccount = t), c && (i.apiVersion = c), R && (i.locale = R), n.value = await D(r, i), !n.value)
|
|
68
68
|
throw new E("Failed to initialize Stripe");
|
|
69
|
-
n.value.registerAppInfo(
|
|
70
|
-
} catch (
|
|
71
|
-
const t =
|
|
72
|
-
e.value = t, console.error("[Vue Stripe] Initialization error:", t), a("error",
|
|
69
|
+
n.value.registerAppInfo(W), a("load", n.value);
|
|
70
|
+
} catch (i) {
|
|
71
|
+
const t = i instanceof Error ? i.message : "Failed to load Stripe";
|
|
72
|
+
e.value = t, console.error("[Vue Stripe] Initialization error:", t), a("error", i instanceof Error ? i : new Error(t));
|
|
73
73
|
} finally {
|
|
74
74
|
l.value = !1;
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return $(() => {
|
|
78
78
|
u();
|
|
79
|
-
}), B(
|
|
79
|
+
}), B(G, s), B(A, {
|
|
80
80
|
stripe: n,
|
|
81
81
|
loading: l,
|
|
82
82
|
error: e
|
|
83
|
-
}), (
|
|
84
|
-
b(
|
|
85
|
-
g("div",
|
|
83
|
+
}), (i, t) => p(e) ? (h(), f("div", ne, [
|
|
84
|
+
b(i.$slots, "error", { error: p(e) }, () => [
|
|
85
|
+
g("div", ae, P(p(e)), 1)
|
|
86
86
|
], !0)
|
|
87
|
-
])) :
|
|
88
|
-
b(
|
|
87
|
+
])) : p(l) ? (h(), f("div", le, [
|
|
88
|
+
b(i.$slots, "loading", {}, () => [
|
|
89
89
|
t[0] || (t[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading Stripe... ", -1))
|
|
90
90
|
], !0)
|
|
91
|
-
])) : (h(), f("div",
|
|
92
|
-
b(
|
|
91
|
+
])) : (h(), f("div", oe, [
|
|
92
|
+
b(i.$slots, "default", {}, void 0, !0)
|
|
93
93
|
]));
|
|
94
94
|
}
|
|
95
|
-
}),
|
|
96
|
-
const
|
|
95
|
+
}), I = (o, d) => {
|
|
96
|
+
const v = o.__vccOpts || o;
|
|
97
97
|
for (const [a, n] of d)
|
|
98
|
-
|
|
99
|
-
return
|
|
100
|
-
},
|
|
98
|
+
v[a] = n;
|
|
99
|
+
return v;
|
|
100
|
+
}, ot = /* @__PURE__ */ I(ue, [["__scopeId", "data-v-573ddc51"]]), ie = {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "vue-stripe-elements-error"
|
|
103
|
-
},
|
|
103
|
+
}, ce = { class: "vue-stripe-error-message" }, ve = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vue-stripe-elements-loading"
|
|
106
|
-
},
|
|
106
|
+
}, de = { key: 2 }, pe = /* @__PURE__ */ S({
|
|
107
107
|
__name: "VueStripeElements",
|
|
108
108
|
props: {
|
|
109
109
|
clientSecret: {},
|
|
@@ -117,12 +117,12 @@ const D = {
|
|
|
117
117
|
},
|
|
118
118
|
emits: ["ready", "error"],
|
|
119
119
|
setup(o, { emit: d }) {
|
|
120
|
-
const
|
|
120
|
+
const v = d, a = o, n = _(A);
|
|
121
121
|
if (!n)
|
|
122
122
|
throw new E(
|
|
123
123
|
"VueStripeElements must be used within VueStripeProvider"
|
|
124
124
|
);
|
|
125
|
-
const l =
|
|
125
|
+
const l = m(null), e = m(!0), r = m(null), s = () => {
|
|
126
126
|
if (!n.stripe.value) {
|
|
127
127
|
r.value = "Stripe instance not available", e.value = !1;
|
|
128
128
|
return;
|
|
@@ -132,12 +132,12 @@ const D = {
|
|
|
132
132
|
const u = {
|
|
133
133
|
...a.options
|
|
134
134
|
};
|
|
135
|
-
a.clientSecret && (u.clientSecret = a.clientSecret), a.mode && (u.mode = a.mode), a.currency && (u.currency = a.currency), a.amount !== void 0 && (u.amount = a.amount), a.setupFutureUsage && (u.setupFutureUsage = a.setupFutureUsage), a.captureMethod && (u.captureMethod = a.captureMethod), a.paymentMethodTypes && (u.paymentMethodTypes = a.paymentMethodTypes), l.value = n.stripe.value.elements(u), e.value = !1,
|
|
136
|
-
|
|
135
|
+
a.clientSecret && (u.clientSecret = a.clientSecret), a.mode && (u.mode = a.mode), a.currency && (u.currency = a.currency), a.amount !== void 0 && (u.amount = a.amount), a.setupFutureUsage && (u.setupFutureUsage = a.setupFutureUsage), a.captureMethod && (u.captureMethod = a.captureMethod), a.paymentMethodTypes && (u.paymentMethodTypes = a.paymentMethodTypes), l.value = n.stripe.value.elements(u), e.value = !1, J(() => {
|
|
136
|
+
v("ready", l.value);
|
|
137
137
|
});
|
|
138
138
|
} catch (u) {
|
|
139
|
-
const
|
|
140
|
-
r.value =
|
|
139
|
+
const i = u instanceof Error ? u.message : "Failed to create elements";
|
|
140
|
+
r.value = i, e.value = !1, console.error("[Vue Stripe] Elements creation error:", i), v("error", i);
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
return y(
|
|
@@ -156,43 +156,43 @@ const D = {
|
|
|
156
156
|
() => {
|
|
157
157
|
n.stripe.value && s();
|
|
158
158
|
}
|
|
159
|
-
),
|
|
159
|
+
), $(() => {
|
|
160
160
|
n.stripe.value && !l.value && s();
|
|
161
|
-
}), B(
|
|
161
|
+
}), B(w, {
|
|
162
162
|
elements: l,
|
|
163
163
|
loading: e,
|
|
164
164
|
error: r
|
|
165
|
-
}), (u,
|
|
166
|
-
b(u.$slots, "error", { error:
|
|
167
|
-
g("div",
|
|
165
|
+
}), (u, i) => p(r) ? (h(), f("div", ie, [
|
|
166
|
+
b(u.$slots, "error", { error: p(r) }, () => [
|
|
167
|
+
g("div", ce, P(p(r)), 1)
|
|
168
168
|
], !0)
|
|
169
|
-
])) :
|
|
169
|
+
])) : p(e) ? (h(), f("div", ve, [
|
|
170
170
|
b(u.$slots, "loading", {}, () => [
|
|
171
|
-
|
|
171
|
+
i[0] || (i[0] = g("div", { class: "vue-stripe-loading-message" }, " Initializing Elements... ", -1))
|
|
172
172
|
], !0)
|
|
173
|
-
])) : (h(), f("div",
|
|
173
|
+
])) : (h(), f("div", de, [
|
|
174
174
|
b(u.$slots, "default", {}, void 0, !0)
|
|
175
175
|
]));
|
|
176
176
|
}
|
|
177
|
-
}),
|
|
177
|
+
}), ut = /* @__PURE__ */ I(pe, [["__scopeId", "data-v-c54b80f7"]]), me = { class: "vue-stripe-payment-element" }, fe = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: "vue-stripe-payment-element-error"
|
|
180
|
-
},
|
|
180
|
+
}, he = { class: "vue-stripe-error-message" }, ge = {
|
|
181
181
|
key: 1,
|
|
182
182
|
class: "vue-stripe-payment-element-loader"
|
|
183
|
-
},
|
|
183
|
+
}, be = /* @__PURE__ */ S({
|
|
184
184
|
__name: "VueStripePaymentElement",
|
|
185
185
|
props: {
|
|
186
186
|
options: {}
|
|
187
187
|
},
|
|
188
188
|
emits: ["ready", "change", "focus", "blur", "escape", "loaderstart", "loaderstop"],
|
|
189
|
-
setup(o, { expose: d, emit:
|
|
190
|
-
const a = o, n =
|
|
189
|
+
setup(o, { expose: d, emit: v }) {
|
|
190
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
191
191
|
if (!u)
|
|
192
|
-
throw new
|
|
192
|
+
throw new V(
|
|
193
193
|
"VueStripePaymentElement must be used within VueStripeElements"
|
|
194
194
|
);
|
|
195
|
-
const
|
|
195
|
+
const i = () => {
|
|
196
196
|
if (!u.elements.value) {
|
|
197
197
|
s.value = "Elements instance not available", r.value = !1;
|
|
198
198
|
return;
|
|
@@ -204,8 +204,8 @@ const D = {
|
|
|
204
204
|
try {
|
|
205
205
|
s.value = null, r.value = !0, e.value = u.elements.value.create("payment", a.options), e.value.on("ready", () => {
|
|
206
206
|
r.value = !1, n("ready", e.value);
|
|
207
|
-
}), e.value.on("change", (
|
|
208
|
-
n("change",
|
|
207
|
+
}), e.value.on("change", (c) => {
|
|
208
|
+
n("change", c);
|
|
209
209
|
}), e.value.on("focus", () => {
|
|
210
210
|
n("focus");
|
|
211
211
|
}), e.value.on("blur", () => {
|
|
@@ -220,8 +220,8 @@ const D = {
|
|
|
220
220
|
n("loaderstop");
|
|
221
221
|
}), e.value.mount(l.value);
|
|
222
222
|
} catch (t) {
|
|
223
|
-
const
|
|
224
|
-
s.value =
|
|
223
|
+
const c = t instanceof Error ? t.message : "Failed to create payment element";
|
|
224
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] Payment element creation error:", c);
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
return y(
|
|
@@ -233,54 +233,54 @@ const D = {
|
|
|
233
233
|
), y(
|
|
234
234
|
() => u.elements.value,
|
|
235
235
|
(t) => {
|
|
236
|
-
t && l.value && !e.value &&
|
|
236
|
+
t && l.value && !e.value && i();
|
|
237
237
|
},
|
|
238
238
|
{ immediate: !0 }
|
|
239
|
-
),
|
|
240
|
-
u.elements.value && l.value && !e.value &&
|
|
241
|
-
}),
|
|
239
|
+
), $(() => {
|
|
240
|
+
u.elements.value && l.value && !e.value && i();
|
|
241
|
+
}), T(() => {
|
|
242
242
|
e.value && e.value.destroy();
|
|
243
243
|
}), d({
|
|
244
244
|
element: e,
|
|
245
245
|
loading: r,
|
|
246
246
|
error: s
|
|
247
|
-
}), (t,
|
|
248
|
-
|
|
249
|
-
b(t.$slots, "error", { error:
|
|
250
|
-
g("div",
|
|
247
|
+
}), (t, c) => (h(), f("div", me, [
|
|
248
|
+
p(s) ? (h(), f("div", fe, [
|
|
249
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
250
|
+
g("div", he, P(p(s)), 1)
|
|
251
251
|
], !0)
|
|
252
252
|
])) : k("", !0),
|
|
253
253
|
g("div", {
|
|
254
254
|
ref_key: "elementRef",
|
|
255
255
|
ref: l,
|
|
256
|
-
class:
|
|
256
|
+
class: x(["vue-stripe-payment-element-mount", { "vue-stripe-payment-element-loading": p(r) }])
|
|
257
257
|
}, null, 2),
|
|
258
|
-
|
|
258
|
+
p(r) ? (h(), f("div", ge, [
|
|
259
259
|
b(t.$slots, "loading", {}, () => [
|
|
260
|
-
|
|
260
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading payment form... ", -1))
|
|
261
261
|
], !0)
|
|
262
262
|
])) : k("", !0)
|
|
263
263
|
]));
|
|
264
264
|
}
|
|
265
|
-
}),
|
|
265
|
+
}), it = /* @__PURE__ */ I(be, [["__scopeId", "data-v-2477e9df"]]), ye = { class: "vue-stripe-express-checkout-element" }, Ee = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "vue-stripe-express-checkout-element-error"
|
|
268
|
-
},
|
|
268
|
+
}, _e = { class: "vue-stripe-error-message" }, ke = {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: "vue-stripe-express-checkout-element-loader"
|
|
271
|
-
},
|
|
271
|
+
}, Se = /* @__PURE__ */ S({
|
|
272
272
|
__name: "VueStripeExpressCheckoutElement",
|
|
273
273
|
props: {
|
|
274
274
|
options: {}
|
|
275
275
|
},
|
|
276
276
|
emits: ["ready", "click", "confirm", "cancel", "shippingaddresschange", "shippingratechange"],
|
|
277
|
-
setup(o, { expose: d, emit:
|
|
278
|
-
const a = o, n =
|
|
277
|
+
setup(o, { expose: d, emit: v }) {
|
|
278
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
279
279
|
if (!u)
|
|
280
|
-
throw new
|
|
280
|
+
throw new V(
|
|
281
281
|
"VueStripeExpressCheckoutElement must be used within VueStripeElements"
|
|
282
282
|
);
|
|
283
|
-
const
|
|
283
|
+
const i = () => {
|
|
284
284
|
if (!u.elements.value) {
|
|
285
285
|
s.value = "Elements instance not available", r.value = !1;
|
|
286
286
|
return;
|
|
@@ -304,8 +304,8 @@ const D = {
|
|
|
304
304
|
n("shippingratechange", t);
|
|
305
305
|
}), e.value.mount(l.value);
|
|
306
306
|
} catch (t) {
|
|
307
|
-
const
|
|
308
|
-
s.value =
|
|
307
|
+
const c = t instanceof Error ? t.message : "Failed to create express checkout element";
|
|
308
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] Express checkout element creation error:", c);
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
311
|
return y(
|
|
@@ -317,54 +317,54 @@ const D = {
|
|
|
317
317
|
), y(
|
|
318
318
|
() => u.elements.value,
|
|
319
319
|
(t) => {
|
|
320
|
-
t && l.value && !e.value &&
|
|
320
|
+
t && l.value && !e.value && i();
|
|
321
321
|
},
|
|
322
322
|
{ immediate: !0 }
|
|
323
|
-
),
|
|
324
|
-
u.elements.value && l.value && !e.value &&
|
|
325
|
-
}),
|
|
323
|
+
), $(() => {
|
|
324
|
+
u.elements.value && l.value && !e.value && i();
|
|
325
|
+
}), T(() => {
|
|
326
326
|
e.value && e.value.destroy();
|
|
327
327
|
}), d({
|
|
328
328
|
element: e,
|
|
329
329
|
loading: r,
|
|
330
330
|
error: s
|
|
331
|
-
}), (t,
|
|
332
|
-
|
|
333
|
-
b(t.$slots, "error", { error:
|
|
334
|
-
g("div",
|
|
331
|
+
}), (t, c) => (h(), f("div", ye, [
|
|
332
|
+
p(s) ? (h(), f("div", Ee, [
|
|
333
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
334
|
+
g("div", _e, P(p(s)), 1)
|
|
335
335
|
], !0)
|
|
336
336
|
])) : k("", !0),
|
|
337
337
|
g("div", {
|
|
338
338
|
ref_key: "elementRef",
|
|
339
339
|
ref: l,
|
|
340
|
-
class:
|
|
340
|
+
class: x(["vue-stripe-express-checkout-element-mount", { "vue-stripe-express-checkout-element-loading": p(r) }])
|
|
341
341
|
}, null, 2),
|
|
342
|
-
|
|
342
|
+
p(r) ? (h(), f("div", ke, [
|
|
343
343
|
b(t.$slots, "loading", {}, () => [
|
|
344
|
-
|
|
344
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading express checkout... ", -1))
|
|
345
345
|
], !0)
|
|
346
346
|
])) : k("", !0)
|
|
347
347
|
]));
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
349
|
+
}), ct = /* @__PURE__ */ I(Se, [["__scopeId", "data-v-20294cda"]]), we = { class: "vue-stripe-card-element" }, Ve = {
|
|
350
350
|
key: 0,
|
|
351
351
|
class: "vue-stripe-card-element-error"
|
|
352
|
-
},
|
|
352
|
+
}, $e = { class: "vue-stripe-error-message" }, Ie = {
|
|
353
353
|
key: 1,
|
|
354
354
|
class: "vue-stripe-card-element-loader"
|
|
355
|
-
},
|
|
355
|
+
}, Ce = /* @__PURE__ */ S({
|
|
356
356
|
__name: "VueStripeCardElement",
|
|
357
357
|
props: {
|
|
358
358
|
options: {}
|
|
359
359
|
},
|
|
360
360
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
361
|
-
setup(o, { expose: d, emit:
|
|
362
|
-
const a = o, n =
|
|
361
|
+
setup(o, { expose: d, emit: v }) {
|
|
362
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
363
363
|
if (!u)
|
|
364
|
-
throw new
|
|
364
|
+
throw new V(
|
|
365
365
|
"VueStripeCardElement must be used within VueStripeElements"
|
|
366
366
|
);
|
|
367
|
-
const
|
|
367
|
+
const i = () => {
|
|
368
368
|
if (!u.elements.value) {
|
|
369
369
|
s.value = "Elements instance not available", r.value = !1;
|
|
370
370
|
return;
|
|
@@ -386,8 +386,8 @@ const D = {
|
|
|
386
386
|
n("escape");
|
|
387
387
|
}), e.value.mount(l.value);
|
|
388
388
|
} catch (t) {
|
|
389
|
-
const
|
|
390
|
-
s.value =
|
|
389
|
+
const c = t instanceof Error ? t.message : "Failed to create card element";
|
|
390
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] Card element creation error:", c);
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
393
|
return y(
|
|
@@ -399,12 +399,12 @@ const D = {
|
|
|
399
399
|
), y(
|
|
400
400
|
() => u.elements.value,
|
|
401
401
|
(t) => {
|
|
402
|
-
t && l.value && !e.value &&
|
|
402
|
+
t && l.value && !e.value && i();
|
|
403
403
|
},
|
|
404
404
|
{ immediate: !0 }
|
|
405
|
-
),
|
|
406
|
-
u.elements.value && l.value && !e.value &&
|
|
407
|
-
}),
|
|
405
|
+
), $(() => {
|
|
406
|
+
u.elements.value && l.value && !e.value && i();
|
|
407
|
+
}), T(() => {
|
|
408
408
|
e.value && e.value.destroy();
|
|
409
409
|
}), d({
|
|
410
410
|
element: e,
|
|
@@ -413,27 +413,27 @@ const D = {
|
|
|
413
413
|
focus: () => e.value?.focus(),
|
|
414
414
|
blur: () => e.value?.blur(),
|
|
415
415
|
clear: () => e.value?.clear()
|
|
416
|
-
}), (t,
|
|
417
|
-
|
|
418
|
-
b(t.$slots, "error", { error:
|
|
419
|
-
g("div",
|
|
416
|
+
}), (t, c) => (h(), f("div", we, [
|
|
417
|
+
p(s) ? (h(), f("div", Ve, [
|
|
418
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
419
|
+
g("div", $e, P(p(s)), 1)
|
|
420
420
|
], !0)
|
|
421
421
|
])) : k("", !0),
|
|
422
422
|
g("div", {
|
|
423
423
|
ref_key: "elementRef",
|
|
424
424
|
ref: l,
|
|
425
|
-
class:
|
|
425
|
+
class: x(["vue-stripe-card-element-mount", { "vue-stripe-card-element-loading": p(r) }])
|
|
426
426
|
}, null, 2),
|
|
427
|
-
|
|
427
|
+
p(r) ? (h(), f("div", Ie, [
|
|
428
428
|
b(t.$slots, "loading", {}, () => [
|
|
429
|
-
|
|
429
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading card form... ", -1))
|
|
430
430
|
], !0)
|
|
431
431
|
])) : k("", !0)
|
|
432
432
|
]));
|
|
433
433
|
}
|
|
434
|
-
}),
|
|
434
|
+
}), vt = /* @__PURE__ */ I(Ce, [["__scopeId", "data-v-a41a7ee5"]]);
|
|
435
435
|
function L({ elementType: o, componentName: d }) {
|
|
436
|
-
return
|
|
436
|
+
return S({
|
|
437
437
|
name: d,
|
|
438
438
|
props: {
|
|
439
439
|
options: {
|
|
@@ -442,13 +442,13 @@ function L({ elementType: o, componentName: d }) {
|
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
444
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
445
|
-
setup(
|
|
446
|
-
const l =
|
|
445
|
+
setup(v, { emit: a, expose: n }) {
|
|
446
|
+
const l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
447
447
|
if (!u)
|
|
448
|
-
throw new
|
|
448
|
+
throw new V(
|
|
449
449
|
`${d} must be used within VueStripeElements`
|
|
450
450
|
);
|
|
451
|
-
const
|
|
451
|
+
const i = () => {
|
|
452
452
|
if (!u.elements.value) {
|
|
453
453
|
s.value = "Elements instance not available", r.value = !1;
|
|
454
454
|
return;
|
|
@@ -459,12 +459,12 @@ function L({ elementType: o, componentName: d }) {
|
|
|
459
459
|
}
|
|
460
460
|
try {
|
|
461
461
|
s.value = null, r.value = !0;
|
|
462
|
-
const t = u.elements.value.create(o,
|
|
462
|
+
const t = u.elements.value.create(o, v.options);
|
|
463
463
|
e.value = t, t.on("ready", () => {
|
|
464
464
|
r.value = !1, a("ready", e.value);
|
|
465
|
-
}), t.on("change", (
|
|
466
|
-
const
|
|
467
|
-
|
|
465
|
+
}), t.on("change", (c) => {
|
|
466
|
+
const R = c;
|
|
467
|
+
R.error ? s.value = R.error.message : s.value = null, a("change", R);
|
|
468
468
|
}), t.on("focus", () => {
|
|
469
469
|
a("focus");
|
|
470
470
|
}), t.on("blur", () => {
|
|
@@ -473,12 +473,12 @@ function L({ elementType: o, componentName: d }) {
|
|
|
473
473
|
a("escape");
|
|
474
474
|
}), t.mount(l.value);
|
|
475
475
|
} catch (t) {
|
|
476
|
-
const
|
|
477
|
-
s.value =
|
|
476
|
+
const c = t instanceof Error ? t.message : `Failed to create ${o} element`;
|
|
477
|
+
s.value = c, r.value = !1, console.error(`[Vue Stripe] ${d} creation error:`, c);
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
return y(
|
|
481
|
-
() =>
|
|
481
|
+
() => v.options,
|
|
482
482
|
(t) => {
|
|
483
483
|
e.value?.update && t && e.value.update(t);
|
|
484
484
|
},
|
|
@@ -486,12 +486,12 @@ function L({ elementType: o, componentName: d }) {
|
|
|
486
486
|
), y(
|
|
487
487
|
() => u.elements.value,
|
|
488
488
|
(t) => {
|
|
489
|
-
t && l.value && !e.value &&
|
|
489
|
+
t && l.value && !e.value && i();
|
|
490
490
|
},
|
|
491
491
|
{ immediate: !0 }
|
|
492
|
-
),
|
|
493
|
-
u.elements.value && l.value && !e.value &&
|
|
494
|
-
}),
|
|
492
|
+
), $(() => {
|
|
493
|
+
u.elements.value && l.value && !e.value && i();
|
|
494
|
+
}), T(() => {
|
|
495
495
|
e.value && e.value.destroy();
|
|
496
496
|
}), n({
|
|
497
497
|
element: e,
|
|
@@ -527,69 +527,69 @@ function L({ elementType: o, componentName: d }) {
|
|
|
527
527
|
}
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const dt = L({
|
|
531
531
|
elementType: "cardNumber",
|
|
532
532
|
componentName: "VueStripeCardNumberElement"
|
|
533
|
-
}),
|
|
533
|
+
}), pt = L({
|
|
534
534
|
elementType: "cardExpiry",
|
|
535
535
|
componentName: "VueStripeCardExpiryElement"
|
|
536
|
-
}),
|
|
536
|
+
}), mt = L({
|
|
537
537
|
elementType: "cardCvc",
|
|
538
538
|
componentName: "VueStripeCardCvcElement"
|
|
539
|
-
}),
|
|
539
|
+
}), Pe = /* @__PURE__ */ S({
|
|
540
540
|
__name: "VueStripeLinkAuthenticationElement",
|
|
541
541
|
props: {
|
|
542
542
|
options: {}
|
|
543
543
|
},
|
|
544
544
|
emits: ["ready", "change"],
|
|
545
|
-
setup(o, { expose: d, emit:
|
|
546
|
-
const a = o, n =
|
|
545
|
+
setup(o, { expose: d, emit: v }) {
|
|
546
|
+
const a = o, n = v, l = _(w);
|
|
547
547
|
if (!l)
|
|
548
|
-
throw new
|
|
548
|
+
throw new V(
|
|
549
549
|
"VueStripeLinkAuthenticationElement must be used within VueStripeElements"
|
|
550
550
|
);
|
|
551
|
-
const e =
|
|
551
|
+
const e = m(), r = m(null), s = () => {
|
|
552
552
|
if (!(!l.elements?.value || !e.value))
|
|
553
553
|
try {
|
|
554
554
|
r.value = l.elements?.value.create("linkAuthentication", a.options), r.value.mount(e.value), r.value.on("ready", () => {
|
|
555
555
|
r.value && n("ready", r.value);
|
|
556
|
-
}), r.value.on("change", (
|
|
557
|
-
n("change",
|
|
556
|
+
}), r.value.on("change", (i) => {
|
|
557
|
+
n("change", i);
|
|
558
558
|
});
|
|
559
|
-
} catch (
|
|
560
|
-
console.error("[Vue Stripe] Link authentication element creation error:",
|
|
559
|
+
} catch (i) {
|
|
560
|
+
console.error("[Vue Stripe] Link authentication element creation error:", i);
|
|
561
561
|
}
|
|
562
562
|
}, u = () => {
|
|
563
563
|
r.value && (r.value.unmount(), r.value.destroy(), r.value = null);
|
|
564
564
|
};
|
|
565
565
|
return y(
|
|
566
566
|
() => l.elements?.value,
|
|
567
|
-
(
|
|
568
|
-
|
|
567
|
+
(i) => {
|
|
568
|
+
i && e.value && !r.value && s();
|
|
569
569
|
},
|
|
570
570
|
{ immediate: !0 }
|
|
571
571
|
), y(
|
|
572
572
|
() => a.options,
|
|
573
|
-
(
|
|
574
|
-
r.value &&
|
|
573
|
+
(i) => {
|
|
574
|
+
r.value && i && typeof r.value.update == "function" && r.value.update(i);
|
|
575
575
|
},
|
|
576
576
|
{ deep: !0 }
|
|
577
|
-
),
|
|
577
|
+
), $(() => {
|
|
578
578
|
l.elements?.value && e.value && s();
|
|
579
|
-
}),
|
|
579
|
+
}), T(() => {
|
|
580
580
|
u();
|
|
581
581
|
}), d({
|
|
582
582
|
element: r,
|
|
583
583
|
focus: () => r.value?.focus(),
|
|
584
584
|
blur: () => r.value?.blur(),
|
|
585
585
|
clear: () => r.value?.clear()
|
|
586
|
-
}), (
|
|
586
|
+
}), (i, t) => (h(), f("div", {
|
|
587
587
|
ref_key: "elementRef",
|
|
588
588
|
ref: e,
|
|
589
589
|
class: "vue-stripe-link-auth-element"
|
|
590
590
|
}, null, 512));
|
|
591
591
|
}
|
|
592
|
-
}),
|
|
592
|
+
}), ft = /* @__PURE__ */ I(Pe, [["__scopeId", "data-v-b79076eb"]]), Te = S({
|
|
593
593
|
name: "VueStripeAddressElement",
|
|
594
594
|
props: {
|
|
595
595
|
options: {
|
|
@@ -600,10 +600,10 @@ const st = L({
|
|
|
600
600
|
}
|
|
601
601
|
},
|
|
602
602
|
emits: ["ready", "change", "blur", "focus", "escape", "loadError"],
|
|
603
|
-
setup(o, { emit: d, expose:
|
|
604
|
-
const a =
|
|
603
|
+
setup(o, { emit: d, expose: v }) {
|
|
604
|
+
const a = m(), n = m(null), l = _(w);
|
|
605
605
|
if (!l)
|
|
606
|
-
throw new
|
|
606
|
+
throw new V("VueStripeAddressElement must be used within VueStripeElements");
|
|
607
607
|
const e = () => {
|
|
608
608
|
d("ready");
|
|
609
609
|
}, r = (U) => {
|
|
@@ -612,67 +612,67 @@ const st = L({
|
|
|
612
612
|
d("blur");
|
|
613
613
|
}, u = () => {
|
|
614
614
|
d("focus");
|
|
615
|
-
},
|
|
615
|
+
}, i = () => {
|
|
616
616
|
d("escape");
|
|
617
617
|
}, t = (U) => {
|
|
618
618
|
d("loadError", U);
|
|
619
|
-
},
|
|
620
|
-
!l.elements.value || !a.value || (n.value = l.elements.value.create("address", o.options), n.value.mount(a.value), n.value.on("ready", e), n.value.on("change", r), n.value.on("blur", s), n.value.on("focus", u), n.value.on("escape",
|
|
621
|
-
},
|
|
619
|
+
}, c = () => {
|
|
620
|
+
!l.elements.value || !a.value || (n.value = l.elements.value.create("address", o.options), n.value.mount(a.value), n.value.on("ready", e), n.value.on("change", r), n.value.on("blur", s), n.value.on("focus", u), n.value.on("escape", i), n.value.on("loaderror", t));
|
|
621
|
+
}, R = () => {
|
|
622
622
|
n.value && n.value.update(o.options);
|
|
623
|
-
},
|
|
624
|
-
n.value && (n.value.off("ready", e), n.value.off("change", r), n.value.off("blur", s), n.value.off("focus", u), n.value.off("escape",
|
|
623
|
+
}, H = () => {
|
|
624
|
+
n.value && (n.value.off("ready", e), n.value.off("change", r), n.value.off("blur", s), n.value.off("focus", u), n.value.off("escape", i), n.value.off("loaderror", t), n.value.destroy(), n.value = null);
|
|
625
625
|
}, F = async () => {
|
|
626
626
|
if (!n.value)
|
|
627
|
-
throw new
|
|
627
|
+
throw new V("Address element not mounted");
|
|
628
628
|
return n.value.getValue();
|
|
629
629
|
}, z = () => {
|
|
630
630
|
n.value?.focus();
|
|
631
|
-
},
|
|
631
|
+
}, K = () => {
|
|
632
632
|
n.value?.clear();
|
|
633
633
|
};
|
|
634
|
-
return
|
|
635
|
-
|
|
636
|
-
}),
|
|
637
|
-
|
|
634
|
+
return $(() => {
|
|
635
|
+
c();
|
|
636
|
+
}), Q(() => {
|
|
637
|
+
H();
|
|
638
638
|
}), y(() => o.options, () => {
|
|
639
|
-
|
|
640
|
-
}, { deep: !0 }),
|
|
639
|
+
R();
|
|
640
|
+
}, { deep: !0 }), v({
|
|
641
641
|
element: n,
|
|
642
642
|
getValue: F,
|
|
643
643
|
focus: z,
|
|
644
|
-
clear:
|
|
644
|
+
clear: K
|
|
645
645
|
}), {
|
|
646
646
|
addressRef: a,
|
|
647
647
|
element: n,
|
|
648
648
|
getValue: F,
|
|
649
649
|
focus: z,
|
|
650
|
-
clear:
|
|
650
|
+
clear: K
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
}),
|
|
654
|
-
function
|
|
655
|
-
return h(), f("div",
|
|
653
|
+
}), Re = { ref: "addressRef" };
|
|
654
|
+
function xe(o, d, v, a, n, l) {
|
|
655
|
+
return h(), f("div", Re, null, 512);
|
|
656
656
|
}
|
|
657
|
-
const
|
|
657
|
+
const ht = /* @__PURE__ */ I(Te, [["render", xe]]), Me = { class: "vue-stripe-iban-element" }, Ae = {
|
|
658
658
|
key: 0,
|
|
659
659
|
class: "vue-stripe-iban-element-error"
|
|
660
|
-
},
|
|
660
|
+
}, Ue = { class: "vue-stripe-error-message" }, Be = {
|
|
661
661
|
key: 1,
|
|
662
662
|
class: "vue-stripe-iban-element-loader"
|
|
663
|
-
},
|
|
663
|
+
}, Le = /* @__PURE__ */ S({
|
|
664
664
|
__name: "VueStripeIbanElement",
|
|
665
665
|
props: {
|
|
666
666
|
options: {}
|
|
667
667
|
},
|
|
668
668
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
669
|
-
setup(o, { expose: d, emit:
|
|
670
|
-
const a = o, n =
|
|
669
|
+
setup(o, { expose: d, emit: v }) {
|
|
670
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
671
671
|
if (!u)
|
|
672
|
-
throw new
|
|
672
|
+
throw new V(
|
|
673
673
|
"VueStripeIbanElement must be used within VueStripeElements"
|
|
674
674
|
);
|
|
675
|
-
const
|
|
675
|
+
const i = () => {
|
|
676
676
|
if (!u.elements.value) {
|
|
677
677
|
s.value = "Elements instance not available", r.value = !1;
|
|
678
678
|
return;
|
|
@@ -689,8 +689,8 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
689
689
|
};
|
|
690
690
|
e.value = u.elements.value.create("iban", t), e.value.on("ready", () => {
|
|
691
691
|
r.value = !1, n("ready", e.value);
|
|
692
|
-
}), e.value.on("change", (
|
|
693
|
-
|
|
692
|
+
}), e.value.on("change", (c) => {
|
|
693
|
+
c.error ? s.value = c.error.message : s.value = null, n("change", c);
|
|
694
694
|
}), e.value.on("focus", () => {
|
|
695
695
|
n("focus");
|
|
696
696
|
}), e.value.on("blur", () => {
|
|
@@ -699,8 +699,8 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
699
699
|
n("escape");
|
|
700
700
|
}), e.value.mount(l.value);
|
|
701
701
|
} catch (t) {
|
|
702
|
-
const
|
|
703
|
-
s.value =
|
|
702
|
+
const c = t instanceof Error ? t.message : "Failed to create IBAN element";
|
|
703
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] IBAN element creation error:", c);
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
return y(
|
|
@@ -712,12 +712,12 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
712
712
|
), y(
|
|
713
713
|
() => u.elements.value,
|
|
714
714
|
(t) => {
|
|
715
|
-
t && l.value && !e.value &&
|
|
715
|
+
t && l.value && !e.value && i();
|
|
716
716
|
},
|
|
717
717
|
{ immediate: !0 }
|
|
718
|
-
),
|
|
719
|
-
u.elements.value && l.value && !e.value &&
|
|
720
|
-
}),
|
|
718
|
+
), $(() => {
|
|
719
|
+
u.elements.value && l.value && !e.value && i();
|
|
720
|
+
}), T(() => {
|
|
721
721
|
e.value && e.value.destroy();
|
|
722
722
|
}), d({
|
|
723
723
|
element: e,
|
|
@@ -726,43 +726,43 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
726
726
|
focus: () => e.value?.focus(),
|
|
727
727
|
blur: () => e.value?.blur(),
|
|
728
728
|
clear: () => e.value?.clear()
|
|
729
|
-
}), (t,
|
|
730
|
-
|
|
731
|
-
b(t.$slots, "error", { error:
|
|
732
|
-
g("div",
|
|
729
|
+
}), (t, c) => (h(), f("div", Me, [
|
|
730
|
+
p(s) ? (h(), f("div", Ae, [
|
|
731
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
732
|
+
g("div", Ue, P(p(s)), 1)
|
|
733
733
|
], !0)
|
|
734
734
|
])) : k("", !0),
|
|
735
735
|
g("div", {
|
|
736
736
|
ref_key: "elementRef",
|
|
737
737
|
ref: l,
|
|
738
|
-
class:
|
|
738
|
+
class: x(["vue-stripe-iban-element-mount", { "vue-stripe-iban-element-loading": p(r) }])
|
|
739
739
|
}, null, 2),
|
|
740
|
-
|
|
740
|
+
p(r) ? (h(), f("div", Be, [
|
|
741
741
|
b(t.$slots, "loading", {}, () => [
|
|
742
|
-
|
|
742
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading IBAN form... ", -1))
|
|
743
743
|
], !0)
|
|
744
744
|
])) : k("", !0)
|
|
745
745
|
]));
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), gt = /* @__PURE__ */ I(Le, [["__scopeId", "data-v-f8ffb457"]]), Fe = { class: "vue-stripe-ideal-bank-element" }, ze = {
|
|
748
748
|
key: 0,
|
|
749
749
|
class: "vue-stripe-ideal-bank-element-error"
|
|
750
|
-
},
|
|
750
|
+
}, Ke = { class: "vue-stripe-error-message" }, Ne = {
|
|
751
751
|
key: 1,
|
|
752
752
|
class: "vue-stripe-ideal-bank-element-loader"
|
|
753
|
-
},
|
|
753
|
+
}, je = /* @__PURE__ */ S({
|
|
754
754
|
__name: "VueStripeIdealBankElement",
|
|
755
755
|
props: {
|
|
756
756
|
options: {}
|
|
757
757
|
},
|
|
758
758
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
759
|
-
setup(o, { expose: d, emit:
|
|
760
|
-
const a = o, n =
|
|
759
|
+
setup(o, { expose: d, emit: v }) {
|
|
760
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
761
761
|
if (!u)
|
|
762
|
-
throw new
|
|
762
|
+
throw new V(
|
|
763
763
|
"VueStripeIdealBankElement must be used within VueStripeElements"
|
|
764
764
|
);
|
|
765
|
-
const
|
|
765
|
+
const i = () => {
|
|
766
766
|
if (!u.elements.value) {
|
|
767
767
|
s.value = "Elements instance not available", r.value = !1;
|
|
768
768
|
return;
|
|
@@ -784,8 +784,8 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
784
784
|
n("escape");
|
|
785
785
|
}), e.value.mount(l.value);
|
|
786
786
|
} catch (t) {
|
|
787
|
-
const
|
|
788
|
-
s.value =
|
|
787
|
+
const c = t instanceof Error ? t.message : "Failed to create iDEAL bank element";
|
|
788
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] iDEAL bank element creation error:", c);
|
|
789
789
|
}
|
|
790
790
|
};
|
|
791
791
|
return y(
|
|
@@ -797,12 +797,12 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
797
797
|
), y(
|
|
798
798
|
() => u.elements.value,
|
|
799
799
|
(t) => {
|
|
800
|
-
t && l.value && !e.value &&
|
|
800
|
+
t && l.value && !e.value && i();
|
|
801
801
|
},
|
|
802
802
|
{ immediate: !0 }
|
|
803
|
-
),
|
|
804
|
-
u.elements.value && l.value && !e.value &&
|
|
805
|
-
}),
|
|
803
|
+
), $(() => {
|
|
804
|
+
u.elements.value && l.value && !e.value && i();
|
|
805
|
+
}), T(() => {
|
|
806
806
|
e.value && e.value.destroy();
|
|
807
807
|
}), d({
|
|
808
808
|
element: e,
|
|
@@ -811,43 +811,43 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
811
811
|
focus: () => e.value?.focus(),
|
|
812
812
|
blur: () => e.value?.blur(),
|
|
813
813
|
clear: () => e.value?.clear()
|
|
814
|
-
}), (t,
|
|
815
|
-
|
|
816
|
-
b(t.$slots, "error", { error:
|
|
817
|
-
g("div",
|
|
814
|
+
}), (t, c) => (h(), f("div", Fe, [
|
|
815
|
+
p(s) ? (h(), f("div", ze, [
|
|
816
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
817
|
+
g("div", Ke, P(p(s)), 1)
|
|
818
818
|
], !0)
|
|
819
819
|
])) : k("", !0),
|
|
820
820
|
g("div", {
|
|
821
821
|
ref_key: "elementRef",
|
|
822
822
|
ref: l,
|
|
823
|
-
class:
|
|
823
|
+
class: x(["vue-stripe-ideal-bank-element-mount", { "vue-stripe-ideal-bank-element-loading": p(r) }])
|
|
824
824
|
}, null, 2),
|
|
825
|
-
|
|
825
|
+
p(r) ? (h(), f("div", Ne, [
|
|
826
826
|
b(t.$slots, "loading", {}, () => [
|
|
827
|
-
|
|
827
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading iDEAL bank selector... ", -1))
|
|
828
828
|
], !0)
|
|
829
829
|
])) : k("", !0)
|
|
830
830
|
]));
|
|
831
831
|
}
|
|
832
|
-
}),
|
|
832
|
+
}), bt = /* @__PURE__ */ I(je, [["__scopeId", "data-v-3d7f7e08"]]), qe = { class: "vue-stripe-p24-bank-element" }, De = {
|
|
833
833
|
key: 0,
|
|
834
834
|
class: "vue-stripe-p24-bank-element-error"
|
|
835
|
-
},
|
|
835
|
+
}, Ge = { class: "vue-stripe-error-message" }, We = {
|
|
836
836
|
key: 1,
|
|
837
837
|
class: "vue-stripe-p24-bank-element-loader"
|
|
838
|
-
},
|
|
838
|
+
}, Xe = /* @__PURE__ */ S({
|
|
839
839
|
__name: "VueStripeP24BankElement",
|
|
840
840
|
props: {
|
|
841
841
|
options: {}
|
|
842
842
|
},
|
|
843
843
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
844
|
-
setup(o, { expose: d, emit:
|
|
845
|
-
const a = o, n =
|
|
844
|
+
setup(o, { expose: d, emit: v }) {
|
|
845
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
846
846
|
if (!u)
|
|
847
|
-
throw new
|
|
847
|
+
throw new V(
|
|
848
848
|
"VueStripeP24BankElement must be used within VueStripeElements"
|
|
849
849
|
);
|
|
850
|
-
const
|
|
850
|
+
const i = () => {
|
|
851
851
|
if (!u.elements.value) {
|
|
852
852
|
s.value = "Elements instance not available", r.value = !1;
|
|
853
853
|
return;
|
|
@@ -869,8 +869,8 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
869
869
|
n("escape");
|
|
870
870
|
}), e.value.mount(l.value);
|
|
871
871
|
} catch (t) {
|
|
872
|
-
const
|
|
873
|
-
s.value =
|
|
872
|
+
const c = t instanceof Error ? t.message : "Failed to create P24 bank element";
|
|
873
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] P24 bank element creation error:", c);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
return y(
|
|
@@ -882,12 +882,12 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
882
882
|
), y(
|
|
883
883
|
() => u.elements.value,
|
|
884
884
|
(t) => {
|
|
885
|
-
t && l.value && !e.value &&
|
|
885
|
+
t && l.value && !e.value && i();
|
|
886
886
|
},
|
|
887
887
|
{ immediate: !0 }
|
|
888
|
-
),
|
|
889
|
-
u.elements.value && l.value && !e.value &&
|
|
890
|
-
}),
|
|
888
|
+
), $(() => {
|
|
889
|
+
u.elements.value && l.value && !e.value && i();
|
|
890
|
+
}), T(() => {
|
|
891
891
|
e.value && e.value.destroy();
|
|
892
892
|
}), d({
|
|
893
893
|
element: e,
|
|
@@ -896,43 +896,43 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
896
896
|
focus: () => e.value?.focus(),
|
|
897
897
|
blur: () => e.value?.blur(),
|
|
898
898
|
clear: () => e.value?.clear()
|
|
899
|
-
}), (t,
|
|
900
|
-
|
|
901
|
-
b(t.$slots, "error", { error:
|
|
902
|
-
g("div",
|
|
899
|
+
}), (t, c) => (h(), f("div", qe, [
|
|
900
|
+
p(s) ? (h(), f("div", De, [
|
|
901
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
902
|
+
g("div", Ge, P(p(s)), 1)
|
|
903
903
|
], !0)
|
|
904
904
|
])) : k("", !0),
|
|
905
905
|
g("div", {
|
|
906
906
|
ref_key: "elementRef",
|
|
907
907
|
ref: l,
|
|
908
|
-
class:
|
|
908
|
+
class: x(["vue-stripe-p24-bank-element-mount", { "vue-stripe-p24-bank-element-loading": p(r) }])
|
|
909
909
|
}, null, 2),
|
|
910
|
-
|
|
910
|
+
p(r) ? (h(), f("div", We, [
|
|
911
911
|
b(t.$slots, "loading", {}, () => [
|
|
912
|
-
|
|
912
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading Przelewy24 bank selector... ", -1))
|
|
913
913
|
], !0)
|
|
914
914
|
])) : k("", !0)
|
|
915
915
|
]));
|
|
916
916
|
}
|
|
917
|
-
}),
|
|
917
|
+
}), yt = /* @__PURE__ */ I(Xe, [["__scopeId", "data-v-29dc009e"]]), He = { class: "vue-stripe-eps-bank-element" }, Je = {
|
|
918
918
|
key: 0,
|
|
919
919
|
class: "vue-stripe-eps-bank-element-error"
|
|
920
|
-
},
|
|
920
|
+
}, Qe = { class: "vue-stripe-error-message" }, Ye = {
|
|
921
921
|
key: 1,
|
|
922
922
|
class: "vue-stripe-eps-bank-element-loader"
|
|
923
|
-
},
|
|
923
|
+
}, Ze = /* @__PURE__ */ S({
|
|
924
924
|
__name: "VueStripeEpsBankElement",
|
|
925
925
|
props: {
|
|
926
926
|
options: {}
|
|
927
927
|
},
|
|
928
928
|
emits: ["ready", "change", "focus", "blur", "escape"],
|
|
929
|
-
setup(o, { expose: d, emit:
|
|
930
|
-
const a = o, n =
|
|
929
|
+
setup(o, { expose: d, emit: v }) {
|
|
930
|
+
const a = o, n = v, l = m(), e = m(null), r = m(!0), s = m(null), u = _(w);
|
|
931
931
|
if (!u)
|
|
932
|
-
throw new
|
|
932
|
+
throw new V(
|
|
933
933
|
"VueStripeEpsBankElement must be used within VueStripeElements"
|
|
934
934
|
);
|
|
935
|
-
const
|
|
935
|
+
const i = () => {
|
|
936
936
|
if (!u.elements.value) {
|
|
937
937
|
s.value = "Elements instance not available", r.value = !1;
|
|
938
938
|
return;
|
|
@@ -954,8 +954,8 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
954
954
|
n("escape");
|
|
955
955
|
}), e.value.mount(l.value);
|
|
956
956
|
} catch (t) {
|
|
957
|
-
const
|
|
958
|
-
s.value =
|
|
957
|
+
const c = t instanceof Error ? t.message : "Failed to create EPS bank element";
|
|
958
|
+
s.value = c, r.value = !1, console.error("[Vue Stripe] EPS bank element creation error:", c);
|
|
959
959
|
}
|
|
960
960
|
};
|
|
961
961
|
return y(
|
|
@@ -967,12 +967,12 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
967
967
|
), y(
|
|
968
968
|
() => u.elements.value,
|
|
969
969
|
(t) => {
|
|
970
|
-
t && l.value && !e.value &&
|
|
970
|
+
t && l.value && !e.value && i();
|
|
971
971
|
},
|
|
972
972
|
{ immediate: !0 }
|
|
973
|
-
),
|
|
974
|
-
u.elements.value && l.value && !e.value &&
|
|
975
|
-
}),
|
|
973
|
+
), $(() => {
|
|
974
|
+
u.elements.value && l.value && !e.value && i();
|
|
975
|
+
}), T(() => {
|
|
976
976
|
e.value && e.value.destroy();
|
|
977
977
|
}), d({
|
|
978
978
|
element: e,
|
|
@@ -981,40 +981,40 @@ const ot = /* @__PURE__ */ C(we, [["render", $e]]), Ie = { class: "vue-stripe-ib
|
|
|
981
981
|
focus: () => e.value?.focus(),
|
|
982
982
|
blur: () => e.value?.blur(),
|
|
983
983
|
clear: () => e.value?.clear()
|
|
984
|
-
}), (t,
|
|
985
|
-
|
|
986
|
-
b(t.$slots, "error", { error:
|
|
987
|
-
g("div",
|
|
984
|
+
}), (t, c) => (h(), f("div", He, [
|
|
985
|
+
p(s) ? (h(), f("div", Je, [
|
|
986
|
+
b(t.$slots, "error", { error: p(s) }, () => [
|
|
987
|
+
g("div", Qe, P(p(s)), 1)
|
|
988
988
|
], !0)
|
|
989
989
|
])) : k("", !0),
|
|
990
990
|
g("div", {
|
|
991
991
|
ref_key: "elementRef",
|
|
992
992
|
ref: l,
|
|
993
|
-
class:
|
|
993
|
+
class: x(["vue-stripe-eps-bank-element-mount", { "vue-stripe-eps-bank-element-loading": p(r) }])
|
|
994
994
|
}, null, 2),
|
|
995
|
-
|
|
995
|
+
p(r) ? (h(), f("div", Ye, [
|
|
996
996
|
b(t.$slots, "loading", {}, () => [
|
|
997
|
-
|
|
997
|
+
c[0] || (c[0] = g("div", { class: "vue-stripe-loading-message" }, " Loading EPS bank selector... ", -1))
|
|
998
998
|
], !0)
|
|
999
999
|
])) : k("", !0)
|
|
1000
1000
|
]));
|
|
1001
1001
|
}
|
|
1002
|
-
}),
|
|
1003
|
-
function
|
|
1002
|
+
}), Et = /* @__PURE__ */ I(Ze, [["__scopeId", "data-v-27c62f72"]]);
|
|
1003
|
+
function X() {
|
|
1004
1004
|
const o = _(A);
|
|
1005
1005
|
if (!o)
|
|
1006
1006
|
throw new E(
|
|
1007
1007
|
"useStripe must be called within a VueStripeProvider component"
|
|
1008
1008
|
);
|
|
1009
1009
|
return {
|
|
1010
|
-
stripe:
|
|
1011
|
-
loading:
|
|
1012
|
-
error:
|
|
1010
|
+
stripe: C(o.stripe),
|
|
1011
|
+
loading: C(o.loading),
|
|
1012
|
+
error: C(o.error),
|
|
1013
1013
|
initialize: async () => {
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const Oe = ["disabled"], et = /* @__PURE__ */ S({
|
|
1018
1018
|
__name: "VueStripeCheckout",
|
|
1019
1019
|
props: {
|
|
1020
1020
|
sessionId: {},
|
|
@@ -1032,8 +1032,8 @@ const Ge = ["disabled"], He = /* @__PURE__ */ V({
|
|
|
1032
1032
|
buttonClass: { default: "vue-stripe-checkout-button" }
|
|
1033
1033
|
},
|
|
1034
1034
|
emits: ["checkout", "success", "error", "before-redirect"],
|
|
1035
|
-
setup(o, { expose: d, emit:
|
|
1036
|
-
const a = o, n =
|
|
1035
|
+
setup(o, { expose: d, emit: v }) {
|
|
1036
|
+
const a = o, n = v, { stripe: l } = X(), e = m(!1), r = Y(), s = Z(() => !!r.default), u = () => l.value !== null && typeof l.value.redirectToCheckout == "function", i = async () => {
|
|
1037
1037
|
e.value = !0, n("checkout");
|
|
1038
1038
|
try {
|
|
1039
1039
|
if (a.sessionUrl) {
|
|
@@ -1088,49 +1088,105 @@ const Ge = ["disabled"], He = /* @__PURE__ */ V({
|
|
|
1088
1088
|
"Either sessionUrl, sessionId, or priceId is required. For @stripe/stripe-js v8.x, use sessionUrl."
|
|
1089
1089
|
);
|
|
1090
1090
|
} catch (t) {
|
|
1091
|
-
const
|
|
1092
|
-
n("error",
|
|
1091
|
+
const c = t instanceof Error ? t : new Error("Checkout failed");
|
|
1092
|
+
n("error", c), console.error("[Vue Stripe] Checkout error:", c);
|
|
1093
1093
|
} finally {
|
|
1094
1094
|
e.value = !1;
|
|
1095
1095
|
}
|
|
1096
1096
|
};
|
|
1097
|
-
return d({ checkout:
|
|
1097
|
+
return d({ checkout: i, loading: e }), (t, c) => p(s) ? (h(), f("span", {
|
|
1098
1098
|
key: 0,
|
|
1099
|
-
onClick:
|
|
1099
|
+
onClick: i,
|
|
1100
1100
|
class: "vue-stripe-checkout-wrapper"
|
|
1101
1101
|
}, [
|
|
1102
1102
|
b(t.$slots, "default", {
|
|
1103
|
-
checkout:
|
|
1104
|
-
loading:
|
|
1103
|
+
checkout: i,
|
|
1104
|
+
loading: p(e),
|
|
1105
1105
|
disabled: o.disabled
|
|
1106
1106
|
}, void 0, !0)
|
|
1107
1107
|
])) : (h(), f("button", {
|
|
1108
1108
|
key: 1,
|
|
1109
|
-
disabled:
|
|
1110
|
-
class:
|
|
1111
|
-
onClick:
|
|
1109
|
+
disabled: p(e) || o.disabled,
|
|
1110
|
+
class: x(o.buttonClass),
|
|
1111
|
+
onClick: i
|
|
1112
1112
|
}, [
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
], 64)) : (h(), f(
|
|
1117
|
-
|
|
1113
|
+
p(e) ? (h(), f(N, { key: 1 }, [
|
|
1114
|
+
c[0] || (c[0] = g("span", { class: "vue-stripe-loading-spinner" }, null, -1)),
|
|
1115
|
+
j(" " + P(o.loadingText), 1)
|
|
1116
|
+
], 64)) : (h(), f(N, { key: 0 }, [
|
|
1117
|
+
j(P(o.buttonText), 1)
|
|
1118
1118
|
], 64))
|
|
1119
|
-
], 10,
|
|
1119
|
+
], 10, Oe));
|
|
1120
|
+
}
|
|
1121
|
+
}), _t = /* @__PURE__ */ I(et, [["__scopeId", "data-v-8fe59422"]]), tt = { class: "vue-stripe-pricing-table" }, rt = { class: "vue-stripe-pricing-table-error" }, q = "https://js.stripe.com/v3/pricing-table.js", st = /* @__PURE__ */ S({
|
|
1122
|
+
__name: "VueStripePricingTable",
|
|
1123
|
+
props: {
|
|
1124
|
+
pricingTableId: {},
|
|
1125
|
+
customerEmail: {},
|
|
1126
|
+
customerSessionClientSecret: {},
|
|
1127
|
+
clientReferenceId: {}
|
|
1128
|
+
},
|
|
1129
|
+
emits: ["load", "error"],
|
|
1130
|
+
setup(o, { expose: d, emit: v }) {
|
|
1131
|
+
const a = o, n = v, l = _(G);
|
|
1132
|
+
if (!l?.publishableKey)
|
|
1133
|
+
throw new E(
|
|
1134
|
+
"VueStripePricingTable must be used within a VueStripeProvider component"
|
|
1135
|
+
);
|
|
1136
|
+
const e = l.publishableKey, r = m(!0), s = m(null), u = () => new Promise((i, t) => {
|
|
1137
|
+
if (document.querySelector(`script[src="${q}"]`)) {
|
|
1138
|
+
i();
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
const c = document.createElement("script");
|
|
1142
|
+
c.src = q, c.async = !0, c.onload = () => i(), c.onerror = () => t(new Error("Failed to load Stripe pricing table script")), document.head.appendChild(c);
|
|
1143
|
+
});
|
|
1144
|
+
return $(async () => {
|
|
1145
|
+
try {
|
|
1146
|
+
r.value = !0, s.value = null, await u(), r.value = !1, n("load");
|
|
1147
|
+
} catch (i) {
|
|
1148
|
+
const t = i instanceof Error ? i.message : "Failed to load pricing table";
|
|
1149
|
+
s.value = t, r.value = !1, n("error", i instanceof Error ? i : new Error(t)), console.error("[Vue Stripe] Pricing table error:", t);
|
|
1150
|
+
}
|
|
1151
|
+
}), d({
|
|
1152
|
+
loading: r,
|
|
1153
|
+
error: s
|
|
1154
|
+
}), (i, t) => {
|
|
1155
|
+
const c = O("stripe-pricing-table");
|
|
1156
|
+
return h(), f("div", tt, [
|
|
1157
|
+
p(r) ? b(i.$slots, "loading", { key: 0 }, () => [
|
|
1158
|
+
t[0] || (t[0] = g("div", { class: "vue-stripe-pricing-table-loading" }, " Loading pricing table... ", -1))
|
|
1159
|
+
], !0) : p(s) ? b(i.$slots, "error", {
|
|
1160
|
+
key: 1,
|
|
1161
|
+
error: p(s)
|
|
1162
|
+
}, () => [
|
|
1163
|
+
g("div", rt, P(p(s)), 1)
|
|
1164
|
+
], !0) : k("", !0),
|
|
1165
|
+
ee(te(c, {
|
|
1166
|
+
"pricing-table-id": a.pricingTableId,
|
|
1167
|
+
"publishable-key": p(e),
|
|
1168
|
+
"customer-email": a.customerEmail,
|
|
1169
|
+
"customer-session-client-secret": a.customerSessionClientSecret,
|
|
1170
|
+
"client-reference-id": a.clientReferenceId
|
|
1171
|
+
}, null, 8, ["pricing-table-id", "publishable-key", "customer-email", "customer-session-client-secret", "client-reference-id"]), [
|
|
1172
|
+
[re, !p(r) && !p(s)]
|
|
1173
|
+
])
|
|
1174
|
+
]);
|
|
1175
|
+
};
|
|
1120
1176
|
}
|
|
1121
|
-
}),
|
|
1122
|
-
function
|
|
1123
|
-
const o = _(A), d = _(
|
|
1177
|
+
}), kt = /* @__PURE__ */ I(st, [["__scopeId", "data-v-2b89dbe1"]]);
|
|
1178
|
+
function St() {
|
|
1179
|
+
const o = _(A), d = _(w);
|
|
1124
1180
|
if (!o)
|
|
1125
1181
|
throw new E(
|
|
1126
1182
|
"usePaymentIntent must be called within a VueStripeProvider component"
|
|
1127
1183
|
);
|
|
1128
|
-
const
|
|
1184
|
+
const v = m(!1), a = m(null);
|
|
1129
1185
|
return {
|
|
1130
1186
|
confirmPayment: async (l) => {
|
|
1131
1187
|
if (!o.stripe.value)
|
|
1132
1188
|
return a.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
|
|
1133
|
-
|
|
1189
|
+
v.value = !0, a.value = null;
|
|
1134
1190
|
try {
|
|
1135
1191
|
const e = l.elements ?? d?.elements.value;
|
|
1136
1192
|
if (e && !l.skipSubmit) {
|
|
@@ -1149,25 +1205,25 @@ function pt() {
|
|
|
1149
1205
|
const r = e instanceof Error ? e.message : "Payment confirmation failed";
|
|
1150
1206
|
return a.value = r, { error: { message: r } };
|
|
1151
1207
|
} finally {
|
|
1152
|
-
|
|
1208
|
+
v.value = !1;
|
|
1153
1209
|
}
|
|
1154
1210
|
},
|
|
1155
|
-
loading:
|
|
1156
|
-
error:
|
|
1211
|
+
loading: C(v),
|
|
1212
|
+
error: C(a)
|
|
1157
1213
|
};
|
|
1158
1214
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const o = _(A), d = _(
|
|
1215
|
+
function wt() {
|
|
1216
|
+
const o = _(A), d = _(w);
|
|
1161
1217
|
if (!o)
|
|
1162
1218
|
throw new E(
|
|
1163
1219
|
"useSetupIntent must be called within a VueStripeProvider component"
|
|
1164
1220
|
);
|
|
1165
|
-
const
|
|
1221
|
+
const v = m(!1), a = m(null);
|
|
1166
1222
|
return {
|
|
1167
1223
|
confirmSetup: async (l) => {
|
|
1168
1224
|
if (!o.stripe.value)
|
|
1169
1225
|
return a.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
|
|
1170
|
-
|
|
1226
|
+
v.value = !0, a.value = null;
|
|
1171
1227
|
try {
|
|
1172
1228
|
const e = l.elements ?? d?.elements.value;
|
|
1173
1229
|
if (e && !l.skipSubmit) {
|
|
@@ -1186,18 +1242,18 @@ function mt() {
|
|
|
1186
1242
|
const r = e instanceof Error ? e.message : "Setup confirmation failed";
|
|
1187
1243
|
return a.value = r, { error: { message: r } };
|
|
1188
1244
|
} finally {
|
|
1189
|
-
|
|
1245
|
+
v.value = !1;
|
|
1190
1246
|
}
|
|
1191
1247
|
},
|
|
1192
|
-
loading:
|
|
1193
|
-
error:
|
|
1248
|
+
loading: C(v),
|
|
1249
|
+
error: C(a)
|
|
1194
1250
|
};
|
|
1195
1251
|
}
|
|
1196
|
-
function
|
|
1197
|
-
const { stripe: o } =
|
|
1252
|
+
function Vt() {
|
|
1253
|
+
const { stripe: o } = X(), d = m(!1), v = m(null), a = () => o.value !== null && typeof o.value.redirectToCheckout == "function";
|
|
1198
1254
|
return {
|
|
1199
1255
|
redirectToCheckout: async (e) => {
|
|
1200
|
-
d.value = !0,
|
|
1256
|
+
d.value = !0, v.value = null;
|
|
1201
1257
|
try {
|
|
1202
1258
|
if ("url" in e && e.url) {
|
|
1203
1259
|
window.location.replace(e.url);
|
|
@@ -1216,80 +1272,81 @@ function ft() {
|
|
|
1216
1272
|
const s = await o.value.redirectToCheckout(r);
|
|
1217
1273
|
if (s.error) {
|
|
1218
1274
|
const u = s.error.message || "Checkout redirect failed";
|
|
1219
|
-
throw
|
|
1275
|
+
throw v.value = u, new E(u);
|
|
1220
1276
|
}
|
|
1221
1277
|
} catch (r) {
|
|
1222
1278
|
const s = r instanceof Error ? r.message : "Checkout redirect failed";
|
|
1223
|
-
throw
|
|
1279
|
+
throw v.value = s, r;
|
|
1224
1280
|
} finally {
|
|
1225
1281
|
d.value = !1;
|
|
1226
1282
|
}
|
|
1227
1283
|
},
|
|
1228
1284
|
redirectToUrl: (e) => {
|
|
1229
|
-
d.value = !0,
|
|
1285
|
+
d.value = !0, v.value = null, window.location.replace(e);
|
|
1230
1286
|
},
|
|
1231
|
-
loading:
|
|
1232
|
-
error:
|
|
1287
|
+
loading: C(d),
|
|
1288
|
+
error: C(v)
|
|
1233
1289
|
};
|
|
1234
1290
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const o = _(
|
|
1291
|
+
function $t() {
|
|
1292
|
+
const o = _(w);
|
|
1237
1293
|
if (!o)
|
|
1238
|
-
throw new
|
|
1294
|
+
throw new V(
|
|
1239
1295
|
"Elements context not found. Make sure to wrap your component with VueStripeElements."
|
|
1240
1296
|
);
|
|
1241
1297
|
const d = async () => o.elements.value ? o.elements.value.submit() : { error: { message: "Elements not initialized" } };
|
|
1242
1298
|
return {
|
|
1243
|
-
elements:
|
|
1299
|
+
elements: C(o.elements),
|
|
1244
1300
|
submit: d,
|
|
1245
|
-
loading:
|
|
1246
|
-
error:
|
|
1301
|
+
loading: C(o.loading),
|
|
1302
|
+
error: C(o.error)
|
|
1247
1303
|
};
|
|
1248
1304
|
}
|
|
1249
|
-
function
|
|
1305
|
+
function It(o) {
|
|
1250
1306
|
return {
|
|
1251
1307
|
install(d) {
|
|
1252
1308
|
d.provide("vue-stripe-config", o);
|
|
1253
|
-
let
|
|
1309
|
+
let v = null;
|
|
1254
1310
|
d.provide("vue-stripe-global", {
|
|
1255
1311
|
get stripe() {
|
|
1256
|
-
if (!
|
|
1312
|
+
if (!v) {
|
|
1257
1313
|
const a = {};
|
|
1258
|
-
o.stripeAccount && (a.stripeAccount = o.stripeAccount), o.apiVersion && (a.apiVersion = o.apiVersion), o.locale && (a.locale = o.locale),
|
|
1314
|
+
o.stripeAccount && (a.stripeAccount = o.stripeAccount), o.apiVersion && (a.apiVersion = o.apiVersion), o.locale && (a.locale = o.locale), v = D(o.publishableKey, a).then((n) => (n && n.registerAppInfo(W), n));
|
|
1259
1315
|
}
|
|
1260
|
-
return
|
|
1316
|
+
return v;
|
|
1261
1317
|
}
|
|
1262
1318
|
});
|
|
1263
1319
|
}
|
|
1264
1320
|
};
|
|
1265
1321
|
}
|
|
1266
1322
|
export {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1323
|
+
ht as VueStripeAddressElement,
|
|
1324
|
+
mt as VueStripeCardCvcElement,
|
|
1325
|
+
vt as VueStripeCardElement,
|
|
1326
|
+
pt as VueStripeCardExpiryElement,
|
|
1327
|
+
dt as VueStripeCardNumberElement,
|
|
1328
|
+
_t as VueStripeCheckout,
|
|
1329
|
+
ut as VueStripeElements,
|
|
1330
|
+
V as VueStripeElementsError,
|
|
1331
|
+
Et as VueStripeEpsBankElement,
|
|
1332
|
+
ct as VueStripeExpressCheckoutElement,
|
|
1333
|
+
gt as VueStripeIbanElement,
|
|
1334
|
+
bt as VueStripeIdealBankElement,
|
|
1335
|
+
ft as VueStripeLinkAuthenticationElement,
|
|
1336
|
+
se as VueStripeLoadError,
|
|
1337
|
+
yt as VueStripeP24BankElement,
|
|
1338
|
+
it as VueStripePaymentElement,
|
|
1339
|
+
kt as VueStripePricingTable,
|
|
1340
|
+
ot as VueStripeProvider,
|
|
1284
1341
|
E as VueStripeProviderError,
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1342
|
+
It as createVueStripe,
|
|
1343
|
+
lt as createVueStripeError,
|
|
1344
|
+
Tt as loadStripe,
|
|
1345
|
+
Vt as useCheckout,
|
|
1346
|
+
$t as useElements,
|
|
1347
|
+
St as usePaymentIntent,
|
|
1348
|
+
wt as useSetupIntent,
|
|
1349
|
+
X as useStripe,
|
|
1350
|
+
Vt as useStripeCheckout,
|
|
1351
|
+
$t as useStripeElements
|
|
1295
1352
|
};
|