@ixo/editor 3.8.0 → 3.8.1

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.
@@ -26199,14 +26199,14 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
26199
26199
  };
26200
26200
 
26201
26201
  // src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
26202
- import React254, { useCallback as useCallback81, useEffect as useEffect85, useMemo as useMemo100, useState as useState105 } from "react";
26203
- import { ActionIcon as ActionIcon36, Alert as Alert44, Box as Box54, Button as Button48, Checkbox as Checkbox12, Divider as Divider22, Group as Group96, Loader as Loader42, ScrollArea as ScrollArea8, Stack as Stack171, Text as Text147, UnstyledButton as UnstyledButton6 } from "@mantine/core";
26202
+ import React254, { useCallback as useCallback82, useEffect as useEffect86, useMemo as useMemo100, useState as useState105 } from "react";
26203
+ import { ActionIcon as ActionIcon36, Alert as Alert44, Box as Box54, Button as Button48, Checkbox as Checkbox12, Divider as Divider22, Group as Group96, Loader as Loader43, ScrollArea as ScrollArea8, Stack as Stack171, Text as Text147, UnstyledButton as UnstyledButton6 } from "@mantine/core";
26204
26204
  import { IconArrowLeft as IconArrowLeft7, IconCheck as IconCheck19, IconFilter as IconFilter2 } from "@tabler/icons-react";
26205
26205
  import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
26206
26206
 
26207
26207
  // src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
26208
- import React253, { useMemo as useMemo99, useState as useState104 } from "react";
26209
- import { Box as Box53, Group as Group95, SimpleGrid as SimpleGrid4, Stack as Stack170, Text as Text146, Tooltip as Tooltip22, UnstyledButton as UnstyledButton5 } from "@mantine/core";
26208
+ import React253, { useCallback as useCallback81, useEffect as useEffect85, useMemo as useMemo99, useRef as useRef24, useState as useState104 } from "react";
26209
+ import { Box as Box53, Group as Group95, Loader as Loader42, SimpleGrid as SimpleGrid4, Stack as Stack170, Text as Text146, Tooltip as Tooltip22, UnstyledButton as UnstyledButton5 } from "@mantine/core";
26210
26210
  import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto4, IconVideo } from "@tabler/icons-react";
26211
26211
 
26212
26212
  // src/mantine/components/MediaPreviewModal.tsx
@@ -26369,7 +26369,49 @@ function isImage(file) {
26369
26369
  return t.startsWith("image/") || ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext);
26370
26370
  }
26371
26371
  var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
26372
+ const { fetchClaimMedia } = useBlocknoteHandlers();
26372
26373
  const [active, setActive] = useState104(null);
26374
+ const [resolved, setResolved] = useState104({});
26375
+ const [pending, setPending] = useState104({});
26376
+ const [openingKey, setOpeningKey] = useState104(null);
26377
+ const cacheRef = useRef24(/* @__PURE__ */ new Map());
26378
+ const inflightRef = useRef24(/* @__PURE__ */ new Map());
26379
+ useEffect85(() => {
26380
+ return () => {
26381
+ for (const blobUrl of cacheRef.current.values()) URL.revokeObjectURL(blobUrl);
26382
+ cacheRef.current.clear();
26383
+ inflightRef.current.clear();
26384
+ };
26385
+ }, []);
26386
+ const resolveBlob = useCallback81(
26387
+ (url) => {
26388
+ if (!fetchClaimMedia) return Promise.resolve(url);
26389
+ const cached = cacheRef.current.get(url);
26390
+ if (cached) return Promise.resolve(cached);
26391
+ const existing = inflightRef.current.get(url);
26392
+ if (existing) return existing;
26393
+ setPending((p) => ({ ...p, [url]: true }));
26394
+ const promise = (async () => {
26395
+ const blob = await fetchClaimMedia(url);
26396
+ const blobUrl = URL.createObjectURL(blob);
26397
+ cacheRef.current.set(url, blobUrl);
26398
+ setResolved((r) => ({ ...r, [url]: blobUrl }));
26399
+ return blobUrl;
26400
+ })().catch((err) => {
26401
+ console.error("[ClaimAttachments] fetchClaimMedia failed", url, err);
26402
+ return url;
26403
+ }).finally(() => {
26404
+ inflightRef.current.delete(url);
26405
+ setPending((p) => {
26406
+ const { [url]: _, ...rest } = p;
26407
+ return rest;
26408
+ });
26409
+ });
26410
+ inflightRef.current.set(url, promise);
26411
+ return promise;
26412
+ },
26413
+ [fetchClaimMedia]
26414
+ );
26373
26415
  const items = useMemo99(() => {
26374
26416
  if (!credentialSubject || typeof credentialSubject !== "object") return [];
26375
26417
  const questionTitles = /* @__PURE__ */ new Map();
@@ -26404,16 +26446,42 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
26404
26446
  }
26405
26447
  return result;
26406
26448
  }, [surveyModel, credentialSubject]);
26449
+ useEffect85(() => {
26450
+ if (!fetchClaimMedia) return;
26451
+ for (const item of items) {
26452
+ if (isImage(item) && !cacheRef.current.has(item.content)) {
26453
+ resolveBlob(item.content);
26454
+ }
26455
+ }
26456
+ }, [items, fetchClaimMedia, resolveBlob]);
26457
+ const handleOpen = useCallback81(
26458
+ async (item) => {
26459
+ if (!fetchClaimMedia) {
26460
+ setActive(item);
26461
+ return;
26462
+ }
26463
+ setOpeningKey(item.content);
26464
+ try {
26465
+ const url = await resolveBlob(item.content);
26466
+ setActive({ ...item, content: url });
26467
+ } finally {
26468
+ setOpeningKey((k) => k === item.content ? null : k);
26469
+ }
26470
+ },
26471
+ [fetchClaimMedia, resolveBlob]
26472
+ );
26407
26473
  if (items.length === 0) {
26408
26474
  return /* @__PURE__ */ React253.createElement(Text146, { size: "xs", c: "dimmed" }, "No attachments in this submission.");
26409
26475
  }
26410
26476
  return /* @__PURE__ */ React253.createElement(React253.Fragment, null, /* @__PURE__ */ React253.createElement(SimpleGrid4, { cols: { base: 2, sm: 3, md: 4 }, spacing: "xs" }, items.map((item, index) => {
26411
26477
  const IconCmp = kindIcon(item);
26412
26478
  const showImage = isImage(item);
26479
+ const displayUrl = resolved[item.content] || (!fetchClaimMedia ? item.content : "");
26480
+ const isFetching = !!pending[item.content] || openingKey === item.content;
26413
26481
  return /* @__PURE__ */ React253.createElement(Tooltip22, { key: `${item.content}-${index}`, label: item.label, openDelay: 400, disabled: !item.label || item.label === item.name }, /* @__PURE__ */ React253.createElement(
26414
26482
  UnstyledButton5,
26415
26483
  {
26416
- onClick: () => setActive(item),
26484
+ onClick: () => handleOpen(item),
26417
26485
  style: {
26418
26486
  borderRadius: 12,
26419
26487
  overflow: "hidden",
@@ -26433,17 +26501,17 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
26433
26501
  overflow: "hidden"
26434
26502
  }
26435
26503
  },
26436
- showImage ? /* @__PURE__ */ React253.createElement(
26504
+ showImage && displayUrl ? /* @__PURE__ */ React253.createElement(
26437
26505
  "img",
26438
26506
  {
26439
- src: item.content,
26507
+ src: displayUrl,
26440
26508
  alt: item.name,
26441
26509
  style: { width: "100%", height: "100%", objectFit: "cover" },
26442
26510
  onError: (e) => {
26443
26511
  e.currentTarget.style.display = "none";
26444
26512
  }
26445
26513
  }
26446
- ) : icon(IconCmp, 28)
26514
+ ) : isFetching ? /* @__PURE__ */ React253.createElement(Loader42, { size: "sm" }) : icon(IconCmp, 28)
26447
26515
  ), /* @__PURE__ */ React253.createElement(Group95, { gap: 6, p: 8, wrap: "nowrap" }, icon(IconCmp, 14), /* @__PURE__ */ React253.createElement(Text146, { size: "xs", truncate: true, style: { flex: 1 } }, item.name)))
26448
26516
  ));
26449
26517
  })), /* @__PURE__ */ React253.createElement(MediaPreviewModal, { file: active, onClose: () => setActive(null) }));
@@ -26584,7 +26652,7 @@ var EvaluateClaimFlowDetail = ({
26584
26652
  });
26585
26653
  return model;
26586
26654
  }, [outcomeTemplateJson]);
