@ixo/editor 6.20.0 → 6.22.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.
@@ -30887,8 +30887,8 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
30887
30887
  };
30888
30888
 
30889
30889
  // src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
30890
- import React312, { useCallback as useCallback105, useEffect as useEffect107, useMemo as useMemo112, useRef as useRef38, useState as useState161 } from "react";
30891
- import { ActionIcon as ActionIcon44, Badge as Badge49, Box as Box56, Button as Button62, Divider as Divider21, Group as Group110, Loader as Loader55, Stack as Stack204, Text as Text192, UnstyledButton as UnstyledButton3 } from "@mantine/core";
30890
+ import React313, { useCallback as useCallback105, useEffect as useEffect107, useMemo as useMemo112, useRef as useRef38, useState as useState162 } from "react";
30891
+ import { ActionIcon as ActionIcon44, Badge as Badge49, Box as Box57, Button as Button62, Divider as Divider21, Group as Group111, Loader as Loader55, Stack as Stack205, Text as Text193, UnstyledButton as UnstyledButton4 } from "@mantine/core";
30892
30892
  import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconFilter } from "@tabler/icons-react";
30893
30893
 
30894
30894
  // src/mantine/components/CollapsibleSection.tsx
@@ -30954,6 +30954,21 @@ function buildBidRows(bids, grantees) {
30954
30954
  });
30955
30955
  }
30956
30956
 
30957
+ // src/mantine/blocks/action/actionTypes/_shared/dataExport/buildGranteeRows.ts
30958
+ function buildGranteeRows(grantees, namesByDid = {}) {
30959
+ return grantees.map((grantee) => {
30960
+ const did = grantee.did || "";
30961
+ return {
30962
+ name: namesByDid[did] || "",
30963
+ did,
30964
+ address: grantee.address,
30965
+ role: grantee.role,
30966
+ agentQuota: grantee.agentQuota ?? "",
30967
+ maxAmount: Array.isArray(grantee.maxAmount) ? grantee.maxAmount.map((coin) => `${coin.amount} ${coin.denom}`).join("; ") : ""
30968
+ };
30969
+ });
30970
+ }
30971
+
30957
30972
  // src/mantine/blocks/action/actionTypes/_shared/dataExport/buildClaimRows.ts
30958
30973
  function claimStatus(claim) {
30959
30974
  if (claim.approved) return "approved";
@@ -30980,13 +30995,110 @@ function buildClaimRows(claims, contentsByClaimId) {
30980
30995
  }
30981
30996
 
30982
30997
  // src/mantine/blocks/action/actionTypes/_shared/ReadableKeyValues.tsx
30998
+ import React312, { useState as useState161 } from "react";
30999
+ import { Group as Group110, Stack as Stack204, Text as Text192, UnstyledButton as UnstyledButton3 } from "@mantine/core";
31000
+ import { IconPaperclip } from "@tabler/icons-react";
31001
+
31002
+ // src/mantine/components/MediaPreviewModal.tsx
30983
31003
  import React311 from "react";
30984
- import { Group as Group109, Stack as Stack203, Text as Text191 } from "@mantine/core";
31004
+ import { Anchor, Box as Box56, Center as Center13, Group as Group109, Modal as Modal3, Stack as Stack203, Text as Text191 } from "@mantine/core";
31005
+ import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
31006
+ import { IconDownload as IconDownload5 } from "@tabler/icons-react";
31007
+ function detectKind(type, name) {
31008
+ const t = (type || "").toLowerCase();
31009
+ const ext = (name || "").toLowerCase().split(".").pop() || "";
31010
+ if (t.startsWith("image/") || ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext)) return "image";
31011
+ if (t.startsWith("video/") || ["mp4", "webm", "mov", "mkv"].includes(ext)) return "video";
31012
+ if (t.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(ext)) return "audio";
31013
+ if (t === "application/pdf" || ext === "pdf") return "pdf";
31014
+ return "other";
31015
+ }
31016
+ var MediaPreviewModal = ({ file, onClose }) => {
31017
+ const isMobile = useMediaQuery2("(max-width: 992px)");
31018
+ const opened = !!file;
31019
+ const kind = file ? detectKind(file.type, file.name) : "other";
31020
+ const wide = kind === "pdf" || kind === "image" || kind === "video";
31021
+ return /* @__PURE__ */ React311.createElement(
31022
+ Modal3,
31023
+ {
31024
+ opened,
31025
+ onClose,
31026
+ zIndex: 1e4,
31027
+ portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
31028
+ title: /* @__PURE__ */ React311.createElement(Group109, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React311.createElement(Text191, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React311.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React311.createElement(Box56, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload5, 14), "Download"))),
31029
+ size: wide ? "95vw" : "xl",
31030
+ centered: true,
31031
+ styles: wide ? {
31032
+ content: {
31033
+ height: "95vh",
31034
+ maxWidth: isMobile ? "100%" : 1400,
31035
+ display: "flex",
31036
+ flexDirection: "column",
31037
+ overflow: "hidden"
31038
+ },
31039
+ body: {
31040
+ flex: 1,
31041
+ minHeight: 0,
31042
+ display: "flex",
31043
+ flexDirection: "column",
31044
+ overflow: "hidden"
31045
+ }
31046
+ } : void 0
31047
+ },
31048
+ file && /* @__PURE__ */ React311.createElement(Stack203, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React311.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React311.createElement(
31049
+ "img",
31050
+ {
31051
+ src: file.content,
31052
+ alt: file.name,
31053
+ style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
31054
+ }
31055
+ )), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
31056
+ /* @__PURE__ */ React311.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React311.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React311.createElement(Box56, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React311.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React311.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React311.createElement(Text191, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
31057
+ );
31058
+ };
31059
+
31060
+ // src/mantine/blocks/action/actionTypes/_shared/ReadableKeyValues.tsx
30985
31061
  function humanizeKey(key) {
30986
31062
  const bare = key.includes(":") ? key.split(":").pop() || key : key;
30987
31063
  const spaced = bare.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
30988
31064
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
30989
31065
  }
31066
+ function nameFromContent(content) {
31067
+ if (content.startsWith("data:")) return "file";
31068
+ return content.split(/[?#]/)[0].split("/").pop() || "file";
31069
+ }
31070
+ function detectFile(value) {
31071
+ if (typeof value === "string") {
31072
+ const trimmed = value.trim();
31073
+ if (trimmed.startsWith("{")) {
31074
+ try {
31075
+ return detectFile(JSON.parse(trimmed));
31076
+ } catch {
31077
+ return null;
31078
+ }
31079
+ }
31080
+ if (trimmed.startsWith("data:")) return { name: "file", type: trimmed.slice(5).split(/[;,]/)[0] || "", content: trimmed };
31081
+ if (/^https?:\/\//i.test(trimmed) && /\.(png|jpe?g|gif|webp|svg|bmp|mp4|webm|mov|mp3|wav|ogg|pdf)$/.test(trimmed.split(/[?#]/)[0].toLowerCase())) {
31082
+ return { name: nameFromContent(trimmed), type: "", content: trimmed };
31083
+ }
31084
+ return null;
31085
+ }
31086
+ if (value && typeof value === "object" && !Array.isArray(value)) {
31087
+ const obj = value;
31088
+ if (typeof obj.content === "string" && (obj.content.startsWith("data:") || /^https?:\/\//i.test(obj.content))) {
31089
+ const type = typeof obj.type === "string" ? obj.type : obj.content.startsWith("data:") ? obj.content.slice(5).split(/[;,]/)[0] || "" : "";
31090
+ const name = typeof obj.name === "string" && obj.name ? obj.name : nameFromContent(obj.content);
31091
+ return { name, type, content: obj.content };
31092
+ }
31093
+ }
31094
+ return null;
31095
+ }
31096
+ function isImageFile(file) {
31097
+ if (file.type.toLowerCase().startsWith("image/")) return true;
31098
+ if (file.content.startsWith("data:image/")) return true;
31099
+ const ext = file.name.toLowerCase().split(".").pop() || "";
31100
+ return ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext);
31101
+ }
30990
31102
  function formatValue2(value) {
30991
31103
  if (value === null || value === void 0 || value === "") return "\u2014";
30992
31104
  if (Array.isArray(value)) return value.map((item) => formatValue2(item)).join(", ");
@@ -31000,7 +31112,37 @@ function formatValue2(value) {
31000
31112
  if (typeof value === "boolean") return value ? "Yes" : "No";
31001
31113
  return String(value);
31002
31114
  }
31003
- var ReadableKeyValues = ({ data }) => /* @__PURE__ */ React311.createElement(Stack203, { gap: "xs" }, Object.entries(data).map(([key, value]) => /* @__PURE__ */ React311.createElement(Group109, { key, justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "md" }, /* @__PURE__ */ React311.createElement(Text191, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, humanizeKey(key)), /* @__PURE__ */ React311.createElement(Text191, { size: "xs", ta: "right", style: { wordBreak: "break-word", minWidth: 0 } }, formatValue2(value)))));
31115
+ var FilePreview = ({ file, onOpen }) => isImageFile(file) ? /* @__PURE__ */ React312.createElement(UnstyledButton3, { onClick: () => onOpen(file), "aria-label": `View ${file.name}`, style: { display: "block" } }, /* @__PURE__ */ React312.createElement(
31116
+ "img",
31117
+ {
31118
+ src: file.content,
31119
+ alt: file.name,
31120
+ style: {
31121
+ display: "block",
31122
+ height: 56,
31123
+ maxWidth: 112,
31124
+ objectFit: "cover",
31125
+ borderRadius: 6,
31126
+ border: "1px solid var(--mantine-color-neutralColor-5)",
31127
+ cursor: "zoom-in"
31128
+ }
31129
+ }
31130
+ )) : /* @__PURE__ */ React312.createElement(UnstyledButton3, { onClick: () => onOpen(file), "aria-label": `Preview ${file.name}`, style: { maxWidth: "100%" } }, /* @__PURE__ */ React312.createElement(Group110, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React312.createElement(IconPaperclip, { size: 12, style: { flexShrink: 0, color: "var(--mantine-color-dimmed)" } }), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", td: "underline", truncate: true }, file.name)));
31131
+ function renderValue(value, onOpen) {
31132
+ const file = detectFile(value);
31133
+ if (file) return /* @__PURE__ */ React312.createElement(FilePreview, { file, onOpen });
31134
+ if (Array.isArray(value) && value.some((item) => detectFile(item))) {
31135
+ return /* @__PURE__ */ React312.createElement(Group110, { gap: 6, justify: "flex-end" }, value.map((item, index) => {
31136
+ const itemFile = detectFile(item);
31137
+ return itemFile ? /* @__PURE__ */ React312.createElement(FilePreview, { key: index, file: itemFile, onOpen }) : /* @__PURE__ */ React312.createElement(Text192, { key: index, size: "xs", ta: "right", style: { wordBreak: "break-word" } }, formatValue2(item));
31138
+ }));
31139
+ }
31140
+ return /* @__PURE__ */ React312.createElement(Text192, { size: "xs", ta: "right", style: { wordBreak: "break-word", minWidth: 0 } }, formatValue2(value));
31141
+ }
31142
+ var ReadableKeyValues = ({ data }) => {
31143
+ const [activeFile, setActiveFile] = useState161(null);
31144
+ return /* @__PURE__ */ React312.createElement(React312.Fragment, null, /* @__PURE__ */ React312.createElement(Stack204, { gap: "xs" }, Object.entries(data).map(([key, value]) => /* @__PURE__ */ React312.createElement(Group110, { key, justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "md" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, humanizeKey(key)), renderValue(value, setActiveFile)))), /* @__PURE__ */ React312.createElement(MediaPreviewModal, { file: activeFile, onClose: () => setActiveFile(null) }));
31145
+ };
31004
31146
 
31005
31147
  // src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
31006
31148
  function getRoleColor2(role) {
@@ -31069,7 +31211,7 @@ var EvaluateBidFlowDetail = ({
31069
31211
  registerRuntimeInputs,
31070
31212
  executeAction
31071
31213
  }) => {
31072
- const [actAs, setActAs] = useState161(emptyActAsGroupState());
31214
+ const [actAs, setActAs] = useState162(emptyActAsGroupState());
31073
31215
  const t = useTranslate();
31074
31216
  const handlers = useBlocknoteHandlers();
31075
31217
  const handlersRef = useRef38(handlers);
@@ -31081,17 +31223,17 @@ var EvaluateBidFlowDetail = ({
31081
31223
  const resolveOpts = useMemo112(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
31082
31224
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
31083
31225
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
31084
- const [bids, setBids] = useState161([]);
31085
- const [selectedBidId, setSelectedBidId] = useState161("");
31086
- const [decision, setDecision] = useState161("");
31087
- const [loadingBids, setLoadingBids] = useState161(false);
31088
- const [submitting, setSubmitting] = useState161(false);
31089
- const [error, setError] = useState161(null);
31090
- const [rejectReason, setRejectReason] = useState161("");
31091
- const [adminAddress, setAdminAddress] = useState161("");
31092
- const [activeFilter, setActiveFilter] = useState161("pending");
31093
- const [paymentRows, setPaymentRows] = useState161([createPaymentRow()]);
31094
- const [profilesByDid, setProfilesByDid] = useState161({});
31226
+ const [bids, setBids] = useState162([]);
31227
+ const [selectedBidId, setSelectedBidId] = useState162("");
31228
+ const [decision, setDecision] = useState162("");
31229
+ const [loadingBids, setLoadingBids] = useState162(false);
31230
+ const [submitting, setSubmitting] = useState162(false);
31231
+ const [error, setError] = useState162(null);
31232
+ const [rejectReason, setRejectReason] = useState162("");
31233
+ const [adminAddress, setAdminAddress] = useState162("");
31234
+ const [activeFilter, setActiveFilter] = useState162("pending");
31235
+ const [paymentRows, setPaymentRows] = useState162([createPaymentRow()]);
31236
+ const [profilesByDid, setProfilesByDid] = useState162({});
31095
31237
  const selectedBid = useMemo112(() => bids.find((bid) => bid.id === selectedBidId) || null, [bids, selectedBidId]);
31096
31238
  const filteredBids = useMemo112(() => {
31097
31239
  if (activeFilter === "all") return bids;
@@ -31290,8 +31432,8 @@ var EvaluateBidFlowDetail = ({
31290
31432
  bidData = typeof selectedBid.data === "string" ? JSON.parse(selectedBid.data) : selectedBid.data;
31291
31433
  } catch {
31292
31434
  }
31293
- return /* @__PURE__ */ React312.createElement(Stack204, { gap: "md" }, /* @__PURE__ */ React312.createElement(Group110, { gap: "xs", align: "center" }, /* @__PURE__ */ React312.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React312.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React312.createElement(Text192, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, t("actionTypes.evaluateBid.flow.bidNumber", { id: selectedBid.id, defaultValue: `Bid #${selectedBid.id}` })), /* @__PURE__ */ React312.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React312.createElement(Group110, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React312.createElement(
31294
- Box56,
31435
+ return /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React313.createElement(Group111, { gap: "xs", align: "center" }, /* @__PURE__ */ React313.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React313.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, t("actionTypes.evaluateBid.flow.bidNumber", { id: selectedBid.id, defaultValue: `Bid #${selectedBid.id}` })), /* @__PURE__ */ React313.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React313.createElement(Group111, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React313.createElement(
31436
+ Box57,
31295
31437
  {
31296
31438
  style: {
31297
31439
  width: 40,
@@ -31311,7 +31453,7 @@ var EvaluateBidFlowDetail = ({
31311
31453
  }
31312
31454
  },
31313
31455
  selectedBidProfile?.avatarUrl ? null : selectedAvatarLabel
31314
- ), /* @__PURE__ */ React312.createElement(Stack204, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React312.createElement(Text192, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(selectedBid.address))), /* @__PURE__ */ React312.createElement(Stack204, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React312.createElement(Text192, { fw: 500, size: "md", c: bidStatus.color === "green" ? "green" : bidStatus.color === "red" ? "red" : void 0 }, bidStatus.color === "green" && /* @__PURE__ */ React312.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), bidStatus.label), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, getTimeAgo(selectedBid.created || "")))), /* @__PURE__ */ React312.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.details", { defaultValue: "Details" }) }, /* @__PURE__ */ React312.createElement(Stack204, { gap: "xs" }, /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, "Bid ID"), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", truncate: true }, selectedBid.id)), /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, "Collection"), /* @__PURE__ */ React312.createElement(Text192, { size: "xs" }, selectedBid.collection || collectionId)), /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.role", { defaultValue: "Role" })), /* @__PURE__ */ React312.createElement(Badge49, { size: "xs", variant: "light", color: getRoleColor2(selectedBid.role) }, getRoleLabel2(selectedBid.role, t))), /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.address", { defaultValue: "Address" })), /* @__PURE__ */ React312.createElement(Text192, { size: "xs" }, selectedBid.address)))), /* @__PURE__ */ React312.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.inputs", { defaultValue: "Inputs" }) }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React312.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.noInputData", { defaultValue: "No input data available." }))), /* @__PURE__ */ React312.createElement(
31456
+ ), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(selectedBid.address))), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", c: bidStatus.color === "green" ? "green" : bidStatus.color === "red" ? "red" : void 0 }, bidStatus.color === "green" && /* @__PURE__ */ React313.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), bidStatus.label), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, getTimeAgo(selectedBid.created || "")))), /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.details", { defaultValue: "Details" }) }, /* @__PURE__ */ React313.createElement(Stack205, { gap: "xs" }, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, "Bid ID"), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", truncate: true }, selectedBid.id)), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, "Collection"), /* @__PURE__ */ React313.createElement(Text193, { size: "xs" }, selectedBid.collection || collectionId)), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.role", { defaultValue: "Role" })), /* @__PURE__ */ React313.createElement(Badge49, { size: "xs", variant: "light", color: getRoleColor2(selectedBid.role) }, getRoleLabel2(selectedBid.role, t))), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.address", { defaultValue: "Address" })), /* @__PURE__ */ React313.createElement(Text193, { size: "xs" }, selectedBid.address)))), /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.inputs", { defaultValue: "Inputs" }) }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React313.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.noInputData", { defaultValue: "No input data available." }))), /* @__PURE__ */ React313.createElement(
31315
31457
  BaseSelect,
31316
31458
  {
31317
31459
  label: t("actionTypes.evaluateClaim.flow.decision.label", { defaultValue: "Decision" }),
@@ -31324,7 +31466,7 @@ var EvaluateBidFlowDetail = ({
31324
31466
  ],
31325
31467
  disabled: isDisabled || submitting
31326
31468
  }
31327
- ), decision && (decision === "reject" || decision === "approve" && bidIsEvaluator) && /* @__PURE__ */ React312.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React312.createElement(Stack204, { gap: "md" }, decision === "reject" && /* @__PURE__ */ React312.createElement(Stack204, { gap: 4 }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.reason", { defaultValue: "Reason" }), " ", bidIsEvaluator && /* @__PURE__ */ React312.createElement(Text192, { span: true, c: "red", size: "xs" }, "*")), /* @__PURE__ */ React312.createElement(
31469
+ ), decision && (decision === "reject" || decision === "approve" && bidIsEvaluator) && /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, decision === "reject" && /* @__PURE__ */ React313.createElement(Stack205, { gap: 4 }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.reason", { defaultValue: "Reason" }), " ", bidIsEvaluator && /* @__PURE__ */ React313.createElement(Text193, { span: true, c: "red", size: "xs" }, "*")), /* @__PURE__ */ React313.createElement(
31328
31470
  BaseTextArea,
31329
31471
  {
31330
31472
  placeholder: t("actionTypes.evaluateBid.flow.startTyping", { defaultValue: "Start Typing" }),
@@ -31333,7 +31475,7 @@ var EvaluateBidFlowDetail = ({
31333
31475
  minRows: 2,
31334
31476
  disabled: isDisabled || submitting
31335
31477
  }
31336
- )), decision === "approve" && bidIsEvaluator && /* @__PURE__ */ React312.createElement(React312.Fragment, null, /* @__PURE__ */ React312.createElement(Divider21, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.paymentLabel", { defaultValue: "Payment (used as evaluator max amount)" })), paymentRows.map((row, index) => /* @__PURE__ */ React312.createElement(Stack204, { key: row.id, gap: 8 }, /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between", align: "center" }, /* @__PURE__ */ React312.createElement(Text192, { size: "sm" }, t("actionTypes.evaluateClaim.flow.payment.token", { index: index + 1, defaultValue: `Token ${index + 1}` })), /* @__PURE__ */ React312.createElement(Group110, { gap: "xs" }, paymentRows.length > 1 && /* @__PURE__ */ React312.createElement(Button62, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.remove", { defaultValue: "Remove" })))), /* @__PURE__ */ React312.createElement(
31478
+ )), decision === "approve" && bidIsEvaluator && /* @__PURE__ */ React313.createElement(React313.Fragment, null, /* @__PURE__ */ React313.createElement(Divider21, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.paymentLabel", { defaultValue: "Payment (used as evaluator max amount)" })), paymentRows.map((row, index) => /* @__PURE__ */ React313.createElement(Stack205, { key: row.id, gap: 8 }, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between", align: "center" }, /* @__PURE__ */ React313.createElement(Text193, { size: "sm" }, t("actionTypes.evaluateClaim.flow.payment.token", { index: index + 1, defaultValue: `Token ${index + 1}` })), /* @__PURE__ */ React313.createElement(Group111, { gap: "xs" }, paymentRows.length > 1 && /* @__PURE__ */ React313.createElement(Button62, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.remove", { defaultValue: "Remove" })))), /* @__PURE__ */ React313.createElement(
31337
31479
  BaseSelect,
31338
31480
  {
31339
31481
  value: row.denom,
@@ -31346,7 +31488,7 @@ var EvaluateBidFlowDetail = ({
31346
31488
  clearable: false,
31347
31489
  disabled: isDisabled || submitting
31348
31490
  }
31349
- ), row.denom === CUSTOM_DENOM && /* @__PURE__ */ React312.createElement(
31491
+ ), row.denom === CUSTOM_DENOM && /* @__PURE__ */ React313.createElement(
31350
31492
  BaseTextInput,
31351
31493
  {
31352
31494
  placeholder: t("actionTypes.evaluateClaim.flow.payment.customDenomPlaceholder", { defaultValue: "Custom denom (e.g. ibc/... or uixo)" }),
@@ -31354,7 +31496,7 @@ var EvaluateBidFlowDetail = ({
31354
31496
  onChange: (event) => updatePaymentRow(row.id, { customDenom: event.currentTarget.value }),
31355
31497
  disabled: isDisabled || submitting
31356
31498
  }
31357
- ), /* @__PURE__ */ React312.createElement(
31499
+ ), /* @__PURE__ */ React313.createElement(
31358
31500
  BaseNumberInput,
31359
31501
  {
31360
31502
  min: 0,
@@ -31363,15 +31505,15 @@ var EvaluateBidFlowDetail = ({
31363
31505
  placeholder: t("actionTypes.evaluateClaim.flow.payment.amountPlaceholder", { defaultValue: "Amount" }),
31364
31506
  disabled: isDisabled || submitting
31365
31507
  }
31366
- ))), /* @__PURE__ */ React312.createElement(Button62, { variant: "light", size: "xs", onClick: addPaymentRow, disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.addPayment", { defaultValue: "Add Payment" }))))), error && /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
31508
+ ))), /* @__PURE__ */ React313.createElement(Button62, { variant: "light", size: "xs", onClick: addPaymentRow, disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.addPayment", { defaultValue: "Add Payment" }))))), error && /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
31367
31509
  }
31368
31510
  const filterTabs = [{ value: "pending", label: t("actionTypes.evaluateBid.flow.status.pending", { defaultValue: "Pending" }) }];
31369
- return /* @__PURE__ */ React312.createElement(Stack204, { gap: "md" }, /* @__PURE__ */ React312.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React312.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "decide this application" }), !deedDid || !collectionId ? /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
31511
+ return /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React313.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React313.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "decide this application" }), !deedDid || !collectionId ? /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
31370
31512
  defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
31371
31513
  did: "DID",
31372
31514
  claimCollection: "claim collection"
31373
- })) : /* @__PURE__ */ React312.createElement(React312.Fragment, null, /* @__PURE__ */ React312.createElement(Group110, { justify: "space-between", align: "center" }, /* @__PURE__ */ React312.createElement(Group110, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React312.createElement(
31374
- UnstyledButton3,
31515
+ })) : /* @__PURE__ */ React313.createElement(React313.Fragment, null, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between", align: "center" }, /* @__PURE__ */ React313.createElement(Group111, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React313.createElement(
31516
+ UnstyledButton4,
31375
31517
  {
31376
31518
  key: tab.value,
31377
31519
  onClick: () => setActiveFilter(tab.value),
@@ -31383,14 +31525,14 @@ var EvaluateBidFlowDetail = ({
31383
31525
  transition: "background 150ms ease"
31384
31526
  }
31385
31527
  },
31386
- /* @__PURE__ */ React312.createElement(Text192, { size: "sm", fw: 500, c: activeFilter === tab.value ? "var(--mantine-color-text)" : "dimmed" }, tab.label)
31387
- ))), /* @__PURE__ */ React312.createElement(Group110, { gap: 4 }, /* @__PURE__ */ React312.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loadingBids || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React312.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React312.createElement(IconFilter, { size: 16 })))), loadingBids && /* @__PURE__ */ React312.createElement(Group110, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React312.createElement(Loader55, { size: "xs" }), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.loadingBids", { defaultValue: "Loading bids..." }))), !loadingBids && filteredBids.length === 0 && /* @__PURE__ */ React312.createElement(Text192, { size: "sm", c: "dimmed", ta: "center", py: "md" }, bids.length === 0 ? t("actionTypes.evaluateBid.flow.empty.allCollections", { defaultValue: "No bids available for this collection." }) : t("actionTypes.evaluateBid.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} bids found.` })), filteredBids.length > 0 && /* @__PURE__ */ React312.createElement(Stack204, { gap: 12 }, filteredBids.map((bid) => {
31528
+ /* @__PURE__ */ React313.createElement(Text193, { size: "sm", fw: 500, c: activeFilter === tab.value ? "var(--mantine-color-text)" : "dimmed" }, tab.label)
31529
+ ))), /* @__PURE__ */ React313.createElement(Group111, { gap: 4 }, /* @__PURE__ */ React313.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loadingBids || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React313.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React313.createElement(IconFilter, { size: 16 })))), loadingBids && /* @__PURE__ */ React313.createElement(Group111, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React313.createElement(Loader55, { size: "xs" }), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.loadingBids", { defaultValue: "Loading bids..." }))), !loadingBids && filteredBids.length === 0 && /* @__PURE__ */ React313.createElement(Text193, { size: "sm", c: "dimmed", ta: "center", py: "md" }, bids.length === 0 ? t("actionTypes.evaluateBid.flow.empty.allCollections", { defaultValue: "No bids available for this collection." }) : t("actionTypes.evaluateBid.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} bids found.` })), filteredBids.length > 0 && /* @__PURE__ */ React313.createElement(Stack205, { gap: 12 }, filteredBids.map((bid) => {
31388
31530
  const status = getBidStatus(bid, t);
31389
31531
  const profile = profilesByDid[bid.did];
31390
31532
  const displayName = profile?.displayname || bid.did || bid.address;
31391
31533
  const avatarLabel = (profile?.displayname || bid.did || bid.address || "?")[0]?.toUpperCase();
31392
- return /* @__PURE__ */ React312.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React312.createElement(Group110, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React312.createElement(
31393
- Box56,
31534
+ return /* @__PURE__ */ React313.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React313.createElement(Group111, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(
31535
+ Box57,
31394
31536
  {
31395
31537
  style: {
31396
31538
  width: 32,
@@ -31410,8 +31552,8 @@ var EvaluateBidFlowDetail = ({
31410
31552
  }
31411
31553
  },
31412
31554
  profile?.avatarUrl ? null : avatarLabel
31413
- ), /* @__PURE__ */ React312.createElement(Stack204, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React312.createElement(Text192, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(bid.address)))), /* @__PURE__ */ React312.createElement(Stack204, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React312.createElement(Text192, { fw: 500, size: "md", c: status.color === "green" ? "green" : status.color === "red" ? "red" : void 0, style: { lineHeight: 1.5 } }, status.color === "green" && /* @__PURE__ */ React312.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed" }, getTimeAgo(bid.created || ""))));
31414
- }))), error && /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
31555
+ ), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(bid.address)))), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", c: status.color === "green" ? "green" : status.color === "red" ? "red" : void 0, style: { lineHeight: 1.5 } }, status.color === "green" && /* @__PURE__ */ React313.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, getTimeAgo(bid.created || ""))));
31556
+ }))), error && /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
31415
31557
  };
31416
31558
 
31417
31559
  // src/mantine/blocks/action/actionTypes/evaluateBid/index.ts
