@lv-x-software-house/x_view 1.2.5-dev.27 → 1.2.5-dev.29

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.
Files changed (3) hide show
  1. package/dist/index.js +642 -121
  2. package/dist/index.mjs +670 -124
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -308,13 +308,13 @@ function ContextMenu({
308
308
  });
309
309
  };
310
310
  const renderMainView = () => {
311
- var _a2, _b2, _c2, _d, _e;
311
+ var _a2, _b2, _c2, _d, _e, _f;
312
312
  const hasVersions = computedVersions.length > 0;
313
313
  const canCreateVersion = ability.can("create", "Versioning");
314
314
  const canReadVersion = ability.can("read", "Versioning");
315
315
  const shouldShowVersioningBtn = canCreateVersion || canReadVersion && hasVersions;
316
316
  const canStartQuest = isCurrentNodeQuest && (((_a2 = data.nodeData) == null ? void 0 : _a2.status) === "Backlog" || !((_b2 = data.nodeData) == null ? void 0 : _b2.status));
317
- const canFinishQuest = isCurrentNodeQuest && ((_c2 = data.nodeData) == null ? void 0 : _c2.assignee_id) === (currentUser == null ? void 0 : currentUser.id) && ((_d = data.nodeData) == null ? void 0 : _d.status) !== "Backlog";
317
+ const canFinishQuest = isCurrentNodeQuest && ((_c2 = data.nodeData) == null ? void 0 : _c2.assignee_id) === (currentUser == null ? void 0 : currentUser.id) && ((_d = data.nodeData) == null ? void 0 : _d.status) !== "Backlog" && ((_e = data.nodeData) == null ? void 0 : _e.status) !== "Done";
318
318
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 px-2 pt-1 pb-2" }, /* @__PURE__ */ React.createElement("span", { className: "inline-flex h-2 w-2 rounded-full bg-indigo-400/80 shadow-[0_0_12px_1px_rgba(99,102,241,0.5)]" }), /* @__PURE__ */ React.createElement("p", { className: "text-[11px] uppercase tracking-wider text-slate-400" }, "A\xE7\xF5es R\xE1pidas")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1" }, canStartQuest && /* @__PURE__ */ React.createElement(
319
319
  "button",
320
320
  {
@@ -335,11 +335,11 @@ function ContextMenu({
335
335
  onClose();
336
336
  },
337
337
  className: baseButtonClass,
338
- title: "Finalizar esta quest"
338
+ title: "Finalizar esta etapa e avan\xE7ar"
339
339
  },
340
340
  /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ React.createElement("polyline", { points: "22 4 12 14.01 9 11.01" })),
341
- /* @__PURE__ */ React.createElement("span", null, "Finalizar Quest")
342
- ), (canStartQuest || canFinishQuest) && /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), ability.can("create", "Connection") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartConnection == null ? void 0 : onStartConnection(data.nodeData), className: baseButtonClass, title: "Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", null, "Conectar")), ability.can("create", "Node") && !((_e = data.nodeData) == null ? void 0 : _e.is_quest) && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartCreation == null ? void 0 : onStartCreation(data.nodeData), className: baseButtonClass, title: "Criar e Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), /* @__PURE__ */ React.createElement("line", { x1: "8", y1: "12", x2: "16", y2: "12" })), /* @__PURE__ */ React.createElement("span", null, "Criar e Conectar")), ability.can("create", "Ancestry") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartAncestryCreation == null ? void 0 : onStartAncestryCreation(data.nodeData), className: baseButtonClass, title: "Criar Ancestralidade" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 20.5c.5-.5.8-1.2.8-2s-.3-1.5-.8-2c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8c-.5.5-.8 1.2-.8 2s.3 1.5.8 2c.5.5 1.2-.8 2 .8s1.5-.3 2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M10 16v-3a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ React.createElement("path", { d: "M14 3.5c.5.5.8 1.2.8 2s-.3 1.5-.8 2c-.5-.5-1.2-.8-2 .8s1.5.3-2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M14 8v3a2 2 0 0 0 2 2h4" })), /* @__PURE__ */ React.createElement("span", null, "Criar Ancestralidade")), shouldShowVersioningBtn && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("versioning"), className: baseButtonClass, title: hasVersions ? "Versionamento" : "Criar Versionamento" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("line", { x1: "6", y1: "3", x2: "6", y2: "15" }), /* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "6", r: "3" }), /* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "18", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })), /* @__PURE__ */ React.createElement("span", null, hasVersions || !canCreateVersion ? "Versionamento" : "Criar Versionamento")), (connections.length > 0 || availableAncestries.length > 0) && ability.can("read", "Connection") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("connections"), className: baseButtonClass, title: "Conex\xF5es" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z" }), /* @__PURE__ */ React.createElement("path", { d: "M8 12h8" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v8" })), /* @__PURE__ */ React.createElement("span", null, "Conex\xF5es (", totalConnectionsCount, ")"))), /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => {
341
+ /* @__PURE__ */ React.createElement("span", null, "Finalizar Etapa")
342
+ ), (canStartQuest || canFinishQuest) && /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), ability.can("create", "Connection") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartConnection == null ? void 0 : onStartConnection(data.nodeData), className: baseButtonClass, title: "Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", null, "Conectar")), ability.can("create", "Node") && !((_f = data.nodeData) == null ? void 0 : _f.is_quest) && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartCreation == null ? void 0 : onStartCreation(data.nodeData), className: baseButtonClass, title: "Criar e Conectar" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), /* @__PURE__ */ React.createElement("line", { x1: "8", y1: "12", x2: "16", y2: "12" })), /* @__PURE__ */ React.createElement("span", null, "Criar e Conectar")), ability.can("create", "Ancestry") && /* @__PURE__ */ React.createElement("button", { onClick: () => onStartAncestryCreation == null ? void 0 : onStartAncestryCreation(data.nodeData), className: baseButtonClass, title: "Criar Ancestralidade" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 20.5c.5-.5.8-1.2.8-2s-.3-1.5-.8-2c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8c-.5.5-.8 1.2-.8 2s.3 1.5.8 2c.5.5 1.2-.8 2 .8s1.5-.3 2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M10 16v-3a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ React.createElement("path", { d: "M14 3.5c.5.5.8 1.2.8 2s-.3 1.5-.8 2c-.5-.5-1.2-.8-2 .8s1.5.3-2-.8c-.5-.5-.8-1.2-.8-2s.3-1.5.8-2c.5.5 1.2-.8 2 .8s1.5.3 2 .8Z" }), /* @__PURE__ */ React.createElement("path", { d: "M14 8v3a2 2 0 0 0 2 2h4" })), /* @__PURE__ */ React.createElement("span", null, "Criar Ancestralidade")), shouldShowVersioningBtn && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("versioning"), className: baseButtonClass, title: hasVersions ? "Versionamento" : "Criar Versionamento" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("line", { x1: "6", y1: "3", x2: "6", y2: "15" }), /* @__PURE__ */ React.createElement("circle", { cx: "18", cy: "6", r: "3" }), /* @__PURE__ */ React.createElement("circle", { cx: "6", cy: "18", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })), /* @__PURE__ */ React.createElement("span", null, hasVersions || !canCreateVersion ? "Versionamento" : "Criar Versionamento")), (connections.length > 0 || availableAncestries.length > 0) && ability.can("read", "Connection") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("connections"), className: baseButtonClass, title: "Conex\xF5es" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z" }), /* @__PURE__ */ React.createElement("path", { d: "M8 12h8" }), /* @__PURE__ */ React.createElement("path", { d: "M12 8v8" })), /* @__PURE__ */ React.createElement("span", null, "Conex\xF5es (", totalConnectionsCount, ")"))), /* @__PURE__ */ React.createElement("div", { className: "my-1 h-px w-full bg-white/10" }), /* @__PURE__ */ React.createElement("button", { onClick: () => {
343
343
  onFocusNode == null ? void 0 : onFocusNode(data.nodeData);
344
344
  onClose();
345
345
  }, className: baseButtonClass, title: "Focar na c\xE2mera" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" })), /* @__PURE__ */ React.createElement("span", null, "Focar neste Node")), /* @__PURE__ */ React.createElement("button", { onClick: (e) => handleCopyLink(e, data.nodeData), className: baseButtonClass, title: "Copiar Link para Compartilhar" }, isLinkCopied ? /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#4ade80", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "20 6 9 17 4 12" })) : /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.72" }), /* @__PURE__ */ React.createElement("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.72" })), /* @__PURE__ */ React.createElement("span", { className: isLinkCopied ? "text-green-400" : "" }, isLinkCopied ? "Copiado!" : "Copiar Link")), ability.can("dismiss", "Node") && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissNode == null ? void 0 : onDismissNode(data.nodeData), className: baseButtonClass, title: "Remover da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }), /* @__PURE__ */ React.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }), /* @__PURE__ */ React.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }), /* @__PURE__ */ React.createElement("line", { x1: "2", y1: "2", x2: "22", y2: "22" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss")), /* @__PURE__ */ React.createElement("button", { onClick: () => onDismissOtherNodes == null ? void 0 : onDismissOtherNodes(data.nodeData), className: baseButtonClass, title: "Remover outros da visualiza\xE7\xE3o" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "3" }), /* @__PURE__ */ React.createElement("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }), /* @__PURE__ */ React.createElement("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }), /* @__PURE__ */ React.createElement("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" })), /* @__PURE__ */ React.createElement("span", null, "Dismiss other nodes"))), ability.can("delete", "Node") && /* @__PURE__ */ React.createElement("button", { onClick: () => setMenuView("deleteConfirmation"), className: deleteButtonClass, title: "Excluir Node" }, /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React.createElement("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ React.createElement("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), /* @__PURE__ */ React.createElement("line", { x1: "10", y1: "11", x2: "10", y2: "17" }), /* @__PURE__ */ React.createElement("line", { x1: "14", y1: "11", x2: "14", y2: "17" })), /* @__PURE__ */ React.createElement("span", null, "Excluir Node"))));
@@ -7786,7 +7786,15 @@ function ColorPicker({ color, onChange, disabled }) {
7786
7786
  }
7787
7787
 
7788
7788
  // src/components/InSceneCreationForm.jsx
7789
- import { FiPlus as FiPlus3, FiMaximize2, FiX as FiX3, FiCheck as FiCheck7, FiEdit2 as FiEdit24, FiSun, FiChevronDown as FiChevronDown4 } from "react-icons/fi";
7789
+ import {
7790
+ FiPlus as FiPlus3,
7791
+ FiMaximize2,
7792
+ FiX as FiX3,
7793
+ FiCheck as FiCheck7,
7794
+ FiEdit2 as FiEdit24,
7795
+ FiSun,
7796
+ FiChevronDown as FiChevronDown4
7797
+ } from "react-icons/fi";
7790
7798
  function InSceneCreationForm({
7791
7799
  onSave,
7792
7800
  onCancel,
@@ -7823,7 +7831,9 @@ function InSceneCreationForm({
7823
7831
  const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState14(false);
7824
7832
  const [useImageAsTexture, setUseImageAsTexture] = useState14(false);
7825
7833
  const [selectedImageUrl, setSelectedImageUrl] = useState14(null);
7826
- const [targetDatasetId, setTargetDatasetId] = useState14(sourceNodeDatasetId || "");
7834
+ const [targetDatasetId, setTargetDatasetId] = useState14(
7835
+ sourceNodeDatasetId || ""
7836
+ );
7827
7837
  const [isDatasetDropdownOpen, setIsDatasetDropdownOpen] = useState14(false);
7828
7838
  const datasetDropdownRef = useRef10(null);
7829
7839
  useEffect13(() => {
@@ -7843,7 +7853,9 @@ function InSceneCreationForm({
7843
7853
  };
7844
7854
  }, [isDatasetDropdownOpen]);
7845
7855
  const propsEndRef = useRef10(null);
7846
- const hasImages = customProps.some((p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value));
7856
+ const hasImages = customProps.some(
7857
+ (p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value)
7858
+ );
7847
7859
  useEffect13(() => {
7848
7860
  if (!hasImages && useImageAsTexture) {
7849
7861
  setUseImageAsTexture(false);
@@ -7853,7 +7865,9 @@ function InSceneCreationForm({
7853
7865
  }, [hasImages, useImageAsTexture, onImageChange]);
7854
7866
  useEffect13(() => {
7855
7867
  let result = [];
7856
- const validExistingTypes = existingTypes.filter((t) => t && typeof t === "string" && t.trim() !== "");
7868
+ const validExistingTypes = existingTypes.filter(
7869
+ (t) => t && typeof t === "string" && t.trim() !== ""
7870
+ );
7857
7871
  if (typeInput.trim() === "") {
7858
7872
  result = validExistingTypes.filter((t) => !types.includes(t));
7859
7873
  } else {
@@ -7862,13 +7876,20 @@ function InSceneCreationForm({
7862
7876
  const lowercasedInput = typeInput.toLowerCase();
7863
7877
  result = validExistingTypes.filter((t) => {
7864
7878
  if (!t) {
7865
- console.warn("InSceneCreationForm: Tipo encontrado como undefined/null durante filtragem");
7879
+ console.warn(
7880
+ "InSceneCreationForm: Tipo encontrado como undefined/null durante filtragem"
7881
+ );
7866
7882
  return false;
7867
7883
  }
7868
7884
  return t.toLowerCase().includes(lowercasedInput) && !types.includes(t);
7869
7885
  });
7870
7886
  } catch (err) {
7871
- console.error("InSceneCreationForm: Erro ao filtrar tipos:", err, "typeInput:", typeInput);
7887
+ console.error(
7888
+ "InSceneCreationForm: Erro ao filtrar tipos:",
7889
+ err,
7890
+ "typeInput:",
7891
+ typeInput
7892
+ );
7872
7893
  }
7873
7894
  }
7874
7895
  if (sourceTypes) {
@@ -7898,7 +7919,10 @@ function InSceneCreationForm({
7898
7919
  setCustomProps([...customProps, newProp]);
7899
7920
  setTimeout(() => {
7900
7921
  var _a2;
7901
- (_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "center" });
7922
+ (_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({
7923
+ behavior: "smooth",
7924
+ block: "center"
7925
+ });
7902
7926
  }, 100);
7903
7927
  };
7904
7928
  const handleRemoveProp = (index) => setCustomProps(customProps.filter((_, i) => i !== index));
@@ -8007,15 +8031,23 @@ function InSceneCreationForm({
8007
8031
  },
8008
8032
  /* @__PURE__ */ React13.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }),
8009
8033
  /* @__PURE__ */ React13.createElement("div", { className: "px-6 pt-5 pb-3" }, /* @__PURE__ */ React13.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React13.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-400/80 shadow-[0_0_18px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React13.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Criar & Conectar")), /* @__PURE__ */ React13.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Novo Node")),
8010
- /* @__PURE__ */ React13.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React13.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Tipo(s) do Node"), /* @__PURE__ */ React13.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React13.createElement("span", { key: index, className: "flex items-center gap-1 bg-indigo-500/30 text-indigo-100 px-1.5 py-0.5 rounded-md text-xs font-medium border border-indigo-500/20" }, t, /* @__PURE__ */ React13.createElement(
8011
- "button",
8034
+ /* @__PURE__ */ React13.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React13.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Tipo(s) do Node"), /* @__PURE__ */ React13.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React13.createElement(
8035
+ "span",
8012
8036
  {
8013
- type: "button",
8014
- onClick: () => handleRemoveType(index),
8015
- className: "hover:text-white transition-colors"
8037
+ key: index,
8038
+ className: "flex items-center gap-1 bg-indigo-500/30 text-indigo-100 px-1.5 py-0.5 rounded-md text-xs font-medium border border-indigo-500/20"
8016
8039
  },
8017
- /* @__PURE__ */ React13.createElement(FiX3, { size: 12 })
8018
- ))), /* @__PURE__ */ React13.createElement(
8040
+ t,
8041
+ /* @__PURE__ */ React13.createElement(
8042
+ "button",
8043
+ {
8044
+ type: "button",
8045
+ onClick: () => handleRemoveType(index),
8046
+ className: "hover:text-white transition-colors"
8047
+ },
8048
+ /* @__PURE__ */ React13.createElement(FiX3, { size: 12 })
8049
+ )
8050
+ )), /* @__PURE__ */ React13.createElement(
8019
8051
  "input",
8020
8052
  {
8021
8053
  type: "text",
@@ -8048,7 +8080,17 @@ function InSceneCreationForm({
8048
8080
  }
8049
8081
  },
8050
8082
  suggestedType
8051
- ))))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Nome do Node"), /* @__PURE__ */ React13.createElement("input", { required: true, type: "text", placeholder: "Ex.: Cliente XPTO", value: name, onChange: handleNameInputChange, className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60" })), viewType === "view" && availableDatasets.length > 0 && /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5 relative", ref: datasetDropdownRef }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Criar Node no Dataset:"), /* @__PURE__ */ React13.createElement(
8083
+ ))))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Nome do Node"), /* @__PURE__ */ React13.createElement(
8084
+ "input",
8085
+ {
8086
+ required: true,
8087
+ type: "text",
8088
+ placeholder: "Ex.: Cliente XPTO",
8089
+ value: name,
8090
+ onChange: handleNameInputChange,
8091
+ className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
8092
+ }
8093
+ )), viewType === "view" && availableDatasets.length > 0 && /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5 relative", ref: datasetDropdownRef }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Criar Node no Dataset:"), /* @__PURE__ */ React13.createElement(
8052
8094
  "button",
8053
8095
  {
8054
8096
  type: "button",
@@ -8056,7 +8098,12 @@ function InSceneCreationForm({
8056
8098
  className: "w-full flex items-center justify-between bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 hover:bg-slate-700/70 transition-colors text-slate-200 text-left"
8057
8099
  },
8058
8100
  /* @__PURE__ */ React13.createElement("span", { className: "truncate pr-2" }, selectedDatasetName),
8059
- /* @__PURE__ */ React13.createElement(FiChevronDown4, { className: `flex-shrink-0 text-slate-400 transition-transform ${isDatasetDropdownOpen ? "rotate-180" : ""}` })
8101
+ /* @__PURE__ */ React13.createElement(
8102
+ FiChevronDown4,
8103
+ {
8104
+ className: `flex-shrink-0 text-slate-400 transition-transform ${isDatasetDropdownOpen ? "rotate-180" : ""}`
8105
+ }
8106
+ )
8060
8107
  ), isDatasetDropdownOpen && /* @__PURE__ */ React13.createElement("ul", { className: "custom-scrollbar absolute top-[66px] left-0 z-20 w-full max-h-48 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-xl py-1" }, availableDatasets.map((ds) => /* @__PURE__ */ React13.createElement(
8061
8108
  "li",
8062
8109
  {
@@ -8068,7 +8115,7 @@ function InSceneCreationForm({
8068
8115
  className: `px-3 py-2 text-sm cursor-pointer transition-colors ${targetDatasetId === ds.id ? "bg-indigo-600/40 text-indigo-200 font-medium" : "text-slate-300 hover:bg-white/5"}`
8069
8116
  },
8070
8117
  ds.name
8071
- )))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React13.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React13.createElement(
8118
+ )))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React13.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React13.createElement(
8072
8119
  DescriptionDisplay,
8073
8120
  {
8074
8121
  description,
@@ -8105,10 +8152,28 @@ function InSceneCreationForm({
8105
8152
  onClick: () => handleSizeChange(s),
8106
8153
  className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
8107
8154
  },
8108
- /* @__PURE__ */ React13.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, isSelected && /* @__PURE__ */ React13.createElement(FiCheck7, { size: 12, className: "text-white" })),
8109
- /* @__PURE__ */ React13.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
8155
+ /* @__PURE__ */ React13.createElement(
8156
+ "div",
8157
+ {
8158
+ className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent group-hover:border-slate-500"}`
8159
+ },
8160
+ isSelected && /* @__PURE__ */ React13.createElement(FiCheck7, { size: 12, className: "text-white" })
8161
+ ),
8162
+ /* @__PURE__ */ React13.createElement(
8163
+ "span",
8164
+ {
8165
+ className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}`
8166
+ },
8167
+ s
8168
+ )
8110
8169
  );
8111
- }))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Cor e Brilho"), hasImages && /* @__PURE__ */ React13.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React13.createElement("div", { className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}` }, useImageAsTexture && /* @__PURE__ */ React13.createElement(FiCheck7, { size: 12, className: "text-white" })), /* @__PURE__ */ React13.createElement(
8170
+ }))), /* @__PURE__ */ React13.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React13.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React13.createElement("label", { className: "text-xs text-slate-300" }, "Cor e Brilho"), hasImages && /* @__PURE__ */ React13.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React13.createElement(
8171
+ "div",
8172
+ {
8173
+ className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}`
8174
+ },
8175
+ useImageAsTexture && /* @__PURE__ */ React13.createElement(FiCheck7, { size: 12, className: "text-white" })
8176
+ ), /* @__PURE__ */ React13.createElement(
8112
8177
  "input",
8113
8178
  {
8114
8179
  type: "checkbox",
@@ -8116,7 +8181,13 @@ function InSceneCreationForm({
8116
8181
  onChange: handleToggleImageMode,
8117
8182
  className: "hidden"
8118
8183
  }
8119
- ), /* @__PURE__ */ React13.createElement("span", { className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}` }, "Usar imagem para representar o node"))), /* @__PURE__ */ React13.createElement(
8184
+ ), /* @__PURE__ */ React13.createElement(
8185
+ "span",
8186
+ {
8187
+ className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}`
8188
+ },
8189
+ "Usar imagem para representar o node"
8190
+ ))), /* @__PURE__ */ React13.createElement(
8120
8191
  ColorPicker,
8121
8192
  {
8122
8193
  color,
@@ -8135,7 +8206,22 @@ function InSceneCreationForm({
8135
8206
  className: "w-full h-1.5 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-indigo-500 hover:accent-indigo-400",
8136
8207
  title: `Intensidade do brilho: ${intensity}`
8137
8208
  }
8138
- ), /* @__PURE__ */ React13.createElement("span", { className: "text-xs text-slate-400 w-6 text-right" }, intensity)), /* @__PURE__ */ React13.createElement("span", { className: `text-xs block mt-1 transition-opacity ${useImageAsTexture ? "opacity-40" : "text-slate-400"}` }, useImageAsTexture ? "Cor da borda (definida pela imagem)" : "Selecione a cor e ajuste o brilho.")), /* @__PURE__ */ React13.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React13.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React13.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), /* @__PURE__ */ React13.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React13.createElement(FiPlus3, { size: 14 }), " Adicionar")), /* @__PURE__ */ React13.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React13.createElement(
8209
+ ), /* @__PURE__ */ React13.createElement("span", { className: "text-xs text-slate-400 w-6 text-right" }, intensity)), /* @__PURE__ */ React13.createElement(
8210
+ "span",
8211
+ {
8212
+ className: `text-xs block mt-1 transition-opacity ${useImageAsTexture ? "opacity-40" : "text-slate-400"}`
8213
+ },
8214
+ useImageAsTexture ? "Cor da borda (definida pela imagem)" : "Selecione a cor e ajuste o brilho."
8215
+ )), /* @__PURE__ */ React13.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React13.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React13.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), /* @__PURE__ */ React13.createElement(
8216
+ "button",
8217
+ {
8218
+ type: "button",
8219
+ onClick: handleAddProp,
8220
+ className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
8221
+ },
8222
+ /* @__PURE__ */ React13.createElement(FiPlus3, { size: 14 }),
8223
+ " Adicionar"
8224
+ )), /* @__PURE__ */ React13.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React13.createElement(
8139
8225
  CustomPropertyDisplay,
8140
8226
  {
8141
8227
  key: prop.id,
@@ -8143,13 +8229,30 @@ function InSceneCreationForm({
8143
8229
  onUpdate: (updatedProp) => handleUpdateProp(index, updatedProp),
8144
8230
  onRemove: () => handleRemoveProp(index),
8145
8231
  onOpenImageViewer,
8146
- unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
8232
+ unavailableTypes: currentUsedTypes.filter(
8233
+ (t) => t !== prop.type
8234
+ ),
8147
8235
  isTextureMode: useImageAsTexture,
8148
8236
  selectedImageUrl,
8149
8237
  onSelectTexture: handleSelectTexture,
8150
8238
  onUploadFile
8151
8239
  }
8152
- )), /* @__PURE__ */ React13.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React13.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React13.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React13.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar")))
8240
+ )), /* @__PURE__ */ React13.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React13.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React13.createElement(
8241
+ "button",
8242
+ {
8243
+ type: "button",
8244
+ onClick: onCancel,
8245
+ className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm"
8246
+ },
8247
+ "Cancelar"
8248
+ ), /* @__PURE__ */ React13.createElement(
8249
+ "button",
8250
+ {
8251
+ type: "submit",
8252
+ className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]"
8253
+ },
8254
+ "Salvar"
8255
+ )))
8153
8256
  ), isDescriptionModalOpen && /* @__PURE__ */ React13.createElement(
8154
8257
  DescriptionEditModal,
8155
8258
  {
@@ -8189,12 +8292,22 @@ function InSceneVersionForm({
8189
8292
  const [name, setName] = useState15("");
8190
8293
  const [size, setSize] = useState15("medium");
8191
8294
  const [description, setDescription] = useState15("");
8192
- const [customProps, setCustomProps] = useState15([{ id: v4_default(), key: "Date", type: "date", value: { type: "Data", value: "" }, isEditing: true }]);
8295
+ const [customProps, setCustomProps] = useState15([
8296
+ {
8297
+ id: v4_default(),
8298
+ key: "Date",
8299
+ type: "date",
8300
+ value: { type: "Data", value: "" },
8301
+ isEditing: true
8302
+ }
8303
+ ]);
8193
8304
  const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState15(false);
8194
8305
  const propsEndRef = useRef11(null);
8195
8306
  const [useImageAsTexture, setUseImageAsTexture] = useState15(false);
8196
8307
  const [selectedImageUrl, setSelectedImageUrl] = useState15(null);
8197
- const hasImages = customProps.some((p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value));
8308
+ const hasImages = customProps.some(
8309
+ (p) => p.type === "images" && Array.isArray(p.value) && p.value.length > 0 && p.value.some((img) => img.value)
8310
+ );
8198
8311
  useEffect14(() => {
8199
8312
  if (!hasImages && useImageAsTexture) {
8200
8313
  setUseImageAsTexture(false);
@@ -8211,7 +8324,10 @@ function InSceneVersionForm({
8211
8324
  setCustomProps([...customProps, newProp]);
8212
8325
  setTimeout(() => {
8213
8326
  var _a;
8214
- (_a = propsEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "center" });
8327
+ (_a = propsEndRef.current) == null ? void 0 : _a.scrollIntoView({
8328
+ behavior: "smooth",
8329
+ block: "center"
8330
+ });
8215
8331
  }, 100);
8216
8332
  };
8217
8333
  const handleRemoveProp = (index) => {
@@ -8255,7 +8371,9 @@ function InSceneVersionForm({
8255
8371
  alert("O campo 'Nome' \xE9 obrigat\xF3rio.");
8256
8372
  return;
8257
8373
  }
8258
- const hasDate = customProps.some((prop) => prop.key === "Date" && !prop.isEditing);
8374
+ const hasDate = customProps.some(
8375
+ (prop) => prop.key === "Date" && !prop.isEditing
8376
+ );
8259
8377
  if (!hasDate) {
8260
8378
  alert("A propriedade 'Date' \xE9 obrigat\xF3ria.");
8261
8379
  return;
@@ -8306,7 +8424,25 @@ function InSceneVersionForm({
8306
8424
  },
8307
8425
  /* @__PURE__ */ React14.createElement("div", { className: "h-[2px] bg-gradient-to-r from-indigo-400/0 via-indigo-400/70 to-indigo-400/0" }),
8308
8426
  /* @__PURE__ */ React14.createElement("div", { className: "px-6 pt-5 pb-3" }, /* @__PURE__ */ React14.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React14.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-indigo-400/80 shadow-[0_0_18px_2px_rgba(99,102,241,0.55)]" }), /* @__PURE__ */ React14.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Criar Versionamento")), /* @__PURE__ */ React14.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Nova Vers\xE3o")),
8309
- /* @__PURE__ */ React14.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React14.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Tipo do Node (Fixo)"), /* @__PURE__ */ React14.createElement("input", { type: "text", value: displayType, disabled: true, className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 cursor-not-allowed" })), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Nome do Node"), /* @__PURE__ */ React14.createElement("input", { required: true, type: "text", placeholder: "Ex.: Vers\xE3o 2.0", value: name, onChange: handleNameInputChange, className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60" })), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React14.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React14.createElement(
8427
+ /* @__PURE__ */ React14.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col max-h-[68vh]" }, /* @__PURE__ */ React14.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 custom-scrollbar" }, /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Tipo do Node (Fixo)"), /* @__PURE__ */ React14.createElement(
8428
+ "input",
8429
+ {
8430
+ type: "text",
8431
+ value: displayType,
8432
+ disabled: true,
8433
+ className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 text-slate-400 cursor-not-allowed"
8434
+ }
8435
+ )), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Nome do Node"), /* @__PURE__ */ React14.createElement(
8436
+ "input",
8437
+ {
8438
+ required: true,
8439
+ type: "text",
8440
+ placeholder: "Ex.: Vers\xE3o 2.0",
8441
+ value: name,
8442
+ onChange: handleNameInputChange,
8443
+ className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
8444
+ }
8445
+ )), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React14.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React14.createElement(
8310
8446
  DescriptionDisplay,
8311
8447
  {
8312
8448
  description,
@@ -8343,10 +8479,28 @@ function InSceneVersionForm({
8343
8479
  onClick: () => handleSizeChange(s),
8344
8480
  className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
8345
8481
  },
8346
- /* @__PURE__ */ React14.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, isSelected && /* @__PURE__ */ React14.createElement(FiCheck8, { size: 12, className: "text-white" })),
8347
- /* @__PURE__ */ React14.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
8482
+ /* @__PURE__ */ React14.createElement(
8483
+ "div",
8484
+ {
8485
+ className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent group-hover:border-slate-500"}`
8486
+ },
8487
+ isSelected && /* @__PURE__ */ React14.createElement(FiCheck8, { size: 12, className: "text-white" })
8488
+ ),
8489
+ /* @__PURE__ */ React14.createElement(
8490
+ "span",
8491
+ {
8492
+ className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}`
8493
+ },
8494
+ s
8495
+ )
8348
8496
  );
8349
- }))), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Cor do Node (Fixa)"), hasImages && /* @__PURE__ */ React14.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React14.createElement("div", { className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}` }, useImageAsTexture && /* @__PURE__ */ React14.createElement(FiCheck8, { size: 12, className: "text-white" })), /* @__PURE__ */ React14.createElement(
8497
+ }))), /* @__PURE__ */ React14.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React14.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React14.createElement("label", { className: "text-xs text-slate-300" }, "Cor do Node (Fixa)"), hasImages && /* @__PURE__ */ React14.createElement("label", { className: "flex items-center gap-2 cursor-pointer group" }, /* @__PURE__ */ React14.createElement(
8498
+ "div",
8499
+ {
8500
+ className: `w-4 h-4 rounded border flex items-center justify-center transition-colors ${useImageAsTexture ? "bg-indigo-500 border-indigo-500" : "border-slate-500 bg-transparent"}`
8501
+ },
8502
+ useImageAsTexture && /* @__PURE__ */ React14.createElement(FiCheck8, { size: 12, className: "text-white" })
8503
+ ), /* @__PURE__ */ React14.createElement(
8350
8504
  "input",
8351
8505
  {
8352
8506
  type: "checkbox",
@@ -8354,7 +8508,35 @@ function InSceneVersionForm({
8354
8508
  onChange: handleToggleImageMode,
8355
8509
  className: "hidden"
8356
8510
  }
8357
- ), /* @__PURE__ */ React14.createElement("span", { className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}` }, "Usar imagem"))), /* @__PURE__ */ React14.createElement("div", { className: `flex items-center gap-3 bg-slate-900/60 p-2.5 rounded-lg border border-white/10 transition-opacity duration-200 ${useImageAsTexture ? "opacity-40 pointer-events-none grayscale" : "opacity-100"}` }, /* @__PURE__ */ React14.createElement("div", { className: "h-8 w-12 rounded-md border border-white/10", style: { backgroundColor: fixedColor } }), /* @__PURE__ */ React14.createElement("span", { className: "text-xs text-slate-300" }, useImageAsTexture ? "Cor definida pela imagem." : "Cor herdada do node original."))), /* @__PURE__ */ React14.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React14.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React14.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais (*Date obrigat\xF3rio)"), /* @__PURE__ */ React14.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React14.createElement(FiPlus4, { size: 14 }), " Adicionar")), /* @__PURE__ */ React14.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React14.createElement(
8511
+ ), /* @__PURE__ */ React14.createElement(
8512
+ "span",
8513
+ {
8514
+ className: `text-xs ${useImageAsTexture ? "text-indigo-300" : "text-slate-400 group-hover:text-slate-300"}`
8515
+ },
8516
+ "Usar imagem"
8517
+ ))), /* @__PURE__ */ React14.createElement(
8518
+ "div",
8519
+ {
8520
+ className: `flex items-center gap-3 bg-slate-900/60 p-2.5 rounded-lg border border-white/10 transition-opacity duration-200 ${useImageAsTexture ? "opacity-40 pointer-events-none grayscale" : "opacity-100"}`
8521
+ },
8522
+ /* @__PURE__ */ React14.createElement(
8523
+ "div",
8524
+ {
8525
+ className: "h-8 w-12 rounded-md border border-white/10",
8526
+ style: { backgroundColor: fixedColor }
8527
+ }
8528
+ ),
8529
+ /* @__PURE__ */ React14.createElement("span", { className: "text-xs text-slate-300" }, useImageAsTexture ? "Cor definida pela imagem." : "Cor herdada do node original.")
8530
+ )), /* @__PURE__ */ React14.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React14.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React14.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais (*Date obrigat\xF3rio)"), /* @__PURE__ */ React14.createElement(
8531
+ "button",
8532
+ {
8533
+ type: "button",
8534
+ onClick: handleAddProp,
8535
+ className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
8536
+ },
8537
+ /* @__PURE__ */ React14.createElement(FiPlus4, { size: 14 }),
8538
+ " Adicionar"
8539
+ )), /* @__PURE__ */ React14.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React14.createElement(
8358
8540
  CustomPropertyDisplay,
8359
8541
  {
8360
8542
  key: prop.id,
@@ -8362,13 +8544,30 @@ function InSceneVersionForm({
8362
8544
  onUpdate: (updatedProp) => handleUpdateProp(index, updatedProp),
8363
8545
  onRemove: () => handleRemoveProp(index),
8364
8546
  onOpenImageViewer,
8365
- unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
8547
+ unavailableTypes: currentUsedTypes.filter(
8548
+ (t) => t !== prop.type
8549
+ ),
8366
8550
  isTextureMode: useImageAsTexture,
8367
8551
  selectedImageUrl,
8368
8552
  onSelectTexture: handleSelectTexture,
8369
8553
  onUploadFile
8370
8554
  }
8371
- )), /* @__PURE__ */ React14.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React14.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React14.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React14.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar")))
8555
+ )), /* @__PURE__ */ React14.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React14.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React14.createElement(
8556
+ "button",
8557
+ {
8558
+ type: "button",
8559
+ onClick: onCancel,
8560
+ className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm"
8561
+ },
8562
+ "Cancelar"
8563
+ ), /* @__PURE__ */ React14.createElement(
8564
+ "button",
8565
+ {
8566
+ type: "submit",
8567
+ className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]"
8568
+ },
8569
+ "Salvar"
8570
+ )))
8372
8571
  ), isDescriptionModalOpen && /* @__PURE__ */ React14.createElement(
8373
8572
  DescriptionEditModal,
8374
8573
  {
@@ -8388,11 +8587,28 @@ function InSceneVersionForm({
8388
8587
 
8389
8588
  // src/components/InSceneQuestForm.jsx
8390
8589
  import React16, { useState as useState17, useRef as useRef12 } from "react";
8391
- import { FiPlus as FiPlus6, FiCheck as FiCheck9, FiEdit2 as FiEdit26, FiTarget, FiX as FiX5, FiChevronDown as FiChevronDown6, FiUser as FiUser2, FiSearch as FiSearch5 } from "react-icons/fi";
8590
+ import {
8591
+ FiPlus as FiPlus6,
8592
+ FiCheck as FiCheck9,
8593
+ FiEdit2 as FiEdit26,
8594
+ FiTarget,
8595
+ FiX as FiX5,
8596
+ FiChevronDown as FiChevronDown6,
8597
+ FiUser as FiUser2,
8598
+ FiSearch as FiSearch5
8599
+ } from "react-icons/fi";
8392
8600
 
8393
8601
  // src/components/QuestReviewStackEditor.jsx
8394
8602
  import React15, { useState as useState16 } from "react";
8395
- import { FiPlus as FiPlus5, FiX as FiX4, FiUser, FiSearch as FiSearch4, FiChevronUp, FiChevronDown as FiChevronDown5, FiStar } from "react-icons/fi";
8603
+ import {
8604
+ FiPlus as FiPlus5,
8605
+ FiX as FiX4,
8606
+ FiUser,
8607
+ FiSearch as FiSearch4,
8608
+ FiChevronUp,
8609
+ FiChevronDown as FiChevronDown5,
8610
+ FiStar
8611
+ } from "react-icons/fi";
8396
8612
  function QuestReviewStackEditor({
8397
8613
  reviewStack = [],
8398
8614
  onChange,
@@ -8402,7 +8618,10 @@ function QuestReviewStackEditor({
8402
8618
  const [isAdding, setIsAdding] = useState16(false);
8403
8619
  const [searchQuery, setSearchQuery] = useState16("");
8404
8620
  const handleAddReviewer = (userId) => {
8405
- const newStack = [...reviewStack, { userId, status: "pending", mandatory: true }];
8621
+ const newStack = [
8622
+ ...reviewStack,
8623
+ { userId, status: "pending", mandatory: true }
8624
+ ];
8406
8625
  onChange(newStack);
8407
8626
  setIsAdding(false);
8408
8627
  setSearchQuery("");
@@ -8413,21 +8632,27 @@ function QuestReviewStackEditor({
8413
8632
  };
8414
8633
  const handleToggleMandatory = (index) => {
8415
8634
  const newStack = [...reviewStack];
8416
- newStack[index] = { ...newStack[index], mandatory: !newStack[index].mandatory };
8635
+ newStack[index] = {
8636
+ ...newStack[index],
8637
+ mandatory: !newStack[index].mandatory
8638
+ };
8417
8639
  onChange(newStack);
8418
8640
  };
8419
8641
  const handleMove = (index, direction) => {
8420
8642
  const newStack = [...reviewStack];
8421
8643
  const targetIndex = index + direction;
8422
8644
  if (targetIndex < 0 || targetIndex >= newStack.length) return;
8423
- [newStack[index], newStack[targetIndex]] = [newStack[targetIndex], newStack[index]];
8645
+ [newStack[index], newStack[targetIndex]] = [
8646
+ newStack[targetIndex],
8647
+ newStack[index]
8648
+ ];
8424
8649
  onChange(newStack);
8425
8650
  };
8426
8651
  const filteredMembers = viewMembers.filter((m) => {
8427
8652
  const search = searchQuery.toLowerCase();
8428
8653
  return (m.name || "").toLowerCase().includes(search) || (m.email || "").toLowerCase().includes(search);
8429
8654
  });
8430
- return /* @__PURE__ */ React15.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Review Stack (Sequential)"), !readOnly && !isAdding && /* @__PURE__ */ React15.createElement(
8655
+ return /* @__PURE__ */ React15.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React15.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Review Stack"), !readOnly && !isAdding && /* @__PURE__ */ React15.createElement(
8431
8656
  "button",
8432
8657
  {
8433
8658
  type: "button",
@@ -8436,7 +8661,13 @@ function QuestReviewStackEditor({
8436
8661
  },
8437
8662
  /* @__PURE__ */ React15.createElement(FiPlus5, { size: 10 }),
8438
8663
  " Adicionar Camada"
8439
- )), isAdding && /* @__PURE__ */ React15.createElement("div", { className: "bg-slate-900/50 border border-sky-500/30 rounded-lg p-2 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200" }, /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(FiSearch4, { className: "absolute left-2 top-1/2 -translate-y-1/2 text-slate-500", size: 12 }), /* @__PURE__ */ React15.createElement(
8664
+ )), isAdding && /* @__PURE__ */ React15.createElement("div", { className: "bg-slate-900/50 border border-sky-500/30 rounded-lg p-2 space-y-2 animate-in fade-in slide-in-from-top-1 duration-200" }, /* @__PURE__ */ React15.createElement("div", { className: "relative" }, /* @__PURE__ */ React15.createElement(
8665
+ FiSearch4,
8666
+ {
8667
+ className: "absolute left-2 top-1/2 -translate-y-1/2 text-slate-500",
8668
+ size: 12
8669
+ }
8670
+ ), /* @__PURE__ */ React15.createElement(
8440
8671
  "input",
8441
8672
  {
8442
8673
  autoFocus: true,
@@ -8446,7 +8677,14 @@ function QuestReviewStackEditor({
8446
8677
  onChange: (e) => setSearchQuery(e.target.value),
8447
8678
  className: "w-full bg-slate-800 border border-white/10 rounded p-1.5 pl-7 text-xs focus:outline-none focus:ring-1 focus:ring-sky-400"
8448
8679
  }
8449
- ), /* @__PURE__ */ React15.createElement("button", { onClick: () => setIsAdding(false), className: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-white" }, /* @__PURE__ */ React15.createElement(FiX4, { size: 14 }))), /* @__PURE__ */ React15.createElement("ul", { className: "max-h-32 overflow-y-auto custom-scrollbar space-y-1" }, filteredMembers.map((m) => /* @__PURE__ */ React15.createElement(
8680
+ ), /* @__PURE__ */ React15.createElement(
8681
+ "button",
8682
+ {
8683
+ onClick: () => setIsAdding(false),
8684
+ className: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-white"
8685
+ },
8686
+ /* @__PURE__ */ React15.createElement(FiX4, { size: 14 })
8687
+ )), /* @__PURE__ */ React15.createElement("ul", { className: "max-h-32 overflow-y-auto custom-scrollbar space-y-1" }, filteredMembers.map((m) => /* @__PURE__ */ React15.createElement(
8450
8688
  "li",
8451
8689
  {
8452
8690
  key: m.id,
@@ -8464,8 +8702,32 @@ function QuestReviewStackEditor({
8464
8702
  key: index,
8465
8703
  className: `group relative flex items-center gap-3 p-2 rounded-lg border ${isCompleted ? "bg-green-500/5 border-green-500/20" : "bg-white/5 border-white/10"} hover:border-white/20 transition-all`
8466
8704
  },
8467
- /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col items-center gap-0.5 text-slate-500" }, /* @__PURE__ */ React15.createElement("span", { className: "text-[10px] font-bold opacity-50" }, index + 1), !readOnly && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, -1), disabled: index === 0, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronUp, { size: 12 })), /* @__PURE__ */ React15.createElement("button", { type: "button", onClick: () => handleMove(index, 1), disabled: index === reviewStack.length - 1, className: "hover:text-sky-400 disabled:opacity-20" }, /* @__PURE__ */ React15.createElement(FiChevronDown5, { size: 12 })))),
8468
- /* @__PURE__ */ React15.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement("span", { className: `truncate text-sm font-medium ${isCompleted ? "text-green-300" : "text-slate-200"}` }, (member == null ? void 0 : member.name) || (member == null ? void 0 : member.email) || "Unknown User"), item.mandatory && /* @__PURE__ */ React15.createElement("span", { className: "flex-shrink-0 px-1.5 py-0.5 rounded-full bg-amber-500/20 text-amber-300 text-[8px] font-bold uppercase tracking-tighter border border-amber-500/30" }, "Obrigat\xF3rio")), /* @__PURE__ */ React15.createElement("p", { className: "text-[10px] text-slate-500 flex items-center gap-1" }, isCompleted ? "\u2713 Review Conclu\xEDda" : "\u23F3 Pendente")),
8705
+ /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col items-center gap-0.5 text-slate-500" }, /* @__PURE__ */ React15.createElement("span", { className: "text-[10px] font-bold opacity-50" }, index + 1), !readOnly && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
8706
+ "button",
8707
+ {
8708
+ type: "button",
8709
+ onClick: () => handleMove(index, -1),
8710
+ disabled: index === 0,
8711
+ className: "hover:text-sky-400 disabled:opacity-20"
8712
+ },
8713
+ /* @__PURE__ */ React15.createElement(FiChevronUp, { size: 12 })
8714
+ ), /* @__PURE__ */ React15.createElement(
8715
+ "button",
8716
+ {
8717
+ type: "button",
8718
+ onClick: () => handleMove(index, 1),
8719
+ disabled: index === reviewStack.length - 1,
8720
+ className: "hover:text-sky-400 disabled:opacity-20"
8721
+ },
8722
+ /* @__PURE__ */ React15.createElement(FiChevronDown5, { size: 12 })
8723
+ ))),
8724
+ /* @__PURE__ */ React15.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement(
8725
+ "span",
8726
+ {
8727
+ className: `truncate text-sm font-medium ${isCompleted ? "text-green-300" : "text-slate-200"}`
8728
+ },
8729
+ (member == null ? void 0 : member.name) || (member == null ? void 0 : member.email) || "Unknown User"
8730
+ ), item.mandatory && /* @__PURE__ */ React15.createElement("span", { className: "flex-shrink-0 px-1.5 py-0.5 rounded-full bg-amber-500/20 text-amber-300 text-[8px] font-bold uppercase tracking-tighter border border-amber-500/30" }, "Obrigat\xF3rio")), /* @__PURE__ */ React15.createElement("p", { className: "text-[10px] text-slate-500 flex items-center gap-1" }, isCompleted ? "\u2713 Review Conclu\xEDda" : "\u23F3 Pendente")),
8469
8731
  !readOnly && /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React15.createElement(
8470
8732
  "button",
8471
8733
  {
@@ -8498,10 +8760,10 @@ function QuestReviewStackEditor({
8498
8760
 
8499
8761
  // src/components/InSceneQuestForm.jsx
8500
8762
  var QUEST_STATUS_COLORS2 = {
8501
- "Backlog": "#64748b",
8763
+ Backlog: "#64748b",
8502
8764
  "In Progress": "#eab308",
8503
- "Review": "#a855f7",
8504
- "Done": "#22c55e"
8765
+ Review: "#a855f7",
8766
+ Done: "#22c55e"
8505
8767
  };
8506
8768
  function InSceneQuestForm({
8507
8769
  onSave,
@@ -8545,7 +8807,10 @@ function InSceneQuestForm({
8545
8807
  setCustomProps([...customProps, newProp]);
8546
8808
  setTimeout(() => {
8547
8809
  var _a2;
8548
- (_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "center" });
8810
+ (_a2 = propsEndRef.current) == null ? void 0 : _a2.scrollIntoView({
8811
+ behavior: "smooth",
8812
+ block: "center"
8813
+ });
8549
8814
  }, 100);
8550
8815
  };
8551
8816
  const handleRemoveProp = (index) => setCustomProps(customProps.filter((_, i) => i !== index));
@@ -8584,12 +8849,14 @@ function InSceneQuestForm({
8584
8849
  customProps.filter((prop) => prop.key.trim() && !prop.isEditing)
8585
8850
  );
8586
8851
  const processedSections = processDescriptionForSave(description, []);
8587
- const initialTimeline = [{
8588
- type: "quest_created",
8589
- timestamp: Date.now(),
8590
- actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
8591
- description: `Quest criada por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
8592
- }];
8852
+ const initialTimeline = [
8853
+ {
8854
+ type: "quest_created",
8855
+ timestamp: Date.now(),
8856
+ actorId: ((_a2 = session == null ? void 0 : session.user) == null ? void 0 : _a2.id) || "unknown",
8857
+ description: `Quest criada por ${((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.name) || "usu\xE1rio"}.`
8858
+ }
8859
+ ];
8593
8860
  if (assigneeId) {
8594
8861
  initialTimeline.push({
8595
8862
  type: "assignee_changed",
@@ -8635,7 +8902,15 @@ function InSceneQuestForm({
8635
8902
  onContextMenu: swallow,
8636
8903
  onDoubleClick: swallow
8637
8904
  },
8638
- /* @__PURE__ */ React16.createElement("div", { className: "h-[2px]", style: { background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)` } }),
8905
+ /* @__PURE__ */ React16.createElement(
8906
+ "div",
8907
+ {
8908
+ className: "h-[2px]",
8909
+ style: {
8910
+ background: `linear-gradient(to right, transparent, ${QUEST_STATUS_COLORS2[status]}, transparent)`
8911
+ }
8912
+ }
8913
+ ),
8639
8914
  /* @__PURE__ */ React16.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React16.createElement(FiTarget, { className: "text-sky-400", size: 14 }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Nova quest")), /* @__PURE__ */ React16.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, "Criar Quest")), /* @__PURE__ */ React16.createElement(
8640
8915
  "button",
8641
8916
  {
@@ -8660,16 +8935,40 @@ function InSceneQuestForm({
8660
8935
  },
8661
8936
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
8662
8937
  }
8663
- ), /* @__PURE__ */ React16.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React16.createElement("p", { className: "text-xs text-indigo-300 font-medium truncate", title: standardizedName }, standardizedName))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
8938
+ ), /* @__PURE__ */ React16.createElement("div", { className: "pt-1 flex items-center gap-1.5" }, /* @__PURE__ */ React16.createElement("span", { className: "text-[10px] uppercase font-bold text-slate-500 tracking-wider" }), /* @__PURE__ */ React16.createElement(
8939
+ "p",
8940
+ {
8941
+ className: "text-xs text-indigo-300 font-medium truncate",
8942
+ title: standardizedName
8943
+ },
8944
+ standardizedName
8945
+ ))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Status da Quest"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
8664
8946
  "button",
8665
8947
  {
8666
8948
  type: "button",
8667
8949
  onClick: () => setIsStatusDropdownOpen(!isStatusDropdownOpen),
8668
8950
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
8669
8951
  },
8670
- /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]", style: { backgroundColor: QUEST_STATUS_COLORS2[status] } }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, status)),
8671
- /* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })
8672
- ), isStatusDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsStatusDropdownOpen(false) }), /* @__PURE__ */ React16.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS2).map((s) => /* @__PURE__ */ React16.createElement(
8952
+ /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(
8953
+ "span",
8954
+ {
8955
+ className: "w-3 h-3 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.5)]",
8956
+ style: { backgroundColor: QUEST_STATUS_COLORS2[status] }
8957
+ }
8958
+ ), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, status)),
8959
+ /* @__PURE__ */ React16.createElement(
8960
+ FiChevronDown6,
8961
+ {
8962
+ className: `text-slate-400 transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}`
8963
+ }
8964
+ )
8965
+ ), isStatusDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
8966
+ "div",
8967
+ {
8968
+ className: "fixed inset-0 z-40",
8969
+ onClick: () => setIsStatusDropdownOpen(false)
8970
+ }
8971
+ ), /* @__PURE__ */ React16.createElement("ul", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-800 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden" }, Object.keys(QUEST_STATUS_COLORS2).map((s) => /* @__PURE__ */ React16.createElement(
8673
8972
  "li",
8674
8973
  {
8675
8974
  key: s,
@@ -8680,7 +8979,13 @@ function InSceneQuestForm({
8680
8979
  },
8681
8980
  className: `px-3 py-2.5 text-sm cursor-pointer transition-colors flex items-center gap-2 ${status === s ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
8682
8981
  },
8683
- /* @__PURE__ */ React16.createElement("span", { className: "w-3 h-3 rounded-full", style: { backgroundColor: QUEST_STATUS_COLORS2[s] } }),
8982
+ /* @__PURE__ */ React16.createElement(
8983
+ "span",
8984
+ {
8985
+ className: "w-3 h-3 rounded-full",
8986
+ style: { backgroundColor: QUEST_STATUS_COLORS2[s] }
8987
+ }
8988
+ ),
8684
8989
  s
8685
8990
  )))))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Assignee (Respons\xE1vel)"), /* @__PURE__ */ React16.createElement("div", { className: "relative" }, /* @__PURE__ */ React16.createElement(
8686
8991
  "button",
@@ -8690,11 +8995,22 @@ function InSceneQuestForm({
8690
8995
  className: "w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400/60 transition-colors flex items-center justify-between"
8691
8996
  },
8692
8997
  /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiUser2, { className: "text-slate-400", size: 14 }), /* @__PURE__ */ React16.createElement("span", { className: "text-slate-200 font-medium" }, ((_a = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _a.name) || ((_b = viewMembers.find((m) => m.id === assigneeId)) == null ? void 0 : _b.email) || "Nenhum")),
8693
- /* @__PURE__ */ React16.createElement(FiChevronDown6, { className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}` })
8694
- ), isAssigneeDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
8695
- setIsAssigneeDropdownOpen(false);
8696
- setAssigneeSearchQuery("");
8697
- } }), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React16.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React16.createElement(
8998
+ /* @__PURE__ */ React16.createElement(
8999
+ FiChevronDown6,
9000
+ {
9001
+ className: `text-slate-400 transition-transform duration-200 ${isAssigneeDropdownOpen ? "rotate-180" : ""}`
9002
+ }
9003
+ )
9004
+ ), isAssigneeDropdownOpen && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
9005
+ "div",
9006
+ {
9007
+ className: "fixed inset-0 z-40",
9008
+ onClick: () => {
9009
+ setIsAssigneeDropdownOpen(false);
9010
+ setAssigneeSearchQuery("");
9011
+ }
9012
+ }
9013
+ ), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-full left-0 mt-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React16.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React16.createElement(FiSearch5, { className: "text-slate-500", size: 14 }), /* @__PURE__ */ React16.createElement(
8698
9014
  "input",
8699
9015
  {
8700
9016
  type: "text",
@@ -8741,20 +9057,7 @@ function InSceneQuestForm({
8741
9057
  onChange: setReviewStack,
8742
9058
  viewMembers
8743
9059
  }
8744
- )), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tipos Adicionais"), /* @__PURE__ */ React16.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React16.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, t !== "quest" && /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React16.createElement(FiX5, { size: 12 })))), /* @__PURE__ */ React16.createElement(
8745
- "input",
8746
- {
8747
- type: "text",
8748
- value: typeInput,
8749
- onChange: (e) => setTypeInput(e.target.value),
8750
- onKeyDown: handleTypeInputKeyDown,
8751
- onBlur: () => {
8752
- if (typeInput.trim()) handleAddType(typeInput);
8753
- },
8754
- className: "flex-1 bg-transparent text-sm min-w-[80px] focus:outline-none text-slate-200",
8755
- autoComplete: "off"
8756
- }
8757
- ))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o (Opcional)"), /* @__PURE__ */ React16.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React16.createElement(
9060
+ )), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5 relative mt-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React16.createElement("div", { className: "relative group min-h-[80px] bg-slate-800/70 p-2.5 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React16.createElement(
8758
9061
  DescriptionDisplay,
8759
9062
  {
8760
9063
  description,
@@ -8764,20 +9067,31 @@ function InSceneQuestForm({
8764
9067
  onMentionClick,
8765
9068
  onSaveDescription: (newDesc) => setDescription(newDesc)
8766
9069
  }
8767
- ), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiEdit26, { size: 14 }))), !description && /* @__PURE__ */ React16.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React16.createElement(
9070
+ ), /* @__PURE__ */ React16.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React16.createElement(
8768
9071
  "button",
8769
9072
  {
8770
- key: s,
8771
9073
  type: "button",
8772
- onClick: () => {
8773
- setSize(s);
8774
- onSizeChange == null ? void 0 : onSizeChange(s);
8775
- },
8776
- className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
9074
+ onClick: () => setIsDescriptionModalOpen(true),
9075
+ className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors"
9076
+ },
9077
+ /* @__PURE__ */ React16.createElement(FiEdit26, { size: 14 })
9078
+ )), !description && /* @__PURE__ */ React16.createElement(
9079
+ "div",
9080
+ {
9081
+ onClick: () => setIsDescriptionModalOpen(true),
9082
+ className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
9083
+ },
9084
+ "Adicionar descri\xE7\xE3o..."
9085
+ ))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React16.createElement(
9086
+ "button",
9087
+ {
9088
+ type: "button",
9089
+ onClick: handleAddProp,
9090
+ className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
8777
9091
  },
8778
- /* @__PURE__ */ React16.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${size === s ? "bg-indigo-500 border-indigo-500" : "border-slate-600 bg-transparent group-hover:border-slate-500"}` }, size === s && /* @__PURE__ */ React16.createElement(FiCheck9, { size: 12, className: "text-white" })),
8779
- /* @__PURE__ */ React16.createElement("span", { className: `text-sm capitalize transition-colors ${size === s ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}` }, s)
8780
- )))), /* @__PURE__ */ React16.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React16.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider" }, "Propriedades Adicionais"), /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React16.createElement(FiPlus6, { size: 14 }), " Adicionar")), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React16.createElement(
9092
+ /* @__PURE__ */ React16.createElement(FiPlus6, { size: 14 }),
9093
+ " Adicionar"
9094
+ )), /* @__PURE__ */ React16.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, index) => /* @__PURE__ */ React16.createElement(
8781
9095
  CustomPropertyDisplay,
8782
9096
  {
8783
9097
  key: prop.id,
@@ -8785,10 +9099,81 @@ function InSceneQuestForm({
8785
9099
  onUpdate: (updatedProp) => handleUpdateProp(index, updatedProp),
8786
9100
  onRemove: () => handleRemoveProp(index),
8787
9101
  onOpenImageViewer,
8788
- unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
9102
+ unavailableTypes: currentUsedTypes.filter(
9103
+ (t) => t !== prop.type
9104
+ ),
8789
9105
  onUploadFile
8790
9106
  }
8791
- )), /* @__PURE__ */ React16.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React16.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React16.createElement("button", { type: "button", onClick: onCancel, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm" }, "Cancelar"), /* @__PURE__ */ React16.createElement("button", { type: "submit", className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]" }, "Salvar Quest")))
9107
+ )), /* @__PURE__ */ React16.createElement("div", { ref: propsEndRef }))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => /* @__PURE__ */ React16.createElement(
9108
+ "button",
9109
+ {
9110
+ key: s,
9111
+ type: "button",
9112
+ onClick: () => {
9113
+ setSize(s);
9114
+ onSizeChange == null ? void 0 : onSizeChange(s);
9115
+ },
9116
+ className: "flex items-center gap-2 group cursor-pointer focus:outline-none"
9117
+ },
9118
+ /* @__PURE__ */ React16.createElement(
9119
+ "div",
9120
+ {
9121
+ className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${size === s ? "bg-indigo-500 border-indigo-500" : "border-slate-600 bg-transparent group-hover:border-slate-500"}`
9122
+ },
9123
+ size === s && /* @__PURE__ */ React16.createElement(FiCheck9, { size: 12, className: "text-white" })
9124
+ ),
9125
+ /* @__PURE__ */ React16.createElement(
9126
+ "span",
9127
+ {
9128
+ className: `text-sm capitalize transition-colors ${size === s ? "text-white font-medium" : "text-slate-400 group-hover:text-slate-300"}`
9129
+ },
9130
+ s
9131
+ )
9132
+ )))), /* @__PURE__ */ React16.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React16.createElement("label", { className: "text-xs text-slate-300 font-medium uppercase tracking-wider" }, "Tipos Adicionais"), /* @__PURE__ */ React16.createElement("div", { className: "relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 focus-within:ring-2 focus-within:ring-indigo-400/60 transition-all" }, types.map((t, index) => /* @__PURE__ */ React16.createElement(
9133
+ "span",
9134
+ {
9135
+ key: index,
9136
+ className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}`
9137
+ },
9138
+ t,
9139
+ t !== "quest" && /* @__PURE__ */ React16.createElement(
9140
+ "button",
9141
+ {
9142
+ type: "button",
9143
+ onClick: () => handleRemoveType(index),
9144
+ className: "hover:text-white transition-colors"
9145
+ },
9146
+ /* @__PURE__ */ React16.createElement(FiX5, { size: 12 })
9147
+ )
9148
+ )), /* @__PURE__ */ React16.createElement(
9149
+ "input",
9150
+ {
9151
+ type: "text",
9152
+ value: typeInput,
9153
+ onChange: (e) => setTypeInput(e.target.value),
9154
+ onKeyDown: handleTypeInputKeyDown,
9155
+ onBlur: () => {
9156
+ if (typeInput.trim()) handleAddType(typeInput);
9157
+ },
9158
+ className: "flex-1 bg-transparent text-sm min-w-[80px] focus:outline-none text-slate-200",
9159
+ autoComplete: "off"
9160
+ }
9161
+ )))), /* @__PURE__ */ React16.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React16.createElement(
9162
+ "button",
9163
+ {
9164
+ type: "button",
9165
+ onClick: onCancel,
9166
+ className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm"
9167
+ },
9168
+ "Cancelar"
9169
+ ), /* @__PURE__ */ React16.createElement(
9170
+ "button",
9171
+ {
9172
+ type: "submit",
9173
+ className: "px-4 py-2 rounded-lg bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 transition-colors font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)]"
9174
+ },
9175
+ "Salvar Quest"
9176
+ )))
8792
9177
  ), isDescriptionModalOpen && /* @__PURE__ */ React16.createElement(
8793
9178
  DescriptionEditModal,
8794
9179
  {
@@ -9344,9 +9729,10 @@ function QuestDetailsPanel({
9344
9729
  onUploadFile,
9345
9730
  userRole,
9346
9731
  currentDatasetName,
9347
- viewMembers = []
9732
+ viewMembers = [],
9733
+ currentUser
9348
9734
  }) {
9349
- var _a;
9735
+ var _a, _b;
9350
9736
  const initialRawTitle = (node == null ? void 0 : node.raw_title) || (((_a = node == null ? void 0 : node.name) == null ? void 0 : _a.includes(" - \xBB ")) ? node.name.split(" - \xBB ")[1] : node == null ? void 0 : node.name) || "";
9351
9737
  const [rawTitle, setRawTitle] = useState19(initialRawTitle);
9352
9738
  const prefixParts = ((node == null ? void 0 : node.name) || "").split(" - \xBB ");
@@ -9362,6 +9748,9 @@ function QuestDetailsPanel({
9362
9748
  const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState19(false);
9363
9749
  const [isAssigneeDropdownOpen, setIsAssigneeDropdownOpen] = useState19(false);
9364
9750
  const [assigneeSearchQuery, setAssigneeSearchQuery] = useState19("");
9751
+ const [returnAssigneeId, setReturnAssigneeId] = useState19("");
9752
+ const [isReturnDropdownOpen, setIsReturnDropdownOpen] = useState19(false);
9753
+ const [returnSearchQuery, setReturnSearchQuery] = useState19("");
9365
9754
  const [customProps, setCustomProps] = useState19(() => extractCustomPropsFromNode(node || {}));
9366
9755
  const [reviewStack, setReviewStack] = useState19((node == null ? void 0 : node.reviewStack) || []);
9367
9756
  const [timeline, setTimeline] = useState19((node == null ? void 0 : node.timeline) || []);
@@ -9401,6 +9790,7 @@ function QuestDetailsPanel({
9401
9790
  setStatus((node == null ? void 0 : node.status) ?? "Backlog");
9402
9791
  setSize((node == null ? void 0 : node.size) ?? "medium");
9403
9792
  setAssigneeId((node == null ? void 0 : node.assignee_id) || "");
9793
+ setReturnAssigneeId("");
9404
9794
  setDescription((node == null ? void 0 : node.description) ?? "");
9405
9795
  setIntensity((node == null ? void 0 : node.intensity) !== void 0 ? node.intensity : 0);
9406
9796
  setExistingSections((node == null ? void 0 : node.description_sections) || []);
@@ -9444,8 +9834,7 @@ function QuestDetailsPanel({
9444
9834
  });
9445
9835
  };
9446
9836
  const swallow = (e) => e.stopPropagation();
9447
- const handleNameChange = (e) => {
9448
- const val = e.target.value;
9837
+ const handleNameChange = (val) => {
9449
9838
  setRawTitle(val);
9450
9839
  const newStandardName = questPrefix ? `${questPrefix} - \xBB ${val || "Sem t\xEDtulo"}` : val;
9451
9840
  onNameChange == null ? void 0 : onNameChange(node.id, newStandardName, val);
@@ -9456,6 +9845,53 @@ function QuestDetailsPanel({
9456
9845
  onSizeChange == null ? void 0 : onSizeChange(node.id, newSize);
9457
9846
  setHasUnsavedChanges(true);
9458
9847
  };
9848
+ const handleReturnToOperation = async () => {
9849
+ if (isSaving) return;
9850
+ setIsSaving(true);
9851
+ const actorId = (currentUser == null ? void 0 : currentUser.id) || "unknown";
9852
+ const actorName = (currentUser == null ? void 0 : currentUser.name) || "Revisor";
9853
+ const targetMember = viewMembers.find((m) => String(m.id) === String(returnAssigneeId));
9854
+ const targetName = (targetMember == null ? void 0 : targetMember.name) || "executor";
9855
+ const newEvent = {
9856
+ type: "review_returned",
9857
+ timestamp: Date.now(),
9858
+ actorId,
9859
+ description: `Review finalizada com retorno para opera\xE7\xE3o por ${actorName}. Novo respons\xE1vel: ${targetName}.`
9860
+ };
9861
+ const updatedTimeline = [...timeline, newEvent];
9862
+ const updatedStatus = "In Progress";
9863
+ const updatedColor = "#eab308";
9864
+ const nodeToSave = {
9865
+ ...node,
9866
+ name: standardizedName,
9867
+ raw_title: rawTitle,
9868
+ description,
9869
+ status: updatedStatus,
9870
+ color: updatedColor,
9871
+ assignee_id: returnAssigneeId,
9872
+ reviewStack,
9873
+ timeline: updatedTimeline,
9874
+ size,
9875
+ types: types.includes("quest") ? types : [...types, "quest"],
9876
+ intensity: intensity || 0,
9877
+ useImageAsTexture: node.useImageAsTexture || false,
9878
+ textureImageUrl: node.textureImageUrl || null
9879
+ };
9880
+ try {
9881
+ await onSave(nodeToSave, false);
9882
+ setTimeline(updatedTimeline);
9883
+ setStatus(updatedStatus);
9884
+ setAssigneeId(returnAssigneeId);
9885
+ setReturnAssigneeId("");
9886
+ onDataUpdate(nodeToSave);
9887
+ setHasUnsavedChanges(false);
9888
+ } catch (error) {
9889
+ console.error("Erro ao retornar para opera\xE7\xE3o:", error);
9890
+ alert("Erro ao realizar o retorno para opera\xE7\xE3o.");
9891
+ } finally {
9892
+ setIsSaving(false);
9893
+ }
9894
+ };
9459
9895
  const handleStatusChange = (newStatus) => {
9460
9896
  setStatus(newStatus);
9461
9897
  const newColor = QUEST_STATUS_COLORS3[newStatus];
@@ -9627,7 +10063,7 @@ function QuestDetailsPanel({
9627
10063
  {
9628
10064
  type: "text",
9629
10065
  value: rawTitle,
9630
- onChange: handleNameChange,
10066
+ onChange: (e) => handleNameChange(e.target.value),
9631
10067
  readOnly: !canEdit,
9632
10068
  className: `w-full bg-slate-800/70 p-2.5 text-sm rounded-lg border border-white/10 focus:outline-none ${canEdit ? "focus:ring-2 focus:ring-indigo-400/60" : "cursor-default text-slate-400"}`
9633
10069
  }
@@ -9744,7 +10180,65 @@ function QuestDetailsPanel({
9744
10180
  viewMembers,
9745
10181
  readOnly: !canEdit
9746
10182
  }
9747
- )), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React18.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, canEdit && t !== "quest" && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React18.createElement(FiX7, { size: 12 })))), canEdit && /* @__PURE__ */ React18.createElement(
10183
+ )), status === "Review" && canEdit && /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "bg-slate-900/40 rounded-xl p-4 border border-white/5 space-y-3" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-[11px] uppercase font-bold text-slate-500 tracking-wider" }, "A\xE7\xF5es de Review"), /* @__PURE__ */ React18.createElement("span", { className: "px-2 py-0.5 rounded-full bg-purple-500/10 text-purple-300 text-[10px] font-medium border border-purple-500/20" }, "Em Revis\xE3o")), /* @__PURE__ */ React18.createElement("p", { className: "text-xs text-slate-400 leading-relaxed" }, "Selecione o respons\xE1vel abaixo para retornar o ciclo para opera\xE7\xE3o."), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 flex flex-col" }, /* @__PURE__ */ React18.createElement("label", { className: "text-[10px] text-slate-400 font-medium ml-0.5" }, "Retornar para:"), /* @__PURE__ */ React18.createElement("div", { className: "relative" }, /* @__PURE__ */ React18.createElement(
10184
+ "button",
10185
+ {
10186
+ type: "button",
10187
+ onClick: () => setIsReturnDropdownOpen(!isReturnDropdownOpen),
10188
+ className: "w-full bg-slate-800/80 p-2 text-xs rounded-lg border border-white/10 hover:border-white/20 focus:outline-none focus:ring-1 focus:ring-purple-400/50 transition-colors flex items-center justify-between"
10189
+ },
10190
+ /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiUser3, { className: "text-slate-400", size: 12 }), /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, ((_b = viewMembers.find((m) => String(m.id) === String(returnAssigneeId))) == null ? void 0 : _b.name) || "Selecionar respons\xE1vel...")),
10191
+ /* @__PURE__ */ React18.createElement(FiChevronDown7, { className: `text-slate-400 transition-transform duration-200 ${isReturnDropdownOpen ? "rotate-180" : ""}`, size: 14 })
10192
+ ), isReturnDropdownOpen && /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement("div", { className: "fixed inset-0 z-40", onClick: () => {
10193
+ setIsReturnDropdownOpen(false);
10194
+ setReturnSearchQuery("");
10195
+ } }), /* @__PURE__ */ React18.createElement("div", { className: "absolute bottom-full left-0 mb-1.5 w-full bg-slate-900 border border-white/10 rounded-lg shadow-[0_8px_30px_rgba(0,0,0,0.5)] z-50 overflow-hidden flex flex-col" }, /* @__PURE__ */ React18.createElement("div", { className: "p-2 border-b border-white/5 bg-white/5 flex items-center gap-2" }, /* @__PURE__ */ React18.createElement(FiSearch6, { className: "text-slate-500", size: 12 }), /* @__PURE__ */ React18.createElement(
10196
+ "input",
10197
+ {
10198
+ type: "text",
10199
+ autoFocus: true,
10200
+ placeholder: "Buscar membro...",
10201
+ value: returnSearchQuery,
10202
+ onChange: (e) => setReturnSearchQuery(e.target.value),
10203
+ className: "bg-transparent border-none outline-none text-[10px] text-white placeholder-slate-500 w-full",
10204
+ onClick: (e) => e.stopPropagation()
10205
+ }
10206
+ )), /* @__PURE__ */ React18.createElement("ul", { className: "max-h-32 overflow-y-auto custom-scrollbar" }, viewMembers.filter((member) => {
10207
+ const search = returnSearchQuery.toLowerCase();
10208
+ return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10209
+ }).map((member) => /* @__PURE__ */ React18.createElement(
10210
+ "li",
10211
+ {
10212
+ key: member.id,
10213
+ onClick: () => {
10214
+ setReturnAssigneeId(member.id);
10215
+ setIsReturnDropdownOpen(false);
10216
+ setReturnSearchQuery("");
10217
+ },
10218
+ className: `px-3 py-2 text-[11px] cursor-pointer transition-colors flex items-center gap-2 ${returnAssigneeId === member.id ? "bg-purple-500/20 text-white" : "text-slate-300 hover:bg-white/5 hover:text-white"}`
10219
+ },
10220
+ member.name || member.email
10221
+ )), viewMembers.filter((member) => {
10222
+ const search = returnSearchQuery.toLowerCase();
10223
+ return (member.name || "").toLowerCase().includes(search) || (member.email || "").toLowerCase().includes(search);
10224
+ }).length === 0 && /* @__PURE__ */ React18.createElement("li", { className: "px-3 py-4 text-[10px] text-slate-500 text-center italic" }, "Nenhum membro encontrado")))))), /* @__PURE__ */ React18.createElement(
10225
+ "button",
10226
+ {
10227
+ type: "button",
10228
+ onClick: handleReturnToOperation,
10229
+ disabled: isSaving || !returnAssigneeId,
10230
+ className: `w-full h-10 flex items-center justify-center gap-2 rounded-lg text-xs font-semibold border transition-all active:scale-[0.98] disabled:opacity-40 disabled:grayscale-[0.5] disabled:cursor-not-allowed ${!returnAssigneeId ? "bg-slate-800 text-slate-500 border-white/5" : "bg-slate-800 hover:bg-slate-700 text-purple-300 border-purple-500/20 hover:border-purple-500/40"}`
10231
+ },
10232
+ /* @__PURE__ */ React18.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18.createElement("path", { d: "M12 19V5M5 12l7 7 7-7" })),
10233
+ "Retornar para Opera\xE7\xE3o"
10234
+ ))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React18.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React18.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React18.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React18.createElement(FiPlus8, { size: 14 }), " Adicionar")), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React18.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), timeline && timeline.length > 0 && /* @__PURE__ */ React18.createElement("div", { className: "pt-4 pb-2 border-t border-white/10 mt-4" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider mb-3" }, "Timeline & Hist\xF3rico"), /* @__PURE__ */ React18.createElement("div", { className: "relative border-l border-white/10 ml-2.5 space-y-4" }, timeline.slice().sort((a, b) => a.timestamp - b.timestamp).map((event, idx) => {
10235
+ const dateObj = new Date(event.timestamp);
10236
+ const dateString = dateObj.toLocaleDateString("pt-BR", { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit" });
10237
+ return /* @__PURE__ */ React18.createElement("div", { key: idx, className: "relative pl-4 flex flex-col gap-0.5" }, /* @__PURE__ */ React18.createElement("div", { className: "absolute left-[-4.5px] top-1.5 w-2 h-2 rounded-full bg-slate-400/50 border-[1.5px] border-slate-900" }), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] text-slate-300" }, event.description), /* @__PURE__ */ React18.createElement("span", { className: "text-[9px] text-slate-500 font-mono tracking-tighter" }, dateString));
10238
+ }))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
10239
+ const isSelected = size === s;
10240
+ return /* @__PURE__ */ React18.createElement("button", { key: s, type: "button", onClick: () => canEdit && handleSizeChange(s), className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}` }, /* @__PURE__ */ React18.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12, className: "text-white" })), /* @__PURE__ */ React18.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s));
10241
+ }))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tipos Adicionais"), /* @__PURE__ */ React18.createElement("div", { className: `relative w-full bg-slate-800/70 p-1.5 min-h-[42px] flex flex-wrap gap-1.5 rounded-lg border border-white/10 ${canEdit ? "focus-within:ring-2 focus-within:ring-indigo-400/60" : ""} transition-all` }, types.map((t, index) => /* @__PURE__ */ React18.createElement("span", { key: index, className: `flex items-center gap-1 px-1.5 py-0.5 rounded-md text-xs font-medium border ${t === "quest" ? "bg-sky-500/20 text-sky-200 border-sky-500/30" : "bg-indigo-500/30 text-indigo-100 border-indigo-500/20"}` }, t, canEdit && t !== "quest" && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => handleRemoveType(index), className: "hover:text-white transition-colors" }, /* @__PURE__ */ React18.createElement(FiX7, { size: 12 })))), canEdit && /* @__PURE__ */ React18.createElement(
9748
10242
  "input",
9749
10243
  {
9750
10244
  type: "text",
@@ -9768,14 +10262,7 @@ function QuestDetailsPanel({
9768
10262
  ), canEdit && showTypeSuggestions && filteredTypes.length > 0 && /* @__PURE__ */ React18.createElement("ul", { className: "custom-scrollbar absolute top-full left-0 z-10 w-full mt-1 max-h-40 overflow-y-auto rounded-lg bg-slate-800 border border-white/10 shadow-lg" }, filteredTypes.map((suggestedType, index) => /* @__PURE__ */ React18.createElement("li", { key: index, className: "px-3 py-2 text-sm text-slate-200 cursor-pointer hover:bg-indigo-600/50", onMouseDown: (e) => {
9769
10263
  e.preventDefault();
9770
10264
  handleAddType(suggestedType);
9771
- } }, suggestedType))))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Descri\xE7\xE3o"), /* @__PURE__ */ React18.createElement("div", { className: "relative group min-h-[60px] bg-slate-800/40 rounded-lg border border-white/10 hover:border-white/20 transition-colors" }, /* @__PURE__ */ React18.createElement(DescriptionDisplay, { description, savedSections: existingSections, availableNodes, availableAncestries, onOpenReference, onMentionClick, onImageClick: handleImageClickFromText, onSaveDescription: handleSaveDescriptionInline }), /* @__PURE__ */ React18.createElement("div", { className: "absolute top-0 right-0 flex bg-slate-900/50 rounded-bl-lg backdrop-blur-sm opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity overflow-hidden border-b border-l border-white/5" }, /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsReadMode(true), className: `p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors ${canEdit ? "border-r border-white/5" : ""}`, title: "Modo de Leitura" }, /* @__PURE__ */ React18.createElement(FiBookOpen4, { size: 14 })), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: () => setIsDescriptionModalOpen(true), className: "p-2 text-slate-400 hover:text-white hover:bg-white/10 transition-colors", title: "Editar descri\xE7\xE3o (Modo de Escrita)" }, /* @__PURE__ */ React18.createElement(FiEdit28, { size: 14 }))), canEdit && !description && /* @__PURE__ */ React18.createElement("div", { onClick: () => setIsDescriptionModalOpen(true), className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text" }, "Adicionar descri\xE7\xE3o..."))), /* @__PURE__ */ React18.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18.createElement("label", { className: "text-xs text-slate-300" }, "Tamanho no Node (Size)"), /* @__PURE__ */ React18.createElement("div", { className: "flex items-center gap-5" }, ["small", "medium", "large"].map((s) => {
9772
- const isSelected = size === s;
9773
- return /* @__PURE__ */ React18.createElement("button", { key: s, type: "button", onClick: () => canEdit && handleSizeChange(s), className: `flex items-center gap-2 group focus:outline-none ${canEdit ? "cursor-pointer" : "cursor-default opacity-80"}` }, /* @__PURE__ */ React18.createElement("div", { className: `w-4 h-4 rounded-[4px] border flex items-center justify-center transition-all duration-200 ${isSelected ? "bg-indigo-500 border-indigo-500 shadow-[0_0_10px_rgba(99,102,241,0.4)]" : "border-slate-600 bg-transparent " + (canEdit ? "group-hover:border-slate-500" : "")}` }, isSelected && /* @__PURE__ */ React18.createElement(FiCheck11, { size: 12, className: "text-white" })), /* @__PURE__ */ React18.createElement("span", { className: `text-sm capitalize transition-colors ${isSelected ? "text-white font-medium" : "text-slate-400 " + (canEdit ? "group-hover:text-slate-300" : "")}` }, s));
9774
- }))), /* @__PURE__ */ React18.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React18.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React18.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React18.createElement(FiPlus8, { size: 14 }), " Adicionar")), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React18.createElement(CustomPropertyDisplay, { key: prop.id, prop, onUpdate: canEdit ? (updatedProp) => handleUpdateProp(idx, updatedProp) : void 0, onRemove: canEdit ? () => handleRemoveProp(idx) : void 0, onOpenImageViewer, unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type), isTextureMode: false, onUploadFile: canEdit ? onUploadFile : void 0, readOnly: !canEdit })), /* @__PURE__ */ React18.createElement("div", { ref: propsEndRef }))), timeline && timeline.length > 0 && /* @__PURE__ */ React18.createElement("div", { className: "pt-4 pb-2 border-t border-white/10 mt-4" }, /* @__PURE__ */ React18.createElement("h3", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider mb-3" }, "Timeline & Hist\xF3rico"), /* @__PURE__ */ React18.createElement("div", { className: "relative border-l border-white/10 ml-2.5 space-y-4" }, timeline.slice().sort((a, b) => a.timestamp - b.timestamp).map((event, idx) => {
9775
- const dateObj = new Date(event.timestamp);
9776
- const dateString = dateObj.toLocaleDateString("pt-BR", { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit" });
9777
- return /* @__PURE__ */ React18.createElement("div", { key: idx, className: "relative pl-4 flex flex-col gap-0.5" }, /* @__PURE__ */ React18.createElement("div", { className: "absolute left-[-4.5px] top-1.5 w-2 h-2 rounded-full bg-slate-400/50 border-[1.5px] border-slate-900" }), /* @__PURE__ */ React18.createElement("p", { className: "text-[11px] text-slate-300" }, event.description), /* @__PURE__ */ React18.createElement("span", { className: "text-[9px] text-slate-500 font-mono tracking-tighter" }, dateString));
9778
- }))), currentDatasetName && /* @__PURE__ */ React18.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React18.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React18.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React18.createElement("button", { onClick: () => handleSave(false), disabled: isSaving, className: `px-4 py-2 rounded-lg transition-all font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)] flex items-center gap-2 ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}` }, isSaving && /* @__PURE__ */ React18.createElement(FiLoader3, { className: "animate-spin" }), isSaving ? "Salvando..." : "Salvar Quest")))
10265
+ } }, suggestedType))))), currentDatasetName && /* @__PURE__ */ React18.createElement("div", { className: "pt-3 mt-4 border-t border-white/10 flex items-center justify-end gap-2 text-xs text-slate-400" }, /* @__PURE__ */ React18.createElement("span", { className: "truncate text-right" }, /* @__PURE__ */ React18.createElement("span", { className: "text-slate-200 font-medium" }, currentDatasetName)))), /* @__PURE__ */ React18.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React18.createElement("button", { onClick: handleCancel, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React18.createElement("button", { onClick: () => handleSave(false), disabled: isSaving, className: `px-4 py-2 rounded-lg transition-all font-semibold text-sm shadow-[0_8px_24px_rgba(99,102,241,0.35)] flex items-center gap-2 ${isSaving ? "bg-slate-700 text-slate-300 cursor-wait" : "bg-gradient-to-tr from-indigo-600 to-indigo-400 hover:from-indigo-500 hover:to-indigo-300 text-white"}` }, isSaving && /* @__PURE__ */ React18.createElement(FiLoader3, { className: "animate-spin" }), isSaving ? "Salvando..." : "Salvar Quest")))
9779
10266
  ), isDescriptionModalOpen && canEdit && /* @__PURE__ */ React18.createElement(
9780
10267
  DescriptionEditModal,
9781
10268
  {
@@ -9889,8 +10376,12 @@ function RelationshipDetailsPanel({
9889
10376
  }) {
9890
10377
  const [name, setName] = useState21((link == null ? void 0 : link.name) ?? "");
9891
10378
  const [description, setDescription] = useState21((link == null ? void 0 : link.description) ?? "");
9892
- const [customProps, setCustomProps] = useState21(() => extractCustomPropsFromNode(link || {}));
9893
- const [existingSections, setExistingSections] = useState21((link == null ? void 0 : link.description_sections) || []);
10379
+ const [customProps, setCustomProps] = useState21(
10380
+ () => extractCustomPropsFromNode(link || {})
10381
+ );
10382
+ const [existingSections, setExistingSections] = useState21(
10383
+ (link == null ? void 0 : link.description_sections) || []
10384
+ );
9894
10385
  const [sourceLabel, setSourceLabel] = useState21((link == null ? void 0 : link.source_label) ?? "");
9895
10386
  const [targetLabel, setTargetLabel] = useState21((link == null ? void 0 : link.target_label) ?? "");
9896
10387
  const [isDescriptionModalOpen, setIsDescriptionModalOpen] = useState21(false);
@@ -9919,7 +10410,10 @@ function RelationshipDetailsPanel({
9919
10410
  setHasUnsavedChanges(true);
9920
10411
  setTimeout(() => {
9921
10412
  var _a;
9922
- (_a = propsEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "center" });
10413
+ (_a = propsEndRef.current) == null ? void 0 : _a.scrollIntoView({
10414
+ behavior: "smooth",
10415
+ block: "center"
10416
+ });
9923
10417
  }, 100);
9924
10418
  };
9925
10419
  const handleSave = async (keepOpen = false, overrides = {}) => {
@@ -9936,8 +10430,13 @@ function RelationshipDetailsPanel({
9936
10430
  }
9937
10431
  setIsSaving(true);
9938
10432
  try {
9939
- const extrasObj = toObjectFromCustomProps(currentCustomProps.filter((p) => !p.isEditing));
9940
- const processedSections = processDescriptionForSave(currentDescription, currentExistingSections);
10433
+ const extrasObj = toObjectFromCustomProps(
10434
+ currentCustomProps.filter((p) => !p.isEditing)
10435
+ );
10436
+ const processedSections = processDescriptionForSave(
10437
+ currentDescription,
10438
+ currentExistingSections
10439
+ );
9941
10440
  const dataToSave = {
9942
10441
  id: link.id,
9943
10442
  source: link.source,
@@ -9949,8 +10448,10 @@ function RelationshipDetailsPanel({
9949
10448
  isCurved: link.isCurved,
9950
10449
  curveOffset: link.curveOffset
9951
10450
  };
9952
- if (currentSourceLabel.trim()) dataToSave.source_label = currentSourceLabel.trim();
9953
- if (currentTargetLabel.trim()) dataToSave.target_label = currentTargetLabel.trim();
10451
+ if (currentSourceLabel.trim())
10452
+ dataToSave.source_label = currentSourceLabel.trim();
10453
+ if (currentTargetLabel.trim())
10454
+ dataToSave.target_label = currentTargetLabel.trim();
9954
10455
  await onSave(dataToSave, keepOpen);
9955
10456
  onDataUpdate(dataToSave);
9956
10457
  setHasUnsavedChanges(false);
@@ -10029,7 +10530,16 @@ function RelationshipDetailsPanel({
10029
10530
  onImageClick: handleImageClickFromText,
10030
10531
  onSaveDescription: handleSaveDescriptionInline
10031
10532
  }
10032
- ) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-teal-400/80 shadow-[0_0_18px_2px_rgba(45,212,191,0.55)]" }), /* @__PURE__ */ React20.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || "Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50", title: "Fechar" }, "\xD7")), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Nome da Rela\xE7\xE3o (Opcional)"), /* @__PURE__ */ React20.createElement(
10533
+ ) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement("div", { className: "h-[2px] bg-gradient-to-r from-teal-400/0 via-teal-400/70 to-teal-400/0" }), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pt-5 pb-3 flex items-start justify-between gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2 mb-1" }, /* @__PURE__ */ React20.createElement("span", { className: "inline-flex h-2.5 w-2.5 rounded-full bg-teal-400/80 shadow-[0_0_18px_2px_rgba(45,212,191,0.55)]" }), /* @__PURE__ */ React20.createElement("p", { className: "text-xs/relaxed text-slate-300" }, "Detalhes da Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement("h2", { className: "text-xl sm:text-2xl font-semibold tracking-tight" }, name || "Rela\xE7\xE3o")), /* @__PURE__ */ React20.createElement(
10534
+ "button",
10535
+ {
10536
+ onClick: onClose,
10537
+ disabled: isSaving,
10538
+ className: "w-9 h-9 flex-shrink-0 grid place-content-center rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-xl disabled:opacity-50",
10539
+ title: "Fechar"
10540
+ },
10541
+ "\xD7"
10542
+ )), /* @__PURE__ */ React20.createElement("div", { className: "px-6 pb-28 overflow-y-auto overscroll-contain space-y-4 max-h-[68vh] custom-scrollbar" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React20.createElement("label", { className: "text-xs text-slate-300" }, "Nome da Rela\xE7\xE3o"), /* @__PURE__ */ React20.createElement(
10033
10543
  "input",
10034
10544
  {
10035
10545
  type: "text",
@@ -10044,7 +10554,23 @@ function RelationshipDetailsPanel({
10044
10554
  ${!canEdit ? "opacity-50 cursor-not-allowed" : ""}
10045
10555
  `
