@moonbase.sh/storefront 0.3.23 → 0.3.25
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/dist/moonbase.js +75 -73
- package/dist/moonbase.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/moonbase.js
CHANGED
|
@@ -4064,7 +4064,7 @@ var Oo = /* @__PURE__ */ ((e) => (e.Open = "Open", e.PaymentProcessing = "Paymen
|
|
|
4064
4064
|
constructor(t) {
|
|
4065
4065
|
this.configuration = t, this.tokens = null, this.refreshTimeoutId = null, this.refreshPromise = null;
|
|
4066
4066
|
var n;
|
|
4067
|
-
this.store = (
|
|
4067
|
+
this.store = (n = t.store) != null ? n : typeof window < "u" && localStorage ? new q0() : new z0();
|
|
4068
4068
|
const r = this.store.get(ms.storageKey);
|
|
4069
4069
|
r && (this.tokens = {
|
|
4070
4070
|
...r,
|
|
@@ -9782,6 +9782,8 @@ function ja(e) {
|
|
|
9782
9782
|
console.warn("Can not mount checkout server side");
|
|
9783
9783
|
return;
|
|
9784
9784
|
}
|
|
9785
|
+
if (document.getElementById("moonbase-checkout"))
|
|
9786
|
+
return;
|
|
9785
9787
|
const t = document.createElement("iframe");
|
|
9786
9788
|
t.id = "moonbase-checkout", t.src = e, t.style.position = "fixed", t.style.top = "0px", t.style.left = "0px", t.style.right = "0px", t.style.border = "none", t.style.colorScheme = "normal", t.style.backgroundColor = "transparent", t.style.zIndex = Number.MAX_SAFE_INTEGER.toString(), t.setAttribute("background", "transparent"), t.setAttribute("frameborder", "0"), t.setAttribute("allowtransparency", "true"), t.setAttribute("allow", "payment"), t.height = "100%", t.width = "100%", document.body.append(t), document.documentElement.style.overflow = "hidden", window.onmessage = function(n) {
|
|
9787
9789
|
var r;
|
|
@@ -17098,7 +17100,7 @@ function eE(e, t) {
|
|
|
17098
17100
|
const Re = /* @__PURE__ */ ir(J2, [["render", eE]]), tE = { class: "moonbase:about" }, nE = /* @__PURE__ */ pe({
|
|
17099
17101
|
__name: "About",
|
|
17100
17102
|
setup(e) {
|
|
17101
|
-
const t = Te(), n = "0.3.
|
|
17103
|
+
const t = Te(), n = "0.3.25";
|
|
17102
17104
|
return (r, o) => (g(), C("div", tE, [
|
|
17103
17105
|
o[2] || (o[2] = Rh('<svg viewBox="0 0 512 512" height="56px" width="56px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>', 1)),
|
|
17104
17106
|
w(b(bp), { as: "h3" }, {
|
|
@@ -20805,19 +20807,19 @@ function Qk(e) {
|
|
|
20805
20807
|
const r = t[n];
|
|
20806
20808
|
return e >= 10 || e % 1 === 0 ? `${e.toFixed(0)} ${r}` : `${e.toFixed(1)} ${r}`;
|
|
20807
20809
|
}
|
|
20808
|
-
const
|
|
20810
|
+
const eO = { class: "moonbase:product-downloads" }, tO = ["data-open"], nO = {
|
|
20809
20811
|
key: 1,
|
|
20810
20812
|
class: "moonbase:product-downloads-content"
|
|
20811
|
-
},
|
|
20813
|
+
}, rO = {
|
|
20812
20814
|
key: 2,
|
|
20813
20815
|
class: "moonbase:product-downloads-content"
|
|
20814
|
-
},
|
|
20816
|
+
}, oO = {
|
|
20815
20817
|
key: 3,
|
|
20816
20818
|
class: "moonbase:product-downloads-content"
|
|
20817
|
-
},
|
|
20819
|
+
}, sO = {
|
|
20818
20820
|
key: 4,
|
|
20819
20821
|
class: "moonbase:product-downloads-content"
|
|
20820
|
-
},
|
|
20822
|
+
}, iO = { class: "moonbase:product-downloads-list" }, aO = { class: "moonbase:product-downloads-download-actions" }, lO = /* @__PURE__ */ pe({
|
|
20821
20823
|
__name: "ProductDownloads",
|
|
20822
20824
|
props: {
|
|
20823
20825
|
product: {}
|
|
@@ -20870,7 +20872,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
20870
20872
|
throw H;
|
|
20871
20873
|
}
|
|
20872
20874
|
}
|
|
20873
|
-
return (N, H) => (g(), C("div",
|
|
20875
|
+
return (N, H) => (g(), C("div", eO, [
|
|
20874
20876
|
w(et, null, {
|
|
20875
20877
|
default: O(() => [
|
|
20876
20878
|
H[1] || (H[1] = M(" Downloads ")),
|
|
@@ -20908,8 +20910,8 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
20908
20910
|
_: 1
|
|
20909
20911
|
})
|
|
20910
20912
|
])) : fe("", !0)
|
|
20911
|
-
], 8,
|
|
20912
|
-
N.product.downloadsNeedsUser && N.product.downloadsNeedsOwnership && !N.product.numberOfLicenses && !N.product.subscriptionLicenses ? (g(), C("div",
|
|
20913
|
+
], 8, tO)) : fe("", !0),
|
|
20914
|
+
N.product.downloadsNeedsUser && N.product.downloadsNeedsOwnership && !N.product.numberOfLicenses && !N.product.subscriptionLicenses ? (g(), C("div", nO, [
|
|
20913
20915
|
w(Qe, { "data-center": "" }, {
|
|
20914
20916
|
default: O(() => H[3] || (H[3] = [
|
|
20915
20917
|
M(" This product requires ownership to download ")
|
|
@@ -20920,7 +20922,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
20920
20922
|
label: "Sign in",
|
|
20921
20923
|
handler: c
|
|
20922
20924
|
})
|
|
20923
|
-
])) : N.product.downloadsNeedsUser && !b(r).user ? (g(), C("div",
|
|
20925
|
+
])) : N.product.downloadsNeedsUser && !b(r).user ? (g(), C("div", rO, [
|
|
20924
20926
|
w(Qe, { "data-center": "" }, {
|
|
20925
20927
|
default: O(() => H[4] || (H[4] = [
|
|
20926
20928
|
M(" This product requires an account to download ")
|
|
@@ -20931,21 +20933,21 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
20931
20933
|
label: "Sign in",
|
|
20932
20934
|
handler: c
|
|
20933
20935
|
})
|
|
20934
|
-
])) : N.product.downloadsNeedsOwnership && !N.product.numberOfLicenses && !N.product.subscriptionLicenses ? (g(), C("div",
|
|
20936
|
+
])) : N.product.downloadsNeedsOwnership && !N.product.numberOfLicenses && !N.product.subscriptionLicenses ? (g(), C("div", oO, [
|
|
20935
20937
|
w(Qe, { "data-center": "" }, {
|
|
20936
20938
|
default: O(() => H[5] || (H[5] = [
|
|
20937
20939
|
M(" This product requires ownership to download ")
|
|
20938
20940
|
])),
|
|
20939
20941
|
_: 1
|
|
20940
20942
|
})
|
|
20941
|
-
])) : (g(), C("div",
|
|
20942
|
-
q("div",
|
|
20943
|
+
])) : (g(), C("div", sO, [
|
|
20944
|
+
q("div", iO, [
|
|
20943
20945
|
(g(!0), C(Pe, null, _t(_.value, (z) => (g(), J(wn, {
|
|
20944
20946
|
key: z.key,
|
|
20945
20947
|
class: "moonbase:product-downloads-download"
|
|
20946
20948
|
}, {
|
|
20947
20949
|
addon: O(() => [
|
|
20948
|
-
q("div",
|
|
20950
|
+
q("div", aO, [
|
|
20949
20951
|
w(lt, {
|
|
20950
20952
|
label: `Download for ${z.platform}`,
|
|
20951
20953
|
variant: z.platform === b(h) ? "primary" : "secondary",
|
|
@@ -20986,25 +20988,25 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
20986
20988
|
]))
|
|
20987
20989
|
]));
|
|
20988
20990
|
}
|
|
20989
|
-
}),
|
|
20991
|
+
}), uO = { class: "moonbase:product-licenses" }, cO = {
|
|
20990
20992
|
key: 0,
|
|
20991
20993
|
class: "moonbase:loader"
|
|
20992
|
-
},
|
|
20994
|
+
}, dO = {
|
|
20993
20995
|
key: 1,
|
|
20994
20996
|
class: "moonbase:empty"
|
|
20995
|
-
},
|
|
20997
|
+
}, fO = {
|
|
20996
20998
|
key: 0,
|
|
20997
20999
|
class: "moonbase:loader"
|
|
20998
|
-
},
|
|
21000
|
+
}, hO = {
|
|
20999
21001
|
key: 1,
|
|
21000
21002
|
class: "moonbase:product-licenses-activations"
|
|
21001
|
-
},
|
|
21003
|
+
}, pO = { key: 0 }, mO = { class: "moonbase:product-licenses-activation-actions" }, bO = {
|
|
21002
21004
|
key: 2,
|
|
21003
21005
|
class: "moonbase:loader"
|
|
21004
|
-
},
|
|
21006
|
+
}, gO = {
|
|
21005
21007
|
key: 3,
|
|
21006
21008
|
class: "moonbase:product-licenses-licenses"
|
|
21007
|
-
},
|
|
21009
|
+
}, vO = /* @__PURE__ */ pe({
|
|
21008
21010
|
__name: "ProductLicenses",
|
|
21009
21011
|
props: {
|
|
21010
21012
|
product: {}
|
|
@@ -21052,7 +21054,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21052
21054
|
throw h;
|
|
21053
21055
|
}
|
|
21054
21056
|
}
|
|
21055
|
-
return (f, h) => (g(), C("div",
|
|
21057
|
+
return (f, h) => (g(), C("div", uO, [
|
|
21056
21058
|
w(et, null, {
|
|
21057
21059
|
default: O(() => [
|
|
21058
21060
|
h[0] || (h[0] = M(" Licenses ")),
|
|
@@ -21065,9 +21067,9 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21065
21067
|
]),
|
|
21066
21068
|
_: 1
|
|
21067
21069
|
}),
|
|
21068
|
-
c.value ? (g(), C("div",
|
|
21070
|
+
c.value ? (g(), C("div", cO, [
|
|
21069
21071
|
w(Jt)
|
|
21070
|
-
])) : !f.product.numberOfLicenses && !f.product.subscriptionLicenses ? (g(), C("div",
|
|
21072
|
+
])) : !f.product.numberOfLicenses && !f.product.subscriptionLicenses ? (g(), C("div", dO, [
|
|
21071
21073
|
w(Qe, null, {
|
|
21072
21074
|
default: O(() => h[1] || (h[1] = [
|
|
21073
21075
|
M(" You don't own any licenses for this product yet ")
|
|
@@ -21083,7 +21085,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21083
21085
|
}, null, 8, ["href", "icon"])) : fe("", !0)
|
|
21084
21086
|
])) : fe("", !0),
|
|
21085
21087
|
c.value ? fe("", !0) : (g(), C(Pe, { key: 2 }, [
|
|
21086
|
-
f.product.maxActivations && f.product.maxActivations > 0 && !f.product.currentActivations ? (g(), C("div",
|
|
21088
|
+
f.product.maxActivations && f.product.maxActivations > 0 && !f.product.currentActivations ? (g(), C("div", fO, [
|
|
21087
21089
|
w(b(yd)),
|
|
21088
21090
|
w(et, null, {
|
|
21089
21091
|
default: O(() => h[2] || (h[2] = [
|
|
@@ -21092,7 +21094,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21092
21094
|
_: 1
|
|
21093
21095
|
})
|
|
21094
21096
|
])) : fe("", !0),
|
|
21095
|
-
f.product.maxActivations && l.value ? (g(), C("div",
|
|
21097
|
+
f.product.maxActivations && l.value ? (g(), C("div", hO, [
|
|
21096
21098
|
(g(!0), C(Pe, null, _t(l.value ?? [], (p) => (g(), J(wn, {
|
|
21097
21099
|
key: p.id,
|
|
21098
21100
|
class: "moonbase:product-licenses-activation"
|
|
@@ -21126,7 +21128,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21126
21128
|
_: 2
|
|
21127
21129
|
}, 1024)
|
|
21128
21130
|
]),
|
|
21129
|
-
p.lastValidatedAt ? (g(), C("div",
|
|
21131
|
+
p.lastValidatedAt ? (g(), C("div", pO, [
|
|
21130
21132
|
w(Er, null, {
|
|
21131
21133
|
default: O(() => h[5] || (h[5] = [
|
|
21132
21134
|
M(" First activated ")
|
|
@@ -21146,7 +21148,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21146
21148
|
p.activationMethod === b(Na).Online ? {
|
|
21147
21149
|
name: "addon",
|
|
21148
21150
|
fn: O(() => [
|
|
21149
|
-
q("div",
|
|
21151
|
+
q("div", mO, [
|
|
21150
21152
|
w(lt, {
|
|
21151
21153
|
label: "Revoke",
|
|
21152
21154
|
variant: "secondary",
|
|
@@ -21159,7 +21161,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21159
21161
|
} : void 0
|
|
21160
21162
|
]), 1024))), 128))
|
|
21161
21163
|
])) : fe("", !0),
|
|
21162
|
-
(!u.value || u.value.length === 0) && !f.product.maxActivations && (f.product.numberOfLicenses || f.product.subscriptionLicenses) ? (g(), C("div",
|
|
21164
|
+
(!u.value || u.value.length === 0) && !f.product.maxActivations && (f.product.numberOfLicenses || f.product.subscriptionLicenses) ? (g(), C("div", bO, [
|
|
21163
21165
|
w(b(yd)),
|
|
21164
21166
|
f.product.numberOfLicenses ? (g(), J(et, { key: 0 }, {
|
|
21165
21167
|
default: O(() => [
|
|
@@ -21173,7 +21175,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21173
21175
|
]),
|
|
21174
21176
|
_: 1
|
|
21175
21177
|
})) : fe("", !0)
|
|
21176
|
-
])) : f.product.externalLicenses && u.value ? (g(), C("div",
|
|
21178
|
+
])) : f.product.externalLicenses && u.value ? (g(), C("div", gO, [
|
|
21177
21179
|
(g(!0), C(Pe, null, _t((u.value ?? []).filter((p) => p.externalFulfillment), (p) => (g(), J(wn, {
|
|
21178
21180
|
key: p.id,
|
|
21179
21181
|
class: "moonbase:product-licenses-license"
|
|
@@ -21208,16 +21210,16 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21208
21210
|
], 64))
|
|
21209
21211
|
]));
|
|
21210
21212
|
}
|
|
21211
|
-
}),
|
|
21213
|
+
}), yO = { class: "moonbase:download-product" }, _O = {
|
|
21212
21214
|
key: 0,
|
|
21213
21215
|
class: "moonbase:loader"
|
|
21214
|
-
},
|
|
21216
|
+
}, wO = {
|
|
21215
21217
|
key: 1,
|
|
21216
21218
|
class: "moonbase:loader"
|
|
21217
|
-
},
|
|
21219
|
+
}, EO = {
|
|
21218
21220
|
key: 2,
|
|
21219
21221
|
class: "moonbase:loader"
|
|
21220
|
-
},
|
|
21222
|
+
}, xO = { key: 3 }, kO = /* @__PURE__ */ pe({
|
|
21221
21223
|
__name: "Product",
|
|
21222
21224
|
setup(e) {
|
|
21223
21225
|
const t = Te(), n = tt(), { loaded: r } = tt(), { getProduct: o } = fo(), s = V(null), i = V(null), a = V(!0);
|
|
@@ -21233,30 +21235,30 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21233
21235
|
i.value = c.message;
|
|
21234
21236
|
}
|
|
21235
21237
|
a.value = !1;
|
|
21236
|
-
}), (l, u) => (g(), C("div",
|
|
21237
|
-
a.value || !b(r) ? (g(), C("div",
|
|
21238
|
+
}), (l, u) => (g(), C("div", yO, [
|
|
21239
|
+
a.value || !b(r) ? (g(), C("div", _O, [
|
|
21238
21240
|
w(Jt)
|
|
21239
|
-
])) : i.value ? (g(), C("div",
|
|
21241
|
+
])) : i.value ? (g(), C("div", wO, j(i.value), 1)) : s.value ? (g(), C("div", xO, [
|
|
21240
21242
|
w(Jk, { product: s.value }, null, 8, ["product"]),
|
|
21241
|
-
s.value.downloads ? (g(), J(
|
|
21243
|
+
s.value.downloads ? (g(), J(lO, {
|
|
21242
21244
|
key: 0,
|
|
21243
21245
|
product: s.value
|
|
21244
21246
|
}, null, 8, ["product"])) : fe("", !0),
|
|
21245
|
-
b(n).user.value ? (g(), J(
|
|
21247
|
+
b(n).user.value ? (g(), J(vO, {
|
|
21246
21248
|
key: 1,
|
|
21247
21249
|
product: s.value,
|
|
21248
21250
|
onRevoked: u[0] || (u[0] = (c) => s.value.currentActivations = (s.value.currentActivations ?? 1) - 1)
|
|
21249
21251
|
}, null, 8, ["product"])) : fe("", !0)
|
|
21250
|
-
])) : (g(), C("div",
|
|
21252
|
+
])) : (g(), C("div", EO, " Could not find product "))
|
|
21251
21253
|
]));
|
|
21252
21254
|
}
|
|
21253
|
-
}),
|
|
21255
|
+
}), OO = { class: "moonbase:peek" }, SO = ["data-visible"], NO = {
|
|
21254
21256
|
key: 1,
|
|
21255
21257
|
class: "moonbase:peek-voucher"
|
|
21256
|
-
},
|
|
21258
|
+
}, CO = {
|
|
21257
21259
|
key: 0,
|
|
21258
21260
|
class: "moonbase:peek-voucher-content"
|
|
21259
|
-
},
|
|
21261
|
+
}, TO = { class: "moonbase:peek-voucher-auth" }, PO = /* @__PURE__ */ pe({
|
|
21260
21262
|
__name: "Redeem",
|
|
21261
21263
|
setup(e) {
|
|
21262
21264
|
const { peek: t } = Hh(), n = Te(), r = V(null), o = V(null), s = V(n.getParameter("code") || "");
|
|
@@ -21280,13 +21282,13 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21280
21282
|
code: s.value
|
|
21281
21283
|
}), n.show(le.Authentication, te.SignUp);
|
|
21282
21284
|
}
|
|
21283
|
-
return (u, c) => (g(), C("div",
|
|
21285
|
+
return (u, c) => (g(), C("div", OO, [
|
|
21284
21286
|
w(hi, {
|
|
21285
21287
|
mode: "out-in",
|
|
21286
21288
|
name: "moonbase:slide-left"
|
|
21287
21289
|
}, {
|
|
21288
21290
|
default: O(() => [
|
|
21289
|
-
r.value ? (g(), C("div",
|
|
21291
|
+
r.value ? (g(), C("div", NO, [
|
|
21290
21292
|
q("div", null, [
|
|
21291
21293
|
w(Wo, null, {
|
|
21292
21294
|
default: O(() => [
|
|
@@ -21314,7 +21316,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21314
21316
|
])),
|
|
21315
21317
|
_: 1
|
|
21316
21318
|
}),
|
|
21317
|
-
r.value.redeemsProducts.length > 0 || r.value.redeemsBundles.length > 0 ? (g(), C("div",
|
|
21319
|
+
r.value.redeemsProducts.length > 0 || r.value.redeemsBundles.length > 0 ? (g(), C("div", CO, [
|
|
21318
21320
|
(g(!0), C(Pe, null, _t(r.value.redeemsProducts, ({ value: d, quantity: f }) => (g(), J(rm, {
|
|
21319
21321
|
key: d.id,
|
|
21320
21322
|
product: d,
|
|
@@ -21326,7 +21328,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21326
21328
|
quantity: f
|
|
21327
21329
|
}, null, 8, ["bundle", "quantity"]))), 128))
|
|
21328
21330
|
])) : fe("", !0),
|
|
21329
|
-
q("div",
|
|
21331
|
+
q("div", TO, [
|
|
21330
21332
|
w(Qe, null, {
|
|
21331
21333
|
default: O(() => c[4] || (c[4] = [
|
|
21332
21334
|
M(" Sign in or create an account to redeem products ")
|
|
@@ -21374,7 +21376,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21374
21376
|
q("span", {
|
|
21375
21377
|
class: "moonbase:error",
|
|
21376
21378
|
"data-visible": !!o.value || void 0
|
|
21377
|
-
}, j((d = o.value) == null ? void 0 : d.message), 9,
|
|
21379
|
+
}, j((d = o.value) == null ? void 0 : d.message), 9, SO)
|
|
21378
21380
|
];
|
|
21379
21381
|
}),
|
|
21380
21382
|
_: 1
|
|
@@ -21384,7 +21386,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21384
21386
|
})
|
|
21385
21387
|
]));
|
|
21386
21388
|
}
|
|
21387
|
-
}), $
|
|
21389
|
+
}), $O = { class: "moonbase:subscription-content-card-content" }, AO = ["data-open"], DO = { class: "moonbase:subscription-content-card-content" }, IO = ["data-open"], MO = /* @__PURE__ */ pe({
|
|
21388
21390
|
__name: "ContentCard",
|
|
21389
21391
|
props: {
|
|
21390
21392
|
subscription: {}
|
|
@@ -21420,14 +21422,14 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21420
21422
|
_: 1
|
|
21421
21423
|
})
|
|
21422
21424
|
])) : fe("", !0)
|
|
21423
|
-
], 8,
|
|
21425
|
+
], 8, AO)
|
|
21424
21426
|
]),
|
|
21425
21427
|
default: O(() => [
|
|
21426
21428
|
w(Qt, {
|
|
21427
21429
|
url: s.subscription.content.product.iconUrl,
|
|
21428
21430
|
size: 72
|
|
21429
21431
|
}, null, 8, ["url"]),
|
|
21430
|
-
q("div", $
|
|
21432
|
+
q("div", $O, [
|
|
21431
21433
|
w(Wo, null, {
|
|
21432
21434
|
default: O(() => {
|
|
21433
21435
|
var a;
|
|
@@ -21485,14 +21487,14 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21485
21487
|
_: 1
|
|
21486
21488
|
})
|
|
21487
21489
|
])) : fe("", !0)
|
|
21488
|
-
], 8,
|
|
21490
|
+
], 8, IO)
|
|
21489
21491
|
]),
|
|
21490
21492
|
default: O(() => [
|
|
21491
21493
|
w(Qt, {
|
|
21492
21494
|
url: s.subscription.content.bundle.iconUrl,
|
|
21493
21495
|
size: 72
|
|
21494
21496
|
}, null, 8, ["url"]),
|
|
21495
|
-
q("div",
|
|
21497
|
+
q("div", DO, [
|
|
21496
21498
|
w(Wo, null, {
|
|
21497
21499
|
default: O(() => {
|
|
21498
21500
|
var a;
|
|
@@ -21523,16 +21525,16 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21523
21525
|
_: 1
|
|
21524
21526
|
}));
|
|
21525
21527
|
}
|
|
21526
|
-
}),
|
|
21528
|
+
}), VO = { class: "moonbase:subscription" }, RO = {
|
|
21527
21529
|
key: 0,
|
|
21528
21530
|
class: "moonbase:loader"
|
|
21529
|
-
},
|
|
21531
|
+
}, LO = {
|
|
21530
21532
|
key: 1,
|
|
21531
21533
|
class: "moonbase:loader"
|
|
21532
|
-
},
|
|
21534
|
+
}, jO = {
|
|
21533
21535
|
key: 2,
|
|
21534
21536
|
class: "moonbase:loader"
|
|
21535
|
-
},
|
|
21537
|
+
}, FO = { key: 3 }, UO = { class: "moonbase:subscription-actions" }, BO = /* @__PURE__ */ pe({
|
|
21536
21538
|
__name: "Subscription",
|
|
21537
21539
|
setup(e) {
|
|
21538
21540
|
const t = Te(), { loaded: n } = tt(), { getSubscription: r, renewSubscription: o, cancelSubscription: s } = fo(), i = V(null), a = V(/* @__PURE__ */ new Date()), l = V(null), u = V(!0);
|
|
@@ -21563,12 +21565,12 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21563
21565
|
async function d() {
|
|
21564
21566
|
i.value && (i.value = await s(i.value.id));
|
|
21565
21567
|
}
|
|
21566
|
-
return (f, h) => (g(), C("div",
|
|
21567
|
-
u.value || !b(n) ? (g(), C("div",
|
|
21568
|
+
return (f, h) => (g(), C("div", VO, [
|
|
21569
|
+
u.value || !b(n) ? (g(), C("div", RO, [
|
|
21568
21570
|
w(Jt)
|
|
21569
|
-
])) : l.value ? (g(), C("div",
|
|
21570
|
-
w(
|
|
21571
|
-
q("div",
|
|
21571
|
+
])) : l.value ? (g(), C("div", LO, j(l.value), 1)) : i.value ? (g(), C("div", FO, [
|
|
21572
|
+
w(MO, { subscription: i.value }, null, 8, ["subscription"]),
|
|
21573
|
+
q("div", UO, [
|
|
21572
21574
|
i.value.status === b(Pr).Active ? (g(), J(lt, {
|
|
21573
21575
|
key: 0,
|
|
21574
21576
|
label: "Cancel subscription",
|
|
@@ -21594,10 +21596,10 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21594
21596
|
_: 1
|
|
21595
21597
|
}))
|
|
21596
21598
|
])
|
|
21597
|
-
])) : (g(), C("div",
|
|
21599
|
+
])) : (g(), C("div", jO, " Could not find subscription "))
|
|
21598
21600
|
]));
|
|
21599
21601
|
}
|
|
21600
|
-
}),
|
|
21602
|
+
}), HO = /* @__PURE__ */ pe({
|
|
21601
21603
|
__name: "App",
|
|
21602
21604
|
setup(e) {
|
|
21603
21605
|
const t = _e(jt), n = Te();
|
|
@@ -21629,7 +21631,7 @@ const e3 = { class: "moonbase:product-downloads" }, t3 = ["data-open"], n3 = {
|
|
|
21629
21631
|
(i = b(t)) != null && i.toolbar.enabled ? (g(), J(R_, { key: 0 })) : fe("", !0),
|
|
21630
21632
|
w(T_, null, {
|
|
21631
21633
|
default: O(() => [
|
|
21632
|
-
b(n).active === b(le).Cart ? (g(), J(nx, { key: 0 })) : b(n).active === b(le).Authentication ? (g(), J(D5, { key: 1 })) : b(n).active === b(le).Activation ? (g(), J(qE, { key: 2 })) : b(n).active === b(le).Product ? (g(), J(
|
|
21634
|
+
b(n).active === b(le).Cart ? (g(), J(nx, { key: 0 })) : b(n).active === b(le).Authentication ? (g(), J(D5, { key: 1 })) : b(n).active === b(le).Activation ? (g(), J(qE, { key: 2 })) : b(n).active === b(le).Product ? (g(), J(kO, { key: 3 })) : b(n).active === b(le).Subscription ? (g(), J(BO, { key: 4 })) : b(n).active === b(le).Customer ? (g(), J(Gk, { key: 5 })) : b(n).active === b(le).Redeem ? (g(), J(PO, { key: 6 })) : b(n).active === b(le).About ? (g(), J(nE, { key: 7 })) : fe("", !0)
|
|
21633
21635
|
]),
|
|
21634
21636
|
_: 1
|
|
21635
21637
|
})
|
|
@@ -21655,14 +21657,14 @@ function ka(e, ...t) {
|
|
|
21655
21657
|
}
|
|
21656
21658
|
return ka(e, ...t);
|
|
21657
21659
|
}
|
|
21658
|
-
function
|
|
21660
|
+
function qO(e) {
|
|
21659
21661
|
const t = (n) => Array.isArray(n) ? n.map((r) => t(r)) : Xe(n) || mn(n) || Bo(n) ? t(Oe(n)) : n && typeof n == "object" ? Object.keys(n).reduce((r, o) => (r[o] = t(n[o]), r), {}) : n;
|
|
21660
21662
|
return t(e);
|
|
21661
21663
|
}
|
|
21662
21664
|
const um = Symbol("url"), cr = (e, t) => window.dispatchEvent(new CustomEvent(`moonbase-storefront-${e}`, {
|
|
21663
|
-
detail:
|
|
21665
|
+
detail: qO(t)
|
|
21664
21666
|
})), po = Symbol("event-emitter");
|
|
21665
|
-
class
|
|
21667
|
+
class zO {
|
|
21666
21668
|
constructor() {
|
|
21667
21669
|
Mr(this, "initialized", !1);
|
|
21668
21670
|
Mr(this, "pinia");
|
|
@@ -21679,7 +21681,7 @@ class z3 {
|
|
|
21679
21681
|
}
|
|
21680
21682
|
this.options = V(ka(((l = this.options) == null ? void 0 : l.value) ?? fd, n ?? {})), Jl("Merged options:", this.options.value);
|
|
21681
21683
|
const r = document.createElement("div");
|
|
21682
|
-
r.id = "moonbase", r.classList.add("moonbase"), (this.options.value.target ?? document.body).append(r), this.storefront = Ny(t), this.pinia = Jy(), iy(
|
|
21684
|
+
r.id = "moonbase", r.classList.add("moonbase"), (this.options.value.target ?? document.body).append(r), this.storefront = Ny(t), this.pinia = Jy(), iy(HO).use(this.storefront).use(this.pinia).provide(jt, this.options).provide(um, t.replace(/\/$/, "")).provide(po, cr).mount("#moonbase"), this.initialized = !0, window && window.location && this.handleLocationIntent(window.location);
|
|
21683
21685
|
const i = Te(this.pinia), a = tt(this.storefront);
|
|
21684
21686
|
(u = this.storefront) == null || u.onCheckoutInitiated((c, d) => {
|
|
21685
21687
|
cr(Ut.CheckoutInitiated, {
|
|
@@ -21925,11 +21927,11 @@ class z3 {
|
|
|
21925
21927
|
Te(this.pinia).show(le.About, te.ViewAbout);
|
|
21926
21928
|
}
|
|
21927
21929
|
}
|
|
21928
|
-
const
|
|
21929
|
-
globalThis && (globalThis.Moonbase ? console.warn("Multiple instances of Moonbase detected, only one will be initialized") : globalThis.Moonbase =
|
|
21930
|
+
const WO = new zO();
|
|
21931
|
+
globalThis && (globalThis.Moonbase ? console.warn("Multiple instances of Moonbase detected, only one will be initialized") : globalThis.Moonbase = WO);
|
|
21930
21932
|
export {
|
|
21931
21933
|
te as MoonbaseIntent,
|
|
21932
|
-
|
|
21934
|
+
WO as default,
|
|
21933
21935
|
po as eventEmitterKey,
|
|
21934
21936
|
um as urlKey
|
|
21935
21937
|
};
|