@@ -31428,8 +31570,8 @@ registerActionTypeUI("qi/bid.evaluate", {
31428
31570
  import { IconFileText as IconFileText5 } from "@tabler/icons-react";
31429
31571
 
31430
31572
  // src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
31431
- import React313, { useCallback as useCallback106, useEffect as useEffect108, useMemo as useMemo113, useRef as useRef39, useState as useState162 } from "react";
31432
- import { Alert as Alert46, Button as Button63, Loader as Loader56, Stack as Stack205, Text as Text193 } from "@mantine/core";
31573
+ import React314, { useCallback as useCallback106, useEffect as useEffect108, useMemo as useMemo113, useRef as useRef39, useState as useState163 } from "react";
31574
+ import { Alert as Alert46, Button as Button63, Loader as Loader56, Stack as Stack206, Text as Text194 } from "@mantine/core";
31433
31575
 
31434
31576
  // src/mantine/blocks/action/actionTypes/claim/types.ts
31435
31577
  function parseClaimActionInputs(json) {
@@ -31456,10 +31598,10 @@ function serializeClaimActionInputs(inputs) {
31456
31598
  var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31457
31599
  const t = useTranslate();
31458
31600
  const handlers = useBlocknoteHandlers();
31459
- const [local, setLocal] = useState162(() => parseClaimActionInputs(inputs));
31460
- const [collections, setCollections] = useState162([]);
31461
- const [loadingCollections, setLoadingCollections] = useState162(false);
31462
- const [error, setError] = useState162(null);
31601
+ const [local, setLocal] = useState163(() => parseClaimActionInputs(inputs));
31602
+ const [collections, setCollections] = useState163([]);
31603
+ const [loadingCollections, setLoadingCollections] = useState163(false);
31604
+ const [error, setError] = useState163(null);
31463
31605
  const localRef = useRef39(local);
31464
31606
  useEffect108(() => {
31465
31607
  localRef.current = local;
@@ -31478,8 +31620,8 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31478
31620
  },
31479
31621
  [onInputsChange]
31480
31622
  );
31481
- const [schemaLoading, setSchemaLoading] = useState162(false);
31482
- const [schemaError, setSchemaError] = useState162(null);
31623
+ const [schemaLoading, setSchemaLoading] = useState163(false);
31624
+ const [schemaError, setSchemaError] = useState163(null);
31483
31625
  const fetchGenRef = useRef39(0);
31484
31626
  const materialiseSurveySchema = useCallback106(
31485
31627
  async (deedDid, collectionId) => {
@@ -31556,7 +31698,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31556
31698
  })),
31557
31699
  [collections]
31558
31700
  );
31559
- return /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React313.createElement(
31701
+ return /* @__PURE__ */ React314.createElement(Stack206, { gap: "md" }, /* @__PURE__ */ React314.createElement(
31560
31702
  DataInput,
31561
31703
  {
31562
31704
  label: "DID",
@@ -31572,7 +31714,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31572
31714
  currentBlockId: blockId,
31573
31715
  required: true
31574
31716
  }
31575
- ), /* @__PURE__ */ React313.createElement(
31717
+ ), /* @__PURE__ */ React314.createElement(
31576
31718
  Button63,
31577
31719
  {
31578
31720
  size: "xs",
@@ -31583,7 +31725,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31583
31725
  }
31584
31726
  },
31585
31727
  t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
31586
- ), /* @__PURE__ */ React313.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React313.createElement(Loader56, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React313.createElement(Alert46, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React313.createElement(
31728
+ ), /* @__PURE__ */ React314.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React314.createElement(Loader56, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React314.createElement(Alert46, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React314.createElement(
31587
31729
  BaseSelect,
31588
31730
  {
31589
31731
  label: "Claim Collection",
@@ -31597,15 +31739,15 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
31597
31739
  required: true,
31598
31740
  searchable: true
31599
31741
  }
31600
- ), local.collectionId && /* @__PURE__ */ React313.createElement(Stack205, { gap: 4 }, schemaLoading && /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.claim.config.emitsPrefix", { defaultValue: "Emits" }), " ", /* @__PURE__ */ React313.createElement("code", null, "submitted"), " ", t("actionTypes.claim.config.emitsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.claim.config.typedSurveyField", {
31742
+ ), local.collectionId && /* @__PURE__ */ React314.createElement(Stack206, { gap: 4 }, schemaLoading && /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.config.emitsPrefix", { defaultValue: "Emits" }), " ", /* @__PURE__ */ React314.createElement("code", null, "submitted"), " ", t("actionTypes.claim.config.emitsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.claim.config.typedSurveyField", {
31601
31743
  count: local.surveyAnswersSchema.length,
31602
31744
  defaultValue: local.surveyAnswersSchema.length === 1 ? "typed survey field" : "typed survey fields"
31603
- }), ". ", t("actionTypes.claim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React313.createElement("code", null, "$", "{", "sourceBlock.payload.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React313.createElement(Alert46, { color: "yellow", styles: actionAlertStyles }, schemaError)));
31745
+ }), ". ", t("actionTypes.claim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React314.createElement("code", null, "$", "{", "sourceBlock.payload.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React314.createElement(Alert46, { color: "yellow", styles: actionAlertStyles }, schemaError)));
31604
31746
  };
31605
31747
 
31606
31748
  // src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
31607
- import React314, { useCallback as useCallback107, useEffect as useEffect109, useMemo as useMemo114, useRef as useRef40, useState as useState163 } from "react";
31608
- import { ActionIcon as ActionIcon45, Box as Box57, Group as Group111, Loader as Loader57, Stack as Stack206, Text as Text194 } from "@mantine/core";
31749
+ import React315, { useCallback as useCallback107, useEffect as useEffect109, useMemo as useMemo114, useRef as useRef40, useState as useState164 } from "react";
31750
+ import { ActionIcon as ActionIcon45, Box as Box58, Group as Group112, Loader as Loader57, Stack as Stack207, Text as Text195 } from "@mantine/core";
31609
31751
  import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconPlayerPlay as IconPlayerPlay6 } from "@tabler/icons-react";
31610
31752
  import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
31611
31753
 
@@ -31736,7 +31878,7 @@ var ClaimFlowDetail = ({
31736
31878
  registerRuntimeInputs,
31737
31879
  executeAction
31738
31880
  }) => {
31739
- const [actAs, setActAs] = useState163(emptyActAsGroupState());
31881
+ const [actAs, setActAs] = useState164(emptyActAsGroupState());
31740
31882
  const t = useTranslate();
31741
31883
  const handlers = useBlocknoteHandlers();
31742
31884
  const handlersRef = useRef40(handlers);
@@ -31755,25 +31897,25 @@ var ClaimFlowDetail = ({
31755
31897
  const resolveOpts = useMemo114(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
31756
31898
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
31757
31899
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
31758
- const [claims, setClaims] = useState163([]);
31759
- const [loadingClaims, setLoadingClaims] = useState163(false);
31760
- const [adminAddress, setAdminAddress] = useState163("");
31761
- const [surveyJson, setSurveyJson] = useState163(null);
31762
- const [prefillData, setPrefillData] = useState163(null);
31763
- const [loadingSurvey, setLoadingSurvey] = useState163(false);
31764
- const [submitting, setSubmitting] = useState163(false);
31765
- const [error, setError] = useState163(null);
31766
- const [profilesByDid, setProfilesByDid] = useState163({});
31767
- const [isServiceAgentAuthorized, setIsServiceAgentAuthorized] = useState163(false);
31768
- const [authChecking, setAuthChecking] = useState163(true);
31769
- const [authError, setAuthError] = useState163(null);
31770
- const [authRetryKey, setAuthRetryKey] = useState163(0);
31771
- const [surveyComplete, setSurveyComplete] = useState163(false);
31772
- const [selectedClaimId, setSelectedClaimId] = useState163("");
31773
- const [selectedClaimData, setSelectedClaimData] = useState163(null);
31774
- const [loadingClaimDetail, setLoadingClaimDetail] = useState163(false);
31775
- const [disputeDetails, setDisputeDetails] = useState163(null);
31776
- const [loadingDispute, setLoadingDispute] = useState163(false);
31900
+ const [claims, setClaims] = useState164([]);
31901
+ const [loadingClaims, setLoadingClaims] = useState164(false);
31902
+ const [adminAddress, setAdminAddress] = useState164("");
31903
+ const [surveyJson, setSurveyJson] = useState164(null);
31904
+ const [prefillData, setPrefillData] = useState164(null);
31905
+ const [loadingSurvey, setLoadingSurvey] = useState164(false);
31906
+ const [submitting, setSubmitting] = useState164(false);
31907
+ const [error, setError] = useState164(null);
31908
+ const [profilesByDid, setProfilesByDid] = useState164({});
31909
+ const [isServiceAgentAuthorized, setIsServiceAgentAuthorized] = useState164(false);
31910
+ const [authChecking, setAuthChecking] = useState164(true);
31911
+ const [authError, setAuthError] = useState164(null);
31912
+ const [authRetryKey, setAuthRetryKey] = useState164(0);
31913
+ const [surveyComplete, setSurveyComplete] = useState164(false);
31914
+ const [selectedClaimId, setSelectedClaimId] = useState164("");
31915
+ const [selectedClaimData, setSelectedClaimData] = useState164(null);
31916
+ const [loadingClaimDetail, setLoadingClaimDetail] = useState164(false);
31917
+ const [disputeDetails, setDisputeDetails] = useState164(null);
31918
+ const [loadingDispute, setLoadingDispute] = useState164(false);
31777
31919
  const selectedClaim = useMemo114(() => claims.find((c) => c.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
31778
31920
  const selectedClaimStatus = useMemo114(() => selectedClaim ? getClaimStatusInfo(selectedClaim) : null, [selectedClaim]);
31779
31921
  const isSelectedDisputed = selectedClaimStatus?.key === "disputed";
@@ -32198,30 +32340,30 @@ var ClaimFlowDetail = ({
32198
32340
  });
32199
32341
  }, [surveyModel, handlers, editor, deedDid, collectionId, block.id, block?.props?.title]);
32200
32342
  if (selectedClaim) {
32201
- return /* @__PURE__ */ React314.createElement(Stack206, { gap: "md" }, /* @__PURE__ */ React314.createElement(Group111, { gap: "xs", align: "center" }, /* @__PURE__ */ React314.createElement(ActionIcon45, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React314.createElement(IconArrowLeft9, { size: 16 })), /* @__PURE__ */ React314.createElement(Text194, { fw: 500, size: "sm", title: selectedClaim.claimId }, t("actionTypes.claim.flow.claimNumber", { id: truncateId(selectedClaim.claimId), defaultValue: `Claim #${truncateId(selectedClaim.claimId)}` }))), selectedClaimStatus && /* @__PURE__ */ React314.createElement(Group111, { gap: "xs", align: "center" }, /* @__PURE__ */ React314.createElement(Text194, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.statusLabel", { defaultValue: "Status:" })), /* @__PURE__ */ React314.createElement(Text194, { fw: 500, size: "sm", c: selectedClaimStatus.color }, selectedClaimStatus.label), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, "\xB7 ", getTimeAgo2(selectedClaim.submissionDate || ""))), isSelectedDisputed && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "orange", title: t("actionTypes.claim.flow.disputed.title", { defaultValue: "Claim disputed" }), styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React314.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React314.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React314.createElement(Text194, { size: "xs" }, t("actionTypes.claim.flow.disputed.loadingDetails", { defaultValue: "Loading dispute details\u2026" }))) : disputeDetails ? /* @__PURE__ */ React314.createElement(Stack206, { gap: 6 }, disputeDetails.reason ? /* @__PURE__ */ React314.createElement(Text194, { size: "sm" }, disputeDetails.reason) : /* @__PURE__ */ React314.createElement(Text194, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noMessage", { defaultValue: "The evaluator disputed this claim but did not provide a message." })), (disputeDetails.evaluatorDid || disputeDetails.disputedAt) && /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, disputeDetails.evaluatorDid ? t("actionTypes.claim.flow.disputed.byEvaluator", {
32343
+ return /* @__PURE__ */ React315.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React315.createElement(Group112, { gap: "xs", align: "center" }, /* @__PURE__ */ React315.createElement(ActionIcon45, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React315.createElement(IconArrowLeft9, { size: 16 })), /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "sm", title: selectedClaim.claimId }, t("actionTypes.claim.flow.claimNumber", { id: truncateId(selectedClaim.claimId), defaultValue: `Claim #${truncateId(selectedClaim.claimId)}` }))), selectedClaimStatus && /* @__PURE__ */ React315.createElement(Group112, { gap: "xs", align: "center" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.statusLabel", { defaultValue: "Status:" })), /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "sm", c: selectedClaimStatus.color }, selectedClaimStatus.label), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "\xB7 ", getTimeAgo2(selectedClaim.submissionDate || ""))), isSelectedDisputed && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", title: t("actionTypes.claim.flow.disputed.title", { defaultValue: "Claim disputed" }), styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs" }, t("actionTypes.claim.flow.disputed.loadingDetails", { defaultValue: "Loading dispute details\u2026" }))) : disputeDetails ? /* @__PURE__ */ React315.createElement(Stack207, { gap: 6 }, disputeDetails.reason ? /* @__PURE__ */ React315.createElement(Text195, { size: "sm" }, disputeDetails.reason) : /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noMessage", { defaultValue: "The evaluator disputed this claim but did not provide a message." })), (disputeDetails.evaluatorDid || disputeDetails.disputedAt) && /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, disputeDetails.evaluatorDid ? t("actionTypes.claim.flow.disputed.byEvaluator", {
32202
32344
  address: truncateAddress3(disputeDetails.evaluatorDid),
32203
32345
  defaultValue: `By ${truncateAddress3(disputeDetails.evaluatorDid)}`
32204
- }) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React314.createElement(BasePrimaryButton, { onClick: amendAndResubmit, disabled: isDisabled || submitting || !isServiceAgentAuthorized || !selectedClaimData }, t("actionTypes.claim.flow.disputed.amendAndResubmit", { defaultValue: "Amend & Resubmit" }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), loadingClaimDetail ? /* @__PURE__ */ React314.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React314.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingSubmission", { defaultValue: "Loading submission\u2026" }))) : detailSurveyModel ? /* @__PURE__ */ React314.createElement(StableSurvey, { model: detailSurveyModel }) : /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.noSubmissionData", { defaultValue: "No submission data available." })), error && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
32346
+ }) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React315.createElement(BasePrimaryButton, { onClick: amendAndResubmit, disabled: isDisabled || submitting || !isServiceAgentAuthorized || !selectedClaimData }, t("actionTypes.claim.flow.disputed.amendAndResubmit", { defaultValue: "Amend & Resubmit" }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), loadingClaimDetail ? /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingSubmission", { defaultValue: "Loading submission\u2026" }))) : detailSurveyModel ? /* @__PURE__ */ React315.createElement(StableSurvey, { model: detailSurveyModel }) : /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.noSubmissionData", { defaultValue: "No submission data available." })), error && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
32205
32347
  }
32206
- return /* @__PURE__ */ React314.createElement(Stack206, { gap: "md" }, /* @__PURE__ */ React314.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React314.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "submit this claim", authzFilter: collectionId ? { requiresAuthz: "submitClaim", collectionId } : void 0 }), !deedDid || !collectionId ? /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
32348
+ return /* @__PURE__ */ React315.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React315.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React315.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "submit this claim", authzFilter: collectionId ? { requiresAuthz: "submitClaim", collectionId } : void 0 }), !deedDid || !collectionId ? /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
32207
32349
  defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
32208
32350
  did: "DID",
32209
32351
  claimCollection: "claim collection"
32210
- })) : /* @__PURE__ */ React314.createElement(React314.Fragment, null, /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.shared.collectionPrefix", { id: collectionId, defaultValue: `Collection: ${collectionId}` })), prefillData && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, t("actionTypes.claim.flow.amendingNotice", { defaultValue: "Amending a previously disputed claim \u2014 edit the fields below and submit to resubmit." })), /* @__PURE__ */ React314.createElement(
32352
+ })) : /* @__PURE__ */ React315.createElement(React315.Fragment, null, /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.shared.collectionPrefix", { id: collectionId, defaultValue: `Collection: ${collectionId}` })), prefillData && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, t("actionTypes.claim.flow.amendingNotice", { defaultValue: "Amending a previously disputed claim \u2014 edit the fields below and submit to resubmit." })), /* @__PURE__ */ React315.createElement(
32211
32353
  BasePrimaryButton,
32212
32354
  {
32213
- leftSection: loadingSurvey || authChecking ? /* @__PURE__ */ React314.createElement(Loader57, { size: 14 }) : /* @__PURE__ */ React314.createElement(IconPlayerPlay6, { size: 14 }),
32355
+ leftSection: loadingSurvey || authChecking ? /* @__PURE__ */ React315.createElement(Loader57, { size: 14 }) : /* @__PURE__ */ React315.createElement(IconPlayerPlay6, { size: 14 }),
32214
32356
  onClick: startSurvey,
32215
32357
  disabled: isDisabled || loadingSurvey || submitting || authChecking || !isServiceAgentAuthorized && !actAs.actAsGroup || !adminAddress
32216
32358
  },
32217
32359
  authChecking ? t("actionTypes.claim.flow.checkingAuthorization", { defaultValue: "Checking authorization..." }) : loadingSurvey ? t("actionTypes.shared.loadingSurvey", { defaultValue: "Loading Survey..." }) : t("actionTypes.claim.flow.startNewClaim", { defaultValue: "Start New Claim" })
32218
- ), !authChecking && authError && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, /* @__PURE__ */ React314.createElement(Stack206, { gap: "xs" }, /* @__PURE__ */ React314.createElement(Text194, { size: "sm" }, t("actionTypes.claim.flow.authVerifyFailed", { defaultValue: "Couldn't verify your authorization \u2014 the chain RPC is unreachable." })), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, authError), /* @__PURE__ */ React314.createElement(BasePrimaryButton, { size: "xs", onClick: () => setAuthRetryKey((k) => k + 1) }, t("actionTypes.claim.flow.retry", { defaultValue: "Retry" })))), !authChecking && !authError && !isServiceAgentAuthorized && !actAs.actAsGroup && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.claim.flow.errors.notAuthorized", { defaultValue: "You need service agent authorization for this collection to submit claims." })), loadingClaims ? /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingYourClaims", { defaultValue: "Loading your claims..." })) : claims.length === 0 ? /* @__PURE__ */ React314.createElement(Text194, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.noClaimsYet", { defaultValue: "No claims submitted for this collection yet." })) : /* @__PURE__ */ React314.createElement(Stack206, { gap: "xs" }, /* @__PURE__ */ React314.createElement(Text194, { size: "sm", fw: 600 }, t("actionTypes.claim.flow.yourClaims", { defaultValue: "Your Claims" })), claims.map((claim) => {
32360
+ ), !authChecking && authError && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm" }, t("actionTypes.claim.flow.authVerifyFailed", { defaultValue: "Couldn't verify your authorization \u2014 the chain RPC is unreachable." })), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, authError), /* @__PURE__ */ React315.createElement(BasePrimaryButton, { size: "xs", onClick: () => setAuthRetryKey((k) => k + 1) }, t("actionTypes.claim.flow.retry", { defaultValue: "Retry" })))), !authChecking && !authError && !isServiceAgentAuthorized && !actAs.actAsGroup && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.claim.flow.errors.notAuthorized", { defaultValue: "You need service agent authorization for this collection to submit claims." })), loadingClaims ? /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingYourClaims", { defaultValue: "Loading your claims..." })) : claims.length === 0 ? /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.noClaimsYet", { defaultValue: "No claims submitted for this collection yet." })) : /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, t("actionTypes.claim.flow.yourClaims", { defaultValue: "Your Claims" })), claims.map((claim) => {
32219
32361
  const status = getClaimStatusInfo(claim);
32220
32362
  const profile = profilesByDid[claim.agentDid];
32221
32363
  const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
32222
32364
  const avatarLabel = (profile?.displayname || claim.agentDid || claim.agentAddress || "?")[0]?.toUpperCase();
32223
- return /* @__PURE__ */ React314.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React314.createElement(Group111, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React314.createElement(
32224
- Box57,
32365
+ return /* @__PURE__ */ React315.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React315.createElement(Group112, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React315.createElement(
32366
+ Box58,
32225
32367
  {
32226
32368
  style: {
32227
32369
  width: 32,
@@ -32241,8 +32383,8 @@ var ClaimFlowDetail = ({
32241
32383
  }
32242
32384
  },
32243
32385
  profile?.avatarUrl ? null : avatarLabel
32244
- ), /* @__PURE__ */ React314.createElement(Stack206, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React314.createElement(Text194, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed", truncate: true }, truncateAddress3(claim.agentAddress)))), /* @__PURE__ */ React314.createElement(Stack206, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React314.createElement(Text194, { fw: 500, size: "md", c: status.color, style: { lineHeight: 1.5 } }, status.key === "approved" && /* @__PURE__ */ React314.createElement(IconCheck22, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, getTimeAgo2(claim.submissionDate || ""))));
32245
- }))), surveyModel && !loadingSurvey && /* @__PURE__ */ React314.createElement(React314.Fragment, null, /* @__PURE__ */ React314.createElement(SurveyAiFillButton, { surveyId: openSurveyId, title: openSurveyTitle }), /* @__PURE__ */ React314.createElement(StableSurvey, { model: surveyModel })), submitting && /* @__PURE__ */ React314.createElement(Group111, { gap: "xs" }, /* @__PURE__ */ React314.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.submittingClaim", { defaultValue: "Submitting claim..." }))), error && /* @__PURE__ */ React314.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
32386
+ ), /* @__PURE__ */ React315.createElement(Stack207, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed", truncate: true }, truncateAddress3(claim.agentAddress)))), /* @__PURE__ */ React315.createElement(Stack207, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "md", c: status.color, style: { lineHeight: 1.5 } }, status.key === "approved" && /* @__PURE__ */ React315.createElement(IconCheck22, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, getTimeAgo2(claim.submissionDate || ""))));
32387
+ }))), surveyModel && !loadingSurvey && /* @__PURE__ */ React315.createElement(React315.Fragment, null, /* @__PURE__ */ React315.createElement(SurveyAiFillButton, { surveyId: openSurveyId, title: openSurveyTitle }), /* @__PURE__ */ React315.createElement(StableSurvey, { model: surveyModel })), submitting && /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.submittingClaim", { defaultValue: "Submitting claim..." }))), error && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
32246
32388
  };
32247
32389
 
32248
32390
  // src/mantine/blocks/action/actionTypes/claim/index.ts
@@ -32259,8 +32401,8 @@ registerActionTypeUI("qi/claim.submit", {
32259
32401
  import { IconFolders as IconFolders2 } from "@tabler/icons-react";
32260
32402
 
32261
32403
  // src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleConfig.tsx
32262
- import React315, { useCallback as useCallback108, useEffect as useEffect110, useMemo as useMemo115, useState as useState164 } from "react";
32263
- import { Alert as Alert47, Badge as Badge50, Button as Button64, Group as Group112, Loader as Loader58, Stack as Stack207, Text as Text195 } from "@mantine/core";
32404
+ import React316, { useCallback as useCallback108, useEffect as useEffect110, useMemo as useMemo115, useState as useState165 } from "react";
32405
+ import { Alert as Alert47, Badge as Badge50, Button as Button64, Group as Group113, Loader as Loader58, Stack as Stack208, Text as Text196 } from "@mantine/core";
32264
32406
  import { IconInfoCircle as IconInfoCircle9 } from "@tabler/icons-react";
32265
32407
  var DEFAULT7 = {
32266
32408
  entity: "",
@@ -32281,10 +32423,10 @@ function parseInputs(json) {
32281
32423
  }
32282
32424
  var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32283
32425
  const handlers = useBlocknoteHandlers();
32284
- const [local, setLocal] = useState164(() => parseInputs(inputs));
32285
- const [protocols, setProtocols] = useState164([]);
32286
- const [loadingProtocols, setLoadingProtocols] = useState164(false);
32287
- const [protocolError, setProtocolError] = useState164(null);
32426
+ const [local, setLocal] = useState165(() => parseInputs(inputs));
32427
+ const [protocols, setProtocols] = useState165([]);
32428
+ const [loadingProtocols, setLoadingProtocols] = useState165(false);
32429
+ const [protocolError, setProtocolError] = useState165(null);
32288
32430
  useEffect110(() => {
32289
32431
  setLocal(parseInputs(inputs));
32290
32432
  }, [inputs]);
@@ -32341,7 +32483,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32341
32483
  [protocols]
32342
32484
  );
32343
32485
  const isManageMode = local.collectionId.trim().length > 0;
32344
- return /* @__PURE__ */ React315.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React315.createElement(Group112, { justify: "space-between", align: "center" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, "Collection Context"), /* @__PURE__ */ React315.createElement(Badge50, { color: isManageMode ? "accent" : "neutralColor", variant: "light", size: "sm" }, isManageMode ? "Manage existing" : "Create new")), /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, "Entity DID"), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "The entity DID that owns the collection. Its linked claim protocols are fetched below."), /* @__PURE__ */ React315.createElement(
32486
+ return /* @__PURE__ */ React316.createElement(Stack208, { gap: "md" }, /* @__PURE__ */ React316.createElement(Group113, { justify: "space-between", align: "center" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Collection Context"), /* @__PURE__ */ React316.createElement(Badge50, { color: isManageMode ? "accent" : "neutralColor", variant: "light", size: "sm" }, isManageMode ? "Manage existing" : "Create new")), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Entity DID"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "The entity DID that owns the collection. Its linked claim protocols are fetched below."), /* @__PURE__ */ React316.createElement(
32345
32487
  BaseTextInput,
32346
32488
  {
32347
32489
  placeholder: "did:ixo:entity:...",
@@ -32352,7 +32494,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32352
32494
  update({ entity: e.currentTarget.value });
32353
32495
  }
32354
32496
  }
32355
- ), /* @__PURE__ */ React315.createElement(
32497
+ ), /* @__PURE__ */ React316.createElement(
32356
32498
  Button64,
32357
32499
  {
32358
32500
  size: "xs",
@@ -32367,7 +32509,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32367
32509
  }
32368
32510
  },
32369
32511
  "Use Current Entity"
32370
- )), /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, "Claim Protocol"), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "The verifiableClaim protocol for claims in this collection. Fetched from the entity's linked claims, so the selected protocol always matches the chosen entity."), /* @__PURE__ */ React315.createElement(BasePrimaryButton, { onClick: fetchProtocols, disabled: !local.entity.trim() || loadingProtocols }, loadingProtocols ? /* @__PURE__ */ React315.createElement(Loader58, { size: "xs", color: "dark" }) : "Get Protocols"), protocolError && /* @__PURE__ */ React315.createElement(Alert47, { color: "red", styles: actionAlertStyles }, protocolError), protocolOptions.length > 0 && /* @__PURE__ */ React315.createElement(
32512
+ )), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Claim Protocol"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "The verifiableClaim protocol for claims in this collection. Fetched from the entity's linked claims, so the selected protocol always matches the chosen entity."), /* @__PURE__ */ React316.createElement(BasePrimaryButton, { onClick: fetchProtocols, disabled: !local.entity.trim() || loadingProtocols }, loadingProtocols ? /* @__PURE__ */ React316.createElement(Loader58, { size: "xs", color: "dark" }) : "Get Protocols"), protocolError && /* @__PURE__ */ React316.createElement(Alert47, { color: "red", styles: actionAlertStyles }, protocolError), protocolOptions.length > 0 && /* @__PURE__ */ React316.createElement(
32371
32513
  BaseSelect,
32372
32514
  {
32373
32515
  label: "Protocol",
@@ -32378,12 +32520,12 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
32378
32520
  required: true,
32379
32521
  searchable: true
32380
32522
  }
32381
- ), local.protocol && protocolOptions.length === 0 && /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "Currently selected: ", /* @__PURE__ */ React315.createElement("code", null, local.protocol), " \u2014 press \u201CGet Protocols\u201D to change it."), local.protocol && (!local.protocol.startsWith("did:") || local.protocol.includes("#")) && /* @__PURE__ */ React315.createElement(Alert47, { color: "red", styles: actionAlertStyles }, "The saved protocol ", /* @__PURE__ */ React315.createElement("code", null, local.protocol), " is not a valid DID, so creating a collection will fail. This is usually an unresolved claim-template reference \u2014 press \u201CGet Protocols\u201D and pick the protocol again.")), /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, "Collection ID (optional)"), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "Leave empty to make this block a create entry point. Set an existing collection id (or a ", /* @__PURE__ */ React315.createElement("code", null, "{{block.output.collectionId}}"), " reference) to manage an existing collection."), /* @__PURE__ */ React315.createElement(BaseTextInput, { placeholder: "Leave empty to create a new collection", value: local.collectionId, onChange: (e) => update({ collectionId: e.currentTarget.value }) })), /* @__PURE__ */ React315.createElement(Alert47, { color: "neutralColor", variant: "light", icon: icon(IconInfoCircle9, 16) }, /* @__PURE__ */ React315.createElement(Text195, { size: "xs" }, isManageMode ? "Manage-only mode: the block loads this collection and exposes lifecycle operations (state, dates, quota, payments, intents). Entity and protocol are only used for creation." : "Create mode: the block creates a new collection from the entity and protocol above. Schedule, quota, payments, and intents are chosen at run time.")));
32523
+ ), local.protocol && protocolOptions.length === 0 && /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "Currently selected: ", /* @__PURE__ */ React316.createElement("code", null, local.protocol), " \u2014 press \u201CGet Protocols\u201D to change it."), local.protocol && (!local.protocol.startsWith("did:") || local.protocol.includes("#")) && /* @__PURE__ */ React316.createElement(Alert47, { color: "red", styles: actionAlertStyles }, "The saved protocol ", /* @__PURE__ */ React316.createElement("code", null, local.protocol), " is not a valid DID, so creating a collection will fail. This is usually an unresolved claim-template reference \u2014 press \u201CGet Protocols\u201D and pick the protocol again.")), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Collection ID (optional)"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "Leave empty to make this block a create entry point. Set an existing collection id (or a ", /* @__PURE__ */ React316.createElement("code", null, "{{block.output.collectionId}}"), " reference) to manage an existing collection."), /* @__PURE__ */ React316.createElement(BaseTextInput, { placeholder: "Leave empty to create a new collection", value: local.collectionId, onChange: (e) => update({ collectionId: e.currentTarget.value }) })), /* @__PURE__ */ React316.createElement(Alert47, { color: "neutralColor", variant: "light", icon: icon(IconInfoCircle9, 16) }, /* @__PURE__ */ React316.createElement(Text196, { size: "xs" }, isManageMode ? "Manage-only mode: the block loads this collection and exposes lifecycle operations (state, dates, quota, payments, intents). Entity and protocol are only used for creation." : "Create mode: the block creates a new collection from the entity and protocol above. Schedule, quota, payments, and intents are chosen at run time.")));
32382
32524
  };
32383
32525
 
32384
32526
  // src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleFlowDetail.tsx
32385
- import React316, { useCallback as useCallback109, useEffect as useEffect111, useMemo as useMemo116, useRef as useRef41, useState as useState165 } from "react";
32386
- import { Badge as Badge51, Box as Box58, Button as Button65, Group as Group113, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl14, Stack as Stack208, Text as Text196 } from "@mantine/core";
32527
+ import React317, { useCallback as useCallback109, useEffect as useEffect111, useMemo as useMemo116, useRef as useRef41, useState as useState166 } from "react";
32528
+ import { Badge as Badge51, Box as Box59, Button as Button65, Group as Group114, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl14, Stack as Stack209, Text as Text197 } from "@mantine/core";
32387
32529
  import { DateTimePicker as DateTimePicker2 } from "@mantine/dates";
32388
32530
  import { IconAlertCircle as IconAlertCircle27, IconCheck as IconCheck23, IconRefresh as IconRefresh8 } from "@tabler/icons-react";
32389
32531
 
