mftsccs-browser 2.1.88-beta → 2.1.89-beta
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/main.bundle.js
CHANGED
|
@@ -25936,45 +25936,44 @@ function checkIfExecutingProcess(messageId, type) {
|
|
|
25936
25936
|
}
|
|
25937
25937
|
});
|
|
25938
25938
|
}
|
|
25939
|
-
const myCacheServer = sessionStorage.getItem("myCacheServer")
|
|
25940
|
-
function getCacheServer(data) {
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
|
|
25957
|
-
|
|
25958
|
-
|
|
25959
|
-
|
|
25960
|
-
|
|
25961
|
-
|
|
25962
|
-
|
|
25963
|
-
|
|
25964
|
-
|
|
25965
|
-
|
|
25966
|
-
|
|
25967
|
-
|
|
25968
|
-
|
|
25969
|
-
|
|
25970
|
-
|
|
25971
|
-
|
|
25972
|
-
|
|
25973
|
-
|
|
25974
|
-
}
|
|
25975
|
-
|
|
25976
|
-
|
|
25977
|
-
}
|
|
25939
|
+
// const myCacheServer = sessionStorage.getItem("myCacheServer")
|
|
25940
|
+
// async function getCacheServer(data?: any) {
|
|
25941
|
+
// try {
|
|
25942
|
+
// const response = await fetch(BaseUrl.getMyCacheServer(), {
|
|
25943
|
+
// method: "POST",
|
|
25944
|
+
// headers: {
|
|
25945
|
+
// "Content-Type": "application/json",
|
|
25946
|
+
// },
|
|
25947
|
+
// body: JSON.stringify({
|
|
25948
|
+
// "my-coords": data ? data.coords : "location denied",
|
|
25949
|
+
// }),
|
|
25950
|
+
// });
|
|
25951
|
+
// if (!response.ok) {
|
|
25952
|
+
// throw new Error("Failed to sync data to the server.");
|
|
25953
|
+
// }
|
|
25954
|
+
// const cacheRes = await response.json();
|
|
25955
|
+
// if (cacheRes.success) {
|
|
25956
|
+
// sessionStorage.setItem("myCacheServer", cacheRes.nearestServer);
|
|
25957
|
+
// BaseUrl.NODE_CACHE_URL = cacheRes.nearestServer;
|
|
25958
|
+
// }
|
|
25959
|
+
// } catch (error: any) {
|
|
25960
|
+
// console.error("error getting cache server", error.message);
|
|
25961
|
+
// }
|
|
25962
|
+
// }
|
|
25963
|
+
// if (!myCacheServer) {
|
|
25964
|
+
// navigator.geolocation.getCurrentPosition(
|
|
25965
|
+
// async (data) => {
|
|
25966
|
+
// await getCacheServer(data);
|
|
25967
|
+
// },
|
|
25968
|
+
// async (error) => {
|
|
25969
|
+
// if (error.code === error.PERMISSION_DENIED) {
|
|
25970
|
+
// await getCacheServer();
|
|
25971
|
+
// }
|
|
25972
|
+
// }
|
|
25973
|
+
// );
|
|
25974
|
+
// } else {
|
|
25975
|
+
// BaseUrl.NODE_CACHE_URL = myCacheServer;
|
|
25976
|
+
// }
|
|
25978
25977
|
|
|
25979
25978
|
|
|
25980
25979
|
/***/ })
|