@getsoren/shared-module 2.65.0 → 2.66.0
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.js
CHANGED
|
@@ -821,7 +821,10 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
821
821
|
}, []),
|
|
822
822
|
printError: l
|
|
823
823
|
};
|
|
824
|
-
}, He = String.raw`(?:chauffeur|conducteur|op[ée]rateur|machiniste|driver|operator)`, Ue = String.raw`(?:(?:avec|with|incl(?:\.|uding|us)?|y\s+compris)\s+|\+\s*)(?:(?:un|une|le|la|son|sa|an?|the|its)\s+)?`, We = String.raw`(?:\s+(?:inclus|compris|included))?`, Ge = String.raw`(?:(?:(?:à\s+la|par|per|by\s+the|tarif)\s+)?(jours?|journ[ée]es?|journalier|days?)|(?:(?:à\s+l['’]\s*|(?:par|per|by\s+the|tarif)\s+))?(heures?|horaire|hours?))`, Ke = String.raw`(?:\s*[-–—,/·:]?\s*${Ge}|\s*\(\s*${Ge}\s*\))?`, qe = String.raw`(?:(?:location|rental|rented)\s+)?(?:${Ue}${He}${We}|${He}\s+(?:inclus|compris|included))${Ke}`, X = new RegExp(String.raw`\s*[[(]\s*${qe}\s*[\])]`, "giu"), Je = new RegExp(String.raw`(?:^|[\s,;:/|–—-])\s*${qe}\s*$`, "iu"), Ye = /[\s,;:/|–—-]+$/u, Xe = (
|
|
824
|
+
}, He = String.raw`(?:chauffeur|conducteur|op[ée]rateur|machiniste|driver|operator)`, Ue = String.raw`(?:(?:avec|with|incl(?:\.|uding|us)?|y\s+compris)\s+|\+\s*)(?:(?:un|une|le|la|son|sa|an?|the|its)\s+)?`, We = String.raw`(?:\s+(?:inclus|compris|included))?`, Ge = String.raw`(?:(?:(?:à\s+la|par|per|by\s+the|tarif)\s+)?(jours?|journ[ée]es?|journalier|days?)|(?:(?:à\s+l['’]\s*|(?:par|per|by\s+the|tarif)\s+))?(heures?|horaire|hours?))`, Ke = String.raw`(?:\s*[-–—,/·:]?\s*${Ge}|\s*\(\s*${Ge}\s*\))?`, qe = String.raw`(?:(?:location|rental|rented)\s+)?(?:${Ue}${He}${We}|${He}\s+(?:inclus|compris|included))${Ke}`, X = new RegExp(String.raw`\s*[[(]\s*${qe}\s*[\])]`, "giu"), Je = new RegExp(String.raw`(?:^|[\s,;:/|–—-])\s*${qe}\s*$`, "iu"), Ye = /[\s,;:/|–—-]+$/u, Xe = ([e]) => {
|
|
825
|
+
let t = e.replace(/^[\s,;:/|–—-]+/u, "").trim(), n = (/^[[(]/u.test(t) ? t.slice(1, -1) : t).trim().replace(/\s+/g, " ");
|
|
826
|
+
return n.charAt(0).toLocaleUpperCase() + n.slice(1);
|
|
827
|
+
}, Ze = (e) => e[1] || e[3] ? "days" : e[2] || e[4] ? "hours" : void 0, Qe = (e, { readDriver: t = !0 } = {}) => {
|
|
825
828
|
if (typeof e != "string") return {
|
|
826
829
|
label: "",
|
|
827
830
|
withDriver: !1
|
|
@@ -835,50 +838,52 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
835
838
|
label: e.trim(),
|
|
836
839
|
withDriver: !1
|
|
837
840
|
};
|
|
838
|
-
let s = o.replace(Ye, "").replace(/\s{2,}/g, " ").trim(), c = [...r, ...a ? [a] : []].map(
|
|
839
|
-
return s ?
|
|
840
|
-
|
|
841
|
+
let s = o.replace(Ye, "").replace(/\s{2,}/g, " ").trim(), c = [...r, ...a ? [a] : []], l = c.map(Ze).find(Boolean), u = Xe(c[0]);
|
|
842
|
+
return s ? l ? {
|
|
843
|
+
driverMention: u,
|
|
844
|
+
driverUnit: l,
|
|
841
845
|
label: s,
|
|
842
846
|
withDriver: !0
|
|
843
847
|
} : {
|
|
848
|
+
driverMention: u,
|
|
844
849
|
label: s,
|
|
845
850
|
withDriver: !0
|
|
846
851
|
} : {
|
|
847
852
|
label: e.trim(),
|
|
848
853
|
withDriver: !1
|
|
849
854
|
};
|
|
850
|
-
},
|
|
855
|
+
}, $e = "chunk-reload-timestamp", Z = "chunk-reload", et = 1e4, Q = 2, tt = !1;
|
|
851
856
|
if (!P && typeof window < "u") {
|
|
852
857
|
try {
|
|
853
858
|
let e = new URL(window.location.href);
|
|
854
|
-
e.searchParams.has(Z) && (
|
|
859
|
+
e.searchParams.has(Z) && (tt = !0, e.searchParams.delete(Z), window.history.replaceState(null, "", e.toString()));
|
|
855
860
|
} catch {}
|
|
856
861
|
window.addEventListener("vite:preloadError", (e) => {
|
|
857
862
|
e.preventDefault();
|
|
858
863
|
});
|
|
859
864
|
}
|
|
860
|
-
var
|
|
865
|
+
var nt = (e) => {
|
|
861
866
|
if (!(e instanceof Error)) return !1;
|
|
862
867
|
let t = e.message.toLowerCase();
|
|
863
868
|
return t.includes("dynamically imported module") || t.includes("importing a module script failed") || t.includes("loading chunk") || t.includes("loading css chunk") || t.includes("unable to preload css") || t.includes("failed to fetch") || t.includes("error loading dynamically imported module") || t.includes("load failed") || t.includes("without a valid default export") || e.name === "ChunkLoadError";
|
|
864
|
-
},
|
|
869
|
+
}, rt = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, it = (e) => e.toString().match(rt)?.[2] ?? null, at = (e) => {
|
|
865
870
|
try {
|
|
866
871
|
return sessionStorage.getItem(e);
|
|
867
872
|
} catch {
|
|
868
873
|
return null;
|
|
869
874
|
}
|
|
870
|
-
},
|
|
875
|
+
}, ot = (e, t) => {
|
|
871
876
|
try {
|
|
872
877
|
sessionStorage.setItem(e, t);
|
|
873
878
|
} catch {}
|
|
874
|
-
},
|
|
879
|
+
}, st = (e) => Function("url", "return import(url)")(e), ct = async (e) => {
|
|
875
880
|
for (let t = 0; t < Q; t++) try {
|
|
876
|
-
return await
|
|
881
|
+
return await st(`${e}?t=${Date.now()}`);
|
|
877
882
|
} catch {
|
|
878
883
|
t < Q - 1 && await new Promise((e) => setTimeout(e, 500 * 2 ** t));
|
|
879
884
|
}
|
|
880
885
|
throw Error(`Failed to import ${e} after ${Q} retries`);
|
|
881
|
-
},
|
|
886
|
+
}, lt = async () => {
|
|
882
887
|
try {
|
|
883
888
|
if (typeof navigator < "u" && "serviceWorker" in navigator) {
|
|
884
889
|
let e = await navigator.serviceWorker.getRegistrations();
|
|
@@ -889,28 +894,28 @@ var tt = (e) => {
|
|
|
889
894
|
await Promise.all(e.map((e) => caches.delete(e)));
|
|
890
895
|
}
|
|
891
896
|
} catch {}
|
|
892
|
-
},
|
|
893
|
-
await
|
|
897
|
+
}, ut = async () => {
|
|
898
|
+
await lt();
|
|
894
899
|
let e = new URL(window.location.href);
|
|
895
900
|
e.searchParams.set(Z, String(Date.now())), window.location.replace(e.toString());
|
|
896
|
-
},
|
|
901
|
+
}, dt = (e) => e != null && e.default !== void 0, ft = (e) => r(async () => {
|
|
897
902
|
let t;
|
|
898
903
|
try {
|
|
899
904
|
let n = await e();
|
|
900
|
-
if (
|
|
905
|
+
if (dt(n)) return n;
|
|
901
906
|
t = /* @__PURE__ */ Error("Module resolved without a valid default export");
|
|
902
907
|
} catch (e) {
|
|
903
908
|
t = e;
|
|
904
909
|
}
|
|
905
|
-
if (P || !
|
|
906
|
-
let n =
|
|
910
|
+
if (P || !nt(t)) throw t;
|
|
911
|
+
let n = it(e);
|
|
907
912
|
if (n) try {
|
|
908
|
-
let e = await
|
|
909
|
-
if (
|
|
913
|
+
let e = await ct(n);
|
|
914
|
+
if (dt(e)) return e;
|
|
910
915
|
} catch {}
|
|
911
|
-
let r = Number(
|
|
912
|
-
return Date.now() - r <
|
|
913
|
-
}),
|
|
916
|
+
let r = Number(at($e) || "0");
|
|
917
|
+
return Date.now() - r < et || tt || (ot($e, String(Date.now())), await ut()), { default: () => null };
|
|
918
|
+
}), pt = "Page Left", mt = 1800 * 1e3, ht = 1e3, gt = (e, t = !0) => {
|
|
914
919
|
let n = 0, r = t ? e : null, i = !1, a = (e) => {
|
|
915
920
|
r !== null && (n += Math.max(0, e - r), r = null);
|
|
916
921
|
};
|
|
@@ -921,39 +926,39 @@ var tt = (e) => {
|
|
|
921
926
|
resume: (e) => {
|
|
922
927
|
!i && r === null && (r = e);
|
|
923
928
|
},
|
|
924
|
-
stop: (e) => (i ||= (a(e), !0), Math.min(
|
|
929
|
+
stop: (e) => (i ||= (a(e), !0), Math.min(mt, Math.round(n)))
|
|
925
930
|
};
|
|
926
|
-
},
|
|
931
|
+
}, _t = (e, t) => t < 1e3 ? null : {
|
|
927
932
|
duration_ms: Math.round(t),
|
|
928
933
|
page_path: e
|
|
929
|
-
},
|
|
934
|
+
}, vt = (e) => {
|
|
930
935
|
if (typeof e != "object" || !e) return !1;
|
|
931
936
|
let { exp: t, sub: n, entity_id: r, scope: i } = e;
|
|
932
937
|
return typeof t == "number" && typeof n == "string" && typeof r == "number" && Array.isArray(i) && i.every((e) => typeof e == "string");
|
|
933
|
-
},
|
|
938
|
+
}, yt = (e) => {
|
|
934
939
|
let t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t + "=".repeat((4 - t.length % 4) % 4);
|
|
935
940
|
return decodeURIComponent(Array.from(atob(n), (e) => `%${e.charCodeAt(0).toString(16).padStart(2, "0")}`).join(""));
|
|
936
|
-
},
|
|
941
|
+
}, bt = (e) => {
|
|
937
942
|
let t = e?.split(".")[1];
|
|
938
943
|
if (!t) return null;
|
|
939
944
|
try {
|
|
940
|
-
let e = JSON.parse(
|
|
941
|
-
return
|
|
945
|
+
let e = JSON.parse(yt(t));
|
|
946
|
+
return vt(e) ? e : null;
|
|
942
947
|
} catch {
|
|
943
948
|
return null;
|
|
944
949
|
}
|
|
945
|
-
}, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""),
|
|
950
|
+
}, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""), xt = async (e, t) => {
|
|
946
951
|
let n = new TextEncoder(), r = await crypto.subtle.importKey("raw", n.encode(e), {
|
|
947
952
|
hash: "SHA-256",
|
|
948
953
|
name: "HMAC"
|
|
949
954
|
}, !1, ["sign"]), i = await crypto.subtle.sign("HMAC", r, n.encode(t));
|
|
950
955
|
return $(String.fromCharCode(...new Uint8Array(i)));
|
|
951
|
-
},
|
|
956
|
+
}, St = async (e, t) => {
|
|
952
957
|
let n = `${$(JSON.stringify({
|
|
953
958
|
alg: "HS256",
|
|
954
959
|
typ: "JWT"
|
|
955
960
|
}))}.${$(JSON.stringify(e))}`;
|
|
956
|
-
return `${n}.${await
|
|
961
|
+
return `${n}.${await xt(t, n)}`;
|
|
957
962
|
};
|
|
958
963
|
//#endregion
|
|
959
|
-
export { k as AMPLITUDE_FEATURE_SELECTOR, D as AutoReloadOnNewVersion, _ as ChatClient, W as ChatContext, _e as ChatProvider, O as GTMSendPageView, N as InitializeAmplitude, re as InitializeAxiosConfig, oe as InitializeDaysJSConfig, se as InitializeHubSpot, ce as InitializeI18nConfig, le as InitializeSentryConfig, y as InjectDependenciesContext, b as InjectDependenciesProvider, v as MaskTextField,
|
|
964
|
+
export { k as AMPLITUDE_FEATURE_SELECTOR, D as AutoReloadOnNewVersion, _ as ChatClient, W as ChatContext, _e as ChatProvider, O as GTMSendPageView, N as InitializeAmplitude, re as InitializeAxiosConfig, oe as InitializeDaysJSConfig, se as InitializeHubSpot, ce as InitializeI18nConfig, le as InitializeSentryConfig, y as InjectDependenciesContext, b as InjectDependenciesProvider, v as MaskTextField, mt as PAGE_DURATION_CAP_MS, ht as PAGE_DURATION_MIN_MS, pt as PAGE_LEFT_EVENT, Se as QueryProvider, de as RequireAuth, B as SENTRY_IGNORED_REQUEST_URLS, R as SENTRY_KEEP_REPLAY, ie as SUPPORTED_LANGUAGE, fe as ShowHubSpotBubble, Qe as articleNameAdapter, gt as createVisibleStopwatch, K as dateAdapter, bt as decodeToken, q as distanceAdapter, St as encodeToken, Y as getCurrentLanguage, e as getOrvalConfig, z as isReplayKeptForError, ft as lazyWithRetry, V as matchesRequestUrl, _t as pageLeftProperties, G as shouldRetryQuery, Te as useAdapter, Ee as useAmplitude, De as useAuth, Ae as useChat, je as useCurrentLanguage, Le as useFilters, ze as useHubSpot, Be as useInfiniteDataGrid, Ve as useResponseError, J as worksiteNameAdapter };
|
|
@@ -15,6 +15,11 @@ export interface ArticleName {
|
|
|
15
15
|
* differ by it alone ("[Avec opérateur Jours]", "[Avec opérateur Heures]"): the tag says it.
|
|
16
16
|
*/
|
|
17
17
|
driverUnit?: DriverUnit;
|
|
18
|
+
/**
|
|
19
|
+
* The mention as the name writes it, without its brackets nor the separator before it ("Avec opérateur Jours"), its
|
|
20
|
+
* first letter capitalised: what a tag shows in its place.
|
|
21
|
+
*/
|
|
22
|
+
driverMention?: string;
|
|
18
23
|
}
|
|
19
24
|
export type DriverUnit = "days" | "hours";
|
|
20
25
|
export interface ArticleNameOptions {
|