PageSourceSearch

https://hunter.io/assets/IntentsSelection-C302qORK.js

js hunter.io collected 2026-09-24 07:53:08 UTC 5,871 bytes, 167 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] = "89d9634c-15ca-4f4e-8f81-581f14bf056d", e._sentryDebugIdIdentifier = "sentry-dbid-89d9634c-15ca-4f4e-8f81-581f14bf056d");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { i as require_compiler_runtime, t as require_jsx_runtime } from "./jsx-runtime-CHSMGLHp.js";
11import { t as require_react } from "./react-CrLPhuc5.js";
12import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
13import { a as init_dist, s as usePage } from "./dist-ZlUHm0R7.js";
14import { n as useFlashMessages, t as init_useFlashMessages } from "./useFlashMessages-CaMVzoCv.js";
15import { n as init_OnboardingLayout, t as OnboardingLayout } from "./OnboardingLayout-BnUCTf-h.js";
16import { i as init_AccountSetup, n as init_OnboardingHeader, r as AccountSetupHeading, t as OnboardingHeader } from "./OnboardingHeader-C7IoGNdr.js";
17import { n as init_i18n, r as t } from "./i18n-D_KmXEqY.js";
18import { n as ContinueSubmit, r as init_ContinueButton } from "./ContinueButton-D6lk9eQx.js";
19import { n as init_OptionGroup, t as OptionGroup } from "./OptionGroup-CjRWDlM4.js";
20import { n as useOnboardingSubmit, t as init_useOnboardingSubmit } from "./useOnboardingSubmit-C4r1z2d6.js";
21//#region app/frontend/pages/Onboarding/IntentsSelection.tsx
22/**
23* /onboarding/intents_selection — the Inertia port of `Onboarding::IntentsSelectionComponent`.
24*
25* Multi-select: the user tells us everything they came for, and the next step asks
26* which of those matters most. The controller still receives `intents[]`, so the
27* option list (and its order) is handed down from Ruby rather than rebuilt here.
28*/
29function IntentsSelection() {
30	const $ = (0, import_compiler_runtime.c)(28);
31	const { props } = usePage();
32	const { intents, submitPath, explorePath, emailAddress, logoutPath, flash } = props;
33	let t0;
34	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
35		t0 = [];
36		$[0] = t0;
37	} else t0 = $[0];
38	const [selected, setSelected] = (0, import_react.useState)(t0);
39	const { submitting, submit: submitVisit } = useOnboardingSubmit();
40	useFlashMessages(flash);
41	let t1;
42	if ($[1] !== selected || $[2] !== submitPath || $[3] !== submitVisit || $[4] !== submitting) {
43		t1 = (event) => {
44			event.preventDefault();
45			if (selected.length === 0 || submitting) return;
46			submitVisit("patch", submitPath, { intents: selected });
47		};
48		$[1] = selected;
49		$[2] = submitPath;
50		$[3] = submitVisit;
51		$[4] = submitting;
52		$[5] = t1;
53	} else t1 = $[5];
54	const submit = t1;
55	let t2;
56	if ($[6] !== emailAddress || $[7] !== logoutPath) {
57		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OnboardingHeader, {
58			emailAddress,
59			logoutPath
60		});
61		$[6] = emailAddress;
62		$[7] = logoutPath;
63		$[8] = t2;
64	} else t2 = $[8];
65	let t3;
66	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
67		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountSetupHeading, {
68			title: t("devise.registrations.new.intents_selection.title"),
69			description: t("devise.registrations.new.intents_selection.description")
70		});
71		$[9] = t3;
72	} else t3 = $[9];
73	let t4;
74	if ($[10] !== intents || $[11] !== selected) {
75		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OptionGroup, {
76			name: "intents[]",
77			options: intents,
78			selected,
79			onChange: setSelected,
80			multiple: true
81		});
82		$[10] = intents;
83		$[11] = selected;
84		$[12] = t4;
85	} else t4 = $[12];
86	const t5 = selected.length === 0 || submitting;
87	let t6;
88	if ($[13] !== t5) {
89		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContinueSubmit, { disabled: t5 });
90		$[13] = t5;
91		$[14] = t6;
92	} else t6 = $[14];
93	let t7;
94	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
95		t7 = t("devise.registrations.new.intents_selection.explore");
96		$[15] = t7;
97	} else t7 = $[15];
98	let t8;
99	if ($[16] !== explorePath) {
100		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
101			asChild: true,
102			fullWidth: true,
103			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
104				href: explorePath,
105				children: t7
106			})
107		});
108		$[16] = explorePath;
109		$[17] = t8;
110	} else t8 = $[17];
111	let t9;
112	if ($[18] !== t6 || $[19] !== t8) {
113		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
114			className: "account-setup__actions",
115			children: [t6, t8]
116		});
117		$[18] = t6;
118		$[19] = t8;
119		$[20] = t9;
120	} else t9 = $[20];
121	let t10;
122	if ($[21] !== submit || $[22] !== t4 || $[23] !== t9) {
123		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", {
124			className: "account-setup",
125			onSubmit: submit,
126			children: [
127				t3,
128				t4,
129				t9
130			]
131		});
132		$[21] = submit;
133		$[22] = t4;
134		$[23] = t9;
135		$[24] = t10;
136	} else t10 = $[24];
137	let t11;
138	if ($[25] !== t10 || $[26] !== t2) {
139		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, t10] });
140		$[25] = t10;
141		$[26] = t2;
142		$[27] = t11;
143	} else t11 = $[27];
144	return t11;
145}
146var import_compiler_runtime, import_react, import_jsx_runtime;
147function init_IntentsSelection() {
148	return (init_IntentsSelection = __esmMin((() => {
149		import_compiler_runtime = require_compiler_runtime();
150		import_react = require_react();
151		init_dist();
152		init_OnboardingLayout();
153		init_AccountSetup();
154		init_ContinueButton();
155		init_OnboardingHeader();
156		init_OptionGroup();
157		init_i18n();
158		init_useOnboardingSubmit();
159		init_useFlashMessages();
160		init_button();
161		import_jsx_runtime = require_jsx_runtime();
162		IntentsSelection.layout = (page) => (0, import_react.createElement)(OnboardingLayout, null, page);
163	})))();
164}
165//#endregion
166init_IntentsSelection();
167export { IntentsSelection 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.