@flowengage/react-chatbot 1.6.2 → 1.6.3
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.
|
@@ -2121,7 +2121,36 @@ async function Mn(e) {
|
|
|
2121
2121
|
t === "AUDIO" || t === "VIDEO" || e.remove();
|
|
2122
2122
|
}), Array.from(a.body.children).forEach((e) => {
|
|
2123
2123
|
e.tagName?.toUpperCase() !== "SCRIPT" && document.body.insertBefore(document.importNode(e, !0), o);
|
|
2124
|
-
})
|
|
2124
|
+
});
|
|
2125
|
+
let s = new Set(Array.from(document.querySelectorAll("script[src]")).map((e) => {
|
|
2126
|
+
try {
|
|
2127
|
+
return new URL(e.getAttribute("src") || "", window.location.href).href;
|
|
2128
|
+
} catch {
|
|
2129
|
+
return "";
|
|
2130
|
+
}
|
|
2131
|
+
}));
|
|
2132
|
+
for (let t of Array.from(a.body.querySelectorAll("script"))) {
|
|
2133
|
+
let n = t.getAttribute("src") || "";
|
|
2134
|
+
if (n.includes("flowengage")) continue;
|
|
2135
|
+
let r = document.createElement("script");
|
|
2136
|
+
if (n) {
|
|
2137
|
+
let i;
|
|
2138
|
+
try {
|
|
2139
|
+
i = new URL(n, e).href;
|
|
2140
|
+
} catch {
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
if (s.has(i)) continue;
|
|
2144
|
+
r.src = i, r.async = t.async, r.defer = t.defer;
|
|
2145
|
+
} else if (t.textContent.trim()) r.textContent = t.textContent;
|
|
2146
|
+
else continue;
|
|
2147
|
+
let i = t.getAttribute("type");
|
|
2148
|
+
i && i !== "text/javascript" && i !== "" && (r.type = i), document.body.insertBefore(r, o);
|
|
2149
|
+
}
|
|
2150
|
+
try {
|
|
2151
|
+
typeof window.Drupal?.attachBehaviors == "function" && window.Drupal.attachBehaviors(document.body, window.drupalSettings);
|
|
2152
|
+
} catch {}
|
|
2153
|
+
a.title && (document.title = a.title);
|
|
2125
2154
|
try {
|
|
2126
2155
|
history.pushState({ flowengageSpa: !0 }, "", e);
|
|
2127
2156
|
} catch {}
|