PageSourceSearch

https://hunter.io/assets/Index-cYk15rja.js

js hunter.io collected 2026-09-24 07:51:58 UTC 61,282 bytes, 1,938 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: "b96dc26" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6cce6ae3-7f66-4c4c-92cb-e722936fb485", e._sentryDebugIdIdentifier = "sentry-dbid-6cce6ae3-7f66-4c4c-92cb-e722936fb485");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { As as Input, Mi as init_routes, Os as Checkbox, Xt as init_label, Yt as Label, an as CollapsibleTrigger, as as user_registration_path, cs as users_sso_path, ds as users_update_notifications_path, fn as formatNumber, in as CollapsibleContent, is as user_password_path, it as AlertContent, js as init_input, ki as help_articles_password_policy_path, ks as init_checkbox, ls as users_subprocessors_subscriptions_path, lt as init_alert, nt as Alert, on as init_collapsible, os as users_accept_terms_path, pn as init_text_helpers, rn as Collapsible, rt as AlertActions, ss as users_change_email_index_path, st as AlertIcon, us as users_update_cookies_path } from "./controllers-jdPQjaCB.js";
11import { t as dictLookup } from "./type-guards-DVyG5ljW.js";
12import { i as require_compiler_runtime, o as copyToClipboard, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
13import { t as require_react } from "./react-CrLPhuc5.js";
14import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
15import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
16import { hn as init_page_header, mn as PageHeaderTitle, pn as PageHeaderSubtitle, sn as PageHeader } from "./turbo-mount-DM0tFk1M.js";
17import { n as Select, r as init_select } from "./select-CGg0QGYX.js";
18import { a as DialogFooter, i as DialogContent, n as DialogBody, o as DialogHeader, r as DialogCloseButton, s as DialogTitle, t as Dialog, u as init_dialog } from "./dialog-XgiZyeRA.js";
19import { n as useDialog, t as init_useDialog } from "./useDialog-CwjC07YA.js";
20import { a as init_dist$1, l as router, s as usePage, t as Head_default } from "./dist-ZlUHm0R7.js";
21import { n as init_switch, t as Switch } from "./switch-BaZYiTgE.js";
22//#region app/frontend/pages/Account/AccordionSection.tsx
23function AccordionSection(t0) {
24	const $ = (0, import_compiler_runtime$6.c)(26);
25	const { id, icon, title, subtitle, isOpen, onToggle, children } = t0;
26	let t1;
27	if ($[0] !== id || $[1] !== onToggle) {
28		t1 = () => onToggle(id);
29		$[0] = id;
30		$[1] = onToggle;
31		$[2] = t1;
32	} else t1 = $[2];
33	const t2 = `row-container${isOpen ? " active" : ""}`;
34	let t3;
35	if ($[3] !== icon) {
36		t3 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)("span", {
37			className: "row-title-icon",
38			children: /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)(Icon, {
39				icon,
40				variant: "light",
41				size: "xl"
42			})
43		});
44		$[3] = icon;
45		$[4] = t3;
46	} else t3 = $[4];
47	let t4;
48	if ($[5] !== title) {
49		t4 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)("h3", { children: title });
50		$[5] = title;
51		$[6] = t4;
52	} else t4 = $[6];
53	let t5;
54	if ($[7] !== subtitle) {
55		t5 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)("span", {
56			className: "grey",
57			children: subtitle
58		});
59		$[7] = subtitle;
60		$[8] = t5;
61	} else t5 = $[8];
62	let t6;
63	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
64		t6 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)(Icon, {
65			icon: "angle-down",
66			className: "caret-icon",
67			"aria-hidden": true
68		});
69		$[9] = t6;
70	} else t6 = $[9];
71	let t7;
72	if ($[10] !== id || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
73		t7 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsxs)(CollapsibleTrigger, {
74			id,
75			className: "row-title",
76			children: [
77				t3,
78				t4,
79				t5,
80				t6
81			]
82		});
83		$[10] = id;
84		$[11] = t3;
85		$[12] = t4;
86		$[13] = t5;
87		$[14] = t7;
88	} else t7 = $[14];
89	const t8 = !isOpen;
90	let t9;
91	if ($[15] !== children) {
92		t9 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)("div", {
93			className: "row-detail",
94			children
95		});
96		$[15] = children;
97		$[16] = t9;
98	} else t9 = $[16];
99	let t10;
100	if ($[17] !== t8 || $[18] !== t9) {
101		t10 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsx)(CollapsibleContent, {
102			className: "row-detail-content",
103			forceMount: true,
104			inert: t8,
105			children: t9
106		});
107		$[17] = t8;
108		$[18] = t9;
109		$[19] = t10;
110	} else t10 = $[19];
111	let t11;
112	if ($[20] !== isOpen || $[21] !== t1 || $[22] !== t10 || $[23] !== t2 || $[24] !== t7) {
113		t11 = /* @__PURE__ */ (0, import_jsx_runtime$9.jsxs)(Collapsible, {
114			open: isOpen,
115			onOpenChange: t1,
116			className: t2,
117			children: [t7, t10]
118		});
119		$[20] = isOpen;
120		$[21] = t1;
121		$[22] = t10;
122		$[23] = t2;
123		$[24] = t7;
124		$[25] = t11;
125	} else t11 = $[25];
126	return t11;
127}
128var import_compiler_runtime$6, import_jsx_runtime$9;
129function init_AccordionSection() {
130	return (init_AccordionSection = __esmMin((() => {
131		import_compiler_runtime$6 = require_compiler_runtime();
132		init_collapsible();
133		init_icon();
134		import_jsx_runtime$9 = require_jsx_runtime();
135	})))();
136}
137//#endregion
138//#region app/frontend/pages/Account/AccountInformationSection.tsx
139function AccountInformationSection(t0) {
140	const $ = (0, import_compiler_runtime$5.c)(55);
141	const { account, timeZones } = t0;
142	const [firstName, setFirstName] = (0, import_react$7.useState)(account.firstName ?? "");
143	const [lastName, setLastName] = (0, import_react$7.useState)(account.lastName ?? "");
144	const [timeZone, setTimeZone] = (0, import_react$7.useState)(account.timeZone || "UTC");
145	const [processing, setProcessing] = (0, import_react$7.useState)(false);
146	let t1;
147	if ($[0] !== timeZone || $[1] !== timeZones) {
148		t1 = timeZones.find((option) => option.value === timeZone) ?? null;
149		$[0] = timeZone;
150		$[1] = timeZones;
151		$[2] = t1;
152	} else t1 = $[2];
153	const selectedTimeZone = t1;
154	let t2;
155	if ($[3] !== firstName || $[4] !== lastName || $[5] !== timeZone) {
156		t2 = function handleSubmit(event) {
157			event.preventDefault();
158			setProcessing(true);
159			router.put(user_registration_path(), { user: {
160				first_name: firstName,
161				last_name: lastName,
162				time_zone: timeZone
163			} }, {
164				preserveScroll: true,
165				onFinish: () => setProcessing(false)
166			});
167		};
168		$[3] = firstName;
169		$[4] = lastName;
170		$[5] = timeZone;
171		$[6] = t2;
172	} else t2 = $[6];
173	const handleSubmit = t2;
174	let t3;
175	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
176		t3 = function disconnectSso() {
177			router.delete(users_sso_path(), { preserveScroll: true });
178		};
179		$[7] = t3;
180	} else t3 = $[7];
181	const disconnectSso = t3;
182	let t4;
183	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
184		t4 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Label, {
185			htmlFor: "user_email_address",
186			fullWidth: true,
187			className: "mb-05",
188			children: i18n.t("js.account.sections.account_information.email_address_label")
189		});
190		$[8] = t4;
191	} else t4 = $[8];
192	let t5;
193	if ($[9] !== account.autoGeneratedPassword) {
194		t5 = account.autoGeneratedPassword && /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("div", {
195			className: "h-hint mb-1",
196			children: i18n.t("js.account.sections.account_information.set_password")
197		});
198		$[9] = account.autoGeneratedPassword;
199		$[10] = t5;
200	} else t5 = $[10];
201	let t6;
202	if ($[11] !== account.email) {
203		t6 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Input, {
204			id: "user_email_address",
205			type: "text",
206			readOnly: true,
207			value: account.email
208		});
209		$[11] = account.email;
210		$[12] = t6;
211	} else t6 = $[12];
212	let t7;
213	if ($[13] !== account.autoGeneratedPassword) {
214		t7 = !account.autoGeneratedPassword && /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Button, {
215			asChild: true,
216			children: /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("a", {
217				href: users_change_email_index_path(),
218				children: i18n.t("js.account.sections.account_information.change")
219			})
220		});
221		$[13] = account.autoGeneratedPassword;
222		$[14] = t7;
223	} else t7 = $[14];
224	let t8;
225	if ($[15] !== account.hasSsoConnection) {
226		t8 = account.hasSsoConnection && /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Button, {
227			type: "button",
228			onClick: disconnectSso,
229			children: i18n.t("js.account.sections.account_information.disconnect")
230		});
231		$[15] = account.hasSsoConnection;
232		$[16] = t8;
233	} else t8 = $[16];
234	let t9;
235	if ($[17] !== t6 || $[18] !== t7 || $[19] !== t8) {
236		t9 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
237			className: "account-email-address",
238			children: [
239				t6,
240				t7,
241				t8
242			]
243		});
244		$[17] = t6;
245		$[18] = t7;
246		$[19] = t8;
247		$[20] = t9;
248	} else t9 = $[20];
249	let t10;
250	if ($[21] !== t5 || $[22] !== t9) {
251		t10 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
252			className: "form-group",
253			children: [
254				t4,
255				t5,
256				t9
257			]
258		});
259		$[21] = t5;
260		$[22] = t9;
261		$[23] = t10;
262	} else t10 = $[23];
263	let t11;
264	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
265		t11 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("hr", {});
266		$[24] = t11;
267	} else t11 = $[24];
268	let t12;
269	if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
270		t12 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Label, {
271			htmlFor: "user_first_name",
272			children: i18n.t("js.account.sections.account_information.first_name")
273		});
274		$[25] = t12;
275	} else t12 = $[25];
276	let t13;
277	let t14;
278	if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
279		t13 = (event_0) => setFirstName(event_0.target.value);
280		t14 = i18n.t("js.account.sections.account_information.first_name");
281		$[26] = t13;
282		$[27] = t14;
283	} else {
284		t13 = $[26];
285		t14 = $[27];
286	}
287	let t15;
288	if ($[28] !== firstName) {
289		t15 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
290			className: "col-md-4",
291			children: [t12, /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Input, {
292				id: "user_first_name",
293				value: firstName,
294				onChange: t13,
295				placeholder: t14,
296				required: true,
297				fullWidth: true
298			})]
299		});
300		$[28] = firstName;
301		$[29] = t15;
302	} else t15 = $[29];
303	let t16;
304	if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
305		t16 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Label, {
306			htmlFor: "user_last_name",
307			children: i18n.t("js.account.sections.account_information.last_name")
308		});
309		$[30] = t16;
310	} else t16 = $[30];
311	let t17;
312	let t18;
313	if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
314		t17 = (event_1) => setLastName(event_1.target.value);
315		t18 = i18n.t("js.account.sections.account_information.last_name");
316		$[31] = t17;
317		$[32] = t18;
318	} else {
319		t17 = $[31];
320		t18 = $[32];
321	}
322	let t19;
323	if ($[33] !== lastName) {
324		t19 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
325			className: "col-md-4",
326			children: [t16, /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Input, {
327				id: "user_last_name",
328				value: lastName,
329				onChange: t17,
330				placeholder: t18,
331				required: true,
332				fullWidth: true
333			})]
334		});
335		$[33] = lastName;
336		$[34] = t19;
337	} else t19 = $[34];
338	let t20;
339	if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
340		t20 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Label, {
341			htmlFor: "user_time_zone",
342			children: i18n.t("js.account.sections.account_information.account_time_zone")
343		});
344		$[35] = t20;
345	} else t20 = $[35];
346	let t21;
347	if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
348		t21 = (option_0) => setTimeZone(option_0?.value ?? "UTC");
349		$[36] = t21;
350	} else t21 = $[36];
351	let t22;
352	if ($[37] !== selectedTimeZone || $[38] !== timeZones) {
353		t22 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
354			className: "col-md-4",
355			children: [t20, /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Select, {
356				inputId: "user_time_zone",
357				options: timeZones,
358				value: selectedTimeZone,
359				onChange: t21,
360				isSearchable: true
361			})]
362		});
363		$[37] = selectedTimeZone;
364		$[38] = timeZones;
365		$[39] = t22;
366	} else t22 = $[39];
367	let t23;
368	if ($[40] !== t15 || $[41] !== t19 || $[42] !== t22) {
369		t23 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("div", {
370			className: "form-group",
371			children: /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("div", {
372				className: "row",
373				children: [
374					t15,
375					t19,
376					t22
377				]
378			})
379		});
380		$[40] = t15;
381		$[41] = t19;
382		$[42] = t22;
383		$[43] = t23;
384	} else t23 = $[43];
385	let t24;
386	if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
387		t24 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("hr", {});
388		$[44] = t24;
389	} else t24 = $[44];
390	let t25;
391	if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
392		t25 = i18n.t("js.account.sections.account_information.update_details");
393		$[45] = t25;
394	} else t25 = $[45];
395	let t26;
396	if ($[46] !== processing) {
397		t26 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)("div", {
398			className: "mt-6",
399			children: /* @__PURE__ */ (0, import_jsx_runtime$8.jsx)(Button, {
400				type: "submit",
401				variant: "primary",
402				disabled: processing,
403				children: t25
404			})
405		});
406		$[46] = processing;
407		$[47] = t26;
408	} else t26 = $[47];
409	let t27;
410	if ($[48] !== handleSubmit || $[49] !== t23 || $[50] !== t26) {
411		t27 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)("form", {
412			onSubmit: handleSubmit,
413			"data-turbo": "false",
414			children: [
415				t23,
416				t24,
417				t26
418			]
419		});
420		$[48] = handleSubmit;
421		$[49] = t23;
422		$[50] = t26;
423		$[51] = t27;
424	} else t27 = $[51];
425	let t28;
426	if ($[52] !== t10 || $[53] !== t27) {
427		t28 = /* @__PURE__ */ (0, import_jsx_runtime$8.jsxs)(import_jsx_runtime$8.Fragment, { children: [
428			t10,
429			t11,
430			t27
431		] });
432		$[52] = t10;
433		$[53] = t27;
434		$[54] = t28;
435	} else t28 = $[54];
436	return t28;
437}
438var import_compiler_runtime$5, import_react$7, import_jsx_runtime$8;
439function init_AccountInformationSection() {
440	return (init_AccountInformationSection = __esmMin((() => {
441		import_compiler_runtime$5 = require_compiler_runtime();
442		import_react$7 = require_react();
443		init_dist$1();
444		init_button();
445		init_input();
446		init_label();
447		init_select();
448		init_routes();
449		import_jsx_runtime$8 = require_jsx_runtime();
450	})))();
451}
452//#endregion
453//#region app/frontend/pages/Account/PasswordSection.tsx
454function firstError(value) {
455	return Array.isArray(value) ? value[0] : value;
456}
457function PasswordSection(t0) {
458	const $ = (0, import_compiler_runtime$4.c)(55);
459	const { account, errors } = t0;
460	const [password, setPassword] = (0, import_react$6.useState)("");
461	const [currentPassword, setCurrentPassword] = (0, import_react$6.useState)("");
462	const [processing, setProcessing] = (0, import_react$6.useState)(false);
463	let t1;
464	if ($[0] !== errors.password) {
465		t1 = firstError(errors.password);
466		$[0] = errors.password;
467		$[1] = t1;
468	} else t1 = $[1];
469	const passwordError = t1;
470	let t2;
471	if ($[2] !== errors.currentPassword) {
472		t2 = firstError(errors.currentPassword);
473		$[2] = errors.currentPassword;
474		$[3] = t2;
475	} else t2 = $[3];
476	const currentPasswordError = t2;
477	const hasErrors = Boolean(passwordError || currentPasswordError);
478	let t3;
479	if ($[4] !== account.email) {
480		t3 = (event) => {
481			event.preventDefault();
482			setProcessing(true);
483			router.post(user_password_path(), { user: { email: account.email } }, {
484				preserveScroll: true,
485				onFinish: () => setProcessing(false)
486			});
487		};
488		$[4] = account.email;
489		$[5] = t3;
490	} else t3 = $[5];
491	const requestPassword = t3;
492	let t4;
493	if ($[6] !== currentPassword || $[7] !== password) {
494		t4 = (event_0) => {
495			event_0.preventDefault();
496			setProcessing(true);
497			router.put(user_registration_path(), { user: {
498				password,
499				current_password: currentPassword
500			} }, {
501				preserveScroll: true,
502				onSuccess: () => {
503					setPassword("");
504					setCurrentPassword("");
505				},
506				onFinish: () => setProcessing(false)
507			});
508		};
509		$[6] = currentPassword;
510		$[7] = password;
511		$[8] = t4;
512	} else t4 = $[8];
513	const changePassword = t4;
514	if (account.autoGeneratedPassword) {
515		let t5;
516		let t6;
517		if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
518			t5 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("p", { children: i18n.t("js.account.sections.password.signup_with_google") });
519			t6 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("hr", {});
520			$[9] = t5;
521			$[10] = t6;
522		} else {
523			t5 = $[9];
524			t6 = $[10];
525		}
526		let t7;
527		if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
528			t7 = i18n.t("js.account.sections.password.set_password");
529			$[11] = t7;
530		} else t7 = $[11];
531		let t8;
532		if ($[12] !== processing) {
533			t8 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Button, {
534				type: "submit",
535				variant: "primary",
536				disabled: processing,
537				children: t7
538			});
539			$[12] = processing;
540			$[13] = t8;
541		} else t8 = $[13];
542		let t9;
543		if ($[14] !== requestPassword || $[15] !== t8) {
544			t9 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsxs)("form", {
545				onSubmit: requestPassword,
546				"data-turbo": "false",
547				children: [
548					t5,
549					t6,
550					t8
551				]
552			});
553			$[14] = requestPassword;
554			$[15] = t8;
555			$[16] = t9;
556		} else t9 = $[16];
557		return t9;
558	}
559	let t5;
560	if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
561		t5 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Label, {
562			htmlFor: "user_password",
563			children: i18n.t("js.account.sections.password.new_password")
564		});
565		$[17] = t5;
566	} else t5 = $[17];
567	let t6;
568	if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
569		t6 = (event_1) => setPassword(event_1.target.value);
570		$[18] = t6;
571	} else t6 = $[18];
572	const t7 = passwordError ? "h-input--error" : void 0;
573	const t8 = passwordError ? true : void 0;
574	const t9 = passwordError ? "user_password_error" : void 0;
575	let t10;
576	if ($[19] !== password || $[20] !== t7 || $[21] !== t8 || $[22] !== t9) {
577		t10 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Input, {
578			id: "user_password",
579			type: "password",
580			autoComplete: "off",
581			value: password,
582			onChange: t6,
583			className: t7,
584			"aria-invalid": t8,
585			"aria-describedby": t9,
586			required: true
587		});
588		$[19] = password;
589		$[20] = t7;
590		$[21] = t8;
591		$[22] = t9;
592		$[23] = t10;
593	} else t10 = $[23];
594	let t11;
595	if ($[24] !== passwordError) {
596		t11 = passwordError && /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("div", {
597			id: "user_password_error",
598			className: "text-danger small mt-1",
599			children: passwordError
600		});
601		$[24] = passwordError;
602		$[25] = t11;
603	} else t11 = $[25];
604	let t12;
605	if ($[26] !== t10 || $[27] !== t11) {
606		t12 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsxs)("div", {
607			className: "col-md-4",
608			children: [
609				t5,
610				t10,
611				t11
612			]
613		});
614		$[26] = t10;
615		$[27] = t11;
616		$[28] = t12;
617	} else t12 = $[28];
618	let t13;
619	if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
620		t13 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Label, {
621			htmlFor: "user_current_password",
622			children: i18n.t("js.account.sections.password.current_password")
623		});
624		$[29] = t13;
625	} else t13 = $[29];
626	let t14;
627	if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
628		t14 = (event_2) => setCurrentPassword(event_2.target.value);
629		$[30] = t14;
630	} else t14 = $[30];
631	const t15 = currentPasswordError ? "h-input--error" : void 0;
632	const t16 = currentPasswordError ? true : void 0;
633	const t17 = currentPasswordError ? "user_current_password_error" : void 0;
634	let t18;
635	if ($[31] !== currentPassword || $[32] !== t15 || $[33] !== t16 || $[34] !== t17) {
636		t18 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Input, {
637			id: "user_current_password",
638			type: "password",
639			value: currentPassword,
640			onChange: t14,
641			className: t15,
642			"aria-invalid": t16,
643			"aria-describedby": t17,
644			required: true
645		});
646		$[31] = currentPassword;
647		$[32] = t15;
648		$[33] = t16;
649		$[34] = t17;
650		$[35] = t18;
651	} else t18 = $[35];
652	let t19;
653	if ($[36] !== currentPasswordError) {
654		t19 = currentPasswordError && /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("div", {
655			id: "user_current_password_error",
656			className: "text-danger small mt-1",
657			children: currentPasswordError
658		});
659		$[36] = currentPasswordError;
660		$[37] = t19;
661	} else t19 = $[37];
662	let t20;
663	if ($[38] !== t18 || $[39] !== t19) {
664		t20 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsxs)("div", {
665			className: "col-md-4",
666			children: [
667				t13,
668				t18,
669				t19
670			]
671		});
672		$[38] = t18;
673		$[39] = t19;
674		$[40] = t20;
675	} else t20 = $[40];
676	let t21;
677	if ($[41] !== t12 || $[42] !== t20) {
678		t21 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("div", {
679			className: "row",
680			children: /* @__PURE__ */ (0, import_jsx_runtime$7.jsxs)("div", {
681				className: "form-group",
682				children: [t12, t20]
683			})
684		});
685		$[41] = t12;
686		$[42] = t20;
687		$[43] = t21;
688	} else t21 = $[43];
689	let t22;
690	if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
691		t22 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("hr", {});
692		$[44] = t22;
693	} else t22 = $[44];
694	let t23;
695	if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
696		t23 = i18n.t("js.account.sections.password.change_password");
697		$[45] = t23;
698	} else t23 = $[45];
699	let t24;
700	if ($[46] !== processing) {
701		t24 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)(Button, {
702			type: "submit",
703			variant: "primary",
704			disabled: processing,
705			children: t23
706		});
707		$[46] = processing;
708		$[47] = t24;
709	} else t24 = $[47];
710	let t25;
711	if ($[48] !== hasErrors) {
712		t25 = hasErrors && /* @__PURE__ */ (0, import_jsx_runtime$7.jsx)("div", {
713			className: "mt-4",
714			dangerouslySetInnerHTML: { __html: i18n.t("js.account.sections.password.password_policy_html", { path: help_articles_password_policy_path() }) }
715		});
716		$[48] = hasErrors;
717		$[49] = t25;
718	} else t25 = $[49];
719	let t26;
720	if ($[50] !== changePassword || $[51] !== t21 || $[52] !== t24 || $[53] !== t25) {
721		t26 = /* @__PURE__ */ (0, import_jsx_runtime$7.jsxs)("form", {
722			onSubmit: changePassword,
723			"data-turbo": "false",
724			children: [
725				t21,
726				t22,
727				t24,
728				t25
729			]
730		});
731		$[50] = changePassword;
732		$[51] = t21;
733		$[52] = t24;
734		$[53] = t25;
735		$[54] = t26;
736	} else t26 = $[54];
737	return t26;
738}
739var import_compiler_runtime$4, import_react$6, import_jsx_runtime$7;
740function init_PasswordSection() {
741	return (init_PasswordSection = __esmMin((() => {
742		import_compiler_runtime$4 = require_compiler_runtime();
743		import_react$6 = require_react();
744		init_dist$1();
745		init_button();
746		init_input();
747		init_label();
748		init_routes();
749		import_jsx_runtime$7 = require_jsx_runtime();
750	})))();
751}
752//#endregion
753//#region app/frontend/pages/Account/ReferralProgramSection.tsx
754function ReferralProgramSection(t0) {
755	const $ = (0, import_compiler_runtime$3.c)(38);
756	const { referral, singleCreditsBucket } = t0;
757	if (!singleCreditsBucket) {
758		let t1;
759		if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
760			t1 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(AlertIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Icon, { icon: "info-circle" }) });
761			$[0] = t1;
762		} else t1 = $[0];
763		let t2;
764		if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
765			t2 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)(Alert, {
766				variant: "info",
767				children: [t1, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(AlertContent, { children: i18n.t("js.account.sections.referral_program.not_eligible") })]
768			});
769			$[1] = t2;
770		} else t2 = $[1];
771		return t2;
772	}
773	let t1;
774	if ($[2] !== referral.url) {
775		t1 = () => {
776			copyToClipboard(referral.url);
777		};
778		$[2] = referral.url;
779		$[3] = t1;
780	} else t1 = $[3];
781	const copyReferralUrl = t1;
782	let t2;
783	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
784		t2 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("h3", {
785			className: "board-box__subtitle mb-2",
786			children: i18n.t("js.account.sections.referral_program.referral_url")
787		});
788		$[4] = t2;
789	} else t2 = $[4];
790	let t3;
791	if ($[5] !== referral.url) {
792		t3 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Input, {
793			id: "referral-url",
794			className: "referral-program__link",
795			size: "sm",
796			readOnly: true,
797			value: referral.url
798		});
799		$[5] = referral.url;
800		$[6] = t3;
801	} else t3 = $[6];
802	let t4;
803	let t5;
804	if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
805		t4 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Icon, { icon: "copy" });
806		t5 = i18n.t("js.account.sections.referral_program.copy");
807		$[7] = t4;
808		$[8] = t5;
809	} else {
810		t4 = $[7];
811		t5 = $[8];
812	}
813	let t6;
814	if ($[9] !== copyReferralUrl) {
815		t6 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)(Button, {
816			size: "sm",
817			type: "button",
818			onClick: copyReferralUrl,
819			children: [t4, t5]
820		});
821		$[9] = copyReferralUrl;
822		$[10] = t6;
823	} else t6 = $[10];
824	let t7;
825	if ($[11] !== t3 || $[12] !== t6) {
826		t7 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("div", {
827			className: "d-flex gap-1",
828			children: [t3, t6]
829		});
830		$[11] = t3;
831		$[12] = t6;
832		$[13] = t7;
833	} else t7 = $[13];
834	let t8;
835	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
836		t8 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("h3", {
837			className: "board-box__subtitle mt-6",
838			children: i18n.t("js.account.sections.referral_program.stats")
839		});
840		$[14] = t8;
841	} else t8 = $[14];
842	let t9;
843	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
844		t9 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Icon, {
845			icon: "globe-pointer",
846			className: "stat-block__icon"
847		});
848		$[15] = t9;
849	} else t9 = $[15];
850	let t10;
851	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
852		t10 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("header", {
853			className: "stat-block__heading",
854			children: [t9, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("h3", {
855				className: "stat-block__title",
856				children: i18n.t("js.account.sections.referral_program.visitors")
857			})]
858		});
859		$[16] = t10;
860	} else t10 = $[16];
861	let t11;
862	if ($[17] !== referral.visitors) {
863		t11 = formatNumber(referral.visitors);
864		$[17] = referral.visitors;
865		$[18] = t11;
866	} else t11 = $[18];
867	let t12;
868	if ($[19] !== t11) {
869		t12 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("div", {
870			className: "stat-block stat-block--sent",
871			children: [t10, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("div", {
872				className: "stat-block__metrics",
873				children: /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("strong", {
874					className: "stat-block__value",
875					children: t11
876				})
877			})]
878		});
879		$[19] = t11;
880		$[20] = t12;
881	} else t12 = $[20];
882	let t13;
883	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
884		t13 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Icon, {
885			icon: "users",
886			className: "stat-block__icon"
887		});
888		$[21] = t13;
889	} else t13 = $[21];
890	let t14;
891	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
892		t14 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("header", {
893			className: "stat-block__heading",
894			children: [t13, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("h3", {
895				className: "stat-block__title",
896				children: i18n.t("js.account.sections.referral_program.referred_accounts")
897			})]
898		});
899		$[22] = t14;
900	} else t14 = $[22];
901	let t15;
902	if ($[23] !== referral.leads) {
903		t15 = formatNumber(referral.leads);
904		$[23] = referral.leads;
905		$[24] = t15;
906	} else t15 = $[24];
907	let t16;
908	if ($[25] !== t15) {
909		t16 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("div", {
910			className: "stat-block stat-block--sent",
911			children: [t14, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("div", {
912				className: "stat-block__metrics",
913				children: /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("strong", {
914					className: "stat-block__value",
915					children: t15
916				})
917			})]
918		});
919		$[25] = t15;
920		$[26] = t16;
921	} else t16 = $[26];
922	let t17;
923	if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
924		t17 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)(Icon, {
925			icon: "circle-dollar",
926			className: "stat-block__icon"
927		});
928		$[27] = t17;
929	} else t17 = $[27];
930	let t18;
931	if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
932		t18 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("header", {
933			className: "stat-block__heading",
934			children: [t17, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("h3", {
935				className: "stat-block__title",
936				children: i18n.t("js.account.sections.referral_program.credits_earned")
937			})]
938		});
939		$[28] = t18;
940	} else t18 = $[28];
941	let t19;
942	if ($[29] !== referral.creditsEarned) {
943		t19 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("div", {
944			className: "stat-block stat-block--sent",
945			children: [t18, /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("div", {
946				className: "stat-block__metrics",
947				children: /* @__PURE__ */ (0, import_jsx_runtime$6.jsx)("strong", {
948					className: "stat-block__value",
949					children: referral.creditsEarned
950				})
951			})]
952		});
953		$[29] = referral.creditsEarned;
954		$[30] = t19;
955	} else t19 = $[30];
956	let t20;
957	if ($[31] !== t12 || $[32] !== t16 || $[33] !== t19) {
958		t20 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)("section", {
959			className: "global-stats mt-2",
960			children: [
961				t12,
962				t16,
963				t19
964			]
965		});
966		$[31] = t12;
967		$[32] = t16;
968		$[33] = t19;
969		$[34] = t20;
970	} else t20 = $[34];
971	let t21;
972	if ($[35] !== t20 || $[36] !== t7) {
973		t21 = /* @__PURE__ */ (0, import_jsx_runtime$6.jsxs)(import_jsx_runtime$6.Fragment, { children: [
974			t2,
975			t7,
976			t8,
977			t20
978		] });
979		$[35] = t20;
980		$[36] = t7;
981		$[37] = t21;
982	} else t21 = $[37];
983	return t21;
984}
985var import_compiler_runtime$3, import_jsx_runtime$6;
986function init_ReferralProgramSection() {
987	return (init_ReferralProgramSection = __esmMin((() => {
988		import_compiler_runtime$3 = require_compiler_runtime();
989		init_alert();
990		init_button();
991		init_icon();
992		init_input();
993		init_utils();
994		init_text_helpers();
995		import_jsx_runtime$6 = require_jsx_runtime();
996	})))();
997}
998//#endregion
999//#region app/frontend/pages/Account/NotificationsSection.tsx
1000function NotificationsSection(t0) {
1001	const $ = (0, import_compiler_runtime$2.c)(37);
1002	const { categories, showEmailDigests } = t0;
1003	let t1;
1004	if ($[0] !== categories) {
1005		t1 = () => new Set(categories.filter(_temp$2).map(_temp2$1));
1006		$[0] = categories;
1007		$[1] = t1;
1008	} else t1 = $[1];
1009	const [enabled, setEnabled] = (0, import_react$5.useState)(t1);
1010	const [processing, setProcessing] = (0, import_react$5.useState)(false);
1011	let t2;
1012	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1013		t2 = {
1014			new_opportunities: true,
1015			existing_leads: true
1016		};
1017		$[2] = t2;
1018	} else t2 = $[2];
1019	const [emailDigests, setEmailDigests] = (0, import_react$5.useState)(t2);
1020	let t3;
1021	if ($[3] !== categories) {
1022		t3 = categories.every(_temp3);
1023		$[3] = categories;
1024		$[4] = t3;
1025	} else t3 = $[4];
1026	const savedAllDisabled = t3;
1027	let t4;
1028	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1029		t4 = (values) => {
1030			setProcessing(true);
1031			router.patch(users_update_notifications_path(), { notification_categories: values }, {
1032				preserveScroll: true,
1033				onFinish: () => setProcessing(false)
1034			});
1035		};
1036		$[5] = t4;
1037	} else t4 = $[5];
1038	const submit = t4;
1039	let t5;
1040	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
1041		t5 = (value, checked) => {
1042			setEnabled((previous) => {
1043				const next = new Set(previous);
1044				if (checked) next.add(value);
1045				else next.delete(value);
1046				return next;
1047			});
1048		};
1049		$[6] = t5;
1050	} else t5 = $[6];
1051	const toggleCategory = t5;
1052	let t6;
1053	if ($[7] !== enabled) {
1054		t6 = (event) => {
1055			event.preventDefault();
1056			submit(Array.from(enabled));
1057		};
1058		$[7] = enabled;
1059		$[8] = t6;
1060	} else t6 = $[8];
1061	const handleSubmit = t6;
1062	let t7;
1063	if ($[9] !== categories) {
1064		t7 = () => {
1065			const all = categories.map(_temp4);
1066			setEnabled(new Set(all));
1067			submit(all);
1068		};
1069		$[9] = categories;
1070		$[10] = t7;
1071	} else t7 = $[10];
1072	const turnAllOn = t7;
1073	let t8;
1074	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1075		t8 = () => {
1076			setEnabled(/* @__PURE__ */ new Set());
1077			submit([]);
1078		};
1079		$[11] = t8;
1080	} else t8 = $[11];
1081	const turnAllOff = t8;
1082	let t9;
1083	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1084		t9 = /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("h4", {
1085			className: "mb-6",
1086			children: i18n.t("js.account.sections.notifications.in_app_title")
1087		});
1088		$[12] = t9;
1089	} else t9 = $[12];
1090	let t10;
1091	if ($[13] !== categories || $[14] !== enabled) {
1092		let t11;
1093		if ($[16] !== enabled) {
1094			t11 = (category_1) => {
1095				const id = `notif-${category_1.value.toLowerCase().replace(/[^a-z0-9]+/g, "_")}`;
1096				return /* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1097					className: "h-form-group mt-4",
1098					children: [/* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1099						className: "h-form-group__infos",
1100						children: [/* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Label, {
1101							htmlFor: id,
1102							className: "mb-1",
1103							children: category_1.title
1104						}
1104), /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("div", {
1105							className: "h-hint",
1106							id: `${id}-hint`,
1107							children: category_1.hint
1108						})]
1109					}), /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("div", {
1110						className: "h-form-group__input pr-2",
1111						children: /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Checkbox, {
1112							id,
1113							checked: enabled.has(category_1.value),
1114							"aria-describedby": `${id}-hint`,
1115							onChange: (event_0) => toggleCategory(category_1.value, event_0.target.checked)
1116						})
1117					})]
1118				}, category_1.value);
1119			};
1120			$[16] = enabled;
1121			$[17] = t11;
1122		} else t11 = $[17];
1123		t10 = categories.map(t11);
1124		$[13] = categories;
1125		$[14] = enabled;
1126		$[15] = t10;
1127	} else t10 = $[15];
1128	let t11;
1129	if ($[18] !== emailDigests || $[19] !== showEmailDigests) {
1130		t11 = showEmailDigests && /* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1131			className: "mb-4",
1132			children: [/* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("h4", {
1133				className: "mt-10 mb-6",
1134				children: i18n.t("js.account.sections.notifications.email_title")
1135			}), EMAIL_DIGESTS.map((digest) => {
1136				const id_0 = `email-digest-${digest.replace(/_/g, "-")}`;
1137				return /* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1138					className: "h-form-group mt-4",
1139					children: [/* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1140						className: "h-form-group__infos",
1141						children: [/* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Label, {
1142							htmlFor: id_0,
1143							className: "mb-1",
1144							children: i18n.t(`js.account.sections.notifications.email_${digest}_title`)
1145						}), /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("div", {
1146							className: "h-hint",
1147							id: `${id_0}-hint`,
1148							children: i18n.t(`js.account.sections.notifications.email_${digest}_subtitle`)
1149						})]
1150					}), /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("div", {
1151						className: "h-form-group__input pr-2",
1152						children: /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Checkbox, {
1153							id: id_0,
1154							checked: emailDigests[digest],
1155							"aria-describedby": `${id_0}-hint`,
1156							onChange: (event_1) => setEmailDigests((prev) => ({
1157								...prev,
1158								[digest]: event_1.target.checked
1159							}))
1160						})
1161					})]
1162				}, digest);
1163			})]
1164		});
1165		$[18] = emailDigests;
1166		$[19] = showEmailDigests;
1167		$[20] = t11;
1168	} else t11 = $[20];
1169	let t12;
1170	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1171		t12 = /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)("hr", {});
1172		$[21] = t12;
1173	} else t12 = $[21];
1174	let t13;
1175	if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
1176		t13 = i18n.t("js.account.sections.notifications.save");
1177		$[22] = t13;
1178	} else t13 = $[22];
1179	let t14;
1180	if ($[23] !== processing) {
1181		t14 = /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Button, {
1182			type: "submit",
1183			variant: "primary",
1184			disabled: processing,
1185			children: t13
1186		});
1187		$[23] = processing;
1188		$[24] = t14;
1189	} else t14 = $[24];
1190	let t15;
1191	if ($[25] !== processing || $[26] !== savedAllDisabled || $[27] !== turnAllOn) {
1192		t15 = savedAllDisabled ? /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Button, {
1193			type: "button",
1194			onClick: turnAllOn,
1195			disabled: processing,
1196			children: i18n.t("js.account.sections.notifications.turn_all_on")
1197		}) : /* @__PURE__ */ (0, import_jsx_runtime$5.jsx)(Button, {
1198			type: "button",
1199			onClick: turnAllOff,
1200			disabled: processing,
1201			children: i18n.t("js.account.sections.notifications.turn_all_off")
1202		});
1203		$[25] = processing;
1204		$[26] = savedAllDisabled;
1205		$[27] = turnAllOn;
1206		$[28] = t15;
1207	} else t15 = $[28];
1208	let t16;
1209	if ($[29] !== t14 || $[30] !== t15) {
1210		t16 = /* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("div", {
1211			className: "mt-6 d-flex justify-content-between",
1212			children: [t14, t15]
1213		});
1214		$[29] = t14;
1215		$[30] = t15;
1216		$[31] = t16;
1217	} else t16 = $[31];
1218	let t17;
1219	if ($[32] !== handleSubmit || $[33] !== t10 || $[34] !== t11 || $[35] !== t16) {
1220		t17 = /* @__PURE__ */ (0, import_jsx_runtime$5.jsxs)("form", {
1221			onSubmit: handleSubmit,
1222			"data-turbo": "false",
1223			children: [
1224				t9,
1225				t10,
1226				t11,
1227				t12,
1228				t16
1229			]
1230		});
1231		$[32] = handleSubmit;
1232		$[33] = t10;
1233		$[34] = t11;
1234		$[35] = t16;
1235		$[36] = t17;
1236	} else t17 = $[36];
1237	return t17;
1238}
1239function _temp4(category_0) {
1240	return category_0.value;
1241}
1242function _temp3(category) {
1243	return !category.enabled;
1244}
1245function _temp2$1(c_0) {
1246	return c_0.value;
1247}
1248function _temp$2(c) {
1249	return c.enabled;
1250}
1251var import_compiler_runtime$2, import_react$5, import_jsx_runtime$5, EMAIL_DIGESTS;
1252function init_NotificationsSection() {
1253	return (init_NotificationsSection = __esmMin((() => {
1254		import_compiler_runtime$2 = require_compiler_runtime();
1255		import_react$5 = require_react();
1256		init_dist$1();
1257		init_button();
1258		init_checkbox();
1259		init_label();
1260		init_routes();
1261		import_jsx_runtime$5 = require_jsx_runtime();
1262		EMAIL_DIGESTS = ["new_opportunities", "existing_leads"];
1263	})))();
1264}
1265//#endregion
1266//#region app/frontend/pages/Account/CookiesSection.tsx
1267function CookiesSection({ cookies }) {
1268	const [productAnalytics, setProductAnalytics] = (0, import_react$4.useState)(cookies.productAnalytics);
1269	const [advertising, setAdvertising] = (0, import_react$4.useState)(cookies.advertising);
1270	const [processing, setProcessing] = (0, import_react$4.useState)(false);
1271	const handleSubmit = async (event) => {
1272		event.preventDefault();
1273		setProcessing(true);
1274		try {
1275			const csrfToken = document.querySelector("meta[name=\"csrf-token\"]")?.getAttribute("content") ?? "";
1276			if ((await (await fetch(users_update_cookies_path(), {
1277				method: "PATCH",
1278				headers: {
1279					Accept: "application/json",
1280					"Content-Type": "application/json",
1281					"X-CSRF-Token": csrfToken
1282				},
1283				credentials: "same-origin",
1284				body: JSON.stringify({
1285					product_analytics_cookies: productAnalytics,
1286					advertising_cookies: advertising
1287				})
1288			})).json()).cookies_changed) {
1289				window.location.reload();
1290				return;
1291			}
1292		} finally {
1293			setProcessing(false);
1294		}
1295	};
1296	const t = (key) => i18n.t(`js.account.sections.cookies_management.form.${key}`);
1297	return /* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("form", {
1298		className: "cookies-form",
1299		onSubmit: handleSubmit,
1300		"data-turbo": "false",
1301		children: [
1302			/* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("div", {
1303				className: "cookies-form__group-title",
1304				children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("h3", {
1305					className: "cookies-form__title",
1306					children: t("necessary_title")
1307				}), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("div", {
1308					className: "cookies-form__group-subtitle",
1309					children: t("necessary_status")
1310				})]
1311			}),
1312			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("div", {
1313				className: "cookies-form__desc",
1314				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("p", { children: t("necessary_description") })
1315			}),
1316			/* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("div", {
1317				className: "cookies-form__group-title",
1318				children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("h3", {
1319					className: "cookies-form__title",
1320					children: t("product_and_analytics_title")
1321				}), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Switch, {
1322					id: "product_analytics_cookies",
1323					checked: productAnalytics,
1324					onCheckedChange: setProductAnalytics,
1325					"aria-label": t("product_and_analytics_label")
1326				})]
1327			}),
1328			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("div", {
1329				className: "cookies-form__desc",
1330				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("p", { children: t("product_and_analytics_description") })
1331			}),
1332			/* @__PURE__ */ (0, import_jsx_runtime$4.jsxs)("div", {
1333				className: "cookies-form__group-title",
1334				children: [/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("h3", {
1335					className: "cookies-form__title",
1336					children: t("advertising_title")
1337				}), /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Switch, {
1338					id: "advertising_cookies",
1339					checked: advertising,
1340					onCheckedChange: setAdvertising,
1341					"aria-label": t("advertising_label")
1342				})]
1343			}),
1344			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("div", {
1345				className: "cookies-form__desc",
1346				children: /* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("p", { children: t("advertising_description") })
1347			}),
1348			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)("hr", {}),
1349			/* @__PURE__ */ (0, import_jsx_runtime$4.jsx)(Button, {
1350				type: "submit",
1351				variant: "primary",
1352				className: "mt-4",
1353				disabled: processing,
1354				children: i18n.t("js.account.sections.cookies_management.save_preferences")
1355			})
1356		]
1357	});
1358}
1359var import_react$4, import_jsx_runtime$4;
1360function init_CookiesSection() {
1361	return (init_CookiesSection = __esmMin((() => {
1362		import_react$4 = require_react();
1363		init_button();
1364		init_switch();
1365		init_routes();
1366		import_jsx_runtime$4 = require_jsx_runtime();
1367	})))();
1368}
1369//#endregion
1370//#region app/frontend/pages/Account/LegalComplianceSection.tsx
1371function LegalComplianceSection(t0) {
1372	const $ = (0, import_compiler_runtime$1.c)(28);
1373	const { legal } = t0;
1374	const [subprocessorsSubscription, setSubprocessorsSubscription] = (0, import_react$3.useState)(legal.subprocessorsSubscription);
1375	const [processing, setProcessing] = (0, import_react$3.useState)(false);
1376	const acceptTerms = _temp$1;
1377	let t1;
1378	if ($[0] !== subprocessorsSubscription) {
1379		t1 = (event) => {
1380			event.preventDefault();
1381			setProcessing(true);
1382			router.patch(users_subprocessors_subscriptions_path(), { user: { subprocessors_subscription: subprocessorsSubscription } }, {
1383				preserveScroll: true,
1384				onFinish: () => setProcessing(false)
1385			});
1386		};
1387		$[0] = subprocessorsSubscription;
1388		$[1] = t1;
1389	} else t1 = $[1];
1390	const saveSubprocessors = t1;
1391	let t2;
1392	if ($[2] !== legal.mustAcceptTerms || $[3] !== legal.termsAlertHtml) {
1393		t2 = legal.mustAcceptTerms && /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)(Alert, {
1394			variant: "info",
1395			className: "mb-6",
1396			children: [/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(AlertIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Icon, { icon: "info-circle" }) }
1396), /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)(AlertContent, { children: [/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("span", { dangerouslySetInnerHTML: { __html: legal.termsAlertHtml } }), /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(AlertActions, { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Button, {
1397				size: "sm",
1398				type: "button",
1399				onClick: acceptTerms,
1400				children: i18n.t("js.account.sections.legal_compliance.accept")
1401			}) })] })]
1402		});
1403		$[2] = legal.mustAcceptTerms;
1404		$[3] = legal.termsAlertHtml;
1405		$[4] = t2;
1406	} else t2 = $[4];
1407	let t3;
1408	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1409		t3 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("h4", {
1410			className: "mb-2",
1411			children: i18n.t("js.account.sections.legal_compliance.policies_title")
1412		});
1413		$[5] = t3;
1414	} else t3 = $[5];
1415	let t4;
1416	if ($[6] !== legal.policies) {
1417		t4 = legal.policies.map(_temp2);
1418		$[6] = legal.policies;
1419		$[7] = t4;
1420	} else t4 = $[7];
1421	let t5;
1422	if ($[8] !== t4) {
1423		t5 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("div", {
1424			className: "h-table mt-0 mb-6",
1425			children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("table", { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("tbody", { children: t4 }) })
1426		});
1427		$[8] = t4;
1428		$[9] = t5;
1429	} else t5 = $[9];
1430	let t6;
1431	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1432		t6 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("h4", {
1433			className: "mb-4",
1434			children: i18n.t("js.account.sections.legal_compliance.subprocessors_title")
1435		});
1436		$[10] = t6;
1437	} else t6 = $[10];
1438	let t7;
1439	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1440		t7 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Label, {
1441			htmlFor: "user_subprocessors_subscription",
1442			className: "mb-1",
1443			children: i18n.t("js.account.sections.legal_compliance.subprocessors_row_title")
1444		});
1445		$[11] = t7;
1446	} else t7 = $[11];
1447	let t8;
1448	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1449		t8 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("div", {
1450			className: "h-form-group__infos",
1451			children: [t7, /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("div", {
1452				className: "h-hint",
1453				children: i18n.t("js.account.sections.legal_compliance.subprocessors_row_subtitle")
1454			})]
1455		});
1456		$[12] = t8;
1457	} else t8 = $[12];
1458	let t9;
1459	if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
1460		t9 = (event_0) => setSubprocessorsSubscription(event_0.target.checked);
1461		$[13] = t9;
1462	} else t9 = $[13];
1463	let t10;
1464	if ($[14] !== subprocessorsSubscription) {
1465		t10 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("div", {
1466			className: "h-form-group",
1467			children: [t8, /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("div", {
1468				className: "h-form-group__input pr-2",
1469				children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Checkbox, {
1470					id: "user_subprocessors_subscription",
1471					checked: subprocessorsSubscription,
1472					onChange: t9
1473				})
1474			})]
1475		});
1476		$[14] = subprocessorsSubscription;
1477		$[15] = t10;
1478	} else t10 = $[15];
1479	let t11;
1480	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1481		t11 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("hr", {});
1482		$[16] = t11;
1483	} else t11 = $[16];
1484	let t12;
1485	if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1486		t12 = i18n.t("js.account.sections.legal_compliance.subprocessors_submit");
1487		$[17] = t12;
1488	} else t12 = $[17];
1489	let t13;
1490	if ($[18] !== processing) {
1491		t13 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("div", {
1492			className: "mt-6",
1493			children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)(Button, {
1494				type: "submit",
1495				variant: "primary",
1496				disabled: processing,
1497				children: t12
1498			})
1499		});
1500		$[18] = processing;
1501		$[19] = t13;
1502	} else t13 = $[19];
1503	let t14;
1504	if ($[20] !== saveSubprocessors || $[21] !== t10 || $[22] !== t13) {
1505		t14 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("form", {
1506			onSubmit: saveSubprocessors,
1507			"data-turbo": "false",
1508			children: [
1509				t10,
1510				t11,
1511				t13
1512			]
1513		});
1514		$[20] = saveSubprocessors;
1515		$[21] = t10;
1516		$[22] = t13;
1517		$[23] = t14;
1518	} else t14 = $[23];
1519	let t15;
1520	if ($[24] !== t14 || $[25] !== t2 || $[26] !== t5) {
1521		t15 = /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)(import_jsx_runtime$3.Fragment, { children: [
1522			t2,
1523			t3,
1524			t5,
1525			t6,
1526			t14
1527		] });
1528		$[24] = t14;
1529		$[25] = t2;
1530		$[26] = t5;
1531		$[27] = t15;
1532	} else t15 = $[27];
1533	return t15;
1534}
1535function _temp2(policy) {
1536	return /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("tr", { children: [
1537		/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("strong", { children: i18n.t(`js.account.sections.legal_compliance.${policy.key}`) }) }),
1538		/* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("td", {
1539			className: "grey",
1540			children: [
1541				i18n.t("js.account.sections.legal_compliance.updated_on"),
1542				" ",
1543				policy.updatedOn
1544			]
1545		}),
1546		/* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("td", {
1547			className: "text-end blue",
1548			children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("a", {
1549				href: policy.path,
1550				children: i18n.t("js.account.sections.legal_compliance.view")
1551			})
1552		})
1553	] }, policy.key);
1554}
1555function _temp$1() {
1556	router.patch(users_accept_terms_path(), {}, { preserveScroll: true });
1557}
1558var import_compiler_runtime$1, import_react$3, import_jsx_runtime$3;
1559function init_LegalComplianceSection() {
1560	return (init_LegalComplianceSection = __esmMin((() => {
1561		import_compiler_runtime$1 = require_compiler_runtime();
1562		import_react$3 = require_react();
1563		init_dist$1();
1564		init_alert();
1565		init_button();
1566		init_checkbox();
1567		init_icon();
1568		init_label();
1569		init_routes();
1570		import_jsx_runtime$3 = require_jsx_runtime();
1571	})))();
1572}
1573//#endregion
1574//#region app/frontend/pages/Account/DeleteAccountModal.tsx
1575function DeleteAccountModal({ isOpen, onClose, requiresPassword, modalSubtitleHtml }) {
1576	const [password, setPassword] = (0, import_react$2.useState)("");
1577	const [processing, setProcessing] = (0, import_react$2.useState)(false);
1578	const dialog = useDialog({
1579		isOpen,
1580		onClose
1581	});
1582	const t = (key) => i18n.t(`js.account.sections.delete_account.modal.${key}`);
1583	const handleDelete = (event) => {
1584		event.preventDefault();
1585		setProcessing(true);
1586		router.delete(user_registration_path(), {
1587			data: requiresPassword ? { user_deletion: { password } } : {},
1588			preserveState: false,
1589			onFinish: () => setProcessing(false)
1590		});
1591	};
1592	return /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Dialog, {
1593		ref: dialog.dialogRef,
1594		onClick: dialog.handleBackdropClick,
1595		children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(DialogContent, { children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)("form", {
1596			onSubmit: handleDelete,
1597			children: [
1598				/* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(DialogHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(DialogTitle, { children: t("title") }), /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(DialogCloseButton, {
1599					type: "button",
1600					onClick: onClose
1601				})] }),
1602				/* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(DialogBody, { children: [/* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)("p", {
1603					className: "black",
1604					children: [
1605						t("subtitle"),
1606						" ",
1607						/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("span", { dangerouslySetInnerHTML: { __html: modalSubtitleHtml } }),
1608						" ",
1609						/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("strong", { children: t("are_you_sure") })
1610					]
1611				}), requiresPassword && /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)("div", {
1612					className: "form-group",
1613					children: [/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Label, {
1614						htmlFor: "password-field",
1615						children: t("enter_password")
1616					}), /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Input, {
1617						id: "password-field",
1618						type: "password",
1619						required: true,
1620						autoComplete: "current-password",
1621						value: password,
1622						onChange: (event_0) => setPassword(event_0.target.value),
1623						fullWidth: true
1624					})]
1625				})] }),
1626				/* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)(DialogFooter, { children: [/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Button, {
1627					type: "submit",
1628					variant: "danger",
1629					disabled: processing,
1630					children: t("submit_value")
1631				}), /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)(Button, {
1632					type: "button",
1633					onClick: onClose,
1634					children: t("cancel")
1635				})] })
1636			]
1637		}) })
1638	});
1639}
1640var import_react$2, import_jsx_runtime$2;
1641function init_DeleteAccountModal() {
1642	return (init_DeleteAccountModal = __esmMin((() => {
1643		import_react$2 = require_react();
1644		init_dist$1();
1645		init_dialog();
1646		init_useDialog();
1647		init_button();
1648		init_input();
1649		init_label();
1650		init_routes();
1651		import_jsx_runtime$2 = require_jsx_runtime();
1652	})))();
1653}
1654//#endregion
1655//#region app/frontend/pages/Account/DeleteAccountSection.tsx
1656function DeleteAccountSection(t0) {
1657	const $ = (0, import_compiler_runtime.c)(25);
1658	const { deleteAccount } = t0;
1659	const [modalOpen, setModalOpen] = (0, import_react$1.useState)(false);
1660	const t = _temp;
1661	if (deleteAccount.teamOwnerCannotDelete) {
1662		let t1;
1663		if ($[0] !== deleteAccount.contactPath) {
1664			t1 = i18n.t(t("team_owner_cannot_destroy_account_html"), { path: deleteAccount.contactPath });
1665			$[0] = deleteAccount.contactPath;
1666			$[1] = t1;
1667		} else t1 = $[1];
1668		let t2;
1669		if ($[2] !== t1) {
1670			t2 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
1671				className: "black",
1672				dangerouslySetInnerHTML: { __html: t1 }
1673			});
1674			$[2] = t1;
1675			$[3] = t2;
1676		} else t2 = $[3];
1677		return t2;
1678	}
1679	if (deleteAccount.delinquentOwnerCannotDelete) {
1680		let t1;
1681		if ($[4] !== deleteAccount.overdueInvoicesPath) {
1682			t1 = i18n.t(t("cannot_destroy_delinquent_account_html"), { path: deleteAccount.overdueInvoicesPath });
1683			$[4] = deleteAccount.overdueInvoicesPath;
1684			$[5] = t1;
1685		} else t1 = $[5];
1686		let t2;
1687		if ($[6] !== t1) {
1688			t2 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("div", {
1689				className: "black",
1690				dangerouslySetInnerHTML: { __html: t1 }
1691			});
1692			$[6] = t1;
1693			$[7] = t2;
1694		} else t2 = $[7];
1695		return t2;
1696	}
1697	let t1;
1698	if ($[8] !== deleteAccount.cancelSubscriptionPath || $[9] !== deleteAccount.planName || $[10] !== deleteAccount.showCancelSubscription) {
1699		t1 = deleteAccount.showCancelSubscription && /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(import_jsx_runtime$1.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("p", {
1700			className: "black",
1701			dangerouslySetInnerHTML: { __html: i18n.t(t("cancel_account_html"), {
1702				plan_name: deleteAccount.planName,
1703				path: deleteAccount.cancelSubscriptionPath
1704			}) }
1705		}), /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("hr", {})] });
1706		$[8] = deleteAccount.cancelSubscriptionPath;
1707		$[9] = deleteAccount.planName;
1708		$[10] = deleteAccount.showCancelSubscription;
1709		$[11] = t1;
1710	} else t1 = $[11];
1711	let t2;
1712	let t3;
1713	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1714		t2 = () => setModalOpen(true);
1715		t3 = i18n.t(t("destroy_account"));
1716		$[12] = t2;
1717		$[13] = t3;
1718	} else {
1719		t2 = $[12];
1720		t3 = $[13];
1721	}
1722	let t4;
1723	if ($[14] !== t3) {
1724		t4 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Button, {
1725			type: "button",
1726			variant: "danger",
1727			onClick: t2,
1728			children: t3
1729		});
1730		$[14] = t3;
1731		$[15] = t4;
1732	} else t4 = $[15];
1733	let t5;
1734	if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1735		t5 = () => setModalOpen(false);
1736		$[16] = t5;
1737	} else t5 = $[16];
1738	let t6;
1739	if ($[17] !== deleteAccount.modalSubtitleHtml || $[18] !== deleteAccount.requiresPassword || $[19] !== modalOpen) {
1740		t6 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(DeleteAccountModal, {
1741			isOpen: modalOpen,
1742			onClose: t5,
1743			requiresPassword: deleteAccount.requiresPassword,
1744			modalSubtitleHtml: deleteAccount.modalSubtitleHtml
1745		});
1746		$[17] = deleteAccount.modalSubtitleHtml;
1747		$[18] = deleteAccount.requiresPassword;
1748		$[19] = modalOpen;
1749		$[20] = t6;
1750	} else t6 = $[20];
1751	let t7;
1752	if ($[21] !== t1 || $[22] !== t4 || $[23] !== t6) {
1753		t7 = /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)(import_jsx_runtime$1.Fragment, { children: [
1754			t1,
1755			t4,
1756			t6
1757		] });
1758		$[21] = t1;
1759		$[22] = t4;
1760		$[23] = t6;
1761		$[24] = t7;
1762	} else t7 = $[24];
1763	return t7;
1764}
1765function _temp(key) {
1766	return `js.account.sections.delete_account.${key}`;
1767}
1768var import_compiler_runtime, import_react$1, import_jsx_runtime$1;
1769function init_DeleteAccountSection() {
1770	return (init_DeleteAccountSection = __esmMin((() => {
1771		import_compiler_runtime = require_compiler_runtime();
1772		import_react$1 = require_react();
1773		init_button();
1774		init_DeleteAccountModal();
1775		import_jsx_runtime$1 = require_jsx_runtime();
1776	})))();
1777}
1778//#endregion
1779//#region app/frontend/pages/Account/Index.tsx
1780function isAccountTab(value) {
1781	return value !== null && TABS.includes(value);
1782}
1783function Index() {
1784	const { props } = usePage();
1785	const { account, timeZones, referral, notificationCategories, showEmailDigests, cookies, legal, deleteAccount, errors = {}, flash, currentTeam } = props;
1786	const [openTab, setOpenTab] = (0, import_react.useState)(() => isAccountTab(props.activeTab) ? props.activeTab : null);
1787	(0, import_react.useEffect)(() => {
1788		setOpenTab(isAccountTab(props.activeTab) ? props.activeTab : null);
1789	}, [props.activeTab]);
1790	const shownFlashRef = (0, import_react.useRef)(null);
1791	(0, import_react.useEffect)(() => {
1792		if (shownFlashRef.current === flash) return;
1793		shownFlashRef.current = flash;
1794		for (const [key, message] of Object.entries(flash)) if (message) App.displayFlash(dictLookup(FLASH_TYPE, key) ?? "info", message);
1795	}, [flash]);
1796	function toggle(id) {
1797		const next = openTab === id ? null : id;
1798		setOpenTab(next);
1799		const { pathname } = window.location;
1800		router.replace({
1801			url: next ? `${pathname}?tab=${next}` : pathname,
1802			props: (current) => ({
1803				...current,
1804				activeTab: next
1805			}),
1806			preserveScroll: true,
1807			preserveState: true
1808		});
1809	}
1810	const subtitle = account.completeProfile ? `${account.fullName} · ${account.email}` : account.email;
1811	const passwordSubtitle = account.autoGeneratedPassword ? i18n.t("js.account.sections.password.subtitle") : i18n.t("js.account.sections.password.subtitle_blank_password");
1812	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1813		className: "account-page",
1814		children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head_default, { title: i18n.t("js.account.meta_title") }
1814), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1815			className: "board-box board-box--unboxed mb-10",
1816			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PageHeader, {
1817				notFull: true,
1818				className: "gap-1 mb-2",
1819				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderTitle, { children: i18n.t("js.account.title") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeaderSubtitle, { children: subtitle })]
1820			}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1821				className: "toggle-table full-width-toggle-table",
1822				children: [
1823					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1824						id: "account-information",
1825						icon: "user-edit",
1826						title: i18n.t("js.account.sections.account_information.title"),
1827						subtitle: i18n.t("js.account.sections.account_information.subtitle"),
1828						isOpen: openTab === "account-information",
1829						onToggle: toggle,
1830						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountInformationSection, {
1831							account,
1832							timeZones
1833						})
1834					}),
1835					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1836						id: "password",
1837						icon: "key",
1838						title: i18n.t("js.account.sections.password.title"),
1839						subtitle: passwordSubtitle,
1840						isOpen: openTab === "password",
1841						onToggle: toggle,
1842						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PasswordSection, {
1843							account,
1844							errors
1845						})
1846					}),
1847					referral && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1848						id: "referral-program",
1849						icon: "handshake",
1850						title: i18n.t("js.account.sections.referral_program.title"),
1851						subtitle: i18n.t("js.account.sections.referral_program.subtitle"),
1852						isOpen: openTab === "referral-program",
1853						onToggle: toggle,
1854						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReferralProgramSection, {
1855							referral,
1856							singleCreditsBucket: currentTeam.singleCreditsBucket
1857						})
1858					}),
1859					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1860						id: "notifications",
1861						icon: "bell",
1862						title: i18n.t("js.account.sections.notifications.title"),
1863						subtitle: i18n.t("js.account.sections.notifications.subtitle"),
1864						isOpen: openTab === "notifications",
1865						onToggle: toggle,
1866						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotificationsSection, {
1867							categories: notificationCategories,
1868							showEmailDigests
1869						})
1870					}),
1871					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1872						id: "cookies-management",
1873						icon: "cookie-bite",
1874						title: i18n.t("js.account.sections.cookies_management.title"),
1875						subtitle: i18n.t("js.account.sections.cookies_management.subtitle"),
1876						isOpen: openTab === "cookies-management",
1877						onToggle: toggle,
1878						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CookiesSection, { cookies })
1879					}),
1880					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1881						id: "legal-compliance",
1882						icon: "scale-balanced",
1883						title: i18n.t("js.account.sections.legal_compliance.title"),
1884						subtitle: i18n.t("js.account.sections.legal_compliance.subtitle"),
1885						isOpen: openTab === "legal-compliance",
1886						onToggle: toggle,
1887						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LegalComplianceSection, { legal })
1888					}),
1889					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionSection, {
1890						id: "delete-account",
1891						icon: "minus-circle",
1892						title: i18n.t("js.account.sections.delete_account.title"),
1893						subtitle: i18n.t("js.account.sections.delete_account.subtitle"),
1894						isOpen: openTab === "delete-account",
1895						onToggle: toggle,
1896						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DeleteAccountSection, { deleteAccount })
1897					})
1898				]
1899			})]
1900		})]
1901	});
1902}
1903var import_react, import_jsx_runtime, TABS, FLASH_TYPE;
1904function init_Index() {
1905	return (init_Index = __esmMin((() => {
1906		init_dist$1();
1907		import_react = require_react();
1908		init_page_header();
1909		init_AccordionSection();
1910		init_AccountInformationSection();
1911		init_PasswordSection();
1912		init_ReferralProgramSection();
1913		init_NotificationsSection();
1914		init_CookiesSection();
1915		init_LegalComplianceSection();
1916		init_DeleteAccountSection();
1917		import_jsx_runtime = require_jsx_runtime();
1918		TABS = [
1919			"account-information",
1920			"password",
1921			"referral-program",
1922			"notifications",
1923			"cookies-management",
1924			"legal-compliance",
1925			"delete-account"
1926		];
1927		FLASH_TYPE = {
1928			success: "success",
1929			notice: "success",
1930			error: "danger",
1931			alert: "danger",
1932			warning: "warning"
1933		};
1934	})))();
1935}
1936//#endregion
1937init_Index();
1938export { Index as default };

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.