10046
10556
  }
10047
- )), /* @__PURE__ */ React20.createElement("div", { className: "rounded-xl border border-white/8 bg-slate-800/30 p-3 space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "text-violet-400 flex-shrink-0" }, /* @__PURE__ */ React20.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }), /* @__PURE__ */ React20.createElement("line", { x1: "7", y1: "7", x2: "7.01", y2: "7" })), /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-medium text-violet-300/80 uppercase tracking-wider" }, "Labels de Agrupamento")), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-slate-400 leading-relaxed" }, "Labels agrupam conex\xF5es no menu de Conex\xF5es. Cada lado da conex\xE3o pode ter sua pr\xF3pria label."), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Source"), /* @__PURE__ */ React20.createElement(
10557
+ )), /* @__PURE__ */ React20.createElement("div", { className: "rounded-xl border border-white/8 bg-slate-800/30 p-3 space-y-3" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React20.createElement(
10558
+ "svg",
10559
+ {
10560
+ xmlns: "http://www.w3.org/2000/svg",
10561
+ width: "13",
10562
+ height: "13",
10563
+ viewBox: "0 0 24 24",
10564
+ fill: "none",
10565
+ stroke: "currentColor",
10566
+ strokeWidth: "2",
10567
+ strokeLinecap: "round",
10568
+ strokeLinejoin: "round",
10569
+ className: "text-violet-400 flex-shrink-0"
10570
+ },
10571
+ /* @__PURE__ */ React20.createElement("path", { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }),
10572
+ /* @__PURE__ */ React20.createElement("line", { x1: "7", y1: "7", x2: "7.01", y2: "7" })
10573
+ ), /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-medium text-violet-300/80 uppercase tracking-wider" }, "Labels de Agrupamento")), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-slate-400 leading-relaxed" }, "Labels agrupam conex\xF5es no menu de Conex\xF5es. Cada lado da conex\xE3o pode ter sua pr\xF3pria label."), /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React20.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React20.createElement("label", { className: "text-[11px] text-slate-400" }, "Label do Source"), /* @__PURE__ */ React20.createElement(
10048
10574
  "input",
10049
10575
  {
10050
10576
  type: "text",
@@ -10111,7 +10637,16 @@ function RelationshipDetailsPanel({
10111
10637
  className: "absolute inset-0 flex items-center justify-center text-xs text-slate-500 cursor-text"
10112
10638
  },
10113
10639
  "Adicionar descri\xE7\xE3o..."
10114
- ))), /* @__PURE__ */ React20.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React20.createElement("button", { type: "button", onClick: handleAddProp, className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors" }, /* @__PURE__ */ React20.createElement(FiPlus9, { size: 14 }), " Adicionar")), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React20.createElement(
10640
+ ))), /* @__PURE__ */ React20.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React20.createElement("h3", { className: "text-sm font-medium" }, "Propriedades Adicionais"), canEdit && /* @__PURE__ */ React20.createElement(
10641
+ "button",
10642
+ {
10643
+ type: "button",
10644
+ onClick: handleAddProp,
10645
+ className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md bg-slate-800/70 hover:bg-slate-700/70 border border-white/10 transition-colors"
10646
+ },
10647
+ /* @__PURE__ */ React20.createElement(FiPlus9, { size: 14 }),
10648
+ " Adicionar"
10649
+ )), /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col gap-3" }, customProps.map((prop, idx) => /* @__PURE__ */ React20.createElement(
10115
10650
  CustomPropertyDisplay,
