Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- g as t
- } from "./p-5aa8a2e9.js";
- import "./p-4f1b6cc7.js";
- class e {
- static getJobUrl(t, e) {
- return "taleo" === t.sourceSystem ? e + "/job/" + encodeURIComponent(t.title.toLowerCase().replace(/\s/g, "-").replace(/[^\w-]/g, "")) + "-" + t.country + "/" + t.jobId : t.link
- }
- static getJobId() {
- return window.location.pathname.indexOf("/job/") > -1 ? window.location.pathname.split("/").pop() : void 0
- }
- static getCountry() {
- const t = window.location.pathname.split("/");
- let e = "";
- return t.length > 2 && 2 === t[1].length && (e = t[1].toUpperCase(), "DE" === e ? e = "1057" : "MX" === e ? e = "1136" : "IN" === e ? e = "1100" : "JP" === e ? e = "1110" : "AU" === e ? e = "1015" : "NL" === e ? e = "1009" : "BR" === e && (e = "1031")), e
- }
- static async isRussia(e) {
- let n = t().production ? "https://boehringer.talentsys.ru" : "https://test-boehringer.talentsys.ru",
- o = function() {
- let t = !1;
- const n = function() {
- let t = {};
- return document.cookie.split("; ").forEach((function(e) {
- let n = e.replace(" ", "").split("=");
- t[n[0]] = n[1]
- })), t.currentCountry || null
- }();
- return ["росси", "russia"].forEach((n => {
- ((null == e ? void 0 : e.country) || "").toLowerCase().includes(n) && (t = !0)
- })), t || (console.log("Country Source: Cookies, country is:", n), t = "RU" === n), t
- }(),
- r = o ? "RU" : "";
- return console.log("---= Dr.Watson is here BI-III:230331:1551 =---"), window.location.search.includes('fromTS') ? document.cookie = "currentCountry=; expires= Thu, 01 Jan 1970 00:00:01 GMT; path=/"
- : o ? i("RU") : await new Promise(((t, e) => {
- let n = Date.now();
- try {
- ! function() {
- var e;
- try {
- e = new XMLHttpRequest
- } catch (t) {
- return alert("Your browser does not support Ajax."), !1
- }
- e.onreadystatechange = function() {
- 4 == e.readyState && function(e) {
- r = e && e.responseText && JSON.parse(e.responseText) ? JSON.parse(e.responseText).country_code : "ipInfoFail", console.log("currentLocation::: ", r), r && "ipInfoFail" !== r && (document.cookie = "currentCountry=" + r + "; expires=" + new Date((new Date).getFullYear() + 1, (new Date).getMonth(), (new Date).getDate()).toUTCString() + "; path=/"), t(i(r)), console.log("Country Source: ipInfo, country is:", r), console.log("|| ipInfo timing:", (Date.now() - n).toString() + "ms ||")
- }(e)
- }, e.open("get", "https://ipgeolocation.abstractapi.com/v1/?api_key=4f98016a1ba14957a42d89074099f781", !0), e.send(null)
- }()
- } catch (t) {
- e(t)
- }
- }));
- function i(t) {
- if ("RU" === t) {
- const t = encodeURIComponent(`https://api012.successfactors.eu/career?company=BoehringerQA&career_job_req_id=${null==e?void 0:e.jobIdNoLocale}&career_ns=job_application&lang=ru_RU&fromTS`);
- return {
- status: !0,
- applyBtnUrl: encodeURI(n + "/gateway.html?recTitle=" + (null == e ? void 0 : e.title) + "&requisition=" + (null == e ? void 0 : e.jobIdNoLocale) + "&redirect=" + t),
- profileBtnUrl: encodeURI(n + "/login")
- }
- }
- return {
- status: !1
- }
- }
- }
- }
- export {
- e as B
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement