@levo-so/site-runtime 0.3.18 → 0.3.20
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/index.d.ts +23 -17
- package/index.js +1663 -1354
- package/package.json +3 -3
- package/script.esm-wR2d7rrv.js +62 -0
- /package/{es-ByBbirnH.js → es-CGQflL9T.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/site-runtime",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "Runtime for Levo Studio v3 sites — the editor preview inspector, page head metadata, and the Levo data client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@assistant-ui/store": "0.3.13",
|
|
83
83
|
"@assistant-ui/tap": "0.9.17",
|
|
84
84
|
"remark-gfm": "4.0.1",
|
|
85
|
-
"@levo-so/core": "0.3.
|
|
86
|
-
"@levo-so/insights": "0.3.
|
|
85
|
+
"@levo-so/core": "0.3.20",
|
|
86
|
+
"@levo-so/insights": "0.3.20",
|
|
87
87
|
"@stripe/react-stripe-js": "3.1.1",
|
|
88
88
|
"@stripe/stripe-js": "5.5.0",
|
|
89
89
|
"react-razorpay": "3.0.1"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@cashfreepayments+cashfree-js@1.0.7/node_modules/@cashfreepayments/cashfree-js/dist/script.esm.js
|
|
2
|
+
var e = "https://sdk.cashfree.com/js/v3/cashfree.js", t = /^https:\/\/sdk\.cashfree\.com\/js\/v3\/.*$/, n = "load was called but an existing Cashfree.js script already exists in the document; existing script parameters will be used", r = function() {
|
|
3
|
+
for (var n = document.querySelectorAll(`script[src^="${e}"]`), r = 0; r < n.length; r++) {
|
|
4
|
+
var i = n[r];
|
|
5
|
+
if (t.test(i.src)) return i;
|
|
6
|
+
}
|
|
7
|
+
return null;
|
|
8
|
+
}, i = function(t) {
|
|
9
|
+
var n = "", r = document.createElement("script");
|
|
10
|
+
r.src = `${e}${n}`;
|
|
11
|
+
var i = document.head || document.body;
|
|
12
|
+
if (!i) throw Error("Expected document.body not to be null. Cashfree.js requires a <body> element.");
|
|
13
|
+
return i.appendChild(r), r;
|
|
14
|
+
}, a = null, o = function(e) {
|
|
15
|
+
return a === null && (a = new Promise(function(t, o) {
|
|
16
|
+
if (typeof window > "u" || typeof document > "u") {
|
|
17
|
+
t(null);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (window.Cashfree && e && console.warn(n), window.Cashfree) {
|
|
21
|
+
t(window.Cashfree);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
var s = 3, c = 0, l = !1;
|
|
25
|
+
function u(n) {
|
|
26
|
+
n.addEventListener("load", function() {
|
|
27
|
+
window.Cashfree ? t(window.Cashfree) : o(/* @__PURE__ */ Error("Cashfree.js not available"));
|
|
28
|
+
}), n.addEventListener("error", function() {
|
|
29
|
+
l || (c < s ? (l = !0, c++, n.parentNode && n.parentNode.removeChild(n), setTimeout(function() {
|
|
30
|
+
l = !1;
|
|
31
|
+
try {
|
|
32
|
+
u(r() || i(e));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
o(e);
|
|
35
|
+
}
|
|
36
|
+
}, 100)) : (a = null, o(/* @__PURE__ */ Error("Failed to load Cashfree.js"))));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
var d = r();
|
|
41
|
+
d && e ? console.warn(n) : d ||= i(e), u(d);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
o(e);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
})), a;
|
|
47
|
+
}, s = function(e, t, n) {
|
|
48
|
+
return e === null ? null : e.apply(void 0, t);
|
|
49
|
+
}, c = Promise.resolve().then(function() {
|
|
50
|
+
return o(null);
|
|
51
|
+
}), l = !1;
|
|
52
|
+
c.catch(function(e) {
|
|
53
|
+
l || console.warn(e);
|
|
54
|
+
});
|
|
55
|
+
var u = async function() {
|
|
56
|
+
var e = [...arguments];
|
|
57
|
+
l = !0;
|
|
58
|
+
var t = Date.now();
|
|
59
|
+
return s(await c, e, t);
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { u as load };
|
|
File without changes
|