PageSourceSearch

https://hunter.io/assets/PreviewSection-CNojtz8a.js

js hunter.io collected 2026-10-01 08:26:52 UTC 7,511 bytes, 214 lines download raw bytes

1(function() {
2	try {
3		var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
4		e.SENTRY_RELEASE = { id: "9bd7631" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2434e007-3701-4807-81c2-1e2e4b50e39f", e._sentryDebugIdIdentifier = "sentry-dbid-2434e007-3701-4807-81c2-1e2e4b50e39f");
7	} catch (e) {}
8})();
9import { n as __esmMin, r as __exportAll } from "./rolldown-runtime-C0oiEAqH.js";
10import { i as require_compiler_runtime, t as require_jsx_runtime } from "./jsx-runtime-BypSXy5Z.js";
11import { t as require_react } from "./react-CRpDT2aV.js";
12import { n as init_icon, t as Icon } from "./icon-DZ9gyktL.js";
13//#region app/frontend/pages/BulkVerifications/PreviewSection.tsx
14var PreviewSection_exports = /* @__PURE__ */ __exportAll({ PreviewSection: () => PreviewSection });
15function humanize(value) {
16	const spaced = value.replace(/_/g, " ");
17	return spaced.charAt(0).toUpperCase() + spaced.slice(1);
18}
19function ResultCell(t0) {
20	const $ = (0, import_compiler_runtime.c)(3);
21	const { result } = t0;
22	if (result === "deliverable") {
23		let t1;
24		if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
25			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "legend-color valid-color" }), "Valid"] });
26			$[0] = t1;
27		} else t1 = $[0];
28		return t1;
29	}
30	if (result === "risky") {
31		let t1;
32		if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
33			t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "legend-color accept_all-color" }), "Risky"] });
34			$[1] = t1;
35		} else t1 = $[1];
36		return t1;
37	}
38	let t1;
39	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
40		t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "legend-color invalid-color" }), "Invalid"] });
41		$[2] = t1;
42	} else t1 = $[2];
43	return t1;
44}
45function PreviewSection(t0) {
46	const $ = (0, import_compiler_runtime.c)(22);
47	const { previewPath, hasStatuses } = t0;
48	const [state, setState] = (0, import_react.useState)("loading");
49	let t1;
50	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
51		t1 = [];
52		$[0] = t1;
53	} else t1 = $[0];
54	const [rows, setRows] = (0, import_react.useState)(t1);
55	const [andMore, setAndMore] = (0, import_react.useState)(null);
56	let t2;
57	let t3;
58	if ($[1] !== previewPath) {
59		t2 = () => {
60			let cancelled = false;
61			fetch(previewPath, {
62				headers: { Accept: "application/json" },
63				credentials: "same-origin"
64			}).then(_temp).then((data) => {
65				if (cancelled) return;
66				setState(data.state ?? "empty");
67				setRows(data.rows ?? []);
68				setAndMore(data.and_more ?? null);
69			}).catch(() => {
70				if (!cancelled) setState("empty");
71			});
72			return () => {
73				cancelled = true;
74			};
75		};
76		t3 = [previewPath];
77		$[1] = previewPath;
78		$[2] = t2;
79		$[3] = t3;
80	} else {
81		t2 = $[2];
82		t3 = $[3];
83	}
84	(0, import_react.useEffect)(t2, t3);
85	if (state === "loading") {
86		let t4;
87		if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
88			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
89				id: "preview-loader",
90				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
91					icon: "spinner-third",
92					className: "fa-spin"
93				}), " Loading…"]
94			});
95			$[4] = t4;
96		} else t4 = $[4];
97		return t4;
98	}
99	if (state === "rate_limited") {
100		let t4;
101		if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
102			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "You reached the number of previews allowed for this bulk verification." });
103			$[5] = t4;
104		} else t4 = $[5];
105		return t4;
106	}
107	if (state === "not_exists") {
108		let t4;
109		if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
110			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
111				className: "light-grey",
112				children: "This bulk does not exist."
113			});
114			$[6] = t4;
115		} else t4 = $[6];
116		return t4;
117	}
118	if (state === "empty" || rows.length === 0) {
119		let t4;
120		if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
121			t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
122				className: "light-grey",
123				children: "We could not generate a preview for this bulk."
124			});
125			$[7] = t4;
126		} else t4 = $[7];
127		return t4;
128	}
129	let t4;
130	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
131		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Email" });
132		$[8] = t4;
133	} else t4 = $[8];
134	const t5 = hasStatuses ? "Status" : "Result";
135	let t6;
136	if ($[9] !== t5) {
137		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: t5 });
138		$[9] = t5;
139		$[10] = t6;
140	} else t6 = $[10];
141	let t7;
142	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
143		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Score" });
144		$[11] = t7;
145	} else t7 = $[11];
146	let t8;
147	if ($[12] !== t6) {
148		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
149			t4,
150			t6,
151			t7
152		] });
153		$[12] = t6;
154		$[13] = t8;
155	} else t8 = $[13];
156	let t9;
157	if ($[14] !== rows) {
158		t9 = rows.map(_temp2);
159		$[14] = rows;
160		$[15] = t9;
161	} else t9 = $[15];
162	let t10;
163	if ($[16] !== andMore) {
164		t10 = andMore !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
165			colSpan: 3,
166			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
167				className: "light-grey",
168				children: andMore === 1 ? "And 1 more for email address" : `And ${andMore.toLocaleString("en-US")} more for email adresses`
169			})
170		}) });
171		$[16] = andMore;
172		$[17] = t10;
173	} else t10 = $[17];
174	let t11;
175	if ($[18] !== t10 || $[19] !== t8 || $[20] !== t9) {
176		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
177			className: "horizontal-scroll",
178			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", {
179				className: "preview-table full-width-table",
180				children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tbody", { children: [
181					t8,
182					t9,
183					t10
184				] })
185			})
186		});
187		$[18] = t10;
188		$[19] = t8;
189		$[20] = t9;
190		$[21] = t11;
191	} else t11 = $[21];
192	return t11;
193}
194function _temp2(row, index) {
195	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
196		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: row.email }),
197		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: row.status ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `legend-color ${row.status}-color` }), humanize(row.status)] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResultCell, { result: row.result }) }),
198		/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: row.score > 0 ? `${row.score}%` : "-" })
199	] }, index);
200}
201function _temp(response) {
202	return response.json();
203}
204var import_compiler_runtime, import_react, import_jsx_runtime;
205function init_PreviewSection() {
206	return (init_PreviewSection = __esmMin((() => {
207		import_compiler_runtime = require_compiler_runtime();
208		import_react = require_react();
209		init_icon();
210		import_jsx_runtime = require_jsx_runtime();
211	})))();
212}
213//#endregion
214export { PreviewSection_exports as n, init_PreviewSection as r, PreviewSection as t };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.