PageSourceSearch

https://app.clariumhealth.com/assets/procedures._procedureId.activity-B68awwPk.js

js clariumhealth.com collected 2026-09-25 15:17:31 UTC 3,634 bytes, 80 lines download raw bytes

1import "./react-CCT1erMQ.js";
2import "./typeof-CtObx4yR.js";
3import "./Amplify-ydFdTLPK.js";
4import "./objectWithoutProperties-Cgp7QKOy.js";
5import "./types-CQ-ki0qK.js";
6import "./amplifyUrl-DhBXUoj8.js";
7import "./tslib.es6-CGMJRn24.js";
8import { u as queryClient } from "./api-BN7R4l5b.js";
9import "./createCognitoUserPoolEndpointResolver-DIsnsOMn.js";
10import "./helpers-BQW8LNh3.js";
11import "./errors-CJ9PkTii.js";
12import "./shim-BLxGA08a.js";
13import "./chunk-62JRHF6Z-z8JX8DDB.js";
14import "./exports-PpHA8CsK.js";
15import "./notifyManager-Bch6NZ-h.js";
16import "./useBaseQuery-1WImwwVq.js";
17import "./useInfiniteQuery-CX5ozztk.js";
18import "./useMutation-k2qXTuOE.js";
19import "./QueryClientProvider-DBT_lM_H.js";
20import "./useQuery-DLS21iiV.js";
21import "./constants-TZTPDohO.js";
22import "./subDays-vez96V8M.js";
23import "./addMonths-C0iKCEqw.js";
24import "./endOfMonth-h_W7cRKV.js";
25import "./roundingMethods-DuMrTbDg.js";
26import "./differenceInWeeks-B00-N4lk.js";
27import "./useDebounce-4Thlngbw.js";
28import { v as PROCEDURE_INTENT } from "./utils-BFgzP0mr.js";
29import "./comments-Z3QCdchs.js";
30import "./base-path-CtfbOIOI.js";
31import { t as invariant } from "./tiny-invariant-DGRZ75gT.js";
32import { n as postAttachment, t as ATTACHMENT_QUERIES } from "./api-CpfZmtJ4.js";
33import { a as postCardComment, l as procedureCommentsQuery } from "./procedure-cards-BPeGZ6e8.js";
34async function loader({ params }) {
35	var _queryClient$getQuery;
36	const { procedureId } = params;
37	invariant(procedureId, "Procedure ID is required");
38	const commentQuery = procedureCommentsQuery(procedureId);
39	const commentQueryState = queryClient.getQueryState(commentQuery.queryKey);
40	const isCommentInvalidated = commentQueryState === null || commentQueryState === void 0 ? void 0 : commentQueryState.isInvalidated;
41	if (isCommentInvalidated) queryClient.fetchQuery(commentQuery);
42	return { comments: isCommentInvalidated ? await queryClient.fetchQuery(commentQuery) : (_queryClient$getQuery = queryClient.getQueryData(commentQuery.queryKey)) !== null && _queryClient$getQuery !== void 0 ? _queryClient$getQuery : await queryClient.fetchQuery(commentQuery) };
43}
44async function action({ params, request }) {
45	const { procedureId } = params;
46	invariant(procedureId, "Procedure ID is required");
47	const formData = await request.formData();
48	const intent = formData.get("intent");
49	const errors = { message: null };
50	if (intent === PROCEDURE_INTENT.ADD_PROCEDURE_COMMENT) {
51		const message = formData.get("message");
52		if (typeof message !== "string") {
53			errors.message = "Message is required";
54			return errors;
55		}
56		const mentions = formData.getAll("mentions").filter((mention) => typeof mention === "string");
57		const attachments = formData.getAll("attachments").filter((a) => typeof a === "string").map((a) => JSON.parse(a)).filter((attachment) => {
58			return typeof attachment.key === "string" && typeof attachment.contentType === "string" && typeof attachment.contentLength === "number";
59		});
60		try {
61			const comment = await postCardComment(procedureId, message, mentions);
62			queryClient.invalidateQueries(procedureCommentsQuery(procedureId).queryKey);
63			if (comment.conversation_message_id && attachments.length) {
64				await postAttachment({
65					conversationId: comment.conversation_message_id,
66					keys: attachments
67				});
68				queryClient.invalidateQueries([ATTACHMENT_QUERIES.get]);
69			}
70			return { ok: true };
71		} catch (_unused) {
72			errors.message = "Error: Unexpected error while uploading";
73			return errors;
74		}
75	}
76	return { ok: true };
77}
78export { action, loader };
79
80//# sourceMappingURL=procedures._procedureId.activity-B68awwPk.js.map

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.