@ixo/editor 2.27.0 → 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -326,6 +326,41 @@ function registerBuiltInActionTypes() {
326
326
  registerHookedActionType(addLinkedEntityAction);
327
327
  }
328
328
 
329
+ // src/mantine/blocks/hooks/hookedActions/extractSurveyFields.ts
330
+ function extractSurveyFields(schema) {
331
+ const fields = [];
332
+ if (!schema) return fields;
333
+ const extractFromElements = (elements) => {
334
+ if (!Array.isArray(elements)) return;
335
+ for (const el of elements) {
336
+ if (el.name) {
337
+ fields.push({
338
+ name: el.name,
339
+ title: el.title || el.name
340
+ });
341
+ }
342
+ if (el.elements) extractFromElements(el.elements);
343
+ }
344
+ };
345
+ if (Array.isArray(schema.pages)) {
346
+ for (const page of schema.pages) {
347
+ extractFromElements(page.elements || []);
348
+ }
349
+ }
350
+ if (Array.isArray(schema.elements)) {
351
+ extractFromElements(schema.elements);
352
+ }
353
+ return fields;
354
+ }
355
+ function surveyFieldsToPayloadFields(schema, parentKey = "surveyAnswers") {
356
+ return extractSurveyFields(schema).map((field) => ({
357
+ key: `${parentKey}.${field.name}`,
358
+ label: `Survey: ${field.title}`,
359
+ type: "string",
360
+ description: `Survey field: ${field.title}`
361
+ }));
362
+ }
363
+
329
364
  // src/mantine/blocks/governanceGroup/actions.ts