26587
- const refreshClaims = useCallback81(async () => {
26655
+ const refreshClaims = useCallback82(async () => {
26588
26656
  if (!deedDid || !collectionId) return;
26589
26657
  setLoadingClaims(true);
26590
26658
  setError(null);
@@ -26605,7 +26673,7 @@ var EvaluateClaimFlowDetail = ({
26605
26673
  setLoadingClaims(false);
26606
26674
  }
26607
26675
  }, [handlers, deedDid, collectionId, selectedClaimId]);
26608
- const loadClaimDetail = useCallback81(
26676
+ const loadClaimDetail = useCallback82(
26609
26677
  async (claim) => {
26610
26678
  setSurveyLoading(true);
26611
26679
  setEvaluationLoading(false);
@@ -26660,7 +26728,7 @@ var EvaluateClaimFlowDetail = ({
26660
26728
  },
26661
26729
  [handlers, collectionId, deedDid]
26662
26730
  );
26663
- useEffect85(() => {
26731
+ useEffect86(() => {
26664
26732
  setSelectedClaimId("");
26665
26733
  setError(null);
26666
26734
  setPaymentRows([createPaymentRow2()]);
@@ -26671,11 +26739,11 @@ var EvaluateClaimFlowDetail = ({
26671
26739
  setOutcomeResponses({});
26672
26740
  setOutcomeComplete(false);
26673
26741
  }, [deedDid, collectionId]);
26674
- useEffect85(() => {
26742
+ useEffect86(() => {
26675
26743
  if (!deedDid || !collectionId) return;
26676
26744
  refreshClaims();
26677
26745
  }, [deedDid, collectionId, refreshClaims]);
26678
- useEffect85(() => {
26746
+ useEffect86(() => {
26679
26747
  let mounted = true;
26680
26748
  const dids = Array.from(new Set(claims.map((claim) => claim.agentDid).filter(Boolean)));
26681
26749
  const missing = dids.filter((did) => !profilesByDid[did]);
@@ -26710,7 +26778,7 @@ var EvaluateClaimFlowDetail = ({
26710
26778
  mounted = false;
26711
26779
  };
26712
26780
  }, [claims, handlers, profilesByDid]);
26713
- useEffect85(() => {
26781
+ useEffect86(() => {
26714
26782
  let mounted = true;
26715
26783
  const checkEvaluatorAuthorization = async () => {
26716
26784
  if (!deedDid || !collectionId || !adminAddress || !actorDid) {
@@ -26754,7 +26822,7 @@ var EvaluateClaimFlowDetail = ({
26754
26822
  mounted = false;
26755
26823
  };
26756
26824
  }, [handlers, actorDid, adminAddress, deedDid, collectionId]);
26757
- useEffect85(() => {
26825
+ useEffect86(() => {
26758
26826
  if (!selectedClaim) {
26759
26827
  setClaimData(null);
26760
26828
  setSurveyJson(null);
@@ -26772,16 +26840,16 @@ var EvaluateClaimFlowDetail = ({
26772
26840
  return isClaimEvaluated(selectedClaim);
26773
26841
  }, [selectedClaim]);
26774
26842
  const outcomeNotReady = Boolean(outcomeTemplateJson && !outcomeComplete);
26775
- const addPaymentRow = useCallback81(() => {
26843
+ const addPaymentRow = useCallback82(() => {
26776
26844
  setPaymentRows((prev) => [...prev, createPaymentRow2()]);
26777
26845
  }, []);
26778
- const removePaymentRow = useCallback81((id) => {
26846
+ const removePaymentRow = useCallback82((id) => {
26779
26847
  setPaymentRows((prev) => prev.length === 1 ? prev : prev.filter((row) => row.id !== id));
26780
26848
  }, []);
26781
- const updatePaymentRow = useCallback81((id, patch) => {
26849
+ const updatePaymentRow = useCallback82((id, patch) => {
26782
26850
  setPaymentRows((prev) => prev.map((row) => row.id === id ? { ...row, ...patch } : row));
26783
26851
  }, []);
26784
- const buildPaymentCoins = useCallback81(() => {
26852
+ const buildPaymentCoins = useCallback82(() => {
26785
26853
  return paymentRows.map((row) => {
26786
26854
  const denom = row.denom === CUSTOM_DENOM2 ? row.customDenom.trim() : row.denom || "";
26787
26855
  const amount = Number(row.amount);
@@ -26794,7 +26862,7 @@ var EvaluateClaimFlowDetail = ({
26794
26862
  };
26795
26863
  }).filter((entry) => !!entry);
26796
26864
  }, [paymentRows]);
26797
- useEffect85(() => {
26865
+ useEffect86(() => {
26798
26866
  if (!registerRuntimeInputs) return;
26799
26867
  if (!selectedClaim) {
26800
26868
  registerRuntimeInputs({ claimId: "", decision: "", adminAddress: "", createUdid: true });
@@ -26811,7 +26879,7 @@ var EvaluateClaimFlowDetail = ({
26811
26879
  alreadyEvaluated: isClaimAlreadyEvaluated
26812
26880
  });
26813
26881
  }, [registerRuntimeInputs, selectedClaim, decision, adminAddress, createUdid, buildPaymentCoins, outcomeTemplateJson, outcomeComplete, isClaimAlreadyEvaluated]);
26814
- useEffect85(() => {
26882
+ useEffect86(() => {
26815
26883
  if (!unlockSigning) return;
26816
26884
  if (!selectedClaim || !decision || !adminAddress || authChecking || !isEvaluatorAuthorized || isClaimAlreadyEvaluated || outcomeNotReady) {
26817
26885
  unlockSigning(false);
@@ -26819,7 +26887,7 @@ var EvaluateClaimFlowDetail = ({
26819
26887
  }
26820
26888
  unlockSigning(true);
26821
26889
  }, [unlockSigning, selectedClaim, decision, adminAddress, authChecking, isEvaluatorAuthorized, isClaimAlreadyEvaluated, outcomeNotReady]);
26822
- useEffect85(() => {
26890
+ useEffect86(() => {
26823
26891
  if (!provideSigningHandler || !selectedClaim || !decision) return;
26824
26892
  provideSigningHandler(async () => {
26825
26893
  const actionDef = getAction("qi/claim.evaluate");
@@ -26948,14 +27016,14 @@ var EvaluateClaimFlowDetail = ({
26948
27016
  }
26949
27017
  },
26950
27018
  selectedClaimProfile?.avatarUrl ? null : selectedAvatarLabel
26951
- ), /* @__PURE__ */ React254.createElement(Stack171, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text147, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(selectedClaim.agentAddress))), /* @__PURE__ */ React254.createElement(Stack171, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React254.createElement(Text147, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React254.createElement(IconCheck19, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, getTimeAgo3(selectedClaim.submissionDate || "")))), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "Submission" }, surveyLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader42, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading submission details...")) : surveyModel ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React254.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No submission template/data available.")), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "Attachments" }, /* @__PURE__ */ React254.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject })), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "AI Evaluation" }, evaluationLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader42, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Running rubric evaluation...")) : evaluationResult ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React254.createElement(RubricEvaluationResults, { evaluation: evaluationResult })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No rubric evaluation available for this claim.")), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React254.createElement(
27019
+ ), /* @__PURE__ */ React254.createElement(Stack171, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React254.createElement(Text147, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(selectedClaim.agentAddress))), /* @__PURE__ */ React254.createElement(Stack171, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React254.createElement(Text147, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React254.createElement(IconCheck19, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, getTimeAgo3(selectedClaim.submissionDate || "")))), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "Submission" }, surveyLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader43, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading submission details...")) : surveyModel ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React254.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No submission template/data available.")), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "Attachments" }, /* @__PURE__ */ React254.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject })), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "AI Evaluation" }, evaluationLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader43, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Running rubric evaluation...")) : evaluationResult ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React254.createElement(RubricEvaluationResults, { evaluation: evaluationResult })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No rubric evaluation available for this claim.")), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React254.createElement(
26952
27020
  CollapsibleSection,
26953
27021
  {
26954
27022
  title: "Outcome",
26955
27023
  defaultOpen: true,
26956
27024
  badge: /* @__PURE__ */ React254.createElement(React254.Fragment, null, outcomeTemplateJson && !outcomeComplete && /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "yellow" }, "(required)"), outcomeComplete && /* @__PURE__ */ React254.createElement(IconCheck19, { size: 14, color: "var(--mantine-color-green-6)" }))
26957
27025
  },
26958
- outcomeTemplateLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader42, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading evaluation template...")) : outcomeSurveyModel ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 320 }, /* @__PURE__ */ React254.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No evaluation template available.")
27026
+ outcomeTemplateLoading ? /* @__PURE__ */ React254.createElement(Group96, { gap: "xs" }, /* @__PURE__ */ React254.createElement(Loader43, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading evaluation template...")) : outcomeSurveyModel ? /* @__PURE__ */ React254.createElement(ScrollArea8, { h: 320 }, /* @__PURE__ */ React254.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "No evaluation template available.")
26959
27027
  ), /* @__PURE__ */ React254.createElement(CollapsibleSection, { title: "Evaluation", defaultOpen: true }, /* @__PURE__ */ React254.createElement(Stack171, { gap: "md" }, /* @__PURE__ */ React254.createElement(Divider22, { color: "rgba(255,255,255,0.06)" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Payment (optional custom payouts)"), paymentRows.map((row, index) => /* @__PURE__ */ React254.createElement(Stack171, { key: row.id, gap: 8 }, /* @__PURE__ */ React254.createElement(Group96, { justify: "space-between", align: "center" }, /* @__PURE__ */ React254.createElement(Text147, { size: "sm" }, "Token ", index + 1), paymentRows.length > 1 && /* @__PURE__ */ React254.createElement(Button48, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, "Remove")), /* @__PURE__ */ React254.createElement(
26960
27028
  BaseSelect,
26961
27029
  {
@@ -27021,7 +27089,7 @@ var EvaluateClaimFlowDetail = ({
27021
27089
  }
27022
27090
  },
27023
27091
  /* @__PURE__ */ React254.createElement(Text147, { size: "sm", fw: 500, c: activeFilter === tab.value ? "white" : "dimmed" }, tab.label)
27024
- ))), /* @__PURE__ */ React254.createElement(ActionIcon36, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React254.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React254.createElement(Group96, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React254.createElement(Loader42, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading claims...")), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React254.createElement(Text147, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? "No claims available for this collection." : `No ${activeFilter} claims found.`), filteredClaims.length > 0 && /* @__PURE__ */ React254.createElement(Stack171, { gap: 12 }, filteredClaims.map((claim) => {
27092
+ ))), /* @__PURE__ */ React254.createElement(ActionIcon36, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React254.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React254.createElement(Group96, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React254.createElement(Loader43, { size: "xs" }), /* @__PURE__ */ React254.createElement(Text147, { size: "xs", c: "dimmed" }, "Loading claims...")), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React254.createElement(Text147, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? "No claims available for this collection." : `No ${activeFilter} claims found.`), filteredClaims.length > 0 && /* @__PURE__ */ React254.createElement(Stack171, { gap: 12 }, filteredClaims.map((claim) => {
27025
27093
  const status = getClaimStatusInfo(claim);
27026
27094
  const profile = profilesByDid[claim.agentDid];
27027
27095
  const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
@@ -27059,8 +27127,8 @@ registerActionTypeUI("qi/claim.evaluate", {
27059
27127
  });
27060
27128
 
27061
27129
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
27062
- import React255, { useCallback as useCallback82, useEffect as useEffect86, useState as useState106 } from "react";
27063
- import { Divider as Divider23, Loader as Loader43, SegmentedControl as SegmentedControl6, Stack as Stack172, Text as Text148 } from "@mantine/core";
27130
+ import React255, { useCallback as useCallback83, useEffect as useEffect87, useState as useState106 } from "react";
27131
+ import { Divider as Divider23, Loader as Loader44, SegmentedControl as SegmentedControl6, Stack as Stack172, Text as Text148 } from "@mantine/core";
27064
27132
 
27065
27133
  // src/mantine/blocks/action/actionTypes/proposalCreate/types.ts
27066
27134
  function parseProposalCreateInputs(json) {
@@ -27093,10 +27161,10 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27093
27161
  const [loadingGroups, setLoadingGroups] = useState106(false);
27094
27162
  const [inputMode, setInputMode] = useState106("select");
27095
27163
  const [manualAddress, setManualAddress] = useState106("");
27096
- useEffect86(() => {
27164
+ useEffect87(() => {
27097
27165
  setLocal(parseProposalCreateInputs(inputs));
27098
27166
  }, [inputs]);
27099
- const update = useCallback82(
27167
+ const update = useCallback83(
27100
27168
  (patch) => {
27101
27169
  const updated = { ...local, ...patch };
27102
27170
  setLocal(updated);
@@ -27104,7 +27172,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27104
27172
  },
27105
27173
  [local, onInputsChange]
27106
27174
  );
27107
- useEffect86(() => {
27175
+ useEffect87(() => {
27108
27176
  if (local.coreAddress) {
27109
27177
  const matchesGroup = groups.some((g) => g.coreAddress === local.coreAddress);
27110
27178
  if (matchesGroup) {
@@ -27115,7 +27183,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27115
27183
  }
27116
27184
  }
27117
27185
  }, [local.coreAddress, groups]);
27118
- useEffect86(() => {
27186
+ useEffect87(() => {
27119
27187
  const fetchGroups = async () => {
27120
27188
  if (!handlers?.getDAOGroups) return;
27121
27189
  setLoadingGroups(true);
@@ -27129,7 +27197,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27129
27197
  };
27130
27198
  fetchGroups();
27131
27199
  }, [handlers]);
27132
- const handleActionsChange = useCallback82(
27200
+ const handleActionsChange = useCallback83(
27133
27201
  (newActions) => {
27134
27202
  update({ governanceActions: JSON.stringify(newActions) });
27135
27203
  },
@@ -27164,7 +27232,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27164
27232
  label: group.name
27165
27233
  })),
27166
27234
  disabled: loadingGroups,
27167
- rightSection: loadingGroups ? /* @__PURE__ */ React255.createElement(Loader43, { size: "xs" }) : void 0,
27235
+ rightSection: loadingGroups ? /* @__PURE__ */ React255.createElement(Loader44, { size: "xs" }) : void 0,
27168
27236
  searchable: true
27169
27237
  }
27170
27238
  ) : /* @__PURE__ */ React255.createElement(
@@ -27204,8 +27272,8 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27204
27272
  };
27205
27273
 
27206
27274
  // src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
27207
- import React256, { useCallback as useCallback83, useEffect as useEffect87, useMemo as useMemo101, useState as useState107 } from "react";
27208
- import { Alert as Alert45, Badge as Badge45, Button as Button49, Card as Card23, Group as Group97, Loader as Loader44, Stack as Stack173, Text as Text149 } from "@mantine/core";
27275
+ import React256, { useCallback as useCallback84, useEffect as useEffect88, useMemo as useMemo101, useState as useState107 } from "react";
27276
+ import { Alert as Alert45, Badge as Badge45, Button as Button49, Card as Card23, Group as Group97, Loader as Loader45, Stack as Stack173, Text as Text149 } from "@mantine/core";
27209
27277
  import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay5 } from "@tabler/icons-react";
27210
27278
  var CHAIN_STATUSES2 = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
27211
27279
  var isChainStatus2 = (value) => CHAIN_STATUSES2.includes(value);
@@ -27256,7 +27324,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27256
27324
  const proposalId = runtime.output?.proposalId || "";
27257
27325
  const currentStatus = parseStatus2(runtime.output?.status);
27258
27326
  const isProposalCreated = !!proposalId;
27259
- useEffect87(() => {
27327
+ useEffect88(() => {
27260
27328
  if (!handlers || !coreAddress || !proposalId) {
27261
27329
  setProposalContractAddress(null);
27262
27330
  return;
@@ -27288,7 +27356,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27288
27356
  contractAddress: proposalContractAddress || "",
27289
27357
  autoFetch: shouldFetch
27290
27358
  });
27291
- useEffect87(() => {
27359
+ useEffect88(() => {
27292
27360
  if (!proposal) return;
27293
27361
  const chainStatus = proposal.proposal.status;
27294
27362
  const parsedStatus = parseStatus2(chainStatus);
@@ -27306,7 +27374,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27306
27374
  }
27307
27375
  } catch {
27308
27376
  }
27309
- const handleCreateProposal = useCallback83(async () => {
27377
+ const handleCreateProposal = useCallback84(async () => {
27310
27378
  if (isDisabled || isCreating || isProposalCreated) return;
27311
27379
  if (!coreAddress) {
27312
27380
  setError("DAO core address is required");
@@ -27410,7 +27478,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27410
27478
  ucanService,
27411
27479
  updateRuntime
27412
27480
  ]);
27413
- const handleExecuteProposal = useCallback83(async () => {
27481
+ const handleExecuteProposal = useCallback84(async () => {
27414
27482
  if (!handlers || !proposalContractAddress || !proposalId) return;
27415
27483
  setIsExecuting(true);
27416
27484
  setError(null);
@@ -27428,7 +27496,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27428
27496
  setIsExecuting(false);
27429
27497
  }
27430
27498
  }, [handlers, proposalContractAddress, proposalId, invalidate, refetch]);
27431
- useEffect87(() => {
27499
+ useEffect88(() => {
27432
27500
  if (currentStatus === "executed" && runtime.state !== "completed") {
27433
27501
  updateRuntime({ state: "completed" });
27434
27502
  }
@@ -27449,7 +27517,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27449
27517
  {
27450
27518
  fullWidth: true,
27451
27519
  color: "green",
27452
- leftSection: isExecuting ? /* @__PURE__ */ React256.createElement(Loader44, { size: 14 }) : /* @__PURE__ */ React256.createElement(IconPlayerPlay5, { size: 14 }),
27520
+ leftSection: isExecuting ? /* @__PURE__ */ React256.createElement(Loader45, { size: 14 }) : /* @__PURE__ */ React256.createElement(IconPlayerPlay5, { size: 14 }),
27453
27521
  onClick: handleExecuteProposal,
27454
27522
  disabled: isExecuting,
27455
27523
  loading: isExecuting
@@ -27460,13 +27528,13 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
27460
27528
  Button49,
27461
27529
  {
27462
27530
  fullWidth: true,
27463
- leftSection: isCreating ? /* @__PURE__ */ React256.createElement(Loader44, { size: 14 }) : /* @__PURE__ */ React256.createElement(IconPlus9, { size: 14 }),
27531
+ leftSection: isCreating ? /* @__PURE__ */ React256.createElement(Loader45, { size: 14 }) : /* @__PURE__ */ React256.createElement(IconPlus9, { size: 14 }),
27464
27532
  onClick: handleCreateProposal,
27465
27533
  disabled: isDisabled || isCreating || !proposalTitle || !proposalDescription,
27466
27534
  loading: isCreating
27467
27535
  },
27468
27536
  "Create Proposal"
27469
- )), isFetching && /* @__PURE__ */ React256.createElement(Group97, { gap: "xs" }, /* @__PURE__ */ React256.createElement(Loader44, { size: "xs" }), /* @__PURE__ */ React256.createElement(Text149, { size: "xs", c: "dimmed" }, "Fetching proposal status...")), error && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, error), fetchError && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, typeof fetchError === "string" ? fetchError : "Failed to fetch proposal data"), runtime.error?.message && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27537
+ )), isFetching && /* @__PURE__ */ React256.createElement(Group97, { gap: "xs" }, /* @__PURE__ */ React256.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React256.createElement(Text149, { size: "xs", c: "dimmed" }, "Fetching proposal status...")), error && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, error), fetchError && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, typeof fetchError === "string" ? fetchError : "Failed to fetch proposal data"), runtime.error?.message && /* @__PURE__ */ React256.createElement(Alert45, { color: "red", styles: actionAlertStyles }, runtime.error.message));
27470
27538
  };
27471
27539
 
27472
27540
  // src/mantine/blocks/action/actionTypes/proposalCreate/index.ts
@@ -27476,8 +27544,8 @@ registerActionTypeUI("qi/proposal.create", {
27476
27544
  });
27477
27545
 
27478
27546
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
27479
- import React257, { useCallback as useCallback84, useEffect as useEffect88, useState as useState108 } from "react";
27480
- import { Divider as Divider24, Loader as Loader45, SegmentedControl as SegmentedControl7, Stack as Stack174, Text as Text150 } from "@mantine/core";
27547
+ import React257, { useCallback as useCallback85, useEffect as useEffect89, useState as useState108 } from "react";
27548
+ import { Divider as Divider24, Loader as Loader46, SegmentedControl as SegmentedControl7, Stack as Stack174, Text as Text150 } from "@mantine/core";
27481
27549
 
27482
27550
  // src/mantine/blocks/action/actionTypes/proposalVote/types.ts
27483
27551
  function parseProposalVoteInputs(json) {
@@ -27508,10 +27576,10 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27508
27576
  const [loadingGroups, setLoadingGroups] = useState108(false);
27509
27577
  const [inputMode, setInputMode] = useState108("select");
27510
27578
  const [manualAddress, setManualAddress] = useState108("");
27511
- useEffect88(() => {
27579
+ useEffect89(() => {
27512
27580
  setLocal(parseProposalVoteInputs(inputs));
27513
27581
  }, [inputs]);
27514
- const update = useCallback84(
27582
+ const update = useCallback85(
27515
27583
  (patch) => {
27516
27584
  const updated = { ...local, ...patch };
27517
27585
  setLocal(updated);
@@ -27519,7 +27587,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27519
27587
  },
27520
27588
  [local, onInputsChange]
27521
27589
  );
27522
- useEffect88(() => {
27590
+ useEffect89(() => {
27523
27591
  if (local.coreAddress) {
27524
27592
  const matchesGroup = groups.some((g) => g.coreAddress === local.coreAddress);
27525
27593
  if (matchesGroup) {
@@ -27530,7 +27598,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27530
27598
  }
27531
27599
  }
27532
27600
  }, [local.coreAddress, groups]);
27533
- useEffect88(() => {
27601
+ useEffect89(() => {
27534
27602
  const fetchGroups = async () => {
27535
27603
  if (!handlers?.getDAOGroups) return;
27536
27604
  setLoadingGroups(true);
@@ -27573,7 +27641,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27573
27641
  label: group.name
27574
27642
  })),
27575
27643
  disabled: loadingGroups,
27576
- rightSection: loadingGroups ? /* @__PURE__ */ React257.createElement(Loader45, { size: "xs" }) : void 0,
27644
+ rightSection: loadingGroups ? /* @__PURE__ */ React257.createElement(Loader46, { size: "xs" }) : void 0,
27577
27645
  searchable: true
27578
27646
  }
27579
27647
  ) : /* @__PURE__ */ React257.createElement(
@@ -27614,7 +27682,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
27614
27682
  };
27615
27683
 
27616
27684
  // src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
27617
- import React258, { useCallback as useCallback85, useEffect as useEffect89, useMemo as useMemo102, useState as useState109 } from "react";
27685
+ import React258, { useCallback as useCallback86, useEffect as useEffect90, useMemo as useMemo102, useState as useState109 } from "react";
27618
27686
  import { Alert as Alert46, Box as Box55, Button as Button50, Card as Card24, Group as Group98, Progress as Progress4, Stack as Stack175, Text as Text151, Tooltip as Tooltip23 } from "@mantine/core";
27619
27687
  var getVoteIcon2 = (voteType) => {
27620
27688
  switch (voteType) {
@@ -27664,7 +27732,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
27664
27732
  const [proposalContractAddress, setProposalContractAddress] = useState109(inputContractAddress || null);
27665
27733
  const hasSubmittedProposal = Boolean(proposalId);
27666
27734
  const hasVoted = Boolean(userVote?.vote);
27667
- useEffect89(() => {
27735
+ useEffect90(() => {
27668
27736
  if (inputContractAddress) {
27669
27737
  setProposalContractAddress(inputContractAddress);
27670
27738
  return;
@@ -27688,7 +27756,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
27688
27756
  isCancelled = true;
27689
27757
  };
27690
27758
  }, [handlers, coreAddress, proposalId, inputContractAddress]);
27691
- useEffect89(() => {
27759
+ useEffect90(() => {
27692
27760
  if (!handlers || !proposalContractAddress || !proposalId) return;
27693
27761
  let isCancelled = false;
27694
27762
  const loadUserVote = async () => {
@@ -27706,7 +27774,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
27706
27774
  isCancelled = true;
27707
27775
  };
27708
27776
  }, [handlers, proposalContractAddress, proposalId]);
27709
- const handleVote = useCallback85(async () => {
27777
+ const handleVote = useCallback86(async () => {
27710
27778
  if (!selectedVote || !proposalId || !proposalContractAddress || isDisabled || submitting) return;
27711
27779
  const actionDef = getAction("qi/proposal.vote");
27712
27780
  if (!actionDef) {
@@ -27994,8 +28062,8 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
27994
28062
  };
27995
28063
 
27996
28064
  // src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
27997
- import React260, { useCallback as useCallback86, useEffect as useEffect90, useMemo as useMemo104, useState as useState111 } from "react";
27998
- import { Box as Box57, Group as Group99, Loader as Loader46, Stack as Stack177, Text as Text153 } from "@mantine/core";
28065
+ import React260, { useCallback as useCallback87, useEffect as useEffect91, useMemo as useMemo104, useState as useState111 } from "react";
28066
+ import { Box as Box57, Group as Group99, Loader as Loader47, Stack as Stack177, Text as Text153 } from "@mantine/core";
27999
28067
  function parseInputs2(json) {
28000
28068
  try {
28001
28069
  const parsed = typeof json === "string" ? JSON.parse(json) : json;
@@ -28011,7 +28079,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisab
28011
28079
  const { protocolDids } = useMemo104(() => parseInputs2(inputs), [inputs]);
28012
28080
  const [protocols, setProtocols] = useState111([]);
28013
28081
  const selectedDid = runtime.output?.selectedProtocolDid;
28014
- useEffect90(() => {
28082
+ useEffect91(() => {
28015
28083
  if (protocolDids.length === 0) {
28016
28084
  setProtocols([]);
28017
28085
  return;
@@ -28060,7 +28128,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisab
28060
28128
  }
28061
28129
  });
28062
28130
  }, [protocolDids, handlers]);
28063
- const handleSelect = useCallback86(
28131
+ const handleSelect = useCallback87(
28064
28132
  (protocol) => {
28065
28133
  if (protocol.loading || isDisabled) return;
28066
28134
  updateRuntime({
@@ -28094,7 +28162,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisab
28094
28162
  transition: "all 0.15s ease"
28095
28163
  }
28096
28164
  },
28097
- /* @__PURE__ */ React260.createElement(Group99, { wrap: "nowrap", gap: "md", align: "center" }, protocol.loading ? /* @__PURE__ */ React260.createElement(Loader46, { size: "xs", color: "white" }) : /* @__PURE__ */ React260.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React260.createElement(Stack177, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React260.createElement(Text153, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React260.createElement(Text153, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did)))
28165
+ /* @__PURE__ */ React260.createElement(Group99, { wrap: "nowrap", gap: "md", align: "center" }, protocol.loading ? /* @__PURE__ */ React260.createElement(Loader47, { size: "xs", color: "white" }) : /* @__PURE__ */ React260.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React260.createElement(Stack177, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React260.createElement(Text153, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React260.createElement(Text153, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did)))
28098
28166
  );
28099
28167
  }));
28100
28168
  };
@@ -28106,7 +28174,7 @@ registerActionTypeUI("qi/protocol.select", {
28106
28174
  });
28107
28175
 
28108
28176
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignConfig.tsx
28109
- import React261, { useCallback as useCallback87, useEffect as useEffect91, useState as useState112 } from "react";
28177
+ import React261, { useCallback as useCallback88, useEffect as useEffect92, useState as useState112 } from "react";
28110
28178
  import { Divider as Divider25, Stack as Stack178, Text as Text154, Textarea as Textarea2 } from "@mantine/core";
28111
28179
 
28112
28180
  // src/mantine/blocks/action/actionTypes/domainSign/types.ts
@@ -28139,10 +28207,10 @@ var ENTITY_TYPE_OPTIONS = [
28139
28207
  ];
28140
28208
  var DomainSignConfig = ({ inputs, onInputsChange }) => {
28141
28209
  const [local, setLocal] = useState112(() => parseDomainSignInputs(inputs));
28142
- useEffect91(() => {
28210
+ useEffect92(() => {
28143
28211
  setLocal(parseDomainSignInputs(inputs));
28144
28212
  }, [inputs]);
28145
- const update = useCallback87(
28213
+ const update = useCallback88(
28146
28214
  (patch) => {
28147
28215
  const updated = { ...local, ...patch };
28148
28216
  setLocal(updated);
@@ -28178,8 +28246,8 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
28178
28246
  };
28179
28247
 
28180
28248
  // src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
28181
- import React262, { useCallback as useCallback88, useMemo as useMemo105, useState as useState113 } from "react";
28182
- import { Alert as Alert47, Button as Button51, Group as Group100, Loader as Loader47, Stack as Stack179, Text as Text155 } from "@mantine/core";
28249
+ import React262, { useCallback as useCallback89, useMemo as useMemo105, useState as useState113 } from "react";
28250
+ import { Alert as Alert47, Button as Button51, Group as Group100, Loader as Loader48, Stack as Stack179, Text as Text155 } from "@mantine/core";
28183
28251
  import { IconCheck as IconCheck20, IconAlertCircle as IconAlertCircle17, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
28184
28252
  var STEP_LABELS = {
28185
28253
  signing: "Signing credential...",
@@ -28232,7 +28300,7 @@ var DomainSignFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
28232
28300
  const [error, setError] = useState113(runtime.error?.message || null);
28233
28301
  const entityDid = runtime.output?.entityDid || "";
28234
28302
  const isCompleted = flowStep === "success" || runtime.state === "completed";
28235
- const handleSign = useCallback88(async () => {
28303
+ const handleSign = useCallback89(async () => {
28236
28304
  if (isDisabled || flowStep === "running" || isCompleted) return;
28237
28305
  if (!domainCardData) {
28238
28306
  setError("No domain card data available. Ensure the domain card viewer block has pushed data to this action.");
@@ -28344,12 +28412,12 @@ var DomainSignFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
28344
28412
  ucanService,
28345
28413
  updateRuntime
28346
28414
  ]);
28347
- const handleRetry = useCallback88(() => {
28415
+ const handleRetry = useCallback89(() => {
28348
28416
  setFlowStep("idle");
28349
28417
  setError(null);
28350
28418
  updateRuntime({ state: "idle", error: void 0 });
28351
28419
  }, [updateRuntime]);
28352
- const handleVisitEntity = useCallback88(() => {
28420
+ const handleVisitEntity = useCallback89(() => {
28353
28421
  if (entityDid && handlers?.redirectToEntityOverview) {
28354
28422
  handlers.redirectToEntityOverview(entityDid, resolvedEntityType);
28355
28423
  }
@@ -28357,7 +28425,7 @@ var DomainSignFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
28357
28425
  return /* @__PURE__ */ React262.createElement(Stack179, { gap: "md" }, /* @__PURE__ */ React262.createElement(Stack179, { gap: 2 }, /* @__PURE__ */ React262.createElement(Text155, { fw: 600 }, block?.props?.title || "Sign Domain Card"), /* @__PURE__ */ React262.createElement(Text155, { size: "sm", c: "dimmed" }, block?.props?.description || "Sign the domain card credential and create a domain entity on-chain.")), !domainCardData ? /* @__PURE__ */ React262.createElement(Alert47, { color: "yellow", styles: actionAlertStyles }, "No domain card data available. The domain card viewer block must push data to this action before it can run.") : /* @__PURE__ */ React262.createElement(React262.Fragment, null, /* @__PURE__ */ React262.createElement(Stack179, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React262.createElement(Text155, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React262.createElement(Group100, { gap: "xs" }, /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React262.createElement(Text155, { size: "xs" }, domainName || "Not set")), /* @__PURE__ */ React262.createElement(Group100, { gap: "xs" }, /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React262.createElement(Text155, { size: "xs" }, resolvedEntityType)), domainDescription && /* @__PURE__ */ React262.createElement(Group100, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React262.createElement(Text155, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainDescription))), flowStep === "running" && /* @__PURE__ */ React262.createElement(Stack179, { gap: "xs" }, ["signing", "uploading", "creating"].map((step) => {
28358
28426
  const isActive = activeStep === step;
28359
28427
  const isDone = ["signing", "uploading", "creating"].indexOf(step) < ["signing", "uploading", "creating"].indexOf(activeStep);
28360
- return /* @__PURE__ */ React262.createElement(Group100, { key: step, gap: "xs" }, isDone ? /* @__PURE__ */ React262.createElement(IconCheck20, { size: 14, color: "var(--mantine-color-green-5)" }) : isActive ? /* @__PURE__ */ React262.createElement(Loader47, { size: 14 }) : /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { width: 14 } }, "\u2013"), /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: isActive ? void 0 : "dimmed" }, STEP_LABELS[step]));
28428
+ return /* @__PURE__ */ React262.createElement(Group100, { key: step, gap: "xs" }, isDone ? /* @__PURE__ */ React262.createElement(IconCheck20, { size: 14, color: "var(--mantine-color-green-5)" }) : isActive ? /* @__PURE__ */ React262.createElement(Loader48, { size: 14 }) : /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { width: 14 } }, "\u2013"), /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: isActive ? void 0 : "dimmed" }, STEP_LABELS[step]));
28361
28429
  })), isCompleted && /* @__PURE__ */ React262.createElement(Alert47, { icon: /* @__PURE__ */ React262.createElement(IconCheck20, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React262.createElement(Stack179, { gap: "xs" }, /* @__PURE__ */ React262.createElement(Text155, { size: "sm" }, "The domain card has been signed and the entity has been created on-chain."), entityDid && /* @__PURE__ */ React262.createElement(Text155, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Entity DID: ", entityDid))), isCompleted && entityDid && handlers?.redirectToEntityOverview && /* @__PURE__ */ React262.createElement(Button51, { variant: "outline", leftSection: /* @__PURE__ */ React262.createElement(IconExternalLink2, { size: 14 }), onClick: handleVisitEntity }, "Visit Entity"), !isCompleted && /* @__PURE__ */ React262.createElement(Button51, { fullWidth: true, onClick: handleSign, disabled: isDisabled || flowStep === "running", loading: flowStep === "running" }, flowStep === "running" ? "Processing..." : "Sign & Create Domain"), flowStep === "error" && /* @__PURE__ */ React262.createElement(Group100, null, /* @__PURE__ */ React262.createElement(Button51, { variant: "outline", onClick: handleRetry }, "Try Again"))), error && /* @__PURE__ */ React262.createElement(Alert47, { icon: /* @__PURE__ */ React262.createElement(IconAlertCircle17, { size: 16 }), color: "red", styles: actionAlertStyles }, error), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React262.createElement(Alert47, { color: "red", styles: actionAlertStyles }, runtime.error.message));
28362
28430
  };
28363
28431
 
@@ -28368,7 +28436,7 @@ registerActionTypeUI("qi/domain.sign", {
28368
28436
  });
28369
28437
 
28370
28438
  // src/mantine/blocks/action/actionTypes/domainCreate/DomainCreateConfig.tsx
28371
- import React263, { useCallback as useCallback89, useEffect as useEffect92, useState as useState114 } from "react";
28439
+ import React263, { useCallback as useCallback90, useEffect as useEffect93, useState as useState114 } from "react";
28372
28440
  import { Stack as Stack180, Text as Text156 } from "@mantine/core";
28373
28441
 
28374
28442
  // src/mantine/blocks/action/actionTypes/domainCreate/types.ts
@@ -28400,10 +28468,10 @@ var ENTITY_TYPE_OPTIONS2 = [
28400
28468
  ];
28401
28469
  var DomainCreateConfig = ({ inputs, onInputsChange }) => {
28402
28470
  const [local, setLocal] = useState114(() => parseDomainCreateInputs(inputs));
28403
- useEffect92(() => {
28471
+ useEffect93(() => {
28404
28472
  setLocal(parseDomainCreateInputs(inputs));
28405
28473
  }, [inputs]);
28406
- const update = useCallback89(
28474
+ const update = useCallback90(
28407
28475
  (patch) => {
28408
28476
  const updated = { ...local, ...patch };
28409
28477
  setLocal(updated);
@@ -28411,7 +28479,7 @@ var DomainCreateConfig = ({ inputs, onInputsChange }) => {
28411
28479
  },
28412
28480
  [local, onInputsChange]
28413
28481
  );
28414
- useEffect92(() => {
28482
+ useEffect93(() => {
28415
28483
  if (!local.surveySchema) {
28416
28484
  update({ surveySchema: tempDomainCreatorSurvey });
28417
28485
  }
@@ -28430,8 +28498,8 @@ var DomainCreateConfig = ({ inputs, onInputsChange }) => {
28430
28498
  };
28431
28499
 
28432
28500
  // src/mantine/blocks/action/actionTypes/domainCreate/DomainCreateFlowDetail.tsx
28433
- import React264, { useCallback as useCallback90, useEffect as useEffect93, useMemo as useMemo106, useState as useState115 } from "react";
28434
- import { Alert as Alert48, Button as Button52, Group as Group101, Loader as Loader48, Stack as Stack181, Text as Text157 } from "@mantine/core";
28501
+ import React264, { useCallback as useCallback91, useEffect as useEffect94, useMemo as useMemo106, useState as useState115 } from "react";
28502
+ import { Alert as Alert48, Button as Button52, Group as Group101, Loader as Loader49, Stack as Stack181, Text as Text157 } from "@mantine/core";
28435
28503
  import { IconCheck as IconCheck21, IconAlertCircle as IconAlertCircle18, IconPlayerPlay as IconPlayerPlay6 } from "@tabler/icons-react";
28436
28504
  import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
28437
28505
  var DomainCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
@@ -28470,7 +28538,7 @@ var DomainCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
28470
28538
  model.questionsOnPageMode = "singlePage";
28471
28539
  return model;
28472
28540
  }, [surveySchema]);
28473
- const handleSurveyComplete = useCallback90(
28541
+ const handleSurveyComplete = useCallback91(
28474
28542
  async (sender) => {
28475
28543
  const actionDef = getAction("qi/domain.create");
28476
28544
  if (!actionDef) {
@@ -28541,23 +28609,23 @@ var DomainCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
28541
28609
  },
28542
28610
  [actorDid, block.id, editor, entityType, flowId, flowNode, flowOwnerDid, flowUri, handlers, invocationStore, runtimeManager, services, ucanService, updateRuntime]
28543
28611
  );
28544
- useEffect93(() => {
28612
+ useEffect94(() => {
28545
28613
  surveyModel.onComplete.add(handleSurveyComplete);
28546
28614
  return () => {
28547
28615
  surveyModel.onComplete.remove(handleSurveyComplete);
28548
28616
  };
28549
28617
  }, [surveyModel, handleSurveyComplete]);
28550
- const handleStartSurvey = useCallback90(() => {
28618
+ const handleStartSurvey = useCallback91(() => {
28551
28619
  surveyModel.clear();
28552
28620
  setFlowStep("survey");
28553
28621
  setError(null);
28554
28622
  }, [surveyModel]);
28555
- const handleRetry = useCallback90(() => {
28623
+ const handleRetry = useCallback91(() => {
28556
28624
  surveyModel.clear();
28557
28625
  setFlowStep("survey");
28558
28626
  setError(null);
28559
28627
  }, [surveyModel]);
28560
- const handleVisitEntity = useCallback90(() => {
28628
+ const handleVisitEntity = useCallback91(() => {
28561
28629
  const createdEntityDid = runtime.output?.entityDid;
28562
28630
  const createdEntityType = runtime.output?.entityType || entityType;
28563
28631
  if (createdEntityDid && handlers?.redirectToEntityOverview) {
@@ -28565,7 +28633,7 @@ var DomainCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
28565
28633
  }
28566
28634
  }, [runtime.output, entityType, handlers]);
28567
28635
  const entityDid = runtime.output?.entityDid || "";
28568
- return /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Stack181, { gap: 2 }, /* @__PURE__ */ React264.createElement(Text157, { fw: 600 }, block?.props?.title || "Create Domain"), /* @__PURE__ */ React264.createElement(Text157, { size: "sm", c: "dimmed" }, block?.props?.description || "Complete the survey to create a new domain with a signed Domain Card credential.")), flowStep === "success" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Alert48, { icon: /* @__PURE__ */ React264.createElement(IconCheck21, { size: 16 }), title: "Domain Created", color: "green", styles: actionAlertStyles }, /* @__PURE__ */ React264.createElement(Stack181, { gap: "xs" }, /* @__PURE__ */ React264.createElement(Text157, { size: "sm" }, "Your domain has been created and the Domain Card has been signed and stored."), entityDid && /* @__PURE__ */ React264.createElement(Text157, { size: "xs", c: "dimmed" }, "DID: ", entityDid))), entityDid && /* @__PURE__ */ React264.createElement(Button52, { variant: "outline", onClick: handleVisitEntity }, "Visit Entity")), flowStep === "error" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Alert48, { icon: /* @__PURE__ */ React264.createElement(IconAlertCircle18, { size: 16 }), title: "Domain Creation Failed", color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React264.createElement(Text157, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React264.createElement(Group101, null, /* @__PURE__ */ React264.createElement(Button52, { variant: "outline", onClick: handleRetry, disabled: isDisabled }, "Try Again"))), flowStep === "submitting" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "sm", align: "center", py: "md" }, /* @__PURE__ */ React264.createElement(Loader48, { size: "md" }), /* @__PURE__ */ React264.createElement(Text157, { size: "sm", c: "dimmed" }, "Creating domain \u2014 signing, uploading, and registering on chain...")), flowStep === "idle" && /* @__PURE__ */ React264.createElement(Button52, { leftSection: /* @__PURE__ */ React264.createElement(IconPlayerPlay6, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Start Domain Creator"), flowStep === "survey" && !error && /* @__PURE__ */ React264.createElement(StableSurvey, { model: surveyModel }), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React264.createElement(Alert48, { color: "red", styles: actionAlertStyles }, runtime.error.message));
28636
+ return /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Stack181, { gap: 2 }, /* @__PURE__ */ React264.createElement(Text157, { fw: 600 }, block?.props?.title || "Create Domain"), /* @__PURE__ */ React264.createElement(Text157, { size: "sm", c: "dimmed" }, block?.props?.description || "Complete the survey to create a new domain with a signed Domain Card credential.")), flowStep === "success" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Alert48, { icon: /* @__PURE__ */ React264.createElement(IconCheck21, { size: 16 }), title: "Domain Created", color: "green", styles: actionAlertStyles }, /* @__PURE__ */ React264.createElement(Stack181, { gap: "xs" }, /* @__PURE__ */ React264.createElement(Text157, { size: "sm" }, "Your domain has been created and the Domain Card has been signed and stored."), entityDid && /* @__PURE__ */ React264.createElement(Text157, { size: "xs", c: "dimmed" }, "DID: ", entityDid))), entityDid && /* @__PURE__ */ React264.createElement(Button52, { variant: "outline", onClick: handleVisitEntity }, "Visit Entity")), flowStep === "error" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "md" }, /* @__PURE__ */ React264.createElement(Alert48, { icon: /* @__PURE__ */ React264.createElement(IconAlertCircle18, { size: 16 }), title: "Domain Creation Failed", color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React264.createElement(Text157, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React264.createElement(Group101, null, /* @__PURE__ */ React264.createElement(Button52, { variant: "outline", onClick: handleRetry, disabled: isDisabled }, "Try Again"))), flowStep === "submitting" && /* @__PURE__ */ React264.createElement(Stack181, { gap: "sm", align: "center", py: "md" }, /* @__PURE__ */ React264.createElement(Loader49, { size: "md" }), /* @__PURE__ */ React264.createElement(Text157, { size: "sm", c: "dimmed" }, "Creating domain \u2014 signing, uploading, and registering on chain...")), flowStep === "idle" && /* @__PURE__ */ React264.createElement(Button52, { leftSection: /* @__PURE__ */ React264.createElement(IconPlayerPlay6, { size: 14 }), onClick: handleStartSurvey, disabled: isDisabled }, "Start Domain Creator"), flowStep === "survey" && !error && /* @__PURE__ */ React264.createElement(StableSurvey, { model: surveyModel }), runtime.error?.message && flowStep !== "error" && /* @__PURE__ */ React264.createElement(Alert48, { color: "red", styles: actionAlertStyles }, runtime.error.message));
28569
28637
  };
28570
28638
 
28571
28639
  // src/mantine/blocks/action/actionTypes/domainCreate/index.ts
@@ -28575,7 +28643,7 @@ registerActionTypeUI("qi/domain.create", {
28575
28643
  });
28576
28644
 
28577
28645
  // src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
28578
- import React265, { useCallback as useCallback91, useEffect as useEffect94, useState as useState116 } from "react";
28646
+ import React265, { useCallback as useCallback92, useEffect as useEffect95, useState as useState116 } from "react";
28579
28647
  import { Stack as Stack182 } from "@mantine/core";
28580
28648
 
28581
28649
  // src/mantine/blocks/action/actionTypes/oracle/types.ts
@@ -28598,10 +28666,10 @@ function serializeOracleInputs(inputs) {
28598
28666
  // src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
28599
28667
  var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
28600
28668
  const [local, setLocal] = useState116(() => parseOracleInputs(inputs));
28601
- useEffect94(() => {
28669
+ useEffect95(() => {
28602
28670
  setLocal(parseOracleInputs(inputs));
28603
28671
  }, [inputs]);
28604
- const update = useCallback91(
28672
+ const update = useCallback92(
28605
28673
  (patch) => {
28606
28674
  const updated = { ...local, ...patch };
28607
28675
  setLocal(updated);
@@ -28625,7 +28693,7 @@ var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
28625
28693
  };
28626
28694
 
28627
28695
  // src/mantine/blocks/action/actionTypes/oracle/OracleFlowDetail.tsx
28628
- import React266, { useCallback as useCallback92, useMemo as useMemo107, useState as useState117 } from "react";
28696
+ import React266, { useCallback as useCallback93, useMemo as useMemo107, useState as useState117 } from "react";
28629
28697
  import { Alert as Alert49, Button as Button53, Stack as Stack183 } from "@mantine/core";
28630
28698
  import { IconCheck as IconCheck22, IconAlertCircle as IconAlertCircle19, IconSparkles as IconSparkles6 } from "@tabler/icons-react";
28631
28699
  var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
@@ -28637,7 +28705,7 @@ var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled })
28637
28705
  const [isLoading, setIsLoading] = useState117(false);
28638
28706
  const [error, setError] = useState117(null);
28639
28707
  const isCompleted = runtime.state === "completed";
28640
- const handleExecute = useCallback92(async () => {
28708
+ const handleExecute = useCallback93(async () => {
28641
28709
  if (isDisabled || isLoading || isCompleted) return;
28642
28710
  if (!resolvedPrompt) {
28643
28711
  setError("No prompt configured. Set a prompt in template mode.");
@@ -28678,7 +28746,7 @@ registerActionTypeUI("oracle", {
28678
28746
  });
28679
28747
 
28680
28748
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
28681
- import React267, { useCallback as useCallback93, useEffect as useEffect95, useState as useState118 } from "react";
28749
+ import React267, { useCallback as useCallback94, useEffect as useEffect96, useState as useState118 } from "react";
28682
28750
  import { Stack as Stack184 } from "@mantine/core";
28683
28751
 
28684
28752
  // src/mantine/blocks/action/actionTypes/oraclePrompt/types.ts
@@ -28699,10 +28767,10 @@ function serializeOraclePromptInputs(inputs) {
28699
28767
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
28700
28768
  var OraclePromptConfig = ({ inputs, onInputsChange }) => {
28701
28769
  const [localPrompt, setLocalPrompt] = useState118(() => parseOraclePromptInputs(inputs).prompt);
28702
- useEffect95(() => {
28770
+ useEffect96(() => {
28703
28771
  setLocalPrompt(parseOraclePromptInputs(inputs).prompt);
28704
28772
  }, [inputs]);
28705
- const handleChange = useCallback93(
28773
+ const handleChange = useCallback94(
28706
28774
  (value) => {
28707
28775
  setLocalPrompt(value);
28708
28776
  onInputsChange(serializeOraclePromptInputs({ prompt: value }));
@@ -28723,8 +28791,8 @@ var OraclePromptConfig = ({ inputs, onInputsChange }) => {
28723
28791
  };
28724
28792
 
28725
28793
  // src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptFlowDetail.tsx
28726
- import React268, { useCallback as useCallback94, useMemo as useMemo108, useState as useState119 } from "react";
28727
- import { Alert as Alert50, Loader as Loader49, Stack as Stack185, Text as Text158 } from "@mantine/core";
28794
+ import React268, { useCallback as useCallback95, useMemo as useMemo108, useState as useState119 } from "react";
28795
+ import { Alert as Alert50, Loader as Loader50, Stack as Stack185, Text as Text158 } from "@mantine/core";
28728
28796
  import { IconSend as IconSend6 } from "@tabler/icons-react";
28729
28797
  function parsePrimarySkill(rawSkill) {
28730
28798
  const coerce = (candidate) => {
@@ -28769,7 +28837,7 @@ var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
28769
28837
  const resolvedPrompt = useMemo108(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
28770
28838
  const [submitting, setSubmitting] = useState119(false);
28771
28839
  const [error, setError] = useState119(null);
28772
- const handleExecute = useCallback94(async () => {
28840
+ const handleExecute = useCallback95(async () => {
28773
28841
  if (isDisabled || submitting || !resolvedPrompt) return;
28774
28842
  if (typeof handlers?.askCompanion !== "function") {
28775
28843
  setError("askCompanion handler is not available");
@@ -28799,7 +28867,7 @@ var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
28799
28867
  }
28800
28868
  }, [block?.props?.skill, handlers, isDisabled, resolvedPrompt, submitting, updateRuntime]);
28801
28869
  const isCompleted = runtime.state === "completed";
28802
- return /* @__PURE__ */ React268.createElement(Stack185, { gap: "md" }, !resolvedPrompt ? /* @__PURE__ */ React268.createElement(Alert50, { color: "yellow", styles: actionAlertStyles }, "Configure a prompt in template mode before running this action.") : /* @__PURE__ */ React268.createElement(React268.Fragment, null, /* @__PURE__ */ React268.createElement(Text158, { size: "sm", c: "dimmed", style: { whiteSpace: "pre-wrap" } }, resolvedPrompt), /* @__PURE__ */ React268.createElement(BasePrimaryButton, { leftSection: submitting ? /* @__PURE__ */ React268.createElement(Loader49, { size: 14 }) : /* @__PURE__ */ React268.createElement(IconSend6, { size: 14 }), onClick: handleExecute, disabled: isDisabled || submitting }, submitting ? "Sending..." : isCompleted ? "Send Again" : "Send Prompt")), isCompleted && /* @__PURE__ */ React268.createElement(Text158, { size: "xs", c: "dimmed" }, "Prompt sent successfully."), error && /* @__PURE__ */ React268.createElement(Alert50, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && /* @__PURE__ */ React268.createElement(Alert50, { color: "red", styles: actionAlertStyles }, runtime.error.message));
28870
+ return /* @__PURE__ */ React268.createElement(Stack185, { gap: "md" }, !resolvedPrompt ? /* @__PURE__ */ React268.createElement(Alert50, { color: "yellow", styles: actionAlertStyles }, "Configure a prompt in template mode before running this action.") : /* @__PURE__ */ React268.createElement(React268.Fragment, null, /* @__PURE__ */ React268.createElement(Text158, { size: "sm", c: "dimmed", style: { whiteSpace: "pre-wrap" } }, resolvedPrompt), /* @__PURE__ */ React268.createElement(BasePrimaryButton, { leftSection: submitting ? /* @__PURE__ */ React268.createElement(Loader50, { size: 14 }) : /* @__PURE__ */ React268.createElement(IconSend6, { size: 14 }), onClick: handleExecute, disabled: isDisabled || submitting }, submitting ? "Sending..." : isCompleted ? "Send Again" : "Send Prompt")), isCompleted && /* @__PURE__ */ React268.createElement(Text158, { size: "xs", c: "dimmed" }, "Prompt sent successfully."), error && /* @__PURE__ */ React268.createElement(Alert50, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && /* @__PURE__ */ React268.createElement(Alert50, { color: "red", styles: actionAlertStyles }, runtime.error.message));
28803
28871
  };
28804
28872
 
28805
28873
  // src/mantine/blocks/action/actionTypes/oraclePrompt/index.ts
@@ -28809,7 +28877,7 @@ registerActionTypeUI("oracle.prompt", {
28809
28877
  });
28810
28878
 
28811
28879
  // src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitConfig.tsx
28812
- import React269, { useCallback as useCallback95, useEffect as useEffect96, useState as useState120 } from "react";
28880
+ import React269, { useCallback as useCallback96, useEffect as useEffect97, useState as useState120 } from "react";
28813
28881
  import { Stack as Stack186, Text as Text159 } from "@mantine/core";
28814
28882
 
28815
28883
  // src/mantine/blocks/action/actionTypes/formSubmit/types.ts
@@ -28846,11 +28914,11 @@ function isValidSchemaJson(value) {
28846
28914
  var FormSubmitConfig = ({ inputs, onInputsChange }) => {
28847
28915
  const [localSchema, setLocalSchema] = useState120(() => parseFormSubmitActionInputs(inputs).surveySchema);
28848
28916
  const [error, setError] = useState120(null);
28849
- useEffect96(() => {
28917
+ useEffect97(() => {
28850
28918
  setLocalSchema(parseFormSubmitActionInputs(inputs).surveySchema);
28851
28919
  setError(null);
28852
28920
  }, [inputs]);
28853
- const handleChange = useCallback95(
28921
+ const handleChange = useCallback96(
28854
28922
  (value) => {
28855
28923
  setLocalSchema(value);
28856
28924
  setError(null);
@@ -28881,8 +28949,8 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
28881
28949
  };
28882
28950
 
28883
28951
  // src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
28884
- import React270, { useCallback as useCallback96, useEffect as useEffect97, useMemo as useMemo109, useState as useState121 } from "react";
28885
- import { Alert as Alert51, Loader as Loader50, Stack as Stack187, Text as Text160 } from "@mantine/core";
28952
+ import React270, { useCallback as useCallback97, useEffect as useEffect98, useMemo as useMemo109, useState as useState121 } from "react";
28953
+ import { Alert as Alert51, Loader as Loader51, Stack as Stack187, Text as Text160 } from "@mantine/core";
28886
28954
  import { SurveyModel as SurveyModel13 } from "@ixo/surveys";
28887
28955
  function parsePrimarySkill2(rawSkill) {
28888
28956
  const coerce = (candidate) => {
@@ -28984,7 +29052,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
28984
29052
  }
28985
29053
  return model;
28986
29054
  }, [parsedSchema, isDisabled, submitting, savedAnswers]);
28987
- const handleSurveyComplete = useCallback96(
29055
+ const handleSurveyComplete = useCallback97(
28988
29056
  async (sender) => {
28989
29057
  if (isDisabled || submitting) return;
28990
29058
  const actionType = String(block?.props?.actionType || "qi/form.submit");
@@ -29068,7 +29136,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
29068
29136
  },
29069
29137
  [actorDid, block, editor, flowId, flowNode, flowOwnerDid, flowUri, handlers, invocationStore, isDisabled, runtimeManager, services, submitting, ucanService, updateRuntime]
29070
29138
  );
29071
- useEffect97(() => {
29139
+ useEffect98(() => {
29072
29140
  if (!surveyModel) return void 0;
29073
29141
  surveyModel.onComplete.add(handleSurveyComplete);
29074
29142
  return () => {
@@ -29076,7 +29144,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
29076
29144
  };
29077
29145
  }, [surveyModel, handleSurveyComplete]);
29078
29146
  const statusMessage = runtime.state === "completed" ? "Last execution completed." : submitting ? "Executing..." : null;
29079
- return /* @__PURE__ */ React270.createElement(Stack187, { gap: "md" }, !resolvedSchemaString ? /* @__PURE__ */ React270.createElement(Alert51, { color: "yellow", styles: actionAlertStyles }, "Configure Survey Schema JSON in template mode before running this action.") : !parsedSchema ? /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, "Survey schema is invalid JSON. Fix it in template mode.") : /* @__PURE__ */ React270.createElement(StableSurvey, { model: surveyModel }), statusMessage && /* @__PURE__ */ React270.createElement(Stack187, { gap: 4 }, submitting && /* @__PURE__ */ React270.createElement(Loader50, { size: "xs" }), /* @__PURE__ */ React270.createElement(Text160, { size: "xs", c: "dimmed" }, statusMessage)), error && /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, runtime.error.message));
29147
+ return /* @__PURE__ */ React270.createElement(Stack187, { gap: "md" }, !resolvedSchemaString ? /* @__PURE__ */ React270.createElement(Alert51, { color: "yellow", styles: actionAlertStyles }, "Configure Survey Schema JSON in template mode before running this action.") : !parsedSchema ? /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, "Survey schema is invalid JSON. Fix it in template mode.") : /* @__PURE__ */ React270.createElement(StableSurvey, { model: surveyModel }), statusMessage && /* @__PURE__ */ React270.createElement(Stack187, { gap: 4 }, submitting && /* @__PURE__ */ React270.createElement(Loader51, { size: "xs" }), /* @__PURE__ */ React270.createElement(Text160, { size: "xs", c: "dimmed" }, statusMessage)), error && /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && /* @__PURE__ */ React270.createElement(Alert51, { color: "red", styles: actionAlertStyles }, runtime.error.message));
29080
29148
  };
29081
29149
 
29082
29150
  // src/mantine/blocks/action/actionTypes/formSubmit/index.ts
@@ -29090,7 +29158,7 @@ registerActionTypeUI("qi/human.form.submit", {
29090
29158
  });
29091
29159
 
29092
29160
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
29093
- import React271, { useCallback as useCallback97, useEffect as useEffect98, useState as useState122 } from "react";
29161
+ import React271, { useCallback as useCallback98, useEffect as useEffect99, useState as useState122 } from "react";
29094
29162
  import { Stack as Stack188, Text as Text161 } from "@mantine/core";
29095
29163
 
29096
29164
  // src/mantine/blocks/action/actionTypes/credentialStore/types.ts
@@ -29123,10 +29191,10 @@ function serializeCredentialStoreInputs(inputs) {
29123
29191
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
29124
29192
  var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
29125
29193
  const [local, setLocal] = useState122(() => parseCredentialStoreInputs(inputs));
29126
- useEffect98(() => {
29194
+ useEffect99(() => {
29127
29195
  setLocal(parseCredentialStoreInputs(inputs));
29128
29196
  }, [inputs]);
29129
- const update = useCallback97(
29197
+ const update = useCallback98(
29130
29198
  (patch) => {
29131
29199
  const updated = { ...local, ...patch };
29132
29200
  setLocal(updated);
@@ -29166,8 +29234,8 @@ var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
29166
29234
  };
29167
29235
 
29168
29236
  // src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreFlowDetail.tsx
29169
- import React272, { useCallback as useCallback98, useMemo as useMemo110, useState as useState123 } from "react";
29170
- import { Alert as Alert52, Button as Button54, Code as Code10, Loader as Loader51, Stack as Stack189, Text as Text162 } from "@mantine/core";
29237
+ import React272, { useCallback as useCallback99, useMemo as useMemo110, useState as useState123 } from "react";
29238
+ import { Alert as Alert52, Button as Button54, Code as Code10, Loader as Loader52, Stack as Stack189, Text as Text162 } from "@mantine/core";
29171
29239
  import { IconShieldCheck as IconShieldCheck15 } from "@tabler/icons-react";
29172
29240
  function safeParse(value) {
29173
29241
  let result = value;
@@ -29228,7 +29296,7 @@ var CredentialStoreFlowDetail = ({ inputs, editor, block, runtime, updateRuntime
29228
29296
  const hasCredential = !!resolvedCredential;
29229
29297
  const hasKey = !!resolvedCredentialKey;
29230
29298
  const isCompleted = runtime.state === "completed";
29231
- const handleExecute = useCallback98(async () => {
29299
+ const handleExecute = useCallback99(async () => {
29232
29300
  if (isDisabled || submitting) return;
29233
29301
  const actionDef = getAction("qi/credential.store");
29234
29302
  if (!actionDef) {
@@ -29317,7 +29385,7 @@ var CredentialStoreFlowDetail = ({ inputs, editor, block, runtime, updateRuntime
29317
29385
  ucanService,
29318
29386
  updateRuntime
29319
29387
  ]);
29320
- return /* @__PURE__ */ React272.createElement(Stack189, { gap: "md" }, !hasKey && /* @__PURE__ */ React272.createElement(Alert52, { color: "yellow", styles: actionAlertStyles }, "No credential key configured. Set one in template mode."), hasKey && !hasCredential && !isCompleted && /* @__PURE__ */ React272.createElement(Alert52, { color: "yellow", styles: actionAlertStyles }, "Waiting for credential data. It will be provided by a block reference or at execution time."), hasKey && hasCredential && !isCompleted && /* @__PURE__ */ React272.createElement(Stack189, { gap: "xs" }, /* @__PURE__ */ React272.createElement(Text162, { size: "xs", c: "dimmed" }, "Credential key: ", resolvedCredentialKey), /* @__PURE__ */ React272.createElement(CredentialPreview, { value: resolvedCredential }), /* @__PURE__ */ React272.createElement(Button54, { leftSection: submitting ? /* @__PURE__ */ React272.createElement(Loader51, { size: 14 }) : /* @__PURE__ */ React272.createElement(IconShieldCheck15, { size: 14 }), onClick: handleExecute, disabled: isDisabled || submitting, size: "sm" }, submitting ? "Storing..." : "Store Credential")), isCompleted && /* @__PURE__ */ React272.createElement(Alert52, { color: runtime.output?.duplicate ? "yellow" : "green", styles: actionAlertStyles }, runtime.output?.duplicate ? `Credential already stored under key "${runtime.output?.credentialKey || resolvedCredentialKey}" (duplicate).` : `Credential stored successfully under key "${runtime.output?.credentialKey || resolvedCredentialKey}".`), error && /* @__PURE__ */ React272.createElement(Alert52, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && !error && /* @__PURE__ */ React272.createElement(Alert52, { color: "red", styles: actionAlertStyles }, runtime.error.message));
29388
+ return /* @__PURE__ */ React272.createElement(Stack189, { gap: "md" }, !hasKey && /* @__PURE__ */ React272.createElement(Alert52, { color: "yellow", styles: actionAlertStyles }, "No credential key configured. Set one in template mode."), hasKey && !hasCredential && !isCompleted && /* @__PURE__ */ React272.createElement(Alert52, { color: "yellow", styles: actionAlertStyles }, "Waiting for credential data. It will be provided by a block reference or at execution time."), hasKey && hasCredential && !isCompleted && /* @__PURE__ */ React272.createElement(Stack189, { gap: "xs" }, /* @__PURE__ */ React272.createElement(Text162, { size: "xs", c: "dimmed" }, "Credential key: ", resolvedCredentialKey), /* @__PURE__ */ React272.createElement(CredentialPreview, { value: resolvedCredential }), /* @__PURE__ */ React272.createElement(Button54, { leftSection: submitting ? /* @__PURE__ */ React272.createElement(Loader52, { size: 14 }) : /* @__PURE__ */ React272.createElement(IconShieldCheck15, { size: 14 }), onClick: handleExecute, disabled: isDisabled || submitting, size: "sm" }, submitting ? "Storing..." : "Store Credential")), isCompleted && /* @__PURE__ */ React272.createElement(Alert52, { color: runtime.output?.duplicate ? "yellow" : "green", styles: actionAlertStyles }, runtime.output?.duplicate ? `Credential already stored under key "${runtime.output?.credentialKey || resolvedCredentialKey}" (duplicate).` : `Credential stored successfully under key "${runtime.output?.credentialKey || resolvedCredentialKey}".`), error && /* @__PURE__ */ React272.createElement(Alert52, { color: "red", styles: actionAlertStyles }, error), runtime.error?.message && !error && /* @__PURE__ */ React272.createElement(Alert52, { color: "red", styles: actionAlertStyles }, runtime.error.message));
29321
29389
  };
29322
29390
 
29323
29391
  // src/mantine/blocks/action/actionTypes/credentialStore/index.ts
@@ -29327,7 +29395,7 @@ registerActionTypeUI("qi/credential.store", {
29327
29395
  });
29328
29396
 
29329
29397
  // src/mantine/blocks/action/actionTypes/payment/PaymentConfig.tsx
29330
- import React273, { useCallback as useCallback99, useEffect as useEffect99, useState as useState124 } from "react";
29398
+ import React273, { useCallback as useCallback100, useEffect as useEffect100, useState as useState124 } from "react";
29331
29399
  import { Stack as Stack190, Text as Text163 } from "@mantine/core";
29332
29400
 
29333
29401
  // src/mantine/blocks/action/actionTypes/payment/types.ts
@@ -29363,11 +29431,11 @@ function isValidPaymentConfig(value) {
29363
29431
  var PaymentConfig = ({ inputs, onInputsChange }) => {
29364
29432
  const [localConfig, setLocalConfig] = useState124(() => parsePaymentInputs(inputs).paymentConfig);
29365
29433
  const [error, setError] = useState124(null);
29366
- useEffect99(() => {
29434
+ useEffect100(() => {
29367
29435
  setLocalConfig(parsePaymentInputs(inputs).paymentConfig);
29368
29436
  setError(null);
29369
29437
  }, [inputs]);
29370
- const handleChange = useCallback99(
29438
+ const handleChange = useCallback100(
29371
29439
  (value) => {
29372
29440
  setLocalConfig(value);
29373
29441
  setError(null);
@@ -29398,8 +29466,8 @@ var PaymentConfig = ({ inputs, onInputsChange }) => {
29398
29466
  };
29399
29467
 
29400
29468
  // src/mantine/blocks/action/actionTypes/payment/PaymentFlowDetail.tsx
29401
- import React274, { useCallback as useCallback100, useMemo as useMemo111, useState as useState125 } from "react";
29402
- import { Alert as Alert53, Button as Button55, Code as Code11, Divider as Divider26, Group as Group102, Loader as Loader52, Stack as Stack191, Text as Text164 } from "@mantine/core";
29469
+ import React274, { useCallback as useCallback101, useMemo as useMemo111, useState as useState125 } from "react";
29470
+ import { Alert as Alert53, Button as Button55, Code as Code11, Divider as Divider26, Group as Group102, Loader as Loader53, Stack as Stack191, Text as Text164 } from "@mantine/core";
29403
29471
  import { IconAlertTriangle as IconAlertTriangle6, IconCash as IconCash2, IconSearch as IconSearch6, IconSend as IconSend7 } from "@tabler/icons-react";
29404
29472
  function parsePrimarySkill3(rawSkill) {
29405
29473
  const coerce = (candidate) => {
@@ -29525,7 +29593,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29525
29593
  return null;
29526
29594
  }
29527
29595
  }, [parsed.paymentConfig]);
29528
- const handlePropose = useCallback100(async () => {
29596
+ const handlePropose = useCallback101(async () => {
29529
29597
  if (isDisabled || submitting) return;
29530
29598
  const skill = parsePrimarySkill3(block?.props?.skill);
29531
29599
  if (!skill) {
@@ -29558,7 +29626,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29558
29626
  setSubmitting(false);
29559
29627
  }
29560
29628
  }, [isDisabled, submitting, block, handlers, paymentConfig]);
29561
- const handleExecute = useCallback100(async () => {
29629
+ const handleExecute = useCallback101(async () => {
29562
29630
  if (isDisabled || submitting) return;
29563
29631
  const skill = parsePrimarySkill3(block?.props?.skill);
29564
29632
  if (!skill) {
@@ -29647,7 +29715,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29647
29715
  const isProposed = paymentStatus === "proposed" || !!proposal;
29648
29716
  const isSubmitted = paymentStatus === "submitted" || paymentStatus === "pending" || paymentStatus === "processing";
29649
29717
  const isTerminal = paymentStatus === "completed" || paymentStatus === "failed";
29650
- const handleCheckStatus = useCallback100(async () => {
29718
+ const handleCheckStatus = useCallback101(async () => {
29651
29719
  if (isDisabled || submitting) return;
29652
29720
  const skill = parsePrimarySkill3(block?.props?.skill);
29653
29721
  if (!skill) {
@@ -29681,7 +29749,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29681
29749
  fullWidth: true,
29682
29750
  variant: "light",
29683
29751
  color: "blue",
29684
- leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader52, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconSearch6, { size: 14 }),
29752
+ leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader53, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconSearch6, { size: 14 }),
29685
29753
  onClick: handleCheckStatus,
29686
29754
  disabled: isDisabled || submitting
29687
29755
  },
@@ -29692,7 +29760,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29692
29760
  fullWidth: true,
29693
29761
  variant: "light",
29694
29762
  color: "violet",
29695
- leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader52, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconCash2, { size: 14 }),
29763
+ leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader53, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconCash2, { size: 14 }),
29696
29764
  onClick: handlePropose,
29697
29765
  disabled: isDisabled || submitting || !paymentConfig
29698
29766
  },
@@ -29703,7 +29771,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
29703
29771
  fullWidth: true,
29704
29772
  variant: "light",
29705
29773
  color: "green",
29706
- leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader52, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconSend7, { size: 14 }),
29774
+ leftSection: submitting ? /* @__PURE__ */ React274.createElement(Loader53, { size: 14 }) : /* @__PURE__ */ React274.createElement(IconSend7, { size: 14 }),
29707
29775
  onClick: handleExecute,
29708
29776
  disabled: isDisabled || submitting
29709
29777
  },
@@ -29718,7 +29786,7 @@ registerActionTypeUI("qi/payment.execute", {
29718
29786
  });
29719
29787
 
29720
29788
  // src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
29721
- import React275, { useCallback as useCallback101, useEffect as useEffect100, useMemo as useMemo112, useState as useState126 } from "react";
29789
+ import React275, { useCallback as useCallback102, useEffect as useEffect101, useMemo as useMemo112, useState as useState126 } from "react";
29722
29790
  import { Flex as Flex34, Stack as Stack192, Text as Text165 } from "@mantine/core";
29723
29791
 
29724
29792
  // src/mantine/blocks/action/actionTypes/matrixDm/types.ts
@@ -29748,10 +29816,10 @@ var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
29748
29816
  const [searchValue, setSearchValue] = useState126("");
29749
29817
  const roomId = editor?.getRoomId?.() || null;
29750
29818
  const mx = editor?.getMatrixClient?.() || null;
29751
- useEffect100(() => {
29819
+ useEffect101(() => {
29752
29820
  setLocal(parseMatrixDmInputs(inputs));
29753
29821
  }, [inputs]);
29754
- useEffect100(() => {
29822
+ useEffect101(() => {
29755
29823
  (async () => {
29756
29824
  if (!roomId || !mx) return;
29757
29825
  try {
@@ -29762,7 +29830,7 @@ var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
29762
29830
  }
29763
29831
  })();
29764
29832
  }, [roomId, mx]);
29765
- const update = useCallback101(
29833
+ const update = useCallback102(
29766
29834
  (patch) => {
29767
29835
  const updated = { ...local, ...patch };
29768
29836
  setLocal(updated);
@@ -29937,18 +30005,18 @@ import { Group as Group104, Stack as Stack194, Text as Text168 } from "@mantine/
29937
30005
  import { IconMapPin } from "@tabler/icons-react";
29938
30006
 
29939
30007
  // src/mantine/blocks/location/template/TemplateConfig.tsx
29940
- import React280, { useCallback as useCallback103 } from "react";
30008
+ import React280, { useCallback as useCallback104 } from "react";
29941
30009
  import { IconSettings as IconSettings19 } from "@tabler/icons-react";
29942
30010
 
29943
30011
  // src/mantine/blocks/location/template/GeneralTab.tsx
29944
- import React279, { useEffect as useEffect102, useRef as useRef24, useState as useState129 } from "react";
30012
+ import React279, { useEffect as useEffect103, useRef as useRef25, useState as useState129 } from "react";
29945
30013
  import { Box as Box58, Divider as Divider27, Stack as Stack193, Text as Text166 } from "@mantine/core";
29946
30014
 
29947
30015
  // src/core/hooks/useUnlMap.ts
29948
- import { useEffect as useEffect101, useState as useState127 } from "react";
30016
+ import { useEffect as useEffect102, useState as useState127 } from "react";
29949
30017
  function useUnlMap() {
29950
30018
  const [status, setStatus] = useState127("loading");
29951
- useEffect101(() => {
30019
+ useEffect102(() => {
29952
30020
  if (typeof window === "undefined") {
29953
30021
  return;
29954
30022
  }
@@ -30003,7 +30071,7 @@ function useUnlMap() {
30003
30071
  }
30004
30072
 
30005
30073
  // src/mantine/blocks/location/components/TileSelector.tsx
30006
- import React278, { useState as useState128, useCallback as useCallback102 } from "react";
30074
+ import React278, { useState as useState128, useCallback as useCallback103 } from "react";
30007
30075
  import { ActionIcon as ActionIcon37, Group as Group103, Tooltip as Tooltip24 } from "@mantine/core";
30008
30076
  import { IconMap, IconMoon, IconSatellite, IconMountain } from "@tabler/icons-react";
30009
30077
  var TILE_LAYERS = {
@@ -30057,7 +30125,7 @@ function ensureLayer(map, config) {
30057
30125
  }
30058
30126
  var TileSelector = ({ mapRef }) => {
30059
30127
  const [active, setActive] = useState128("map");
30060
- const switchTo = useCallback102(
30128
+ const switchTo = useCallback103(
30061
30129
  (type) => {
30062
30130
  const map = mapRef.current;
30063
30131
  if (!map || active === type) return;
@@ -30118,17 +30186,17 @@ var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, on
30118
30186
  const [mapError, setMapError] = useState129(null);
30119
30187
  const { status, UnlSdk } = useUnlMap();
30120
30188
  const { mapConfig } = useBlocknoteContext();
30121
- const markerRef = useRef24(null);
30122
- const mapRef = useRef24(null);
30123
- const wrapperRef = useRef24(null);
30124
- const containerRef = useRef24(null);
30125
- useEffect102(() => {
30189
+ const markerRef = useRef25(null);
30190
+ const mapRef = useRef25(null);
30191
+ const wrapperRef = useRef25(null);
30192
+ const containerRef = useRef25(null);
30193
+ useEffect103(() => {
30126
30194
  setLocalTitle(title);
30127
30195
  }, [title]);
30128
- useEffect102(() => {
30196
+ useEffect103(() => {
30129
30197
  setLocalDescription(description);
30130
30198
  }, [description]);
30131
- useEffect102(() => {
30199
+ useEffect103(() => {
30132
30200
  if (status !== "ready" || !UnlSdk || mapRef.current || !mapConfig || !containerRef.current || !wrapperRef.current) return;
30133
30201
  try {
30134
30202
  const hasCoords = latitude && longitude;
@@ -30219,13 +30287,13 @@ var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, on
30219
30287
  // src/mantine/blocks/location/template/TemplateConfig.tsx
30220
30288
  var TemplateConfig17 = ({ editor, block }) => {
30221
30289
  const { closePanel } = usePanelStore();
30222
- const updateProp = useCallback103(
30290
+ const updateProp = useCallback104(
30223
30291
  (key, value) => {
30224
30292
  editor.updateBlock(block, { props: { ...block.props, [key]: value } });
30225
30293
  },
30226
30294
  [editor, block]
30227
30295
  );
30228
- const updateProps = useCallback103(
30296
+ const updateProps = useCallback104(
30229
30297
  (updates) => {
30230
30298
  editor.updateBlock(block, { props: { ...block.props, ...updates } });
30231
30299
  },
@@ -30254,17 +30322,17 @@ var TemplateConfig17 = ({ editor, block }) => {
30254
30322
  };
30255
30323
 
30256
30324
  // src/mantine/blocks/location/components/LocationMap.tsx
30257
- import React281, { useEffect as useEffect103, useRef as useRef25, useState as useState130 } from "react";
30258
- import { Box as Box59, Flex as Flex35, Loader as Loader53, Text as Text167 } from "@mantine/core";
30325
+ import React281, { useEffect as useEffect104, useRef as useRef26, useState as useState130 } from "react";
30326
+ import { Box as Box59, Flex as Flex35, Loader as Loader54, Text as Text167 } from "@mantine/core";
30259
30327
  var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker = true, showTilesControl = false }) => {
30260
30328
  const [mapError, setMapError] = useState130(null);
30261
30329
  const { mapConfig } = useBlocknoteContext();
30262
- const wrapperRef = useRef25(null);
30263
- const containerRef = useRef25(null);
30264
- const mapRef = useRef25(null);
30265
- const markerRef = useRef25(null);
30330
+ const wrapperRef = useRef26(null);
30331
+ const containerRef = useRef26(null);
30332
+ const mapRef = useRef26(null);
30333
+ const markerRef = useRef26(null);
30266
30334
  const { status, UnlSdk } = useUnlMap();
30267
- useEffect103(() => {
30335
+ useEffect104(() => {
30268
30336
  if (status !== "ready" || !UnlSdk || mapRef.current || !containerRef.current || !wrapperRef.current) return;
30269
30337
  let ro;
30270
30338
  let resizeTimer;
@@ -30295,7 +30363,7 @@ var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker =
30295
30363
  ro?.disconnect();
30296
30364
  };
30297
30365
  }, [status, UnlSdk, mapConfig]);
30298
- useEffect103(() => {
30366
+ useEffect104(() => {
30299
30367
  if (!mapRef.current || !latitude || !longitude) return;
30300
30368
  const coords = [Number(longitude), Number(latitude)];
30301
30369
  mapRef.current.setCenter(coords);
@@ -30316,7 +30384,7 @@ var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker =
30316
30384
  w,
30317
30385
  h
30318
30386
  },
30319
- /* @__PURE__ */ React281.createElement(Loader53, null)
30387
+ /* @__PURE__ */ React281.createElement(Loader54, null)
30320
30388
  );
30321
30389
  }
30322
30390
  if (status === "error" || mapError) {
@@ -30352,7 +30420,7 @@ var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker =
30352
30420
  };
30353
30421
  function LocationMap(props) {
30354
30422
  if (props.latitude === void 0 || props.longitude === void 0)
30355
- return /* @__PURE__ */ React281.createElement(Flex35, { w: "100%", h: 200, align: "center", justify: "center" }, /* @__PURE__ */ React281.createElement(Loader53, null));
30423
+ return /* @__PURE__ */ React281.createElement(Flex35, { w: "100%", h: 200, align: "center", justify: "center" }, /* @__PURE__ */ React281.createElement(Loader54, null));
30356
30424
  return /* @__PURE__ */ React281.createElement(UnlMap, { ...props });
30357
30425
  }
30358
30426
 
@@ -30431,11 +30499,11 @@ import React289, { useMemo as useMemo115 } from "react";
30431
30499
  import { Box as Box60, Group as Group106, Stack as Stack197, Text as Text171 } from "@mantine/core";
30432
30500
 
30433
30501
  // src/mantine/blocks/embed/template/TemplateConfig.tsx
30434
- import React288, { useCallback as useCallback104 } from "react";
30502
+ import React288, { useCallback as useCallback105 } from "react";
30435
30503
  import { IconSettings as IconSettings20 } from "@tabler/icons-react";
30436
30504
 
30437
30505
  // src/mantine/blocks/embed/template/GeneralTab.tsx
30438
- import React287, { useEffect as useEffect104, useState as useState131 } from "react";
30506
+ import React287, { useEffect as useEffect105, useState as useState131 } from "react";
30439
30507
  import { Stack as Stack196, Switch as Switch6, Text as Text170 } from "@mantine/core";
30440
30508
  var GeneralTab18 = ({
30441
30509
  url,
@@ -30457,10 +30525,10 @@ var GeneralTab18 = ({
30457
30525
  value: key,
30458
30526
  label: key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")
30459
30527
  }));
30460
- useEffect104(() => {
30528
+ useEffect105(() => {
30461
30529
  setLocalUrl(url);
30462
30530
  }, [url]);
30463
- useEffect104(() => {
30531
+ useEffect105(() => {
30464
30532
  setLocalHeight(height);
30465
30533
  }, [height]);
30466
30534
  return /* @__PURE__ */ React287.createElement(Stack196, { gap: "md" }, /* @__PURE__ */ React287.createElement(Stack196, { gap: "xs" }, /* @__PURE__ */ React287.createElement(Text170, { size: "sm", fw: 600 }, "URL"), /* @__PURE__ */ React287.createElement(
@@ -30493,7 +30561,7 @@ var GeneralTab18 = ({
30493
30561
  // src/mantine/blocks/embed/template/TemplateConfig.tsx
30494
30562
  var TemplateConfig18 = ({ editor, block }) => {
30495
30563
  const { closePanel } = usePanelStore();
30496
- const updateProp = useCallback104(
30564
+ const updateProp = useCallback105(
30497
30565
  (key, value) => {
30498
30566
  editor.updateBlock(block, { props: { ...block.props, [key]: value } });
30499
30567
  },
@@ -30581,11 +30649,11 @@ import React291, { useMemo as useMemo116 } from "react";
30581
30649
  import { Box as Box61, Group as Group107, Stack as Stack198, Text as Text172 } from "@mantine/core";
30582
30650
 
30583
30651
  // src/mantine/blocks/embed/flow/FlowConfig.tsx
30584
- import React290, { useCallback as useCallback105 } from "react";
30652
+ import React290, { useCallback as useCallback106 } from "react";
30585
30653
  import { IconSettings as IconSettings21 } from "@tabler/icons-react";
30586
30654
  var FlowConfig4 = ({ editor, block }) => {
30587
30655
  const { closePanel } = usePanelStore();
30588
- const updateProp = useCallback105(
30656
+ const updateProp = useCallback106(
30589
30657
  (key, value) => {
30590
30658
  editor.updateBlock(block, { props: { ...block.props, [key]: value } });
30591
30659
  },
@@ -30909,7 +30977,7 @@ blockRegistry.register({
30909
30977
  });
30910
30978
 
30911
30979
  // src/mantine/blocks/hooks/useBlockDependencies.ts
30912
- import { useMemo as useMemo117, useEffect as useEffect105, useState as useState132, useCallback as useCallback106 } from "react";
30980
+ import { useMemo as useMemo117, useEffect as useEffect106, useState as useState132, useCallback as useCallback107 } from "react";
30913
30981
 
30914
30982
  // src/mantine/blocks/hooks/useDependsOn.ts
30915
30983
  import { useMemo as useMemo118 } from "react";
@@ -31419,14 +31487,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
31419
31487
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
31420
31488
 
31421
31489
  // src/core/hooks/useMatrixProvider.ts
31422
- import { useEffect as useEffect106, useState as useState133, useRef as useRef26, useCallback as useCallback107, useMemo as useMemo119 } from "react";
31490
+ import { useEffect as useEffect107, useState as useState133, useRef as useRef27, useCallback as useCallback108, useMemo as useMemo119 } from "react";
31423
31491
  import { MatrixProvider } from "@ixo/matrix-crdt";
31424
31492
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
31425
31493
  const [matrixProvider, setProvider] = useState133(null);
31426
31494
  const [status, setStatus] = useState133("disconnected");
31427
- const isMountedRef = useRef26(true);
31428
- const providerRef = useRef26(null);
31429
- const retryTimeoutRef = useRef26(null);
31495
+ const isMountedRef = useRef27(true);
31496
+ const providerRef = useRef27(null);
31497
+ const retryTimeoutRef = useRef27(null);
31430
31498
  const providerOptions = useMemo119(
31431
31499
  () => ({
31432
31500
  translator: {
@@ -31440,22 +31508,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
31440
31508
  }),
31441
31509
  []
31442
31510
  );
31443
- const handleDocumentAvailable = useCallback107(() => {
31511
+ const handleDocumentAvailable = useCallback108(() => {
31444
31512
  if (isMountedRef.current) {
31445
31513
  setStatus("connected");
31446
31514
  }
31447
31515
  }, []);
31448
- const handleDocumentUnavailable = useCallback107(() => {
31516
+ const handleDocumentUnavailable = useCallback108(() => {
31449
31517
  if (isMountedRef.current) {
31450
31518
  setStatus("failed");
31451
31519
  }
31452
31520
  }, []);
31453
- const handleCanWriteChanged = useCallback107(() => {
31521
+ const handleCanWriteChanged = useCallback108(() => {
31454
31522
  if (isMountedRef.current && providerRef.current) {
31455
31523
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
31456
31524
  }
31457
31525
  }, []);
31458
- const initProvider = useCallback107(async () => {
31526
+ const initProvider = useCallback108(async () => {
31459
31527
  if (!isMountedRef.current) return;
31460
31528
  if (retryTimeoutRef.current) {
31461
31529
  clearTimeout(retryTimeoutRef.current);
@@ -31488,7 +31556,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
31488
31556
  }
31489
31557
  }
31490
31558
  }, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
31491
- useEffect106(() => {
31559
+ useEffect107(() => {
31492
31560
  isMountedRef.current = true;
31493
31561
  initProvider();
31494
31562
  return () => {
@@ -31505,7 +31573,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
31505
31573
  setStatus("disconnected");
31506
31574
  };
31507
31575
  }, [initProvider]);
31508
- useEffect106(() => {
31576
+ useEffect107(() => {
31509
31577
  return () => {
31510
31578
  isMountedRef.current = false;
31511
31579
  };
@@ -31524,7 +31592,7 @@ function useCollaborativeYDoc(_options) {
31524
31592
  }
31525
31593
 
31526
31594
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
31527
- import { useMemo as useMemo121, useEffect as useEffect108, useState as useState134, useRef as useRef28 } from "react";
31595
+ import { useMemo as useMemo121, useEffect as useEffect109, useState as useState134, useRef as useRef29 } from "react";
31528
31596
 
31529
31597
  // src/core/lib/matrixMetadata.ts
31530
31598
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -31793,7 +31861,7 @@ function logInvocation(matrixClient, roomId, invocation) {
31793
31861
  }
31794
31862
 
31795
31863
  // src/mantine/hooks/useFlowLifecycle.ts
31796
- import { useEffect as useEffect107, useCallback as useCallback108, useRef as useRef27 } from "react";
31864
+ import { useEffect as useEffect108, useCallback as useCallback109, useRef as useRef28 } from "react";
31797
31865
 
31798
31866
  // src/mantine/hooks/useFlowTTLCleanup.ts
31799
31867
  function performTTLCleanup(editor) {
@@ -32030,9 +32098,9 @@ function isBlockEnabledInFlow(block, editorDocument) {
32030
32098
  // src/mantine/hooks/useFlowLifecycle.ts
32031
32099
  var DEFAULT_INTERVAL_MS = 3e4;
32032
32100
  function useFlowLifecycle({ editor, connectionStatus, enabled = true }) {
32033
- const hasRunInitialRef = useRef27(false);
32034
- const runningRef = useRef27(false);
32035
- const runPipeline = useCallback108(async () => {
32101
+ const hasRunInitialRef = useRef28(false);
32102
+ const runningRef = useRef28(false);
32103
+ const runPipeline = useCallback109(async () => {
32036
32104
  if (!editor || runningRef.current) return;
32037
32105
  runningRef.current = true;
32038
32106
  try {
@@ -32044,19 +32112,19 @@ function useFlowLifecycle({ editor, connectionStatus, enabled = true }) {
32044
32112
  runningRef.current = false;
32045
32113
  }
32046
32114
  }, [editor]);
32047
- useEffect107(() => {
32115
+ useEffect108(() => {
32048
32116
  if (!enabled || !editor || connectionStatus !== "connected" || hasRunInitialRef.current) return;
32049
32117
  if (editor.docType !== "flow") return;
32050
32118
  hasRunInitialRef.current = true;
32051
32119
  runPipeline();
32052
32120
  }, [editor, connectionStatus, enabled, runPipeline]);
32053
- useEffect107(() => {
32121
+ useEffect108(() => {
32054
32122
  if (!enabled || !editor || connectionStatus !== "connected") return;
32055
32123
  if (editor.docType !== "flow") return;
32056
32124
  const id = setInterval(runPipeline, DEFAULT_INTERVAL_MS);
32057
32125
  return () => clearInterval(id);
32058
32126
  }, [editor, connectionStatus, enabled, runPipeline]);
32059
- useEffect107(() => {
32127
+ useEffect108(() => {
32060
32128
  if (!enabled || !editor || connectionStatus !== "connected") return;
32061
32129
  if (editor.docType !== "flow") return;
32062
32130
  const runtimeMap = editor._yRuntime;
@@ -32166,7 +32234,7 @@ function useCreateCollaborativeIxoEditor(options) {
32166
32234
  roomId: options.roomId
32167
32235
  });
32168
32236
  const metadataManager = useMemo121(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
32169
- useEffect108(() => {
32237
+ useEffect109(() => {
32170
32238
  return () => {
32171
32239
  metadataManager.dispose();
32172
32240
  };
@@ -32453,12 +32521,12 @@ function useCreateCollaborativeIxoEditor(options) {
32453
32521
  return void 0;
32454
32522
  };
32455
32523
  }
32456
- useEffect108(() => {
32524
+ useEffect109(() => {
32457
32525
  if (ixoEditor) {
32458
32526
  ixoEditor.isEditable = editable;
32459
32527
  }
32460
32528
  }, [ixoEditor, editable]);
32461
- useEffect108(() => {
32529
+ useEffect109(() => {
32462
32530
  if (connectionStatus !== "connected") {
32463
32531
  return;
32464
32532
  }
@@ -32481,9 +32549,9 @@ function useCreateCollaborativeIxoEditor(options) {
32481
32549
  }
32482
32550
  }, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, memoizedUser.id]);
32483
32551
  const [connectedUsers, setConnectedUsers] = useState134([]);
32484
- const activeBlockIdRef = useRef28(null);
32552
+ const activeBlockIdRef = useRef29(null);
32485
32553
  const awarenessInstance = matrixProvider?.awarenessInstance ?? null;
32486
- useEffect108(() => {
32554
+ useEffect109(() => {
32487
32555
  if (!awarenessInstance || connectionStatus !== "connected") {
32488
32556
  return;
32489
32557
  }
@@ -32501,7 +32569,7 @@ function useCreateCollaborativeIxoEditor(options) {
32501
32569
  awarenessInstance.off("change", updateUsers);
32502
32570
  };
32503
32571
  }, [awarenessInstance, connectionStatus]);
32504
- useEffect108(() => {
32572
+ useEffect109(() => {
32505
32573
  if (!awarenessInstance || connectionStatus !== "connected") {
32506
32574
  return;
32507
32575
  }
@@ -32530,7 +32598,7 @@ function useCreateCollaborativeIxoEditor(options) {
32530
32598
  };
32531
32599
  }, [awarenessInstance, connectionStatus, memoizedUser.id, memoizedUser.name, memoizedUser.color, memoizedUser.avatar]);
32532
32600
  useFlowLifecycle({ editor: ixoEditor, connectionStatus, enabled: permissions.write });
32533
- useEffect108(() => {
32601
+ useEffect109(() => {
32534
32602
  if (!ixoEditor) return;
32535
32603
  setActiveEditor(ixoEditor);
32536
32604
  return () => {
@@ -32559,7 +32627,7 @@ import { filterSuggestionItems } from "@blocknote/core";
32559
32627
  import { MantineProvider } from "@mantine/core";
32560
32628
 
32561
32629
  // src/mantine/components/CommandPalette.tsx
32562
- import React294, { useEffect as useEffect109, useRef as useRef29, useState as useState135, useMemo as useMemo122, useCallback as useCallback109 } from "react";
32630
+ import React294, { useEffect as useEffect110, useRef as useRef30, useState as useState135, useMemo as useMemo122, useCallback as useCallback110 } from "react";
32563
32631
  import { Box as Box62, Text as Text173, Stack as Stack199 } from "@mantine/core";
32564
32632
  var GROUP_ORDER = {
32565
32633
  Headings: 0,
@@ -32573,9 +32641,9 @@ var GROUP_ORDER = {
32573
32641
  Flows: 8
32574
32642
  };
32575
32643
  function PaletteItem({ item, isSelected, onClick, id }) {
32576
- const ref = useRef29(null);
32644
+ const ref = useRef30(null);
32577
32645
  const [hovered, setHovered] = useState135(false);
32578
- useEffect109(() => {
32646
+ useEffect110(() => {
32579
32647
  if (isSelected && ref.current) {
32580
32648
  ref.current.scrollIntoView({ block: "nearest" });
32581
32649
  }
@@ -32658,7 +32726,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
32658
32726
  }
32659
32727
  return groups;
32660
32728
  }, [items]);
32661
- const handleItemClick = useCallback109(
32729
+ const handleItemClick = useCallback110(
32662
32730
  (item) => {
32663
32731
  onItemClick?.(item);
32664
32732
  },
@@ -32818,7 +32886,7 @@ function PanelContent({ theme }) {
32818
32886
  }
32819
32887
 
32820
32888
  // src/mantine/components/CoverImage.tsx
32821
- import React300, { useState as useState139, useRef as useRef30, useEffect as useEffect112, useMemo as useMemo125 } from "react";
32889
+ import React300, { useState as useState139, useRef as useRef31, useEffect as useEffect113, useMemo as useMemo125 } from "react";
32822
32890
  import { Box as Box67, Group as Group111 } from "@mantine/core";
32823
32891
  import { IconMoodSmile, IconPhoto as IconPhoto5, IconSettings as IconSettings22, IconArrowsMove, IconTrash as IconTrash11, IconRefresh as IconRefresh6 } from "@tabler/icons-react";
32824
32892
 
@@ -32998,7 +33066,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
32998
33066
  });
32999
33067
 
33000
33068
  // src/mantine/components/Base/BaseIconPicker.tsx
33001
- import React297, { useState as useState137, useMemo as useMemo123, useEffect as useEffect110 } from "react";
33069
+ import React297, { useState as useState137, useMemo as useMemo123, useEffect as useEffect111 } from "react";
33002
33070
  import { TextInput as TextInput7, Tabs as Tabs4, Box as Box64, Stack as Stack200, UnstyledButton as UnstyledButton8, Text as Text175, Center as Center15, ScrollArea as ScrollArea9, Group as Group109, Popover as Popover6 } from "@mantine/core";
33003
33071
  import * as TablerIcons2 from "@tabler/icons-react";
33004
33072
  import { IconSearch as IconSearch7, IconX as IconX14, IconChevronLeft, IconChevronRight as IconChevronRight13 } from "@tabler/icons-react";
@@ -33043,7 +33111,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
33043
33111
  const query = searchQuery.toLowerCase();
33044
33112
  return allIcons.filter(([name]) => name.toLowerCase().includes(query));
33045
33113
  }, [allIcons, searchQuery]);
33046
- useEffect110(() => {
33114
+ useEffect111(() => {
33047
33115
  setCurrentPage(1);
33048
33116
  }, [searchQuery]);
33049
33117
  const paginatedIcons = useMemo123(() => {
@@ -33226,14 +33294,14 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
33226
33294
  import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
33227
33295
 
33228
33296
  // src/mantine/components/FlowSettingsPanel.tsx
33229
- import React299, { useState as useState138, useEffect as useEffect111, useCallback as useCallback110 } from "react";
33297
+ import React299, { useState as useState138, useEffect as useEffect112, useCallback as useCallback111 } from "react";
33230
33298
  import { Stack as Stack201, Group as Group110, Button as Button56, ActionIcon as ActionIcon38, Text as Text176, Box as Box66 } from "@mantine/core";
33231
33299
  import { IconPlus as IconPlus10, IconTrash as IconTrash10 } from "@tabler/icons-react";
33232
33300
  var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
33233
33301
  var FlowSettingsPanel = ({ editor }) => {
33234
33302
  const { closePanel } = usePanelStore();
33235
33303
  const [rows, setRows] = useState138([]);
33236
- const loadSettings = useCallback110(() => {
33304
+ const loadSettings = useCallback111(() => {
33237
33305
  const metadata = editor.getFlowMetadata?.();
33238
33306
  if (!metadata) return;
33239
33307
  const customRows = [];
@@ -33244,10 +33312,10 @@ var FlowSettingsPanel = ({ editor }) => {
33244
33312
  }
33245
33313
  setRows(customRows);
33246
33314
  }, [editor]);
33247
- useEffect111(() => {
33315
+ useEffect112(() => {
33248
33316
  loadSettings();
33249
33317
  }, [loadSettings]);
33250
- const handleKeyChange = useCallback110(
33318
+ const handleKeyChange = useCallback111(
33251
33319
  (index, newKey) => {
33252
33320
  setRows((prev) => {
33253
33321
  const updated = [...prev];
@@ -33264,7 +33332,7 @@ var FlowSettingsPanel = ({ editor }) => {
33264
33332
  },
33265
33333
  [editor]
33266
33334
  );
33267
- const handleValueChange = useCallback110(
33335
+ const handleValueChange = useCallback111(
33268
33336
  (index, newValue) => {
33269
33337
  setRows((prev) => {
33270
33338
  const updated = [...prev];
@@ -33278,10 +33346,10 @@ var FlowSettingsPanel = ({ editor }) => {
33278
33346
  },
33279
33347
  [editor]
33280
33348
  );
33281
- const handleAdd = useCallback110(() => {
33349
+ const handleAdd = useCallback111(() => {
33282
33350
  setRows((prev) => [...prev, { key: "", value: "" }]);
33283
33351
  }, []);
33284
- const handleDelete = useCallback110(
33352
+ const handleDelete = useCallback111(
33285
33353
  (index) => {
33286
33354
  setRows((prev) => {
33287
33355
  const row = prev[index];
@@ -33303,13 +33371,13 @@ function CoverImage({ coverImageUrl, logoUrl }) {
33303
33371
  const [isHovering, setIsHovering] = useState139(false);
33304
33372
  const [isRepositioning, setIsRepositioning] = useState139(false);
33305
33373
  const [coverPosition, setCoverPosition] = useState139(() => editor?.getPageMetadata?.()?.coverPosition ?? 50);
33306
- const coverFileInputRef = useRef30(null);
33307
- const logoFileInputRef = useRef30(null);
33374
+ const coverFileInputRef = useRef31(null);
33375
+ const logoFileInputRef = useRef31(null);
33308
33376
  const [opened, { open, close }] = useDisclosure7(false);
33309
33377
  const [metadata, setMetadata] = useState139(() => editor?.getPageMetadata?.() || null);
33310
33378
  const settingsPanelContent = useMemo125(() => editor ? /* @__PURE__ */ React300.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
33311
33379
  const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
33312
- useEffect112(() => {
33380
+ useEffect113(() => {
33313
33381
  if (!editor?._metadataManager) {
33314
33382
  return;
33315
33383
  }
@@ -33599,7 +33667,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
33599
33667
  }
33600
33668
 
33601
33669
  // src/mantine/components/PageTitle.tsx
33602
- import React301, { useState as useState140, useEffect as useEffect113, useRef as useRef31, useCallback as useCallback111 } from "react";
33670
+ import React301, { useState as useState140, useEffect as useEffect114, useRef as useRef32, useCallback as useCallback112 } from "react";
33603
33671
  import { Box as Box68 } from "@mantine/core";
33604
33672
  var DEFAULT_TITLE = "New page";
33605
33673
  function isUserTitle(name) {
@@ -33617,9 +33685,9 @@ function cleanEmptyEditable(el) {
33617
33685
  function PageTitle({ editor, editable }) {
33618
33686
  const [title, setTitle] = useState140("");
33619
33687
  const [hasIcon, setHasIcon] = useState140(false);
33620
- const titleRef = useRef31(null);
33621
- const isComposing = useRef31(false);
33622
- useEffect113(() => {
33688
+ const titleRef = useRef32(null);
33689
+ const isComposing = useRef32(false);
33690
+ useEffect114(() => {
33623
33691
  if (!editor?._metadataManager) return;
33624
33692
  const metadata = editor._metadataManager.getMetadata();
33625
33693
  const initial = isUserTitle(metadata?.title);
@@ -33639,12 +33707,12 @@ function PageTitle({ editor, editable }) {
33639
33707
  });
33640
33708
  return unsubscribe;
33641
33709
  }, [editor]);
33642
- useEffect113(() => {
33710
+ useEffect114(() => {
33643
33711
  if (titleRef.current && title && !titleRef.current.textContent) {
33644
33712
  titleRef.current.textContent = title;
33645
33713
  }
33646
33714
  }, [title]);
33647
- const saveTitle = useCallback111(
33715
+ const saveTitle = useCallback112(
33648
33716
  async (newTitle) => {
33649
33717
  const trimmed = newTitle.trim();
33650
33718
  const toSave = trimmed || DEFAULT_TITLE;
@@ -33660,19 +33728,19 @@ function PageTitle({ editor, editable }) {
33660
33728
  },
33661
33729
  [editor]
33662
33730
  );
33663
- const handleInput = useCallback111(() => {
33731
+ const handleInput = useCallback112(() => {
33664
33732
  if (titleRef.current) {
33665
33733
  cleanEmptyEditable(titleRef.current);
33666
33734
  setTitle(titleRef.current.textContent || "");
33667
33735
  }
33668
33736
  }, []);
33669
- const handleBlur = useCallback111(() => {
33737
+ const handleBlur = useCallback112(() => {
33670
33738
  if (titleRef.current) {
33671
33739
  cleanEmptyEditable(titleRef.current);
33672
33740
  saveTitle(titleRef.current.textContent || "");
33673
33741
  }
33674
33742
  }, [saveTitle]);
33675
- const handleKeyDown = useCallback111(
33743
+ const handleKeyDown = useCallback112(
33676
33744
  (e) => {
33677
33745
  if (isComposing.current) return;
33678
33746
  if (e.key === "Enter" || e.key === "ArrowDown") {
@@ -33683,7 +33751,7 @@ function PageTitle({ editor, editable }) {
33683
33751
  },
33684
33752
  [editor, saveTitle]
33685
33753
  );
33686
- useEffect113(() => {
33754
+ useEffect114(() => {
33687
33755
  const handleEditorKeyDown = (e) => {
33688
33756
  if (e.key !== "ArrowUp" || !titleRef.current) return;
33689
33757
  if (document.getElementById("bn-suggestion-menu")) return;
@@ -33707,7 +33775,7 @@ function PageTitle({ editor, editable }) {
33707
33775
  container?.removeEventListener("keydown", handleEditorKeyDown, true);
33708
33776
  };
33709
33777
  }, [editor]);
33710
- const handlePaste = useCallback111((e) => {
33778
+ const handlePaste = useCallback112((e) => {
33711
33779
  e.preventDefault();
33712
33780
  const text = e.clipboardData.getData("text/plain").replace(/\n/g, " ");
33713
33781
  document.execCommand("insertText", false, text);
@@ -33769,7 +33837,7 @@ if (typeof document !== "undefined") {
33769
33837
  }
33770
33838
 
33771
33839
  // src/mantine/components/ExternalDropZone.tsx
33772
- import React302, { useCallback as useCallback112, useEffect as useEffect114, useRef as useRef32, useState as useState141 } from "react";
33840
+ import React302, { useCallback as useCallback113, useEffect as useEffect115, useRef as useRef33, useState as useState141 } from "react";
33773
33841
  import { Box as Box69 } from "@mantine/core";
33774
33842
  var SCROLL_ZONE_SIZE = 80;
33775
33843
  var SCROLL_SPEED = 12;
@@ -33782,20 +33850,20 @@ var ExternalDropZone = ({
33782
33850
  onPlacementCancel,
33783
33851
  children
33784
33852
  }) => {
33785
- const containerRef = useRef32(null);
33853
+ const containerRef = useRef33(null);
33786
33854
  const [isValidDrag, setIsValidDrag] = useState141(false);
33787
33855
  const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState141(false);
33788
33856
  const [indicatorStyle, setIndicatorStyle] = useState141({});
33789
- const dropPositionRef = useRef32(null);
33790
- const scrollAnimationRef = useRef32(null);
33791
- const scrollDirectionRef = useRef32(null);
33792
- const scrollContainerRef = useRef32(null);
33793
- const getBlockElements = useCallback112(() => {
33857
+ const dropPositionRef = useRef33(null);
33858
+ const scrollAnimationRef = useRef33(null);
33859
+ const scrollDirectionRef = useRef33(null);
33860
+ const scrollContainerRef = useRef33(null);
33861
+ const getBlockElements = useCallback113(() => {
33794
33862
  if (!containerRef.current) return [];
33795
33863
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
33796
33864
  return Array.from(blocks);
33797
33865
  }, []);
33798
- const getScrollContainer = useCallback112(() => {
33866
+ const getScrollContainer = useCallback113(() => {
33799
33867
  if (scrollContainerRef.current) return scrollContainerRef.current;
33800
33868
  let element = containerRef.current;
33801
33869
  while (element) {
@@ -33810,7 +33878,7 @@ var ExternalDropZone = ({
33810
33878
  scrollContainerRef.current = window;
33811
33879
  return window;
33812
33880
  }, []);
33813
- const performScroll = useCallback112(() => {
33881
+ const performScroll = useCallback113(() => {
33814
33882
  const container = getScrollContainer();
33815
33883
  const direction = scrollDirectionRef.current;
33816
33884
  if (!direction) {
@@ -33825,7 +33893,7 @@ var ExternalDropZone = ({
33825
33893
  }
33826
33894
  scrollAnimationRef.current = requestAnimationFrame(performScroll);
33827
33895
  }, [getScrollContainer]);
33828
- const startAutoScroll = useCallback112(
33896
+ const startAutoScroll = useCallback113(
33829
33897
  (direction) => {
33830
33898
  if (scrollDirectionRef.current === direction) return;
33831
33899
  scrollDirectionRef.current = direction;
@@ -33835,14 +33903,14 @@ var ExternalDropZone = ({
33835
33903
  },
33836
33904
  [performScroll]
33837
33905
  );
33838
- const stopAutoScroll = useCallback112(() => {
33906
+ const stopAutoScroll = useCallback113(() => {
33839
33907
  scrollDirectionRef.current = null;
33840
33908
  if (scrollAnimationRef.current) {
33841
33909
  cancelAnimationFrame(scrollAnimationRef.current);
33842
33910
  scrollAnimationRef.current = null;
33843
33911
  }
33844
33912
  }, []);
33845
- const checkAutoScroll = useCallback112(
33913
+ const checkAutoScroll = useCallback113(
33846
33914
  (clientY) => {
33847
33915
  const container = getScrollContainer();
33848
33916
  let containerTop;
@@ -33865,7 +33933,7 @@ var ExternalDropZone = ({
33865
33933
  },
33866
33934
  [getScrollContainer, startAutoScroll, stopAutoScroll]
33867
33935
  );
33868
- const findDropPosition = useCallback112(
33936
+ const findDropPosition = useCallback113(
33869
33937
  (clientY) => {
33870
33938
  const blocks = getBlockElements();
33871
33939
  if (blocks.length === 0 || !editor?.document) return null;
@@ -33898,7 +33966,7 @@ var ExternalDropZone = ({
33898
33966
  },
33899
33967
  [getBlockElements, editor]
33900
33968
  );
33901
- const handleDragOver = useCallback112(
33969
+ const handleDragOver = useCallback113(
33902
33970
  (e) => {
33903
33971
  if (!e.dataTransfer.types.includes(acceptedType)) return;
33904
33972
  e.preventDefault();
@@ -33921,7 +33989,7 @@ var ExternalDropZone = ({
33921
33989
  },
33922
33990
  [acceptedType, findDropPosition, checkAutoScroll]
33923
33991
  );
33924
- const handleDragLeave = useCallback112(
33992
+ const handleDragLeave = useCallback113(
33925
33993
  (e) => {
33926
33994
  if (containerRef.current && !containerRef.current.contains(e.relatedTarget)) {
33927
33995
  setIsValidDrag(false);
@@ -33931,7 +33999,7 @@ var ExternalDropZone = ({
33931
33999
  },
33932
34000
  [stopAutoScroll]
33933
34001
  );
33934
- const handleDrop = useCallback112(
34002
+ const handleDrop = useCallback113(
33935
34003
  (e) => {
33936
34004
  e.preventDefault();
33937
34005
  e.stopPropagation();
@@ -33945,7 +34013,7 @@ var ExternalDropZone = ({
33945
34013
  },
33946
34014
  [onDrop, stopAutoScroll]
33947
34015
  );
33948
- useEffect114(() => {
34016
+ useEffect115(() => {
33949
34017
  const handleGlobalDragEnd = () => {
33950
34018
  setIsValidDrag(false);
33951
34019
  dropPositionRef.current = null;
@@ -33954,7 +34022,7 @@ var ExternalDropZone = ({
33954
34022
  window.addEventListener("dragend", handleGlobalDragEnd);
33955
34023
  return () => window.removeEventListener("dragend", handleGlobalDragEnd);
33956
34024
  }, [stopAutoScroll]);
33957
- const handleOverlayMouseMove = useCallback112(
34025
+ const handleOverlayMouseMove = useCallback113(
33958
34026
  (e) => {
33959
34027
  setIsHoveringInPlacementMode(true);
33960
34028
  checkAutoScroll(e.clientY);
@@ -33973,12 +34041,12 @@ var ExternalDropZone = ({
33973
34041
  },
33974
34042
  [findDropPosition, checkAutoScroll]
33975
34043
  );
33976
- const handleOverlayMouseLeave = useCallback112(() => {
34044
+ const handleOverlayMouseLeave = useCallback113(() => {
33977
34045
  setIsHoveringInPlacementMode(false);
33978
34046
  dropPositionRef.current = null;
33979
34047
  stopAutoScroll();
33980
34048
  }, [stopAutoScroll]);
33981
- const handleOverlayClick = useCallback112(
34049
+ const handleOverlayClick = useCallback113(
33982
34050
  (e) => {
33983
34051
  e.preventDefault();
33984
34052
  e.stopPropagation();
@@ -33992,7 +34060,7 @@ var ExternalDropZone = ({
33992
34060
  },
33993
34061
  [onDrop, stopAutoScroll]
33994
34062
  );
33995
- const handleOverlayWheel = useCallback112(
34063
+ const handleOverlayWheel = useCallback113(
33996
34064
  (e) => {
33997
34065
  const container = getScrollContainer();
33998
34066
  if (container === window) {
@@ -34003,7 +34071,7 @@ var ExternalDropZone = ({
34003
34071
  },
34004
34072
  [getScrollContainer]
34005
34073
  );
34006
- useEffect114(() => {
34074
+ useEffect115(() => {
34007
34075
  if (!isPlacementMode) return;
34008
34076
  const handleKeyDown = (e) => {
34009
34077
  if (e.key === "Escape") {
@@ -34026,13 +34094,13 @@ var ExternalDropZone = ({
34026
34094
  document.removeEventListener("click", handleGlobalClick, true);
34027
34095
  };
34028
34096
  }, [isPlacementMode, onPlacementCancel]);
34029
- useEffect114(() => {
34097
+ useEffect115(() => {
34030
34098
  if (!isPlacementMode) {
34031
34099
  setIsHoveringInPlacementMode(false);
34032
34100
  dropPositionRef.current = null;
34033
34101
  }
34034
34102
  }, [isPlacementMode]);
34035
- useEffect114(() => {
34103
+ useEffect115(() => {
34036
34104
  const isActive = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
34037
34105
  if (isActive) {
34038
34106
  document.body.classList.add("external-artifact-drag-active");
@@ -34043,7 +34111,7 @@ var ExternalDropZone = ({
34043
34111
  document.body.classList.remove("external-artifact-drag-active");
34044
34112
  };
34045
34113
  }, [isValidDrag, isPlacementMode, isHoveringInPlacementMode]);
34046
- useEffect114(() => {
34114
+ useEffect115(() => {
34047
34115
  return () => {
34048
34116
  if (scrollAnimationRef.current) {
34049
34117
  cancelAnimationFrame(scrollAnimationRef.current);
@@ -34333,7 +34401,7 @@ function DebugButton({ editor }) {
34333
34401
  }
34334
34402
 
34335
34403
  // src/mantine/components/PageHeader.tsx
34336
- import React305, { useState as useState142, useRef as useRef33, useEffect as useEffect115 } from "react";
34404
+ import React305, { useState as useState142, useRef as useRef34, useEffect as useEffect116 } from "react";
34337
34405
  function PageHeader({
34338
34406
  title = "New page",
34339
34407
  icon: icon2,
@@ -34347,9 +34415,9 @@ function PageHeader({
34347
34415
  }) {
34348
34416
  const [isMenuOpen, setIsMenuOpen] = useState142(false);
34349
34417
  const [isPrivacyOpen, setIsPrivacyOpen] = useState142(false);
34350
- const menuRef = useRef33(null);
34351
- const privacyRef = useRef33(null);
34352
- useEffect115(() => {
34418
+ const menuRef = useRef34(null);
34419
+ const privacyRef = useRef34(null);
34420
+ useEffect116(() => {
34353
34421
  function handleClickOutside(event) {
34354
34422
  if (menuRef.current && !menuRef.current.contains(event.target)) {
34355
34423
  setIsMenuOpen(false);
@@ -34619,8 +34687,8 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
34619
34687
  };
34620
34688
 
34621
34689
  // src/mantine/components/FlowPermissionsPanel.tsx
34622
- import React307, { useState as useState144, useEffect as useEffect116, useMemo as useMemo126 } from "react";
34623
- import { Stack as Stack203, Text as Text178, Paper as Paper19, Group as Group113, Badge as Badge46, Button as Button58, ActionIcon as ActionIcon39, Loader as Loader54, Alert as Alert55, Divider as Divider28 } from "@mantine/core";
34690
+ import React307, { useState as useState144, useEffect as useEffect117, useMemo as useMemo126 } from "react";
34691
+ import { Stack as Stack203, Text as Text178, Paper as Paper19, Group as Group113, Badge as Badge46, Button as Button58, ActionIcon as ActionIcon39, Loader as Loader55, Alert as Alert55, Divider as Divider28 } from "@mantine/core";
34624
34692
  import { IconPlus as IconPlus11, IconTrash as IconTrash12, IconShieldCheck as IconShieldCheck16, IconUser as IconUser14, IconRobot as IconRobot4, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
34625
34693
  var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
34626
34694
  const [delegations, setDelegations] = useState144([]);
@@ -34632,7 +34700,7 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
34632
34700
  }
34633
34701
  return null;
34634
34702
  }, [editor]);
34635
- useEffect116(() => {
34703
+ useEffect117(() => {
34636
34704
  const loadDelegations = async () => {
34637
34705
  setLoading(true);
34638
34706
  let allDelegations = [];
@@ -34697,12 +34765,12 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
34697
34765
  if (date < /* @__PURE__ */ new Date()) return "Expired";
34698
34766
  return date.toLocaleDateString();
34699
34767
  };
34700
- return /* @__PURE__ */ React307.createElement(Stack203, { gap: "md" }, /* @__PURE__ */ React307.createElement(Stack203, { gap: "xs" }, /* @__PURE__ */ React307.createElement(Text178, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React307.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React307.createElement(IconShieldCheck16, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React307.createElement(Stack203, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React307.createElement(Badge46, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React307.createElement(Divider28, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React307.createElement(Group113, { justify: "center", py: "xl" }, /* @__PURE__ */ React307.createElement(Loader54, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React307.createElement(Alert55, { color: "gray", variant: "light" }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React307.createElement(Stack203, { gap: "xs" }, delegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React307.createElement(Paper19, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React307.createElement(Group113, { justify: "space-between" }, /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React307.createElement(Stack203, { gap: 2 }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React307.createElement(ActionIcon39, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React307.createElement(IconTrash12, { size: 16 })))))), /* @__PURE__ */ React307.createElement(Button58, { leftSection: /* @__PURE__ */ React307.createElement(IconPlus11, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
34768
+ return /* @__PURE__ */ React307.createElement(Stack203, { gap: "md" }, /* @__PURE__ */ React307.createElement(Stack203, { gap: "xs" }, /* @__PURE__ */ React307.createElement(Text178, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React307.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React307.createElement(IconShieldCheck16, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React307.createElement(Stack203, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React307.createElement(Badge46, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React307.createElement(Divider28, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React307.createElement(Group113, { justify: "center", py: "xl" }, /* @__PURE__ */ React307.createElement(Loader55, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React307.createElement(Alert55, { color: "gray", variant: "light" }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React307.createElement(Stack203, { gap: "xs" }, delegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React307.createElement(Paper19, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React307.createElement(Group113, { justify: "space-between" }, /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React307.createElement(Stack203, { gap: 2 }, /* @__PURE__ */ React307.createElement(Text178, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React307.createElement(Group113, { gap: "xs" }, /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React307.createElement(Text178, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React307.createElement(ActionIcon39, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React307.createElement(IconTrash12, { size: 16 })))))), /* @__PURE__ */ React307.createElement(Button58, { leftSection: /* @__PURE__ */ React307.createElement(IconPlus11, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
34701
34769
  };
34702
34770
 
34703
34771
  // src/mantine/components/GrantPermissionModal.tsx
34704
- import React308, { useState as useState145, useCallback as useCallback113 } from "react";
34705
- import { Modal as Modal5, Stack as Stack204, Text as Text179, TextInput as TextInput9, Button as Button59, Group as Group114, Radio as Radio5, Checkbox as Checkbox13, Alert as Alert56, Paper as Paper20, Loader as Loader55, Badge as Badge47, ActionIcon as ActionIcon40, Divider as Divider29, NumberInput as NumberInput3 } from "@mantine/core";
34772
+ import React308, { useState as useState145, useCallback as useCallback114 } from "react";
34773
+ import { Modal as Modal5, Stack as Stack204, Text as Text179, TextInput as TextInput9, Button as Button59, Group as Group114, Radio as Radio5, Checkbox as Checkbox13, Alert as Alert56, Paper as Paper20, Loader as Loader56, Badge as Badge47, ActionIcon as ActionIcon40, Divider as Divider29, NumberInput as NumberInput3 } from "@mantine/core";
34706
34774
  import { IconSearch as IconSearch8, IconUser as IconUser15, IconRobot as IconRobot5, IconX as IconX15, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
34707
34775
  var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
34708
34776
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
@@ -34722,7 +34790,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
34722
34790
  const [pin, setPin] = useState145("");
34723
34791
  const [loading, setLoading] = useState145(false);
34724
34792
  const [error, setError] = useState145(null);
34725
- const handleSearch = useCallback113(async () => {
34793
+ const handleSearch = useCallback114(async () => {
34726
34794
  if (searchQuery.length < 2) return;
34727
34795
  setSearching(true);
34728
34796
  try {
@@ -34833,7 +34901,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
34833
34901
  {
34834
34902
  placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
34835
34903
  leftSection: /* @__PURE__ */ React308.createElement(IconSearch8, { size: 16 }),
34836
- rightSection: searching ? /* @__PURE__ */ React308.createElement(Loader55, { size: 14 }) : null,
34904
+ rightSection: searching ? /* @__PURE__ */ React308.createElement(Loader56, { size: 14 }) : null,
34837
34905
  value: searchQuery,
34838
34906
  onChange: (e) => setSearchQuery(e.currentTarget.value),
34839
34907
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
@@ -34980,4 +35048,4 @@ export {
34980
35048
  getExtraSlashMenuItems,
34981
35049
  useCreateIxoEditor
34982
35050
  };
34983
- //# sourceMappingURL=chunk-5POKGPCS.mjs.map
35051
+ //# sourceMappingURL=chunk-WIPR64OD.mjs.map