@@ -32536,7 +32678,7 @@ var CollectionLifecycleFlowDetail = ({
32536
32678
  registerRuntimeInputs,
32537
32679
  executeAction
32538
32680
  }) => {
32539
- const [actAs, setActAs] = useState165(emptyActAsGroupState());
32681
+ const [actAs, setActAs] = useState166(emptyActAsGroupState());
32540
32682
  const parsed = useMemo116(() => parseTemplateInputs(inputs), [inputs]);
32541
32683
  const editorDocument = editor?.document || [];
32542
32684
  const resolveOpts = useMemo116(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
@@ -32552,22 +32694,22 @@ var CollectionLifecycleFlowDetail = ({
32552
32694
  const hasSnapshot = !!outputCollectionId;
32553
32695
  const isManageMode = !!boundCollectionId || hasSnapshot;
32554
32696
  const isCreateMode = !isManageMode;
32555
- const [operation, setOperation] = useState165(isCreateMode ? "create" : "updateState");
32697
+ const [operation, setOperation] = useState166(isCreateMode ? "create" : "updateState");
32556
32698
  useEffect111(() => {
32557
32699
  if (hasSnapshot && operation === "create") {
32558
32700
  setOperation("updateState");
32559
32701
  }
32560
32702
  }, [hasSnapshot, operation]);
32561
- const [createQuota, setCreateQuota] = useState165(parsed.quota || "0");
32562
- const [createStartDate, setCreateStartDate] = useState165(parsed.startDate || "");
32563
- const [createEndDate, setCreateEndDate] = useState165(parsed.endDate || "");
32564
- const [createPayments, setCreatePayments] = useState165(() => paymentsToInput(parsed.payments));
32565
- const [targetState, setTargetState] = useState165(output?.state ?? 0 /* OPEN */);
32566
- const [editStartDate, setEditStartDate] = useState165("");
32567
- const [editEndDate, setEditEndDate] = useState165("");
32568
- const [editQuota, setEditQuota] = useState165("");
32569
- const [editPayments, setEditPayments] = useState165(() => paymentsToInput(output?.payments));
32570
- const [editIntentsJson, setEditIntentsJson] = useState165("");
32703
+ const [createQuota, setCreateQuota] = useState166(parsed.quota || "0");
32704
+ const [createStartDate, setCreateStartDate] = useState166(parsed.startDate || "");
32705
+ const [createEndDate, setCreateEndDate] = useState166(parsed.endDate || "");
32706
+ const [createPayments, setCreatePayments] = useState166(() => paymentsToInput(parsed.payments));
32707
+ const [targetState, setTargetState] = useState166(output?.state ?? 0 /* OPEN */);
32708
+ const [editStartDate, setEditStartDate] = useState166("");
32709
+ const [editEndDate, setEditEndDate] = useState166("");
32710
+ const [editQuota, setEditQuota] = useState166("");
32711
+ const [editPayments, setEditPayments] = useState166(() => paymentsToInput(output?.payments));
32712
+ const [editIntentsJson, setEditIntentsJson] = useState166("");
32571
32713
  const seededFromRef = useRef41("");
32572
32714
  useEffect111(() => {
32573
32715
  if (!hasSnapshot) return;
@@ -32821,7 +32963,7 @@ var CollectionLifecycleFlowDetail = ({
32821
32963
  }, [runRefresh]);
32822
32964
  const title = block?.props?.title || (isCreateMode ? "Create Claim Collection" : "Manage Claim Collection");
32823
32965
  const description = block?.props?.description || "";
32824
- return /* @__PURE__ */ React316.createElement(Stack208, { gap: "md", pos: "relative" }, /* @__PURE__ */ React316.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React316.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "update this collection" }), /* @__PURE__ */ React316.createElement(Stack208, { gap: 2 }, /* @__PURE__ */ React316.createElement(Text196, { fw: 600 }, title), description && /* @__PURE__ */ React316.createElement(Text196, { size: "sm", c: "dimmed" }, description)), isStale && /* @__PURE__ */ React316.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React316.createElement(IconAlertCircle27, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm" }, "Block was marked completed but no collection state was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React316.createElement(Group113, null, /* @__PURE__ */ React316.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React316.createElement(Button65, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React316.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React316.createElement(IconAlertCircle27, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, errorMessage && /* @__PURE__ */ React316.createElement(Text196, { size: "sm" }, errorMessage), /* @__PURE__ */ React316.createElement(Group113, null, /* @__PURE__ */ React316.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!effectiveCollectionId && /* @__PURE__ */ React316.createElement(Button65, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React316.createElement(IconRefresh8, { size: 14 }), onClick: handleManualRefresh }, "Refresh State")))), isManageMode && !hasSnapshot && !isRunning && !isFailed && /* @__PURE__ */ React316.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Loader59, { size: 14 }), /* @__PURE__ */ React316.createElement(Text196, { size: "sm", c: "dimmed" }, "Loading collection ", effectiveCollectionId ? `(${effectiveCollectionId})` : "", "\u2026")), hasSnapshot && /* @__PURE__ */ React316.createElement(Stack208, { gap: "md" }, /* @__PURE__ */ React316.createElement(StatsStrip, { output }), isCompletedWithProof && /* @__PURE__ */ React316.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React316.createElement(IconCheck23, { size: 16 }), color: "green", styles: actionAlertStyles }, "Collection ", outputCollectionId, " synced \u2014 ", stateLabel(output?.state), "."), /* @__PURE__ */ React316.createElement(
32966
+ return /* @__PURE__ */ React317.createElement(Stack209, { gap: "md", pos: "relative" }, /* @__PURE__ */ React317.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React317.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "update this collection" }), /* @__PURE__ */ React317.createElement(Stack209, { gap: 2 }, /* @__PURE__ */ React317.createElement(Text197, { fw: 600 }, title), description && /* @__PURE__ */ React317.createElement(Text197, { size: "sm", c: "dimmed" }, description)), isStale && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconAlertCircle27, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React317.createElement(Stack209, { gap: "xs" }, /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, "Block was marked completed but no collection state was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React317.createElement(Group114, null, /* @__PURE__ */ React317.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React317.createElement(Button65, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconAlertCircle27, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React317.createElement(Stack209, { gap: "xs" }, errorMessage && /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, errorMessage), /* @__PURE__ */ React317.createElement(Group114, null, /* @__PURE__ */ React317.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!effectiveCollectionId && /* @__PURE__ */ React317.createElement(Button65, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React317.createElement(IconRefresh8, { size: 14 }), onClick: handleManualRefresh }, "Refresh State")))), isManageMode && !hasSnapshot && !isRunning && !isFailed && /* @__PURE__ */ React317.createElement(Group114, { gap: "xs" }, /* @__PURE__ */ React317.createElement(Loader59, { size: 14 }), /* @__PURE__ */ React317.createElement(Text197, { size: "sm", c: "dimmed" }, "Loading collection ", effectiveCollectionId ? `(${effectiveCollectionId})` : "", "\u2026")), hasSnapshot && /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, /* @__PURE__ */ React317.createElement(StatsStrip, { output }), isCompletedWithProof && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconCheck23, { size: 16 }), color: "green", styles: actionAlertStyles }, "Collection ", outputCollectionId, " synced \u2014 ", stateLabel(output?.state), "."), /* @__PURE__ */ React317.createElement(
32825
32967
  SegmentedControl14,
32826
32968
  {
32827
32969
  fullWidth: true,
@@ -32836,7 +32978,7 @@ var CollectionLifecycleFlowDetail = ({
32836
32978
  { label: "Intents", value: "updateIntents" }
32837
32979
  ]
32838
32980
  }
32839
- ), operation === "updateState" && /* @__PURE__ */ React316.createElement(
32981
+ ), operation === "updateState" && /* @__PURE__ */ React317.createElement(
32840
32982
  SegmentedControl14,
32841
32983
  {
32842
32984
  fullWidth: true,
@@ -32849,7 +32991,7 @@ var CollectionLifecycleFlowDetail = ({
32849
32991
  { label: "Closed", value: String(2 /* CLOSED */) }
32850
32992
  ]
32851
32993
  }
32852
- ), operation === "updateDates" && /* @__PURE__ */ React316.createElement(Group113, { grow: true, align: "flex-start" }, /* @__PURE__ */ React316.createElement(
32994
+ ), operation === "updateDates" && /* @__PURE__ */ React317.createElement(Group114, { grow: true, align: "flex-start" }, /* @__PURE__ */ React317.createElement(
32853
32995
  DateTimePicker2,
32854
32996
  {
32855
32997
  label: "Start date",
@@ -32860,7 +33002,7 @@ var CollectionLifecycleFlowDetail = ({
32860
33002
  onChange: (date) => setEditStartDate(dateToIso2(date)),
32861
33003
  disabled: isDisabled || isRunning
32862
33004
  }
32863
- ), /* @__PURE__ */ React316.createElement(
33005
+ ), /* @__PURE__ */ React317.createElement(
32864
33006
  DateTimePicker2,
32865
33007
  {
32866
33008
  label: "End date",
@@ -32872,7 +33014,7 @@ var CollectionLifecycleFlowDetail = ({
32872
33014
  onChange: (date) => setEditEndDate(dateToIso2(date)),
32873
33015
  disabled: isDisabled || isRunning
32874
33016
  }
32875
- )), operation === "updateQuota" && /* @__PURE__ */ React316.createElement(
33017
+ )), operation === "updateQuota" && /* @__PURE__ */ React317.createElement(
32876
33018
  BaseNumberInput,
32877
33019
  {
32878
33020
  label: "Quota (0 = unlimited)",
@@ -32882,7 +33024,7 @@ var CollectionLifecycleFlowDetail = ({
32882
33024
  onChange: (value) => setEditQuota(value === "" || value == null ? "" : String(value)),
32883
33025
  disabled: isDisabled || isRunning
32884
33026
  }
32885
- ), operation === "updatePayments" && /* @__PURE__ */ React316.createElement(PaymentsEditor, { value: editPayments, onChange: setEditPayments, disabled: isDisabled || isRunning }), operation === "updateIntents" && /* @__PURE__ */ React316.createElement(
33027
+ ), operation === "updatePayments" && /* @__PURE__ */ React317.createElement(PaymentsEditor, { value: editPayments, onChange: setEditPayments, disabled: isDisabled || isRunning }), operation === "updateIntents" && /* @__PURE__ */ React317.createElement(
32886
33028
  BaseTextInput,
32887
33029
  {
32888
33030
  label: "Intents (JSON)",
@@ -32891,7 +33033,7 @@ var CollectionLifecycleFlowDetail = ({
32891
33033
  onChange: (e) => setEditIntentsJson(e.currentTarget.value),
32892
33034
  disabled: isDisabled || isRunning
32893
33035
  }
32894
- ), !validation.ok && validation.error && /* @__PURE__ */ React316.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isCreateMode && !hasSnapshot && /* @__PURE__ */ React316.createElement(Stack208, { gap: "md" }, (!parsed.entity || !parsed.protocol) && /* @__PURE__ */ React316.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "Configure the entity DID and protocol in template mode before creating a collection."), /* @__PURE__ */ React316.createElement(
33036
+ ), !validation.ok && validation.error && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isCreateMode && !hasSnapshot && /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, (!parsed.entity || !parsed.protocol) && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "Configure the entity DID and protocol in template mode before creating a collection."), /* @__PURE__ */ React317.createElement(
32895
33037
  BaseNumberInput,
32896
33038
  {
32897
33039
  label: "Quota (0 = unlimited)",
@@ -32900,7 +33042,7 @@ var CollectionLifecycleFlowDetail = ({
32900
33042
  onChange: (value) => setCreateQuota(value === "" || value == null ? "" : String(value)),
32901
33043
  disabled: isDisabled || isRunning
32902
33044
  }
32903
- ), /* @__PURE__ */ React316.createElement(Group113, { grow: true, align: "flex-start" }, /* @__PURE__ */ React316.createElement(
33045
+ ), /* @__PURE__ */ React317.createElement(Group114, { grow: true, align: "flex-start" }, /* @__PURE__ */ React317.createElement(
32904
33046
  DateTimePicker2,
32905
33047
  {
32906
33048
  label: "Start date",
@@ -32911,7 +33053,7 @@ var CollectionLifecycleFlowDetail = ({
32911
33053
  onChange: (date) => setCreateStartDate(dateToIso2(date)),
32912
33054
  disabled: isDisabled || isRunning
32913
33055
  }
32914
- ), /* @__PURE__ */ React316.createElement(
33056
+ ), /* @__PURE__ */ React317.createElement(
32915
33057
  DateTimePicker2,
32916
33058
  {
32917
33059
  label: "End date",
@@ -32923,13 +33065,13 @@ var CollectionLifecycleFlowDetail = ({
32923
33065
  onChange: (date) => setCreateEndDate(dateToIso2(date)),
32924
33066
  disabled: isDisabled || isRunning
32925
33067
  }
32926
- )), /* @__PURE__ */ React316.createElement(PaymentsEditor, { value: createPayments, onChange: setCreatePayments, disabled: isDisabled || isRunning }), !validation.ok && validation.error && /* @__PURE__ */ React316.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isDisabled && /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "This block is currently disabled."), isRunning && /* @__PURE__ */ React316.createElement(Overlay, { color: "var(--mantine-color-body)", backgroundOpacity: 0.6, blur: 1, zIndex: 5, radius: "md" }, /* @__PURE__ */ React316.createElement(Group113, { gap: "xs", justify: "center", h: "100%" }, /* @__PURE__ */ React316.createElement(Loader59, { size: 16 }), /* @__PURE__ */ React316.createElement(Text196, { size: "sm" }, "Syncing collection state\u2026"))));
33068
+ )), /* @__PURE__ */ React317.createElement(PaymentsEditor, { value: createPayments, onChange: setCreatePayments, disabled: isDisabled || isRunning }), !validation.ok && validation.error && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isDisabled && /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, "This block is currently disabled."), isRunning && /* @__PURE__ */ React317.createElement(Overlay, { color: "var(--mantine-color-body)", backgroundOpacity: 0.6, blur: 1, zIndex: 5, radius: "md" }, /* @__PURE__ */ React317.createElement(Group114, { gap: "xs", justify: "center", h: "100%" }, /* @__PURE__ */ React317.createElement(Loader59, { size: 16 }), /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, "Syncing collection state\u2026"))));
32927
33069
  };
32928
33070
  var PaymentsEditor = ({ value, onChange, disabled }) => {
32929
33071
  const setLeg = (key, patch) => {
32930
33072
  onChange({ ...value, [key]: { ...value[key], ...patch } });
32931
33073
  };
32932
- return /* @__PURE__ */ React316.createElement(Stack208, { gap: "sm" }, /* @__PURE__ */ React316.createElement(Stack208, { gap: 2 }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 500 }, "Payouts"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "Optional payout per claim stage, paid from the entity admin account. Leave blank for no payout.")), PAYMENT_LEGS.map(({ key, label, description }) => /* @__PURE__ */ React316.createElement(Group113, { key, align: "flex-end", gap: "sm", wrap: "nowrap" }, /* @__PURE__ */ React316.createElement(
33074
+ return /* @__PURE__ */ React317.createElement(Stack209, { gap: "sm" }, /* @__PURE__ */ React317.createElement(Stack209, { gap: 2 }, /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 500 }, "Payouts"), /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, "Optional payout per claim stage, paid from the entity admin account. Leave blank for no payout.")), PAYMENT_LEGS.map(({ key, label, description }) => /* @__PURE__ */ React317.createElement(Group114, { key, align: "flex-end", gap: "sm", wrap: "nowrap" }, /* @__PURE__ */ React317.createElement(
32933
33075
  BaseNumberInput,
32934
33076
  {
32935
33077
  label,
@@ -32942,7 +33084,7 @@ var PaymentsEditor = ({ value, onChange, disabled }) => {
32942
33084
  onChange: (v) => setLeg(key, { amount: v === "" || v == null ? "" : String(v) }),
32943
33085
  disabled
32944
33086
  }
32945
- ), /* @__PURE__ */ React316.createElement(
33087
+ ), /* @__PURE__ */ React317.createElement(
32946
33088
  BaseSelect,
32947
33089
  {
32948
33090
  label: "Token",
@@ -32956,8 +33098,8 @@ var PaymentsEditor = ({ value, onChange, disabled }) => {
32956
33098
  ))));
32957
33099
  };
32958
33100
  var StatsStrip = ({ output }) => {
32959
- return /* @__PURE__ */ React316.createElement(
32960
- Box58,
33101
+ return /* @__PURE__ */ React317.createElement(
33102
+ Box59,
32961
33103
  {
32962
33104
  style: {
32963
33105
  border: "1px solid var(--mantine-color-neutralColor-6)",
@@ -32966,12 +33108,12 @@ var StatsStrip = ({ output }) => {
32966
33108
  background: "var(--mantine-color-neutralColor-5)"
32967
33109
  }
32968
33110
  },
32969
- /* @__PURE__ */ React316.createElement(Group113, { justify: "space-between", wrap: "wrap", gap: "md" }, /* @__PURE__ */ React316.createElement(Stat, { label: "Collection", value: output.collectionId, mono: true }), /* @__PURE__ */ React316.createElement(Stat, { label: "State", value: stateLabel(output.state), badge: true, stateValue: output.state }), /* @__PURE__ */ React316.createElement(Stat, { label: "Count", value: String(output.count ?? "0") }), /* @__PURE__ */ React316.createElement(Stat, { label: "Quota", value: formatQuota(output.quota) }), output.startDate && /* @__PURE__ */ React316.createElement(Stat, { label: "Start", value: output.startDate }), output.endDate && /* @__PURE__ */ React316.createElement(Stat, { label: "End", value: output.endDate }))
33111
+ /* @__PURE__ */ React317.createElement(Group114, { justify: "space-between", wrap: "wrap", gap: "md" }, /* @__PURE__ */ React317.createElement(Stat, { label: "Collection", value: output.collectionId, mono: true }), /* @__PURE__ */ React317.createElement(Stat, { label: "State", value: stateLabel(output.state), badge: true, stateValue: output.state }), /* @__PURE__ */ React317.createElement(Stat, { label: "Count", value: String(output.count ?? "0") }), /* @__PURE__ */ React317.createElement(Stat, { label: "Quota", value: formatQuota(output.quota) }), output.startDate && /* @__PURE__ */ React317.createElement(Stat, { label: "Start", value: output.startDate }), output.endDate && /* @__PURE__ */ React317.createElement(Stat, { label: "End", value: output.endDate }))
32970
33112
  );
32971
33113
  };
32972
33114
  var Stat = ({ label, value, mono, badge, stateValue }) => {
32973
33115
  const badgeColor = stateValue === 0 /* OPEN */ ? "green" : stateValue === 1 /* PAUSED */ ? "yellow" : "red";
32974
- return /* @__PURE__ */ React316.createElement(Stack208, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, label), badge ? /* @__PURE__ */ React316.createElement(Badge51, { color: badgeColor, variant: "light" }, value) : /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600, style: mono ? { wordBreak: "break-all", fontFamily: "var(--mantine-font-family-monospace)" } : void 0 }, value));
33116
+ return /* @__PURE__ */ React317.createElement(Stack209, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, label), badge ? /* @__PURE__ */ React317.createElement(Badge51, { color: badgeColor, variant: "light" }, value) : /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 600, style: mono ? { wordBreak: "break-all", fontFamily: "var(--mantine-font-family-monospace)" } : void 0 }, value));
32975
33117
  };
32976
33118
 
32977
33119
  // src/mantine/blocks/action/actionTypes/collection/index.ts
@@ -32988,8 +33130,8 @@ registerActionTypeUI("qi/collection.lifecycle", {
32988
33130
  import { IconUsers as IconUsers8 } from "@tabler/icons-react";
32989
33131
 
32990
33132
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
32991
- import React317, { useCallback as useCallback110, useEffect as useEffect112, useMemo as useMemo117, useState as useState166 } from "react";
32992
- import { Alert as Alert48, Button as Button66, Group as Group114, Loader as Loader60, Paper as Paper24, Select as Select9, Stack as Stack209, Text as Text197 } from "@mantine/core";
33133
+ import React318, { useCallback as useCallback110, useEffect as useEffect112, useMemo as useMemo117, useState as useState167 } from "react";
33134
+ import { Alert as Alert48, Button as Button66, Group as Group115, Loader as Loader60, Paper as Paper24, Select as Select9, Stack as Stack210, Text as Text198 } from "@mantine/core";
32993
33135
  import { IconBolt as IconBolt11, IconClock as IconClock13, IconPencil } from "@tabler/icons-react";
32994
33136
 
32995
33137
  // src/mantine/blocks/action/actionTypes/collectionUsers/types.ts
@@ -33009,7 +33151,7 @@ function serializeCollectionUsersActionInputs(inputs) {
33009
33151
  }
33010
33152
 
33011
33153
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
33012
- var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */ React317.createElement(
33154
+ var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */ React318.createElement(
33013
33155
  Paper24,
33014
33156
  {
33015
33157
  withBorder: true,
@@ -33032,20 +33174,20 @@ var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__P
33032
33174
  transition: "border-color 120ms ease, background 120ms ease"
33033
33175
  }
33034
33176
  },
33035
- /* @__PURE__ */ React317.createElement(Stack209, { gap: 4 }, /* @__PURE__ */ React317.createElement(Group114, { gap: 6, align: "center", wrap: "nowrap" }, icon2, /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 600 }, title)), /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, description))
33177
+ /* @__PURE__ */ React318.createElement(Stack210, { gap: 4 }, /* @__PURE__ */ React318.createElement(Group115, { gap: 6, align: "center", wrap: "nowrap" }, icon2, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, title)), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, description))
33036
33178
  );
33037
33179
  var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33038
33180
  const t = useTranslate();
33039
33181
  const handlers = useBlocknoteHandlers();
33040
- const [local, setLocal] = useState166(() => parseCollectionUsersActionInputs(inputs));
33041
- const [collections, setCollections] = useState166([]);
33042
- const [loadingCollections, setLoadingCollections] = useState166(false);
33043
- const [error, setError] = useState166(null);
33182
+ const [local, setLocal] = useState167(() => parseCollectionUsersActionInputs(inputs));
33183
+ const [collections, setCollections] = useState167([]);
33184
+ const [loadingCollections, setLoadingCollections] = useState167(false);
33185
+ const [error, setError] = useState167(null);
33044
33186
  const readTriggerRaw = useCallback110(() => {
33045
33187
  const b = (editor?.document || []).find((x) => x?.id === blockId);
33046
33188
  return typeof b?.props?.trigger === "string" ? b.props.trigger : "";
33047
33189
  }, [editor, blockId]);
33048
- const [triggerRaw, setTriggerRaw] = useState166(() => readTriggerRaw());
33190
+ const [triggerRaw, setTriggerRaw] = useState167(() => readTriggerRaw());
33049
33191
  useEffect112(() => {
33050
33192
  setLocal(parseCollectionUsersActionInputs(inputs));
33051
33193
  setTriggerRaw(readTriggerRaw());
@@ -33153,25 +33295,25 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33153
33295
  })),
33154
33296
  [collections]
33155
33297
  );
33156
- return /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, /* @__PURE__ */ React317.createElement(Stack209, { gap: 6 }, /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 600 }, "How is the collection chosen?"), /* @__PURE__ */ React317.createElement(Group114, { gap: "sm", align: "stretch", grow: true }, /* @__PURE__ */ React317.createElement(
33298
+ return /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(Stack210, { gap: 6 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "How is the collection chosen?"), /* @__PURE__ */ React318.createElement(Group115, { gap: "sm", align: "stretch", grow: true }, /* @__PURE__ */ React318.createElement(
33157
33299
  ModeCard,
33158
33300
  {
33159
33301
  active: mode === "trigger",
33160
- icon: /* @__PURE__ */ React317.createElement(IconBolt11, { size: 16, color: "var(--mantine-color-accent-5)" }),
33302
+ icon: /* @__PURE__ */ React318.createElement(IconBolt11, { size: 16, color: "var(--mantine-color-accent-5)" }),
33161
33303
  title: "From a created collection",
33162
33304
  description: "Wait for a Claim Collection block to create a collection, then manage it automatically.",
33163
33305
  onClick: switchToTrigger
33164
33306
  }
33165
- ), /* @__PURE__ */ React317.createElement(
33307
+ ), /* @__PURE__ */ React318.createElement(
33166
33308
  ModeCard,
33167
33309
  {
33168
33310
  active: mode === "manual",
33169
- icon: /* @__PURE__ */ React317.createElement(IconPencil, { size: 16 }),
33311
+ icon: /* @__PURE__ */ React318.createElement(IconPencil, { size: 16 }),
33170
33312
  title: "Enter manually",
33171
33313
  description: "Pick the entity and an existing collection yourself.",
33172
33314
  onClick: switchToManual
33173
33315
  }
33174
- ))), mode === "trigger" ? /* @__PURE__ */ React317.createElement(Stack209, { gap: "sm" }, /* @__PURE__ */ React317.createElement(
33316
+ ))), mode === "trigger" ? /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(
33175
33317
  Select9,
33176
33318
  {
33177
33319
  label: "Source collection block",
@@ -33185,7 +33327,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33185
33327
  disabled: sourceOptions.length === 0,
33186
33328
  searchable: true
33187
33329
  }
33188
- ), selectedSource ? /* @__PURE__ */ React317.createElement(Alert48, { icon: /* @__PURE__ */ React317.createElement(IconClock13, { size: 16 }), color: "accent", styles: actionAlertStyles }, /* @__PURE__ */ React317.createElement(Text197, { size: "xs" }, "Activates when ", /* @__PURE__ */ React317.createElement("b", null, selectedSource.label), " creates a collection. The entity and collection are taken from that event \u2014 there's nothing to enter here.")) : /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, "Choose the Claim Collection block whose \u201Ccreated\u201D event should activate this one. Until it fires, this block waits.")) : /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, /* @__PURE__ */ React317.createElement(
33330
+ ), selectedSource ? /* @__PURE__ */ React318.createElement(Alert48, { icon: /* @__PURE__ */ React318.createElement(IconClock13, { size: 16 }), color: "accent", styles: actionAlertStyles }, /* @__PURE__ */ React318.createElement(Text198, { size: "xs" }, "Activates when ", /* @__PURE__ */ React318.createElement("b", null, selectedSource.label), " creates a collection. The entity and collection are taken from that event \u2014 there's nothing to enter here.")) : /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Choose the Claim Collection block whose \u201Ccreated\u201D event should activate this one. Until it fires, this block waits.")) : /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(
33189
33331
  DataInput,
33190
33332
  {
33191
33333
  label: "DID",
@@ -33201,7 +33343,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33201
33343
  currentBlockId: blockId,
33202
33344
  required: true
33203
33345
  }
33204
- ), /* @__PURE__ */ React317.createElement(
33346
+ ), /* @__PURE__ */ React318.createElement(
33205
33347
  Button66,
33206
33348
  {
33207
33349
  size: "xs",
@@ -33212,7 +33354,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33212
33354
  }
33213
33355
  },
33214
33356
  t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
33215
- ), /* @__PURE__ */ React317.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React317.createElement(Loader60, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React317.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React317.createElement(
33357
+ ), /* @__PURE__ */ React318.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React318.createElement(Loader60, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React318.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React318.createElement(
33216
33358
  BaseSelect,
33217
33359
  {
33218
33360
  label: "Claim Collection",
@@ -33227,8 +33369,8 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
33227
33369
  };
33228
33370
 
33229
33371
  // src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersFlowDetail.tsx
33230
- import React318, { useCallback as useCallback111, useEffect as useEffect113, useMemo as useMemo118, useRef as useRef42, useState as useState167 } from "react";
33231
- import { ActionIcon as ActionIcon46, Badge as Badge52, Box as Box59, Button as Button67, Divider as Divider22, Group as Group115, Loader as Loader61, Radio as Radio5, SegmentedControl as SegmentedControl15, Stack as Stack210, Text as Text198 } from "@mantine/core";
33372
+ import React319, { useCallback as useCallback111, useEffect as useEffect113, useMemo as useMemo118, useRef as useRef42, useState as useState168 } from "react";
33373
+ import { ActionIcon as ActionIcon46, Badge as Badge52, Box as Box60, Button as Button67, Divider as Divider22, Group as Group116, Loader as Loader61, Radio as Radio5, SegmentedControl as SegmentedControl15, Stack as Stack211, Text as Text199 } from "@mantine/core";
33232
33374
  import { useDebouncedValue } from "@mantine/hooks";
33233
33375
  import { IconAlertCircle as IconAlertCircle28, IconArrowLeft as IconArrowLeft10, IconCheck as IconCheck24, IconRefresh as IconRefresh9, IconTrash as IconTrash10 } from "@tabler/icons-react";
33234
33376
  var LOG2 = "[collection.users]";
@@ -33286,7 +33428,7 @@ function formatCoin3(coin) {
33286
33428
  return `${fromBaseUnits(coin.amount)} ${denom}`;
33287
33429
  }
33288
33430
  function MaxAmountsInput({ value, onChange, disabled }) {
33289
- return /* @__PURE__ */ React318.createElement(Stack210, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Evaluator max amounts"), /* @__PURE__ */ React318.createElement(Group115, { grow: true, align: "flex-start" }, /* @__PURE__ */ React318.createElement(
33431
+ return /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Evaluator max amounts"), /* @__PURE__ */ React319.createElement(Group116, { grow: true, align: "flex-start" }, /* @__PURE__ */ React319.createElement(
33290
33432
  BaseNumberInput,
33291
33433
  {
33292
33434
  label: "IXO",
@@ -33295,7 +33437,7 @@ function MaxAmountsInput({ value, onChange, disabled }) {
33295
33437
  onChange: (amount) => onChange({ ...value, ixo: amount === "" || amount == null ? "" : String(amount) }),
33296
33438
  disabled
33297
33439
  }
33298
- ), /* @__PURE__ */ React318.createElement(
33440
+ ), /* @__PURE__ */ React319.createElement(
33299
33441
  BaseNumberInput,
33300
33442
  {
33301
33443
  label: "USDC",
@@ -33354,7 +33496,7 @@ var CollectionUsersFlowDetail = ({
33354
33496
  executeAction,
33355
33497
  activePendingInvocation
33356
33498
  }) => {
33357
- const [actAs, setActAs] = useState167(emptyActAsGroupState());
33499
+ const [actAs, setActAs] = useState168(emptyActAsGroupState());
33358
33500
  const t = useTranslate();
33359
33501
  const handlers = useBlocknoteHandlers();
33360
33502
  const handlersRef = useRef42(handlers);
@@ -33376,8 +33518,8 @@ var CollectionUsersFlowDetail = ({
33376
33518
  }, [activePendingInvocation]);
33377
33519
  const deedDid = useMemo118(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
33378
33520
  const collectionId = useMemo118(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
33379
- const [adminAddress, setAdminAddress] = useState167("");
33380
- const [adminError, setAdminError] = useState167(null);
33521
+ const [adminAddress, setAdminAddress] = useState168("");
33522
+ const [adminError, setAdminError] = useState168(null);
33381
33523
  useEffect113(() => {
33382
33524
  let mounted = true;
33383
33525
  if (!deedDid) {
@@ -33408,7 +33550,7 @@ var CollectionUsersFlowDetail = ({
33408
33550
  const out = output;
33409
33551
  return Array.isArray(out?.grantees) ? out.grantees : [];
33410
33552
  }, [output]);
33411
- const [granteeProfilesByDid, setGranteeProfilesByDid] = useState167({});
33553
+ const [granteeProfilesByDid, setGranteeProfilesByDid] = useState168({});
33412
33554
  const isRunning = runtime.state === "running";
33413
33555
  const isFailed = runtime.state === "failed";
33414
33556
  const errorMessage = runtime.error?.message || null;
@@ -33417,22 +33559,22 @@ var CollectionUsersFlowDetail = ({
33417
33559
  const hasProof = hasTxProof || hasListProof;
33418
33560
  const isCompletedWithProof = runtime.state === "completed" && hasProof;
33419
33561
  const isStale = runtime.state === "completed" && !hasProof;
33420
- const [section, setSection] = useState167("list");
33421
- const [activeOp, setActiveOp] = useState167("add");
33422
- const [addAddress, setAddAddress] = useState167("");
33423
- const [addRole, setAddRole] = useState167("submit");
33424
- const [addQuota, setAddQuota] = useState167(String(DEFAULT_CONTRIBUTOR_QUOTA));
33425
- const [addMaxAmounts, setAddMaxAmounts] = useState167(EMPTY_MAX_AMOUNTS);
33426
- const [granteeKind, setGranteeKind] = useState167("user");
33427
- const [members, setMembers] = useState167([]);
33428
- const [revokeTarget, setRevokeTarget] = useState167(null);
33562
+ const [section, setSection] = useState168("list");
33563
+ const [activeOp, setActiveOp] = useState168("add");
33564
+ const [addAddress, setAddAddress] = useState168("");
33565
+ const [addRole, setAddRole] = useState168("submit");
33566
+ const [addQuota, setAddQuota] = useState168(String(DEFAULT_CONTRIBUTOR_QUOTA));
33567
+ const [addMaxAmounts, setAddMaxAmounts] = useState168(EMPTY_MAX_AMOUNTS);
33568
+ const [granteeKind, setGranteeKind] = useState168("user");
33569
+ const [members, setMembers] = useState168([]);
33570
+ const [revokeTarget, setRevokeTarget] = useState168(null);
33429
33571
  const classifyHandler = handlers.classifyAddress;
33430
33572
  const enumerateHandler = handlers.enumerateMembers;
33431
33573
  const canClassify = typeof classifyHandler === "function";
33432
33574
  const canEnumerate = typeof enumerateHandler === "function";
33433
- const [classification, setClassification] = useState167(null);
33434
- const [classifying, setClassifying] = useState167(false);
33435
- const [classifyError, setClassifyError] = useState167(null);
33575
+ const [classification, setClassification] = useState168(null);
33576
+ const [classifying, setClassifying] = useState168(false);
33577
+ const [classifyError, setClassifyError] = useState168(null);
33436
33578
  const [debouncedAddress] = useDebouncedValue(addAddress.trim(), 400);
33437
33579
  useEffect113(() => {
33438
33580
  setClassification(null);
@@ -33526,6 +33668,13 @@ var CollectionUsersFlowDetail = ({
33526
33668
  listOnLoadRef.current = false;
33527
33669
  runList();
33528
33670
  }, [runList]);
33671
+ const handleDownloadGranteesCsv = useCallback111(() => {
33672
+ const namesByDid = {};
33673
+ for (const [did, profile] of Object.entries(granteeProfilesByDid)) {
33674
+ if (profile?.displayname) namesByDid[did] = profile.displayname;
33675
+ }
33676
+ downloadArrayAsCsv(buildGranteeRows(listGrantees, namesByDid), { filename: `collection-members-${collectionId || "collection"}.csv` });
33677
+ }, [listGrantees, granteeProfilesByDid, collectionId]);
33529
33678
  useEffect113(() => {
33530
33679
  let mounted = true;
33531
33680
  const dids = Array.from(new Set(listGrantees.map(getGranteeDid).filter(Boolean)));
@@ -33694,11 +33843,11 @@ var CollectionUsersFlowDetail = ({
33694
33843
  const title = block?.props?.title || "Collection Users";
33695
33844
  const description = block?.props?.description || "";
33696
33845
  const configMissing = !collectionId;
33697
- return /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React318.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "change this collection's users" }), /* @__PURE__ */ React318.createElement(Stack210, { gap: 2 }, /* @__PURE__ */ React318.createElement(Text198, { fw: 600 }, title), description && /* @__PURE__ */ React318.createElement(Text198, { size: "sm", c: "dimmed" }, description)), configMissing && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.collectionUsers.flow.errors.configRequired", {
33846
+ return /* @__PURE__ */ React319.createElement(Stack211, { gap: "md" }, /* @__PURE__ */ React319.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React319.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "change this collection's users" }), /* @__PURE__ */ React319.createElement(Stack211, { gap: 2 }, /* @__PURE__ */ React319.createElement(Text199, { fw: 600 }, title), description && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed" }, description)), configMissing && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.collectionUsers.flow.errors.configRequired", {
33698
33847
  defaultValue: "Configure the {{did}} and {{claimCollection}} in template mode before running this action.",
33699
33848
  did: "DID",
33700
33849
  claimCollection: "claim collection"
33701
- })), isStale && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconAlertCircle28, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React318.createElement(Stack210, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm" }, "Block was marked completed but no result was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React318.createElement(Group115, null, /* @__PURE__ */ React318.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React318.createElement(Button67, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconAlertCircle28, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React318.createElement(Stack210, { gap: "xs" }, errorMessage && /* @__PURE__ */ React318.createElement(Text198, { size: "sm" }, errorMessage), /* @__PURE__ */ React318.createElement(Group115, null, /* @__PURE__ */ React318.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!collectionId && !!adminAddress && /* @__PURE__ */ React318.createElement(Button67, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React318.createElement(IconRefresh9, { size: 14 }), onClick: handleManualRefreshList }, "Refresh List")))), isCompletedWithProof && hasTxProof && (lastOp === "add" || lastOp === "revoke") && /* @__PURE__ */ React318.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React318.createElement(IconCheck24, { size: 16 }), color: "green", styles: actionAlertStyles }, lastOp === "add" ? "Grant broadcast" : "Revoke broadcast", " \u2014 tx ", truncateAddress4(String(output?.transactionHash || "")), "."), !configMissing && /* @__PURE__ */ React318.createElement(
33850
+ })), isStale && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconAlertCircle28, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Block was marked completed but no result was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React319.createElement(Group116, null, /* @__PURE__ */ React319.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React319.createElement(Button67, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconAlertCircle28, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, errorMessage && /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, errorMessage), /* @__PURE__ */ React319.createElement(Group116, null, /* @__PURE__ */ React319.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!collectionId && !!adminAddress && /* @__PURE__ */ React319.createElement(Button67, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 14 }), onClick: handleManualRefreshList }, "Refresh List")))), isCompletedWithProof && hasTxProof && (lastOp === "add" || lastOp === "revoke") && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconCheck24, { size: 16 }), color: "green", styles: actionAlertStyles }, lastOp === "add" ? "Grant broadcast" : "Revoke broadcast", " \u2014 tx ", truncateAddress4(String(output?.transactionHash || "")), "."), !configMissing && /* @__PURE__ */ React319.createElement(
33702
33851
  SegmentedControl15,
33703
33852
  {
33704
33853
  fullWidth: true,
@@ -33711,13 +33860,13 @@ var CollectionUsersFlowDetail = ({
33711
33860
  { label: "Bids", value: "bids" }
33712
33861
  ]
33713
33862
  }
33714
- ), !configMissing && section === "list" && /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(Group115, { justify: "space-between", align: "center" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "Grantees"), /* @__PURE__ */ React318.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: handleManualRefreshList, disabled: isRunning || !adminAddress }, /* @__PURE__ */ React318.createElement(IconRefresh9, { size: 16 }))), isRunning && lastOp !== "add" && lastOp !== "revoke" && /* @__PURE__ */ React318.createElement(Group115, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React318.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Loading grantees\u2026")), !isRunning && listGrantees.length === 0 && /* @__PURE__ */ React318.createElement(Text198, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No grantees hold a constraint for this collection yet."), listGrantees.map((grantee) => {
33863
+ ), !configMissing && section === "list" && /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, /* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Grantees"), /* @__PURE__ */ React319.createElement(Group116, { gap: 4 }, /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: handleDownloadGranteesCsv, disabled: isRunning || listGrantees.length === 0, label: "Download members CSV" }), /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: handleManualRefreshList, disabled: isRunning || !adminAddress }, /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 16 })))), isRunning && lastOp !== "add" && lastOp !== "revoke" && /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React319.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Loading grantees\u2026")), !isRunning && listGrantees.length === 0 && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No grantees hold a constraint for this collection yet."), listGrantees.map((grantee) => {
33715
33864
  const isTarget = revokeTarget?.address === grantee.address && revokeTarget?.role === grantee.role;
33716
33865
  const granteeDid = getGranteeDid(grantee);
33717
33866
  const profile = granteeProfilesByDid[granteeDid];
33718
33867
  const displayName = profile?.displayname || truncateAddress4(grantee.address);
33719
- return /* @__PURE__ */ React318.createElement(
33720
- Box59,
33868
+ return /* @__PURE__ */ React319.createElement(
33869
+ Box60,
33721
33870
  {
33722
33871
  key: `${grantee.address}-${grantee.role}`,
33723
33872
  style: {
@@ -33727,20 +33876,20 @@ var CollectionUsersFlowDetail = ({
33727
33876
  background: "var(--mantine-color-neutralColor-5)"
33728
33877
  }
33729
33878
  },
33730
- /* @__PURE__ */ React318.createElement(Group115, { justify: "space-between", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React318.createElement(Stack210, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600, truncate: true }, displayName), profile?.displayname && /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(grantee.address)), /* @__PURE__ */ React318.createElement(Group115, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Badge52, { size: "xs", variant: "light", color: grantee.role === "submit" ? "blue" : "green" }, roleLabel(grantee.role)), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Quota: ", formatQuota2(grantee.agentQuota)))), isTarget ? /* @__PURE__ */ React318.createElement(Button67, { size: "compact-xs", variant: "subtle", color: "gray", onClick: cancelRevoke, disabled: isDisabled || isRunning }, "Cancel") : /* @__PURE__ */ React318.createElement(
33879
+ /* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React319.createElement(Stack211, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600, truncate: true }, displayName), profile?.displayname && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(grantee.address)), /* @__PURE__ */ React319.createElement(Group116, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: grantee.role === "submit" ? "blue" : "green" }, roleLabel(grantee.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Quota: ", formatQuota2(grantee.agentQuota)))), isTarget ? /* @__PURE__ */ React319.createElement(Button67, { size: "compact-xs", variant: "subtle", color: "gray", onClick: cancelRevoke, disabled: isDisabled || isRunning }, "Cancel") : /* @__PURE__ */ React319.createElement(
33731
33880
  Button67,
33732
33881
  {
33733
33882
  size: "compact-xs",
33734
33883
  variant: "light",
33735
33884
  color: "red",
33736
- leftSection: /* @__PURE__ */ React318.createElement(IconTrash10, { size: 12 }),
33885
+ leftSection: /* @__PURE__ */ React319.createElement(IconTrash10, { size: 12 }),
33737
33886
  onClick: () => handleSelectRevoke(grantee),
33738
33887
  disabled: isDisabled || isRunning
33739
33888
  },
33740
33889
  "Revoke"
33741
33890
  ))
33742
33891
  );
33743
- }), revokeTarget && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, "Slide to sign to revoke ", roleLabel(revokeTarget.role), " from ", truncateAddress4(revokeTarget.address), ".")), !configMissing && section === "add" && /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, revokeTarget && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "A revoke is currently armed. Switch to the Users tab to sign it, or change the grantee below to arm an add instead."), /* @__PURE__ */ React318.createElement(Stack210, { gap: 4 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 500 }, "Grantee address"), /* @__PURE__ */ React318.createElement(
33892
+ }), revokeTarget && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, "Slide to sign to revoke ", roleLabel(revokeTarget.role), " from ", truncateAddress4(revokeTarget.address), ".")), !configMissing && section === "add" && /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, revokeTarget && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "A revoke is currently armed. Switch to the Users tab to sign it, or change the grantee below to arm an add instead."), /* @__PURE__ */ React319.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 500 }, "Grantee address"), /* @__PURE__ */ React319.createElement(
33744
33893
  RecipientInput,
33745
33894
  {
33746
33895
  value: addAddress,
@@ -33752,21 +33901,21 @@ var CollectionUsersFlowDetail = ({
33752
33901
  isDisabled: isDisabled || isRunning,
33753
33902
  placeholder: "Search by name / @user:\u2026, or paste an ixo1\u2026 address"
33754
33903
  }
33755
- )), canClassify ? /* @__PURE__ */ React318.createElement(Button67, { size: "xs", variant: "light", onClick: runClassify, disabled: !addAddress.trim() || classifying || isRunning, loading: classifying }, "Check address") : /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Address classification is unavailable in this host \u2014 the grantee will be added as a plain account."), classifyError && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, classifyError), isGroup && /* @__PURE__ */ React318.createElement(Box59, { style: { border: "1px solid var(--mantine-color-neutralColor-6)", borderRadius: 8, padding: 12 } }, /* @__PURE__ */ React318.createElement(Stack210, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "Add the group, or all the members of the POD?"), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Detected a DAO DAO group (", classification?.daodao?.type, "). Choose how to grant access."), /* @__PURE__ */ React318.createElement(Radio5.Group, { value: granteeKind, onChange: (value) => setGranteeKind(value) }, /* @__PURE__ */ React318.createElement(Stack210, { gap: "xs", mt: "xs" }, /* @__PURE__ */ React318.createElement(
33904
+ )), canClassify ? /* @__PURE__ */ React319.createElement(Button67, { size: "xs", variant: "light", onClick: runClassify, disabled: !addAddress.trim() || classifying || isRunning, loading: classifying }, "Check address") : /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Address classification is unavailable in this host \u2014 the grantee will be added as a plain account."), classifyError && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, classifyError), isGroup && /* @__PURE__ */ React319.createElement(Box60, { style: { border: "1px solid var(--mantine-color-neutralColor-6)", borderRadius: 8, padding: 12 } }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Add the group, or all the members of the POD?"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Detected a DAO DAO group (", classification?.daodao?.type, "). Choose how to grant access."), /* @__PURE__ */ React319.createElement(Radio5.Group, { value: granteeKind, onChange: (value) => setGranteeKind(value) }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs", mt: "xs" }, /* @__PURE__ */ React319.createElement(
33756
33905
  Radio5,
33757
33906
  {
33758
33907
  value: "group-account",
33759
33908
  disabled: !canExerciseGrant || isDisabled || isRunning,
33760
- label: /* @__PURE__ */ React318.createElement(Stack210, { gap: 0 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm" }, "Add the group"), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, canExerciseGrant ? "Grant the group account directly (it can exercise the grant)." : "Unavailable \u2014 this group cannot exercise the grant."))
33909
+ label: /* @__PURE__ */ React319.createElement(Stack211, { gap: 0 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Add the group"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, canExerciseGrant ? "Grant the group account directly (it can exercise the grant)." : "Unavailable \u2014 this group cannot exercise the grant."))
33761
33910
  }
33762
- ), /* @__PURE__ */ React318.createElement(
33911
+ ), /* @__PURE__ */ React319.createElement(
33763
33912
  Radio5,
33764
33913
  {
33765
33914
  value: "group-members",
33766
33915
  disabled: isDisabled || isRunning,
33767
- label: /* @__PURE__ */ React318.createElement(Stack210, { gap: 0 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm" }, "Add all members of the POD"), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, canEnumerate ? `Fan out: grant each member individually${members.length ? ` (${members.length} resolved)` : ""}.` : "Member enumeration is unavailable in this host."))
33916
+ label: /* @__PURE__ */ React319.createElement(Stack211, { gap: 0 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Add all members of the POD"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, canEnumerate ? `Fan out: grant each member individually${members.length ? ` (${members.length} resolved)` : ""}.` : "Member enumeration is unavailable in this host."))
33768
33917
  }
33769
- ))))), /* @__PURE__ */ React318.createElement(
33918
+ ))))), /* @__PURE__ */ React319.createElement(
33770
33919
  BaseSelect,
33771
33920
  {
33772
33921
  label: "Role",
@@ -33779,7 +33928,7 @@ var CollectionUsersFlowDetail = ({
33779
33928
  ],
33780
33929
  disabled: isDisabled || isRunning
33781
33930
  }
33782
- ), /* @__PURE__ */ React318.createElement(
33931
+ ), /* @__PURE__ */ React319.createElement(
33783
33932
  BaseNumberInput,
33784
33933
  {
33785
33934
  label: "Agent quota (max claims, at least 1)",
@@ -33788,19 +33937,19 @@ var CollectionUsersFlowDetail = ({
33788
33937
  onChange: (value) => setAddQuota(value === "" || value == null ? "" : String(value)),
33789
33938
  disabled: isDisabled || isRunning
33790
33939
  }
33791
- ), addRole === "evaluate" && /* @__PURE__ */ React318.createElement(MaxAmountsInput, { value: addMaxAmounts, onChange: setAddMaxAmounts, disabled: isDisabled || isRunning }), !validation.ok && validation.error && activeOp === "add" && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), !configMissing && section === "bids" && /* @__PURE__ */ React318.createElement(BidInboxSection, { deedDid, collectionId, adminAddress, isDisabled, handlersRef, grantees: listGrantees }), isDisabled && /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "This block is currently disabled."));
33940
+ ), addRole === "evaluate" && /* @__PURE__ */ React319.createElement(MaxAmountsInput, { value: addMaxAmounts, onChange: setAddMaxAmounts, disabled: isDisabled || isRunning }), !validation.ok && validation.error && activeOp === "add" && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), !configMissing && section === "bids" && /* @__PURE__ */ React319.createElement(BidInboxSection, { deedDid, collectionId, adminAddress, isDisabled, handlersRef, grantees: listGrantees }), isDisabled && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "This block is currently disabled."));
33792
33941
  };
