@opexa/portal-sdk 0.59.11 → 0.59.13
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/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6360,24 +6360,24 @@ function parseFbCxd(input) {
|
|
|
6360
6360
|
return { cxd, fbAdditionalCxd };
|
|
6361
6361
|
}
|
|
6362
6362
|
var thumbmark_instance;
|
|
6363
|
-
async function getFingerprint() {
|
|
6363
|
+
async function getFingerprint(environment) {
|
|
6364
6364
|
if (typeof window === "undefined") return null;
|
|
6365
6365
|
if (!thumbmark_instance) {
|
|
6366
6366
|
thumbmark_instance = new thumbmarkjs.Thumbmark({
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6367
|
+
logging: true,
|
|
6368
|
+
...environment === "production" && {
|
|
6369
|
+
api_key: "8294c227c5194f96e4deb022e8e76293",
|
|
6370
|
+
logging: false,
|
|
6371
|
+
timeout: 3e4,
|
|
6372
|
+
cache_lifetime_in_ms: 24 * 60 * 60 * 1e3
|
|
6373
|
+
}
|
|
6372
6374
|
});
|
|
6373
6375
|
}
|
|
6374
6376
|
try {
|
|
6375
|
-
const cached = sessionStorage.getItem("fingerprint");
|
|
6376
|
-
if (cached) return cached;
|
|
6377
6377
|
const result = await thumbmark_instance.get();
|
|
6378
|
-
sessionStorage.setItem("fingerprint", result.thumbmark);
|
|
6379
6378
|
return result.thumbmark;
|
|
6380
|
-
} catch {
|
|
6379
|
+
} catch (e) {
|
|
6380
|
+
console.warn(e);
|
|
6381
6381
|
return null;
|
|
6382
6382
|
}
|
|
6383
6383
|
}
|
|
@@ -9134,19 +9134,19 @@ var Sdk = class {
|
|
|
9134
9134
|
}
|
|
9135
9135
|
initMarketDomain() {
|
|
9136
9136
|
if (typeof window === "undefined") return;
|
|
9137
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
9138
|
+
const hostname = window.location.hostname;
|
|
9139
|
+
const market = searchParams.get("market");
|
|
9140
|
+
const adClickId = this.adManager.clickId;
|
|
9137
9141
|
if (core.Capacitor.isNativePlatform()) {
|
|
9138
9142
|
const platform = core.Capacitor.getPlatform();
|
|
9139
9143
|
if (platform === "ios") {
|
|
9140
|
-
sessionStorage.setItem("domain",
|
|
9144
|
+
sessionStorage.setItem("domain", `${hostname}/ios`);
|
|
9141
9145
|
} else {
|
|
9142
|
-
sessionStorage.setItem("domain",
|
|
9146
|
+
sessionStorage.setItem("domain", `${hostname}/android`);
|
|
9143
9147
|
}
|
|
9144
9148
|
return;
|
|
9145
9149
|
}
|
|
9146
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
9147
|
-
const hostname = window.location.hostname;
|
|
9148
|
-
const market = searchParams.get("market");
|
|
9149
|
-
const adClickId = this.adManager.clickId;
|
|
9150
9150
|
if (market) {
|
|
9151
9151
|
sessionStorage.setItem("domain", `${hostname}/${market}`);
|
|
9152
9152
|
} else if (adClickId) {
|
|
@@ -9257,7 +9257,7 @@ var Sdk = class {
|
|
|
9257
9257
|
};
|
|
9258
9258
|
}
|
|
9259
9259
|
async fingerprint() {
|
|
9260
|
-
return await getFingerprint();
|
|
9260
|
+
return await getFingerprint(this.config.environment ?? "development");
|
|
9261
9261
|
}
|
|
9262
9262
|
get miscMiddleware() {
|
|
9263
9263
|
return async (request) => {
|