330
365
  var governanceGroupActions = [
331
366
  {
@@ -11001,7 +11036,7 @@ var SimpleUCANManager = class {
11001
11036
  };
11002
11037
 
11003
11038
  // src/mantine/components/HookedActionsTab/HookedActionsTab.tsx
11004
- import React115, { useCallback as useCallback23, useMemo as useMemo21, useEffect as useEffect24 } from "react";
11039
+ import React115, { useCallback as useCallback23, useMemo as useMemo21, useEffect as useEffect24, useState as useState37 } from "react";
11005
11040
  import { Stack as Stack86, Text as Text60, Alert as Alert13, Accordion as Accordion3, Group as Group34, Badge as Badge15, Menu as Menu2, Button as Button21 } from "@mantine/core";
11006
11041
  import { IconPlus as IconPlus5, IconMail as IconMail3, IconLink as IconLink2 } from "@tabler/icons-react";
11007
11042
 
@@ -11267,9 +11302,33 @@ function ensureActionTypesRegistered() {
11267
11302
  }
11268
11303
  }
11269
11304
  var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedActionsChange }) => {
11305
+ const handlers = useBlocknoteHandlers();
11270
11306
  useEffect24(() => {
11271
11307
  ensureActionTypesRegistered();
11272
11308
  }, []);
11309
+ const [dynamicFields, setDynamicFields] = useState37({});
11310
+ useEffect24(() => {
11311
+ const blockProps = block?.props || {};
11312
+ let cancelled = false;
11313
+ const resolveAll = async () => {
11314
+ const results = {};
11315
+ for (const action of blockActions) {
11316
+ if (action.resolveDynamicFields) {
11317
+ try {
11318
+ const fields = await action.resolveDynamicFields({ handlers, blockProps });
11319
+ results[action.actionId] = fields;
11320
+ } catch {
11321
+ results[action.actionId] = [];
11322
+ }
11323
+ }
11324
+ }
11325
+ if (!cancelled) setDynamicFields(results);
11326
+ };
11327
+ resolveAll();
11328
+ return () => {
11329
+ cancelled = true;
11330
+ };
11331
+ }, [blockActions, handlers, block?.props]);
11273
11332
  const config = useMemo21(() => parseHookedActionsConfig(hookedActions), [hookedActions]);
11274
11333
  const availableActionTypes = useMemo21(() => {
11275
11334
  ensureActionTypesRegistered();
@@ -11370,6 +11429,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
11370
11429
  blockActions.map((blockAction) => {
11371
11430
  const actionsForThisEvent = config[blockAction.actionId] || [];
11372
11431
  const enabledCount = actionsForThisEvent.filter((a) => a.enabled).length;
11432
+ const allPayloadFields = [...blockAction.payloadSchema.filter((f) => f.type !== "object"), ...dynamicFields[blockAction.actionId] || []];
11373
11433
  return /* @__PURE__ */ React115.createElement(Accordion3.Item, { key: blockAction.actionId, value: blockAction.actionId }, /* @__PURE__ */ React115.createElement(Accordion3.Control, null, /* @__PURE__ */ React115.createElement(Group34, { justify: "space-between", pr: "md" }, /* @__PURE__ */ React115.createElement(Stack86, { gap: 2 }, /* @__PURE__ */ React115.createElement(Text60, { size: "sm", fw: 500, c: "#f1f3f5" }, blockAction.label), /* @__PURE__ */ React115.createElement(Text60, { size: "xs", c: "#666" }, blockAction.description)), actionsForThisEvent.length > 0 && /* @__PURE__ */ React115.createElement(
11374
11434
  Badge15,
11375
11435
  {
@@ -11382,7 +11442,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
11382
11442
  },
11383
11443
  enabledCount,
11384
11444
  " active"
11385
- ))), /* @__PURE__ */ React115.createElement(Accordion3.Panel, null, /* @__PURE__ */ React115.createElement(Stack86, { gap: "sm" }, blockAction.payloadSchema.length > 0 && /* @__PURE__ */ React115.createElement(
11445
+ ))), /* @__PURE__ */ React115.createElement(Accordion3.Panel, null, /* @__PURE__ */ React115.createElement(Stack86, { gap: "sm" }, allPayloadFields.length > 0 && /* @__PURE__ */ React115.createElement(
11386
11446
  Stack86,
11387
11447
  {
11388
11448
  gap: "xs",
@@ -11394,7 +11454,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
11394
11454
  }
11395
11455
  },
11396
11456
  /* @__PURE__ */ React115.createElement(Text60, { size: "xs", fw: 500, c: "#adb5bd" }, "Available payload data:"),
11397
- /* @__PURE__ */ React115.createElement(Group34, { gap: "xs" }, blockAction.payloadSchema.map((field) => /* @__PURE__ */ React115.createElement(
11457
+ /* @__PURE__ */ React115.createElement(Group34, { gap: "xs" }, allPayloadFields.map((field) => /* @__PURE__ */ React115.createElement(
11398
11458
  Badge15,
11399
11459
  {
11400
11460
  key: field.key,
@@ -11416,7 +11476,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
11416
11476
  key: instance.id,
11417
11477
  instance,
11418
11478
  actionType,
11419
- payloadFields: blockAction.payloadSchema,
11479
+ payloadFields: allPayloadFields,
11420
11480
  availableBlocks,
11421
11481
  onUpdate: (updates) => handleUpdateAction(blockAction.actionId, instance.id, updates),
11422
11482
  onRemove: () => handleRemoveAction(blockAction.actionId, instance.id)
@@ -11471,7 +11531,7 @@ import React118 from "react";
11471
11531
  import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
11472
11532
 
11473
11533
  // src/mantine/blocks/dynamicList/DynamicListBlock.tsx
11474
- import React117, { useMemo as useMemo23, useState as useState38, useCallback as useCallback24, useEffect as useEffect25, useRef as useRef4 } from "react";
11534
+ import React117, { useMemo as useMemo23, useState as useState39, useCallback as useCallback24, useEffect as useEffect25, useRef as useRef4 } from "react";
11475
11535
  import { Box as Box27, Stack as Stack88, Text as Text62, Paper as Paper11, Group as Group36, Button as Button22, ActionIcon as ActionIcon15, Tooltip as Tooltip10, Code as Code4, Flex as Flex24, Collapse as Collapse6, Title as Title4, Badge as Badge16, TextInput as TextInput6, CloseButton as CloseButton4, Select as Select3, Menu as Menu3 } from "@mantine/core";
11476
11536
  import { useDisclosure as useDisclosure4 } from "@mantine/hooks";
11477
11537
  import {
@@ -11492,7 +11552,7 @@ import {
11492
11552
  } from "@tabler/icons-react";
11493
11553
 
11494
11554
  // src/mantine/blocks/dynamicList/DynamicListSelectionPanel.tsx
11495
- import React116, { useMemo as useMemo22, useState as useState37 } from "react";
11555
+ import React116, { useMemo as useMemo22, useState as useState38 } from "react";
11496
11556
  import { Paper as Paper10, CloseButton as CloseButton3, Stack as Stack87, Text as Text61, Box as Box26, Group as Group35, Divider as Divider10, Code as Code3, ScrollArea as ScrollArea5, Collapse as Collapse5 } from "@mantine/core";
11497
11557
  import { IconSparkles, IconChevronDown as IconChevronDown5, IconChevronRight as IconChevronRight4 } from "@tabler/icons-react";
11498
11558
  function formatKeyAsLabel(key) {
@@ -11522,7 +11582,7 @@ function DefaultKeyValueView({
11522
11582
  panelDescription
11523
11583
  // actions,
11524
11584
  }) {
11525
- const [valuesExpanded, setValuesExpanded] = useState37(false);
11585
+ const [valuesExpanded, setValuesExpanded] = useState38(false);
11526
11586
  const columnMap = useMemo22(() => {
11527
11587
  const map = {};
11528
11588
  columns.forEach((col) => {
@@ -11640,19 +11700,19 @@ function DynamicListBlock({ block, editor }) {
11640
11700
  panelDescription
11641
11701
  /* actions */
11642
11702
  } = block.props;
11643
- const [useLiveMode, setUseLiveMode] = useState38(false);
11703
+ const [useLiveMode, setUseLiveMode] = useState39(false);
11644
11704
  const [opened, { toggle }] = useDisclosure4(true);
11645
- const [selectedIds, setSelectedIds] = useState38(/* @__PURE__ */ new Set());
11646
- const [selectedItem, setSelectedItem] = useState38(null);
11647
- const [isMultiSelect, setIsMultiSelect] = useState38(false);
11648
- const [page, setPage] = useState38(1);
11649
- const [sortConfig, setSortConfig] = useState38(null);
11650
- const [showSearch, setShowSearch] = useState38(false);
11651
- const [searchQuery, setSearchQuery] = useState38("");
11705
+ const [selectedIds, setSelectedIds] = useState39(/* @__PURE__ */ new Set());
11706
+ const [selectedItem, setSelectedItem] = useState39(null);
11707
+ const [isMultiSelect, setIsMultiSelect] = useState39(false);
11708
+ const [page, setPage] = useState39(1);
11709
+ const [sortConfig, setSortConfig] = useState39(null);
11710
+ const [showSearch, setShowSearch] = useState39(false);
11711
+ const [searchQuery, setSearchQuery] = useState39("");
11652
11712
  const searchInputRef = useRef4(null);
11653
- const [orderByCollapsed, setOrderByCollapsed] = useState38(true);
11654
- const [columnsCollapsed, setColumnsCollapsed] = useState38(true);
11655
- const [showInfo, setShowInfo] = useState38(false);
11713
+ const [orderByCollapsed, setOrderByCollapsed] = useState39(true);
11714
+ const [columnsCollapsed, setColumnsCollapsed] = useState39(true);
11715
+ const [showInfo, setShowInfo] = useState39(false);
11656
11716
  const parsedColumns = useMemo23(() => {
11657
11717
  try {
11658
11718
  return typeof columns === "string" ? JSON.parse(columns) : columns;
@@ -12139,7 +12199,7 @@ var DynamicListBlockSpec = createReactBlockSpec6(
12139
12199
  );
12140
12200
 
12141
12201
  // src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
12142
- import React125, { useState as useState40, useEffect as useEffect26, useMemo as useMemo24, useCallback as useCallback25 } from "react";
12202
+ import React125, { useState as useState41, useEffect as useEffect26, useMemo as useMemo24, useCallback as useCallback25 } from "react";
12143
12203
  import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
12144
12204
  import { Stack as Stack94, Text as Text68, Button as Button27, ActionIcon as ActionIcon16, Center as Center5, Flex as Flex26 } from "@mantine/core";
12145
12205
 
@@ -12155,7 +12215,7 @@ function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck
12155
12215
  }
12156
12216
 
12157
12217
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
12158
- import React124, { useState as useState39 } from "react";
12218
+ import React124, { useState as useState40 } from "react";
12159
12219
  import { Modal, Group as Group40, Box as Box30 } from "@mantine/core";
12160
12220
 
12161
12221
  // src/mantine/blocks/list/modal/ModalNavigation.tsx
@@ -12425,9 +12485,9 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
12425
12485
 
12426
12486
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
12427
12487
  var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
12428
- const [activeStep, setActiveStep] = useState39("type");
12429
- const [selectedType, setSelectedType] = useState39(initialConfig?.listType || null);
12430
- const [config, setConfig] = useState39(initialConfig?.listConfig || {});
12488
+ const [activeStep, setActiveStep] = useState40("type");
12489
+ const [selectedType, setSelectedType] = useState40(initialConfig?.listType || null);
12490
+ const [config, setConfig] = useState40(initialConfig?.listConfig || {});
12431
12491
  const handleTypeSelect = (type) => {
12432
12492
  setSelectedType(type);
12433
12493
  const configFieldsByType = getEnumListTypesConfigFields(type);
@@ -12508,7 +12568,7 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
12508
12568
  var IconSettings2 = () => /* @__PURE__ */ React125.createElement("span", null, "\u2699\uFE0F");
12509
12569
  var EnumChecklistBlockType = "enumChecklist";
12510
12570
  var EnumChecklistBlockContent = ({ block, editor }) => {
12511
- const [modalOpened, setModalOpened] = useState40(false);
12571
+ const [modalOpened, setModalOpened] = useState41(false);
12512
12572
  const { editable } = useBlocknoteContext();
12513
12573
  const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
12514
12574
  const listConfig = useMemo24(() => {
@@ -12652,7 +12712,7 @@ import React128, { useMemo as useMemo25 } from "react";
12652
12712
  import React127, { useCallback as useCallback26 } from "react";
12653
12713
 
12654
12714
  // src/mantine/blocks/notify/template/GeneralTab.tsx
12655
- import React126, { useEffect as useEffect27, useState as useState41 } from "react";
12715
+ import React126, { useEffect as useEffect27, useState as useState42 } from "react";
12656
12716
  import { Divider as Divider11, Stack as Stack95, Text as Text69, Group as Group41, ActionIcon as ActionIcon17, Paper as Paper12 } from "@mantine/core";
12657
12717
  import { IconTrash as IconTrash5 } from "@tabler/icons-react";
12658
12718
  var GeneralTab5 = ({
@@ -12681,17 +12741,17 @@ var GeneralTab5 = ({
12681
12741
  editor,
12682
12742
  blockId
12683
12743
  }) => {
12684
- const [localTitle, setLocalTitle] = useState41(title || "");
12685
- const [localDescription, setLocalDescription] = useState41(description || "");
12686
- const [localChannel, setLocalChannel] = useState41(channel || "email");
12687
- const [localTo, setLocalTo] = useState41(to || []);
12688
- const [localCc, setLocalCc] = useState41(cc || []);
12689
- const [localBcc, setLocalBcc] = useState41(bcc || []);
12690
- const [localSubject, setLocalSubject] = useState41(subject || "");
12691
- const [localBody, setLocalBody] = useState41(body || "");
12692
- const [localBodyType, setLocalBodyType] = useState41(bodyType || "text");
12693
- const [localFrom, setLocalFrom] = useState41(from || "");
12694
- const [localReplyTo, setLocalReplyTo] = useState41(replyTo || "");
12744
+ const [localTitle, setLocalTitle] = useState42(title || "");
12745
+ const [localDescription, setLocalDescription] = useState42(description || "");
12746
+ const [localChannel, setLocalChannel] = useState42(channel || "email");
12747
+ const [localTo, setLocalTo] = useState42(to || []);
12748
+ const [localCc, setLocalCc] = useState42(cc || []);
12749
+ const [localBcc, setLocalBcc] = useState42(bcc || []);
12750
+ const [localSubject, setLocalSubject] = useState42(subject || "");
12751
+ const [localBody, setLocalBody] = useState42(body || "");
12752
+ const [localBodyType, setLocalBodyType] = useState42(bodyType || "text");
12753
+ const [localFrom, setLocalFrom] = useState42(from || "");
12754
+ const [localReplyTo, setLocalReplyTo] = useState42(replyTo || "");
12695
12755
  useEffect27(() => setLocalTitle(title || ""), [title]);
12696
12756
  useEffect27(() => setLocalDescription(description || ""), [description]);
12697
12757
  useEffect27(() => setLocalChannel(channel || "email"), [channel]);
@@ -12994,13 +13054,13 @@ var NotifyTemplateView = ({ editor, block }) => {
12994
13054
  };
12995
13055
 
12996
13056
  // src/mantine/blocks/notify/flow/FlowView.tsx
12997
- import React129, { useState as useState42 } from "react";
13057
+ import React129, { useState as useState43 } from "react";
12998
13058
  import { Group as Group43, Stack as Stack97, Text as Text71, ActionIcon as ActionIcon18, Tooltip as Tooltip11, Button as Button28, Badge as Badge18, Collapse as Collapse7, Alert as Alert14, Loader as Loader9, Code as Code5 } from "@mantine/core";
12999
13059
  import { IconSend as IconSend3, IconChevronDown as IconChevronDown7, IconChevronUp as IconChevronUp4, IconCheck as IconCheck2, IconX as IconX7 } from "@tabler/icons-react";
13000
13060
  var NotifyFlowView = ({ editor, block, isDisabled }) => {
13001
13061
  const disabled = isDisabled?.isDisabled === "disable";
13002
- const [isLoading, setIsLoading] = useState42(false);
13003
- const [showDetails, setShowDetails] = useState42(false);
13062
+ const [isLoading, setIsLoading] = useState43(false);
13063
+ const [showDetails, setShowDetails] = useState43(false);
13004
13064
  let handlers = null;
13005
13065
  try {
13006
13066
  handlers = useBlocknoteHandlers();
@@ -13221,10 +13281,10 @@ import { Group as Group44, Stack as Stack99, Text as Text73 } from "@mantine/cor
13221
13281
  import React134, { useCallback as useCallback28 } from "react";
13222
13282
 
13223
13283
  // src/mantine/blocks/claim/template/GeneralTab.tsx
13224
- import React133, { useEffect as useEffect29, useState as useState44, useCallback as useCallback27, useMemo as useMemo26 } from "react";
13284
+ import React133, { useEffect as useEffect29, useState as useState45, useCallback as useCallback27, useMemo as useMemo26 } from "react";
13225
13285
 
13226
13286
  // src/mantine/components/CollectionSelector.tsx
13227
- import React132, { useState as useState43, useEffect as useEffect28 } from "react";
13287
+ import React132, { useState as useState44, useEffect as useEffect28 } from "react";
13228
13288
  import { Stack as Stack98, Text as Text72, Checkbox as Checkbox11, Loader as Loader10, Alert as Alert15 } from "@mantine/core";
13229
13289
  var CollectionSelector = ({
13230
13290
  did,
@@ -13235,10 +13295,10 @@ var CollectionSelector = ({
13235
13295
  currentAdminAddress
13236
13296
  }) => {
13237
13297
  const handlers = useBlocknoteHandlers();
13238
- const [localDid, setLocalDid] = useState43(did || "");
13239
- const [collections, setCollections] = useState43([]);
13240
- const [loading, setLoading] = useState43(false);
13241
- const [error, setError] = useState43(null);
13298
+ const [localDid, setLocalDid] = useState44(did || "");
13299
+ const [collections, setCollections] = useState44([]);
13300
+ const [loading, setLoading] = useState44(false);
13301
+ const [error, setError] = useState44(null);
13242
13302
  useEffect28(() => {
13243
13303
  setLocalDid(did || "");
13244
13304
  }, [did]);
@@ -13318,8 +13378,8 @@ var GeneralTab6 = ({
13318
13378
  onSelectedCollectionsChange,
13319
13379
  onAdminAddressChange
13320
13380
  }) => {
13321
- const [localTitle, setLocalTitle] = useState44(title || "");
13322
- const [localDescription, setLocalDescription] = useState44(description || "");
13381
+ const [localTitle, setLocalTitle] = useState45(title || "");
13382
+ const [localDescription, setLocalDescription] = useState45(description || "");
13323
13383
  useEffect29(() => {
13324
13384
  setLocalTitle(title || "");
13325
13385
  }, [title]);
@@ -13466,14 +13526,14 @@ import React149, { useMemo as useMemo42, useRef as useRef9, useEffect as useEffe
13466
13526
  import { Stack as Stack111, Text as Text85, Loader as Loader18, Center as Center9, Alert as Alert20, Title as Title6, Flex as Flex27, ActionIcon as ActionIcon25 } from "@mantine/core";
13467
13527
 
13468
13528
  // src/mantine/hooks/useCurrentUser.ts
13469
- import { useState as useState45, useEffect as useEffect30, useRef as useRef5 } from "react";
13529
+ import { useState as useState46, useEffect as useEffect30, useRef as useRef5 } from "react";
13470
13530
  function useCurrentUser() {
13471
13531
  const { getCurrentUser } = useBlocknoteHandlers();
13472
13532
  const getCurrentUserRef = useRef5(getCurrentUser);
13473
13533
  useEffect30(() => {
13474
13534
  getCurrentUserRef.current = getCurrentUser;
13475
13535
  }, [getCurrentUser]);
13476
- const [userAddress, setUserAddress] = useState45("");
13536
+ const [userAddress, setUserAddress] = useState46("");
13477
13537
  useEffect30(() => {
13478
13538
  const fetchUserAddress = () => {
13479
13539
  try {
@@ -13489,16 +13549,16 @@ function useCurrentUser() {
13489
13549
  }
13490
13550
 
13491
13551
  // src/mantine/hooks/useCollections.ts
13492
- import { useState as useState46, useEffect as useEffect31, useCallback as useCallback29, useRef as useRef6, useMemo as useMemo28 } from "react";
13552
+ import { useState as useState47, useEffect as useEffect31, useCallback as useCallback29, useRef as useRef6, useMemo as useMemo28 } from "react";
13493
13553
  function useCollections(did, selectedCollectionIds, block, editor) {
13494
13554
  const { getClaimCollections } = useBlocknoteHandlers();
13495
13555
  const getClaimCollectionsRef = useRef6(getClaimCollections);
13496
13556
  useEffect31(() => {
13497
13557
  getClaimCollectionsRef.current = getClaimCollections;
13498
13558
  }, [getClaimCollections]);
13499
- const [collections, setCollections] = useState46([]);
13500
- const [loading, setLoading] = useState46(false);
13501
- const [error, setError] = useState46(null);
13559
+ const [collections, setCollections] = useState47([]);
13560
+ const [loading, setLoading] = useState47(false);
13561
+ const [error, setError] = useState47(null);
13502
13562
  const adminAddressUpdatedRef = useRef6(false);
13503
13563
  const selectedCollectionIdsStr = useMemo28(() => JSON.stringify(selectedCollectionIds.sort()), [selectedCollectionIds]);
13504
13564
  const fetchCollections = useCallback29(async () => {
@@ -13547,7 +13607,7 @@ import React148 from "react";
13547
13607
  import { Stack as Stack110, Text as Text84, Loader as Loader17, Center as Center8 } from "@mantine/core";
13548
13608
 
13549
13609
  // src/mantine/hooks/useUserRoles.ts
13550
- import { useState as useState47, useEffect as useEffect32, useMemo as useMemo29, useRef as useRef7 } from "react";
13610
+ import { useState as useState48, useEffect as useEffect32, useMemo as useMemo29, useRef as useRef7 } from "react";
13551
13611
 
13552
13612
  // src/mantine/hooks/utils.ts
13553
13613
  function isClientFulfillmentError(error) {
@@ -13562,8 +13622,8 @@ function useUserRoles(collections, userAddress, adminAddress, deedId) {
13562
13622
  useEffect32(() => {
13563
13623
  getUserRolesRef.current = getUserRoles;
13564
13624
  }, [getUserRoles]);
13565
- const [userRoles, setUserRoles] = useState47({});
13566
- const [loading, setLoading] = useState47(true);
13625
+ const [userRoles, setUserRoles] = useState48({});
13626
+ const [loading, setLoading] = useState48(true);
13567
13627
  const failedRequestKeyRef = useRef7(null);
13568
13628
  const collectionIdsKey = useMemo29(
13569
13629
  () => collections.map((c) => c.id).sort().join("|"),
@@ -13637,7 +13697,7 @@ import React137, { useMemo as useMemo31 } from "react";
13637
13697
  import { Stack as Stack101, Text as Text75, ActionIcon as ActionIcon20, Tooltip as Tooltip12 } from "@mantine/core";
13638
13698
 
13639
13699
  // src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
13640
- import React136, { useState as useState48, useEffect as useEffect33, useCallback as useCallback30, useMemo as useMemo30 } from "react";
13700
+ import React136, { useState as useState49, useEffect as useEffect33, useCallback as useCallback30, useMemo as useMemo30 } from "react";
13641
13701
  import { Loader as Loader11, Stack as Stack100, Text as Text74, ActionIcon as ActionIcon19, Alert as Alert16, Box as Box31, Group as Group45 } from "@mantine/core";
13642
13702
  import { IconArrowLeft as IconArrowLeft3, IconAlertCircle } from "@tabler/icons-react";
13643
13703
  import { Survey, SurveyModel } from "@ixo/surveys";
@@ -13756,13 +13816,13 @@ var surveyTheme = {
13756
13816
  var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, userAddress, onSubmitComplete, execution }) => {
13757
13817
  const { closePanel } = usePanelStore();
13758
13818
  const handlers = useBlocknoteHandlers();
13759
- const [viewMode, setViewMode] = useState48("list");
13760
- const [claims, setClaims] = useState48([]);
13761
- const [loading, setLoading] = useState48(true);
13762
- const [error, setError] = useState48(null);
13763
- const [surveyJson, setSurveyJson] = useState48(null);
13764
- const [surveyLoading, setSurveyLoading] = useState48(false);
13765
- const [surveyError, setSurveyError] = useState48(null);
13819
+ const [viewMode, setViewMode] = useState49("list");
13820
+ const [claims, setClaims] = useState49([]);
13821
+ const [loading, setLoading] = useState49(true);
13822
+ const [error, setError] = useState49(null);
13823
+ const [surveyJson, setSurveyJson] = useState49(null);
13824
+ const [surveyLoading, setSurveyLoading] = useState49(false);
13825
+ const [surveyError, setSurveyError] = useState49(null);
13766
13826
  console.log("[ClaimsListSheet] render", { collectionId, collectionName, deedId, adminAddress, userAddress, viewMode });
13767
13827
  const fetchClaims = useCallback30(async () => {
13768
13828
  console.log("[ClaimsListSheet] fetchClaims start", { collectionId, userAddress });
@@ -14076,7 +14136,7 @@ import { Stack as Stack106, Text as Text80, Button as Button30, Menu as Menu4, B
14076
14136
  import { IconChevronDown as IconChevronDown8, IconArrowRight as IconArrowRight3, IconLock } from "@tabler/icons-react";
14077
14137
 
14078
14138
  // src/mantine/hooks/useBlockAuthorization.ts
14079
- import { useState as useState49, useEffect as useEffect34, useMemo as useMemo32 } from "react";
14139
+ import { useState as useState50, useEffect as useEffect34, useMemo as useMemo32 } from "react";
14080
14140
  function useBlockAuthorization({
14081
14141
  editor,
14082
14142
  flowNode,
@@ -14084,9 +14144,9 @@ function useBlockAuthorization({
14084
14144
  flowUri
14085
14145
  }) {
14086
14146
  const handlers = useBlocknoteHandlers();
14087
- const [result, setResult] = useState49({ authorized: true });
14088
- const [loading, setLoading] = useState49(true);
14089
- const [checkTrigger, setCheckTrigger] = useState49(0);
14147
+ const [result, setResult] = useState50({ authorized: true });
14148
+ const [loading, setLoading] = useState50(true);
14149
+ const [checkTrigger, setCheckTrigger] = useState50(0);
14090
14150
  const flowOwnerDid = useMemo32(() => editor.getFlowOwnerDid?.() || "", [editor]);
14091
14151
  const entityDid = useMemo32(() => handlers.getEntityDid?.() || "", [handlers]);
14092
14152
  const rootIssuer = flowOwnerDid || entityDid;
@@ -14156,14 +14216,14 @@ import { Loader as Loader12, Stack as Stack102, Text as Text76 } from "@mantine/
14156
14216
  import { Survey as Survey2 } from "@ixo/surveys";
14157
14217
 
14158
14218
  // src/mantine/blocks/bid/flow/hooks/useBidSurvey.ts
14159
- import { useState as useState50, useEffect as useEffect35, useMemo as useMemo33, useCallback as useCallback31 } from "react";
14219
+ import { useState as useState51, useEffect as useEffect35, useMemo as useMemo33, useCallback as useCallback31 } from "react";
14160
14220
  import { SurveyModel as SurveyModel2 } from "@ixo/surveys";
14161
14221
  function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions) {
14162
14222
  const handlers = useBlocknoteHandlers();
14163
14223
  const { closePanel } = usePanelStore();
14164
- const [surveyJson, setSurveyJson] = useState50(null);
14165
- const [loading, setLoading] = useState50(true);
14166
- const [error, setError] = useState50(null);
14224
+ const [surveyJson, setSurveyJson] = useState51(null);
14225
+ const [loading, setLoading] = useState51(true);
14226
+ const [error, setError] = useState51(null);
14167
14227
  useEffect35(() => {
14168
14228
  const fetchSurveyTemplate = async () => {
14169
14229
  try {
@@ -14232,7 +14292,8 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
14232
14292
  role,
14233
14293
  submitterDid: execution.actorDid,
14234
14294
  deedDid: deedId,
14235
- status: "pending"
14295
+ status: "pending",
14296
+ surveyAnswers: surveyData
14236
14297
  });
14237
14298
  closePanel();
14238
14299
  onSubmitComplete?.();
@@ -14307,13 +14368,13 @@ import { Stack as Stack104, Text as Text78, Badge as Badge19, Group as Group47,
14307
14368
  import { IconArrowRight as IconArrowRight2 } from "@tabler/icons-react";
14308
14369
 
14309
14370
  // src/mantine/blocks/bid/flow/components/BidViewPanel.tsx
14310
- import React139, { useMemo as useMemo36, useState as useState53 } from "react";
14371
+ import React139, { useMemo as useMemo36, useState as useState54 } from "react";
14311
14372
  import { Loader as Loader13, Stack as Stack103, Text as Text77, Button as Button29, Group as Group46, Modal as Modal2, Alert as Alert17 } from "@mantine/core";
14312
14373
  import { Survey as Survey3 } from "@ixo/surveys";
14313
14374
  import { IconCheck as IconCheck3, IconX as IconX8, IconAlertCircle as IconAlertCircle2 } from "@tabler/icons-react";
14314
14375
 
14315
14376
  // src/mantine/blocks/bid/flow/hooks/useBidView.ts
14316
- import { useState as useState51, useEffect as useEffect37, useMemo as useMemo35 } from "react";
14377
+ import { useState as useState52, useEffect as useEffect37, useMemo as useMemo35 } from "react";
14317
14378
  import { SurveyModel as SurveyModel3 } from "@ixo/surveys";
14318
14379
 
14319
14380
  // src/mantine/blocks/bid/flow/utils.ts
@@ -14343,9 +14404,9 @@ function parseBidData(data) {
14343
14404
  // src/mantine/blocks/bid/flow/hooks/useBidView.ts
14344
14405
  function useBidView(bid, deedId) {
14345
14406
  const handlers = useBlocknoteHandlers();
14346
- const [surveyJson, setSurveyJson] = useState51(null);
14347
- const [loading, setLoading] = useState51(true);
14348
- const [error, setError] = useState51(null);
14407
+ const [surveyJson, setSurveyJson] = useState52(null);
14408
+ const [loading, setLoading] = useState52(true);
14409
+ const [error, setError] = useState52(null);
14349
14410
  useEffect37(() => {
14350
14411
  const fetchSurveyTemplate = async () => {
14351
14412
  try {
@@ -14388,12 +14449,12 @@ function useBidView(bid, deedId) {
14388
14449
  }
14389
14450
 
14390
14451
  // src/mantine/blocks/bid/flow/hooks/useBidActions.ts
14391
- import { useState as useState52, useCallback as useCallback32 } from "react";
14452
+ import { useState as useState53, useCallback as useCallback32 } from "react";
14392
14453
  function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions) {
14393
14454
  const handlers = useBlocknoteHandlers();
14394
14455
  const { closePanel } = usePanelStore();
14395
- const [loading, setLoading] = useState52(false);
14396
- const [error, setError] = useState52(null);
14456
+ const [loading, setLoading] = useState53(false);
14457
+ const [error, setError] = useState53(null);
14397
14458
  const approveBid = useCallback32(async () => {
14398
14459
  try {
14399
14460
  setLoading(true);
@@ -14534,8 +14595,8 @@ var BidViewPanel = ({ bid, deedId, adminAddress, onRefresh, execution, executeHo
14534
14595
  error: actionError,
14535
14596
  setError: setActionError
14536
14597
  } = useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions);
14537
- const [rejectModalOpen, setRejectModalOpen] = useState53(false);
14538
- const [rejectReason, setRejectReason] = useState53("");
14598
+ const [rejectModalOpen, setRejectModalOpen] = useState54(false);
14599
+ const [rejectReason, setRejectReason] = useState54("");
14539
14600
  const surveyContainerStyle = useMemo36(
14540
14601
  () => ({
14541
14602
  flex: 1,
@@ -14561,11 +14622,11 @@ var BidViewPanel = ({ bid, deedId, adminAddress, onRefresh, execution, executeHo
14561
14622
  };
14562
14623
 
14563
14624
  // src/mantine/hooks/useUserProfile.ts
14564
- import { useState as useState54, useEffect as useEffect38 } from "react";
14625
+ import { useState as useState55, useEffect as useEffect38 } from "react";
14565
14626
  function useUserProfile(did) {
14566
14627
  const handlers = useBlocknoteHandlers();
14567
- const [userProfile, setUserProfile] = useState54(null);
14568
- const [loading, setLoading] = useState54(false);
14628
+ const [userProfile, setUserProfile] = useState55(null);
14629
+ const [loading, setLoading] = useState55(false);
14569
14630
  useEffect38(() => {
14570
14631
  const fetchUserProfile = async () => {
14571
14632
  if (!did) return;
@@ -14601,12 +14662,12 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution, executeHookedA
14601
14662
  };
14602
14663
 
14603
14664
  // src/mantine/blocks/bid/flow/hooks/useBids.ts
14604
- import { useState as useState55, useEffect as useEffect39, useCallback as useCallback33 } from "react";
14665
+ import { useState as useState56, useEffect as useEffect39, useCallback as useCallback33 } from "react";
14605
14666
  function useBids(collectionId) {
14606
14667
  const handlers = useBlocknoteHandlers();
14607
- const [bids, setBids] = useState55([]);
14608
- const [loading, setLoading] = useState55(true);
14609
- const [error, setError] = useState55(null);
14668
+ const [bids, setBids] = useState56([]);
14669
+ const [loading, setLoading] = useState56(true);
14670
+ const [error, setError] = useState56(null);
14610
14671
  const fetchBids = useCallback33(async () => {
14611
14672
  if (!collectionId) {
14612
14673
  setLoading(false);
@@ -14839,7 +14900,7 @@ import React147, { useMemo as useMemo41, useEffect as useEffect41, useRef as use
14839
14900
  import { Stack as Stack109, Text as Text83, ActionIcon as ActionIcon24, Tooltip as Tooltip15 } from "@mantine/core";
14840
14901
 
14841
14902
  // src/mantine/blocks/evaluator/flow/ClaimsList.tsx
14842
- import React146, { useState as useState56, useEffect as useEffect40, useCallback as useCallback35, useMemo as useMemo40 } from "react";
14903
+ import React146, { useState as useState57, useEffect as useEffect40, useCallback as useCallback35, useMemo as useMemo40 } from "react";
14843
14904
  import { Paper as Paper14, CloseButton as CloseButton5, Title as Title5, Loader as Loader16, Stack as Stack108, Text as Text82, ActionIcon as ActionIcon23, Alert as Alert19, Badge as Badge22, Group as Group49, Button as Button31, Divider as Divider13, Tabs as Tabs3, ScrollArea as ScrollArea6 } from "@mantine/core";
14844
14905
  import { IconAlertCircle as IconAlertCircle4, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh3, IconArrowLeft as IconArrowLeft4, IconFileText as IconFileText3, IconRobot as IconRobot3, IconChecklist as IconChecklist3 } from "@tabler/icons-react";
14845
14906
  import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
@@ -15285,20 +15346,20 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15285
15346
  const { closePanel } = usePanelStore();
15286
15347
  const handlers = useBlocknoteHandlers();
15287
15348
  const { editor } = useBlocknoteContext();
15288
- const [viewMode, setViewMode] = useState56("list");
15289
- const [claims, setClaims] = useState56([]);
15290
- const [loading, setLoading] = useState56(true);
15291
- const [error, setError] = useState56(null);
15292
- const [selectedClaim, setSelectedClaim] = useState56(null);
15293
- const [claimData, setClaimData] = useState56(null);
15294
- const [surveyJson, setSurveyJson] = useState56(null);
15295
- const [surveyLoading, setSurveyLoading] = useState56(false);
15296
- const [surveyError, setSurveyError] = useState56(null);
15297
- const [evaluating, setEvaluating] = useState56(false);
15298
- const [rubricData, setRubricData] = useState56(null);
15299
- const [evaluationResult, setEvaluationResult] = useState56(null);
15300
- const [evaluationLoading, setEvaluationLoading] = useState56(false);
15301
- const [activeTab, setActiveTab] = useState56("submission");
15349
+ const [viewMode, setViewMode] = useState57("list");
15350
+ const [claims, setClaims] = useState57([]);
15351
+ const [loading, setLoading] = useState57(true);
15352
+ const [error, setError] = useState57(null);
15353
+ const [selectedClaim, setSelectedClaim] = useState57(null);
15354
+ const [claimData, setClaimData] = useState57(null);
15355
+ const [surveyJson, setSurveyJson] = useState57(null);
15356
+ const [surveyLoading, setSurveyLoading] = useState57(false);
15357
+ const [surveyError, setSurveyError] = useState57(null);
15358
+ const [evaluating, setEvaluating] = useState57(false);
15359
+ const [rubricData, setRubricData] = useState57(null);
15360
+ const [evaluationResult, setEvaluationResult] = useState57(null);
15361
+ const [evaluationLoading, setEvaluationLoading] = useState57(false);
15362
+ const [activeTab, setActiveTab] = useState57("submission");
15302
15363
  const fetchClaims = useCallback35(async () => {
15303
15364
  try {
15304
15365
  setLoading(true);
@@ -15697,8 +15758,8 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15697
15758
  };
15698
15759
  var ClaimListItem = ({ claim, onViewClaim }) => {
15699
15760
  const handlers = useBlocknoteHandlers();
15700
- const [userProfile, setUserProfile] = useState56(null);
15701
- const [loadingProfile, setLoadingProfile] = useState56(false);
15761
+ const [userProfile, setUserProfile] = useState57(null);
15762
+ const [loadingProfile, setLoadingProfile] = useState57(false);
15702
15763
  useEffect40(() => {
15703
15764
  const fetchUserProfile = async () => {
15704
15765
  if (!claim.agentDid) return;
@@ -16055,7 +16116,7 @@ import { Group as Group50, Stack as Stack112, Text as Text86 } from "@mantine/co
16055
16116
  import React153, { useCallback as useCallback38 } from "react";
16056
16117
 
16057
16118
  // src/mantine/blocks/bid/template/GeneralTab.tsx
16058
- import React152, { useEffect as useEffect43, useState as useState57, useCallback as useCallback37, useMemo as useMemo43 } from "react";
16119
+ import React152, { useEffect as useEffect43, useState as useState58, useCallback as useCallback37, useMemo as useMemo43 } from "react";
16059
16120
  var GeneralTab7 = ({
16060
16121
  title,
16061
16122
  description,
@@ -16068,8 +16129,8 @@ var GeneralTab7 = ({
16068
16129
  onSelectedCollectionsChange,
16069
16130
  onAdminAddressChange
16070
16131
  }) => {
16071
- const [localTitle, setLocalTitle] = useState57(title || "");
16072
- const [localDescription, setLocalDescription] = useState57(description || "");
16132
+ const [localTitle, setLocalTitle] = useState58(title || "");
16133
+ const [localDescription, setLocalDescription] = useState58(description || "");
16073
16134
  useEffect43(() => {
16074
16135
  setLocalTitle(title || "");
16075
16136
  }, [title]);
@@ -16178,8 +16239,26 @@ var bidActions = [
16178
16239
  label: "Status",
16179
16240
  type: "string",
16180
16241
  description: "The bid status (pending)"
16242
+ },
16243
+ {
16244
+ key: "surveyAnswers",
16245
+ label: "Survey Answers",
16246
+ type: "object",
16247
+ description: "All submitted survey form answers (use dot notation for individual fields)"
16181
16248
  }
16182
- ]
16249
+ ],
16250
+ resolveDynamicFields: async ({ handlers, blockProps }) => {
16251
+ const deedDid = blockProps.did;
16252
+ if (!deedDid || !handlers.getBidContributorSurveyTemplate) return [];
16253
+ try {
16254
+ const result = await handlers.getBidContributorSurveyTemplate(deedDid);
16255
+ if (!result?.surveyTemplate) return [];
16256
+ const schema = typeof result.surveyTemplate === "string" ? JSON.parse(result.surveyTemplate) : result.surveyTemplate;
16257
+ return surveyFieldsToPayloadFields(schema);
16258
+ } catch {
16259
+ return [];
16260
+ }
16261
+ }
16183
16262
  },
16184
16263
  {
16185
16264
  actionId: "approve",
@@ -16573,7 +16652,7 @@ import { Group as Group51, Stack as Stack114, Text as Text88 } from "@mantine/co
16573
16652
  import React159, { useCallback as useCallback41 } from "react";
16574
16653
 
16575
16654
  // src/mantine/blocks/evaluator/template/GeneralTab.tsx
16576
- import React158, { useEffect as useEffect45, useState as useState58, useCallback as useCallback40, useMemo as useMemo46 } from "react";
16655
+ import React158, { useEffect as useEffect45, useState as useState59, useCallback as useCallback40, useMemo as useMemo46 } from "react";
16577
16656
  var GeneralTab8 = ({
16578
16657
  title,
16579
16658
  description,
@@ -16586,8 +16665,8 @@ var GeneralTab8 = ({
16586
16665
  onSelectedCollectionsChange,
16587
16666
  onAdminAddressChange
16588
16667
  }) => {
16589
- const [localTitle, setLocalTitle] = useState58(title || "");
16590
- const [localDescription, setLocalDescription] = useState58(description || "");
16668
+ const [localTitle, setLocalTitle] = useState59(title || "");
16669
+ const [localDescription, setLocalDescription] = useState59(description || "");
16591
16670
  useEffect45(() => {
16592
16671
  setLocalTitle(title || "");
16593
16672
  }, [title]);
@@ -16799,13 +16878,13 @@ import React165 from "react";
16799
16878
  import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react";
16800
16879
 
16801
16880
  // src/mantine/blocks/visualization/VisualizationBlock.tsx
16802
- import React164, { useMemo as useMemo49, useCallback as useCallback42, useRef as useRef11, useState as useState59, useEffect as useEffect46 } from "react";
16881
+ import React164, { useMemo as useMemo49, useCallback as useCallback42, useRef as useRef11, useState as useState60, useEffect as useEffect46 } from "react";
16803
16882
  import { Box as Box34, Stack as Stack116, Text as Text90, Paper as Paper15, Group as Group52 } from "@mantine/core";
16804
16883
  function VisualizationBlock({ block, editor }) {
16805
16884
  const { visualizationRenderer } = useBlocknoteContext();
16806
16885
  const { vizType, config, title, preferences } = block.props;
16807
16886
  const containerRef = useRef11(null);
16808
- const [hasValidDimensions, setHasValidDimensions] = useState59(false);
16887
+ const [hasValidDimensions, setHasValidDimensions] = useState60(false);
16809
16888
  useEffect46(() => {
16810
16889
  const container = containerRef.current;
16811
16890
  if (!container) return;
@@ -16905,11 +16984,11 @@ import { Badge as Badge23, Group as Group53, Stack as Stack117, Text as Text91 }
16905
16984
  import React167, { useCallback as useCallback43 } from "react";
16906
16985
 
16907
16986
  // src/mantine/blocks/domainCreator/template/GeneralTab.tsx
16908
- import React166, { useEffect as useEffect47, useState as useState60 } from "react";
16987
+ import React166, { useEffect as useEffect47, useState as useState61 } from "react";
16909
16988
  var GeneralTab9 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
16910
- const [localTitle, setLocalTitle] = useState60(title || "");
16911
- const [localDescription, setLocalDescription] = useState60(description || "");
16912
- const [localIcon, setLocalIcon] = useState60(icon || "file-text");
16989
+ const [localTitle, setLocalTitle] = useState61(title || "");
16990
+ const [localDescription, setLocalDescription] = useState61(description || "");
16991
+ const [localIcon, setLocalIcon] = useState61(icon || "file-text");
16913
16992
  useEffect47(() => setLocalTitle(title || ""), [title]);
16914
16993
  useEffect47(() => setLocalDescription(description || ""), [description]);
16915
16994
  useEffect47(() => setLocalIcon(icon || "file-text"), [icon]);
@@ -17008,12 +17087,12 @@ var DomainCreatorTemplateView = ({ editor, block }) => {
17008
17087
  };
17009
17088
 
17010
17089
  // src/mantine/blocks/domainCreator/flow/FlowView.tsx
17011
- import React170, { useCallback as useCallback45, useMemo as useMemo52, useState as useState62 } from "react";
17090
+ import React170, { useCallback as useCallback45, useMemo as useMemo52, useState as useState63 } from "react";
17012
17091
  import { ActionIcon as ActionIcon28, Badge as Badge24, Group as Group55, Stack as Stack119, Text as Text93, Tooltip as Tooltip16 } from "@mantine/core";
17013
17092
  import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck6, IconAlertCircle as IconAlertCircle9 } from "@tabler/icons-react";
17014
17093
 
17015
17094
  // src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
17016
- import React169, { useCallback as useCallback44, useEffect as useEffect48, useMemo as useMemo51, useRef as useRef12, useState as useState61 } from "react";
17095
+ import React169, { useCallback as useCallback44, useEffect as useEffect48, useMemo as useMemo51, useRef as useRef12, useState as useState62 } from "react";
17017
17096
  import { Alert as Alert23, Button as Button32, Group as Group54, Loader as Loader21, Stack as Stack118, Text as Text92 } from "@mantine/core";
17018
17097
  import { useDebouncedCallback } from "@mantine/hooks";
17019
17098
  import { IconAlertCircle as IconAlertCircle8, IconCheck as IconCheck5 } from "@tabler/icons-react";
@@ -18074,10 +18153,10 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18074
18153
  const { handlers } = useBlocknoteContext();
18075
18154
  const existingBlockEntityDid = block.props.entityDid;
18076
18155
  const existingBlockEntityType = block.props.entityType;
18077
- const [flowStep, setFlowStep] = useState61(existingBlockEntityDid ? "success" : "survey");
18078
- const [error, setError] = useState61(null);
18079
- const [createdEntityDid, setCreatedEntityDid] = useState61(existingBlockEntityDid || null);
18080
- const [createdEntityType, setCreatedEntityType] = useState61(existingBlockEntityType || null);
18156
+ const [flowStep, setFlowStep] = useState62(existingBlockEntityDid ? "success" : "survey");
18157
+ const [error, setError] = useState62(null);
18158
+ const [createdEntityDid, setCreatedEntityDid] = useState62(existingBlockEntityDid || null);
18159
+ const [createdEntityType, setCreatedEntityType] = useState62(existingBlockEntityType || null);
18081
18160
  const isUpdatingFromProp = useRef12(false);
18082
18161
  const lastSyncedAnswers = useRef12("");
18083
18162
  const surveyModel = useMemo51(() => {
@@ -18310,8 +18389,8 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18310
18389
  // src/mantine/blocks/domainCreator/flow/FlowView.tsx
18311
18390
  var DOMAIN_CREATOR_FLOW_PANEL_ID = "domain-creator-flow-panel";
18312
18391
  var DomainCreatorFlowView = ({ editor, block }) => {
18313
- const [hasOpened, setHasOpened] = useState62(false);
18314
- const [submissionStatus, setSubmissionStatus] = useState62("idle");
18392
+ const [hasOpened, setHasOpened] = useState63(false);
18393
+ const [submissionStatus, setSubmissionStatus] = useState63("idle");
18315
18394
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
18316
18395
  const hasExistingSubmission = lastSubmission?.entityDid;
18317
18396
  const handleComplete = useCallback45(
@@ -18402,20 +18481,20 @@ import { Badge as Badge26, Group as Group57, Stack as Stack122, Text as Text96 }
18402
18481
  import React175, { useCallback as useCallback48, useMemo as useMemo54 } from "react";
18403
18482
 
18404
18483
  // src/mantine/blocks/email/template/GeneralTab.tsx
18405
- import React173, { useEffect as useEffect49, useState as useState63, useCallback as useCallback46, useRef as useRef13 } from "react";
18484
+ import React173, { useEffect as useEffect49, useState as useState64, useCallback as useCallback46, useRef as useRef13 } from "react";
18406
18485
  import { Divider as Divider14, Loader as Loader22, Select as Select4, Stack as Stack120, Text as Text94 } from "@mantine/core";
18407
18486
  var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplateChange, onFromChange, onToChange }) => {
18408
18487
  const handlers = useBlocknoteHandlers();
18409
18488
  const block = getCurrentBlock();
18410
18489
  const blockProps = block.props;
18411
- const [localTitle, setLocalTitle] = useState63(blockProps.title || "");
18412
- const [localTemplateName, setLocalTemplateName] = useState63(blockProps.templateName || "");
18413
- const [localFrom, setLocalFrom] = useState63(blockProps.from || "");
18414
- const [localTo, setLocalTo] = useState63(blockProps.to || "");
18415
- const [templates, setTemplates] = useState63([]);
18416
- const [loadingTemplates, setLoadingTemplates] = useState63(false);
18417
- const [loadingContent, setLoadingContent] = useState63(false);
18418
- const [error, setError] = useState63(null);
18490
+ const [localTitle, setLocalTitle] = useState64(blockProps.title || "");
18491
+ const [localTemplateName, setLocalTemplateName] = useState64(blockProps.templateName || "");
18492
+ const [localFrom, setLocalFrom] = useState64(blockProps.from || "");
18493
+ const [localTo, setLocalTo] = useState64(blockProps.to || "");
18494
+ const [templates, setTemplates] = useState64([]);
18495
+ const [loadingTemplates, setLoadingTemplates] = useState64(false);
18496
+ const [loadingContent, setLoadingContent] = useState64(false);
18497
+ const [error, setError] = useState64(null);
18419
18498
  useEffect49(() => {
18420
18499
  const currentBlock = getCurrentBlock();
18421
18500
  setLocalTitle(currentBlock.props.title || "");
@@ -18550,7 +18629,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18550
18629
  };
18551
18630
 
18552
18631
  // src/mantine/blocks/email/template/VariablesTab.tsx
18553
- import React174, { useMemo as useMemo53, useCallback as useCallback47, useState as useState64, useEffect as useEffect50 } from "react";
18632
+ import React174, { useMemo as useMemo53, useCallback as useCallback47, useState as useState65, useEffect as useEffect50 } from "react";
18554
18633
  import { Alert as Alert24, Badge as Badge25, Divider as Divider15, Group as Group56, Stack as Stack121, Text as Text95 } from "@mantine/core";
18555
18634
  import { IconInfoCircle as IconInfoCircle4, IconCheck as IconCheck7 } from "@tabler/icons-react";
18556
18635
  var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) => {
@@ -18570,7 +18649,7 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18570
18649
  return {};
18571
18650
  }
18572
18651
  }, [blockProps.variables]);
18573
- const [localMapping, setLocalMapping] = useState64(parsedVariableMapping);
18652
+ const [localMapping, setLocalMapping] = useState65(parsedVariableMapping);
18574
18653
  useEffect50(() => {
18575
18654
  const currentBlock = getCurrentBlock();
18576
18655
  try {
@@ -18707,15 +18786,15 @@ var EmailTemplateView = ({ editor, block }) => {
18707
18786
  };
18708
18787
 
18709
18788
  // src/mantine/blocks/email/flow/FlowView.tsx
18710
- import React177 from "react";
18711
- import { Alert as Alert25, Badge as Badge27, Button as Button33, Group as Group58, Loader as Loader23, Stack as Stack123, Text as Text97, Tooltip as Tooltip17 } from "@mantine/core";
18712
- import { IconMail as IconMail4, IconSend as IconSend4, IconAlertCircle as IconAlertCircle10, IconCheck as IconCheck8, IconRefresh as IconRefresh7 } from "@tabler/icons-react";
18789
+ import React177, { useMemo as useMemo56 } from "react";
18790
+ import { Group as Group58, Stack as Stack123, Text as Text97, ActionIcon as ActionIcon29, Tooltip as Tooltip17, Button as Button33, Badge as Badge27, Alert as Alert25, Loader as Loader23, Divider as Divider16 } from "@mantine/core";
18791
+ import { IconSend as IconSend4, IconCheck as IconCheck8, IconX as IconX10 } from "@tabler/icons-react";
18713
18792
 
18714
18793
  // src/mantine/blocks/email/flow/hooks/useEmailActions.ts
18715
- import { useState as useState65, useCallback as useCallback49 } from "react";
18794
+ import { useState as useState66, useCallback as useCallback49 } from "react";
18716
18795
  function useEmailActions({ block, editor }) {
18717
18796
  const handlers = useBlocknoteHandlers();
18718
- const [loading, setLoading] = useState65(false);
18797
+ const [loading, setLoading] = useState66(false);
18719
18798
  const updateBlockStatus = useCallback49(
18720
18799
  (updates) => {
18721
18800
  editor.updateBlock(block, {
@@ -18810,61 +18889,68 @@ function useEmailActions({ block, editor }) {
18810
18889
  }
18811
18890
 
18812
18891
  // src/mantine/blocks/email/flow/FlowView.tsx
18813
- function formatTime2(isoString) {
18814
- try {
18815
- const date = new Date(isoString);
18816
- return date.toLocaleString();
18817
- } catch {
18818
- return isoString;
18819
- }
18820
- }
18821
18892
  var EmailFlowView = ({ editor, block, isDisabled }) => {
18822
18893
  const disabled = isDisabled?.isDisabled === "disable";
18894
+ const { closePanel } = usePanelStore();
18895
+ const assignmentPanelContent = useMemo56(
18896
+ () => /* @__PURE__ */ React177.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React177.createElement(AssignmentTab, { editor, block })),
18897
+ [editor, block]
18898
+ );
18899
+ const assignmentPanelId = `email-assignment-panel-${block.id}`;
18900
+ const { open: openAssignment } = usePanel(assignmentPanelId, assignmentPanelContent);
18901
+ const detailsPanelContent = useMemo56(() => /* @__PURE__ */ React177.createElement(EmailDetailsPanel, { editor, block, onClose: closePanel }), [editor, block]);
18902
+ const detailsPanelId = `email-details-panel-${block.id}`;
18903
+ const { open: openDetails } = usePanel(detailsPanelId, detailsPanelContent);
18823
18904
  const { sendEmail, resetStatus, loading } = useEmailActions({ block, editor });
18824
18905
  const status = block.props.status || "idle";
18825
18906
  const editorDocument = editor.document || [];
18826
18907
  const toDisplay = resolveReferences(block.props.to, editorDocument);
18827
- const subjectDisplay = resolveReferences(block.props.subject, editorDocument);
18828
- const getStatusColor2 = () => {
18829
- switch (status) {
18830
- case "sending":
18831
- return "blue";
18908
+ const getStatusColor2 = (s) => {
18909
+ switch (s) {
18832
18910
  case "sent":
18833
18911
  return "green";
18834
18912
  case "error":
18835
18913
  return "red";
18836
- default:
18837
- return "gray";
18838
- }
18839
- };
18840
- const getStatusText = () => {
18841
- switch (status) {
18842
18914
  case "sending":
18843
- return "Sending...";
18844
- case "sent":
18845
- return `Sent ${block.props.lastSentAt ? formatTime2(block.props.lastSentAt) : ""}`;
18846
- case "error":
18847
- return "Failed";
18848
- default:
18849
- return "Ready";
18850
- }
18851
- };
18852
- const getStatusIcon = () => {
18853
- switch (status) {
18854
- case "sending":
18855
- return /* @__PURE__ */ React177.createElement(Loader23, { size: 14 });
18856
- case "sent":
18857
- return /* @__PURE__ */ React177.createElement(IconCheck8, { size: 14 });
18858
- case "error":
18859
- return /* @__PURE__ */ React177.createElement(IconAlertCircle10, { size: 14 });
18915
+ return "blue";
18860
18916
  default:
18861
- return /* @__PURE__ */ React177.createElement(IconMail4, { size: 14 });
18917
+ return "gray";
18862
18918
  }
18863
18919
  };
18864
18920
  const canSend = !disabled && !loading && block.props.templateName && block.props.to && block.props.from;
18865
- const sendButton = /* @__PURE__ */ React177.createElement(Button33, { leftSection: loading ? /* @__PURE__ */ React177.createElement(Loader23, { size: "xs", color: "white" }) : /* @__PURE__ */ React177.createElement(IconSend4, { size: 16 }), onClick: sendEmail, disabled: !canSend, loading, size: "sm" }, block.props.buttonLabel || "Send Email");
18866
- return /* @__PURE__ */ React177.createElement(BaseContainer, null, /* @__PURE__ */ React177.createElement(Stack123, { gap: "sm" }, /* @__PURE__ */ React177.createElement(Group58, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(IconMail4, { size: 20, style: { color: "var(--mantine-color-blue-6)" } }), /* @__PURE__ */ React177.createElement(Text97, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Send Email")), /* @__PURE__ */ React177.createElement(Badge27, { color: getStatusColor2(), leftSection: getStatusIcon(), size: "sm" }, getStatusText())), block.props.description && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description), /* @__PURE__ */ React177.createElement(Stack123, { gap: 4 }, /* @__PURE__ */ React177.createElement(Text97, { size: "xs", contentEditable: false }, /* @__PURE__ */ React177.createElement(Text97, { span: true, fw: 500 }, "To:"), " ", toDisplay || /* @__PURE__ */ React177.createElement(Text97, { span: true, c: "orange" }, "Not configured")), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", contentEditable: false }, /* @__PURE__ */ React177.createElement(Text97, { span: true, fw: 500 }, "Subject:"), " ", subjectDisplay || /* @__PURE__ */ React177.createElement(Text97, { span: true, c: "dimmed" }, "No subject"))), status === "error" && block.props.error && /* @__PURE__ */ React177.createElement(Alert25, { color: "red", icon: /* @__PURE__ */ React177.createElement(IconAlertCircle10, { size: 16 }), py: "xs" }, block.props.error), /* @__PURE__ */ React177.createElement(Group58, { gap: "sm" }, disabled && isDisabled?.message ? /* @__PURE__ */ React177.createElement(Tooltip17, { label: isDisabled.message, position: "top", withArrow: true }, sendButton) : sendButton, status === "error" && /* @__PURE__ */ React177.createElement(Button33, { variant: "light", color: "gray", size: "sm", leftSection: /* @__PURE__ */ React177.createElement(IconRefresh7, { size: 16 }), onClick: resetStatus }, "Reset"), status === "sent" && /* @__PURE__ */ React177.createElement(Button33, { variant: "light", color: "blue", size: "sm", leftSection: /* @__PURE__ */ React177.createElement(IconRefresh7, { size: 16 }), onClick: resetStatus }, "Send Again")), status === "sent" && block.props.lastMessageId && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, "Message ID: ", block.props.lastMessageId)));
18921
+ const sendButton = /* @__PURE__ */ React177.createElement(
18922
+ Button33,
18923
+ {
18924
+ size: "sm",
18925
+ variant: "light",
18926
+ color: "blue",
18927
+ leftSection: loading ? /* @__PURE__ */ React177.createElement(Loader23, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React177.createElement(IconCheck8, { size: 14 }) : /* @__PURE__ */ React177.createElement(IconSend4, { size: 14 }),
18928
+ onClick: sendEmail,
18929
+ disabled: !canSend,
18930
+ style: { flexShrink: 0 }
18931
+ },
18932
+ loading ? "Sending..." : status === "sent" ? "Sent" : block.props.buttonLabel || "Send"
18933
+ );
18934
+ return /* @__PURE__ */ React177.createElement(BaseContainer, { onClick: openDetails }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "md" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("mail", block.props.icon), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Badge27, { size: "sm", variant: "filled", color: "blue" }, "EMAIL"), /* @__PURE__ */ React177.createElement(Text97, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Send Email"), status !== "idle" && /* @__PURE__ */ React177.createElement(Badge27, { size: "xs", variant: "dot", color: getStatusColor2(status) }, status)), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, toDisplay ? `To: ${toDisplay}` : "No recipient configured"), block.props.description && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", style: { flexShrink: 0 }, onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React177.createElement(AssignmentDisplay, { block, onClick: openAssignment }), disabled && isDisabled?.message ? /* @__PURE__ */ React177.createElement(Tooltip17, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, status === "sent" && /* @__PURE__ */ React177.createElement(Tooltip17, { label: "Send again", position: "top", withArrow: true }, /* @__PURE__ */ React177.createElement(ActionIcon29, { variant: "light", color: "blue", onClick: resetStatus }, /* @__PURE__ */ React177.createElement(IconSend4, { size: 14 }))))), status === "error" && block.props.error && /* @__PURE__ */ React177.createElement(Alert25, { color: "red", icon: /* @__PURE__ */ React177.createElement(IconX10, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.error)));
18867
18935
  };
18936
+ function EmailDetailsPanel({ editor, block, onClose }) {
18937
+ const editorDocument = editor.document || [];
18938
+ const toDisplay = resolveReferences(block.props.to, editorDocument);
18939
+ const subjectDisplay = resolveReferences(block.props.subject, editorDocument);
18940
+ const fromDisplay = block.props.from ? resolveReferences(block.props.from, editorDocument) : "";
18941
+ const ccDisplay = block.props.cc ? resolveReferences(block.props.cc, editorDocument) : "";
18942
+ const bccDisplay = block.props.bcc ? resolveReferences(block.props.bcc, editorDocument) : "";
18943
+ const replyToDisplay = block.props.replyTo ? resolveReferences(block.props.replyTo, editorDocument) : "";
18944
+ let variables = {};
18945
+ try {
18946
+ variables = JSON.parse(block.props.variables || "{}");
18947
+ } catch {
18948
+ }
18949
+ return /* @__PURE__ */ React177.createElement(BaseRightPanelLayout, { onClose, title: "Email Details" }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "lg", py: "md" }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Recipients"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "To", value: toDisplay }), fromDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "From", value: fromDisplay }), ccDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "CC", value: ccDisplay }), bccDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "BCC", value: bccDisplay }), replyToDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Reply-To", value: replyToDisplay })), /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React177.createElement(Text97, { size: "sm", c: subjectDisplay ? void 0 : "dimmed" }, subjectDisplay || "No subject")), /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Template"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "Name", value: block.props.templateName, placeholder: "Not selected" }), block.props.templateVersion && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Version", value: block.props.templateVersion })), Object.keys(variables).length > 0 && /* @__PURE__ */ React177.createElement(React177.Fragment, null, /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Variables"), Object.entries(variables).map(([key, value]) => /* @__PURE__ */ React177.createElement(DetailRow, { key, label: key, value: resolveReferences(value, editorDocument) })))), block.props.status && block.props.status !== "idle" && /* @__PURE__ */ React177.createElement(React177.Fragment, null, /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Status"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "Status", value: block.props.status }), block.props.lastSentAt && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Last sent", value: new Date(block.props.lastSentAt).toLocaleString() }), block.props.lastMessageId && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Message ID", value: block.props.lastMessageId }), block.props.error && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "red" }, block.props.error)))));
18950
+ }
18951
+ function DetailRow({ label, value, placeholder }) {
18952
+ return /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Text97, { size: "xs", fw: 500, c: "dimmed", style: { minWidth: 70 } }, label, ":"), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: value ? void 0 : "dimmed", lineClamp: 1, style: { flex: 1 } }, value || placeholder || "\u2014"));
18953
+ }
18868
18954
 
18869
18955
  // src/mantine/blocks/email/EmailBlock.tsx
18870
18956
  function EmailBlock({ editor, block }) {
@@ -18948,19 +19034,19 @@ import { createReactBlockSpec as createReactBlockSpec15 } from "@blocknote/react
18948
19034
  import React186 from "react";
18949
19035
 
18950
19036
  // src/mantine/blocks/protocolSelector/template/TemplateView.tsx
18951
- import React182, { useMemo as useMemo57 } from "react";
19037
+ import React182, { useMemo as useMemo58 } from "react";
18952
19038
 
18953
19039
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
18954
19040
  import React181, { useCallback as useCallback50 } from "react";
18955
19041
 
18956
19042
  // src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
18957
- import React180, { useEffect as useEffect51, useMemo as useMemo56, useState as useState66 } from "react";
18958
- import { Divider as Divider16, Stack as Stack124, Text as Text98, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
19043
+ import React180, { useEffect as useEffect51, useMemo as useMemo57, useState as useState67 } from "react";
19044
+ import { Divider as Divider17, Stack as Stack124, Text as Text98, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
18959
19045
  var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
18960
- const [localTitle, setLocalTitle] = useState66(title || "");
18961
- const [localDescription, setLocalDescription] = useState66(description || "");
18962
- const [inputValue, setInputValue] = useState66("");
18963
- const localDids = useMemo56(() => {
19046
+ const [localTitle, setLocalTitle] = useState67(title || "");
19047
+ const [localDescription, setLocalDescription] = useState67(description || "");
19048
+ const [inputValue, setInputValue] = useState67("");
19049
+ const localDids = useMemo57(() => {
18964
19050
  try {
18965
19051
  const parsed = JSON.parse(protocolDids || "[]");
18966
19052
  return Array.isArray(parsed) ? parsed : [];
@@ -19010,7 +19096,7 @@ var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescrip
19010
19096
  onDescriptionChange(newDescription);
19011
19097
  }
19012
19098
  }
19013
- )), /* @__PURE__ */ React180.createElement(Divider16, { variant: "dashed" }), /* @__PURE__ */ React180.createElement(Stack124, { gap: "xs" }, /* @__PURE__ */ React180.createElement(Text98, { size: "sm", fw: 600 }, "Protocol DIDs"), /* @__PURE__ */ React180.createElement(Text98, { size: "xs", c: "dimmed" }, "Add the protocol DIDs that users can select from. Enter a DID and press Enter to add it."), /* @__PURE__ */ React180.createElement(PillsInput2, null, /* @__PURE__ */ React180.createElement(Pill2.Group, null, localDids.map((did) => /* @__PURE__ */ React180.createElement(Pill2, { key: did, withRemoveButton: true, onRemove: () => handleRemoveDid(did) }, did.length > 30 ? `${did.slice(0, 15)}...${did.slice(-12)}` : did)), /* @__PURE__ */ React180.createElement(
19099
+ )), /* @__PURE__ */ React180.createElement(Divider17, { variant: "dashed" }), /* @__PURE__ */ React180.createElement(Stack124, { gap: "xs" }, /* @__PURE__ */ React180.createElement(Text98, { size: "sm", fw: 600 }, "Protocol DIDs"), /* @__PURE__ */ React180.createElement(Text98, { size: "xs", c: "dimmed" }, "Add the protocol DIDs that users can select from. Enter a DID and press Enter to add it."), /* @__PURE__ */ React180.createElement(PillsInput2, null, /* @__PURE__ */ React180.createElement(Pill2.Group, null, localDids.map((did) => /* @__PURE__ */ React180.createElement(Pill2, { key: did, withRemoveButton: true, onRemove: () => handleRemoveDid(did) }, did.length > 30 ? `${did.slice(0, 15)}...${did.slice(-12)}` : did)), /* @__PURE__ */ React180.createElement(
19014
19100
  PillsInput2.Field,
19015
19101
  {
19016
19102
  placeholder: localDids.length === 0 ? "Enter protocol DID and press Enter" : "",
@@ -19071,9 +19157,9 @@ import { IconCircleDashed as IconCircleDashed2 } from "@tabler/icons-react";
19071
19157
  var PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID = "protocol-selector-template-panel";
19072
19158
  var ProtocolSelectorTemplateView = ({ editor, block }) => {
19073
19159
  const panelId = `${PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID}-${block.id}`;
19074
- const panelContent = useMemo57(() => /* @__PURE__ */ React182.createElement(TemplateConfig11, { editor, block }), [editor, block]);
19160
+ const panelContent = useMemo58(() => /* @__PURE__ */ React182.createElement(TemplateConfig11, { editor, block }), [editor, block]);
19075
19161
  const { open } = usePanel(panelId, panelContent);
19076
- const protocolDids = useMemo57(() => {
19162
+ const protocolDids = useMemo58(() => {
19077
19163
  try {
19078
19164
  const parsed = JSON.parse(block.props.protocolDids || "[]");
19079
19165
  return Array.isArray(parsed) ? parsed : [];
@@ -19099,12 +19185,12 @@ var ProtocolSelectorTemplateView = ({ editor, block }) => {
19099
19185
  };
19100
19186
 
19101
19187
  // src/mantine/blocks/protocolSelector/flow/FlowView.tsx
19102
- import React185, { useMemo as useMemo59 } from "react";
19188
+ import React185, { useMemo as useMemo60 } from "react";
19103
19189
  import { Badge as Badge28, Box as Box38, Group as Group61, Stack as Stack127, Text as Text101, Tooltip as Tooltip18 } from "@mantine/core";
19104
19190
  import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
19105
19191
 
19106
19192
  // src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
19107
- import React184, { useState as useState67, useEffect as useEffect52, useMemo as useMemo58, useCallback as useCallback51 } from "react";
19193
+ import React184, { useState as useState68, useEffect as useEffect52, useMemo as useMemo59, useCallback as useCallback51 } from "react";
19108
19194
  import { Stack as Stack126, Text as Text100, Box as Box37, Group as Group60, Loader as Loader24 } from "@mantine/core";
19109
19195
 
19110
19196
  // src/icons/EntityAvatar.tsx
@@ -19134,7 +19220,7 @@ var EntityAvatar_default = EntityAvatar;
19134
19220
  var ProtocolSelectionPanel = ({ editor, block }) => {
19135
19221
  const { closePanel } = usePanelStore();
19136
19222
  const handlers = useBlocknoteHandlers();
19137
- const protocolDids = useMemo58(() => {
19223
+ const protocolDids = useMemo59(() => {
19138
19224
  try {
19139
19225
  const parsed = JSON.parse(block.props.protocolDids || "[]");
19140
19226
  return Array.isArray(parsed) ? parsed : [];
@@ -19142,7 +19228,7 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
19142
19228
  return [];
19143
19229
  }
19144
19230
  }, [block.props.protocolDids]);
19145
- const [protocols, setProtocols] = useState67([]);
19231
+ const [protocols, setProtocols] = useState68([]);
19146
19232
  useEffect52(() => {
19147
19233
  if (protocolDids.length === 0) {
19148
19234
  setProtocols([]);
@@ -19257,7 +19343,7 @@ var ProtocolSelectorFlowView = ({ editor, block, isDisabled }) => {
19257
19343
  const disabled = isDisabled?.isDisabled === "disable";
19258
19344
  const panelId = `${PROTOCOL_SELECTOR_FLOW_PANEL_ID}-${block.id}`;
19259
19345
  const isCompleted = block.props.status === "completed" && block.props.selectedProtocolDid;
19260
- const panelContent = useMemo59(() => /* @__PURE__ */ React185.createElement(ProtocolSelectionPanel, { editor, block }), [editor, block]);
19346
+ const panelContent = useMemo60(() => /* @__PURE__ */ React185.createElement(ProtocolSelectionPanel, { editor, block }), [editor, block]);
19261
19347
  const { open } = usePanel(panelId, panelContent);
19262
19348
  const handleClick = () => {
19263
19349
  if (disabled) return;
@@ -19362,7 +19448,7 @@ import { createReactBlockSpec as createReactBlockSpec16 } from "@blocknote/react
19362
19448
  import React193 from "react";
19363
19449
 
19364
19450
  // src/mantine/blocks/form/template/TemplateView.tsx
19365
- import React190, { useMemo as useMemo60 } from "react";
19451
+ import React190, { useMemo as useMemo61 } from "react";
19366
19452
  import { Badge as Badge29, Group as Group62, Stack as Stack128, Text as Text103 } from "@mantine/core";
19367
19453
 
19368
19454
  // src/mantine/blocks/form/template/TemplateConfig.tsx
@@ -19370,14 +19456,14 @@ import React189, { useCallback as useCallback52 } from "react";
19370
19456
  import { Paper as Paper16, CloseButton as CloseButton6, Title as Title9 } from "@mantine/core";
19371
19457
 
19372
19458
  // src/mantine/blocks/form/template/GeneralTab.tsx
19373
- import React188, { useEffect as useEffect53, useState as useState68 } from "react";
19459
+ import React188, { useEffect as useEffect53, useState as useState69 } from "react";
19374
19460
  import { Text as Text102 } from "@mantine/core";
19375
19461
  var GeneralTab12 = ({ title, description, icon, surveySchema, onTitleChange, onDescriptionChange, onIconChange, onSurveySchemaChange }) => {
19376
- const [localTitle, setLocalTitle] = useState68(title || "");
19377
- const [localDescription, setLocalDescription] = useState68(description || "");
19378
- const [localIcon, setLocalIcon] = useState68(icon || "checklist");
19379
- const [localSchema, setLocalSchema] = useState68(surveySchema || "");
19380
- const [schemaError, setSchemaError] = useState68(null);
19462
+ const [localTitle, setLocalTitle] = useState69(title || "");
19463
+ const [localDescription, setLocalDescription] = useState69(description || "");
19464
+ const [localIcon, setLocalIcon] = useState69(icon || "checklist");
19465
+ const [localSchema, setLocalSchema] = useState69(surveySchema || "");
19466
+ const [schemaError, setSchemaError] = useState69(null);
19381
19467
  useEffect53(() => setLocalTitle(title || ""), [title]);
19382
19468
  useEffect53(() => setLocalDescription(description || ""), [description]);
19383
19469
  useEffect53(() => setLocalIcon(icon || "checklist"), [icon]);
@@ -19518,22 +19604,22 @@ var TemplateConfig12 = ({ editor, block }) => {
19518
19604
  var FORM_TEMPLATE_PANEL_ID = "form-template-panel";
19519
19605
  var FormTemplateView = ({ editor, block }) => {
19520
19606
  const panelId = `${FORM_TEMPLATE_PANEL_ID}-${block.id}`;
19521
- const panelContent = useMemo60(() => /* @__PURE__ */ React190.createElement(TemplateConfig12, { editor, block }), [editor, block]);
19607
+ const panelContent = useMemo61(() => /* @__PURE__ */ React190.createElement(TemplateConfig12, { editor, block }), [editor, block]);
19522
19608
  const { open } = usePanel(panelId, panelContent);
19523
19609
  const hasSchema = Boolean(block.props.surveySchema);
19524
19610
  return /* @__PURE__ */ React190.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React190.createElement(Badge29, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React190.createElement(Group62, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React190.createElement(Group62, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React190.createElement(Stack128, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React190.createElement(Text103, { fw: 500, size: "sm" }, block.props.title || "Form"), /* @__PURE__ */ React190.createElement(Text103, { size: "xs", c: "dimmed" }, hasSchema ? "Form configured" : "Click to configure form schema")))));
19525
19611
  };
19526
19612
 
19527
19613
  // src/mantine/blocks/form/flow/FlowView.tsx
19528
- import React192, { useMemo as useMemo62, useState as useState69, useCallback as useCallback54 } from "react";
19529
- import { ActionIcon as ActionIcon29, Badge as Badge30, Group as Group63, Stack as Stack129, Text as Text105, Tooltip as Tooltip19 } from "@mantine/core";
19614
+ import React192, { useMemo as useMemo63, useState as useState70, useCallback as useCallback54 } from "react";
19615
+ import { ActionIcon as ActionIcon30, Badge as Badge30, Group as Group63, Stack as Stack129, Text as Text105, Tooltip as Tooltip19 } from "@mantine/core";
19530
19616
  import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
19531
19617
 
19532
19618
  // src/mantine/blocks/form/flow/FormPanel.tsx
19533
- import React191, { useCallback as useCallback53, useEffect as useEffect54, useMemo as useMemo61, useRef as useRef14 } from "react";
19619
+ import React191, { useCallback as useCallback53, useEffect as useEffect54, useMemo as useMemo62, useRef as useRef14 } from "react";
19534
19620
  import { Alert as Alert26, Text as Text104 } from "@mantine/core";
19535
19621
  import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
19536
- import { IconAlertCircle as IconAlertCircle11 } from "@tabler/icons-react";
19622
+ import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
19537
19623
  import { Survey as Survey6, SurveyModel as SurveyModel6 } from "@ixo/surveys";
19538
19624
  var SYNC_DEBOUNCE_MS2 = 300;
19539
19625
  function deepEqual2(a, b) {
@@ -19557,7 +19643,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19557
19643
  const { closePanel } = usePanelStore();
19558
19644
  const isUpdatingFromProp = useRef14(false);
19559
19645
  const lastSyncedAnswers = useRef14("");
19560
- const surveySchema = useMemo61(() => {
19646
+ const surveySchema = useMemo62(() => {
19561
19647
  if (!block.props.surveySchema) return null;
19562
19648
  try {
19563
19649
  return JSON.parse(block.props.surveySchema);
@@ -19565,7 +19651,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19565
19651
  return null;
19566
19652
  }
19567
19653
  }, [block.props.surveySchema]);
19568
- const surveyModel = useMemo61(() => {
19654
+ const surveyModel = useMemo62(() => {
19569
19655
  if (!surveySchema) return null;
19570
19656
  const model = new SurveyModel6(surveySchema);
19571
19657
  model.applyTheme(surveyTheme);
@@ -19651,7 +19737,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19651
19737
  closePanel();
19652
19738
  }, [closePanel]);
19653
19739
  if (!surveySchema) {
19654
- return /* @__PURE__ */ React191.createElement(BaseRightPanelLayout, { title: block.props.title || "Form", onClose: handleClose }, /* @__PURE__ */ React191.createElement(Alert26, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle11, { size: 16 }), title: "Form Not Configured", color: "yellow" }, /* @__PURE__ */ React191.createElement(Text104, { size: "sm" }, "No survey schema has been configured for this form. Please configure it in template mode.")));
19740
+ return /* @__PURE__ */ React191.createElement(BaseRightPanelLayout, { title: block.props.title || "Form", onClose: handleClose }, /* @__PURE__ */ React191.createElement(Alert26, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle10, { size: 16 }), title: "Form Not Configured", color: "yellow" }, /* @__PURE__ */ React191.createElement(Text104, { size: "sm" }, "No survey schema has been configured for this form. Please configure it in template mode.")));
19655
19741
  }
19656
19742
  return /* @__PURE__ */ React191.createElement(
19657
19743
  BaseRightPanelLayout,
@@ -19667,7 +19753,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19667
19753
  // src/mantine/blocks/form/flow/FlowView.tsx
19668
19754
  var FORM_FLOW_PANEL_ID = "form-flow-panel";
19669
19755
  var FormFlowView = ({ editor, block }) => {
19670
- const [hasOpened, setHasOpened] = useState69(false);
19756
+ const [hasOpened, setHasOpened] = useState70(false);
19671
19757
  const status = block.props.status || "pending";
19672
19758
  const isCompleted = status === "completed";
19673
19759
  const handleComplete = useCallback54(() => {
@@ -19680,7 +19766,7 @@ var FormFlowView = ({ editor, block }) => {
19680
19766
  });
19681
19767
  }, [editor, block]);
19682
19768
  const panelId = `${FORM_FLOW_PANEL_ID}-${block.id}`;
19683
- const panelContent = useMemo62(() => /* @__PURE__ */ React192.createElement(FormPanel, { editor, block, onComplete: handleComplete }), [editor, block, handleComplete]);
19769
+ const panelContent = useMemo63(() => /* @__PURE__ */ React192.createElement(FormPanel, { editor, block, onComplete: handleComplete }), [editor, block, handleComplete]);
19684
19770
  const { open } = usePanel(panelId, panelContent);
19685
19771
  const handleOpen = () => {
19686
19772
  setHasOpened(true);
@@ -19717,7 +19803,7 @@ var FormFlowView = ({ editor, block }) => {
19717
19803
  )), /* @__PURE__ */ React192.createElement(Text105, { size: "xs", c: "dimmed", lineClamp: 2 }, isCompleted ? `Completed on ${new Date(block.props.completedAt).toLocaleDateString()}` : (
19718
19804
  // : block.props.description || (hasSchema ? 'Click to fill out the form' : 'Form not configured')}
19719
19805
  hasSchema ? "Click to fill out the form" : "Form not configured"
19720
- )))), /* @__PURE__ */ React192.createElement(Tooltip19, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon29, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight7, { size: 18 })))));
19806
+ )))), /* @__PURE__ */ React192.createElement(Tooltip19, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon30, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight7, { size: 18 })))));
19721
19807
  };
19722
19808
 
19723
19809
  // src/mantine/blocks/form/FormBlock.tsx
@@ -19760,18 +19846,18 @@ import { createReactBlockSpec as createReactBlockSpec17 } from "@blocknote/react
19760
19846
  import React201 from "react";
19761
19847
 
19762
19848
  // src/mantine/blocks/domainCreatorSign/template/TemplateView.tsx
19763
- import React197, { useMemo as useMemo63 } from "react";
19849
+ import React197, { useMemo as useMemo64 } from "react";
19764
19850
  import { Badge as Badge31, Group as Group64, Stack as Stack130, Text as Text106 } from "@mantine/core";
19765
19851
 
19766
19852
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
19767
19853
  import React196, { useCallback as useCallback55 } from "react";
19768
19854
 
19769
19855
  // src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
19770
- import React195, { useEffect as useEffect55, useState as useState70 } from "react";
19856
+ import React195, { useEffect as useEffect55, useState as useState71 } from "react";
19771
19857
  var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
19772
- const [localTitle, setLocalTitle] = useState70(title || "");
19773
- const [localDescription, setLocalDescription] = useState70(description || "");
19774
- const [localIcon, setLocalIcon] = useState70(icon || "file-text");
19858
+ const [localTitle, setLocalTitle] = useState71(title || "");
19859
+ const [localDescription, setLocalDescription] = useState71(description || "");
19860
+ const [localIcon, setLocalIcon] = useState71(icon || "file-text");
19775
19861
  useEffect55(() => setLocalTitle(title || ""), [title]);
19776
19862
  useEffect55(() => setLocalDescription(description || ""), [description]);
19777
19863
  useEffect55(() => setLocalIcon(icon || "file-text"), [icon]);
@@ -19860,11 +19946,11 @@ var DOMAIN_CREATOR_SIGN_TEMPLATE_PANEL_ID = "domain-creator-sign-template-panel"
19860
19946
  var DOMAIN_CREATOR_SIGN_TEMPLATE_ASSIGNMENT_PANEL_ID = "domain-creator-sign-template-assignment-panel";
19861
19947
  var DomainCreatorSignTemplateView = ({ editor, block }) => {
19862
19948
  const panelId = `${DOMAIN_CREATOR_SIGN_TEMPLATE_PANEL_ID}-${block.id}`;
19863
- const panelContent = useMemo63(() => /* @__PURE__ */ React197.createElement(TemplateConfig13, { editor, block }), [editor, block]);
19949
+ const panelContent = useMemo64(() => /* @__PURE__ */ React197.createElement(TemplateConfig13, { editor, block }), [editor, block]);
19864
19950
  const { open } = usePanel(panelId, panelContent);
19865
19951
  const { closePanel } = usePanelStore();
19866
19952
  const assignmentPanelId = `${DOMAIN_CREATOR_SIGN_TEMPLATE_ASSIGNMENT_PANEL_ID}-${block.id}`;
19867
- const assignmentPanelContent = useMemo63(
19953
+ const assignmentPanelContent = useMemo64(
19868
19954
  () => /* @__PURE__ */ React197.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React197.createElement(AssignmentTab, { editor, block })),
19869
19955
  [editor, block, closePanel]
19870
19956
  );
@@ -19873,14 +19959,14 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
19873
19959
  };
19874
19960
 
19875
19961
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
19876
- import React200, { useCallback as useCallback57, useMemo as useMemo64, useEffect as useEffect56 } from "react";
19877
- import { ActionIcon as ActionIcon30, Badge as Badge33, Group as Group67, Stack as Stack133, Text as Text109, Tooltip as Tooltip21 } from "@mantine/core";
19962
+ import React200, { useCallback as useCallback57, useMemo as useMemo65, useEffect as useEffect56 } from "react";
19963
+ import { ActionIcon as ActionIcon31, Badge as Badge33, Group as Group67, Stack as Stack133, Text as Text109, Tooltip as Tooltip21 } from "@mantine/core";
19878
19964
  import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
19879
19965
 
19880
19966
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
19881
19967
  import { Alert as Alert27, Button as Button34, Group as Group66, Loader as Loader25, Stack as Stack132, Text as Text108 } from "@mantine/core";
19882
- import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck9 } from "@tabler/icons-react";
19883
- import React199, { useCallback as useCallback56, useState as useState72 } from "react";
19968
+ import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck9 } from "@tabler/icons-react";
19969
+ import React199, { useCallback as useCallback56, useState as useState73 } from "react";
19884
19970
 
19885
19971
  // src/mantine/blocks/domainCreatorSign/utils/buildLinkedEntityResource.ts
19886
19972
  function parseLinkedEntities2(entitiesString) {
@@ -19903,11 +19989,11 @@ function buildGovernanceGroupLinkedEntities(linkedEntities) {
19903
19989
  // src/mantine/components/Base/BaseSigning.tsx
19904
19990
  import { Badge as Badge32, Box as Box39, Flex as Flex30, Group as Group65, Slider, Stack as Stack131, Tabs as Tabs4, Text as Text107, Tooltip as Tooltip20 } from "@mantine/core";
19905
19991
  import { IconClock as IconClock2, IconFeather as IconFeather2, IconUsers as IconUsers3, IconArrowsExchange as IconArrowsExchange2, IconCalendar as IconCalendar2, IconLeaf as IconLeaf2, IconBolt } from "@tabler/icons-react";
19906
- import React198, { useState as useState71 } from "react";
19992
+ import React198, { useState as useState72 } from "react";
19907
19993
  function BaseSigning({ handleSign }) {
19908
- const [value, setValue] = useState71(23);
19909
- const [isSigned, setIsSigned] = useState71(false);
19910
- const [activeTab, setActiveTab] = useState71("agents");
19994
+ const [value, setValue] = useState72(23);
19995
+ const [isSigned, setIsSigned] = useState72(false);
19996
+ const [activeTab, setActiveTab] = useState72("agents");
19911
19997
  const handleSlideEnd = (sliderValue) => {
19912
19998
  if (sliderValue >= 60) {
19913
19999
  setValue(73);
@@ -20021,9 +20107,9 @@ function BaseSigning({ handleSign }) {
20021
20107
  var SignPanel = ({ editor, block, onComplete, onError }) => {
20022
20108
  const { closePanel } = usePanelStore();
20023
20109
  const { handlers } = useBlocknoteContext();
20024
- const [flowStep, setFlowStep] = useState72(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
20025
- const [error, setError] = useState72(block.props.errorMessage || null);
20026
- const [createdEntityDid, setCreatedEntityDid] = useState72(block.props.entityDid || null);
20110
+ const [flowStep, setFlowStep] = useState73(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
20111
+ const [error, setError] = useState73(block.props.errorMessage || null);
20112
+ const [createdEntityDid, setCreatedEntityDid] = useState73(block.props.entityDid || null);
20027
20113
  const getDomainCardData = useCallback56(() => {
20028
20114
  try {
20029
20115
  return JSON.parse(block.props.domainCardData || "{}");
@@ -20170,7 +20256,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20170
20256
  return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconCheck9, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "xs" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, "Your domain has been created and the Domain Card credential has been signed and stored."), createdEntityDid && /* @__PURE__ */ React199.createElement(Text108, { size: "xs", c: "dimmed" }, "Entity DID: ", createdEntityDid))), /* @__PURE__ */ React199.createElement(Button34, { onClick: handleVisitEntity }, "Visit Entity")));
20171
20257
  }
20172
20258
  if (flowStep === "error") {
20173
- return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconAlertCircle12, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React199.createElement(Group66, null, /* @__PURE__ */ React199.createElement(Button34, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React199.createElement(Button34, { variant: "subtle", onClick: handleClose }, "Close"))));
20259
+ return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconAlertCircle11, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React199.createElement(Group66, null, /* @__PURE__ */ React199.createElement(Button34, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React199.createElement(Button34, { variant: "subtle", onClick: handleClose }, "Close"))));
20174
20260
  }
20175
20261
  const domainCardData = getDomainCardData();
20176
20262
  return /* @__PURE__ */ React199.createElement(
@@ -20236,11 +20322,11 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20236
20322
  [editor, block]
20237
20323
  );
20238
20324
  const panelId = `${DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID}-${block.id}`;
20239
- const panelContent = useMemo64(() => /* @__PURE__ */ React200.createElement(SignPanel, { editor, block, onComplete: handleComplete, onError: handleError }), [editor, block, handleComplete, handleError]);
20325
+ const panelContent = useMemo65(() => /* @__PURE__ */ React200.createElement(SignPanel, { editor, block, onComplete: handleComplete, onError: handleError }), [editor, block, handleComplete, handleError]);
20240
20326
  const { open } = usePanel(panelId, panelContent);
20241
20327
  const { closePanel } = usePanelStore();
20242
20328
  const assignmentPanelId = `domain-creator-sign-assignment-${block.id}`;
20243
- const assignmentPanelContent = useMemo64(
20329
+ const assignmentPanelContent = useMemo65(
20244
20330
  () => /* @__PURE__ */ React200.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React200.createElement(AssignmentTab, { editor, block })),
20245
20331
  [editor, block, closePanel]
20246
20332
  );
@@ -20280,7 +20366,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20280
20366
  return "Waiting for domain card data";
20281
20367
  }
20282
20368
  };
20283
- return /* @__PURE__ */ React200.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React200.createElement(Stack133, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React200.createElement(Group67, { gap: "xs", align: "center" }, /* @__PURE__ */ React200.createElement(Text109, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React200.createElement(Badge33, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React200.createElement(Text109, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), /* @__PURE__ */ React200.createElement(Group67, null, /* @__PURE__ */ React200.createElement(AssignmentDisplay, { block, onClick: openAssignment }), isClickable && /* @__PURE__ */ React200.createElement(Tooltip21, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React200.createElement(ActionIcon30, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React200.createElement(IconChevronRight8, { size: 18 }))))));
20369
+ return /* @__PURE__ */ React200.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React200.createElement(Stack133, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React200.createElement(Group67, { gap: "xs", align: "center" }, /* @__PURE__ */ React200.createElement(Text109, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React200.createElement(Badge33, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React200.createElement(Text109, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), /* @__PURE__ */ React200.createElement(Group67, null, /* @__PURE__ */ React200.createElement(AssignmentDisplay, { block, onClick: openAssignment }), isClickable && /* @__PURE__ */ React200.createElement(Tooltip21, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React200.createElement(ActionIcon31, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React200.createElement(IconChevronRight8, { size: 18 }))))));
20284
20370
  };
20285
20371
 
20286
20372
  // src/mantine/blocks/domainCreatorSign/DomainCreatorSignBlock.tsx
@@ -20340,7 +20426,7 @@ import { createReactBlockSpec as createReactBlockSpec18 } from "@blocknote/react
20340
20426
  import React208 from "react";
20341
20427
 
20342
20428
  // src/mantine/blocks/domainCardViewer/template/TemplateView.tsx
20343
- import React205, { useMemo as useMemo65 } from "react";
20429
+ import React205, { useMemo as useMemo66 } from "react";
20344
20430
  import { Badge as Badge34, Group as Group68, Stack as Stack134, Text as Text110 } from "@mantine/core";
20345
20431
 
20346
20432
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
@@ -20348,11 +20434,11 @@ import React204, { useCallback as useCallback58 } from "react";
20348
20434
  import { Paper as Paper17, CloseButton as CloseButton7, Title as Title10 } from "@mantine/core";
20349
20435
 
20350
20436
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
20351
- import React203, { useEffect as useEffect57, useState as useState73 } from "react";
20437
+ import React203, { useEffect as useEffect57, useState as useState74 } from "react";
20352
20438
  var GeneralTab14 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
20353
- const [localTitle, setLocalTitle] = useState73(title || "");
20354
- const [localDescription, setLocalDescription] = useState73(description || "");
20355
- const [localIcon, setLocalIcon] = useState73(icon || "dots-circle");
20439
+ const [localTitle, setLocalTitle] = useState74(title || "");
20440
+ const [localDescription, setLocalDescription] = useState74(description || "");
20441
+ const [localIcon, setLocalIcon] = useState74(icon || "dots-circle");
20356
20442
  useEffect57(() => setLocalTitle(title || ""), [title]);
20357
20443
  useEffect57(() => setLocalDescription(description || ""), [description]);
20358
20444
  useEffect57(() => setLocalIcon(icon || "dots-circle"), [icon]);
@@ -20465,20 +20551,20 @@ var TemplateConfig14 = ({ editor, block }) => {
20465
20551
  var DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID = "domain-card-viewer-template-panel";
20466
20552
  var DomainCardViewerTemplateView = ({ editor, block }) => {
20467
20553
  const panelId = `${DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID}-${block.id}`;
20468
- const panelContent = useMemo65(() => /* @__PURE__ */ React205.createElement(TemplateConfig14, { editor, block }), [editor, block]);
20554
+ const panelContent = useMemo66(() => /* @__PURE__ */ React205.createElement(TemplateConfig14, { editor, block }), [editor, block]);
20469
20555
  const { open } = usePanel(panelId, panelContent);
20470
20556
  return /* @__PURE__ */ React205.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React205.createElement(Badge34, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React205.createElement(Group68, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React205.createElement(Group68, { wrap: "nowrap", align: "center" }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React205.createElement(Stack134, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React205.createElement(Text110, { fw: 500, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React205.createElement(Text110, { size: "xs", c: "dimmed" }, block.props.description || "Preview domain card generated by AI")))));
20471
20557
  };
20472
20558
 
20473
20559
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
20474
- import React207, { useMemo as useMemo67, useCallback as useCallback59, useEffect as useEffect58 } from "react";
20475
- import { ActionIcon as ActionIcon31, Badge as Badge35, Button as Button36, Group as Group69, Stack as Stack136, Text as Text112, Tooltip as Tooltip22 } from "@mantine/core";
20560
+ import React207, { useMemo as useMemo68, useCallback as useCallback59, useEffect as useEffect58 } from "react";
20561
+ import { ActionIcon as ActionIcon32, Badge as Badge35, Button as Button36, Group as Group69, Stack as Stack136, Text as Text112, Tooltip as Tooltip22 } from "@mantine/core";
20476
20562
  import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash6 } from "@tabler/icons-react";
20477
20563
 
20478
20564
  // src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
20479
- import React206, { useMemo as useMemo66 } from "react";
20565
+ import React206, { useMemo as useMemo67 } from "react";
20480
20566
  import { Paper as Paper18, CloseButton as CloseButton8, Title as Title11, Stack as Stack135, Text as Text111, Loader as Loader26, Alert as Alert28, Button as Button35, Box as Box40, ScrollArea as ScrollArea7, Code as Code6 } from "@mantine/core";
20481
- import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck10, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
20567
+ import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck10, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
20482
20568
  function parsePreviewData(jsonString) {
20483
20569
  if (!jsonString || jsonString === "{}") return null;
20484
20570
  try {
@@ -20496,7 +20582,7 @@ var ViewerPanel = ({ block, onApprove }) => {
20496
20582
  const status = block.props.status || "pending";
20497
20583
  const loadingMessage = block.props.loadingMessage || "Agents is generating your domain data...";
20498
20584
  const errorMessage = block.props.errorMessage || "An error occurred while generating the domain data.";
20499
- const domainPreviewData = useMemo66(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
20585
+ const domainPreviewData = useMemo67(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
20500
20586
  const isLoading = status === "loading";
20501
20587
  const isError = status === "error";
20502
20588
  const isReady = status === "ready";
@@ -20527,7 +20613,7 @@ var ViewerPanel = ({ block, onApprove }) => {
20527
20613
  /* @__PURE__ */ React206.createElement(Title11, { order: 5 }, block.props.title || "Domain Card"),
20528
20614
  /* @__PURE__ */ React206.createElement(CloseButton8, { onClick: closePanel })
20529
20615
  ),
20530
- /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React206.createElement(Stack135, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Loader26, { size: "lg", color: "blue" }), /* @__PURE__ */ React206.createElement(Stack135, { align: "center", gap: "xs" }, /* @__PURE__ */ React206.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React206.createElement(Stack135, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Alert28, { icon: /* @__PURE__ */ React206.createElement(IconAlertCircle13, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
20616
+ /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React206.createElement(Stack135, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Loader26, { size: "lg", color: "blue" }), /* @__PURE__ */ React206.createElement(Stack135, { align: "center", gap: "xs" }, /* @__PURE__ */ React206.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React206.createElement(Stack135, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Alert28, { icon: /* @__PURE__ */ React206.createElement(IconAlertCircle12, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
20531
20617
  // Use custom renderer from web app
20532
20618
  /* @__PURE__ */ React206.createElement(ScrollArea7, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
20533
20619
  ) : (
@@ -20805,7 +20891,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
20805
20891
  });
20806
20892
  }, [editor, block]);
20807
20893
  const panelId = `${DOMAIN_CARD_VIEWER_FLOW_PANEL_ID}-${block.id}`;
20808
- const panelContent = useMemo67(() => /* @__PURE__ */ React207.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
20894
+ const panelContent = useMemo68(() => /* @__PURE__ */ React207.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
20809
20895
  const { open } = usePanel(panelId, panelContent);
20810
20896
  const handleInjectDummyData = useCallback59(
20811
20897
  (e) => {
@@ -20882,7 +20968,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
20882
20968
  }
20883
20969
  };
20884
20970
  const canOpenPanel = status !== "pending";
20885
- return /* @__PURE__ */ React207.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React207.createElement(Stack136, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React207.createElement(Group69, { gap: "xs", align: "center" }, /* @__PURE__ */ React207.createElement(Text112, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React207.createElement(Badge35, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React207.createElement(Text112, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && /* @__PURE__ */ React207.createElement(React207.Fragment, null, /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React207.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTrash6, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React207.createElement(Tooltip22, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React207.createElement(ActionIcon31, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React207.createElement(IconChevronRight9, { size: 18 })))));
20971
+ return /* @__PURE__ */ React207.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React207.createElement(Stack136, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React207.createElement(Group69, { gap: "xs", align: "center" }, /* @__PURE__ */ React207.createElement(Text112, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React207.createElement(Badge35, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React207.createElement(Text112, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && /* @__PURE__ */ React207.createElement(React207.Fragment, null, /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React207.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTrash6, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React207.createElement(Tooltip22, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React207.createElement(ActionIcon32, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React207.createElement(IconChevronRight9, { size: 18 })))));
20886
20972
  };
20887
20973
 
20888
20974
  // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
@@ -20934,14 +21020,14 @@ import { createReactBlockSpec as createReactBlockSpec19 } from "@blocknote/react
20934
21020
  import React215 from "react";
20935
21021
 
20936
21022
  // src/mantine/blocks/governanceGroup/template/TemplateView.tsx
20937
- import React212, { useMemo as useMemo68 } from "react";
21023
+ import React212, { useMemo as useMemo69 } from "react";
20938
21024
  import { Badge as Badge36, Group as Group70, Stack as Stack138, Text as Text114 } from "@mantine/core";
20939
21025
 
20940
21026
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
20941
21027
  import React211, { useCallback as useCallback60 } from "react";
20942
21028
 
20943
21029
  // src/mantine/blocks/governanceGroup/template/GeneralTab.tsx
20944
- import React210, { useEffect as useEffect59, useState as useState74 } from "react";
21030
+ import React210, { useEffect as useEffect59, useState as useState75 } from "react";
20945
21031
  import { Card as Card18, SimpleGrid as SimpleGrid2, Stack as Stack137, Text as Text113, ThemeIcon as ThemeIcon3 } from "@mantine/core";
20946
21032
  import { IconUsers as IconUsers4, IconSignature, IconPhoto as IconPhoto2, IconCoin } from "@tabler/icons-react";
20947
21033
 
@@ -20981,9 +21067,9 @@ var GROUP_TYPE_ICONS = {
20981
21067
  tokenStaking: /* @__PURE__ */ React210.createElement(IconCoin, { size: 20 })
20982
21068
  };
20983
21069
  var GeneralTab15 = ({ title, description, icon, groupType, onTitleChange, onDescriptionChange, onIconChange, onGroupTypeChange }) => {
20984
- const [localTitle, setLocalTitle] = useState74(title || "");
20985
- const [localDescription, setLocalDescription] = useState74(description || "");
20986
- const [localIcon, setLocalIcon] = useState74(icon || "users");
21070
+ const [localTitle, setLocalTitle] = useState75(title || "");
21071
+ const [localDescription, setLocalDescription] = useState75(description || "");
21072
+ const [localIcon, setLocalIcon] = useState75(icon || "users");
20987
21073
  useEffect59(() => setLocalTitle(title || ""), [title]);
20988
21074
  useEffect59(() => setLocalDescription(description || ""), [description]);
20989
21075
  useEffect59(() => setLocalIcon(icon || "users"), [icon]);
@@ -21849,21 +21935,21 @@ var TemplateConfig15 = ({ editor, block }) => {
21849
21935
  var GOVERNANCE_GROUP_TEMPLATE_PANEL_ID = "governance-group-template-panel";
21850
21936
  var GovernanceGroupTemplateView = ({ editor, block }) => {
21851
21937
  const panelId = `${GOVERNANCE_GROUP_TEMPLATE_PANEL_ID}-${block.id}`;
21852
- const panelContent = useMemo68(() => /* @__PURE__ */ React212.createElement(TemplateConfig15, { editor, block }), [editor, block]);
21938
+ const panelContent = useMemo69(() => /* @__PURE__ */ React212.createElement(TemplateConfig15, { editor, block }), [editor, block]);
21853
21939
  const { open } = usePanel(panelId, panelContent);
21854
21940
  return /* @__PURE__ */ React212.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React212.createElement(Badge36, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React212.createElement(Group70, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React212.createElement(Group70, { wrap: "nowrap", align: "center" }, getIcon("users", block.props.icon), /* @__PURE__ */ React212.createElement(Stack138, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React212.createElement(Text114, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React212.createElement(Text114, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Configure the governance group creation flow")))));
21855
21941
  };
21856
21942
 
21857
21943
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
21858
- import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo70, useRef as useRef16, useState as useState76 } from "react";
21859
- import { ActionIcon as ActionIcon32, Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116, Tooltip as Tooltip23 } from "@mantine/core";
21944
+ import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo71, useRef as useRef16, useState as useState77 } from "react";
21945
+ import { ActionIcon as ActionIcon33, Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116, Tooltip as Tooltip23 } from "@mantine/core";
21860
21946
  import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
21861
21947
 
21862
21948
  // src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
21863
- import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo69, useRef as useRef15, useState as useState75 } from "react";
21949
+ import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo70, useRef as useRef15, useState as useState76 } from "react";
21864
21950
  import { Alert as Alert29, Button as Button37, Card as Card19, Group as Group71, Loader as Loader27, SimpleGrid as SimpleGrid3, Stack as Stack139, Text as Text115, ThemeIcon as ThemeIcon4 } from "@mantine/core";
21865
21951
  import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
21866
- import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
21952
+ import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
21867
21953
  import { Survey as Survey7, SurveyModel as SurveyModel7 } from "@ixo/surveys";
21868
21954
  var SYNC_DEBOUNCE_MS3 = 300;
21869
21955
  function deepEqual3(a, b) {
@@ -21900,14 +21986,14 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
21900
21986
  if (existingGroupType) return "survey";
21901
21987
  return "typeSelection";
21902
21988
  };
21903
- const [flowStep, setFlowStep] = useState75(getInitialFlowStep);
21904
- const [selectedGroupType, setSelectedGroupType] = useState75(existingGroupType || null);
21905
- const [error, setError] = useState75(null);
21906
- const [createdCoreAddress, setCreatedCoreAddress] = useState75(existingCoreAddress || null);
21907
- const [createdGroupAddress, setCreatedGroupAddress] = useState75(block.props.groupAddress || null);
21989
+ const [flowStep, setFlowStep] = useState76(getInitialFlowStep);
21990
+ const [selectedGroupType, setSelectedGroupType] = useState76(existingGroupType || null);
21991
+ const [error, setError] = useState76(null);
21992
+ const [createdCoreAddress, setCreatedCoreAddress] = useState76(existingCoreAddress || null);
21993
+ const [createdGroupAddress, setCreatedGroupAddress] = useState76(block.props.groupAddress || null);
21908
21994
  const isUpdatingFromProp = useRef15(false);
21909
21995
  const lastSyncedAnswers = useRef15("");
21910
- const surveyModel = useMemo69(() => {
21996
+ const surveyModel = useMemo70(() => {
21911
21997
  if (!selectedGroupType) return null;
21912
21998
  const surveySchema = getSurveyForGroupType(selectedGroupType);
21913
21999
  if (!surveySchema) return null;
@@ -22085,7 +22171,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22085
22171
  return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconCheck11, { size: 16 }), title: "Group Created Successfully", color: "green" }, /* @__PURE__ */ React213.createElement(Stack139, { gap: "xs" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, "Your ", groupTypeName, " has been created successfully."), createdCoreAddress && /* @__PURE__ */ React213.createElement(Text115, { size: "xs", c: "dimmed" }, "Core Address: ", createdCoreAddress), createdGroupAddress && /* @__PURE__ */ React213.createElement(Text115, { size: "xs", c: "dimmed" }, "Group Address: ", createdGroupAddress))), /* @__PURE__ */ React213.createElement(Button37, { onClick: handleClose }, "Close"));
22086
22172
  }
22087
22173
  if (flowStep === "error") {
22088
- return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconAlertCircle14, { size: 16 }), title: "Group Creation Failed", color: "red" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React213.createElement(Group71, null, /* @__PURE__ */ React213.createElement(Button37, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React213.createElement(Button37, { variant: "subtle", onClick: handleClose }, "Close")));
22174
+ return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconAlertCircle13, { size: 16 }), title: "Group Creation Failed", color: "red" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React213.createElement(Group71, null, /* @__PURE__ */ React213.createElement(Button37, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React213.createElement(Button37, { variant: "subtle", onClick: handleClose }, "Close")));
22089
22175
  }
22090
22176
  if (flowStep === "survey" && surveyModel) {
22091
22177
  const groupTypeName = selectedGroupType ? GROUP_TYPE_CONFIGS.find((c) => c.type === selectedGroupType)?.title || "Group" : "Group";
@@ -22106,8 +22192,8 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22106
22192
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
22107
22193
  var GOVERNANCE_GROUP_FLOW_PANEL_ID = "governance-group-flow-panel";
22108
22194
  var GovernanceGroupFlowView = ({ editor, block }) => {
22109
- const [hasOpened, setHasOpened] = useState76(false);
22110
- const [submissionStatus, setSubmissionStatus] = useState76("idle");
22195
+ const [hasOpened, setHasOpened] = useState77(false);
22196
+ const [submissionStatus, setSubmissionStatus] = useState77("idle");
22111
22197
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
22112
22198
  const hasExistingSubmission = lastSubmission?.coreAddress;
22113
22199
  const editorRef = useRef16(editor);
@@ -22116,7 +22202,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22116
22202
  editorRef.current = editor;
22117
22203
  blockRef.current = block;
22118
22204
  });
22119
- const stableEditor = useMemo70(
22205
+ const stableEditor = useMemo71(
22120
22206
  () => new Proxy(editor, {
22121
22207
  get(_, prop) {
22122
22208
  return editorRef.current[prop];
@@ -22125,7 +22211,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22125
22211
  // eslint-disable-next-line react-hooks/exhaustive-deps
22126
22212
  []
22127
22213
  );
22128
- const stableBlock = useMemo70(
22214
+ const stableBlock = useMemo71(
22129
22215
  () => new Proxy(block, {
22130
22216
  get(_, prop) {
22131
22217
  return blockRef.current[prop];
@@ -22165,7 +22251,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22165
22251
  []
22166
22252
  );
22167
22253
  const panelId = `${GOVERNANCE_GROUP_FLOW_PANEL_ID}-${block.id}`;
22168
- const panelContent = useMemo70(
22254
+ const panelContent = useMemo71(
22169
22255
  () => /* @__PURE__ */ React214.createElement(GovernanceGroupPanel, { editor: stableEditor, block: stableBlock, onComplete: stableHandleComplete }),
22170
22256
  [stableEditor, stableBlock, stableHandleComplete]
22171
22257
  );
@@ -22192,7 +22278,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22192
22278
  const groupTypeName = lastSubmission.groupType ? lastSubmission.groupType.charAt(0).toUpperCase() + lastSubmission.groupType.slice(1).replace(/([A-Z])/g, " $1") : "Group";
22193
22279
  return `${groupTypeName} created: ${lastSubmission.coreAddress?.slice(0, 12)}...`;
22194
22280
  };
22195
- return /* @__PURE__ */ React214.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("users", block.props.icon), /* @__PURE__ */ React214.createElement(Stack140, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React214.createElement(Group72, { gap: "xs", align: "center" }, /* @__PURE__ */ React214.createElement(Text116, { fw: 600, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React214.createElement(Badge37, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React214.createElement(Text116, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 2 }, hasExistingSubmission ? getSubmissionDisplay() : block.props.description || "Open the panel to create a new governance group."))), /* @__PURE__ */ React214.createElement(Tooltip23, { label: hasExistingSubmission ? "View/Edit group" : "Create group", withArrow: true }, /* @__PURE__ */ React214.createElement(ActionIcon32, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React214.createElement(IconChevronRight10, { size: 18 })))));
22281
+ return /* @__PURE__ */ React214.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("users", block.props.icon), /* @__PURE__ */ React214.createElement(Stack140, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React214.createElement(Group72, { gap: "xs", align: "center" }, /* @__PURE__ */ React214.createElement(Text116, { fw: 600, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React214.createElement(Badge37, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React214.createElement(Text116, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 2 }, hasExistingSubmission ? getSubmissionDisplay() : block.props.description || "Open the panel to create a new governance group."))), /* @__PURE__ */ React214.createElement(Tooltip23, { label: hasExistingSubmission ? "View/Edit group" : "Create group", withArrow: true }, /* @__PURE__ */ React214.createElement(ActionIcon33, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React214.createElement(IconChevronRight10, { size: 18 })))));
22196
22282
  };
22197
22283
 
22198
22284
  // src/mantine/blocks/governanceGroup/GovernanceGroupBlock.tsx
@@ -22242,7 +22328,7 @@ import { createReactBlockSpec as createReactBlockSpec20 } from "@blocknote/react
22242
22328
  import React223 from "react";
22243
22329
 
22244
22330
  // src/mantine/blocks/flowLink/template/TemplateView.tsx
22245
- import React220, { useMemo as useMemo72 } from "react";
22331
+ import React220, { useMemo as useMemo73 } from "react";
22246
22332
  import { Group as Group74, Stack as Stack143, Text as Text118 } from "@mantine/core";
22247
22333
 
22248
22334
  // src/mantine/blocks/flowLink/template/TemplateConfig.tsx
@@ -22279,8 +22365,8 @@ var GeneralTab16 = ({ title, description, icon, onTitleChange, onDescriptionChan
22279
22365
  };
22280
22366
 
22281
22367
  // src/mantine/blocks/flowLink/template/LinksTab.tsx
22282
- import React218, { useMemo as useMemo71 } from "react";
22283
- import { Stack as Stack142, Card as Card20, Group as Group73, ActionIcon as ActionIcon33, Text as Text117, Divider as Divider17 } from "@mantine/core";
22368
+ import React218, { useMemo as useMemo72 } from "react";
22369
+ import { Stack as Stack142, Card as Card20, Group as Group73, ActionIcon as ActionIcon34, Text as Text117, Divider as Divider18 } from "@mantine/core";
22284
22370
  import { IconPlus as IconPlus6, IconTrash as IconTrash7, IconGripVertical } from "@tabler/icons-react";
22285
22371
  import { DndContext, PointerSensor, useSensor, useSensors, closestCenter, useDraggable, useDroppable } from "@dnd-kit/core";
22286
22372
 
@@ -22309,7 +22395,7 @@ var DraggableLinkCard = ({ link, index, onRemove, onUpdate }) => {
22309
22395
  opacity: isDragging ? 0.5 : 1,
22310
22396
  border: isOver ? "2px dashed var(--mantine-color-accent-5)" : void 0
22311
22397
  };
22312
- return /* @__PURE__ */ React218.createElement("div", { ref: setDropRef }, /* @__PURE__ */ React218.createElement(Card20, { p: "sm", style }, /* @__PURE__ */ React218.createElement(Stack142, { gap: "xs" }, /* @__PURE__ */ React218.createElement(Group73, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React218.createElement(Group73, { gap: "xs", align: "center" }, /* @__PURE__ */ React218.createElement("div", { ref: setDragRef, ...listeners, ...attributes, style: { cursor: "grab", display: "flex", alignItems: "center" } }, /* @__PURE__ */ React218.createElement(IconGripVertical, { size: 16, color: "gray" })), /* @__PURE__ */ React218.createElement(Text117, { size: "xs", c: "dimmed" }, link.title || `Link ${index + 1}`)), /* @__PURE__ */ React218.createElement(ActionIcon33, { variant: "subtle", color: "red", size: "sm", onClick: () => onRemove(link.id) }, /* @__PURE__ */ React218.createElement(IconTrash7, { size: 14 }))), /* @__PURE__ */ React218.createElement(Divider17, null), /* @__PURE__ */ React218.createElement(BaseTextInput, { label: "Title", placeholder: "Link title", value: link.title, onChange: (e) => onUpdate(link.id, "title", e.currentTarget.value) }), /* @__PURE__ */ React218.createElement(
22398
+ return /* @__PURE__ */ React218.createElement("div", { ref: setDropRef }, /* @__PURE__ */ React218.createElement(Card20, { p: "sm", style }, /* @__PURE__ */ React218.createElement(Stack142, { gap: "xs" }, /* @__PURE__ */ React218.createElement(Group73, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React218.createElement(Group73, { gap: "xs", align: "center" }, /* @__PURE__ */ React218.createElement("div", { ref: setDragRef, ...listeners, ...attributes, style: { cursor: "grab", display: "flex", alignItems: "center" } }, /* @__PURE__ */ React218.createElement(IconGripVertical, { size: 16, color: "gray" })), /* @__PURE__ */ React218.createElement(Text117, { size: "xs", c: "dimmed" }, link.title || `Link ${index + 1}`)), /* @__PURE__ */ React218.createElement(ActionIcon34, { variant: "subtle", color: "red", size: "sm", onClick: () => onRemove(link.id) }, /* @__PURE__ */ React218.createElement(IconTrash7, { size: 14 }))), /* @__PURE__ */ React218.createElement(Divider18, null), /* @__PURE__ */ React218.createElement(BaseTextInput, { label: "Title", placeholder: "Link title", value: link.title, onChange: (e) => onUpdate(link.id, "title", e.currentTarget.value) }), /* @__PURE__ */ React218.createElement(
22313
22399
  BaseTextInput,
22314
22400
  {
22315
22401
  label: "Description",
@@ -22339,7 +22425,7 @@ var DraggableLinkCard = ({ link, index, onRemove, onUpdate }) => {
22339
22425
  };
22340
22426
  var LinksTab = ({ links, onLinksChange }) => {
22341
22427
  const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 8 } }));
22342
- const sortedLinks = useMemo71(() => [...links].sort((a, b) => a.position - b.position), [links]);
22428
+ const sortedLinks = useMemo72(() => [...links].sort((a, b) => a.position - b.position), [links]);
22343
22429
  const handleAddLink = () => {
22344
22430
  const maxPosition = links.length > 0 ? Math.max(...links.map((l) => l.position)) : -1;
22345
22431
  const newLink = {
@@ -22421,7 +22507,7 @@ var TemplateConfig16 = ({ editor, block }) => {
22421
22507
  var FLOW_LINK_TEMPLATE_PANEL_ID = "flow-link-template-panel";
22422
22508
  var FlowLinkTemplateView = ({ editor, block }) => {
22423
22509
  const panelId = `${FLOW_LINK_TEMPLATE_PANEL_ID}-${block.id}`;
22424
- const panelContent = useMemo72(() => /* @__PURE__ */ React220.createElement(TemplateConfig16, { editor, block }), [editor, block]);
22510
+ const panelContent = useMemo73(() => /* @__PURE__ */ React220.createElement(TemplateConfig16, { editor, block }), [editor, block]);
22425
22511
  const { open } = usePanel(panelId, panelContent);
22426
22512
  const links = safeParseJSONArray(block.props.links);
22427
22513
  const linksCount = links.length;
@@ -22429,18 +22515,18 @@ var FlowLinkTemplateView = ({ editor, block }) => {
22429
22515
  };
22430
22516
 
22431
22517
  // src/mantine/blocks/flowLink/flow/FlowView.tsx
22432
- import React222, { useMemo as useMemo73 } from "react";
22518
+ import React222, { useMemo as useMemo74 } from "react";
22433
22519
  import { Badge as Badge39, Group as Group76, Stack as Stack145, Text as Text120, Tooltip as Tooltip25 } from "@mantine/core";
22434
22520
 
22435
22521
  // src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
22436
- import React221, { useState as useState77, useEffect as useEffect62, useCallback as useCallback63 } from "react";
22437
- import { Stack as Stack144, Text as Text119, Card as Card21, Group as Group75, Badge as Badge38, ActionIcon as ActionIcon34, Loader as Loader28, Tooltip as Tooltip24 } from "@mantine/core";
22438
- import { IconRefresh as IconRefresh8, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22522
+ import React221, { useState as useState78, useEffect as useEffect62, useCallback as useCallback63 } from "react";
22523
+ import { Stack as Stack144, Text as Text119, Card as Card21, Group as Group75, Badge as Badge38, ActionIcon as ActionIcon35, Loader as Loader28, Tooltip as Tooltip24 } from "@mantine/core";
22524
+ import { IconRefresh as IconRefresh7, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22439
22525
  var FlowLinkPanel = ({ block }) => {
22440
22526
  const { closePanel } = usePanelStore();
22441
22527
  const handlers = useBlocknoteHandlers();
22442
22528
  const links = safeParseJSONArray(block.props.links).sort((a, b) => a.position - b.position);
22443
- const [linksWithStatus, setLinksWithStatus] = useState77(links.map((link) => ({ ...link })));
22529
+ const [linksWithStatus, setLinksWithStatus] = useState78(links.map((link) => ({ ...link })));
22444
22530
  const fetchStatuses = useCallback63(async () => {
22445
22531
  if (!handlers.getFlowStatus) {
22446
22532
  return;
@@ -22487,7 +22573,7 @@ var FlowLinkPanel = ({ block }) => {
22487
22573
  return /* @__PURE__ */ React221.createElement(Badge38, { display: "inline-block", size: "sm", variant: "light", color: "gray", leftSection: /* @__PURE__ */ React221.createElement(IconCircleDashed4, { size: 12 }) }, "Not Started");
22488
22574
  }
22489
22575
  };
22490
- return /* @__PURE__ */ React221.createElement(BaseRightPanelLayout, { title: block.props.title || "Flow Links", onClose: closePanel }, /* @__PURE__ */ React221.createElement(Stack144, { gap: "md" }, handlers.getFlowStatus && /* @__PURE__ */ React221.createElement(Tooltip24, { label: "Refresh status" }, /* @__PURE__ */ React221.createElement(ActionIcon34, { variant: "subtle", size: "sm", onClick: fetchStatuses }, /* @__PURE__ */ React221.createElement(IconRefresh8, { size: 16 }))), linksWithStatus.length === 0 ? /* @__PURE__ */ React221.createElement(Card21, { withBorder: true, p: "md", bg: "gray.0" }, /* @__PURE__ */ React221.createElement(Text119, { size: "sm", c: "dimmed", ta: "center" }, "No flow links configured.")) : /* @__PURE__ */ React221.createElement(Stack144, { gap: "sm" }, linksWithStatus.map((link) => /* @__PURE__ */ React221.createElement(Stack144, { key: link.id }, link.description && /* @__PURE__ */ React221.createElement(Text119, null, link.description), /* @__PURE__ */ React221.createElement(
22576
+ return /* @__PURE__ */ React221.createElement(BaseRightPanelLayout, { title: block.props.title || "Flow Links", onClose: closePanel }, /* @__PURE__ */ React221.createElement(Stack144, { gap: "md" }, handlers.getFlowStatus && /* @__PURE__ */ React221.createElement(Tooltip24, { label: "Refresh status" }, /* @__PURE__ */ React221.createElement(ActionIcon35, { variant: "subtle", size: "sm", onClick: fetchStatuses }, /* @__PURE__ */ React221.createElement(IconRefresh7, { size: 16 }))), linksWithStatus.length === 0 ? /* @__PURE__ */ React221.createElement(Card21, { withBorder: true, p: "md", bg: "gray.0" }, /* @__PURE__ */ React221.createElement(Text119, { size: "sm", c: "dimmed", ta: "center" }, "No flow links configured.")) : /* @__PURE__ */ React221.createElement(Stack144, { gap: "sm" }, linksWithStatus.map((link) => /* @__PURE__ */ React221.createElement(Stack144, { key: link.id }, link.description && /* @__PURE__ */ React221.createElement(Text119, null, link.description), /* @__PURE__ */ React221.createElement(
22491
22577
  BaseContainer,
22492
22578
  {
22493
22579
  onClick: () => handlers.navigateToFlow && handleNavigate(link.docRoomId),
@@ -22504,7 +22590,7 @@ var FlowLinkFlowView = ({ editor, block, isDisabled }) => {
22504
22590
  const links = safeParseJSONArray(block.props.links);
22505
22591
  const linksCount = links.length;
22506
22592
  const panelId = `${FLOW_LINK_FLOW_PANEL_ID}-${block.id}`;
22507
- const panelContent = useMemo73(() => /* @__PURE__ */ React222.createElement(FlowLinkPanel, { editor, block }), [editor, block]);
22593
+ const panelContent = useMemo74(() => /* @__PURE__ */ React222.createElement(FlowLinkPanel, { editor, block }), [editor, block]);
22508
22594
  const { open } = usePanel(panelId, panelContent);
22509
22595
  const handleClick = () => {
22510
22596
  if (!disabled) {
@@ -22758,10 +22844,10 @@ blockRegistry.register({
22758
22844
  });
22759
22845
 
22760
22846
  // src/mantine/blocks/hooks/useBlockDependencies.ts
22761
- import { useMemo as useMemo74, useEffect as useEffect63, useState as useState78, useCallback as useCallback64 } from "react";
22847
+ import { useMemo as useMemo75, useEffect as useEffect63, useState as useState79, useCallback as useCallback64 } from "react";
22762
22848
 
22763
22849
  // src/mantine/blocks/hooks/useDependsOn.ts
22764
- import { useMemo as useMemo75 } from "react";
22850
+ import { useMemo as useMemo76 } from "react";
22765
22851
 
22766
22852
  // src/mantine/blocks/index.ts
22767
22853
  var blockSpecs = {
@@ -23328,15 +23414,15 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
23328
23414
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
23329
23415
 
23330
23416
  // src/core/hooks/useMatrixProvider.ts
23331
- import { useEffect as useEffect64, useState as useState79, useRef as useRef17, useCallback as useCallback65, useMemo as useMemo76 } from "react";
23417
+ import { useEffect as useEffect64, useState as useState80, useRef as useRef17, useCallback as useCallback65, useMemo as useMemo77 } from "react";
23332
23418
  import { MatrixProvider } from "@ixo/matrix-crdt";
23333
23419
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23334
- const [matrixProvider, setProvider] = useState79(null);
23335
- const [status, setStatus] = useState79("disconnected");
23420
+ const [matrixProvider, setProvider] = useState80(null);
23421
+ const [status, setStatus] = useState80("disconnected");
23336
23422
  const isMountedRef = useRef17(true);
23337
23423
  const providerRef = useRef17(null);
23338
23424
  const retryTimeoutRef = useRef17(null);
23339
- const providerOptions = useMemo76(
23425
+ const providerOptions = useMemo77(
23340
23426
  () => ({
23341
23427
  translator: {
23342
23428
  updateEventType: "matrix-crdt.doc_update",
@@ -23423,17 +23509,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23423
23509
  }
23424
23510
 
23425
23511
  // src/mantine/hooks/useCollaborativeYDoc.ts
23426
- import { useMemo as useMemo77 } from "react";
23512
+ import { useMemo as useMemo78 } from "react";
23427
23513
  import * as Y from "yjs";
23428
23514
  function useCollaborativeYDoc(_options) {
23429
- return useMemo77(() => {
23515
+ return useMemo78(() => {
23430
23516
  const doc = new Y.Doc();
23431
23517
  return doc;
23432
23518
  }, []);
23433
23519
  }
23434
23520
 
23435
23521
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
23436
- import { useMemo as useMemo78, useEffect as useEffect65, useState as useState80 } from "react";
23522
+ import { useMemo as useMemo79, useEffect as useEffect65, useState as useState81 } from "react";
23437
23523
 
23438
23524
  // src/core/lib/matrixMetadata.ts
23439
23525
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -23602,7 +23688,7 @@ function useCreateCollaborativeIxoEditor(options) {
23602
23688
  matrixClient,
23603
23689
  permissions = { write: false }
23604
23690
  } = options || {};
23605
- const memoizedUser = useMemo78(
23691
+ const memoizedUser = useMemo79(
23606
23692
  () => ({
23607
23693
  id: user?.id || "",
23608
23694
  name: user?.name || "",
@@ -23617,13 +23703,13 @@ function useCreateCollaborativeIxoEditor(options) {
23617
23703
  matrixClient,
23618
23704
  roomId: options.roomId
23619
23705
  });
23620
- const metadataManager = useMemo78(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
23706
+ const metadataManager = useMemo79(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
23621
23707
  useEffect65(() => {
23622
23708
  return () => {
23623
23709
  metadataManager.dispose();
23624
23710
  };
23625
23711
  }, [metadataManager]);
23626
- const defaultUploadFile = useMemo78(
23712
+ const defaultUploadFile = useMemo79(
23627
23713
  () => uploadFile || (async (file) => {
23628
23714
  return new Promise((resolve, reject) => {
23629
23715
  const reader = new FileReader();
@@ -23637,7 +23723,7 @@ function useCreateCollaborativeIxoEditor(options) {
23637
23723
  }),
23638
23724
  [uploadFile]
23639
23725
  );
23640
- const schema = useMemo78(
23726
+ const schema = useMemo79(
23641
23727
  () => BlockNoteSchema2.create({
23642
23728
  blockSpecs: {
23643
23729
  ...defaultBlockSpecs2,
@@ -23652,16 +23738,16 @@ function useCreateCollaborativeIxoEditor(options) {
23652
23738
  }),
23653
23739
  []
23654
23740
  );
23655
- const root = useMemo78(() => yDoc.getMap("root"), [yDoc]);
23656
- const documentFragment = useMemo78(() => yDoc.getXmlFragment("document"), [yDoc]);
23657
- const flowArray = useMemo78(() => yDoc.getArray("flow"), [yDoc]);
23658
- const runtimeMap = useMemo78(() => yDoc.getMap("runtime"), [yDoc]);
23659
- const delegationsMap = useMemo78(() => yDoc.getMap("delegations"), [yDoc]);
23660
- const invocationsMap = useMemo78(() => yDoc.getMap("invocations"), [yDoc]);
23661
- const ucanDelegationStore = useMemo78(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
23662
- const invocationStore = useMemo78(() => createInvocationStore(invocationsMap), [invocationsMap]);
23663
- const userFragment = useMemo78(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
23664
- const collaborationConfig = useMemo78(
23741
+ const root = useMemo79(() => yDoc.getMap("root"), [yDoc]);
23742
+ const documentFragment = useMemo79(() => yDoc.getXmlFragment("document"), [yDoc]);
23743
+ const flowArray = useMemo79(() => yDoc.getArray("flow"), [yDoc]);
23744
+ const runtimeMap = useMemo79(() => yDoc.getMap("runtime"), [yDoc]);
23745
+ const delegationsMap = useMemo79(() => yDoc.getMap("delegations"), [yDoc]);
23746
+ const invocationsMap = useMemo79(() => yDoc.getMap("invocations"), [yDoc]);
23747
+ const ucanDelegationStore = useMemo79(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
23748
+ const invocationStore = useMemo79(() => createInvocationStore(invocationsMap), [invocationsMap]);
23749
+ const userFragment = useMemo79(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
23750
+ const collaborationConfig = useMemo79(
23665
23751
  () => ({
23666
23752
  provider: matrixProvider,
23667
23753
  fragment: documentFragment,
@@ -23673,7 +23759,7 @@ function useCreateCollaborativeIxoEditor(options) {
23673
23759
  }),
23674
23760
  [matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
23675
23761
  );
23676
- const ixoConfig = useMemo78(
23762
+ const ixoConfig = useMemo79(
23677
23763
  () => ({
23678
23764
  theme,
23679
23765
  editable,
@@ -23692,7 +23778,7 @@ function useCreateCollaborativeIxoEditor(options) {
23692
23778
  uploadFile: defaultUploadFile,
23693
23779
  collaboration: collaborationConfig
23694
23780
  });
23695
- const titleText = useMemo78(() => yDoc.getText("title"), [yDoc]);
23781
+ const titleText = useMemo79(() => yDoc.getText("title"), [yDoc]);
23696
23782
  let ixoEditor;
23697
23783
  if (editor) {
23698
23784
  ixoEditor = editor;
@@ -23897,7 +23983,7 @@ function useCreateCollaborativeIxoEditor(options) {
23897
23983
  titleText.insert(0, options.title);
23898
23984
  }
23899
23985
  }, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, memoizedUser.id]);
23900
- const [connectedUsers, setConnectedUsers] = useState80([]);
23986
+ const [connectedUsers, setConnectedUsers] = useState81([]);
23901
23987
  const webrtcProvider = matrixProvider?.webrtcProvider;
23902
23988
  useEffect65(() => {
23903
23989
  if (!matrixProvider?.awarenessInstance || !webrtcProvider || connectionStatus !== "connected") {
@@ -23956,10 +24042,10 @@ function useCreateCollaborativeIxoEditor(options) {
23956
24042
  }
23957
24043
 
23958
24044
  // src/mantine/components/Base/BaseIconPicker.tsx
23959
- import React226, { useState as useState81, useMemo as useMemo79, useEffect as useEffect66 } from "react";
24045
+ import React226, { useState as useState82, useMemo as useMemo80, useEffect as useEffect66 } from "react";
23960
24046
  import { TextInput as TextInput7, Tabs as Tabs5, Box as Box41, Stack as Stack146, UnstyledButton as UnstyledButton2, Text as Text121, Center as Center12, ScrollArea as ScrollArea8, Group as Group77, Popover as Popover4 } from "@mantine/core";
23961
24047
  import * as TablerIcons from "@tabler/icons-react";
23962
- import { IconSearch as IconSearch6, IconX as IconX10, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
24048
+ import { IconSearch as IconSearch6, IconX as IconX11, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
23963
24049
 
23964
24050
  // src/mantine/components/Base/CoverImageButton.tsx
23965
24051
  import React225, { forwardRef } from "react";
@@ -24014,14 +24100,14 @@ var localStorageService = {
24014
24100
  var iconsKey = "editor_recent_icons";
24015
24101
  var ICONS_PER_PAGE = 500;
24016
24102
  function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }) {
24017
- const [searchQuery, setSearchQuery] = useState81("");
24018
- const [activeTab, setActiveTab] = useState81("icons");
24019
- const [currentPage, setCurrentPage] = useState81(1);
24020
- const allIcons = useMemo79(() => {
24103
+ const [searchQuery, setSearchQuery] = useState82("");
24104
+ const [activeTab, setActiveTab] = useState82("icons");
24105
+ const [currentPage, setCurrentPage] = useState82(1);
24106
+ const allIcons = useMemo80(() => {
24021
24107
  const iconEntries = Object.entries(TablerIcons).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
24022
24108
  return iconEntries;
24023
24109
  }, []);
24024
- const filteredIcons = useMemo79(() => {
24110
+ const filteredIcons = useMemo80(() => {
24025
24111
  if (!searchQuery) return allIcons;
24026
24112
  const query = searchQuery.toLowerCase();
24027
24113
  return allIcons.filter(([name]) => name.toLowerCase().includes(query));
@@ -24029,13 +24115,13 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24029
24115
  useEffect66(() => {
24030
24116
  setCurrentPage(1);
24031
24117
  }, [searchQuery]);
24032
- const paginatedIcons = useMemo79(() => {
24118
+ const paginatedIcons = useMemo80(() => {
24033
24119
  const startIndex = (currentPage - 1) * ICONS_PER_PAGE;
24034
24120
  const endIndex = startIndex + ICONS_PER_PAGE;
24035
24121
  return filteredIcons.slice(startIndex, endIndex);
24036
24122
  }, [filteredIcons, currentPage]);
24037
24123
  const totalPages = Math.ceil(filteredIcons.length / ICONS_PER_PAGE);
24038
- const recentIcons = useMemo79(() => {
24124
+ const recentIcons = useMemo80(() => {
24039
24125
  const recentIconNames = localStorageService.get(iconsKey);
24040
24126
  if (!recentIconNames || recentIconNames.length === 0) return [];
24041
24127
  return recentIconNames.slice(0, 24).map((iconName) => allIcons.find(([name]) => name === iconName)).filter((entry) => entry !== void 0);
@@ -24113,7 +24199,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24113
24199
  leftSection: /* @__PURE__ */ React226.createElement(IconSearch6, { size: 18 }),
24114
24200
  value: searchQuery,
24115
24201
  onChange: (e) => setSearchQuery(e.currentTarget.value),
24116
- rightSection: searchQuery && /* @__PURE__ */ React226.createElement(UnstyledButton2, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React226.createElement(IconX10, { size: 18 })),
24202
+ rightSection: searchQuery && /* @__PURE__ */ React226.createElement(UnstyledButton2, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React226.createElement(IconX11, { size: 18 })),
24117
24203
  style: { flex: 1 },
24118
24204
  styles: {
24119
24205
  input: {
@@ -24137,7 +24223,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24137
24223
  }
24138
24224
 
24139
24225
  // src/mantine/components/CoverImage.tsx
24140
- import React228, { useState as useState82, useRef as useRef18, useEffect as useEffect67 } from "react";
24226
+ import React228, { useState as useState83, useRef as useRef18, useEffect as useEffect67 } from "react";
24141
24227
  import { Box as Box43, Group as Group78 } from "@mantine/core";
24142
24228
 
24143
24229
  // src/core/lib/imageTransform.ts
@@ -24271,12 +24357,12 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
24271
24357
  }
24272
24358
 
24273
24359
  // src/mantine/components/Base/PageIcon.tsx
24274
- import React227, { useMemo as useMemo80 } from "react";
24360
+ import React227, { useMemo as useMemo81 } from "react";
24275
24361
  import { Center as Center13, Box as Box42 } from "@mantine/core";
24276
24362
  import * as TablerIcons2 from "@tabler/icons-react";
24277
24363
  function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
24278
24364
  const isIconName = src && !src.startsWith("http");
24279
- const IconComponent = useMemo80(() => {
24365
+ const IconComponent = useMemo81(() => {
24280
24366
  if (!isIconName || !src) return null;
24281
24367
  const iconComponent = TablerIcons2[src];
24282
24368
  if (iconComponent) {
@@ -24323,13 +24409,13 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
24323
24409
  import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
24324
24410
  function CoverImage({ coverImageUrl, logoUrl }) {
24325
24411
  const { editor, handlers, editable } = useBlocknoteContext();
24326
- const [isHovering, setIsHovering] = useState82(false);
24327
- const [isRepositioning, setIsRepositioning] = useState82(false);
24328
- const [coverPosition, setCoverPosition] = useState82(50);
24412
+ const [isHovering, setIsHovering] = useState83(false);
24413
+ const [isRepositioning, setIsRepositioning] = useState83(false);
24414
+ const [coverPosition, setCoverPosition] = useState83(50);
24329
24415
  const coverFileInputRef = useRef18(null);
24330
24416
  const logoFileInputRef = useRef18(null);
24331
24417
  const [opened, { open, close }] = useDisclosure5(false);
24332
- const [metadata, setMetadata] = useState82(() => editor?.getPageMetadata?.() || null);
24418
+ const [metadata, setMetadata] = useState83(() => editor?.getPageMetadata?.() || null);
24333
24419
  useEffect67(() => {
24334
24420
  if (!editor?._metadataManager) {
24335
24421
  return;
@@ -24605,7 +24691,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
24605
24691
  }
24606
24692
 
24607
24693
  // src/mantine/components/PageHeader.tsx
24608
- import React229, { useState as useState83, useRef as useRef19, useEffect as useEffect68 } from "react";
24694
+ import React229, { useState as useState84, useRef as useRef19, useEffect as useEffect68 } from "react";
24609
24695
  function PageHeader({
24610
24696
  title = "New page",
24611
24697
  icon,
@@ -24616,7 +24702,7 @@ function PageHeader({
24616
24702
  isFavorited = false,
24617
24703
  menuItems = []
24618
24704
  }) {
24619
- const [isMenuOpen, setIsMenuOpen] = useState83(false);
24705
+ const [isMenuOpen, setIsMenuOpen] = useState84(false);
24620
24706
  const menuRef = useRef19(null);
24621
24707
  useEffect68(() => {
24622
24708
  function handleClickOutside(event) {
@@ -24798,7 +24884,7 @@ var styles = {
24798
24884
  };
24799
24885
 
24800
24886
  // src/mantine/components/ExternalDropZone.tsx
24801
- import React230, { useCallback as useCallback66, useEffect as useEffect69, useRef as useRef20, useState as useState84 } from "react";
24887
+ import React230, { useCallback as useCallback66, useEffect as useEffect69, useRef as useRef20, useState as useState85 } from "react";
24802
24888
  import { Box as Box44 } from "@mantine/core";
24803
24889
  var SCROLL_ZONE_SIZE = 80;
24804
24890
  var SCROLL_SPEED = 12;
@@ -24812,9 +24898,9 @@ var ExternalDropZone = ({
24812
24898
  children
24813
24899
  }) => {
24814
24900
  const containerRef = useRef20(null);
24815
- const [isValidDrag, setIsValidDrag] = useState84(false);
24816
- const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState84(false);
24817
- const [indicatorStyle, setIndicatorStyle] = useState84({});
24901
+ const [isValidDrag, setIsValidDrag] = useState85(false);
24902
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState85(false);
24903
+ const [indicatorStyle, setIndicatorStyle] = useState85({});
24818
24904
  const dropPositionRef = useRef20(null);
24819
24905
  const scrollAnimationRef = useRef20(null);
24820
24906
  const scrollDirectionRef = useRef20(null);
@@ -25336,9 +25422,9 @@ function IxoEditor({
25336
25422
  }
25337
25423
 
25338
25424
  // src/mantine/components/EntitySigningSetup.tsx
25339
- import React233, { useState as useState85 } from "react";
25425
+ import React233, { useState as useState86 } from "react";
25340
25426
  import { Modal as Modal3, Stack as Stack147, Text as Text122, TextInput as TextInput8, Button as Button39, Alert as Alert30, Group as Group79 } from "@mantine/core";
25341
- import { IconAlertCircle as IconAlertCircle15, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
25427
+ import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
25342
25428
  var EntitySigningSetup = ({
25343
25429
  opened,
25344
25430
  onClose,
@@ -25346,11 +25432,11 @@ var EntitySigningSetup = ({
25346
25432
  entityName,
25347
25433
  onSetup
25348
25434
  }) => {
25349
- const [pin, setPin] = useState85("");
25350
- const [confirmPin, setConfirmPin] = useState85("");
25351
- const [loading, setLoading] = useState85(false);
25352
- const [error, setError] = useState85(null);
25353
- const [success, setSuccess] = useState85(false);
25435
+ const [pin, setPin] = useState86("");
25436
+ const [confirmPin, setConfirmPin] = useState86("");
25437
+ const [loading, setLoading] = useState86(false);
25438
+ const [error, setError] = useState86(null);
25439
+ const [success, setSuccess] = useState86(false);
25354
25440
  const handleSetup = async () => {
25355
25441
  if (pin.length < 4) {
25356
25442
  setError("PIN must be at least 4 characters");
@@ -25419,7 +25505,7 @@ var EntitySigningSetup = ({
25419
25505
  onChange: (e) => setConfirmPin(e.currentTarget.value),
25420
25506
  disabled: loading
25421
25507
  }
25422
- ), error && /* @__PURE__ */ React233.createElement(Alert30, { color: "red", icon: /* @__PURE__ */ React233.createElement(IconAlertCircle15, { size: 16 }) }, error), /* @__PURE__ */ React233.createElement(Group79, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React233.createElement(Button39, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React233.createElement(
25508
+ ), error && /* @__PURE__ */ React233.createElement(Alert30, { color: "red", icon: /* @__PURE__ */ React233.createElement(IconAlertCircle14, { size: 16 }) }, error), /* @__PURE__ */ React233.createElement(Group79, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React233.createElement(Button39, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React233.createElement(
25423
25509
  Button39,
25424
25510
  {
25425
25511
  onClick: handleSetup,
@@ -25432,8 +25518,8 @@ var EntitySigningSetup = ({
25432
25518
  };
25433
25519
 
25434
25520
  // src/mantine/components/FlowPermissionsPanel.tsx
25435
- import React234, { useState as useState86, useEffect as useEffect70, useMemo as useMemo81 } from "react";
25436
- import { Stack as Stack148, Text as Text123, Paper as Paper19, Group as Group80, Badge as Badge40, Button as Button40, ActionIcon as ActionIcon35, Loader as Loader29, Alert as Alert31, Divider as Divider18 } from "@mantine/core";
25521
+ import React234, { useState as useState87, useEffect as useEffect70, useMemo as useMemo82 } from "react";
25522
+ import { Stack as Stack148, Text as Text123, Paper as Paper19, Group as Group80, Badge as Badge40, Button as Button40, ActionIcon as ActionIcon36, Loader as Loader29, Alert as Alert31, Divider as Divider19 } from "@mantine/core";
25437
25523
  import { IconPlus as IconPlus7, IconTrash as IconTrash8, IconShieldCheck as IconShieldCheck2, IconUser as IconUser5, IconRobot as IconRobot4, IconBuilding } from "@tabler/icons-react";
25438
25524
  var FlowPermissionsPanel = ({
25439
25525
  editor,
@@ -25443,10 +25529,10 @@ var FlowPermissionsPanel = ({
25443
25529
  onRevokePermission,
25444
25530
  getUserDisplayName
25445
25531
  }) => {
25446
- const [delegations, setDelegations] = useState86([]);
25447
- const [loading, setLoading] = useState86(true);
25448
- const [revoking, setRevoking] = useState86(null);
25449
- const rootCapability = useMemo81(() => editor.getRootCapability?.(), [editor]);
25532
+ const [delegations, setDelegations] = useState87([]);
25533
+ const [loading, setLoading] = useState87(true);
25534
+ const [revoking, setRevoking] = useState87(null);
25535
+ const rootCapability = useMemo82(() => editor.getRootCapability?.(), [editor]);
25450
25536
  useEffect70(() => {
25451
25537
  const loadDelegations = async () => {
25452
25538
  setLoading(true);
@@ -25509,8 +25595,8 @@ var FlowPermissionsPanel = ({
25509
25595
  if (date < /* @__PURE__ */ new Date()) return "Expired";
25510
25596
  return date.toLocaleDateString();
25511
25597
  };
25512
- return /* @__PURE__ */ React234.createElement(Stack148, { gap: "md" }, /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React234.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React234.createElement(Badge40, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React234.createElement(Divider18, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React234.createElement(Group80, { justify: "center", py: "xl" }, /* @__PURE__ */ React234.createElement(Loader29, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React234.createElement(Alert31, { color: "gray", variant: "light" }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React234.createElement(Paper19, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { justify: "space-between" }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2 }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React234.createElement(
25513
- ActionIcon35,
25598
+ return /* @__PURE__ */ React234.createElement(Stack148, { gap: "md" }, /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React234.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React234.createElement(Badge40, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React234.createElement(Divider19, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React234.createElement(Group80, { justify: "center", py: "xl" }, /* @__PURE__ */ React234.createElement(Loader29, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React234.createElement(Alert31, { color: "gray", variant: "light" }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React234.createElement(Paper19, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { justify: "space-between" }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2 }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React234.createElement(
25599
+ ActionIcon36,
25514
25600
  {
25515
25601
  color: "red",
25516
25602
  variant: "subtle",
@@ -25531,7 +25617,7 @@ var FlowPermissionsPanel = ({
25531
25617
  };
25532
25618
 
25533
25619
  // src/mantine/components/GrantPermissionModal.tsx
25534
- import React235, { useState as useState87, useCallback as useCallback67 } from "react";
25620
+ import React235, { useState as useState88, useCallback as useCallback67 } from "react";
25535
25621
  import {
25536
25622
  Modal as Modal4,
25537
25623
  Stack as Stack149,
@@ -25545,11 +25631,11 @@ import {
25545
25631
  Paper as Paper20,
25546
25632
  Loader as Loader30,
25547
25633
  Badge as Badge41,
25548
- ActionIcon as ActionIcon36,
25549
- Divider as Divider19,
25634
+ ActionIcon as ActionIcon37,
25635
+ Divider as Divider20,
25550
25636
  NumberInput as NumberInput3
25551
25637
  } from "@mantine/core";
25552
- import { IconSearch as IconSearch7, IconUser as IconUser6, IconRobot as IconRobot5, IconX as IconX11, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
25638
+ import { IconSearch as IconSearch7, IconUser as IconUser6, IconRobot as IconRobot5, IconX as IconX12, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
25553
25639
  var GrantPermissionModal = ({
25554
25640
  opened,
25555
25641
  onClose,
@@ -25563,20 +25649,20 @@ var GrantPermissionModal = ({
25563
25649
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
25564
25650
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
25565
25651
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
25566
- const [recipientType, setRecipientType] = useState87("user");
25567
- const [searchQuery, setSearchQuery] = useState87("");
25568
- const [searchResults, setSearchResults] = useState87([]);
25569
- const [searching, setSearching] = useState87(false);
25570
- const [selectedRecipient, setSelectedRecipient] = useState87(null);
25571
- const [manualDid, setManualDid] = useState87("");
25572
- const [scopeType, setScopeType] = useState87("full");
25573
- const [selectedBlocks, setSelectedBlocks] = useState87([]);
25574
- const [expirationEnabled, setExpirationEnabled] = useState87(false);
25575
- const [expirationDays, setExpirationDays] = useState87(30);
25576
- const [canDelegate, setCanDelegate] = useState87(false);
25577
- const [pin, setPin] = useState87("");
25578
- const [loading, setLoading] = useState87(false);
25579
- const [error, setError] = useState87(null);
25652
+ const [recipientType, setRecipientType] = useState88("user");
25653
+ const [searchQuery, setSearchQuery] = useState88("");
25654
+ const [searchResults, setSearchResults] = useState88([]);
25655
+ const [searching, setSearching] = useState88(false);
25656
+ const [selectedRecipient, setSelectedRecipient] = useState88(null);
25657
+ const [manualDid, setManualDid] = useState88("");
25658
+ const [scopeType, setScopeType] = useState88("full");
25659
+ const [selectedBlocks, setSelectedBlocks] = useState88([]);
25660
+ const [expirationEnabled, setExpirationEnabled] = useState88(false);
25661
+ const [expirationDays, setExpirationDays] = useState88(30);
25662
+ const [canDelegate, setCanDelegate] = useState88(false);
25663
+ const [pin, setPin] = useState88("");
25664
+ const [loading, setLoading] = useState88(false);
25665
+ const [error, setError] = useState88(null);
25580
25666
  const handleSearch = useCallback67(async () => {
25581
25667
  if (searchQuery.length < 2) return;
25582
25668
  setSearching(true);
@@ -25686,7 +25772,7 @@ var GrantPermissionModal = ({
25686
25772
  onChange: (e) => setSearchQuery(e.currentTarget.value),
25687
25773
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
25688
25774
  }
25689
- ), selectedRecipient ? /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { justify: "space-between" }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React235.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React235.createElement(IconUser6, { size: 16 }), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React235.createElement(Badge41, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React235.createElement(ActionIcon36, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React235.createElement(IconX11, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React235.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React235.createElement(Stack149, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React235.createElement(
25775
+ ), selectedRecipient ? /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { justify: "space-between" }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React235.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React235.createElement(IconUser6, { size: 16 }), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React235.createElement(Badge41, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React235.createElement(ActionIcon37, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React235.createElement(IconX12, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React235.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React235.createElement(Stack149, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React235.createElement(
25690
25776
  Button41,
25691
25777
  {
25692
25778
  key: result.did,
@@ -25704,7 +25790,7 @@ var GrantPermissionModal = ({
25704
25790
  value: manualDid,
25705
25791
  onChange: (e) => setManualDid(e.currentTarget.value)
25706
25792
  }
25707
- ), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Text124, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
25793
+ ), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Text124, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
25708
25794
  // Single block mode: show fixed block info
25709
25795
  /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Badge41, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React235.createElement(Text124, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
25710
25796
  ) : (
@@ -25724,7 +25810,7 @@ var GrantPermissionModal = ({
25724
25810
  }
25725
25811
  }
25726
25812
  )))))
25727
- )), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(
25813
+ )), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(
25728
25814
  Checkbox12,
25729
25815
  {
25730
25816
  label: "Set expiration",
@@ -25749,7 +25835,7 @@ var GrantPermissionModal = ({
25749
25835
  checked: canDelegate,
25750
25836
  onChange: (e) => setCanDelegate(e.currentTarget.checked)
25751
25837
  }
25752
- ), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(
25838
+ ), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(
25753
25839
  TextInput9,
25754
25840
  {
25755
25841
  label: "Enter your PIN to sign this delegation",
@@ -25874,4 +25960,4 @@ export {
25874
25960
  ixoGraphQLClient,
25875
25961
  getEntity
25876
25962
  };
25877
- //# sourceMappingURL=chunk-FLFC7MR5.mjs.map
25963
+ //# sourceMappingURL=chunk-I6Q5SHHA.mjs.map