33793
33942
  var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handlersRef, grantees }) => {
33794
- const [bids, setBids] = useState167([]);
33795
- const [loading, setLoading] = useState167(false);
33796
- const [error, setError] = useState167(null);
33797
- const [selectedBidId, setSelectedBidId] = useState167("");
33798
- const [decision, setDecision] = useState167("");
33799
- const [rejectReason, setRejectReason] = useState167("");
33800
- const [approveQuota, setApproveQuota] = useState167(String(DEFAULT_CONTRIBUTOR_QUOTA));
33801
- const [approveMaxAmounts, setApproveMaxAmounts] = useState167(EMPTY_MAX_AMOUNTS);
33802
- const [submitting, setSubmitting] = useState167(false);
33803
- const [profilesByDid, setProfilesByDid] = useState167({});
33943
+ const [bids, setBids] = useState168([]);
33944
+ const [loading, setLoading] = useState168(false);
33945
+ const [error, setError] = useState168(null);
33946
+ const [selectedBidId, setSelectedBidId] = useState168("");
33947
+ const [decision, setDecision] = useState168("");
33948
+ const [rejectReason, setRejectReason] = useState168("");
33949
+ const [approveQuota, setApproveQuota] = useState168(String(DEFAULT_CONTRIBUTOR_QUOTA));
33950
+ const [approveMaxAmounts, setApproveMaxAmounts] = useState168(EMPTY_MAX_AMOUNTS);
33951
+ const [submitting, setSubmitting] = useState168(false);
33952
+ const [profilesByDid, setProfilesByDid] = useState168({});
33804
33953
  const selectedBid = useMemo118(() => bids.find((b) => b.id === selectedBidId) || null, [bids, selectedBidId]);
33805
33954
  const selectedBidIsEvaluator = useMemo118(() => {
33806
33955
  const role = String(selectedBid?.role || "").toLowerCase();
@@ -33949,7 +34098,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
33949
34098
  }
33950
34099
  ] : []
33951
34100
  ];
33952
- return /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(Group115, { gap: "xs", align: "center" }, /* @__PURE__ */ React318.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React318.createElement(IconArrowLeft10, { size: 16 })), /* @__PURE__ */ React318.createElement(Text198, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, "Bid #", selectedBid.id), /* @__PURE__ */ React318.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React318.createElement(Stack210, { gap: 4 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600, truncate: true }, displayName), /* @__PURE__ */ React318.createElement(Group115, { gap: "xs" }, /* @__PURE__ */ React318.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(selectedBid.role) }, getBidRoleLabel(selectedBid.role)), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, truncateAddress4(selectedBid.address)))), /* @__PURE__ */ React318.createElement(CollapsibleSection, { title: "Inputs" }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React318.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "No input data available.")), /* @__PURE__ */ React318.createElement(
34101
+ return /* @__PURE__ */ React319.createElement(Stack211, { gap: "md" }, /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", align: "center" }, /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React319.createElement(IconArrowLeft10, { size: 16 })), /* @__PURE__ */ React319.createElement(Text199, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, "Bid #", selectedBid.id), /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React319.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600, truncate: true }, displayName), /* @__PURE__ */ React319.createElement(Group116, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(selectedBid.role) }, getBidRoleLabel(selectedBid.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, truncateAddress4(selectedBid.address)))), /* @__PURE__ */ React319.createElement(CollapsibleSection, { title: "Inputs" }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React319.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "No input data available.")), /* @__PURE__ */ React319.createElement(
33953
34102
  BaseSelect,
33954
34103
  {
33955
34104
  label: "Decision",
@@ -33962,7 +34111,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
33962
34111
  ],
33963
34112
  disabled: isDisabled || submitting
33964
34113
  }
33965
- ), decision === "approve" && /* @__PURE__ */ React318.createElement(React318.Fragment, null, /* @__PURE__ */ React318.createElement(
34114
+ ), decision === "approve" && /* @__PURE__ */ React319.createElement(React319.Fragment, null, /* @__PURE__ */ React319.createElement(
33966
34115
  BaseNumberInput,
33967
34116
  {
33968
34117
  label: "Agent quota (max claims, at least 1)",
@@ -33971,7 +34120,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
33971
34120
  onChange: (value) => setApproveQuota(value === "" || value == null ? "" : String(value)),
33972
34121
  disabled: isDisabled || submitting
33973
34122
  }
33974
- ), isEvaluator && /* @__PURE__ */ React318.createElement(MaxAmountsInput, { value: approveMaxAmounts, onChange: setApproveMaxAmounts, disabled: isDisabled || submitting }), /* @__PURE__ */ React318.createElement(ActionDiffView, { diffs: approvalDiffs })), decision === "reject" && /* @__PURE__ */ React318.createElement(
34123
+ ), isEvaluator && /* @__PURE__ */ React319.createElement(MaxAmountsInput, { value: approveMaxAmounts, onChange: setApproveMaxAmounts, disabled: isDisabled || submitting }), /* @__PURE__ */ React319.createElement(ActionDiffView, { diffs: approvalDiffs })), decision === "reject" && /* @__PURE__ */ React319.createElement(
33975
34124
  BaseTextInput,
33976
34125
  {
33977
34126
  label: `Reason${isEvaluator ? " *" : ""}`,
@@ -33980,7 +34129,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
33980
34129
  onChange: (e) => setRejectReason(e.currentTarget.value),
33981
34130
  disabled: isDisabled || submitting
33982
34131
  }
33983
- ), error && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error), /* @__PURE__ */ React318.createElement(
34132
+ ), error && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error), /* @__PURE__ */ React319.createElement(
33984
34133
  Button67,
33985
34134
  {
33986
34135
  onClick: submitDecision,
@@ -33991,11 +34140,11 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
33991
34140
  decision === "reject" ? "Reject bid" : "Approve bid"
33992
34141
  ));
33993
34142
  }
33994
- return /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(Group115, { justify: "space-between", align: "center" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "Incoming bids"), /* @__PURE__ */ React318.createElement(Group115, { gap: 4 }, /* @__PURE__ */ React318.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loading || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React318.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: refreshBids, disabled: loading }, /* @__PURE__ */ React318.createElement(IconRefresh9, { size: 16 })))), /* @__PURE__ */ React318.createElement(Divider22, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), loading && /* @__PURE__ */ React318.createElement(Group115, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React318.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Loading bids\u2026")), !loading && bids.length === 0 && /* @__PURE__ */ React318.createElement(Text198, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No bids available for this collection."), bids.map((bid) => {
34143
+ return /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, /* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Incoming bids"), /* @__PURE__ */ React319.createElement(Group116, { gap: 4 }, /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loading || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: refreshBids, disabled: loading }, /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 16 })))), /* @__PURE__ */ React319.createElement(Divider22, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), loading && /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React319.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Loading bids\u2026")), !loading && bids.length === 0 && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No bids available for this collection."), bids.map((bid) => {
33995
34144
  const profile = profilesByDid[bid.did];
33996
34145
  const displayName = profile?.displayname || bid.did || bid.address;
33997
- return /* @__PURE__ */ React318.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React318.createElement(Stack210, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React318.createElement(Text198, { fw: 500, size: "sm", truncate: true }, displayName), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(bid.address))), /* @__PURE__ */ React318.createElement(Stack210, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React318.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(bid.role) }, getBidRoleLabel(bid.role)), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, getTimeAgo3(bid.created || ""))));
33998
- }), error && /* @__PURE__ */ React318.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
34146
+ return /* @__PURE__ */ React319.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React319.createElement(Stack211, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React319.createElement(Text199, { fw: 500, size: "sm", truncate: true }, displayName), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(bid.address))), /* @__PURE__ */ React319.createElement(Stack211, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(bid.role) }, getBidRoleLabel(bid.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, getTimeAgo3(bid.created || ""))));
34147
+ }), error && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
33999
34148
  };
34000
34149
 
34001
34150
  // src/mantine/blocks/action/actionTypes/collectionUsers/index.ts
@@ -34022,8 +34171,8 @@ registerActionTypeUI("qi/collection.users", {
34022
34171
  import { IconChecks as IconChecks4 } from "@tabler/icons-react";
34023
34172
 
34024
34173
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
34025
- import React319, { useCallback as useCallback112, useEffect as useEffect114, useMemo as useMemo119, useRef as useRef43, useState as useState168 } from "react";
34026
- import { Alert as Alert49, Button as Button68, Group as Group116, Loader as Loader62, Stack as Stack211, Switch as Switch12, Text as Text199 } from "@mantine/core";
34174
+ import React320, { useCallback as useCallback112, useEffect as useEffect114, useMemo as useMemo119, useRef as useRef43, useState as useState169 } from "react";
34175
+ import { Alert as Alert49, Button as Button68, Group as Group117, Loader as Loader62, Stack as Stack212, Switch as Switch12, Text as Text200 } from "@mantine/core";
34027
34176
 
34028
34177
  // src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
34029
34178
  var EMPTY_XERO_INVOICE_DEFAULTS = {
@@ -34075,10 +34224,10 @@ function serializeEvaluateClaimActionInputs(inputs) {
34075
34224
  var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34076
34225
  const t = useTranslate();
34077
34226
  const handlers = useBlocknoteHandlers();
34078
- const [local, setLocal] = useState168(() => parseEvaluateClaimActionInputs(inputs));
34079
- const [collections, setCollections] = useState168([]);
34080
- const [loadingCollections, setLoadingCollections] = useState168(false);
34081
- const [error, setError] = useState168(null);
34227
+ const [local, setLocal] = useState169(() => parseEvaluateClaimActionInputs(inputs));
34228
+ const [collections, setCollections] = useState169([]);
34229
+ const [loadingCollections, setLoadingCollections] = useState169(false);
34230
+ const [error, setError] = useState169(null);
34082
34231
  const localRef = useRef43(local);
34083
34232
  useEffect114(() => {
34084
34233
  localRef.current = local;
@@ -34097,8 +34246,8 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34097
34246
  },
34098
34247
  [onInputsChange]
34099
34248
  );
34100
- const [schemaLoading, setSchemaLoading] = useState168(false);
34101
- const [schemaError, setSchemaError] = useState168(null);
34249
+ const [schemaLoading, setSchemaLoading] = useState169(false);
34250
+ const [schemaError, setSchemaError] = useState169(null);
34102
34251
  const fetchGenRef = useRef43(0);
34103
34252
  const materialiseSurveySchema = useCallback112(
34104
34253
  async (deedDid, collectionId) => {
@@ -34183,7 +34332,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34183
34332
  },
34184
34333
  [update]
34185
34334
  );
34186
- return /* @__PURE__ */ React319.createElement(Stack211, { gap: "md" }, /* @__PURE__ */ React319.createElement(
34335
+ return /* @__PURE__ */ React320.createElement(Stack212, { gap: "md" }, /* @__PURE__ */ React320.createElement(
34187
34336
  DataInput,
34188
34337
  {
34189
34338
  label: "DID",
@@ -34199,7 +34348,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34199
34348
  currentBlockId: blockId,
34200
34349
  required: true
34201
34350
  }
34202
- ), /* @__PURE__ */ React319.createElement(
34351
+ ), /* @__PURE__ */ React320.createElement(
34203
34352
  Button68,
34204
34353
  {
34205
34354
  size: "xs",
@@ -34210,7 +34359,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34210
34359
  }
34211
34360
  },
34212
34361
  t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
34213
- ), /* @__PURE__ */ React319.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React319.createElement(Loader62, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React319.createElement(Alert49, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React319.createElement(
34362
+ ), /* @__PURE__ */ React320.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React320.createElement(Loader62, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React320.createElement(Alert49, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React320.createElement(
34214
34363
  BaseSelect,
34215
34364
  {
34216
34365
  label: "Claim Collection",
@@ -34224,10 +34373,10 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34224
34373
  required: true,
34225
34374
  searchable: true
34226
34375
  }
34227
- ), local.collectionId && /* @__PURE__ */ React319.createElement(Stack211, { gap: 4 }, schemaLoading && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.outputsPrefix", { defaultValue: "Outputs" }), " ", /* @__PURE__ */ React319.createElement("code", null, "surveyAnswers"), " ", t("actionTypes.evaluateClaim.config.outputsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.evaluateClaim.config.typedField", {
34376
+ ), local.collectionId && /* @__PURE__ */ React320.createElement(Stack212, { gap: 4 }, schemaLoading && /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.outputsPrefix", { defaultValue: "Outputs" }), " ", /* @__PURE__ */ React320.createElement("code", null, "surveyAnswers"), " ", t("actionTypes.evaluateClaim.config.outputsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.evaluateClaim.config.typedField", {
34228
34377
  count: local.surveyAnswersSchema.length,
34229
34378
  defaultValue: local.surveyAnswersSchema.length === 1 ? "typed field" : "typed fields"
34230
- }), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React319.createElement("code", null, "$", "{", "thisBlock.output.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React319.createElement(Alert49, { color: "yellow", styles: actionAlertStyles }, schemaError)), local.collectionId && /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600, mt: "md" }, t("actionTypes.evaluateClaim.config.xeroSectionTitle", { defaultValue: "{{xero}} bookkeeping (optional)", xero: "Xero" })), /* @__PURE__ */ React319.createElement(
34379
+ }), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React320.createElement("code", null, "$", "{", "thisBlock.output.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React320.createElement(Alert49, { color: "yellow", styles: actionAlertStyles }, schemaError)), local.collectionId && /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Text200, { size: "sm", fw: 600, mt: "md" }, t("actionTypes.evaluateClaim.config.xeroSectionTitle", { defaultValue: "{{xero}} bookkeeping (optional)", xero: "Xero" })), /* @__PURE__ */ React320.createElement(
34231
34380
  Switch12,
34232
34381
  {
34233
34382
  label: t("actionTypes.evaluateClaim.config.xeroOracleInvoiceOnApprove", { defaultValue: "{{xero}} oracle invoice on approval", xero: "Xero" }),
@@ -34238,9 +34387,9 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34238
34387
  checked: local.xeroOracleInvoiceOnApprove,
34239
34388
  onChange: (event) => update({ xeroOracleInvoiceOnApprove: event.currentTarget.checked })
34240
34389
  }
34241
- ), local.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs", mt: 4 }, /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.xeroInvoiceDefaultsDescription", {
34390
+ ), local.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs", mt: 4 }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.xeroInvoiceDefaultsDescription", {
34242
34391
  defaultValue: "Optional invoice defaults pinned into the oracle payload. Anything left empty is extracted from the claim material; Status defaults to Draft."
34243
- })), /* @__PURE__ */ React319.createElement(Group116, { grow: true }, /* @__PURE__ */ React319.createElement(
34392
+ })), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
34244
34393
  BaseSelect,
34245
34394
  {
34246
34395
  label: t("actionTypes.evaluateClaim.config.xeroInvoiceType", { defaultValue: "Type" }),
@@ -34251,7 +34400,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34251
34400
  value: local.xeroInvoiceDefaults.Type || "ACCREC",
34252
34401
  onChange: (value) => updateXeroDefaults({ Type: value || "ACCREC" })
34253
34402
  }
34254
- ), /* @__PURE__ */ React319.createElement(
34403
+ ), /* @__PURE__ */ React320.createElement(
34255
34404
  BaseSelect,
34256
34405
  {
34257
34406
  label: t("actionTypes.evaluateClaim.config.xeroInvoiceStatus", { defaultValue: "Status" }),
@@ -34262,7 +34411,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34262
34411
  value: local.xeroInvoiceDefaults.Status || "DRAFT",
34263
34412
  onChange: (value) => updateXeroDefaults({ Status: value || "DRAFT" })
34264
34413
  }
34265
- )), /* @__PURE__ */ React319.createElement(Group116, { grow: true }, /* @__PURE__ */ React319.createElement(
34414
+ )), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
34266
34415
  DataInput,
34267
34416
  {
34268
34417
  label: t("actionTypes.evaluateClaim.config.xeroCurrencyCode", { defaultValue: "Currency (optional)" }),
@@ -34272,7 +34421,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34272
34421
  editorDocument: editor?.document || [],
34273
34422
  currentBlockId: blockId
34274
34423
  }
34275
- ), /* @__PURE__ */ React319.createElement(
34424
+ ), /* @__PURE__ */ React320.createElement(
34276
34425
  DataInput,
34277
34426
  {
34278
34427
  label: t("actionTypes.evaluateClaim.config.xeroTenantId", { defaultValue: "{{xero}} org (optional)", xero: "Xero" }),
@@ -34281,7 +34430,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34281
34430
  editorDocument: editor?.document || [],
34282
34431
  currentBlockId: blockId
34283
34432
  }
34284
- )), /* @__PURE__ */ React319.createElement(Group116, { grow: true }, /* @__PURE__ */ React319.createElement(
34433
+ )), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
34285
34434
  DataInput,
34286
34435
  {
34287
34436
  label: t("actionTypes.evaluateClaim.config.xeroContactId", { defaultValue: "Contact ID (optional)" }),
@@ -34294,7 +34443,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34294
34443
  editorDocument: editor?.document || [],
34295
34444
  currentBlockId: blockId
34296
34445
  }
34297
- ), /* @__PURE__ */ React319.createElement(
34446
+ ), /* @__PURE__ */ React320.createElement(
34298
34447
  DataInput,
34299
34448
  {
34300
34449
  label: t("actionTypes.evaluateClaim.config.xeroContactName", { defaultValue: "Contact name (optional)" }),
@@ -34303,7 +34452,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34303
34452
  editorDocument: editor?.document || [],
34304
34453
  currentBlockId: blockId
34305
34454
  }
34306
- )), /* @__PURE__ */ React319.createElement(Group116, { grow: true }, /* @__PURE__ */ React319.createElement(
34455
+ )), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
34307
34456
  DataInput,
34308
34457
  {
34309
34458
  label: t("actionTypes.evaluateClaim.config.xeroAccountCode", { defaultValue: "Account code (optional)" }),
@@ -34320,14 +34469,14 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
34320
34469
  };
34321
34470
 
34322
34471
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
34323
- import React323, { useCallback as useCallback114, useEffect as useEffect116, useMemo as useMemo121, useRef as useRef45, useState as useState171 } from "react";
34324
- import { ActionIcon as ActionIcon48, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as Group120, Loader as Loader64, ScrollArea as ScrollArea8, Stack as Stack215, Text as Text203, UnstyledButton as UnstyledButton5 } from "@mantine/core";
34472
+ import React323, { useCallback as useCallback114, useEffect as useEffect116, useMemo as useMemo121, useRef as useRef45, useState as useState172 } from "react";
34473
+ import { ActionIcon as ActionIcon48, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as Group120, Loader as Loader64, ScrollArea as ScrollArea8, Stack as Stack215, Text as Text203, UnstyledButton as UnstyledButton6 } from "@mantine/core";
34325
34474
  import { IconArrowLeft as IconArrowLeft11, IconCheck as IconCheck26, IconFilter as IconFilter2 } from "@tabler/icons-react";
34326
34475
  import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
34327
34476
 
34328
34477
  // src/mantine/blocks/action/actionTypes/evaluateClaim/FlowManagerAdvisorySections.tsx
34329
- import React320, { useState as useState169 } from "react";
34330
- import { ActionIcon as ActionIcon47, Badge as Badge53, Group as Group117, Stack as Stack212, Text as Text200, Tooltip as Tooltip30 } from "@mantine/core";
34478
+ import React321, { useState as useState170 } from "react";
34479
+ import { ActionIcon as ActionIcon47, Badge as Badge53, Group as Group118, Stack as Stack213, Text as Text201, Tooltip as Tooltip30 } from "@mantine/core";
34331
34480
  import { IconCheck as IconCheck25, IconLink as IconLink5, IconPencil as IconPencil2, IconSparkles as IconSparkles7, IconUser as IconUser14, IconX as IconX18 } from "@tabler/icons-react";
34332
34481
 
34333
34482
  // src/mantine/blocks/action/actionTypes/evaluateClaim/evaluationReportModel.ts
@@ -34422,12 +34571,12 @@ function ProvenanceHint({ provenance }) {
34422
34571
  const t = useTranslate();
34423
34572
  if (provenance !== "derived" && provenance !== "inferred" && provenance !== "human") return null;
34424
34573
  const hint = provenance === "human" ? { Icon: IconUser14, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.human", { defaultValue: "Set by human" }) } : provenance === "derived" ? { Icon: IconLink5, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.derived", { defaultValue: "Derived from inputs" }) } : { Icon: IconSparkles7, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.inferred", { defaultValue: "Inferred by LLM" }) };
34425
- return /* @__PURE__ */ React320.createElement(Tooltip30, { label: hint.label, withArrow: true }, /* @__PURE__ */ React320.createElement("span", { style: { display: "inline-flex", alignItems: "center" }, "aria-label": hint.label }, icon(hint.Icon, 12, "var(--mantine-color-dimmed)")));
34574
+ return /* @__PURE__ */ React321.createElement(Tooltip30, { label: hint.label, withArrow: true }, /* @__PURE__ */ React321.createElement("span", { style: { display: "inline-flex", alignItems: "center" }, "aria-label": hint.label }, icon(hint.Icon, 12, "var(--mantine-color-dimmed)")));
34426
34575
  }
34427
34576
  var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34428
34577
  const t = useTranslate();
34429
- const [editingTheme, setEditingTheme] = useState169(false);
34430
- const [themeDraft, setThemeDraft] = useState169("");
34578
+ const [editingTheme, setEditingTheme] = useState170(false);
34579
+ const [themeDraft, setThemeDraft] = useState170("");
34431
34580
  if (!record) return null;
34432
34581
  const values = record.values && typeof record.values === "object" ? record.values : {};
34433
34582
  const provenance = record.fieldProvenance && typeof record.fieldProvenance === "object" ? record.fieldProvenance : {};
@@ -34449,7 +34598,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34449
34598
  setEditingTheme(false);
34450
34599
  setThemeDraft("");
34451
34600
  };
34452
- return /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.understanding", { defaultValue: "Flow Manager understanding" }) }, /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs" }, (theme || editingTheme) && /* @__PURE__ */ React320.createElement(Group117, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.theme", { defaultValue: "Theme" })), editingTheme ? /* @__PURE__ */ React320.createElement(React320.Fragment, null, /* @__PURE__ */ React320.createElement("span", { ref: (node) => node?.querySelector("input")?.focus(), style: { flex: 1, display: "flex", minWidth: 0 } }, /* @__PURE__ */ React320.createElement(
34601
+ return /* @__PURE__ */ React321.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.understanding", { defaultValue: "Flow Manager understanding" }) }, /* @__PURE__ */ React321.createElement(Stack213, { gap: "xs" }, (theme || editingTheme) && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.theme", { defaultValue: "Theme" })), editingTheme ? /* @__PURE__ */ React321.createElement(React321.Fragment, null, /* @__PURE__ */ React321.createElement("span", { ref: (node) => node?.querySelector("input")?.focus(), style: { flex: 1, display: "flex", minWidth: 0 } }, /* @__PURE__ */ React321.createElement(
34453
34602
  BaseTextInput,
34454
34603
  {
34455
34604
  size: "xs",
@@ -34462,7 +34611,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34462
34611
  style: { flex: 1 },
34463
34612
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.themeEditLabel", { defaultValue: "Edit theme" })
34464
34613
  }
34465
- )), /* @__PURE__ */ React320.createElement(
34614
+ )), /* @__PURE__ */ React321.createElement(
34466
34615
  ActionIcon47,
34467
34616
  {
34468
34617
  variant: "subtle",
@@ -34472,7 +34621,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34472
34621
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.saveTheme", { defaultValue: "Save theme" })
34473
34622
  },
34474
34623
  icon(IconCheck25, 14)
34475
- ), /* @__PURE__ */ React320.createElement(
34624
+ ), /* @__PURE__ */ React321.createElement(
34476
34625
  ActionIcon47,
34477
34626
  {
34478
34627
  variant: "subtle",
@@ -34482,7 +34631,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34482
34631
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.cancelThemeEdit", { defaultValue: "Cancel theme edit" })
34483
34632
  },
34484
34633
  icon(IconX18, 14)
34485
- )) : /* @__PURE__ */ React320.createElement(React320.Fragment, null, /* @__PURE__ */ React320.createElement(Text200, { size: "sm", style: { flex: 1, minWidth: 0 }, truncate: true }, theme), /* @__PURE__ */ React320.createElement(ProvenanceHint, { provenance: provenance.theme }), !disabled && /* @__PURE__ */ React320.createElement(
34634
+ )) : /* @__PURE__ */ React321.createElement(React321.Fragment, null, /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 }, truncate: true }, theme), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.theme }), !disabled && /* @__PURE__ */ React321.createElement(
34486
34635
  ActionIcon47,
34487
34636
  {
34488
34637
  variant: "subtle",
@@ -34492,7 +34641,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
34492
34641
  "aria-label": t("actionTypes.evaluateClaim.flow.flowManager.editTheme", { defaultValue: "Edit theme" })
34493
34642
  },
34494
34643
  icon(IconPencil2, 14)
34495
- ))), topics.length > 0 && /* @__PURE__ */ React320.createElement(Group117, { gap: "xs", align: "center" }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.topics", { defaultValue: "Topics" })), /* @__PURE__ */ React320.createElement(Group117, { gap: 4 }, topics.map((topic) => /* @__PURE__ */ React320.createElement(Badge53, { key: topic, variant: "light", color: "gray", size: "sm", style: { textTransform: "none" } }, topic))), /* @__PURE__ */ React320.createElement(ProvenanceHint, { provenance: provenance.topics })), summary && /* @__PURE__ */ React320.createElement(Group117, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.summary", { defaultValue: "Summary" })), /* @__PURE__ */ React320.createElement(Text200, { size: "sm", style: { flex: 1, minWidth: 0 } }, summary), /* @__PURE__ */ React320.createElement(ProvenanceHint, { provenance: provenance.summary }))));
34644
+ ))), topics.length > 0 && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.topics", { defaultValue: "Topics" })), /* @__PURE__ */ React321.createElement(Group118, { gap: 4 }, topics.map((topic) => /* @__PURE__ */ React321.createElement(Badge53, { key: topic, variant: "light", color: "gray", size: "sm", style: { textTransform: "none" } }, topic))), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.topics })), summary && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.summary", { defaultValue: "Summary" })), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, summary), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.summary }))));
34496
34645
  };
34497
34646
  function truncateClaimId(value) {
34498
34647
  if (value.length <= 17) return value;
@@ -34503,18 +34652,18 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
34503
34652
  const model = buildEvaluationReportModel(runtime);
34504
34653
  if (!model) return null;
34505
34654
  if (selectedClaimId && model.claimId && model.claimId !== selectedClaimId) return null;
34506
- const headerClaimBadge = !selectedClaimId && model.claimId ? /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", title: model.claimId }, t("actionTypes.evaluateClaim.flow.flowManager.reportClaimBadge", {
34655
+ const headerClaimBadge = !selectedClaimId && model.claimId ? /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", title: model.claimId }, t("actionTypes.evaluateClaim.flow.flowManager.reportClaimBadge", {
34507
34656
  id: truncateClaimId(model.claimId),
34508
34657
  defaultValue: `Claim ${truncateClaimId(model.claimId)}`
34509
34658
  })) : void 0;
34510
- return /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.evaluationReport", { defaultValue: "Evaluation report" }), badge: headerClaimBadge }, /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs" }, model.recommendation && /* @__PURE__ */ React320.createElement(Group117, { gap: "xs", align: "center" }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.recommendation", { defaultValue: "Recommendation" })), /* @__PURE__ */ React320.createElement(Badge53, { variant: "light", color: recommendationColor(model.recommendation), size: "sm" }, model.recommendation)), model.completeness && /* @__PURE__ */ React320.createElement(Stack212, { gap: 2 }, (model.completeness.answered !== null || model.completeness.total !== null) && /* @__PURE__ */ React320.createElement(Text200, { size: "sm" }, t("actionTypes.evaluateClaim.flow.flowManager.completeness", {
34659
+ return /* @__PURE__ */ React321.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.evaluationReport", { defaultValue: "Evaluation report" }), badge: headerClaimBadge }, /* @__PURE__ */ React321.createElement(Stack213, { gap: "xs" }, model.recommendation && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.recommendation", { defaultValue: "Recommendation" })), /* @__PURE__ */ React321.createElement(Badge53, { variant: "light", color: recommendationColor(model.recommendation), size: "sm" }, model.recommendation)), model.completeness && /* @__PURE__ */ React321.createElement(Stack213, { gap: 2 }, (model.completeness.answered !== null || model.completeness.total !== null) && /* @__PURE__ */ React321.createElement(Text201, { size: "sm" }, t("actionTypes.evaluateClaim.flow.flowManager.completeness", {
34511
34660
  answered: model.completeness.answered ?? "?",
34512
34661
  total: model.completeness.total ?? "?",
34513
34662
  defaultValue: `Completeness: ${model.completeness.answered ?? "?"}/${model.completeness.total ?? "?"} answered`
34514
- })), model.completeness.missingRequired.length > 0 && /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.missingRequired", {
34663
+ })), model.completeness.missingRequired.length > 0 && /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.missingRequired", {
34515
34664
  fields: model.completeness.missingRequired.join(", "),
34516
34665
  defaultValue: `Missing required: ${model.completeness.missingRequired.join(", ")}`
34517
- }))), model.findings.length > 0 && /* @__PURE__ */ React320.createElement(Stack212, { gap: 4 }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.findings", { defaultValue: "Findings" })), model.findings.map((finding, index) => /* @__PURE__ */ React320.createElement(Group117, { key: `${finding.severity}-${finding.issue}-${index}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, finding.severity && /* @__PURE__ */ React320.createElement(Badge53, { variant: "light", color: findingSeverityColor(finding.severity), size: "sm", style: { flexShrink: 0 } }, finding.severity), /* @__PURE__ */ React320.createElement(Text200, { size: "sm", style: { flex: 1, minWidth: 0 } }, finding.issue)))), model.rationale && /* @__PURE__ */ React320.createElement(Group117, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.rationale", { defaultValue: "Rationale" })), /* @__PURE__ */ React320.createElement(Text200, { size: "sm", style: { flex: 1, minWidth: 0 } }, model.rationale)), model.narrative && /* @__PURE__ */ React320.createElement(Text200, { size: "sm", c: "dimmed" }, model.narrative), /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed", title: model.invocationId }, t("actionTypes.evaluateClaim.flow.flowManager.reportAttribution", {
34666
+ }))), model.findings.length > 0 && /* @__PURE__ */ React321.createElement(Stack213, { gap: 4 }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.findings", { defaultValue: "Findings" })), model.findings.map((finding, index) => /* @__PURE__ */ React321.createElement(Group118, { key: `${finding.severity}-${finding.issue}-${index}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, finding.severity && /* @__PURE__ */ React321.createElement(Badge53, { variant: "light", color: findingSeverityColor(finding.severity), size: "sm", style: { flexShrink: 0 } }, finding.severity), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, finding.issue)))), model.rationale && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.rationale", { defaultValue: "Rationale" })), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, model.rationale)), model.narrative && /* @__PURE__ */ React321.createElement(Text201, { size: "sm", c: "dimmed" }, model.narrative), /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", title: model.invocationId }, t("actionTypes.evaluateClaim.flow.flowManager.reportAttribution", {
34518
34667
  oracleDid: model.oracleDid,
34519
34668
  receivedAt: new Date(model.receivedAt).toLocaleString(),
34520
34669
  defaultValue: `By ${model.oracleDid} \xB7 ${new Date(model.receivedAt).toLocaleString()}`
@@ -34522,69 +34671,9 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
34522
34671
  };
34523
34672
 
34524
34673
  // src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
34525
- import React322, { useCallback as useCallback113, useEffect as useEffect115, useMemo as useMemo120, useRef as useRef44, useState as useState170 } from "react";
34526
- import { Box as Box61, Group as Group119, Loader as Loader63, SimpleGrid as SimpleGrid4, Stack as Stack214, Text as Text202, Tooltip as Tooltip31, UnstyledButton as UnstyledButton4 } from "@mantine/core";
34674
+ import React322, { useCallback as useCallback113, useEffect as useEffect115, useMemo as useMemo120, useRef as useRef44, useState as useState171 } from "react";
34675
+ import { Box as Box61, Group as Group119, Loader as Loader63, SimpleGrid as SimpleGrid4, Stack as Stack214, Text as Text202, Tooltip as Tooltip31, UnstyledButton as UnstyledButton5 } from "@mantine/core";
34527
34676
  import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