10116
10651
  {
10117
10652
  key: prop.id,
@@ -10119,11 +10654,21 @@ function RelationshipDetailsPanel({
10119
10654
  onUpdate: (updatedProp) => handleUpdateProp(idx, updatedProp),
10120
10655
  onRemove: () => handleRemoveProp(idx),
10121
10656
  onOpenImageViewer,
10122
- unavailableTypes: currentUsedTypes.filter((t) => t !== prop.type),
10657
+ unavailableTypes: currentUsedTypes.filter(
10658
+ (t) => t !== prop.type
10659
+ ),
10123
10660
  onUploadFile,
10124
10661
  disabled: !canEdit
10125
10662
  }
10126
- )), /* @__PURE__ */ React20.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React20.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React20.createElement("button", { onClick: onClose, disabled: isSaving, className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50" }, canEdit ? "Cancelar" : "Fechar"), canEdit && /* @__PURE__ */ React20.createElement(
10663
+ )), /* @__PURE__ */ React20.createElement("div", { ref: propsEndRef })))), /* @__PURE__ */ React20.createElement("div", { className: "sticky bottom-0 z-10 bg-gradient-to-t from-slate-950/80 via-slate-950/50 to-transparent px-6 py-4 border-t border-white/10 flex justify-end gap-3" }, /* @__PURE__ */ React20.createElement(
10664
+ "button",
10665
+ {
10666
+ onClick: onClose,
10667
+ disabled: isSaving,
10668
+ className: "px-4 py-2 rounded-lg border border-white/15 bg-transparent hover:bg-white/5 transition-colors text-sm disabled:opacity-50"
10669
+ },
10670
+ canEdit ? "Cancelar" : "Fechar"
10671
+ ), canEdit && /* @__PURE__ */ React20.createElement(
10127
10672
  "button",
10128
10673
  {
10129
10674
  onClick: () => handleSave(false),
@@ -15644,7 +16189,8 @@ function XViewScene({
15644
16189
  onUploadFile: upload_file_action,
15645
16190
  userRole: userPermissionRole,
15646
16191
  currentDatasetName: detailsNodeDatasetInfo == null ? void 0 : detailsNodeDatasetInfo.datasetName,
15647
- viewMembers
16192
+ viewMembers,
16193
+ currentUser: session == null ? void 0 : session.user
15648
16194
  }
15649
16195
  ),
15650
16196
  detailsNode && !detailsNode.is_quest && /* @__PURE__ */ React26.createElement(