34528
-
34529
- // src/mantine/components/MediaPreviewModal.tsx
34530
- import React321 from "react";
34531
- import { Anchor, Box as Box60, Center as Center13, Group as Group118, Modal as Modal3, Stack as Stack213, Text as Text201 } from "@mantine/core";
34532
- import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
34533
- import { IconDownload as IconDownload5 } from "@tabler/icons-react";
34534
- function detectKind(type, name) {
34535
- const t = (type || "").toLowerCase();
34536
- const ext = (name || "").toLowerCase().split(".").pop() || "";
34537
- if (t.startsWith("image/") || ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext)) return "image";
34538
- if (t.startsWith("video/") || ["mp4", "webm", "mov", "mkv"].includes(ext)) return "video";
34539
- if (t.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(ext)) return "audio";
34540
- if (t === "application/pdf" || ext === "pdf") return "pdf";
34541
- return "other";
34542
- }
34543
- var MediaPreviewModal = ({ file, onClose }) => {
34544
- const isMobile = useMediaQuery2("(max-width: 992px)");
34545
- const opened = !!file;
34546
- const kind = file ? detectKind(file.type, file.name) : "other";
34547
- const wide = kind === "pdf" || kind === "image" || kind === "video";
34548
- return /* @__PURE__ */ React321.createElement(
34549
- Modal3,
34550
- {
34551
- opened,
34552
- onClose,
34553
- zIndex: 1e4,
34554
- portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
34555
- title: /* @__PURE__ */ React321.createElement(Group118, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React321.createElement(Text201, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React321.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React321.createElement(Box60, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload5, 14), "Download"))),
34556
- size: wide ? "95vw" : "xl",
34557
- centered: true,
34558
- styles: wide ? {
34559
- content: {
34560
- height: "95vh",
34561
- maxWidth: isMobile ? "100%" : 1400,
34562
- display: "flex",
34563
- flexDirection: "column",
34564
- overflow: "hidden"
34565
- },
34566
- body: {
34567
- flex: 1,
34568
- minHeight: 0,
34569
- display: "flex",
34570
- flexDirection: "column",
34571
- overflow: "hidden"
34572
- }
34573
- } : void 0
34574
- },
34575
- file && /* @__PURE__ */ React321.createElement(Stack213, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React321.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React321.createElement(
34576
- "img",
34577
- {
34578
- src: file.content,
34579
- alt: file.name,
34580
- style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
34581
- }
34582
- )), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
34583
- /* @__PURE__ */ React321.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React321.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React321.createElement(Box60, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React321.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React321.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React321.createElement(Text201, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
34584
- );
34585
- };
34586
-
34587
- // src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
34588
34677
  function toMediaFile(raw) {
34589
34678
  if (!raw) return null;
34590
34679
  if (typeof raw === "object" && typeof raw.content === "string") {
@@ -34630,10 +34719,10 @@ function isImage(file) {
34630
34719
  var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
34631
34720
  const t = useTranslate();
34632
34721
  const { fetchClaimMedia } = useBlocknoteHandlers();
34633
- const [active, setActive] = useState170(null);
34634
- const [resolved, setResolved] = useState170({});
34635
- const [pending, setPending] = useState170({});
34636
- const [openingKey, setOpeningKey] = useState170(null);
34722
+ const [active, setActive] = useState171(null);
34723
+ const [resolved, setResolved] = useState171({});
34724
+ const [pending, setPending] = useState171({});
34725
+ const [openingKey, setOpeningKey] = useState171(null);
34637
34726
  const cacheRef = useRef44(/* @__PURE__ */ new Map());
34638
34727
  const inflightRef = useRef44(/* @__PURE__ */ new Map());
34639
34728
  useEffect115(() => {
@@ -34739,7 +34828,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
34739
34828
  const displayUrl = resolved[item.content] || (!fetchClaimMedia ? item.content : "");
34740
34829
  const isFetching = !!pending[item.content] || openingKey === item.content;
34741
34830
  return /* @__PURE__ */ React322.createElement(Tooltip31, { key: `${item.content}-${index}`, label: item.label, openDelay: 400, disabled: !item.label || item.label === item.name }, /* @__PURE__ */ React322.createElement(
34742
- UnstyledButton4,
34831
+ UnstyledButton5,
34743
34832
  {
34744
34833
  onClick: () => handleOpen(item),
34745
34834
  style: {
@@ -34829,7 +34918,7 @@ var EvaluateClaimFlowDetail = ({
34829
34918
  registerRuntimeInputs,
34830
34919
  executeAction
34831
34920
  }) => {
34832
- const [actAs, setActAs] = useState171(emptyActAsGroupState());
34921
+ const [actAs, setActAs] = useState172(emptyActAsGroupState());
34833
34922
  const t = useTranslate();
34834
34923
  const handlers = useBlocknoteHandlers();
34835
34924
  const handlersRef = useRef45(handlers);
@@ -34850,35 +34939,35 @@ var EvaluateClaimFlowDetail = ({
34850
34939
  const resolveOpts = useMemo121(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
34851
34940
  const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
34852
34941
  const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
34853
- const [claims, setClaims] = useState171([]);
34854
- const [selectedClaimId, setSelectedClaimId] = useState171("");
34855
- const [decision, setDecision] = useState171("");
34856
- const [disputeReason, setDisputeReason] = useState171("");
34857
- const [loadingClaims, setLoadingClaims] = useState171(false);
34858
- const [submitting, setSubmitting] = useState171(false);
34859
- const [error, setError] = useState171(null);
34860
- const [adminAddress, setAdminAddress] = useState171("");
34861
- const [paymentRows, setPaymentRows] = useState171([createPaymentRow2()]);
34862
- const [createUdid, setCreateUdid] = useState171(true);
34863
- const [claimData, setClaimData] = useState171(null);
34864
- const [surveyJson, setSurveyJson] = useState171(null);
34865
- const [surveyLoading, setSurveyLoading] = useState171(false);
34866
- const [evaluationLoading, setEvaluationLoading] = useState171(false);
34867
- const [evaluationResult, setEvaluationResult] = useState171(null);
34868
- const [activeFilter, setActiveFilter] = useState171("all");
34869
- const [outcomeTemplateJson, setOutcomeTemplateJson] = useState171(null);
34870
- const [outcomeTemplateLoading, setOutcomeTemplateLoading] = useState171(false);
34871
- const [outcomeResponses, setOutcomeResponses] = useState171({});
34872
- const [outcomeComplete, setOutcomeComplete] = useState171(false);
34873
- const [isEvaluatorAuthorized] = useState171(true);
34874
- const [authChecking] = useState171(false);
34875
- const [authError] = useState171(null);
34876
- const [, setAuthRetryKey] = useState171(0);
34877
- const [profilesByDid, setProfilesByDid] = useState171({});
34878
- const [disputeDetails] = useState171(null);
34879
- const [loadingDispute] = useState171(false);
34880
- const [evaluationOutcomePatch] = useState171(null);
34881
- const [evaluationAmount] = useState171(null);
34942
+ const [claims, setClaims] = useState172([]);
34943
+ const [selectedClaimId, setSelectedClaimId] = useState172("");
34944
+ const [decision, setDecision] = useState172("");
34945
+ const [disputeReason, setDisputeReason] = useState172("");
34946
+ const [loadingClaims, setLoadingClaims] = useState172(false);
34947
+ const [submitting, setSubmitting] = useState172(false);
34948
+ const [error, setError] = useState172(null);
34949
+ const [adminAddress, setAdminAddress] = useState172("");
34950
+ const [paymentRows, setPaymentRows] = useState172([createPaymentRow2()]);
34951
+ const [createUdid, setCreateUdid] = useState172(true);
34952
+ const [claimData, setClaimData] = useState172(null);
34953
+ const [surveyJson, setSurveyJson] = useState172(null);
34954
+ const [surveyLoading, setSurveyLoading] = useState172(false);
34955
+ const [evaluationLoading, setEvaluationLoading] = useState172(false);
34956
+ const [evaluationResult, setEvaluationResult] = useState172(null);
34957
+ const [activeFilter, setActiveFilter] = useState172("all");
34958
+ const [outcomeTemplateJson, setOutcomeTemplateJson] = useState172(null);
34959
+ const [outcomeTemplateLoading, setOutcomeTemplateLoading] = useState172(false);
34960
+ const [outcomeResponses, setOutcomeResponses] = useState172({});
34961
+ const [outcomeComplete, setOutcomeComplete] = useState172(false);
34962
+ const [isEvaluatorAuthorized] = useState172(true);
34963
+ const [authChecking] = useState172(false);
34964
+ const [authError] = useState172(null);
34965
+ const [, setAuthRetryKey] = useState172(0);
34966
+ const [profilesByDid, setProfilesByDid] = useState172({});
34967
+ const [disputeDetails] = useState172(null);
34968
+ const [loadingDispute] = useState172(false);
34969
+ const [evaluationOutcomePatch] = useState172(null);
34970
+ const [evaluationAmount] = useState172(null);
34882
34971
  const selectedClaim = useMemo121(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
34883
34972
  const filteredClaims = useMemo121(() => {
34884
34973
  if (activeFilter === "all") return claims;
@@ -34890,7 +34979,7 @@ var EvaluateClaimFlowDetail = ({
34890
34979
  return resolveFilesInCredentialSubject(cs);
34891
34980
  }, [claimData]);
34892
34981
  const mediaBlobCacheRef = React323.useRef(/* @__PURE__ */ new Map());
34893
- const [surveyActiveFile, setSurveyActiveFile] = useState171(null);
34982
+ const [surveyActiveFile, setSurveyActiveFile] = useState172(null);
34894
34983
  const openFileRef = React323.useRef(() => {
34895
34984
  });
34896
34985
  useEffect116(() => {
@@ -35490,7 +35579,7 @@ var EvaluateClaimFlowDetail = ({
35490
35579
  did: "DID",
35491
35580
  claimCollection: "claim collection"
35492
35581
  })) : /* @__PURE__ */ React323.createElement(React323.Fragment, null, flowManagerContext, /* @__PURE__ */ React323.createElement(EvaluationReportSection, { runtime }), /* @__PURE__ */ React323.createElement(Group120, { justify: "space-between", align: "center" }, /* @__PURE__ */ React323.createElement(Group120, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React323.createElement(
35493
- UnstyledButton5,
35582
+ UnstyledButton6,
35494
35583
  {
35495
35584
  key: tab.value,
35496
35585
  onClick: () => setActiveFilter(tab.value),
@@ -35547,7 +35636,7 @@ registerActionTypeUI("qi/claim.evaluate", {
35547
35636
  import { IconFileText as IconFileText7 } from "@tabler/icons-react";
35548
35637
 
35549
35638
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
35550
- import React324, { useCallback as useCallback115, useEffect as useEffect117, useState as useState172 } from "react";
35639
+ import React324, { useCallback as useCallback115, useEffect as useEffect117, useState as useState173 } from "react";
35551
35640
  import { Divider as Divider24, Loader as Loader65, SegmentedControl as SegmentedControl16, Stack as Stack216, Text as Text204 } from "@mantine/core";
35552
35641
 
35553
35642
  // src/mantine/blocks/action/actionTypes/proposalCreate/types.ts
@@ -35576,11 +35665,11 @@ function serializeProposalCreateInputs(inputs) {
35576
35665
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
35577
35666
  var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35578
35667
  const handlers = useBlocknoteHandlers();
35579
- const [local, setLocal] = useState172(() => parseProposalCreateInputs(inputs));
35580
- const [groups, setGroups] = useState172([]);
35581
- const [loadingGroups, setLoadingGroups] = useState172(false);
35582
- const [inputMode, setInputMode] = useState172("select");
35583
- const [manualAddress, setManualAddress] = useState172("");
35668
+ const [local, setLocal] = useState173(() => parseProposalCreateInputs(inputs));
35669
+ const [groups, setGroups] = useState173([]);
35670
+ const [loadingGroups, setLoadingGroups] = useState173(false);
35671
+ const [inputMode, setInputMode] = useState173("select");
35672
+ const [manualAddress, setManualAddress] = useState173("");
35584
35673
  useEffect117(() => {
35585
35674
  setLocal(parseProposalCreateInputs(inputs));
35586
35675
  }, [inputs]);
@@ -35692,7 +35781,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35692
35781
  };
35693
35782
 
35694
35783
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
35695
- import React325, { useCallback as useCallback116, useEffect as useEffect118, useMemo as useMemo123, useState as useState173 } from "react";
35784
+ import React325, { useCallback as useCallback116, useEffect as useEffect118, useMemo as useMemo123, useState as useState174 } from "react";
35696
35785
  import { Badge as Badge54, Button as Button70, Card as Card29, Group as Group121, Loader as Loader66, Stack as Stack217, Text as Text205 } from "@mantine/core";
35697
35786
  import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay7 } from "@tabler/icons-react";
35698
35787
 
@@ -35767,10 +35856,10 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
35767
35856
  const coreAddress = resolvedInputs.coreAddress;
35768
35857
  const proposalTitle = resolvedInputs.proposalTitle;
35769
35858
  const proposalDescription = resolvedInputs.proposalDescription;
35770
- const [isCreating, setIsCreating] = useState173(false);
35771
- const [isExecuting, setIsExecuting] = useState173(false);
35772
- const [error, setError] = useState173(null);
35773
- const [proposalContractAddress, setProposalContractAddress] = useState173(null);
35859
+ const [isCreating, setIsCreating] = useState174(false);
35860
+ const [isExecuting, setIsExecuting] = useState174(false);
35861
+ const [error, setError] = useState174(null);
35862
+ const [proposalContractAddress, setProposalContractAddress] = useState174(null);
35774
35863
  const proposalId = runtime.output?.proposalId || "";
35775
35864
  const currentStatus = parseStatus2(runtime.output?.status);
35776
35865
  const isProposalCreated = !!proposalId;
@@ -35941,7 +36030,7 @@ registerActionTypeUI("qi/proposal.create", {
35941
36030
  import { IconThumbUp as IconThumbUp2 } from "@tabler/icons-react";
35942
36031
 
35943
36032
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
35944
- import React326, { useCallback as useCallback117, useEffect as useEffect119, useState as useState174 } from "react";
36033
+ import React326, { useCallback as useCallback117, useEffect as useEffect119, useState as useState175 } from "react";
35945
36034
  import { Divider as Divider25, Loader as Loader67, SegmentedControl as SegmentedControl17, Stack as Stack218, Text as Text206 } from "@mantine/core";
35946
36035
 
35947
36036
  // src/mantine/blocks/action/actionTypes/proposalVote/types.ts
@@ -35968,11 +36057,11 @@ function serializeProposalVoteInputs(inputs) {
35968
36057
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
35969
36058
  var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
35970
36059
  const handlers = useBlocknoteHandlers();
35971
- const [local, setLocal] = useState174(() => parseProposalVoteInputs(inputs));
35972
- const [groups, setGroups] = useState174([]);
35973
- const [loadingGroups, setLoadingGroups] = useState174(false);
35974
- const [inputMode, setInputMode] = useState174("select");
35975
- const [manualAddress, setManualAddress] = useState174("");
36060
+ const [local, setLocal] = useState175(() => parseProposalVoteInputs(inputs));
36061
+ const [groups, setGroups] = useState175([]);
36062
+ const [loadingGroups, setLoadingGroups] = useState175(false);
36063
+ const [inputMode, setInputMode] = useState175("select");
36064
+ const [manualAddress, setManualAddress] = useState175("");
35976
36065
  useEffect119(() => {
35977
36066
  setLocal(parseProposalVoteInputs(inputs));
35978
36067
  }, [inputs]);
@@ -36079,7 +36168,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
36079
36168
  };
36080
36169
 
36081
36170
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
36082
- import React327, { useCallback as useCallback118, useEffect as useEffect120, useMemo as useMemo124, useState as useState175 } from "react";
36171
+ import React327, { useCallback as useCallback118, useEffect as useEffect120, useMemo as useMemo124, useState as useState176 } from "react";
36083
36172
  import { Box as Box63, Button as Button71, Card as Card30, Group as Group122, Progress as Progress5, Stack as Stack219, Text as Text207, Tooltip as Tooltip32 } from "@mantine/core";
36084
36173
  var getVoteIcon2 = (voteType) => {
36085
36174
  switch (voteType) {
@@ -36101,12 +36190,12 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
36101
36190
  const proposalId = resolveReferences(parsed.proposalId, editorDocument, resolveOpts).trim();
36102
36191
  const coreAddress = resolveReferences(parsed.coreAddress, editorDocument, resolveOpts).trim();
36103
36192
  const inputContractAddress = resolveReferences(parsed.proposalContractAddress, editorDocument, resolveOpts).trim();
36104
- const [selectedVote, setSelectedVote] = useState175("");
36105
- const [rationale, setRationale] = useState175("");
36106
- const [submitting, setSubmitting] = useState175(false);
36107
- const [error, setError] = useState175(null);
36108
- const [userVote, setUserVote] = useState175(null);
36109
- const [proposalContractAddress, setProposalContractAddress] = useState175(inputContractAddress || null);
36193
+ const [selectedVote, setSelectedVote] = useState176("");
36194
+ const [rationale, setRationale] = useState176("");
36195
+ const [submitting, setSubmitting] = useState176(false);
36196
+ const [error, setError] = useState176(null);
36197
+ const [userVote, setUserVote] = useState176(null);
36198
+ const [proposalContractAddress, setProposalContractAddress] = useState176(inputContractAddress || null);
36110
36199
  const hasSubmittedProposal = Boolean(proposalId);
36111
36200
  const hasVoted = Boolean(userVote?.vote);
36112
36201
  useEffect120(() => {
@@ -36336,7 +36425,7 @@ registerActionTypeUI("qi/proposal.vote", {
36336
36425
  import { IconBolt as IconBolt12 } from "@tabler/icons-react";
36337
36426
 
36338
36427
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectConfig.tsx
36339
- import React328, { useMemo as useMemo125, useState as useState176 } from "react";
36428
+ import React328, { useMemo as useMemo125, useState as useState177 } from "react";
36340
36429
  import { Box as Box64, Pill as Pill3, PillsInput as PillsInput3, Stack as Stack220, Text as Text208 } from "@mantine/core";
36341
36430
  function parseInputs2(json) {
36342
36431
  try {
@@ -36350,7 +36439,7 @@ function parseInputs2(json) {
36350
36439
  }
36351
36440
  var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
36352
36441
  const local = useMemo125(() => parseInputs2(inputs), [inputs]);
36353
- const [inputValue, setInputValue] = useState176("");
36442
+ const [inputValue, setInputValue] = useState177("");
36354
36443
  const update = (dids) => {
36355
36444
  onInputsChange(JSON.stringify({ ...local, protocolDids: dids }));
36356
36445
  };
@@ -36381,7 +36470,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
36381
36470
  };
36382
36471
 
36383
36472
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
36384
- import React329, { useCallback as useCallback119, useEffect as useEffect121, useMemo as useMemo126, useState as useState177 } from "react";
36473
+ import React329, { useCallback as useCallback119, useEffect as useEffect121, useMemo as useMemo126, useState as useState178 } from "react";
36385
36474
  import { Box as Box65, Group as Group123, Loader as Loader68, Stack as Stack221, Text as Text209 } from "@mantine/core";
36386
36475
  function parseInputs3(json) {
36387
36476
  try {
@@ -36396,7 +36485,7 @@ function parseInputs3(json) {
36396
36485
  var ProtocolSelectFlowDetail = ({ inputs, block, runtime, isDisabled, executeAction }) => {
36397
36486
  const handlers = useBlocknoteHandlers();
36398
36487
  const { protocolDids } = useMemo126(() => parseInputs3(inputs), [inputs]);
36399
- const [protocols, setProtocols] = useState177([]);
36488
+ const [protocols, setProtocols] = useState178([]);
36400
36489
  const selectedDid = runtime.output?.selectedProtocolDid;
36401
36490
  useEffect121(() => {
36402
36491
  if (protocolDids.length === 0) {
@@ -36497,7 +36586,7 @@ registerActionTypeUI("qi/protocol.select", {
36497
36586
  import { IconSignature as IconSignature3 } from "@tabler/icons-react";
36498
36587
 
36499
36588
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignConfig.tsx
36500
- import React330, { useCallback as useCallback120, useEffect as useEffect122, useState as useState178 } from "react";
36589
+ import React330, { useCallback as useCallback120, useEffect as useEffect122, useState as useState179 } from "react";
36501
36590
  import { Stack as Stack222, Text as Text210 } from "@mantine/core";
36502
36591
 
36503
36592
  // src/mantine/blocks/action/actionTypes/domainSign/types.ts
@@ -36527,7 +36616,7 @@ var ENTITY_TYPE_OPTIONS = [
36527
36616
  { value: "asset", label: "Asset" }
36528
36617
  ];
36529
36618
  var DomainSignConfig = ({ inputs, onInputsChange }) => {
36530
- const [local, setLocal] = useState178(() => parseDomainSignInputs(inputs));
36619
+ const [local, setLocal] = useState179(() => parseDomainSignInputs(inputs));
36531
36620
  useEffect122(() => {
36532
36621
  setLocal(parseDomainSignInputs(inputs));
36533
36622
  }, [inputs]);
@@ -36552,7 +36641,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
36552
36641
  };
36553
36642
 
36554
36643
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
36555
- import React331, { useCallback as useCallback121, useEffect as useEffect123, useMemo as useMemo127, useState as useState179 } from "react";
36644
+ import React331, { useCallback as useCallback121, useEffect as useEffect123, useMemo as useMemo127, useState as useState180 } from "react";
36556
36645
  import { Button as Button72, Group as Group124, Loader as Loader69, Stack as Stack223, Text as Text211 } from "@mantine/core";
36557
36646
  import { IconCheck as IconCheck27, IconAlertCircle as IconAlertCircle29, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
36558
36647
  var STEP_LABELS = {
@@ -36603,9 +36692,9 @@ var DomainSignFlowDetail = ({
36603
36692
  const flowTemplateConfig = pendingPayload?.flowTemplateConfig && typeof pendingPayload.flowTemplateConfig === "object" ? pendingPayload.flowTemplateConfig : null;
36604
36693
  const selectedTemplateCount = Number(flowTemplateConfig?.templateCount || 0);
36605
36694
  const selectedTemplateProtocolCount = Number(flowTemplateConfig?.protocolCount || 0);
36606
- const [activeStep, setActiveStep] = useState179("");
36607
- const [isSigning, setIsSigning] = useState179(false);
36608
- const [localError, setLocalError] = useState179(null);
36695
+ const [activeStep, setActiveStep] = useState180("");
36696
+ const [isSigning, setIsSigning] = useState180(false);
36697
+ const [localError, setLocalError] = useState180(null);
36609
36698
  const domainSignCheckpoint = useMemo127(() => {
36610
36699
  const bucket = runtime.cache?.domainSign;
36611
36700
  if (!bucket || typeof bucket !== "object") return null;
@@ -36738,7 +36827,7 @@ registerActionTypeUI("qi/domain.sign", {
36738
36827
  import { IconBuildingEstate as IconBuildingEstate2 } from "@tabler/icons-react";
36739
36828
 
36740
36829
  // src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
36741
- import React332, { useCallback as useCallback122, useEffect as useEffect124, useState as useState180 } from "react";
36830
+ import React332, { useCallback as useCallback122, useEffect as useEffect124, useState as useState181 } from "react";
36742
36831
  import { Stack as Stack224, Text as Text212, Textarea as Textarea3 } from "@mantine/core";
36743
36832
 
36744
36833
  // src/mantine/blocks/action/actionTypes/domainCardPreview/types.ts
@@ -36791,7 +36880,7 @@ function buildCardDataFromInputs(inputs) {
36791
36880
 
36792
36881
  // src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
36793
36882
  var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
36794
- const [local, setLocal] = useState180(() => parseDomainCardPreviewInputs(inputs));
36883
+ const [local, setLocal] = useState181(() => parseDomainCardPreviewInputs(inputs));
36795
36884
  useEffect124(() => {
36796
36885
  setLocal(parseDomainCardPreviewInputs(inputs));
36797
36886
  }, [inputs]);
@@ -36817,7 +36906,7 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
36817
36906
  };
36818
36907
 
36819
36908
  // src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
36820
- import React333, { useCallback as useCallback123, useMemo as useMemo128, useState as useState181 } from "react";
36909
+ import React333, { useCallback as useCallback123, useMemo as useMemo128, useState as useState182 } from "react";
36821
36910
  import { Badge as Badge55, Box as Box66, Button as Button73, Code as Code12, Group as Group125, Loader as Loader70, ScrollArea as ScrollArea9, Stack as Stack225, Text as Text213 } from "@mantine/core";
36822
36911
  import { IconAlertCircle as IconAlertCircle30, IconCheck as IconCheck28, IconSparkles as IconSparkles8 } from "@tabler/icons-react";
36823
36912
  var JsonViewer2 = ({ data }) => /* @__PURE__ */ React333.createElement(ScrollArea9.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React333.createElement(Stack225, { gap: "md" }, data.name && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React333.createElement(Text213, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React333.createElement(Stack225, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React333.createElement(Box66, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React333.createElement(Text213, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React333.createElement(Code12, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
@@ -36843,8 +36932,8 @@ function coerce(value, fallback) {
36843
36932
  var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, isDisabled, executeAction }) => {
36844
36933
  const { domainCardRenderer } = useBlocknoteContext();
36845
36934
  const handlers = useBlocknoteHandlers();
36846
- const [isAskingCompanion, setIsAskingCompanion] = useState181(false);
36847
- const [companionError, setCompanionError] = useState181(null);
36935
+ const [isAskingCompanion, setIsAskingCompanion] = useState182(false);
36936
+ const [companionError, setCompanionError] = useState182(null);
36848
36937
  const parsed = useMemo128(() => parseDomainCardPreviewInputs(inputs), [inputs]);
36849
36938
  const editorDocument = editor?.document || [];
36850
36939
  const resolveOpts = useMemo128(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
@@ -36928,7 +37017,7 @@ registerActionTypeUI("qi/domain.card-preview", {
36928
37017
  import { IconSparkles as IconSparkles10 } from "@tabler/icons-react";
36929
37018
 
36930
37019
  // src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
36931
- import React334, { useCallback as useCallback124, useEffect as useEffect125, useState as useState182 } from "react";
37020
+ import React334, { useCallback as useCallback124, useEffect as useEffect125, useState as useState183 } from "react";
36932
37021
  import { Stack as Stack226 } from "@mantine/core";
36933
37022
 
36934
37023
  // src/mantine/blocks/action/actionTypes/oracle/types.ts
@@ -36950,7 +37039,7 @@ function serializeOracleInputs(inputs) {
36950
37039
 
36951
37040
  // src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
36952
37041
  var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
36953
- const [local, setLocal] = useState182(() => parseOracleInputs(inputs));
37042
+ const [local, setLocal] = useState183(() => parseOracleInputs(inputs));
36954
37043
  useEffect125(() => {
36955
37044
  setLocal(parseOracleInputs(inputs));
36956
37045
  }, [inputs]);
@@ -36978,7 +37067,7 @@ var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
36978
37067
  };
36979
37068
 
36980
37069
  // src/mantine/blocks/action/actionTypes/oracle/OracleFlowDetail.tsx
36981
- import React335, { useCallback as useCallback125, useMemo as useMemo129, useState as useState183 } from "react";
37070
+ import React335, { useCallback as useCallback125, useMemo as useMemo129, useState as useState184 } from "react";
36982
37071
  import { Button as Button74, Stack as Stack227 } from "@mantine/core";
36983
37072
  import { IconCheck as IconCheck29, IconAlertCircle as IconAlertCircle31, IconSparkles as IconSparkles9 } from "@tabler/icons-react";
36984
37073
  var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
@@ -36987,8 +37076,8 @@ var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled })
36987
37076
  const editorDocument = editor?.document || [];
36988
37077
  const resolveOpts = useMemo129(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
36989
37078
  const resolvedPrompt = resolveReferences(parsed.prompt, editorDocument, resolveOpts).trim();
36990
- const [isLoading, setIsLoading] = useState183(false);
36991
- const [error, setError] = useState183(null);
37079
+ const [isLoading, setIsLoading] = useState184(false);
37080
+ const [error, setError] = useState184(null);
36992
37081
  const isCompleted = runtime.state === "completed";
36993
37082
  const handleExecute = useCallback125(async () => {
36994
37083
  if (isDisabled || isLoading || isCompleted) return;
@@ -37037,7 +37126,7 @@ registerActionTypeUI("oracle", {
37037
37126
  import { IconMessage } from "@tabler/icons-react";
37038
37127
 
37039
37128
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
37040
- import React336, { useCallback as useCallback126, useEffect as useEffect126, useState as useState184 } from "react";
37129
+ import React336, { useCallback as useCallback126, useEffect as useEffect126, useState as useState185 } from "react";
37041
37130
  import { Stack as Stack228 } from "@mantine/core";
37042
37131
 
37043
37132
  // src/mantine/blocks/action/actionTypes/oraclePrompt/types.ts
@@ -37057,7 +37146,7 @@ function serializeOraclePromptInputs(inputs) {
37057
37146
 
37058
37147
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
37059
37148
  var OraclePromptConfig = ({ inputs, onInputsChange }) => {
37060
- const [localPrompt, setLocalPrompt] = useState184(() => parseOraclePromptInputs(inputs).prompt);
37149
+ const [localPrompt, setLocalPrompt] = useState185(() => parseOraclePromptInputs(inputs).prompt);
37061
37150
  useEffect126(() => {
37062
37151
  setLocalPrompt(parseOraclePromptInputs(inputs).prompt);
37063
37152
  }, [inputs]);
@@ -37082,7 +37171,7 @@ var OraclePromptConfig = ({ inputs, onInputsChange }) => {
37082
37171
  };
37083
37172
 
37084
37173
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptFlowDetail.tsx
37085
- import React337, { useCallback as useCallback127, useMemo as useMemo130, useState as useState185 } from "react";
37174
+ import React337, { useCallback as useCallback127, useMemo as useMemo130, useState as useState186 } from "react";
37086
37175
  import { Loader as Loader71, Stack as Stack229, Text as Text214 } from "@mantine/core";
37087
37176
  import { IconSend as IconSend8 } from "@tabler/icons-react";
37088
37177
  function parsePrimarySkill(rawSkill) {
@@ -37126,8 +37215,8 @@ var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
37126
37215
  const editorDocument = editor?.document || [];
37127
37216
  const resolveOpts = useMemo130(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
37128
37217
  const resolvedPrompt = useMemo130(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
37129
- const [submitting, setSubmitting] = useState185(false);
37130
- const [error, setError] = useState185(null);
37218
+ const [submitting, setSubmitting] = useState186(false);
37219
+ const [error, setError] = useState186(null);
37131
37220
  const handleExecute = useCallback127(async () => {
37132
37221
  if (isDisabled || submitting || !resolvedPrompt) return;
37133
37222
  if (typeof handlers?.askCompanion !== "function") {
@@ -37174,7 +37263,7 @@ registerActionTypeUI("oracle.prompt", {
37174
37263
  import { IconClipboard, IconClipboardCheck } from "@tabler/icons-react";
37175
37264
 
37176
37265
  // src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitConfig.tsx
37177
- import React338, { useCallback as useCallback128, useEffect as useEffect127, useState as useState186 } from "react";
37266
+ import React338, { useCallback as useCallback128, useEffect as useEffect127, useState as useState187 } from "react";
37178
37267
  import { Stack as Stack230, Text as Text215 } from "@mantine/core";
37179
37268
 
37180
37269
  // src/mantine/blocks/action/actionTypes/formSubmit/types.ts
@@ -37209,8 +37298,8 @@ function isValidSchemaJson(value) {
37209
37298
  }
37210
37299
  }
37211
37300
  var FormSubmitConfig = ({ inputs, onInputsChange }) => {
37212
- const [localSchema, setLocalSchema] = useState186(() => parseFormSubmitActionInputs(inputs).surveySchema);
37213
- const [error, setError] = useState186(null);
37301
+ const [localSchema, setLocalSchema] = useState187(() => parseFormSubmitActionInputs(inputs).surveySchema);
37302
+ const [error, setError] = useState187(null);
37214
37303
  useEffect127(() => {
37215
37304
  setLocalSchema(parseFormSubmitActionInputs(inputs).surveySchema);
37216
37305
  setError(null);
@@ -37246,7 +37335,7 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
37246
37335
  };
37247
37336
 
37248
37337
  // src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
37249
- import React339, { useCallback as useCallback129, useEffect as useEffect128, useMemo as useMemo131, useState as useState187 } from "react";
37338
+ import React339, { useCallback as useCallback129, useEffect as useEffect128, useMemo as useMemo131, useState as useState188 } from "react";
37250
37339
  import { Loader as Loader72, Stack as Stack231, Text as Text216 } from "@mantine/core";
37251
37340
  import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
37252
37341
  function parsePrimarySkill2(rawSkill) {
@@ -37299,8 +37388,8 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, isDisabled, execut
37299
37388
  const editorDocument = editor?.document || [];
37300
37389
  const resolveOpts = useMemo131(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
37301
37390
  const resolvedSchemaString = useMemo131(() => resolveReferences(parsed.surveySchema || "", editorDocument, resolveOpts).trim(), [parsed.surveySchema, editorDocument, resolveOpts]);
37302
- const [submitting, setSubmitting] = useState187(false);
37303
- const [error, setError] = useState187(null);
37391
+ const [submitting, setSubmitting] = useState188(false);
37392
+ const [error, setError] = useState188(null);
37304
37393
  const parsedSchema = useMemo131(() => {
37305
37394
  if (!resolvedSchemaString) return null;
37306
37395
  try {
@@ -37399,7 +37488,7 @@ registerActionTypeUI("qi/human.form.submit", {
37399
37488
  import { IconShieldCheck as IconShieldCheck18 } from "@tabler/icons-react";
37400
37489
 
37401
37490
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
37402
- import React340, { useCallback as useCallback130, useEffect as useEffect129, useState as useState188 } from "react";
37491
+ import React340, { useCallback as useCallback130, useEffect as useEffect129, useState as useState189 } from "react";
37403
37492
  import { Stack as Stack232, Text as Text217 } from "@mantine/core";
37404
37493
 
37405
37494
  // src/mantine/blocks/action/actionTypes/credentialStore/types.ts
@@ -37431,7 +37520,7 @@ function serializeCredentialStoreInputs(inputs) {
37431
37520
 
37432
37521
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
37433
37522
  var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
37434
- const [local, setLocal] = useState188(() => parseCredentialStoreInputs(inputs));
37523
+ const [local, setLocal] = useState189(() => parseCredentialStoreInputs(inputs));
37435
37524
  useEffect129(() => {
37436
37525
  setLocal(parseCredentialStoreInputs(inputs));
37437
37526
  }, [inputs]);
@@ -37475,7 +37564,7 @@ var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
37475
37564
  };
37476
37565
 
37477
37566
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreFlowDetail.tsx
37478
- import React341, { useCallback as useCallback131, useMemo as useMemo132, useState as useState189 } from "react";
37567
+ import React341, { useCallback as useCallback131, useMemo as useMemo132, useState as useState190 } from "react";
37479
37568
  import { Button as Button75, Code as Code13, Loader as Loader73, Stack as Stack233, Text as Text218 } from "@mantine/core";
37480
37569
  import { IconShieldCheck as IconShieldCheck17 } from "@tabler/icons-react";
37481
37570
  function safeParse(value) {
@@ -37512,8 +37601,8 @@ var CredentialStoreFlowDetail = ({ inputs, editor, runtime, isDisabled, executeA
37512
37601
  );
37513
37602
  const resolvedCredential = useMemo132(() => resolveReferences(parsed.credential || "", editorDocument, resolveOpts).trim(), [parsed.credential, editorDocument, resolveOpts]);
37514
37603
  const resolvedRoomId = useMemo132(() => resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim(), [parsed.roomId, editorDocument, resolveOpts]);
37515
- const [submitting, setSubmitting] = useState189(false);
37516
- const [error, setError] = useState189(null);
37604
+ const [submitting, setSubmitting] = useState190(false);
37605
+ const [error, setError] = useState190(null);
37517
37606
  const hasCredential = !!resolvedCredential;
37518
37607
  const hasKey = !!resolvedCredentialKey;
37519
37608
  const isCompleted = runtime.state === "completed";
@@ -37559,7 +37648,7 @@ registerActionTypeUI("qi/credential.store", {
37559
37648
  import { IconMessageCircle } from "@tabler/icons-react";
37560
37649
 
37561
37650
  // src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
37562
- import React342, { useCallback as useCallback132, useEffect as useEffect130, useMemo as useMemo133, useState as useState190 } from "react";
37651
+ import React342, { useCallback as useCallback132, useEffect as useEffect130, useMemo as useMemo133, useState as useState191 } from "react";
37563
37652
  import { Flex as Flex38, Stack as Stack234, Text as Text219 } from "@mantine/core";
37564
37653
 
37565
37654
  // src/mantine/blocks/action/actionTypes/matrixDm/types.ts
@@ -37584,9 +37673,9 @@ function serializeMatrixDmInputs(inputs) {
37584
37673
  // src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
37585
37674
  var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
37586
37675
  const handlers = useBlocknoteHandlers();
37587
- const [local, setLocal] = useState190(() => parseMatrixDmInputs(inputs));
37588
- const [roomMembers, setRoomMembers] = useState190([]);
37589
- const [searchValue, setSearchValue] = useState190("");
37676
+ const [local, setLocal] = useState191(() => parseMatrixDmInputs(inputs));
37677
+ const [roomMembers, setRoomMembers] = useState191([]);
37678
+ const [searchValue, setSearchValue] = useState191("");
37590
37679
  const roomId = editor?.getRoomId?.() || null;
37591
37680
  const mx = editor?.getMatrixClient?.() || null;
37592
37681
  useEffect130(() => {
@@ -37672,11 +37761,11 @@ registerActionTypeUI("qi/matrix.dm", {
37672
37761
  import { IconCalendarPlus } from "@tabler/icons-react";
37673
37762
 
37674
37763
  // src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateConfig.tsx
37675
- import React344, { useCallback as useCallback134, useEffect as useEffect132, useState as useState192 } from "react";
37764
+ import React344, { useCallback as useCallback134, useEffect as useEffect132, useState as useState193 } from "react";
37676
37765
  import { Divider as Divider26, Stack as Stack236, Text as Text221 } from "@mantine/core";
37677
37766
 
37678
37767
  // src/mantine/blocks/action/actionTypes/_shared/ConnectionSelector.tsx
37679
- import React343, { useCallback as useCallback133, useEffect as useEffect131, useMemo as useMemo134, useRef as useRef46, useState as useState191 } from "react";
37768
+ import React343, { useCallback as useCallback133, useEffect as useEffect131, useMemo as useMemo134, useRef as useRef46, useState as useState192 } from "react";
37680
37769
  import { Alert as Alert50, Button as Button76, Group as Group126, Loader as Loader74, Stack as Stack235, Text as Text220 } from "@mantine/core";
37681
37770
  import { IconPlug, IconRefresh as IconRefresh10 } from "@tabler/icons-react";
37682
37771
  var POLL_INTERVAL_MS2 = 2e3;
@@ -37684,11 +37773,11 @@ var CONNECT_TIMEOUT_MS = 12e4;
37684
37773
  var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled }) => {
37685
37774
  const handlers = useBlocknoteHandlers();
37686
37775
  const entityDid = useMemo134(() => handlers?.getEntityDid?.() || "", [handlers]);
37687
- const [connections, setConnections] = useState191([]);
37688
- const [loading, setLoading] = useState191(false);
37689
- const [hasLoaded, setHasLoaded] = useState191(false);
37690
- const [connecting, setConnecting] = useState191(false);
37691
- const [error, setError] = useState191(null);
37776
+ const [connections, setConnections] = useState192([]);
37777
+ const [loading, setLoading] = useState192(false);
37778
+ const [hasLoaded, setHasLoaded] = useState192(false);
37779
+ const [connecting, setConnecting] = useState192(false);
37780
+ const [error, setError] = useState192(null);
37692
37781
  const cleanupRef = useRef46(null);
37693
37782
  const loadConnections = useCallback133(async () => {
37694
37783
  if (!handlers?.integrations?.listConnections) {
@@ -37836,7 +37925,7 @@ var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled })
37836
37925
 
37837
37926
  // src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateConfig.tsx
37838
37927
  var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
37839
- const [local, setLocal] = useState192(() => parseCalendarEventCreateInputs(inputs));
37928
+ const [local, setLocal] = useState193(() => parseCalendarEventCreateInputs(inputs));
37840
37929
  useEffect132(() => {
37841
37930
  setLocal(parseCalendarEventCreateInputs(inputs));
37842
37931
  }, [inputs]);
@@ -37954,7 +38043,7 @@ var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
37954
38043
  };
37955
38044
 
37956
38045
  // src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateFlowDetail.tsx
37957
- import React345, { useCallback as useCallback135, useEffect as useEffect133, useMemo as useMemo135, useState as useState193 } from "react";
38046
+ import React345, { useCallback as useCallback135, useEffect as useEffect133, useMemo as useMemo135, useState as useState194 } from "react";
37958
38047
  import { Anchor as Anchor2, Stack as Stack237, Text as Text222 } from "@mantine/core";
37959
38048
  var CalendarEventCreateFlowDetail = ({
37960
38049
  inputs,
@@ -37980,7 +38069,7 @@ var CalendarEventCreateFlowDetail = ({
37980
38069
  },
37981
38070
  [parsed, editorDocument, resolveOpts]
37982
38071
  );
37983
- const [local, setLocal] = useState193(() => ({
38072
+ const [local, setLocal] = useState194(() => ({
37984
38073
  summary: resolve("summary"),
37985
38074
  start_datetime: resolve("start_datetime"),
37986
38075
  end_datetime: resolve("end_datetime"),
@@ -38016,7 +38105,7 @@ var CalendarEventCreateFlowDetail = ({
38016
38105
  useEffect133(() => {
38017
38106
  registerRuntimeInputs?.(local);
38018
38107
  }, [registerRuntimeInputs, local]);
38019
- const [error, setError] = useState193(null);
38108
+ const [error, setError] = useState194(null);
38020
38109
  const execute = useCallback135(async () => {
38021
38110
  if (!executeAction) {
38022
38111
  setError("Shared action executor is unavailable");
@@ -38101,7 +38190,7 @@ registerActionTypeUI("qi/calendar.event.create", {
38101
38190
  import { IconCalendarEvent } from "@tabler/icons-react";
38102
38191
 
38103
38192
  // src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
38104
- import React346, { useCallback as useCallback136, useEffect as useEffect134, useState as useState194 } from "react";
38193
+ import React346, { useCallback as useCallback136, useEffect as useEffect134, useState as useState195 } from "react";
38105
38194
  import { Divider as Divider27, Stack as Stack238, Text as Text223 } from "@mantine/core";
38106
38195
 
38107
38196
  // src/core/lib/actionRegistry/actions/calendar/eventUpdate.types.ts
@@ -38146,7 +38235,7 @@ function serializeCalendarEventUpdateInputs(inputs) {
38146
38235
 
38147
38236
  // src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
38148
38237
  var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
38149
- const [local, setLocal] = useState194(() => parseCalendarEventUpdateInputs(inputs));
38238
+ const [local, setLocal] = useState195(() => parseCalendarEventUpdateInputs(inputs));
38150
38239
  useEffect134(() => {
38151
38240
  setLocal(parseCalendarEventUpdateInputs(inputs));
38152
38241
  }, [inputs]);
@@ -38241,7 +38330,7 @@ var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
38241
38330
  };
38242
38331
 
38243
38332
  // src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateFlowDetail.tsx
38244
- import React347, { useCallback as useCallback137, useEffect as useEffect135, useMemo as useMemo136, useState as useState195 } from "react";
38333
+ import React347, { useCallback as useCallback137, useEffect as useEffect135, useMemo as useMemo136, useState as useState196 } from "react";
38245
38334
  import { Anchor as Anchor3, Stack as Stack239, Text as Text224 } from "@mantine/core";
38246
38335
  var CalendarEventUpdateFlowDetail = ({
38247
38336
  inputs,
@@ -38267,7 +38356,7 @@ var CalendarEventUpdateFlowDetail = ({
38267
38356
  },
38268
38357
  [parsed, editorDocument, resolveOpts]
38269
38358
  );
38270
- const [local, setLocal] = useState195(() => ({
38359
+ const [local, setLocal] = useState196(() => ({
38271
38360
  event_id: resolve("event_id"),
38272
38361
  summary: resolve("summary"),
38273
38362
  start_datetime: resolve("start_datetime"),
@@ -38305,7 +38394,7 @@ var CalendarEventUpdateFlowDetail = ({
38305
38394
  useEffect135(() => {
38306
38395
  registerRuntimeInputs?.(local);
38307
38396
  }, [registerRuntimeInputs, local]);
38308
- const [error, setError] = useState195(null);
38397
+ const [error, setError] = useState196(null);
38309
38398
  const execute = useCallback137(async () => {
38310
38399
  if (!executeAction) {
38311
38400
  setError("Shared action executor is unavailable");
@@ -38369,7 +38458,7 @@ registerActionTypeUI("qi/calendar.event.update", {
38369
38458
  import { IconCalendarStats } from "@tabler/icons-react";
38370
38459
 
38371
38460
  // src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
38372
- import React348, { useCallback as useCallback138, useEffect as useEffect136, useState as useState196 } from "react";
38461
+ import React348, { useCallback as useCallback138, useEffect as useEffect136, useState as useState197 } from "react";
38373
38462
  import { Divider as Divider28, Group as Group127, Stack as Stack240, Switch as Switch13, Text as Text225 } from "@mantine/core";
38374
38463
 
38375
38464
  // src/core/lib/actionRegistry/actions/calendar/eventList.types.ts
@@ -38410,7 +38499,7 @@ function serializeCalendarEventListInputs(inputs) {
38410
38499
 
38411
38500
  // src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
38412
38501
  var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
38413
- const [local, setLocal] = useState196(() => parseCalendarEventListInputs(inputs));
38502
+ const [local, setLocal] = useState197(() => parseCalendarEventListInputs(inputs));
38414
38503
  useEffect136(() => {
38415
38504
  setLocal(parseCalendarEventListInputs(inputs));
38416
38505
  }, [inputs]);
@@ -38488,7 +38577,7 @@ var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
38488
38577
  };
38489
38578
 
38490
38579
  // src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListFlowDetail.tsx
38491
- import React349, { useCallback as useCallback139, useMemo as useMemo137, useState as useState197 } from "react";
38580
+ import React349, { useCallback as useCallback139, useMemo as useMemo137, useState as useState198 } from "react";
38492
38581
  import { Badge as Badge56, Button as Button77, Loader as Loader75, Stack as Stack241 } from "@mantine/core";
38493
38582
  import { IconRefresh as IconRefresh11 } from "@tabler/icons-react";
38494
38583
  var CalendarEventListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
@@ -38498,8 +38587,8 @@ var CalendarEventListFlowDetail = ({ inputs, runtime, isDisabled, executeAction
38498
38587
  const connection = parsed.connection;
38499
38588
  const hasConnection = !!connection?.connectedAccountId;
38500
38589
  const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
38501
- const [loading, setLoading] = useState197(false);
38502
- const [error, setError] = useState197(null);
38590
+ const [loading, setLoading] = useState198(false);
38591
+ const [error, setError] = useState198(null);
38503
38592
  const execute = useCallback139(async () => {
38504
38593
  if (!executeAction) {
38505
38594
  setError("Shared action executor is unavailable");
@@ -38541,7 +38630,7 @@ registerActionTypeUI("qi/calendar.event.list", {
38541
38630
  import { IconUserPlus as IconUserPlus3 } from "@tabler/icons-react";
38542
38631
 
38543
38632
  // src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
38544
- import React350, { useCallback as useCallback140, useEffect as useEffect137, useState as useState198 } from "react";
38633
+ import React350, { useCallback as useCallback140, useEffect as useEffect137, useState as useState199 } from "react";
38545
38634
  import { Divider as Divider29, Group as Group128, Stack as Stack242, Switch as Switch14, Text as Text226 } from "@mantine/core";
38546
38635
 
38547
38636
  // src/core/lib/actionRegistry/actions/xero/contactCreate.types.ts
@@ -38594,7 +38683,7 @@ function serializeXeroContactCreateInputs(inputs) {
38594
38683
 
38595
38684
  // src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
38596
38685
  var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
38597
- const [local, setLocal] = useState198(() => parseXeroContactCreateInputs(inputs));
38686
+ const [local, setLocal] = useState199(() => parseXeroContactCreateInputs(inputs));
38598
38687
  useEffect137(() => {
38599
38688
  setLocal(parseXeroContactCreateInputs(inputs));
38600
38689
  }, [inputs]);
@@ -38660,7 +38749,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
38660
38749
  };
38661
38750
 
38662
38751
  // src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateFlowDetail.tsx
38663
- import React351, { useCallback as useCallback141, useEffect as useEffect138, useMemo as useMemo138, useState as useState199 } from "react";
38752
+ import React351, { useCallback as useCallback141, useEffect as useEffect138, useMemo as useMemo138, useState as useState200 } from "react";
38664
38753
  import { Stack as Stack243, Text as Text227 } from "@mantine/core";
38665
38754
  var XeroContactCreateFlowDetail = ({
38666
38755
  inputs,
@@ -38686,7 +38775,7 @@ var XeroContactCreateFlowDetail = ({
38686
38775
  },
38687
38776
  [parsed, editorDocument, resolveOpts]
38688
38777
  );
38689
- const [local, setLocal] = useState199(() => ({
38778
+ const [local, setLocal] = useState200(() => ({
38690
38779
  Name: resolve("Name"),
38691
38780
  EmailAddress: resolve("EmailAddress"),
38692
38781
  FirstName: resolve("FirstName"),
@@ -38718,7 +38807,7 @@ var XeroContactCreateFlowDetail = ({
38718
38807
  useEffect138(() => {
38719
38808
  registerRuntimeInputs?.(local);
38720
38809
  }, [registerRuntimeInputs, local]);
38721
- const [error, setError] = useState199(null);
38810
+ const [error, setError] = useState200(null);
38722
38811
  const execute = useCallback141(async () => {
38723
38812
  if (!executeAction) {
38724
38813
  setError("Shared action executor is unavailable");
@@ -38760,7 +38849,7 @@ registerActionTypeUI("qi/xero.contact.create", {
38760
38849
  import { IconReceipt } from "@tabler/icons-react";
38761
38850
 
38762
38851
  // src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
38763
- import React353, { useCallback as useCallback143, useEffect as useEffect139, useState as useState200 } from "react";
38852
+ import React353, { useCallback as useCallback143, useEffect as useEffect139, useState as useState201 } from "react";
38764
38853
  import { Divider as Divider31, Group as Group130, Stack as Stack245, Text as Text229 } from "@mantine/core";
38765
38854
 
38766
38855
  // src/core/lib/actionRegistry/actions/xero/invoiceCreate.types.ts
@@ -39128,7 +39217,7 @@ function IterativeMapEditor({
39128
39217
 
39129
39218
  // src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
39130
39219
  var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39131
- const [local, setLocal] = useState200(() => parseXeroInvoiceCreateInputs(inputs));
39220
+ const [local, setLocal] = useState201(() => parseXeroInvoiceCreateInputs(inputs));
39132
39221
  useEffect139(() => {
39133
39222
  setLocal(parseXeroInvoiceCreateInputs(inputs));
39134
39223
  }, [inputs]);
@@ -39236,16 +39325,16 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39236
39325
  };
39237
39326
 
39238
39327
  // src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateFlowDetail.tsx
39239
- import React354, { useCallback as useCallback145, useEffect as useEffect142, useMemo as useMemo141, useState as useState203 } from "react";
39328
+ import React354, { useCallback as useCallback145, useEffect as useEffect142, useMemo as useMemo141, useState as useState204 } from "react";
39240
39329
  import { Badge as Badge57, Box as Box68, Button as Button79, Group as Group131, Stack as Stack246, Text as Text230 } from "@mantine/core";
39241
39330
  import { IconX as IconX19 } from "@tabler/icons-react";
39242
39331
 
39243
39332
  // src/mantine/hooks/useXeroWorkItems.ts
39244
- import { useEffect as useEffect140, useMemo as useMemo140, useState as useState201 } from "react";
39333
+ import { useEffect as useEffect140, useMemo as useMemo140, useState as useState202 } from "react";
39245
39334
  function useXeroWorkItems(editor, filter) {
39246
39335
  const workItemsMap = editor?._yXeroWorkItems || null;
39247
39336
  const terminalMap = workItemsMap?.doc?.getMap?.(XERO_WORK_TERMINAL_MAP_NAME) || null;
39248
- const [rev, setRev] = useState201(0);
39337
+ const [rev, setRev] = useState202(0);
39249
39338
  useEffect140(() => {
39250
39339
  if (!workItemsMap?.observe) return;
39251
39340
  const handler = () => setRev((value) => value + 1);
@@ -39371,11 +39460,11 @@ function getInvoiceTotal(output) {
39371
39460
  }
39372
39461
 
39373
39462
  // src/mantine/blocks/action/actionTypes/xero/_shared/useFlowXeroConnection.ts
39374
- import { useCallback as useCallback144, useEffect as useEffect141, useState as useState202 } from "react";
39463
+ import { useCallback as useCallback144, useEffect as useEffect141, useState as useState203 } from "react";
39375
39464
  var CONNECTION_KEY = "connection";
39376
39465
  function useFlowXeroConnection(editor) {
39377
39466
  const connectionMap = editor?._yXeroConnection || null;
39378
- const [connection, setConnection] = useState202(() => connectionMap?.get(CONNECTION_KEY) || null);
39467
+ const [connection, setConnection] = useState203(() => connectionMap?.get(CONNECTION_KEY) || null);
39379
39468
  useEffect141(() => {
39380
39469
  if (!connectionMap?.observe) return;
39381
39470
  const sync = () => setConnection(connectionMap.get(CONNECTION_KEY) || null);
@@ -39493,7 +39582,7 @@ var XeroInvoiceCreateFlowDetail = ({
39493
39582
  },
39494
39583
  [parsed, editor, resolveOpts]
39495
39584
  );
39496
- const [local, setLocal] = useState203(() => ({
39585
+ const [local, setLocal] = useState204(() => ({
39497
39586
  Status: seedFromTemplate("Status"),
39498
39587
  ContactID: seedFromTemplate("ContactID"),
39499
39588
  ContactName: seedFromTemplate("ContactName"),
@@ -39503,7 +39592,7 @@ var XeroInvoiceCreateFlowDetail = ({
39503
39592
  Reference: seedFromTemplate("Reference"),
39504
39593
  CurrencyCode: seedFromTemplate("CurrencyCode")
39505
39594
  }));
39506
- const [reviewLineItems, setReviewLineItems] = useState203([]);
39595
+ const [reviewLineItems, setReviewLineItems] = useState204([]);
39507
39596
  useEffect142(() => {
39508
39597
  setLocal((prev) => {
39509
39598
  const next = {
@@ -39526,7 +39615,7 @@ var XeroInvoiceCreateFlowDetail = ({
39526
39615
  setLocal((prev) => ({ ...prev, ...patch }));
39527
39616
  }, []);
39528
39617
  const workItems = useXeroWorkItems(editor, { kind: "invoice.create", assignedBlockId: block.id, statuses: ["pending", "failed", "completed"] });
39529
- const [selectedWorkItemId, setSelectedWorkItemId] = useState203("");
39618
+ const [selectedWorkItemId, setSelectedWorkItemId] = useState204("");
39530
39619
  const selectedWorkItem = useMemo141(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
39531
39620
  const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
39532
39621
  useEffect142(() => {
@@ -39586,7 +39675,7 @@ var XeroInvoiceCreateFlowDetail = ({
39586
39675
  __xeroSelectedWorkItemId: selectedWorkItem && !selectedWorkItemCompleted ? selectedWorkItem.id : ""
39587
39676
  });
39588
39677
  }, [registerRuntimeInputs, local, selectedWorkItem?.id, selectedWorkItemCompleted, workItems.length]);
39589
- const [error, setError] = useState203(null);
39678
+ const [error, setError] = useState204(null);
39590
39679
  const execute = useCallback145(async () => {
39591
39680
  if (selectedWorkItemCompleted) {
39592
39681
  return;
@@ -39872,7 +39961,7 @@ registerActionTypeUI("qi/xero.invoice.create", {
39872
39961
  import { IconListDetails as IconListDetails2 } from "@tabler/icons-react";
39873
39962
 
39874
39963
  // src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
39875
- import React355, { useCallback as useCallback146, useEffect as useEffect143, useState as useState204 } from "react";
39964
+ import React355, { useCallback as useCallback146, useEffect as useEffect143, useState as useState205 } from "react";
39876
39965
  import { Divider as Divider32, Group as Group132, Stack as Stack247, Switch as Switch15, Text as Text231 } from "@mantine/core";
39877
39966
 
39878
39967
  // src/core/lib/actionRegistry/actions/xero/invoiceList.types.ts
@@ -39915,7 +40004,7 @@ function serializeXeroInvoiceListInputs(inputs) {
39915
40004
 
39916
40005
  // src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
39917
40006
  var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39918
- const [local, setLocal] = useState204(() => parseXeroInvoiceListInputs(inputs));
40007
+ const [local, setLocal] = useState205(() => parseXeroInvoiceListInputs(inputs));
39919
40008
  useEffect143(() => {
39920
40009
  setLocal(parseXeroInvoiceListInputs(inputs));
39921
40010
  }, [inputs]);
@@ -39992,7 +40081,7 @@ var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
39992
40081
  };
39993
40082
 
39994
40083
  // src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListFlowDetail.tsx
39995
- import React356, { useCallback as useCallback147, useMemo as useMemo142, useState as useState205 } from "react";
40084
+ import React356, { useCallback as useCallback147, useMemo as useMemo142, useState as useState206 } from "react";
39996
40085
  import { Badge as Badge58, Button as Button80, Loader as Loader76, Stack as Stack248 } from "@mantine/core";
39997
40086
  import { IconRefresh as IconRefresh12 } from "@tabler/icons-react";
39998
40087
  var XeroInvoiceListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
@@ -40002,8 +40091,8 @@ var XeroInvoiceListFlowDetail = ({ inputs, runtime, isDisabled, executeAction })
40002
40091
  const connection = parsed.connection;
40003
40092
  const hasConnection = !!connection?.connectedAccountId;
40004
40093
  const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
40005
- const [loading, setLoading] = useState205(false);
40006
- const [error, setError] = useState205(null);
40094
+ const [loading, setLoading] = useState206(false);
40095
+ const [error, setError] = useState206(null);
40007
40096
  const execute = useCallback147(async () => {
40008
40097
  if (!executeAction) {
40009
40098
  setError("Shared action executor is unavailable");
@@ -40045,11 +40134,11 @@ registerActionTypeUI("qi/xero.invoice.list", {
40045
40134
  import { IconReceipt as IconReceipt2 } from "@tabler/icons-react";
40046
40135
 
40047
40136
  // src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
40048
- import React358, { useCallback as useCallback149, useEffect as useEffect145, useState as useState207 } from "react";
40137
+ import React358, { useCallback as useCallback149, useEffect as useEffect145, useState as useState208 } from "react";
40049
40138
  import { Divider as Divider33, Group as Group134, Stack as Stack250, Switch as Switch16, Text as Text233 } from "@mantine/core";
40050
40139
 
40051
40140
  // src/mantine/blocks/action/actionTypes/xero/_shared/XeroBankAccountPicker.tsx
40052
- import React357, { useCallback as useCallback148, useEffect as useEffect144, useRef as useRef47, useState as useState206 } from "react";
40141
+ import React357, { useCallback as useCallback148, useEffect as useEffect144, useRef as useRef47, useState as useState207 } from "react";
40053
40142
  import { ActionIcon as ActionIcon50, Group as Group133, Loader as Loader77, Stack as Stack249, Text as Text232 } from "@mantine/core";
40054
40143
  import { IconRefresh as IconRefresh13 } from "@tabler/icons-react";
40055
40144
  var XERO_LIST_ACCOUNTS_SLUG = "XERO_LIST_ACCOUNTS";
@@ -40065,9 +40154,9 @@ var XeroBankAccountPicker = ({
40065
40154
  disabled
40066
40155
  }) => {
40067
40156
  const handlers = useBlocknoteHandlers();
40068
- const [bankAccounts, setBankAccounts] = useState206([]);
40069
- const [loading, setLoading] = useState206(false);
40070
- const [error, setError] = useState206(null);
40157
+ const [bankAccounts, setBankAccounts] = useState207([]);
40158
+ const [loading, setLoading] = useState207(false);
40159
+ const [error, setError] = useState207(null);
40071
40160
  const fetchBankAccounts = useCallback148(async () => {
40072
40161
  if (!connectedAccountId || !handlers?.integrations?.executeTool) {
40073
40162
  setBankAccounts([]);
@@ -40148,7 +40237,7 @@ var XeroBankAccountPicker = ({
40148
40237
 
40149
40238
  // src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
40150
40239
  var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
40151
- const [local, setLocal] = useState207(() => parseXeroPaymentCreateInputs(inputs));
40240
+ const [local, setLocal] = useState208(() => parseXeroPaymentCreateInputs(inputs));
40152
40241
  useEffect145(() => {
40153
40242
  setLocal(parseXeroPaymentCreateInputs(inputs));
40154
40243
  }, [inputs]);
@@ -40248,7 +40337,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
40248
40337
  };
40249
40338
 
40250
40339
  // src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateFlowDetail.tsx
40251
- import React359, { useCallback as useCallback150, useEffect as useEffect146, useMemo as useMemo143, useState as useState208 } from "react";
40340
+ import React359, { useCallback as useCallback150, useEffect as useEffect146, useMemo as useMemo143, useState as useState209 } from "react";
40252
40341
  import { Badge as Badge59, Box as Box69, Button as Button81, Group as Group135, Stack as Stack251, Text as Text234 } from "@mantine/core";
40253
40342
  import { IconX as IconX20 } from "@tabler/icons-react";
40254
40343
  function shortId2(value, length = 10) {
@@ -40293,7 +40382,7 @@ var XeroPaymentCreateFlowDetail = ({
40293
40382
  },
40294
40383
  [parsed, editor, resolveOpts]
40295
40384
  );
40296
- const [local, setLocal] = useState208(() => ({
40385
+ const [local, setLocal] = useState209(() => ({
40297
40386
  InvoiceID: seedFromTemplate("InvoiceID"),
40298
40387
  AccountID: seedFromTemplate("AccountID"),
40299
40388
  Amount: seedFromTemplate("Amount"),
@@ -40331,7 +40420,7 @@ var XeroPaymentCreateFlowDetail = ({
40331
40420
  );
40332
40421
  const managedByOracle = parsed.managedByOracle;
40333
40422
  const workItems = useXeroWorkItems(editor, { kind: "payment.create", assignedBlockId: block.id, statuses: ["pending", "approved", "failed", "completed"] });
40334
- const [selectedWorkItemId, setSelectedWorkItemId] = useState208("");
40423
+ const [selectedWorkItemId, setSelectedWorkItemId] = useState209("");
40335
40424
  const selectedWorkItem = useMemo143(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
40336
40425
  const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
40337
40426
  const selectedWorkItemApproved = selectedWorkItem?.status === "approved";
@@ -40382,7 +40471,7 @@ var XeroPaymentCreateFlowDetail = ({
40382
40471
  __xeroSelectedWorkItemId: selectedWorkItem && !selectedWorkItemCompleted ? selectedWorkItem.id : ""
40383
40472
  });
40384
40473
  }, [registerRuntimeInputs, local, selectedWorkItem?.id, selectedWorkItemCompleted, workItems.length]);
40385
- const [error, setError] = useState208(null);
40474
+ const [error, setError] = useState209(null);
40386
40475
  const execute = useCallback150(async () => {
40387
40476
  if (selectedWorkItemCompleted) {
40388
40477
  return;
@@ -40580,22 +40669,22 @@ import { IconBrandGmail } from "@tabler/icons-react";
40580
40669
  import { createElement } from "react";
40581
40670
 
40582
40671
  // src/mantine/blocks/action/actionTypes/_shared/DelegatedActionConfig.tsx
40583
- import React362, { useCallback as useCallback152, useEffect as useEffect148, useState as useState211 } from "react";
40672
+ import React362, { useCallback as useCallback152, useEffect as useEffect148, useState as useState212 } from "react";
40584
40673
  import { Divider as Divider34, Stack as Stack254 } from "@mantine/core";
40585
40674
 
40586
40675
  // src/mantine/blocks/action/actionTypes/_shared/BoundConnectionSelector.tsx
40587
- import React360, { useCallback as useCallback151, useEffect as useEffect147, useRef as useRef48, useState as useState209 } from "react";
40676
+ import React360, { useCallback as useCallback151, useEffect as useEffect147, useRef as useRef48, useState as useState210 } from "react";
40588
40677
  import { Alert as Alert52, Badge as Badge60, Button as Button82, Group as Group136, Loader as Loader78, Stack as Stack252, Text as Text235 } from "@mantine/core";
40589
40678
  import { IconCheck as IconCheck30, IconPlug as IconPlug2, IconRefresh as IconRefresh14, IconTrash as IconTrash12 } from "@tabler/icons-react";
40590
40679
  var POLL_INTERVAL_MS3 = 2e3;
40591
40680
  var CONNECT_TIMEOUT_MS2 = 12e4;
40592
40681
  var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection, onConnectionChange, mode, disabled }) => {
40593
40682
  const handlers = useBlocknoteHandlers();
40594
- const [manifest, setManifest] = useState209(null);
40595
- const [loading, setLoading] = useState209(false);
40596
- const [connecting, setConnecting] = useState209(false);
40597
- const [binding, setBinding] = useState209(false);
40598
- const [error, setError] = useState209(null);
40683
+ const [manifest, setManifest] = useState210(null);
40684
+ const [loading, setLoading] = useState210(false);
40685
+ const [connecting, setConnecting] = useState210(false);
40686
+ const [binding, setBinding] = useState210(false);
40687
+ const [error, setError] = useState210(null);
40599
40688
  const cleanupRef = useRef48(null);
40600
40689
  const loadManifest = useCallback151(async () => {
40601
40690
  if (mode !== "template") return;
@@ -40759,7 +40848,7 @@ var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection,
40759
40848
  };
40760
40849
 
40761
40850
  // src/mantine/blocks/action/actionTypes/_shared/DynamicToolForm.tsx
40762
- import React361, { useMemo as useMemo144, useState as useState210 } from "react";
40851
+ import React361, { useMemo as useMemo144, useState as useState211 } from "react";
40763
40852
  import { Button as Button83, Collapse as Collapse11, Stack as Stack253 } from "@mantine/core";
40764
40853
  import { IconChevronDown as IconChevronDown11, IconChevronRight as IconChevronRight13 } from "@tabler/icons-react";
40765
40854
  var ALWAYS_EXCLUDE = /* @__PURE__ */ new Set(["user_id", "connected_account_id"]);
@@ -40786,7 +40875,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
40786
40875
  }
40787
40876
  return { required: req, optional: opt };
40788
40877
  }, [schema, exclude]);
40789
- const [showOptional, setShowOptional] = useState210(false);
40878
+ const [showOptional, setShowOptional] = useState211(false);
40790
40879
  const renderField = (field) => {
40791
40880
  if (field.type === "boolean") {
40792
40881
  return /* @__PURE__ */ React361.createElement(
@@ -40842,7 +40931,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
40842
40931
 
40843
40932
  // src/mantine/blocks/action/actionTypes/_shared/DelegatedActionConfig.tsx
40844
40933
  var DelegatedActionConfig = ({ inputs, onInputsChange, editor, blockId, toolkit, toolkitLabel, schema }) => {
40845
- const [local, setLocal] = useState211(() => parseDelegatedToolInputs(inputs));
40934
+ const [local, setLocal] = useState212(() => parseDelegatedToolInputs(inputs));
40846
40935
  useEffect148(() => {
40847
40936
  setLocal(parseDelegatedToolInputs(inputs));
40848
40937
  }, [inputs]);
@@ -40870,7 +40959,7 @@ var DelegatedActionConfig = ({ inputs, onInputsChange, editor, blockId, toolkit,
40870
40959
  };
40871
40960
 
40872
40961
  // src/mantine/blocks/action/actionTypes/_shared/DelegatedActionFlowDetail.tsx
40873
- import React363, { useCallback as useCallback153, useEffect as useEffect149, useMemo as useMemo145, useRef as useRef49, useState as useState212 } from "react";
40962
+ import React363, { useCallback as useCallback153, useEffect as useEffect149, useMemo as useMemo145, useRef as useRef49, useState as useState213 } from "react";
40874
40963
  import { Button as Button84, Loader as Loader79, Stack as Stack255, Text as Text236 } from "@mantine/core";
40875
40964
  import { IconSend as IconSend9 } from "@tabler/icons-react";
40876
40965
  var DelegatedActionFlowDetail = ({
@@ -40901,7 +40990,7 @@ var DelegatedActionFlowDetail = ({
40901
40990
  },
40902
40991
  [parsed, editorDocument, resolveOpts]
40903
40992
  );
40904
- const [local, setLocal] = useState212(() => {
40993
+ const [local, setLocal] = useState213(() => {
40905
40994
  const seed = {};
40906
40995
  for (const name of fieldNames) seed[name] = resolve(name);
40907
40996
  return seed;
@@ -40924,8 +41013,8 @@ var DelegatedActionFlowDetail = ({
40924
41013
  const isCompleted = runtime.state === "completed";
40925
41014
  const missing = useMemo145(() => missingRequired(schema, local), [schema, local]);
40926
41015
  const canRun = hasBinding && missing.length === 0 && !isCompleted && !isDisabled;
40927
- const [error, setError] = useState212(null);
40928
- const [submitting, setSubmitting] = useState212(false);
41016
+ const [error, setError] = useState213(null);
41017
+ const [submitting, setSubmitting] = useState213(false);
40929
41018
  const run = useCallback153(
40930
41019
  async (pendingInvocationId) => {
40931
41020
  if (!executeAction) {
@@ -41020,7 +41109,7 @@ registerActionTypeUI("qi/googlecalendar.event.create", {
41020
41109
  import { IconLeaf as IconLeaf4 } from "@tabler/icons-react";
41021
41110
 
41022
41111
  // src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesConfig.tsx
41023
- import React364, { useCallback as useCallback154, useEffect as useEffect150, useState as useState213 } from "react";
41112
+ import React364, { useCallback as useCallback154, useEffect as useEffect150, useState as useState214 } from "react";
41024
41113
  import { Stack as Stack256, Text as Text237 } from "@mantine/core";
41025
41114
 
41026
41115
  // src/mantine/blocks/action/actionTypes/carbon/loadBatches/types.ts
@@ -41038,7 +41127,7 @@ function serializeLoadBatchesInputs(inputs) {
41038
41127
 
41039
41128
  // src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesConfig.tsx
41040
41129
  var LoadBatchesConfig = ({ inputs, onInputsChange }) => {
41041
- const [local, setLocal] = useState213(() => parseLoadBatchesInputs(inputs));
41130
+ const [local, setLocal] = useState214(() => parseLoadBatchesInputs(inputs));
41042
41131
  useEffect150(() => {
41043
41132
  setLocal(parseLoadBatchesInputs(inputs));
41044
41133
  }, [inputs]);
@@ -41146,11 +41235,11 @@ registerActionTypeUI("qi/carbon.loadBatches", {
41146
41235
  import { IconLeaf as IconLeaf5 } from "@tabler/icons-react";
41147
41236
 
41148
41237
  // src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestConfig.tsx
41149
- import React367, { useCallback as useCallback156, useEffect as useEffect152, useState as useState215 } from "react";
41238
+ import React367, { useCallback as useCallback156, useEffect as useEffect152, useState as useState216 } from "react";
41150
41239
  import { Stack as Stack259, Text as Text240 } from "@mantine/core";
41151
41240
 
41152
41241
  // src/mantine/blocks/action/actionTypes/carbon/BatchesSourceSelect.tsx
41153
- import React366, { useMemo as useMemo147, useState as useState214 } from "react";
41242
+ import React366, { useMemo as useMemo147, useState as useState215 } from "react";
41154
41243
  import { Anchor as Anchor4, Select as Select10, Stack as Stack258, Text as Text239 } from "@mantine/core";
41155
41244
  var LOAD_BATCHES_ACTION_TYPE = "qi/carbon.loadBatches";
41156
41245
  function refFor(blockId, field) {
@@ -41166,7 +41255,7 @@ var BatchesSourceSelect = ({ outputField, value, onChange, editorDocument, curre
41166
41255
  return blocks.filter((b) => b?.id && b.id !== currentBlockId && b.props?.actionType === LOAD_BATCHES_ACTION_TYPE).map((b) => ({ value: b.id, label: String(b.props?.title || "Load Carbon Batches") }));
41167
41256
  }, [editorDocument, currentBlockId]);
41168
41257
  const selectedBlockId = useMemo147(() => matchBlockId(value, outputField), [value, outputField]);
41169
- const [manual, setManual] = useState214(!!value && !selectedBlockId);
41258
+ const [manual, setManual] = useState215(!!value && !selectedBlockId);
41170
41259
  if (manual || options.length === 0 && !selectedBlockId) {
41171
41260
  return /* @__PURE__ */ React366.createElement(Stack258, { gap: 4 }, /* @__PURE__ */ React366.createElement(
41172
41261
  DataInput,
@@ -41211,7 +41300,7 @@ function serializeHarvestConfigInputs(inputs) {
41211
41300
 
41212
41301
  // src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestConfig.tsx
41213
41302
  var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41214
- const [local, setLocal] = useState215(() => parseHarvestConfigInputs(inputs));
41303
+ const [local, setLocal] = useState216(() => parseHarvestConfigInputs(inputs));
41215
41304
  useEffect152(() => {
41216
41305
  setLocal(parseHarvestConfigInputs(inputs));
41217
41306
  }, [inputs]);
@@ -41238,7 +41327,7 @@ var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41238
41327
  };
41239
41328
 
41240
41329
  // src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestFlowDetail.tsx
41241
- import React368, { useCallback as useCallback157, useEffect as useEffect153, useMemo as useMemo148, useState as useState216 } from "react";
41330
+ import React368, { useCallback as useCallback157, useEffect as useEffect153, useMemo as useMemo148, useState as useState217 } from "react";
41242
41331
  import { Checkbox as Checkbox15, Stack as Stack260, Switch as Switch17, Text as Text241 } from "@mantine/core";
41243
41332
  import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck31 } from "@tabler/icons-react";
41244
41333
  function parseBatches(resolved) {
@@ -41274,9 +41363,9 @@ var HarvestFlowDetail = ({
41274
41363
  const editorDocument = editor?.document || [];
41275
41364
  const resolveOpts = useMemo148(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
41276
41365
  const batches = useMemo148(() => parseBatches(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
41277
- const [harvestAll, setHarvestAll] = useState216(true);
41278
- const [selectedIds, setSelectedIds] = useState216(/* @__PURE__ */ new Set());
41279
- const [error, setError] = useState216(null);
41366
+ const [harvestAll, setHarvestAll] = useState217(true);
41367
+ const [selectedIds, setSelectedIds] = useState217(/* @__PURE__ */ new Set());
41368
+ const [error, setError] = useState217(null);
41280
41369
  const effectiveBatches = useMemo148(() => harvestAll ? batches : batches.filter((b) => selectedIds.has(b.id)), [harvestAll, batches, selectedIds]);
41281
41370
  const effectiveCount = effectiveBatches.length;
41282
41371
  const txHash = runtime.output?.transactionHash || "";
@@ -41353,7 +41442,7 @@ registerActionTypeUI("qi/carbon.harvest", {
41353
41442
  import { IconFlame as IconFlame3 } from "@tabler/icons-react";
41354
41443
 
41355
41444
  // src/mantine/blocks/action/actionTypes/carbon/retire/RetireConfig.tsx
41356
- import React369, { useCallback as useCallback158, useEffect as useEffect154, useState as useState217 } from "react";
41445
+ import React369, { useCallback as useCallback158, useEffect as useEffect154, useState as useState218 } from "react";
41357
41446
  import { Stack as Stack261, Text as Text242 } from "@mantine/core";
41358
41447
 
41359
41448
  // src/mantine/blocks/action/actionTypes/carbon/retire/types.ts
@@ -41371,7 +41460,7 @@ function serializeRetireConfigInputs(inputs) {
41371
41460
 
41372
41461
  // src/mantine/blocks/action/actionTypes/carbon/retire/RetireConfig.tsx
41373
41462
  var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41374
- const [local, setLocal] = useState217(() => parseRetireConfigInputs(inputs));
41463
+ const [local, setLocal] = useState218(() => parseRetireConfigInputs(inputs));
41375
41464
  useEffect154(() => {
41376
41465
  setLocal(parseRetireConfigInputs(inputs));
41377
41466
  }, [inputs]);
@@ -41398,7 +41487,7 @@ var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41398
41487
  };
41399
41488
 
41400
41489
  // src/mantine/blocks/action/actionTypes/carbon/retire/RetireFlowDetail.tsx
41401
- import React370, { useCallback as useCallback159, useEffect as useEffect155, useMemo as useMemo149, useState as useState218 } from "react";
41490
+ import React370, { useCallback as useCallback159, useEffect as useEffect155, useMemo as useMemo149, useState as useState219 } from "react";
41402
41491
  import { Group as Group138, NumberInput as NumberInput14, Stack as Stack262, Switch as Switch18, Text as Text243 } from "@mantine/core";
41403
41492
  import { IconAlertTriangle as IconAlertTriangle12, IconCheck as IconCheck32, IconAlertCircle as IconAlertCircle34 } from "@tabler/icons-react";
41404
41493
  function parseBatches2(resolved) {
@@ -41438,13 +41527,13 @@ var RetireFlowDetail = ({
41438
41527
  const editorDocument = editor?.document || [];
41439
41528
  const resolveOpts = useMemo149(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
41440
41529
  const batches = useMemo149(() => parseBatches2(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
41441
- const [retireAll, setRetireAll] = useState218(true);
41442
- const [amounts, setAmounts] = useState218({});
41443
- const [reason, setReason] = useState218(parsed.reason || "offset");
41444
- const [country, setCountry] = useState218("");
41445
- const [stateRegion, setStateRegion] = useState218("");
41446
- const [postal, setPostal] = useState218("");
41447
- const [error, setError] = useState218(null);
41530
+ const [retireAll, setRetireAll] = useState219(true);
41531
+ const [amounts, setAmounts] = useState219({});
41532
+ const [reason, setReason] = useState219(parsed.reason || "offset");
41533
+ const [country, setCountry] = useState219("");
41534
+ const [stateRegion, setStateRegion] = useState219("");
41535
+ const [postal, setPostal] = useState219("");
41536
+ const [error, setError] = useState219(null);
41448
41537
  const effectiveSelections = useMemo149(() => {
41449
41538
  if (retireAll) return batches.map((b) => ({ id: b.id, amount: Number(b.amount) || 0 })).filter((s) => s.amount > 0);
41450
41539
  return batches.map((b) => ({ id: b.id, amount: Number(amounts[b.id]) || 0 })).filter((s) => s.amount > 0);
@@ -41526,7 +41615,7 @@ registerActionTypeUI("qi/carbon.retire", {
41526
41615
  import { IconTransfer } from "@tabler/icons-react";
41527
41616
 
41528
41617
  // src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferConfig.tsx
41529
- import React371, { useCallback as useCallback160, useEffect as useEffect156, useState as useState219 } from "react";
41618
+ import React371, { useCallback as useCallback160, useEffect as useEffect156, useState as useState220 } from "react";
41530
41619
  import { Stack as Stack263, Text as Text244 } from "@mantine/core";
41531
41620
 
41532
41621
  // src/mantine/blocks/action/actionTypes/entityTransfer/types.ts
@@ -41549,7 +41638,7 @@ function serializeEntityTransferConfigInputs(inputs) {
41549
41638
 
41550
41639
  // src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferConfig.tsx
41551
41640
  var EntityTransferConfig = ({ inputs, onInputsChange }) => {
41552
- const [local, setLocal] = useState219(() => parseEntityTransferConfigInputs(inputs));
41641
+ const [local, setLocal] = useState220(() => parseEntityTransferConfigInputs(inputs));
41553
41642
  useEffect156(() => {
41554
41643
  setLocal(parseEntityTransferConfigInputs(inputs));
41555
41644
  }, [inputs]);
@@ -41597,7 +41686,7 @@ var EntityTransferConfig = ({ inputs, onInputsChange }) => {
41597
41686
  };
41598
41687
 
41599
41688
  // src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferFlowDetail.tsx
41600
- import React372, { useCallback as useCallback161, useEffect as useEffect157, useMemo as useMemo150, useState as useState220 } from "react";
41689
+ import React372, { useCallback as useCallback161, useEffect as useEffect157, useMemo as useMemo150, useState as useState221 } from "react";
41601
41690
  import { Button as Button86, Group as Group139, Loader as Loader81, Stack as Stack264, Text as Text245 } from "@mantine/core";
41602
41691
  import { IconAlertTriangle as IconAlertTriangle13, IconCheck as IconCheck33, IconAlertCircle as IconAlertCircle35 } from "@tabler/icons-react";
41603
41692
  var EntityTransferFlowDetail = ({
@@ -41628,8 +41717,8 @@ var EntityTransferFlowDetail = ({
41628
41717
  const templateRecipient = useMemo150(() => resolve(parsed.recipientDid), [resolve, parsed.recipientDid]);
41629
41718
  const resolvedOwnerDid = useMemo150(() => resolve(parsed.ownerDid) || currentUser?.did || "", [resolve, parsed.ownerDid, currentUser]);
41630
41719
  const resolvedOwnerAddress = useMemo150(() => resolve(parsed.ownerAddress) || currentUser?.address || "", [resolve, parsed.ownerAddress, currentUser]);
41631
- const [recipientInput, setRecipientInput] = useState220("");
41632
- const [error, setError] = useState220(null);
41720
+ const [recipientInput, setRecipientInput] = useState221("");
41721
+ const [error, setError] = useState221(null);
41633
41722
  const effectiveRecipient = (recipientInput.trim() || templateRecipient).trim();
41634
41723
  const inputsReady = !!(resolvedEntityDid && effectiveRecipient);
41635
41724
  const txHash = runtime.output?.transactionHash || "";
@@ -41710,7 +41799,7 @@ registerActionTypeUI("qi/entity.transfer", {
41710
41799
  import { IconId as IconId2 } from "@tabler/icons-react";
41711
41800
 
41712
41801
  // src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyConfig.tsx
41713
- import React373, { useCallback as useCallback162, useEffect as useEffect158, useState as useState221 } from "react";
41802
+ import React373, { useCallback as useCallback162, useEffect as useEffect158, useState as useState222 } from "react";
41714
41803
  import { Stack as Stack265, Text as Text246 } from "@mantine/core";
41715
41804
 
41716
41805
  // src/mantine/blocks/action/actionTypes/kycVerify/types.ts
@@ -41753,7 +41842,7 @@ function kycStepperIndex(status) {
41753
41842
 
41754
41843
  // src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyConfig.tsx
41755
41844
  var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41756
- const [local, setLocal] = useState221(() => parseKycVerifyInputs(inputs));
41845
+ const [local, setLocal] = useState222(() => parseKycVerifyInputs(inputs));
41757
41846
  useEffect158(() => {
41758
41847
  setLocal(parseKycVerifyInputs(inputs));
41759
41848
  }, [inputs]);
@@ -41790,7 +41879,7 @@ var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
41790
41879
  };
41791
41880
 
41792
41881
  // src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyFlowDetail.tsx
41793
- import React374, { useCallback as useCallback163, useEffect as useEffect159, useMemo as useMemo151, useRef as useRef51, useState as useState222 } from "react";
41882
+ import React374, { useCallback as useCallback163, useEffect as useEffect159, useMemo as useMemo151, useRef as useRef51, useState as useState223 } from "react";
41794
41883
  import { Button as Button87, Group as Group140, Loader as Loader82, Radio as Radio6, Stack as Stack266, Stepper, Text as Text247 } from "@mantine/core";
41795
41884
  import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck34, IconExternalLink as IconExternalLink3, IconId, IconRefresh as IconRefresh15 } from "@tabler/icons-react";
41796
41885
  import { SurveyModel as SurveyModel13 } from "@ixo/surveys";
@@ -41830,15 +41919,15 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
41830
41919
  const isStale = runtime.state === "completed" && !hasProof;
41831
41920
  const isFailed = runtime.state === "failed";
41832
41921
  const runtimeError = runtime.error?.message || null;
41833
- const [form, setForm] = useState222(null);
41834
- const [serverStatus, setServerStatus] = useState222(null);
41835
- const [loadingForm, setLoadingForm] = useState222(false);
41836
- const [loadError, setLoadError] = useState222(null);
41837
- const [loadRetryKey, setLoadRetryKey] = useState222(0);
41838
- const [busy, setBusy] = useState222(null);
41839
- const [actionError, setActionError] = useState222(null);
41840
- const [fallbackUrl, setFallbackUrl] = useState222(null);
41841
- const [selectedCredentialCid, setSelectedCredentialCid] = useState222(null);
41922
+ const [form, setForm] = useState223(null);
41923
+ const [serverStatus, setServerStatus] = useState223(null);
41924
+ const [loadingForm, setLoadingForm] = useState223(false);
41925
+ const [loadError, setLoadError] = useState223(null);
41926
+ const [loadRetryKey, setLoadRetryKey] = useState223(0);
41927
+ const [busy, setBusy] = useState223(null);
41928
+ const [actionError, setActionError] = useState223(null);
41929
+ const [fallbackUrl, setFallbackUrl] = useState223(null);
41930
+ const [selectedCredentialCid, setSelectedCredentialCid] = useState223(null);
41842
41931
  const surveyDataRef = useRef51(null);
41843
41932
  useEffect159(() => {
41844
41933
  if (!kycAvailable || !inputsReady || !protocolDid) return;
@@ -42240,7 +42329,7 @@ registerActionTypeUI("qi/wallet.generate", {
42240
42329
  import { IconCoin as IconCoin6 } from "@tabler/icons-react";
42241
42330
 
42242
42331
  // src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
42243
- import React377, { useCallback as useCallback165, useEffect as useEffect160, useState as useState223 } from "react";
42332
+ import React377, { useCallback as useCallback165, useEffect as useEffect160, useState as useState224 } from "react";
42244
42333
  import { Stack as Stack269, Text as Text250, NumberInput as NumberInput15 } from "@mantine/core";
42245
42334
 
42246
42335
  // src/mantine/blocks/action/actionTypes/walletFund/types.ts
@@ -42265,7 +42354,7 @@ function serializeWalletFundInputs(inputs) {
42265
42354
 
42266
42355
  // src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
42267
42356
  var WalletFundConfig = ({ inputs, onInputsChange }) => {
42268
- const [local, setLocal] = useState223(() => parseWalletFundInputs(inputs));
42357
+ const [local, setLocal] = useState224(() => parseWalletFundInputs(inputs));
42269
42358
  useEffect160(() => {
42270
42359
  setLocal(parseWalletFundInputs(inputs));
42271
42360
  }, [inputs]);
@@ -42426,7 +42515,7 @@ registerActionTypeUI("qi/wallet.generateAndFund", {
42426
42515
  import { IconFingerprint } from "@tabler/icons-react";
42427
42516
 
42428
42517
  // src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
42429
- import React381, { useCallback as useCallback168, useEffect as useEffect162, useState as useState224 } from "react";
42518
+ import React381, { useCallback as useCallback168, useEffect as useEffect162, useState as useState225 } from "react";
42430
42519
  import { Stack as Stack273, Text as Text254 } from "@mantine/core";
42431
42520
 
42432
42521
  // src/mantine/blocks/action/actionTypes/iidCreate/types.ts
@@ -42454,7 +42543,7 @@ function serializeIidCreateInputs(inputs) {
42454
42543
 
42455
42544
  // src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
42456
42545
  var IidCreateConfig = ({ inputs, onInputsChange }) => {
42457
- const [local, setLocal] = useState224(() => parseIidCreateInputs(inputs));
42546
+ const [local, setLocal] = useState225(() => parseIidCreateInputs(inputs));
42458
42547
  useEffect162(() => {
42459
42548
  setLocal(parseIidCreateInputs(inputs));
42460
42549
  }, [inputs]);
@@ -42616,7 +42705,7 @@ registerActionTypeUI("qi/iid.create", {
42616
42705
  import { IconUserPlus as IconUserPlus4 } from "@tabler/icons-react";
42617
42706
 
42618
42707
  // src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
42619
- import React383, { useCallback as useCallback170, useEffect as useEffect163, useState as useState225 } from "react";
42708
+ import React383, { useCallback as useCallback170, useEffect as useEffect163, useState as useState226 } from "react";
42620
42709
  import { Stack as Stack275, Text as Text256 } from "@mantine/core";
42621
42710
 
42622
42711
  // src/mantine/blocks/action/actionTypes/matrixRegister/types.ts
@@ -42648,7 +42737,7 @@ function serializeMatrixRegisterInputs(inputs) {
42648
42737
 
42649
42738
  // src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
42650
42739
  var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
42651
- const [local, setLocal] = useState225(() => parseMatrixRegisterInputs(inputs));
42740
+ const [local, setLocal] = useState226(() => parseMatrixRegisterInputs(inputs));
42652
42741
  useEffect163(() => {
42653
42742
  setLocal(parseMatrixRegisterInputs(inputs));
42654
42743
  }, [inputs]);
@@ -42767,7 +42856,7 @@ registerActionTypeUI("qi/matrix.register", {
42767
42856
  import { IconId as IconId3 } from "@tabler/icons-react";
42768
42857
 
42769
42858
  // src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
42770
- import React385, { useCallback as useCallback172, useEffect as useEffect164, useState as useState226 } from "react";
42859
+ import React385, { useCallback as useCallback172, useEffect as useEffect164, useState as useState227 } from "react";
42771
42860
  import { Stack as Stack277, Text as Text258 } from "@mantine/core";
42772
42861
 
42773
42862
  // src/mantine/blocks/action/actionTypes/identityCreate/types.ts
@@ -42798,7 +42887,7 @@ function serializeIdentityCreateInputs(inputs) {
42798
42887
 
42799
42888
  // src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
42800
42889
  var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
42801
- const [local, setLocal] = useState226(() => parseIdentityCreateInputs(inputs));
42890
+ const [local, setLocal] = useState227(() => parseIdentityCreateInputs(inputs));
42802
42891
  useEffect164(() => {
42803
42892
  setLocal(parseIdentityCreateInputs(inputs));
42804
42893
  }, [inputs]);
@@ -42916,7 +43005,7 @@ registerActionTypeUI("qi/identity.create", {
42916
43005
  import { IconRobot as IconRobot4 } from "@tabler/icons-react";
42917
43006
 
42918
43007
  // src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
42919
- import React387, { useCallback as useCallback173, useEffect as useEffect165, useState as useState227 } from "react";
43008
+ import React387, { useCallback as useCallback173, useEffect as useEffect165, useState as useState228 } from "react";
42920
43009
  import { Divider as Divider35, Stack as Stack279, Text as Text260 } from "@mantine/core";
42921
43010
 
42922
43011
  // src/mantine/blocks/action/actionTypes/entityCreateOracle/types.ts
@@ -42980,7 +43069,7 @@ function serializeEntityCreateOracleInputs(inputs) {
42980
43069
 
42981
43070
  // src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
42982
43071
  var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
42983
- const [local, setLocal] = useState227(() => parseEntityCreateOracleInputs(inputs));
43072
+ const [local, setLocal] = useState228(() => parseEntityCreateOracleInputs(inputs));
42984
43073
  useEffect165(() => {
42985
43074
  setLocal(parseEntityCreateOracleInputs(inputs));
42986
43075
  }, [inputs]);
@@ -43221,7 +43310,7 @@ registerActionTypeUI("qi/entity.createOracle", {
43221
43310
  import { IconBox } from "@tabler/icons-react";
43222
43311
 
43223
43312
  // src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
43224
- import React389, { useCallback as useCallback175, useEffect as useEffect166, useState as useState228 } from "react";
43313
+ import React389, { useCallback as useCallback175, useEffect as useEffect166, useState as useState229 } from "react";
43225
43314
  import { Stack as Stack281, Text as Text262 } from "@mantine/core";
43226
43315
 
43227
43316
  // src/mantine/blocks/action/actionTypes/sandboxProvision/types.ts
@@ -43245,7 +43334,7 @@ function serializeSandboxProvisionInputs(inputs) {
43245
43334
 
43246
43335
  // src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
43247
43336
  var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
43248
- const [local, setLocal] = useState228(() => parseSandboxProvisionInputs(inputs));
43337
+ const [local, setLocal] = useState229(() => parseSandboxProvisionInputs(inputs));
43249
43338
  useEffect166(() => {
43250
43339
  setLocal(parseSandboxProvisionInputs(inputs));
43251
43340
  }, [inputs]);
@@ -43341,7 +43430,7 @@ registerActionTypeUI("qi/sandbox.provision", {
43341
43430
  import { IconLicense } from "@tabler/icons-react";
43342
43431
 
43343
43432
  // src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
43344
- import React391, { useCallback as useCallback177, useEffect as useEffect167, useState as useState229 } from "react";
43433
+ import React391, { useCallback as useCallback177, useEffect as useEffect167, useState as useState230 } from "react";
43345
43434
  import { Stack as Stack283, Text as Text264 } from "@mantine/core";
43346
43435
 
43347
43436
  // src/mantine/blocks/action/actionTypes/oracleContract/types.ts
@@ -43363,7 +43452,7 @@ function serializeOracleContractInputs(inputs) {
43363
43452
 
43364
43453
  // src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
43365
43454
  var OracleContractConfig = ({ inputs, onInputsChange }) => {
43366
- const [local, setLocal] = useState229(() => parseOracleContractInputs(inputs));
43455
+ const [local, setLocal] = useState230(() => parseOracleContractInputs(inputs));
43367
43456
  useEffect167(() => {
43368
43457
  setLocal(parseOracleContractInputs(inputs));
43369
43458
  }, [inputs]);
@@ -43450,7 +43539,7 @@ registerActionTypeUI("qi/oracle.contract", {
43450
43539
  import { IconKey as IconKey4 } from "@tabler/icons-react";
43451
43540
 
43452
43541
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
43453
- import React393, { useCallback as useCallback179, useEffect as useEffect168, useState as useState230 } from "react";
43542
+ import React393, { useCallback as useCallback179, useEffect as useEffect168, useState as useState231 } from "react";
43454
43543
  import { Divider as Divider36, Stack as Stack285, Text as Text266 } from "@mantine/core";
43455
43544
 
43456
43545
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/types.ts
@@ -43498,7 +43587,7 @@ function serializeOracleStoreSecretsInputs(inputs) {
43498
43587
 
43499
43588
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
43500
43589
  var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
43501
- const [local, setLocal] = useState230(() => parseOracleStoreSecretsInputs(inputs));
43590
+ const [local, setLocal] = useState231(() => parseOracleStoreSecretsInputs(inputs));
43502
43591
  useEffect168(() => {
43503
43592
  setLocal(parseOracleStoreSecretsInputs(inputs));
43504
43593
  }, [inputs]);
@@ -43634,15 +43723,15 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
43634
43723
  };
43635
43724
 
43636
43725
  // src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
43637
- import React394, { useCallback as useCallback180, useEffect as useEffect170, useMemo as useMemo158, useRef as useRef53, useState as useState232 } from "react";
43726
+ import React394, { useCallback as useCallback180, useEffect as useEffect170, useMemo as useMemo158, useRef as useRef53, useState as useState233 } from "react";
43638
43727
  import { Button as Button96, Collapse as Collapse12, Divider as Divider37, Group as Group150, Loader as Loader92, Stack as Stack286, Text as Text267 } from "@mantine/core";
43639
43728
  import { IconAlertCircle as IconAlertCircle46, IconCheck as IconCheck44, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp5, IconLock } from "@tabler/icons-react";
43640
43729
 
43641
43730
  // src/mantine/blocks/action/hooks/useIdempotencyCheck.ts
43642
- import { useEffect as useEffect169, useRef as useRef52, useState as useState231 } from "react";
43731
+ import { useEffect as useEffect169, useRef as useRef52, useState as useState232 } from "react";
43643
43732
  function useIdempotencyCheck({ enabled, check, markCompleted, logTag }) {
43644
43733
  const firedRef = useRef52(false);
43645
- const [isChecking, setIsChecking] = useState231(false);
43734
+ const [isChecking, setIsChecking] = useState232(false);
43646
43735
  useEffect169(() => {
43647
43736
  if (firedRef.current) return;
43648
43737
  if (!enabled) return;
@@ -43720,12 +43809,12 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
43720
43809
  logTag: "oracle.storeSecrets",
43721
43810
  failureMessage: "Failed to store secrets"
43722
43811
  });
43723
- const [openRouterDraft, setOpenRouterDraft] = useState232("");
43724
- const [isEditingOpenRouter, setIsEditingOpenRouter] = useState232(!hasOpenRouter);
43725
- const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState232(false);
43726
- const [showAdditional, setShowAdditional] = useState232(false);
43727
- const [networkConstants, setNetworkConstants] = useState232(null);
43728
- const [isLoadingConstants, setIsLoadingConstants] = useState232(false);
43812
+ const [openRouterDraft, setOpenRouterDraft] = useState233("");
43813
+ const [isEditingOpenRouter, setIsEditingOpenRouter] = useState233(!hasOpenRouter);
43814
+ const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState233(false);
43815
+ const [showAdditional, setShowAdditional] = useState233(false);
43816
+ const [networkConstants, setNetworkConstants] = useState233(null);
43817
+ const [isLoadingConstants, setIsLoadingConstants] = useState233(false);
43729
43818
  const constantsFetchRef = useRef53(false);
43730
43819
  const handleSaveOpenRouter = useCallback180(async () => {
43731
43820
  if (!openRouterDraft) return;
@@ -43832,7 +43921,7 @@ registerActionTypeUI("qi/oracle.storeSecrets", {
43832
43921
  import { IconSettings as IconSettings20 } from "@tabler/icons-react";
43833
43922
 
43834
43923
  // src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
43835
- import React395, { useCallback as useCallback181, useEffect as useEffect171, useState as useState233 } from "react";
43924
+ import React395, { useCallback as useCallback181, useEffect as useEffect171, useState as useState234 } from "react";
43836
43925
  import { Divider as Divider38, Stack as Stack287, Text as Text268 } from "@mantine/core";
43837
43926
 
43838
43927
  // src/mantine/blocks/action/actionTypes/oracleStoreConfig/types.ts
@@ -43902,7 +43991,7 @@ function serializeOracleStoreConfigInputs(inputs) {
43902
43991
 
43903
43992
  // src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
43904
43993
  var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
43905
- const [local, setLocal] = useState233(() => parseOracleStoreConfigInputs(inputs));
43994
+ const [local, setLocal] = useState234(() => parseOracleStoreConfigInputs(inputs));
43906
43995
  useEffect171(() => {
43907
43996
  setLocal(parseOracleStoreConfigInputs(inputs));
43908
43997
  }, [inputs]);
@@ -44106,7 +44195,7 @@ registerActionTypeUI("qi/oracle.storeConfig", {
44106
44195
  import { IconLock as IconLock3 } from "@tabler/icons-react";
44107
44196
 
44108
44197
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
44109
- import React397, { useCallback as useCallback183, useEffect as useEffect172, useState as useState234 } from "react";
44198
+ import React397, { useCallback as useCallback183, useEffect as useEffect172, useState as useState235 } from "react";
44110
44199
  import { Divider as Divider39, Stack as Stack289, Text as Text270 } from "@mantine/core";
44111
44200
 
44112
44201
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/types.ts
@@ -44181,7 +44270,7 @@ function serializeOracleStoreSecretsAndConfigInputs(inputs) {
44181
44270
 
44182
44271
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
44183
44272
  var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
44184
- const [local, setLocal] = useState234(() => parseOracleStoreSecretsAndConfigInputs(inputs));
44273
+ const [local, setLocal] = useState235(() => parseOracleStoreSecretsAndConfigInputs(inputs));
44185
44274
  useEffect172(() => {
44186
44275
  setLocal(parseOracleStoreSecretsAndConfigInputs(inputs));
44187
44276
  }, [inputs]);
@@ -44365,7 +44454,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
44365
44454
  };
44366
44455
 
44367
44456
  // src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
44368
- import React398, { useCallback as useCallback184, useEffect as useEffect173, useMemo as useMemo160, useRef as useRef54, useState as useState235 } from "react";
44457
+ import React398, { useCallback as useCallback184, useEffect as useEffect173, useMemo as useMemo160, useRef as useRef54, useState as useState236 } from "react";
44369
44458
  import { Button as Button98, Collapse as Collapse13, Divider as Divider40, Group as Group152, Loader as Loader94, Stack as Stack290, Text as Text271 } from "@mantine/core";
44370
44459
  import { IconAlertCircle as IconAlertCircle48, IconCheck as IconCheck46, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
44371
44460
  var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
@@ -44449,12 +44538,12 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
44449
44538
  logTag: "oracle.storeSecretsAndConfig",
44450
44539
  failureMessage: "Failed to store secrets and config"
44451
44540
  });
44452
- const [openRouterDraft, setOpenRouterDraft] = useState235("");
44453
- const [isEditingOpenRouter, setIsEditingOpenRouter] = useState235(!hasOpenRouter);
44454
- const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState235(false);
44455
- const [showAdditional, setShowAdditional] = useState235(false);
44456
- const [networkConstants, setNetworkConstants] = useState235(null);
44457
- const [isLoadingConstants, setIsLoadingConstants] = useState235(false);
44541
+ const [openRouterDraft, setOpenRouterDraft] = useState236("");
44542
+ const [isEditingOpenRouter, setIsEditingOpenRouter] = useState236(!hasOpenRouter);
44543
+ const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState236(false);
44544
+ const [showAdditional, setShowAdditional] = useState236(false);
44545
+ const [networkConstants, setNetworkConstants] = useState236(null);
44546
+ const [isLoadingConstants, setIsLoadingConstants] = useState236(false);
44458
44547
  const constantsFetchRef = useRef54(false);
44459
44548
  const handleSaveOpenRouter = useCallback184(async () => {
44460
44549
  if (!openRouterDraft) return;
@@ -44551,7 +44640,7 @@ registerActionTypeUI("qi/oracle.storeSecretsAndConfig", {
44551
44640
  import { IconAdjustments as IconAdjustments2 } from "@tabler/icons-react";
44552
44641
 
44553
44642
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
44554
- import React399, { useCallback as useCallback185, useEffect as useEffect174, useState as useState236 } from "react";
44643
+ import React399, { useCallback as useCallback185, useEffect as useEffect174, useState as useState237 } from "react";
44555
44644
  import { Divider as Divider41, Stack as Stack291, Text as Text272 } from "@mantine/core";
44556
44645
 
44557
44646
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/types.ts
@@ -44627,7 +44716,7 @@ function serializeOracleConfigureOracleInputs(inputs) {
44627
44716
 
44628
44717
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
44629
44718
  var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
44630
- const [local, setLocal] = useState236(() => parseOracleConfigureOracleInputs(inputs));
44719
+ const [local, setLocal] = useState237(() => parseOracleConfigureOracleInputs(inputs));
44631
44720
  useEffect174(() => {
44632
44721
  setLocal(parseOracleConfigureOracleInputs(inputs));
44633
44722
  }, [inputs]);
@@ -44811,7 +44900,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
44811
44900
  };
44812
44901
 
44813
44902
  // src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
44814
- import React400, { useCallback as useCallback186, useEffect as useEffect175, useMemo as useMemo161, useRef as useRef55, useState as useState237 } from "react";
44903
+ import React400, { useCallback as useCallback186, useEffect as useEffect175, useMemo as useMemo161, useRef as useRef55, useState as useState238 } from "react";
44815
44904
  import { Button as Button99, Collapse as Collapse14, Divider as Divider42, Group as Group153, Loader as Loader95, Stack as Stack292, Text as Text273 } from "@mantine/core";
44816
44905
  import { IconAlertCircle as IconAlertCircle49, IconCheck as IconCheck47, IconChevronDown as IconChevronDown14, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
44817
44906
  var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
@@ -44930,12 +45019,12 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
44930
45019
  logTag: "oracle.configureOracle",
44931
45020
  failureMessage: "Failed to configure oracle"
44932
45021
  });
44933
- const [openRouterDraft, setOpenRouterDraft] = useState237("");
44934
- const [isEditingOpenRouter, setIsEditingOpenRouter] = useState237(!hasOpenRouter);
44935
- const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState237(false);
44936
- const [showAdditional, setShowAdditional] = useState237(false);
44937
- const [networkConstants, setNetworkConstants] = useState237(null);
44938
- const [isLoadingConstants, setIsLoadingConstants] = useState237(false);
45022
+ const [openRouterDraft, setOpenRouterDraft] = useState238("");
45023
+ const [isEditingOpenRouter, setIsEditingOpenRouter] = useState238(!hasOpenRouter);
45024
+ const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState238(false);
45025
+ const [showAdditional, setShowAdditional] = useState238(false);
45026
+ const [networkConstants, setNetworkConstants] = useState238(null);
45027
+ const [isLoadingConstants, setIsLoadingConstants] = useState238(false);
44939
45028
  const constantsFetchRef = useRef55(false);
44940
45029
  const handleSaveOpenRouter = useCallback186(async () => {
44941
45030
  if (!openRouterDraft) return;
@@ -45608,13 +45697,13 @@ import React411, { useCallback as useCallback191 } from "react";
45608
45697
  import { IconSettings as IconSettings21 } from "@tabler/icons-react";
45609
45698
 
45610
45699
  // src/mantine/blocks/location/template/GeneralTab.tsx
45611
- import React410, { useEffect as useEffect177, useRef as useRef56, useState as useState240 } from "react";
45700
+ import React410, { useEffect as useEffect177, useRef as useRef56, useState as useState241 } from "react";
45612
45701
  import { Box as Box70, Divider as Divider43, Stack as Stack299, Text as Text280 } from "@mantine/core";
45613
45702
 
45614
45703
  // src/core/hooks/useUnlMap.ts
45615
- import { useEffect as useEffect176, useState as useState238 } from "react";
45704
+ import { useEffect as useEffect176, useState as useState239 } from "react";
45616
45705
  function useUnlMap() {
45617
- const [status, setStatus] = useState238("loading");
45706
+ const [status, setStatus] = useState239("loading");
45618
45707
  useEffect176(() => {
45619
45708
  if (typeof window === "undefined") {
45620
45709
  return;
@@ -45670,7 +45759,7 @@ function useUnlMap() {
45670
45759
  }
45671
45760
 
45672
45761
  // src/mantine/blocks/location/components/TileSelector.tsx
45673
- import React409, { useState as useState239, useCallback as useCallback190 } from "react";
45762
+ import React409, { useState as useState240, useCallback as useCallback190 } from "react";
45674
45763
  import { ActionIcon as ActionIcon52, Group as Group157, Tooltip as Tooltip35 } from "@mantine/core";
45675
45764
  import { IconMap, IconMoon, IconSatellite, IconMountain } from "@tabler/icons-react";
45676
45765
  var TILE_LAYERS = {
@@ -45723,7 +45812,7 @@ function ensureLayer(map, config) {
45723
45812
  );
45724
45813
  }
45725
45814
  var TileSelector = ({ mapRef }) => {
45726
- const [active, setActive] = useState239("map");
45815
+ const [active, setActive] = useState240("map");
45727
45816
  const switchTo = useCallback190(
45728
45817
  (type) => {
45729
45818
  const map = mapRef.current;
@@ -45780,9 +45869,9 @@ var DEFAULT_CENTER = [0, 20];
45780
45869
  var DEFAULT_ZOOM = 2;
45781
45870
  var PLACED_ZOOM = 14;
45782
45871
  var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, onDescriptionChange, onCoordinatesChange }) => {
45783
- const [localTitle, setLocalTitle] = useState240(title);
45784
- const [localDescription, setLocalDescription] = useState240(description);
45785
- const [mapError, setMapError] = useState240(null);
45872
+ const [localTitle, setLocalTitle] = useState241(title);
45873
+ const [localDescription, setLocalDescription] = useState241(description);
45874
+ const [mapError, setMapError] = useState241(null);
45786
45875
  const { status, UnlSdk } = useUnlMap();
45787
45876
  const { mapConfig } = useBlocknoteContext();
45788
45877
  const markerRef = useRef56(null);
@@ -45921,10 +46010,10 @@ var TemplateConfig17 = ({ editor, block }) => {
45921
46010
  };
45922
46011
 
45923
46012
  // src/mantine/blocks/location/components/LocationMap.tsx
45924
- import React412, { useEffect as useEffect178, useRef as useRef57, useState as useState241 } from "react";
46013
+ import React412, { useEffect as useEffect178, useRef as useRef57, useState as useState242 } from "react";
45925
46014
  import { Box as Box71, Flex as Flex39, Loader as Loader99, Text as Text281 } from "@mantine/core";
45926
46015
  var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker = true, showTilesControl = false }) => {
45927
- const [mapError, setMapError] = useState241(null);
46016
+ const [mapError, setMapError] = useState242(null);
45928
46017
  const { mapConfig } = useBlocknoteContext();
45929
46018
  const wrapperRef = useRef57(null);
45930
46019
  const containerRef = useRef57(null);
@@ -46102,7 +46191,7 @@ import React419, { useCallback as useCallback192 } from "react";
46102
46191
  import { IconSettings as IconSettings22 } from "@tabler/icons-react";
46103
46192
 
46104
46193
  // src/mantine/blocks/embed/template/GeneralTab.tsx
46105
- import React418, { useEffect as useEffect179, useState as useState242 } from "react";
46194
+ import React418, { useEffect as useEffect179, useState as useState243 } from "react";
46106
46195
  import { Stack as Stack302, Switch as Switch19, Text as Text284 } from "@mantine/core";
46107
46196
  var GeneralTab18 = ({
46108
46197
  url,
@@ -46118,8 +46207,8 @@ var GeneralTab18 = ({
46118
46207
  onHeightChange,
46119
46208
  onAllowAuthChange
46120
46209
  }) => {
46121
- const [localUrl, setLocalUrl] = useState242(url);
46122
- const [localHeight, setLocalHeight] = useState242(height);
46210
+ const [localUrl, setLocalUrl] = useState243(url);
46211
+ const [localHeight, setLocalHeight] = useState243(height);
46123
46212
  const iconOptions = Object.keys(ICON_MAP).map((key) => ({
46124
46213
  value: key,
46125
46214
  label: key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")
@@ -46346,7 +46435,7 @@ import React426 from "react";
46346
46435
  import { createReactBlockSpec as createReactBlockSpec23 } from "@blocknote/react";
46347
46436
 
46348
46437
  // src/mantine/blocks/secrets/SecretsBlock.tsx
46349
- import React425, { useCallback as useCallback194, useMemo as useMemo169, useState as useState243 } from "react";
46438
+ import React425, { useCallback as useCallback194, useMemo as useMemo169, useState as useState244 } from "react";
46350
46439
  import { Anchor as Anchor6, ActionIcon as ActionIcon53, Button as Button103, Collapse as Collapse15, CopyButton as CopyButton3, Group as Group162, Paper as Paper25, Stack as Stack305, Text as Text287, Tooltip as Tooltip36 } from "@mantine/core";
46351
46440
  import { IconCheck as IconCheck51, IconCopy as IconCopy3, IconDownload as IconDownload6, IconEye, IconEyeOff, IconKey as IconKey5 } from "@tabler/icons-react";
46352
46441
  var SENSITIVE_KEYS = /* @__PURE__ */ new Set(["mnemonic", "matrixPassword", "matrixRecoveryPhrase", "matrixAccessToken", "pin", "openRouterApiKeyJwe", "authToken"]);
@@ -46445,7 +46534,7 @@ function flattenForDownload(outputs) {
46445
46534
  return result;
46446
46535
  }
46447
46536
  function MaskedValue({ value, isSensitive }) {
46448
- const [visible, setVisible] = useState243(false);
46537
+ const [visible, setVisible] = useState244(false);
46449
46538
  if (!isSensitive) {
46450
46539
  return /* @__PURE__ */ React425.createElement(Text287, { size: "xs", ff: "monospace", style: { wordBreak: "break-all" } }, String(value));
46451
46540
  }
@@ -46458,7 +46547,7 @@ function OutputEntry({ label, value, isSensitive }) {
46458
46547
  }
46459
46548
  function SecretsBlock({ editor, block }) {
46460
46549
  const { docType } = useBlocknoteContext();
46461
- const [showOutput, setShowOutput] = useState243(false);
46550
+ const [showOutput, setShowOutput] = useState244(false);
46462
46551
  const outputs = useMemo169(() => collectOutputs(editor), [editor, showOutput]);
46463
46552
  const editorDocument = editor?.document || [];
46464
46553
  const resolveOpts = useMemo169(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
@@ -46548,7 +46637,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
46548
46637
  // src/mantine/blocks/skills/flow/SkillsFlowView.tsx
46549
46638
  import { ActionIcon as ActionIcon54, Badge as Badge62, Button as Button104, Collapse as Collapse16, Group as Group164, Loader as Loader100, Paper as Paper26, Stack as Stack307, Text as Text289, Tooltip as Tooltip37 } from "@mantine/core";
46550
46639
  import { IconBrain as IconBrain3, IconCheck as IconCheck52, IconPencil as IconPencil3, IconPlus as IconPlus11, IconTrash as IconTrash13, IconX as IconX21 } from "@tabler/icons-react";
46551
- import React430, { useCallback as useCallback195, useEffect as useEffect180, useMemo as useMemo171, useRef as useRef58, useState as useState244 } from "react";
46640
+ import React430, { useCallback as useCallback195, useEffect as useEffect180, useMemo as useMemo171, useRef as useRef58, useState as useState245 } from "react";
46552
46641
  function parseSkills2(raw) {
46553
46642
  try {
46554
46643
  const parsed = JSON.parse(raw || "[]");
@@ -46571,15 +46660,15 @@ var SkillsFlowView = ({ editor, block }) => {
46571
46660
  const isCompleted = runtime.state === "completed" && runtime.evaluationStatus === "approved";
46572
46661
  const skills = useMemo171(() => parseSkills2(block.props.skills), [block.props.skills]);
46573
46662
  const mcpServers = useMemo171(() => parseMcpServers(block.props.mcpServers), [block.props.mcpServers]);
46574
- const [showAddMcp, setShowAddMcp] = useState244(false);
46575
- const [mcpName, setMcpName] = useState244("");
46576
- const [mcpUrl, setMcpUrl] = useState244("");
46577
- const [mcpDescription, setMcpDescription] = useState244("");
46578
- const [editingMcpIndex, setEditingMcpIndex] = useState244(null);
46579
- const [validationResults, setValidationResults] = useState244({});
46580
- const [validatingUrls, setValidatingUrls] = useState244({});
46581
- const [capsules, setCapsules] = useState244([]);
46582
- const [loadingCapsules, setLoadingCapsules] = useState244(false);
46663
+ const [showAddMcp, setShowAddMcp] = useState245(false);
46664
+ const [mcpName, setMcpName] = useState245("");
46665
+ const [mcpUrl, setMcpUrl] = useState245("");
46666
+ const [mcpDescription, setMcpDescription] = useState245("");
46667
+ const [editingMcpIndex, setEditingMcpIndex] = useState245(null);
46668
+ const [validationResults, setValidationResults] = useState245({});
46669
+ const [validatingUrls, setValidatingUrls] = useState245({});
46670
+ const [capsules, setCapsules] = useState245([]);
46671
+ const [loadingCapsules, setLoadingCapsules] = useState245(false);
46583
46672
  const capsulesFetchedRef = useRef58(false);
46584
46673
  useEffect180(() => {
46585
46674
  if (capsulesFetchedRef.current || !handlers.getSkills) return;
@@ -46587,7 +46676,7 @@ var SkillsFlowView = ({ editor, block }) => {
46587
46676
  setLoadingCapsules(true);
46588
46677
  handlers.getSkills().then((r) => setCapsules(r.capsules || [])).catch((err) => console.error("[skills] Failed to fetch capsules:", err)).finally(() => setLoadingCapsules(false));
46589
46678
  }, [handlers.getSkills]);
46590
- const [network, setNetwork] = useState244("");
46679
+ const [network, setNetwork] = useState245("");
46591
46680
  const networkFetchedRef = useRef58(false);
46592
46681
  useEffect180(() => {
46593
46682
  if (networkFetchedRef.current || !handlers.getNetwork) return;
@@ -46700,8 +46789,8 @@ var SkillsFlowView = ({ editor, block }) => {
46700
46789
  const cur = getCurrentBlock();
46701
46790
  editor.updateBlock(cur, { props: { ...cur.props, status: "pending" } });
46702
46791
  }, [updateRuntime, getCurrentBlock, editor]);
46703
- const [savingMcp, setSavingMcp] = useState244(false);
46704
- const [mcpSaveError, setMcpSaveError] = useState244(null);
46792
+ const [savingMcp, setSavingMcp] = useState245(false);
46793
+ const [mcpSaveError, setMcpSaveError] = useState245(null);
46705
46794
  const handleSaveMcp = useCallback195(async () => {
46706
46795
  const url = mcpUrl.trim();
46707
46796
  if (!mcpName.trim() || !url) return;
@@ -47125,7 +47214,7 @@ blockRegistry.register({
47125
47214
  });
47126
47215
 
47127
47216
  // src/mantine/blocks/hooks/useBlockDependencies.ts
47128
- import { useMemo as useMemo172, useEffect as useEffect181, useState as useState245, useCallback as useCallback196 } from "react";
47217
+ import { useMemo as useMemo172, useEffect as useEffect181, useState as useState246, useCallback as useCallback196 } from "react";
47129
47218
 
47130
47219
  // src/mantine/blocks/hooks/useDependsOn.ts
47131
47220
  import { useMemo as useMemo173 } from "react";
@@ -47633,13 +47722,13 @@ var getExtraSlashMenuItems = (editor, translate) => {
47633
47722
  };
47634
47723
 
47635
47724
  // src/mantine/inline/FlowStepRefSpec.tsx
47636
- import React433, { useEffect as useEffect182, useState as useState246 } from "react";
47725
+ import React433, { useEffect as useEffect182, useState as useState247 } from "react";
47637
47726
  import { createReactInlineContentSpec } from "@blocknote/react";
47638
47727
  import { IconBolt as IconBolt14, IconCheck as IconCheck53 } from "@tabler/icons-react";
47639
47728
  function useStepRefState(nodeId, fallbackLabel) {
47640
47729
  const { editor } = useBlocknoteContext();
47641
47730
  const initial = fallbackLabel || nodeId || "Step";
47642
- const [state, setState] = useState246({ text: initial, missing: false, completed: false });
47731
+ const [state, setState] = useState247({ text: initial, missing: false, completed: false });
47643
47732
  useEffect182(() => {
47644
47733
  const ed = editor;
47645
47734
  if (!ed) return;
@@ -47909,11 +47998,11 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
47909
47998
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2 } from "@blocknote/core";
47910
47999
 
47911
48000
  // src/core/hooks/useMatrixProvider.ts
47912
- import { useEffect as useEffect183, useState as useState247, useRef as useRef59, useCallback as useCallback197, useMemo as useMemo174 } from "react";
48001
+ import { useEffect as useEffect183, useState as useState248, useRef as useRef59, useCallback as useCallback197, useMemo as useMemo174 } from "react";
47913
48002
  import { MatrixProvider } from "@ixo/matrix-crdt";
47914
48003
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
47915
- const [matrixProvider, setProvider] = useState247(null);
47916
- const [status, setStatus] = useState247("disconnected");
48004
+ const [matrixProvider, setProvider] = useState248(null);
48005
+ const [status, setStatus] = useState248("disconnected");
47917
48006
  const isMountedRef = useRef59(true);
47918
48007
  const providerRef = useRef59(null);
47919
48008
  const retryTimeoutRef = useRef59(null);
@@ -48014,7 +48103,7 @@ function useCollaborativeYDoc(_options) {
48014
48103
  }
48015
48104
 
48016
48105
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
48017
- import { useMemo as useMemo176, useEffect as useEffect185, useState as useState248, useRef as useRef61 } from "react";
48106
+ import { useMemo as useMemo176, useEffect as useEffect185, useState as useState249, useRef as useRef61 } from "react";
48018
48107
 
48019
48108
  // src/core/lib/matrixMetadata.ts
48020
48109
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -48681,7 +48770,7 @@ function useCreateCollaborativeIxoEditor(options) {
48681
48770
  }),
48682
48771
  [theme, editable, sideMenu, slashMenu, formattingToolbar, linkToolbar, filePanel, tableHandles]
48683
48772
  );
48684
- const [providerReady, setProviderReady] = useState248(false);
48773
+ const [providerReady, setProviderReady] = useState249(false);
48685
48774
  useEffect185(() => {
48686
48775
  if (matrixProvider && !providerReady) setProviderReady(true);
48687
48776
  }, [matrixProvider, providerReady]);
@@ -48926,7 +49015,7 @@ function useCreateCollaborativeIxoEditor(options) {
48926
49015
  titleText.insert(0, options.title);
48927
49016
  }
48928
49017
  }, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, options.sourceTemplateId, memoizedUser.id]);
48929
- const [connectedUsers, setConnectedUsers] = useState248([]);
49018
+ const [connectedUsers, setConnectedUsers] = useState249([]);
48930
49019
  const activeBlockIdRef = useRef61(null);
48931
49020
  const awarenessInstance = matrixProvider?.awarenessInstance ?? null;
48932
49021
  useEffect185(() => {
@@ -48998,18 +49087,18 @@ function useCreateCollaborativeIxoEditor(options) {
48998
49087
  }
48999
49088
 
49000
49089
  // src/mantine/components/Base/BaseIconPicker.tsx
49001
- import React435, { useState as useState250, useMemo as useMemo177, useEffect as useEffect186 } from "react";
49002
- import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack308, UnstyledButton as UnstyledButton7, Text as Text291, Center as Center15, ScrollArea as ScrollArea10, Group as Group166, Popover as Popover5 } from "@mantine/core";
49090
+ import React435, { useState as useState251, useMemo as useMemo177, useEffect as useEffect186 } from "react";
49091
+ import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack308, UnstyledButton as UnstyledButton8, Text as Text291, Center as Center15, ScrollArea as ScrollArea10, Group as Group166, Popover as Popover5 } from "@mantine/core";
49003
49092
  import * as TablerIcons2 from "@tabler/icons-react";
49004
49093
  import { IconSearch as IconSearch11, IconX as IconX22, IconChevronLeft, IconChevronRight as IconChevronRight14 } from "@tabler/icons-react";
49005
49094
 
49006
49095
  // src/mantine/components/Base/CoverImageButton.tsx
49007
- import React434, { forwardRef, useState as useState249 } from "react";
49008
- import { UnstyledButton as UnstyledButton6, Group as Group165, Text as Text290 } from "@mantine/core";
49096
+ import React434, { forwardRef, useState as useState250 } from "react";
49097
+ import { UnstyledButton as UnstyledButton7, Group as Group165, Text as Text290 } from "@mantine/core";
49009
49098
  var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false, onClick, icon: icon2, children, style }, ref) {
49010
- const [hovered, setHovered] = useState249(false);
49099
+ const [hovered, setHovered] = useState250(false);
49011
49100
  return /* @__PURE__ */ React434.createElement(
49012
- UnstyledButton6,
49101
+ UnstyledButton7,
49013
49102
  {
49014
49103
  ref,
49015
49104
  onClick,
@@ -49076,9 +49165,9 @@ var localStorageService = {
49076
49165
  var iconsKey = "editor_recent_icons";
49077
49166
  var ICONS_PER_PAGE = 500;
49078
49167
  function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove, children, currentIcon }) {
49079
- const [searchQuery, setSearchQuery] = useState250("");
49080
- const [activeTab, setActiveTab] = useState250("icons");
49081
- const [currentPage, setCurrentPage] = useState250(1);
49168
+ const [searchQuery, setSearchQuery] = useState251("");
49169
+ const [activeTab, setActiveTab] = useState251("icons");
49170
+ const [currentPage, setCurrentPage] = useState251(1);
49082
49171
  const allIcons = useMemo177(() => {
49083
49172
  const iconEntries = Object.entries(TablerIcons2).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
49084
49173
  return iconEntries;
@@ -49127,7 +49216,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
49127
49216
  icons.map(([name, IconComponent]) => {
49128
49217
  const isSelected = currentIcon === name.replace("Icon", "").replace(/([A-Z])/g, "-$1").toLowerCase().slice(1);
49129
49218
  return /* @__PURE__ */ React435.createElement(
49130
- UnstyledButton7,
49219
+ UnstyledButton8,
49131
49220
  {
49132
49221
  key: name,
49133
49222
  onClick: () => handleIconClick(name),
@@ -49168,7 +49257,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
49168
49257
  p: 0
49169
49258
  },
49170
49259
  onRemove && /* @__PURE__ */ React435.createElement(
49171
- UnstyledButton7,
49260
+ UnstyledButton8,
49172
49261
  {
49173
49262
  onClick: () => {
49174
49263
  onRemove();
@@ -49194,7 +49283,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
49194
49283
  leftSection: /* @__PURE__ */ React435.createElement(IconSearch11, { size: 18 }),
49195
49284
  value: searchQuery,
49196
49285
  onChange: (e) => setSearchQuery(e.currentTarget.value),
49197
- rightSection: searchQuery && /* @__PURE__ */ React435.createElement(UnstyledButton7, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React435.createElement(IconX22, { size: 18 })),
49286
+ rightSection: searchQuery && /* @__PURE__ */ React435.createElement(UnstyledButton8, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React435.createElement(IconX22, { size: 18 })),
49198
49287
  style: { flex: 1 },
49199
49288
  styles: {
49200
49289
  input: {
@@ -49218,7 +49307,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
49218
49307
  }
49219
49308
 
49220
49309
  // src/mantine/components/CoverImage.tsx
49221
- import React438, { useState as useState252, useRef as useRef62, useEffect as useEffect188, useMemo as useMemo179 } from "react";
49310
+ import React438, { useState as useState253, useRef as useRef62, useEffect as useEffect188, useMemo as useMemo179 } from "react";
49222
49311
  import { Box as Box77, Group as Group168 } from "@mantine/core";
49223
49312
  import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings24, IconArrowsMove, IconTrash as IconTrash15, IconRefresh as IconRefresh16 } from "@tabler/icons-react";
49224
49313
 
@@ -49409,13 +49498,13 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
49409
49498
  import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
49410
49499
 
49411
49500
  // src/mantine/components/FlowSettingsPanel.tsx
49412
- import React437, { useState as useState251, useEffect as useEffect187, useCallback as useCallback199 } from "react";
49501
+ import React437, { useState as useState252, useEffect as useEffect187, useCallback as useCallback199 } from "react";
49413
49502
  import { Stack as Stack309, Group as Group167, Button as Button105, ActionIcon as ActionIcon55, Text as Text292, Box as Box76 } from "@mantine/core";
49414
49503
  import { IconPlus as IconPlus12, IconTrash as IconTrash14 } from "@tabler/icons-react";
49415
49504
  var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
49416
49505
  var FlowSettingsPanel = ({ editor }) => {
49417
49506
  const { closePanel } = usePanelStore();
49418
- const [rows, setRows] = useState251([]);
49507
+ const [rows, setRows] = useState252([]);
49419
49508
  const loadSettings = useCallback199(() => {
49420
49509
  const metadata = editor.getFlowMetadata?.();
49421
49510
  if (!metadata) return;
@@ -49483,13 +49572,13 @@ var FlowSettingsPanel = ({ editor }) => {
49483
49572
  // src/mantine/components/CoverImage.tsx
49484
49573
  function CoverImage({ coverImageUrl, logoUrl }) {
49485
49574
  const { editor, handlers, editable } = useBlocknoteContext();
49486
- const [isHovering, setIsHovering] = useState252(false);
49487
- const [isRepositioning, setIsRepositioning] = useState252(false);
49488
- const [coverPosition, setCoverPosition] = useState252(() => editor?.getPageMetadata?.()?.coverPosition ?? 50);
49575
+ const [isHovering, setIsHovering] = useState253(false);
49576
+ const [isRepositioning, setIsRepositioning] = useState253(false);
49577
+ const [coverPosition, setCoverPosition] = useState253(() => editor?.getPageMetadata?.()?.coverPosition ?? 50);
49489
49578
  const coverFileInputRef = useRef62(null);
49490
49579
  const logoFileInputRef = useRef62(null);
49491
49580
  const [opened, { open, close }] = useDisclosure7(false);
49492
- const [metadata, setMetadata] = useState252(() => editor?.getPageMetadata?.() || null);
49581
+ const [metadata, setMetadata] = useState253(() => editor?.getPageMetadata?.() || null);
49493
49582
  const settingsPanelContent = useMemo179(() => editor ? /* @__PURE__ */ React438.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
49494
49583
  const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
49495
49584
  useEffect188(() => {
@@ -49782,7 +49871,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
49782
49871
  }
49783
49872
 
49784
49873
  // src/mantine/components/PageTitle.tsx
49785
- import React439, { useState as useState253, useEffect as useEffect189, useRef as useRef63, useCallback as useCallback200 } from "react";
49874
+ import React439, { useState as useState254, useEffect as useEffect189, useRef as useRef63, useCallback as useCallback200 } from "react";
49786
49875
  import { Box as Box78 } from "@mantine/core";
49787
49876
  var DEFAULT_TITLE = "New page";
49788
49877
  function isUserTitle(name) {
@@ -49827,8 +49916,8 @@ function insertPlainTextAtSelection(root, text) {
49827
49916
  }
49828
49917
  function PageTitle({ editor, editable }) {
49829
49918
  const t = useTranslate();
49830
- const [title, setTitle] = useState253("");
49831
- const [hasIcon, setHasIcon] = useState253(false);
49919
+ const [title, setTitle] = useState254("");
49920
+ const [hasIcon, setHasIcon] = useState254(false);
49832
49921
  const titleRef = useRef63(null);
49833
49922
  const isComposing = useRef63(false);
49834
49923
  useEffect189(() => {
@@ -49985,7 +50074,7 @@ if (typeof document !== "undefined") {
49985
50074
  }
49986
50075
 
49987
50076
  // src/mantine/components/ExternalDropZone.tsx
49988
- import React440, { useCallback as useCallback201, useEffect as useEffect190, useRef as useRef64, useState as useState254 } from "react";
50077
+ import React440, { useCallback as useCallback201, useEffect as useEffect190, useRef as useRef64, useState as useState255 } from "react";
49989
50078
  import { Box as Box79 } from "@mantine/core";
49990
50079
  var SCROLL_ZONE_SIZE = 80;
49991
50080
  var SCROLL_SPEED = 12;
@@ -49999,9 +50088,9 @@ var ExternalDropZone = ({
49999
50088
  children
50000
50089
  }) => {
50001
50090
  const containerRef = useRef64(null);
50002
- const [isValidDrag, setIsValidDrag] = useState254(false);
50003
- const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState254(false);
50004
- const [indicatorStyle, setIndicatorStyle] = useState254({});
50091
+ const [isValidDrag, setIsValidDrag] = useState255(false);
50092
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState255(false);
50093
+ const [indicatorStyle, setIndicatorStyle] = useState255({});
50005
50094
  const dropPositionRef = useRef64(null);
50006
50095
  const scrollAnimationRef = useRef64(null);
50007
50096
  const scrollDirectionRef = useRef64(null);
@@ -50356,7 +50445,7 @@ function sanitizeThemeForMantine7(theme) {
50356
50445
  }
50357
50446
 
50358
50447
  // src/mantine/components/CommandPalette.tsx
50359
- import React441, { useEffect as useEffect191, useRef as useRef65, useState as useState255, useMemo as useMemo180, useCallback as useCallback202 } from "react";
50448
+ import React441, { useEffect as useEffect191, useRef as useRef65, useState as useState256, useMemo as useMemo180, useCallback as useCallback202 } from "react";
50360
50449
  import { Box as Box80, Text as Text293, Stack as Stack310 } from "@mantine/core";
50361
50450
  var GROUP_ORDER = {
50362
50451
  Headings: 0,
@@ -50387,7 +50476,7 @@ function translateGroupLabel(groupKey, t) {
50387
50476
  }
50388
50477
  function PaletteItem({ item, isSelected, onClick, id }) {
50389
50478
  const ref = useRef65(null);
50390
- const [hovered, setHovered] = useState255(false);
50479
+ const [hovered, setHovered] = useState256(false);
50391
50480
  useEffect191(() => {
50392
50481
  if (isSelected && ref.current) {
50393
50482
  ref.current.scrollIntoView({ block: "nearest" });
@@ -50877,7 +50966,7 @@ function IxoEditor({
50877
50966
  }
50878
50967
 
50879
50968
  // src/mantine/components/DevUcanGrantButton.tsx
50880
- import React444, { useEffect as useEffect193, useMemo as useMemo182, useState as useState256 } from "react";
50969
+ import React444, { useEffect as useEffect193, useMemo as useMemo182, useState as useState257 } from "react";
50881
50970
  import { Alert as Alert53, Badge as Badge63, Button as Button106, Checkbox as Checkbox16, Divider as Divider44, Group as Group169, Loader as Loader101, Modal as Modal4, Paper as Paper27, Select as Select11, Stack as Stack311, Text as Text294 } from "@mantine/core";
50882
50971
  import { IconKey as IconKey7, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
50883
50972
  var FLOW_AGENT_COMMAND_TYPES = [
@@ -50955,13 +51044,13 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
50955
51044
  const { handlers: contextHandlers } = useBlocknoteContext();
50956
51045
  const editorHandlers = getHandlersFromEditor(editor);
50957
51046
  const handlers = propHandlers || contextHandlers || editorHandlers;
50958
- const [opened, setOpened] = useState256(false);
50959
- const [members, setMembers] = useState256([]);
50960
- const [selectedMemberDid, setSelectedMemberDid] = useState256(null);
50961
- const [selectedCapabilities, setSelectedCapabilities] = useState256([]);
50962
- const [loadingMembers, setLoadingMembers] = useState256(false);
50963
- const [signing, setSigning] = useState256(false);
50964
- const [message, setMessage] = useState256(null);
51047
+ const [opened, setOpened] = useState257(false);
51048
+ const [members, setMembers] = useState257([]);
51049
+ const [selectedMemberDid, setSelectedMemberDid] = useState257(null);
51050
+ const [selectedCapabilities, setSelectedCapabilities] = useState257([]);
51051
+ const [loadingMembers, setLoadingMembers] = useState257(false);
51052
+ const [signing, setSigning] = useState257(false);
51053
+ const [message, setMessage] = useState257(null);
50965
51054
  const roomId = editor.getRoomId?.() || "";
50966
51055
  const matrixClient = editor.getMatrixClient?.();
50967
51056
  const flowOwnerDid = editor.getFlowOwnerDid?.() || editor.user?.id || "";
@@ -51158,15 +51247,15 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
51158
51247
  }
51159
51248
 
51160
51249
  // src/mantine/components/EntitySigningSetup.tsx
51161
- import React445, { useState as useState257 } from "react";
51250
+ import React445, { useState as useState258 } from "react";
51162
51251
  import { Modal as Modal5, Stack as Stack312, Text as Text295, TextInput as TextInput12, Button as Button107, Alert as Alert54, Group as Group170 } from "@mantine/core";
51163
51252
  import { IconAlertCircle as IconAlertCircle53, IconCheck as IconCheck54, IconKey as IconKey8 } from "@tabler/icons-react";
51164
51253
  var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) => {
51165
- const [pin, setPin] = useState257("");
51166
- const [confirmPin, setConfirmPin] = useState257("");
51167
- const [loading, setLoading] = useState257(false);
51168
- const [error, setError] = useState257(null);
51169
- const [success, setSuccess] = useState257(false);
51254
+ const [pin, setPin] = useState258("");
51255
+ const [confirmPin, setConfirmPin] = useState258("");
51256
+ const [loading, setLoading] = useState258(false);
51257
+ const [error, setError] = useState258(null);
51258
+ const [success, setSuccess] = useState258(false);
51170
51259
  const handleSetup = async () => {
51171
51260
  if (pin.length < 4) {
51172
51261
  setError("PIN must be at least 4 characters");
@@ -51230,13 +51319,13 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
51230
51319
  };
51231
51320
 
51232
51321
  // src/mantine/components/FlowPermissionsPanel.tsx
51233
- import React446, { useState as useState258, useEffect as useEffect194, useMemo as useMemo183 } from "react";
51322
+ import React446, { useState as useState259, useEffect as useEffect194, useMemo as useMemo183 } from "react";
51234
51323
  import { Stack as Stack313, Text as Text296, Paper as Paper28, Group as Group171, Badge as Badge64, Button as Button108, ActionIcon as ActionIcon56, Loader as Loader102, Alert as Alert55, Divider as Divider45 } from "@mantine/core";
51235
51324
  import { IconPlus as IconPlus13, IconTrash as IconTrash16, IconShieldCheck as IconShieldCheck19, IconUser as IconUser15, IconRobot as IconRobot5, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
51236
51325
  var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
51237
- const [delegations, setDelegations] = useState258([]);
51238
- const [loading, setLoading] = useState258(true);
51239
- const [revoking, setRevoking] = useState258(null);
51326
+ const [delegations, setDelegations] = useState259([]);
51327
+ const [loading, setLoading] = useState259(true);
51328
+ const [revoking, setRevoking] = useState259(null);
51240
51329
  const rootDelegation = useMemo183(() => {
51241
51330
  if (editor.getUcanService) {
51242
51331
  return editor.getUcanService()?.getRootDelegation() || null;
@@ -51317,27 +51406,27 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
51317
51406
  };
51318
51407
 
51319
51408
  // src/mantine/components/GrantPermissionModal.tsx
51320
- import React447, { useState as useState259, useCallback as useCallback203 } from "react";
51409
+ import React447, { useState as useState260, useCallback as useCallback203 } from "react";
51321
51410
  import { Modal as Modal6, Stack as Stack314, Text as Text297, TextInput as TextInput13, Button as Button109, Group as Group172, Radio as Radio7, Checkbox as Checkbox17, Alert as Alert56, Paper as Paper29, Loader as Loader103, Badge as Badge65, ActionIcon as ActionIcon57, Divider as Divider46, NumberInput as NumberInput16 } from "@mantine/core";
51322
51411
  import { IconSearch as IconSearch12, IconUser as IconUser16, IconRobot as IconRobot6, IconX as IconX23, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
51323
51412
  var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
51324
51413
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
51325
51414
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
51326
51415
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
51327
- const [recipientType, setRecipientType] = useState259("user");
51328
- const [searchQuery, setSearchQuery] = useState259("");
51329
- const [searchResults, setSearchResults] = useState259([]);
51330
- const [searching, setSearching] = useState259(false);
51331
- const [selectedRecipient, setSelectedRecipient] = useState259(null);
51332
- const [manualDid, setManualDid] = useState259("");
51333
- const [scopeType, setScopeType] = useState259("full");
51334
- const [selectedBlocks, setSelectedBlocks] = useState259([]);
51335
- const [expirationEnabled, setExpirationEnabled] = useState259(false);
51336
- const [expirationDays, setExpirationDays] = useState259(30);
51337
- const [canDelegate, setCanDelegate] = useState259(false);
51338
- const [pin, setPin] = useState259("");
51339
- const [loading, setLoading] = useState259(false);
51340
- const [error, setError] = useState259(null);
51416
+ const [recipientType, setRecipientType] = useState260("user");
51417
+ const [searchQuery, setSearchQuery] = useState260("");
51418
+ const [searchResults, setSearchResults] = useState260([]);
51419
+ const [searching, setSearching] = useState260(false);
51420
+ const [selectedRecipient, setSelectedRecipient] = useState260(null);
51421
+ const [manualDid, setManualDid] = useState260("");
51422
+ const [scopeType, setScopeType] = useState260("full");
51423
+ const [selectedBlocks, setSelectedBlocks] = useState260([]);
51424
+ const [expirationEnabled, setExpirationEnabled] = useState260(false);
51425
+ const [expirationDays, setExpirationDays] = useState260(30);
51426
+ const [canDelegate, setCanDelegate] = useState260(false);
51427
+ const [pin, setPin] = useState260("");
51428
+ const [loading, setLoading] = useState260(false);
51429
+ const [error, setError] = useState260(null);
51341
51430
  const handleSearch = useCallback203(async () => {
51342
51431
  if (searchQuery.length < 2) return;
51343
51432
  setSearching(true);
@@ -51632,4 +51721,4 @@ export {
51632
51721
  ixoGraphQLClient,
51633
51722
  getEntity
51634
51723
  };
51635
- //# sourceMappingURL=chunk-VDSKJX74.js.map
51724
+ //# sourceMappingURL=chunk-OVS6HMTH.js.map