@ltm-blueverse/alpha-hub-studio 0.7.0 → 0.7.2
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.
- package/README.md +1 -20
- package/package.json +6 -17
- package/static/assets/DecisionWorkspace-BbxYoPCv.js +1 -0
- package/static/assets/{DiffMergeWorkspace-C8yIdDC7.js → DiffMergeWorkspace-I9BcvT3J.js} +1 -1
- package/static/assets/EntityResolutionTab-DZME6ngq.js +6 -0
- package/static/assets/{GraphInspectorPanel-Bbrbhd03.js → GraphInspectorPanel-ZkQtr_Oa.js} +1 -1
- package/static/assets/{GraphWorkspace-AxTFEhNP.js → GraphWorkspace-DjKI1vje.js} +37 -37
- package/static/assets/{ImportExportWorkspace-BK3TofDv.js → ImportExportWorkspace-FesluaxV.js} +2 -2
- package/static/assets/KGOverviewTab-CIuFOyUa.js +1 -0
- package/static/assets/LineageDiagram-BlTkwTG_.js +27 -0
- package/static/assets/{MarkdownContentViewer-Chx4ysCK.js → MarkdownContentViewer-B2I-lKUf.js} +4 -4
- package/static/assets/{MemoryWorkspace-CIjaTN_S.js → MemoryWorkspace-CbGHQGJQ.js} +2 -2
- package/static/assets/{OntologySummaryTab-NJ3ZrkoJ.js → OntologySummaryTab-Q3rXi9jh.js} +1 -1
- package/static/assets/{ReasoningWorkspace-B127Rd-S.js → ReasoningWorkspace-DSYffkef.js} +2 -2
- package/static/assets/RegistryTab-C9IfTx8j.js +11 -0
- package/static/assets/{SparqlWorkspace-RwPj2YK7.js → SparqlWorkspace-BHAlhIXU.js} +3 -3
- package/static/assets/{TimelinePanel-DmtiXgmN.js → TimelinePanel-D50aWGS7.js} +1 -1
- package/static/assets/{VocabularyWorkspace-YF9waL5N.js → VocabularyWorkspace-BUFmkjyq.js} +6 -6
- package/static/assets/{book-open-BqEIxx1e.js → book-open-CEYwt1ql.js} +1 -1
- package/static/assets/{chevron-right-CiEuNwKq.js → chevron-right-BnjhfQ0S.js} +1 -1
- package/static/assets/{circle-check-BToWKwbO.js → circle-check-CzC458Im.js} +1 -1
- package/static/assets/{copy-BfQXGhHP.js → copy-D1MBJLmb.js} +1 -1
- package/static/assets/{download-gQOgYz3q.js → download-BiH8WZKH.js} +1 -1
- package/static/assets/{external-link-DqNu6T-f.js → external-link-BRF01S2q.js} +1 -1
- package/static/assets/{file-text-Bbz-r0FQ.js → file-text-bY52r7Yt.js} +1 -1
- package/static/assets/{git-branch-B8yDcUSY.js → git-branch-apSLSDgQ.js} +1 -1
- package/static/assets/graphTheme-DCTRN8Qm.js +6 -0
- package/static/assets/{index-Bt8w1Tz_.css → index-3PtcB4_T.css} +1 -1
- package/static/assets/{index-DHWWI-uw.js → index-CVYHt6Z6.js} +81 -81
- package/static/assets/{index-Dli_3Iwd.js → index-D0ErQ1c2.js} +1 -1
- package/static/assets/{index-DtC_GayB.js → index-D1_G_our.js} +1 -1
- package/static/assets/index-DPG7Yem6.js +127 -0
- package/static/assets/{info-vaffNQOD.js → info-Bxj0ofiy.js} +1 -1
- package/static/assets/{layers-Cct6D_wK.js → layers-CXZNgF0V.js} +1 -1
- package/static/assets/{loader-circle-C8NUmtFx.js → loader-circle-CmyLCPAg.js} +1 -1
- package/static/assets/{neighborhoodPanelPlugin-w1yJlm0A.js → neighborhoodPanelPlugin-gLy7GAga.js} +1 -1
- package/static/assets/{pencil-DYlEC6ri.js → pencil-COLtDS12.js} +1 -1
- package/static/assets/{play-G1gyOk2a.js → play-CG0LOI9D.js} +1 -1
- package/static/assets/{queries-CYtdSB4H.js → queries-AYIcORqv.js} +1 -1
- package/static/assets/{refresh-cw-CL9OXZ89.js → refresh-cw-B1c5rNMc.js} +1 -1
- package/static/assets/{registryStore-MVt_NgVV.js → registryStore-BPopBcrC.js} +1 -1
- package/static/assets/{style-D8TqSrGs.js → style-DGS084C0.js} +1 -1
- package/static/assets/temporalOverlayPlugin-DzF7xO4p.js +1 -0
- package/static/assets/{trash-2-DiZNV6Gj.js → trash-2-CLBVEYNO.js} +1 -1
- package/static/assets/{x-DpqMYq96.js → x-lyk2jiOu.js} +1 -1
- package/static/index.html +3 -3
- package/static/assets/DecisionWorkspace-DG6zPNls.js +0 -1
- package/static/assets/EntityResolutionTab-RBysMLhB.js +0 -6
- package/static/assets/KGOverviewTab-D9EWKL_n.js +0 -1
- package/static/assets/LineageDiagram-XxBVa1Ij.js +0 -27
- package/static/assets/RegistryTab-BE2-yKLC.js +0 -11
- package/static/assets/graphTheme-DNKLxzKZ.js +0 -6
- package/static/assets/index-MVDNL3vw.js +0 -127
- package/static/assets/temporalOverlayPlugin-CRhLa1FU.js +0 -1
package/static/assets/{ImportExportWorkspace-BK3TofDv.js → ImportExportWorkspace-FesluaxV.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{b as A,j as e,C as H}from"./index-
|
|
1
|
+
import{b as A,j as e,C as H}from"./index-CVYHt6Z6.js";import{a as c}from"./query-vendor-BqVbYexz.js";import{u as U,C as l}from"./index-D0ErQ1c2.js";import{l as E}from"./registryStore-BPopBcrC.js";import{F as I}from"./file-text-bY52r7Yt.js";import{L as N}from"./loader-circle-CmyLCPAg.js";import{D as f}from"./download-BiH8WZKH.js";import{C as L}from"./circle-check-CzC458Im.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const V=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],g=A("file-braces",V);function P(){const[t,m]=c.useState(null),[u,d]=c.useState(!1),[a,S]=c.useState("json"),[x,b]=c.useState(!1),[j,h]=c.useState([]);function n(o,p){const s=Date.now();h(r=>[...r,{id:s,type:o,text:p}]),setTimeout(()=>h(r=>r.filter(i=>i.id!==s)),5e3)}const w=c.useCallback(o=>{o.length>0&&m(o[0])},[]),{getRootProps:y,getInputProps:D,isDragActive:k}=U({onDrop:w,accept:{"application/json":[".json"],"text/csv":[".csv"]},maxFiles:1});async function W(){if(t){d(!0);try{const o=new FormData;o.append("file",t);const p=await fetch("/api/import",{method:"POST",body:o});if(!p.ok){const r=await p.json();throw new Error(r.detail||"Import failed")}const s=await p.json();n("success",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges`),E("import",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges from ${t.name}`,{file:t.name}),m(null)}catch(o){n("error",o instanceof Error?o.message:"Import failed")}finally{d(!1)}}}async function v(){b(!0);try{const o=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:a})});if(!o.ok){const i=await o.json();throw new Error(i.detail||"Export failed")}const p=await o.blob(),s=URL.createObjectURL(p),r=document.createElement("a");r.href=s,r.download=`alphasemantichub_export.${a}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s),n("success",`Export ready — alphasemantichub_export.${a}`),E("export",`Exported graph as ${a.toUpperCase()}`,{format:a})}catch(o){n("error",o instanceof Error?o.message:"Export failed")}finally{b(!1)}}return e.jsxDEV("div",{className:"ws-page ws-scroll",children:[e.jsxDEV("div",{className:"ws-padded",style:{display:"flex",flexDirection:"column",gap:24,maxWidth:980,margin:"0 auto",width:"100%"},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:14},children:[e.jsxDEV("div",{style:{width:42,height:42,borderRadius:13,background:"var(--ws-accent-soft)",border:"1px solid var(--ws-border-strong)",display:"grid",placeItems:"center",color:"var(--ws-accent)",flexShrink:0},children:e.jsxDEV(l,{size:20},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:127,columnNumber:13},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:116,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("h2",{className:"ws-title",style:{fontSize:18},children:"Import & Export"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:130,columnNumber:13},this),e.jsxDEV("div",{className:"ws-body",style:{marginTop:2},children:"Ingest new graph datasets or extract the current knowledge base."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:133,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:129,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:111,columnNumber:9},this),e.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:18},children:[e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(l,{size:16,color:"var(--ws-accent)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:156,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Import Entities & Relations"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:157,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:151,columnNumber:13},this),e.jsxDEV("div",{...y(),style:{border:`2px dashed ${k?"var(--ws-accent)":"var(--ws-border)"}`,borderRadius:"var(--ws-radius)",background:k?"var(--ws-accent-soft)":"rgba(0,0,0,0.18)",padding:32,textAlign:"center",cursor:"pointer",transition:"all 200ms ease",display:"flex",flexDirection:"column",alignItems:"center",gap:10},children:[e.jsxDEV("input",{...D()},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:178,columnNumber:15},this),t?e.jsxDEV(e.Fragment,{children:[t.name.endsWith(".json")?e.jsxDEV(g,{size:40,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:50},this):e.jsxDEV(I,{size:40,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:91},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700},children:t.name},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:181,columnNumber:19},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:11},children:[(t.size/1024).toFixed(1)," KB — click to replace"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:185,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:179,columnNumber:23},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:36,color:"var(--ws-accent)",style:{opacity:.7}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:189,columnNumber:19},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:600},children:"Drag & drop or click to browse"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:192,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".json"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:196,columnNumber:19},this),e.jsxDEV("span",{style:{color:"var(--ws-text-dim)",fontSize:11},children:"or"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:197,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".csv"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:201,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:188,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:165,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn ws-btn--primary",onClick:W,disabled:!t||u,style:{width:"100%",justifyContent:"center"},children:u?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:32},this),"Uploading…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:91},this),"Upload to Graph"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:205,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:145,columnNumber:11},this),e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(f,{size:16,color:"var(--ws-purple)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:225,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Export Graph Snapshot"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:226,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:220,columnNumber:13},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:"ws-label",children:"Format"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:234,columnNumber:15},this),e.jsxDEV("div",{style:{display:"flex",gap:8},children:["json","csv"].map(o=>e.jsxDEV("button",{className:`ws-btn ${a===o?"ws-btn--primary":"ws-btn--ghost"}`,style:{flex:1,justifyContent:"center",textTransform:"uppercase",fontSize:12},onClick:()=>S(o),children:[o==="json"?e.jsxDEV(g,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:39},this):e.jsxDEV(I,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:64},this),o]},o,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:239,columnNumber:56},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:235,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:233,columnNumber:13},this),e.jsxDEV("div",{style:{flex:1,padding:"14px 16px",borderRadius:"var(--ws-radius-sm)",background:"rgba(0,0,0,0.22)",border:"1px solid var(--ws-border)"},children:[e.jsxDEV("div",{style:{color:"var(--ws-text-muted)",fontWeight:700,fontSize:12,marginBottom:6},children:"What's included"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:258,columnNumber:15},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:a==="json"?"Full graph snapshot: all node properties, edge weights, entity metadata and semantic groups in a standardized JSON payload.":"Flattened CSV: nodes and edges as rows. Complex nested properties are stringified. Best for spreadsheet analysis."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:264,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:251,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn",onClick:v,disabled:x,style:{width:"100%",justifyContent:"center",background:"var(--ws-purple-soft)",borderColor:"rgba(192,132,252,0.3)",color:"#d8b4fe"},children:x?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:32},this),"Preparing…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(f,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:91},this),"Download Export"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:271,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:214,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:139,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:102,columnNumber:7},this),e.jsxDEV("div",{style:{position:"fixed",bottom:28,right:28,display:"flex",flexDirection:"column",gap:10,zIndex:1e3},children:j.map(o=>e.jsxDEV("div",{className:"ws-animate-in",style:{display:"flex",alignItems:"center",gap:10,padding:"13px 18px",borderRadius:"var(--ws-radius-sm)",background:o.type==="success"?"rgba(16,36,22,0.96)":"rgba(40,10,10,0.96)",border:`1px solid ${o.type==="success"?"rgba(76,195,138,0.4)":"rgba(255,123,114,0.4)"}`,boxShadow:"0 8px 24px rgba(0,0,0,0.5)",backdropFilter:"blur(12px)"},children:[o.type==="success"?e.jsxDEV(L,{size:16,color:"#4cc38a"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:39},this):e.jsxDEV(H,{size:16,color:"#ff7b72"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:84},this),e.jsxDEV("span",{style:{color:"var(--ws-text)",fontSize:13,fontWeight:500},children:o.text},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:306,columnNumber:13},this)]},o.id,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:294,columnNumber:28},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:285,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:101,columnNumber:10},this)}export{P as ImportExportWorkspace};
|
|
6
|
+
*/const V=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],g=A("file-braces",V);function P(){const[t,m]=c.useState(null),[u,d]=c.useState(!1),[a,S]=c.useState("json"),[x,b]=c.useState(!1),[j,h]=c.useState([]);function n(o,p){const s=Date.now();h(r=>[...r,{id:s,type:o,text:p}]),setTimeout(()=>h(r=>r.filter(i=>i.id!==s)),5e3)}const w=c.useCallback(o=>{o.length>0&&m(o[0])},[]),{getRootProps:y,getInputProps:D,isDragActive:k}=U({onDrop:w,accept:{"application/json":[".json"],"text/csv":[".csv"]},maxFiles:1});async function W(){if(t){d(!0);try{const o=new FormData;o.append("file",t);const p=await fetch("/api/import",{method:"POST",body:o});if(!p.ok){const r=await p.json();throw new Error(r.detail||"Import failed")}const s=await p.json();n("success",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges`),E("import",`Imported ${s.nodes_imported} nodes · ${s.edges_imported} edges from ${t.name}`,{file:t.name}),m(null)}catch(o){n("error",o instanceof Error?o.message:"Import failed")}finally{d(!1)}}}async function v(){b(!0);try{const o=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:a})});if(!o.ok){const i=await o.json();throw new Error(i.detail||"Export failed")}const p=await o.blob(),s=URL.createObjectURL(p),r=document.createElement("a");r.href=s,r.download=`alphasemantichub_export.${a}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s),n("success",`Export ready — alphasemantichub_export.${a}`),E("export",`Exported graph as ${a.toUpperCase()}`,{format:a})}catch(o){n("error",o instanceof Error?o.message:"Export failed")}finally{b(!1)}}return e.jsxDEV("div",{className:"ws-page ws-scroll",children:[e.jsxDEV("div",{className:"ws-padded",style:{display:"flex",flexDirection:"column",gap:24,maxWidth:980,margin:"0 auto",width:"100%"},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:14},children:[e.jsxDEV("div",{style:{width:42,height:42,borderRadius:13,background:"var(--ws-accent-soft)",border:"1px solid var(--ws-border-strong)",display:"grid",placeItems:"center",color:"var(--ws-accent)",flexShrink:0},children:e.jsxDEV(l,{size:20},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:127,columnNumber:13},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:116,columnNumber:11},this),e.jsxDEV("div",{children:[e.jsxDEV("h2",{className:"ws-title",style:{fontSize:18},children:"Import & Export"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:130,columnNumber:13},this),e.jsxDEV("div",{className:"ws-body",style:{marginTop:2},children:"Ingest new graph datasets or extract the current knowledge base."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:133,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:129,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:111,columnNumber:9},this),e.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:18},children:[e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(l,{size:16,color:"var(--ws-accent)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:156,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Import Entities & Relations"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:157,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:151,columnNumber:13},this),e.jsxDEV("div",{...y(),style:{border:`2px dashed ${k?"var(--ws-accent)":"var(--ws-border)"}`,borderRadius:"var(--ws-radius)",background:k?"var(--ws-accent-soft)":"rgba(0,0,0,0.18)",padding:32,textAlign:"center",cursor:"pointer",transition:"all 200ms ease",display:"flex",flexDirection:"column",alignItems:"center",gap:10},children:[e.jsxDEV("input",{...D()},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:178,columnNumber:15},this),t?e.jsxDEV(e.Fragment,{children:[t.name.endsWith(".json")?e.jsxDEV(g,{size:40,color:"#1f9d5f"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:50},this):e.jsxDEV(I,{size:40,color:"#1f9d5f"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:180,columnNumber:91},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700},children:t.name},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:181,columnNumber:19},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:11},children:[(t.size/1024).toFixed(1)," KB — click to replace"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:185,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:179,columnNumber:23},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:36,color:"var(--ws-accent)",style:{opacity:.7}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:189,columnNumber:19},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:600},children:"Drag & drop or click to browse"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:192,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".json"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:196,columnNumber:19},this),e.jsxDEV("span",{style:{color:"var(--ws-text-dim)",fontSize:11},children:"or"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:197,columnNumber:19},this),e.jsxDEV("div",{className:"ws-pill ws-pill--mono",children:".csv"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:201,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:188,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:165,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn ws-btn--primary",onClick:W,disabled:!t||u,style:{width:"100%",justifyContent:"center"},children:u?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:32},this),"Uploading…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(l,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:91},this),"Upload to Graph"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:209,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:205,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:145,columnNumber:11},this),e.jsxDEV("div",{className:"ws-card",style:{padding:24,display:"flex",flexDirection:"column",gap:18},children:[e.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsxDEV(f,{size:16,color:"var(--ws-purple)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:225,columnNumber:15},this),e.jsxDEV("div",{style:{color:"var(--ws-text)",fontWeight:700,fontSize:14},children:"Export Graph Snapshot"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:226,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:220,columnNumber:13},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:"ws-label",children:"Format"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:234,columnNumber:15},this),e.jsxDEV("div",{style:{display:"flex",gap:8},children:["json","csv"].map(o=>e.jsxDEV("button",{className:`ws-btn ${a===o?"ws-btn--primary":"ws-btn--ghost"}`,style:{flex:1,justifyContent:"center",textTransform:"uppercase",fontSize:12},onClick:()=>S(o),children:[o==="json"?e.jsxDEV(g,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:39},this):e.jsxDEV(I,{size:14},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:245,columnNumber:64},this),o]},o,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:239,columnNumber:56},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:235,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:233,columnNumber:13},this),e.jsxDEV("div",{style:{flex:1,padding:"14px 16px",borderRadius:"var(--ws-radius-sm)",background:"rgba(0,0,0,0.22)",border:"1px solid var(--ws-border)"},children:[e.jsxDEV("div",{style:{color:"var(--ws-text-muted)",fontWeight:700,fontSize:12,marginBottom:6},children:"What's included"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:258,columnNumber:15},this),e.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:a==="json"?"Full graph snapshot: all node properties, edge weights, entity metadata and semantic groups in a standardized JSON payload.":"Flattened CSV: nodes and edges as rows. Complex nested properties are stringified. Best for spreadsheet analysis."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:264,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:251,columnNumber:13},this),e.jsxDEV("button",{className:"ws-btn",onClick:v,disabled:x,style:{width:"100%",justifyContent:"center",background:"var(--ws-purple-soft)",borderColor:"rgba(192,132,252,0.3)",color:"#9333ea"},children:x?e.jsxDEV(e.Fragment,{children:[e.jsxDEV(N,{size:15,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:32},this),"Preparing…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:30},this):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(f,{size:15},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:91},this),"Download Export"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:278,columnNumber:89},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:271,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:214,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:139,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:102,columnNumber:7},this),e.jsxDEV("div",{style:{position:"fixed",bottom:28,right:28,display:"flex",flexDirection:"column",gap:10,zIndex:1e3},children:j.map(o=>e.jsxDEV("div",{className:"ws-animate-in",style:{display:"flex",alignItems:"center",gap:10,padding:"13px 18px",borderRadius:"var(--ws-radius-sm)",background:(o.type==="success","rgba(255, 255, 255,0.96)"),border:`1px solid ${o.type==="success"?"rgba(76,195,138,0.4)":"rgba(255,123,114,0.4)"}`,boxShadow:"0 8px 24px rgba(0,0,0,0.5)",backdropFilter:"blur(12px)"},children:[o.type==="success"?e.jsxDEV(L,{size:16,color:"#1f9d5f"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:39},this):e.jsxDEV(H,{size:16,color:"#ec2315"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:305,columnNumber:84},this),e.jsxDEV("span",{style:{color:"var(--ws-text)",fontSize:13,fontWeight:500},children:o.text},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:306,columnNumber:13},this)]},o.id,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:294,columnNumber:28},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:285,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ImportExportWorkspace/ImportExportWorkspace.tsx",lineNumber:101,columnNumber:10},this)}export{P as ImportExportWorkspace};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,N as G,c as K}from"./index-CVYHt6Z6.js";import{a as j}from"./query-vendor-BqVbYexz.js";import{L as U}from"./loader-circle-CmyLCPAg.js";import{R as V}from"./refresh-cw-B1c5rNMc.js";function O(f){const e=K.c(28);if(e[0]!=="be5c7174da0f83a08407a4283cb6dd28bd81461396bd5af943e94fd41581bf0d"){for(let b=0;b<28;b+=1)e[b]=Symbol.for("react.memo_cache_sentinel");e[0]="be5c7174da0f83a08407a4283cb6dd28bd81461396bd5af943e94fd41581bf0d"}const{label:i,count:l,total:p,color:c}=f;let N;e[1]!==l||e[2]!==p?(N=p>0?Math.round(l/p*100):0,e[1]=l,e[2]=p,e[3]=N):N=e[3];const y=N;let A,S;e[4]===Symbol.for("react.memo_cache_sentinel")?(A={display:"flex",alignItems:"center",gap:10,padding:"5px 0"},S={width:120,flexShrink:0,color:"#602b34",fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e[4]=A,e[5]=S):(A=e[4],S=e[5]);let v;e[6]!==i?(v=s.jsxDEV("div",{style:S,title:i,children:i},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:77,columnNumber:10},this),e[6]=i,e[7]=v):v=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={flex:1,height:6,borderRadius:999,background:"rgba(28, 20, 24,0.06)",overflow:"hidden"},e[8]=x):x=e[8];const k=`${y}%`;let m;e[9]!==c||e[10]!==k?(m=s.jsxDEV("div",{style:x,children:s.jsxDEV("div",{style:{width:k,height:"100%",borderRadius:999,background:c,transition:"width 400ms ease"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:99,columnNumber:26},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:99,columnNumber:10},this),e[9]=c,e[10]=k,e[11]=m):m=e[11];let w,H;e[12]===Symbol.for("react.memo_cache_sentinel")?(w={width:52,textAlign:"right",flexShrink:0,display:"flex",gap:6,justifyContent:"flex-end"},H={color:"#b08b93",fontSize:11},e[12]=w,e[13]=H):(w=e[12],H=e[13]);let a;e[14]!==l?(a=l.toLocaleString(),e[14]=l,e[15]=a):a=e[15];let o;e[16]!==a?(o=s.jsxDEV("span",{style:H,children:a},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:143,columnNumber:11},this),e[16]=a,e[17]=o):o=e[17];let r;e[18]===Symbol.for("react.memo_cache_sentinel")?(r={color:"#9c7a82",fontSize:11},e[18]=r):r=e[18];let t;e[19]!==y?(t=s.jsxDEV("span",{style:r,children:[y,"%"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:161,columnNumber:11},this),e[19]=y,e[20]=t):t=e[20];let d;e[21]!==o||e[22]!==t?(d=s.jsxDEV("div",{style:w,children:[o,t]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:169,columnNumber:11},this),e[21]=o,e[22]=t,e[23]=d):d=e[23];let u;return e[24]!==d||e[25]!==v||e[26]!==m?(u=s.jsxDEV("div",{style:A,children:[v,m,d]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:178,columnNumber:11},this),e[24]=d,e[25]=v,e[26]=m,e[27]=u):u=e[27],u}const W=["#3e79f2","#149287","#2f9f61","#555fd6","#6d28d9","#b65473","#8a5a10","#ff2d4b","#e86a2e"],L=["#1f9d5f","#d9455e","#7c3aed","#e86a2e","#ec2315","#ff2d4b","#ff2d4b","#6d28d9"];function M(f,e){const i={};for(const l of f){const p=String(l[e]??"unknown");i[p]=(i[p]??0)+1}return i}function z(){const[f,e]=j.useState(null),[i,l]=j.useState(!1),[p,c]=j.useState(""),[N,y]=j.useState([]),[A,S]=j.useState({}),v=j.useCallback(async()=>{l(!0),c("");try{const[a,o]=await Promise.all([fetch("/api/graph/stats"),fetch("/api/graph/nodes?limit=500")]);if(!a.ok)throw new Error(`Stats fetch failed (${a.status})`);if(!o.ok)throw new Error(`Nodes fetch failed (${o.status})`);const r=await a.json();e(r),a.status===207&&c(r.message||"Warning: Partial success loading stats.");const t=await o.json(),d=t.nodes??[];if(S(M(d,"type")),o.status===207){const b=t.message||"Warning: Partial success loading nodes.";c(D=>D?`${D} ${b}`:b)}const u=await fetch("/api/graph/edges?limit=2000");if(u.ok){const D=(await u.json()).edges??[],h={};for(const n of D)h[n.source]=(h[n.source]??0)+1,h[n.target]=(h[n.target]??0)+1;const E=d.map(n=>({node:n,neighborCount:h[n.id]??0})).sort((n,T)=>T.neighborCount-n.neighborCount).slice(0,10);y(E)}}catch(a){c(a instanceof Error?a.message:"Failed to load graph overview. Ensure the server is running.")}finally{l(!1)}},[]);j.useEffect(()=>{let a=!1;async function o(){a||(l(!0),c(""));try{const[r,t]=await Promise.all([fetch("/api/graph/stats"),fetch("/api/graph/nodes?limit=500")]);if(!r.ok)throw new Error(`Stats fetch failed (${r.status})`);if(!t.ok)throw new Error(`Nodes fetch failed (${t.status})`);const d=await r.json();a||(e(d),r.status===207&&c(d.message||"Warning: Partial success loading stats."));const u=await t.json(),b=u.nodes??[];if(!a&&(S(M(b,"type")),t.status===207)){const h=u.message||"Warning: Partial success loading nodes.";c(E=>E?`${E} ${h}`:h)}const D=await fetch("/api/graph/edges?limit=2000");if(D.ok){const E=(await D.json()).edges??[],n={};for(const g of E)n[g.source]=(n[g.source]??0)+1,n[g.target]=(n[g.target]??0)+1;const T=b.map(g=>({node:g,neighborCount:n[g.id]??0})).sort((g,I)=>I.neighborCount-g.neighborCount).slice(0,10);a||y(T)}}catch(r){a||c(r instanceof Error?r.message:"Failed to load graph overview. Ensure the server is running.")}finally{a||l(!1)}}return o(),()=>{a=!0}},[]);const x=Object.entries(A).sort((a,o)=>o[1]-a[1]),k=f?.edge_types?Object.entries(f.edge_types).sort((a,o)=>o[1]-a[1]):[],m=f?.node_count??0,w=f?.edge_count??0,H=[{label:"Nodes",value:m.toLocaleString(),color:"var(--ws-accent)",sub:`${x.length} types`},{label:"Edges",value:w.toLocaleString(),color:"var(--ws-green)",sub:`${k.length} rel. types`},{label:"Density",value:m>1?(w/(m*(m-1))*100).toFixed(3)+"%":"—",color:"var(--ws-purple)",sub:"graph density"}];return s.jsxDEV("div",{className:"ws-page",children:[p?s.jsxDEV("div",{style:{margin:"16px 22px 0 22px",padding:12,borderRadius:14,color:"#e98498",background:"rgba(255,157,175,0.1)",border:"1px solid rgba(255,157,175,0.18)"},children:p},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:335,columnNumber:16},this):null,s.jsxDEV("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 22px",borderBottom:"1px solid var(--ws-border)",flexShrink:0},children:[s.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:10},children:[s.jsxDEV("div",{style:{width:32,height:32,borderRadius:9,background:"var(--ws-accent-soft)",border:"1px solid var(--ws-border-strong)",display:"grid",placeItems:"center",color:"var(--ws-accent)"},children:s.jsxDEV(G,{size:16},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:370,columnNumber:13},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:360,columnNumber:11},this),s.jsxDEV("div",{children:[s.jsxDEV("div",{style:{color:"var(--ws-text)",fontSize:15,fontWeight:700,lineHeight:1},children:"KG Overview"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:373,columnNumber:13},this),s.jsxDEV("div",{className:"ws-body",style:{fontSize:11,marginTop:2},children:"Node/edge counts, type distributions, and top connected nodes"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:379,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:372,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:355,columnNumber:9},this),s.jsxDEV("button",{className:"ws-btn ws-btn--ghost",onClick:()=>{v()},disabled:i,style:{padding:"6px 12px"},children:[i?s.jsxDEV(U,{size:13,className:"ws-spin"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:388,columnNumber:22},this):s.jsxDEV(V,{size:13},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:388,columnNumber:66},this),"Refresh"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:385,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:347,columnNumber:7},this),s.jsxDEV("div",{className:"ws-scroll",style:{flex:1,padding:"18px 22px",display:"flex",flexDirection:"column",gap:16},children:[s.jsxDEV("div",{className:"ws-stat-grid ws-stat-grid--3",children:H.map(({label:a,value:o,color:r,sub:t})=>s.jsxDEV("div",{className:"ws-stat-card",children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:6},children:a},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:410,columnNumber:15},this),s.jsxDEV("div",{className:"ws-stat-value",style:{color:r},children:i?"—":o},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:413,columnNumber:15},this),s.jsxDEV("div",{className:"ws-stat-label",children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:416,columnNumber:15},this)]},a,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:409,columnNumber:15},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:403,columnNumber:9},this),s.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:14},children:[s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px",gap:8,display:"flex",flexDirection:"column"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:4},children:"Node Type Breakdown"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:432,columnNumber:13},this),i?s.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[80,65,45,35,25].map((a,o)=>s.jsxDEV("div",{className:"ws-skeleton",style:{height:10,width:`${a}%`}},o,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:440,columnNumber:53},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:435,columnNumber:24},this):x.length===0?s.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:"No data — load the graph first."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:444,columnNumber:55},this):x.slice(0,8).map(([a,o],r)=>s.jsxDEV(O,{label:a,count:o,total:m||1,color:W[r%W.length]},a,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:446,columnNumber:110},this))]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:426,columnNumber:11},this),s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px",gap:8,display:"flex",flexDirection:"column"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:4},children:"Edge Type Breakdown"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:455,columnNumber:13},this),i?s.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[70,55,48,30,20].map((a,o)=>s.jsxDEV("div",{className:"ws-skeleton",style:{height:10,width:`${a}%`}},o,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:463,columnNumber:57},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:458,columnNumber:24},this):k.length===0?s.jsxDEV("div",{className:"ws-body",style:{fontSize:12},children:"Edge type breakdown requires the stats endpoint to return edge_types."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:467,columnNumber:55},this):k.slice(0,8).map(([a,o],r)=>s.jsxDEV(O,{label:a,count:o,total:w||1,color:L[r%L.length]},a,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:469,columnNumber:152},this))]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:449,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:421,columnNumber:9},this),N.length>0&&s.jsxDEV("div",{className:"ws-card",style:{padding:"16px 18px"},children:[s.jsxDEV("div",{className:"ws-eyebrow",style:{marginBottom:12},children:"Top Connected Nodes (by degree)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:477,columnNumber:13},this),s.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:8},children:N.map(({node:a,neighborCount:o},r)=>s.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",borderRadius:"var(--ws-radius-sm)",background:"rgba(0,0,0,0.18)",border:"1px solid var(--ws-border)"},children:[s.jsxDEV("div",{style:{color:"var(--ws-text-dim)",fontSize:11,fontWeight:700,minWidth:22},children:["#",r+1]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:497,columnNumber:19},this),s.jsxDEV("div",{style:{flex:1,minWidth:0},children:[s.jsxDEV("div",{style:{color:"var(--ws-text)",fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.content||a.id},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:507,columnNumber:21},this),s.jsxDEV("div",{className:"ws-eyebrow",style:{marginTop:2,fontSize:9},children:a.type},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:515,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:503,columnNumber:19},this),s.jsxDEV("span",{className:"ws-pill ws-pill--accent",style:{fontSize:10},children:o},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:520,columnNumber:19},this)]},a.id,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:488,columnNumber:23},this))},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:480,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:474,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:395,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/ManageWorkspace/KGOverviewTab.tsx",lineNumber:334,columnNumber:10},this)}export{z as KGOverviewTab};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{b as S,j as e}from"./index-CVYHt6Z6.js";import{a as t}from"./query-vendor-BqVbYexz.js";import{i as j,B as A,C as H}from"./style-DGS084C0.js";import"./index-C00aFykz.js";/**
|
|
2
|
+
* @license lucide-react v1.8.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const E=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],I=S("link-2",E),_=`
|
|
7
|
+
.react-flow { background: var(--ws-bg, #f9f7f7); }
|
|
8
|
+
.react-flow__node-group {
|
|
9
|
+
background: rgba(255,45,75,0.04);
|
|
10
|
+
border: 1px dashed rgba(255,45,75,0.18);
|
|
11
|
+
border-radius: 10px;
|
|
12
|
+
}
|
|
13
|
+
.react-flow__node-default {
|
|
14
|
+
background: rgba(255, 255, 255,0.92);
|
|
15
|
+
color: var(--ws-text, #2d1619);
|
|
16
|
+
border: 1px solid rgba(255,45,75,0.22);
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
padding: 10px 12px;
|
|
19
|
+
white-space: pre-wrap;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
|
22
|
+
}
|
|
23
|
+
.react-flow__controls { background: rgba(255, 255, 255,0.9); border: 1px solid rgba(255,45,75,0.18); border-radius: 10px; }
|
|
24
|
+
.react-flow__controls-button { background: transparent; border-color: rgba(255,45,75,0.15); color: var(--ws-text-muted, #8f6d75); }
|
|
25
|
+
.react-flow__controls-button:hover { background: rgba(255,45,75,0.1); color: var(--ws-text, #2d1619); }
|
|
26
|
+
`;function C(){const[w,d]=t.useState([]),[y,m]=t.useState([]),[l,N]=t.useState(""),[o,u]=t.useState(""),[g,i]=t.useState(""),b=async s=>{if(!o)return;const c=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(o)}&format=${s}`);if(!c.ok)return;const h=await c.blob(),r=window.URL.createObjectURL(h),n=document.createElement("a");n.href=r,n.download=`${o}_provenance.${s==="markdown"?"md":"json"}`,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)},[k,L]=t.useState(o);return o!==k&&(L(o),i(""),d([]),m([])),t.useEffect(()=>{let s=!1;if(!o)return;const c=[{id:"group_agent",type:"group",position:{x:50,y:50},style:{width:800,height:120}},{id:"group_activity",type:"group",position:{x:50,y:200},style:{width:800,height:120}},{id:"group_entity",type:"group",position:{x:50,y:350},style:{width:800,height:120}}];return(async()=>{i("");try{const r=await fetch("/api/provenance?node_id="+encodeURIComponent(o));if(!r.ok){const a=await r.text();throw new Error(`HTTP ${r.status}: API Route missing or failed. ${a.substring(0,100)}`)}const n=r.headers.get("content-type");if(!n||!n.includes("application/json"))throw new Error("Backend returned non-JSON response (likely an HTML fallback).");const p=await r.json();r.status===207&&i(p.message||"Warning: Partial success loading lineage.");const x={group_agent:0,group_activity:0,group_entity:0},D=p.nodes.map(a=>{const f=x[a.parent_id]||0;return x[a.parent_id]=f+1,{id:a.id,data:{label:a.label+`
|
|
27
|
+
(`+a.prov_type+")"},position:{x:50+f*180,y:30},parentId:a.parent_id,extent:"parent",type:"default"}}),v=p.edges.map(a=>({id:a.id,source:a.source,target:a.target,label:a.label,animated:!0,style:{stroke:"#ff2d4b"}}));s||(d([...c,...D]),m(v))}catch(r){i(r instanceof Error?r.message:"Failed to load lineage.")}})(),()=>{s=!0}},[o]),e.jsxDEV("div",{style:{width:"100%",height:"100%",position:"relative",background:"var(--ws-bg, #f9f7f7)"},children:[e.jsxDEV("style",{children:_},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:162,columnNumber:7},this),e.jsxDEV("div",{style:{position:"absolute",top:14,left:14,right:14,zIndex:10,display:"flex",gap:8,alignItems:"center",background:"rgba(255, 255, 255,0.88)",backdropFilter:"blur(14px)",padding:"8px 12px",borderRadius:12,border:"1px solid rgba(255,45,75,0.16)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)"},children:[e.jsxDEV("span",{className:"ws-eyebrow",style:{color:"var(--ws-accent, #ff2d4b)",marginRight:4},children:"PROV-O Lineage"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:181,columnNumber:9},this),e.jsxDEV("input",{className:"ws-input",type:"text",placeholder:"Enter Node ID…",value:l,onChange:s=>N(s.target.value),onKeyDown:s=>{s.key==="Enter"&&u(l)},style:{width:200,padding:"6px 10px",fontSize:12}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:185,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--primary",style:{padding:"6px 12px"},onClick:()=>u(l),children:"Trace"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:192,columnNumber:9},this),e.jsxDEV("div",{style:{flex:1}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:197,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--ghost",style:{padding:"6px 12px",fontSize:11},disabled:!o,onClick:()=>{b("json")},children:"Export JSON"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:200,columnNumber:9},this),e.jsxDEV("button",{className:"ws-btn ws-btn--ghost",style:{padding:"6px 12px",fontSize:11},disabled:!o,onClick:()=>{b("markdown")},children:"Export MD"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:206,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:165,columnNumber:7},this),g?e.jsxDEV("div",{style:{position:"absolute",top:60,left:14,right:14,zIndex:10,padding:12,borderRadius:14,color:"#e98498",background:"rgba(255,157,175,0.1)",border:"1px solid rgba(255,157,175,0.18)"},children:g},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:214,columnNumber:16},this):null,o?e.jsxDEV(j,{nodes:w,edges:y,fitView:!0,children:[e.jsxDEV(A,{color:"rgba(255,45,75,0.08)",gap:24},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:230,columnNumber:11},this),e.jsxDEV(H,{},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:231,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:229,columnNumber:19},this):e.jsxDEV("div",{className:"ws-empty",style:{height:"100%",paddingTop:72},children:[e.jsxDEV("div",{className:"ws-empty-icon",children:e.jsxDEV(I,{size:36,color:"var(--ws-accent)"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:236,columnNumber:42},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:236,columnNumber:11},this),e.jsxDEV("div",{className:"ws-empty-title",children:"PROV-O Lineage Viewer"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:237,columnNumber:11},this),e.jsxDEV("div",{className:"ws-empty-body",children:"Enter a Node ID in the toolbar above and click Trace to view its W3C PROV-O lineage diagram."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:238,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:232,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/LineageWorkspace/LineageDiagram.tsx",lineNumber:156,columnNumber:10},this)}export{C as LineageDiagram};
|
package/static/assets/{MarkdownContentViewer-Chx4ysCK.js → MarkdownContentViewer-B2I-lKUf.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Nn,c as so,j as B}from"./index-
|
|
1
|
+
import{b as Nn,c as so,j as B}from"./index-CVYHt6Z6.js";import{g as Pn,j as en,a as te}from"./query-vendor-BqVbYexz.js";import{G as Q,E as uo}from"./graphTheme-DCTRN8Qm.js";import{L as er}from"./loader-circle-CmyLCPAg.js";import{R as co}from"./refresh-cw-B1c5rNMc.js";import{C as po}from"./copy-D1MBJLmb.js";import{P as fo}from"./pencil-COLtDS12.js";import{X as ho}from"./x-lyk2jiOu.js";import{E as mo}from"./external-link-BRF01S2q.js";/**
|
|
2
2
|
* @license lucide-react v1.8.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -40,6 +40,6 @@ import{b as Nn,c as so,j as B}from"./index-DHWWI-uw.js";import{g as Pn,j as en,a
|
|
|
40
40
|
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
41
41
|
`,...a.current()});return/^[\t ]/.test(u)&&(u=Mt(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}Oi.peek=_c;function Oi(e){return e.value||""}function _c(){return"<"}Vi.peek=jc;function Vi(e,t,n,r){const i=Kn(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),o(),u}function jc(){return"!"}qi.peek=Hc;function qi(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=f,a(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Hc(){return"!"}Ui.peek=Oc;function Ui(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function Oc(){return"`"}function Wi(e,t){const n=Vn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$i.peek=Vc;function $i(e,t,n,r){const i=Kn(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(Wi(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),l(),n.stack=f,p}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),c()),u+=o.move(")"),l(),u}function Vc(e,t,n){return Wi(e,n)?"<":"["}Gi.peek=qc;function Gi(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=f,a(),i==="full"||!u||u!==p?c+=l.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function qc(){return"["}function Jn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Uc(e){const t=Jn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Wc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Xi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function $c(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?Wc(n):Jn(n);const l=e.ordered?o==="."?")":".":Uc(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Xi(n)===o&&f){let p=-1;for(;++p<e.children.length;){const d=e.children[p];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),u}function Gc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Xc(e,t,n,r){const i=Gc(n);let a=n.bulletCurrent||Jn(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),f);return c(),u;function f(p,d,m){return d?(m?"":" ".repeat(o))+p:(m?a:a+" ".repeat(o-a.length))+p}}function Qc(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const Yc=Yt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Kc(e,t,n,r){return(e.children.some(function(o){return Yc(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Jc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qi.peek=Zc;function Qi(e,t,n,r){const i=Jc(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const u=c.charCodeAt(0),f=Wt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Mt(u)+c.slice(1));const p=c.charCodeAt(c.length-1),d=Wt(r.after.charCodeAt(0),p,i);d.inside&&(c=c.slice(0,-1)+Mt(p));const m=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},l+c+m}function Zc(e,t,n){return n.options.strong||"*"}function ep(e,t,n,r){return n.safe(e.value,r)}function tp(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function np(e,t,n){const r=(Xi(n)+(n.options.ruleSpaces?" ":"")).repeat(tp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yi={blockquote:Ec,break:Ur,code:Fc,definition:zc,emphasis:Hi,hardBreak:Ur,heading:Bc,html:Oi,image:Vi,imageReference:qi,inlineCode:Ui,link:$i,linkReference:Gi,list:$c,listItem:Xc,paragraph:Qc,root:Kc,strong:Qi,text:ep,thematicBreak:np};function rp(){return{enter:{table:ip,tableData:Wr,tableHeader:Wr,tableRow:ap},exit:{codeText:lp,table:op,tableData:yn,tableHeader:yn,tableRow:yn}}}function ip(e){const t=e._align;g(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function op(e){this.exit(e),this.data.inTable=void 0}function ap(e){this.enter({type:"tableRow",children:[]},e)}function yn(e){this.exit(e)}function Wr(e){this.enter({type:"tableCell",children:[]},e)}function lp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sp));const n=this.stack[this.stack.length-1];g(n.type==="inlineCode"),n.value=t,this.exit(e)}function sp(e,t){return t==="|"?t:e}function up(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
42
42
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:c,tableRow:l}};function o(m,b,A,E){return u(f(m,A,E),m.align)}function l(m,b,A,E){const y=p(m,A,E),I=u([y]);return I.slice(0,I.indexOf(`
|
|
43
|
-
`))}function c(m,b,A,E){const y=A.enter("tableCell"),I=A.enter("phrasing"),T=A.containerPhrasing(m,{...E,before:a,after:a});return I(),y(),T}function u(m,b){return Cc(m,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(m,b,A){const E=m.children;let y=-1;const I=[],T=b.enter("table");for(;++y<E.length;)I[y]=p(E[y],b,A);return T(),I}function p(m,b,A){const E=m.children;let y=-1;const I=[],T=b.enter("tableRow");for(;++y<E.length;)I[y]=c(E[y],m,b,A);return T(),I}function d(m,b,A){let E=Yi.inlineCode(m,b,A);return A.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function cp(){return{exit:{taskListCheckValueChecked:$r,taskListCheckValueUnchecked:$r,paragraph:fp}}}function pp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hp}}}function $r(e){const t=this.stack[this.stack.length-2];g(t.type==="listItem"),t.checked=e.type==="taskListCheckValueChecked"}function fp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];g(n.type==="paragraph");const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=Yi.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+o}}function dp(){return[$u(),hc(),kc(),rp(),cp()]}function mp(e){return{extensions:[Gu(),dc(e),xc(),up(e),pp()]}}const gp={tokenize:Sp,partial:!0},Ki={tokenize:Cp,partial:!0},Ji={tokenize:vp,partial:!0},Zi={tokenize:Ep,partial:!0},kp={tokenize:Ap,partial:!0},eo={name:"wwwAutolink",tokenize:yp,previous:no},to={name:"protocolAutolink",tokenize:wp,previous:ro},Re={name:"emailAutolink",tokenize:bp,previous:io},ze={};function xp(){return{text:ze}}let We=s.digit0;for(;We<s.leftCurlyBrace;)ze[We]=Re,We++,We===s.colon?We=s.uppercaseA:We===s.leftSquareBracket&&(We=s.lowercaseA);ze[s.plusSign]=Re;ze[s.dash]=Re;ze[s.dot]=Re;ze[s.underscore]=Re;ze[s.uppercaseH]=[Re,to];ze[s.lowercaseH]=[Re,to];ze[s.uppercaseW]=[Re,eo];ze[s.lowercaseW]=[Re,eo];function bp(e,t,n){const r=this;let i,a;return o;function o(p){return!zn(p)||!io.call(r,r.previous)||Zn(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return zn(p)?(e.consume(p),l):p===s.atSign?(e.consume(p),c):n(p)}function c(p){return p===s.dot?e.check(kp,f,u)(p):p===s.dash||p===s.underscore||ce(p)?(a=!0,e.consume(p),c):f(p)}function u(p){return e.consume(p),i=!0,c}function f(p){return a&&i&&fe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function yp(e,t,n){const r=this;return i;function i(o){return o!==s.uppercaseW&&o!==s.lowercaseW||!no.call(r,r.previous)||Zn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gp,e.attempt(Ki,e.attempt(Ji,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function wp(e,t,n){const r=this;let i="",a=!1;return o;function o(p){return(p===s.uppercaseH||p===s.lowercaseH)&&ro.call(r,r.previous)&&!Zn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(fe(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),l;if(p===s.colon){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(p),c}return n(p)}function c(p){return p===s.slash?(e.consume(p),a?u:(a=!0,c)):n(p)}function u(p){return p===s.eof||Vt(p)||J(p)||Xe(p)||Gt(p)?n(p):e.attempt(Ki,e.attempt(Ji,f),n)(p)}function f(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Sp(e,t,n){let r=0;return i;function i(o){return(o===s.uppercaseW||o===s.lowercaseW)&&r<3?(r++,e.consume(o),i):o===s.dot&&r===3?(e.consume(o),a):n(o)}function a(o){return o===s.eof?n(o):t(o)}}function Cp(e,t,n){let r,i,a;return o;function o(u){return u===s.dot||u===s.underscore?e.check(Zi,c,l)(u):u===s.eof||J(u)||Xe(u)||u!==s.dash&&Gt(u)?c(u):(a=!0,e.consume(u),o)}function l(u){return u===s.underscore?r=!0:(i=r,r=void 0),e.consume(u),o}function c(u){return i||r||!a?n(u):t(u)}}function vp(e,t){let n=0,r=0;return i;function i(o){return o===s.leftParenthesis?(n++,e.consume(o),i):o===s.rightParenthesis&&r<n?a(o):o===s.exclamationMark||o===s.quotationMark||o===s.ampersand||o===s.apostrophe||o===s.rightParenthesis||o===s.asterisk||o===s.comma||o===s.dot||o===s.colon||o===s.semicolon||o===s.lessThan||o===s.questionMark||o===s.rightSquareBracket||o===s.underscore||o===s.tilde?e.check(Zi,t,a)(o):o===s.eof||J(o)||Xe(o)?t(o):(e.consume(o),i)}function a(o){return o===s.rightParenthesis&&r++,e.consume(o),i}}function Ep(e,t,n){return r;function r(l){return l===s.exclamationMark||l===s.quotationMark||l===s.apostrophe||l===s.rightParenthesis||l===s.asterisk||l===s.comma||l===s.dot||l===s.colon||l===s.semicolon||l===s.questionMark||l===s.underscore||l===s.tilde?(e.consume(l),r):l===s.ampersand?(e.consume(l),a):l===s.rightSquareBracket?(e.consume(l),i):l===s.lessThan||l===s.eof||J(l)||Xe(l)?t(l):n(l)}function i(l){return l===s.eof||l===s.leftParenthesis||l===s.leftSquareBracket||J(l)||Xe(l)?t(l):r(l)}function a(l){return fe(l)?o(l):n(l)}function o(l){return l===s.semicolon?(e.consume(l),r):fe(l)?(e.consume(l),o):n(l)}}function Ap(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ce(a)?n(a):t(a)}}function no(e){return e===s.eof||e===s.leftParenthesis||e===s.asterisk||e===s.underscore||e===s.leftSquareBracket||e===s.rightSquareBracket||e===s.tilde||J(e)}function ro(e){return!fe(e)}function io(e){return!(e===s.slash||zn(e))}function zn(e){return e===s.plusSign||e===s.dash||e===s.dot||e===s.underscore||ce(e)}function Zn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ip={tokenize:Pp,partial:!0};function Tp(){return{document:{[s.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:Lp,continuation:{tokenize:zp},exit:Np}},text:{[s.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:Fp},[s.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Dp,resolveTo:Mp}}}}function Dp(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type===h.labelImage){o=c;break}if(c.type==="gfmFootnoteCall"||c.type===h.labelLink||c.type===h.label||c.type===h.image||c.type===h.link)break}return l;function l(c){if(g(c===s.rightSquareBracket,"expected `]`"),!o||!o._balanced)return n(c);const u=Ie(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==s.caret||!a.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Mp(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type===h.labelImage&&e[n][0]==="enter"){r=e[n][1];break}g(r,"expected `labelStart` to resolve"),e[n+1][1].type=h.data,e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:h.chunkString,contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function Fp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(p){return g(p===s.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==s.caret?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(a>L.linkReferenceSizeMax||p===s.rightSquareBracket&&!o||p===s.eof||p===s.leftSquareBracket||J(p))return n(p);if(p===s.rightSquareBracket){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Ie(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return J(p)||(o=!0),a++,e.consume(p),p===s.backslash?f:u}function f(p){return p===s.leftSquareBracket||p===s.backslash||p===s.rightSquareBracket?(e.consume(p),a++,u):u(p)}}function Lp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(b){return g(b===s.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===s.caret?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(o>L.linkReferenceSizeMax||b===s.rightSquareBracket&&!l||b===s.eof||b===s.leftSquareBracket||J(b))return n(b);if(b===s.rightSquareBracket){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Ie(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return J(b)||(l=!0),o++,e.consume(b),b===s.backslash?p:f}function p(b){return b===s.leftSquareBracket||b===s.backslash||b===s.rightSquareBracket?(e.consume(b),o++,f):f(b)}function d(b){return b===s.colon?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),X(e,m,"gfmFootnoteDefinitionWhitespace")):n(b)}function m(b){return t(b)}}function zp(e,t,n){return e.check(Lt,t,e.attempt(Ip,t,n))}function Np(e){e.exit("gfmFootnoteDefinition")}function Pp(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",L.tabSize+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===L.tabSize?t(a):n(a)}}function Rp(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{[s.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[s.tilde]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},d=[["enter",f,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",p,l]],m=l.parser.constructs.insideSpan.null;m&&Se(d,d.length,0,Xt(m,o.slice(u+1,c),l)),Se(d,d.length,0,[["exit",p,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",f,l]]),Se(o,u-1,c-u+3,d),c=u+d.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type=h.data);return o}function a(o,l,c){const u=this.previous,f=this.events;let p=0;return d;function d(b){return g(b===s.tilde,"expected `~`"),u===s.tilde&&f[f.length-1][1].type!==h.characterEscape?c(b):(o.enter("strikethroughSequenceTemporary"),m(b))}function m(b){const A=mt(u);if(b===s.tilde)return p>1?c(b):(o.consume(b),p++,m);if(p<2&&!n)return c(b);const E=o.exit("strikethroughSequenceTemporary"),y=mt(b);return E._open=!y||y===L.attentionSideAfter&&!!A,E._close=!A||A===L.attentionSideAfter&&!!y,l(b)}}}class Bp{constructor(){this.map=[]}add(t,n,r){_p(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function _p(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jp(e,t){g(e[t][1].type==="table","expected table");let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Hp(){return{flow:{null:{name:"table",tokenize:Op,resolveAll:Vp}}}}function Op(e,t,n){const r=this;let i=0,a=0,o;return l;function l(S){let Z=r.events.length-1;for(;Z>-1;){const M=r.events[Z][1].type;if(M===h.lineEnding||M===h.linePrefix)Z--;else break}const $=Z>-1?r.events[Z][1].type:null,z=$==="tableHead"||$==="tableRow"?w:c;return z===w&&r.parser.lazy[r.now().line]?n(S):z(S)}function c(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===s.verticalBar||(o=!0,a+=1),f(S)}function f(S){return S===s.eof?n(S):R(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter(h.lineEnding),e.consume(S),e.exit(h.lineEnding),m):n(S):W(S)?X(e,f,h.whitespace)(S):(a+=1,o&&(o=!1,i+=1),S===s.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,f):(e.enter(h.data),p(S)))}function p(S){return S===s.eof||S===s.verticalBar||J(S)?(e.exit(h.data),f(S)):(e.consume(S),S===s.backslash?d:p)}function d(S){return S===s.backslash||S===s.verticalBar?(e.consume(S),p):p(S)}function m(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,W(S)?(g(r.parser.constructs.disable.null,"expected `disabled.null`"),X(e,b,h.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(S)):b(S))}function b(S){return S===s.dash||S===s.colon?E(S):S===s.verticalBar?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),A):j(S)}function A(S){return W(S)?X(e,E,h.whitespace)(S):E(S)}function E(S){return S===s.colon?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):S===s.dash?(a+=1,y(S)):S===s.eof||R(S)?_(S):j(S)}function y(S){return S===s.dash?(e.enter("tableDelimiterFiller"),I(S)):j(S)}function I(S){return S===s.dash?(e.consume(S),I):S===s.colon?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(S))}function T(S){return W(S)?X(e,_,h.whitespace)(S):_(S)}function _(S){return S===s.verticalBar?b(S):S===s.eof||R(S)?!o||i!==a?j(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):j(S)}function j(S){return n(S)}function w(S){return e.enter("tableRow"),N(S)}function N(S){return S===s.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),N):S===s.eof||R(S)?(e.exit("tableRow"),t(S)):W(S)?X(e,N,h.whitespace)(S):(e.enter(h.data),H(S))}function H(S){return S===s.eof||S===s.verticalBar||J(S)?(e.exit(h.data),N(S)):(e.consume(S),S===s.backslash?U:H)}function U(S){return S===s.backslash||S===s.verticalBar?(e.consume(S),H):H(S)}}function Vp(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,f,p;const d=new Bp;for(;++n<e.length;){const m=e[n],b=m[1];m[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(g(u,"there should be a table opening"),Gr(d,t,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},d.add(n,0,[["enter",u,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},d.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type===h.data||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],p=Ht(d,t,a,i,void 0,p),a=[0,0,0,0]),o[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],p=Ht(d,t,a,i,void 0,p)),a=o,o=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],p=Ht(d,t,a,i,n,p)):o[1]!==0&&(p=Ht(d,t,o,i,n,p)),i=0):i&&(b.type===h.data||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&(g(u,"expected table opening"),Gr(d,t,c,u,f)),d.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=jp(t.events,n))}return e}function Ht(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(g(a,"expected previous cell enter"),a.end=Object.assign({},ht(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=ht(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=ht(t.events,n[2]),f=ht(t.events,n[3]),p={type:l,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",p,t]]),g(n[3]!==0),r!==2){const d=t.events[n[2]],m=t.events[n[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type=h.chunkText,d[1].contentType=L.contentTypeText,n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(a.end=Object.assign({},ht(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Gr(e,t,n,r,i){const a=[],o=ht(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ht(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const qp={name:"tasklistCheck",tokenize:Wp};function Up(){return{text:{[s.leftSquareBracket]:qp}}}function Wp(e,t,n){const r=this;return i;function i(c){return g(c===s.leftSquareBracket,"expected `[`"),r.previous!==s.eof||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return J(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===s.uppercaseX||c===s.lowercaseX?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===s.rightSquareBracket?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return R(c)?t(c):W(c)?e.check({tokenize:$p},t,n)(c):n(c)}}function $p(e,t,n){return X(e,r,h.whitespace);function r(i){return i===s.eof?n(i):t(i)}}function Gp(e){return hi([xp(),Tp(),Rp(e),Hp(),Up()])}const Xp={};function Qp(e){const t=this,n=e||Xp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gp(n)),a.push(dp()),o.push(mp(n))}function Yp(e){if(!e)return!1;const t=e.trim();if(!t||t.startsWith("//"))return!1;if(t.startsWith("#")||t.startsWith("/"))return!0;try{const n=new URL(t,"http://localhost");return["http:","https:","mailto:"].includes(n.protocol)}catch{return!1}}class $t extends Error{kind;field;currentRevision;constructor(t){super(t.message),this.name="MarkdownClientError",this.kind=t.kind,this.field=t.field,this.currentRevision=t.currentRevision}}function oo(e){return`/api/markdown/${e.kind}/${encodeURIComponent(e.id)}`}async function Kp(e){let t={};try{const r=await e.json();r.detail&&typeof r.detail=="object"&&(t=r.detail)}catch{}const n=e.status===422?"validation":e.status===409?"conflict":"save";return new $t({kind:n,message:t.message||`Markdown request failed (${e.status}).`,field:t.field,currentRevision:t.current_revision})}async function ao(e,t){try{const n=await fetch(e,t);if(!n.ok)throw await Kp(n);return await n.json()}catch(n){throw n instanceof $t?n:new $t({kind:"network",message:"The Markdown service could not be reached. Your draft was kept."})}}function Jp(e){return ao(oo(e))}function Zp(e,t,n){return ao(oo(e),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({markdown:t,expected_revision:n})})}function ef(e){return{resource:e,baseSource:"",baseRevision:"",draft:"",status:"loading-document",error:null}}function tf(e,t){return{resource:e,baseSource:t.source,baseRevision:t.revision,draft:t.source,status:"editing",error:null}}function nf(e,t){return{...e,draft:t,status:"editing",error:null}}function lo(e){return e!==null&&e.draft!==e.baseSource}function rf(e){return lo(e)?{...e,status:"saving",error:null}:e}function of(e,t){return{...e,baseSource:t.source,baseRevision:t.revision,draft:t.source,status:"viewing",error:null}}function af(e,t){const n=t.kind==="validation"?"validation-error":t.kind==="conflict"?"conflict":"save-error";return{...e,status:n,error:t}}function lf(){return null}function wn(e){return e?`${e.kind}:${e.id}`:""}function Xr(e){return e instanceof $t?e:{kind:"network",message:"The Markdown service could not be reached. Your draft was kept."}}function sf({resource:e,onApplied:t,onDirtyChange:n}){const r=wn(e),[i,a]=te.useState(null),[o,l]=te.useState(null),[c,u]=te.useState(r),f=te.useRef(0);c!==r&&(u(r),a(null),l(null)),te.useLayoutEffect(()=>{f.current+=1},[r]);const p=i&&wn(i.resource)===r?i:null,d=lo(p),m=p!==null&&p.status!=="viewing"&&p.status!=="loading-document",b=p?.status==="saving",A=p?.status==="loading-document",E=p?.error??(o?.resourceKey===r?o.error:null);te.useEffect(()=>(n?.(d),()=>{d&&n?.(!1)}),[d,n]),te.useEffect(()=>{if(!d)return;const w=N=>{N.preventDefault(),N.returnValue=""};return window.addEventListener("beforeunload",w),()=>window.removeEventListener("beforeunload",w)},[d]);const y=te.useCallback(async()=>{if(!e)return!1;const w=++f.current;l(null),a(ef(e));try{const N=await Jp(e);return w!==f.current?!1:(a(tf(e,N)),!0)}catch(N){return w!==f.current||(a(null),l({resourceKey:r,error:Xr(N)})),!1}},[e,r]),I=te.useCallback(()=>{!p||b||(a(lf()),l(null))},[p,b]),T=te.useCallback(async()=>{if(!p||b||!d)return!1;const w=f.current,N=rf(p);a(N);try{const H=await Zp(N.resource,N.draft,N.baseRevision);return w!==f.current?!1:(a(of(N,H)),t?.(H),!0)}catch(H){return w!==f.current||a(af(N,Xr(H))),!1}},[p,d,t,b]),_=te.useCallback(async()=>{!e||b||d&&!window.confirm("Discard this draft and reload the latest applied version?")||await y()},[y,d,e,b]),j=te.useCallback(w=>{a(N=>N&&wn(N.resource)===r?nf(N,w):N)},[r]);return{session:p,error:E,dirty:d,editing:m,saving:b,loading:A,beginEdit:y,discard:I,save:T,reloadLatest:_,changeDraft:j}}function uf(e,t){const n=["preview","source"],r=n.indexOf(e);switch(t){case"ArrowRight":return n[(r+1)%n.length];case"ArrowLeft":return n[(r-1+n.length)%n.length];case"Home":return n[0];case"End":return n[n.length-1];default:return null}}function Vf(e){const t=so.c(110);if(t[0]!=="b752d060a278f05495274519a94c06b5c021187a60615a54d82e9f728559abd2"){for(let ie=0;ie<110;ie+=1)t[ie]=Symbol.for("react.memo_cache_sentinel");t[0]="b752d060a278f05495274519a94c06b5c021187a60615a54d82e9f728559abd2"}const{content:n,resource:r,onApplied:i,onDirtyChange:a,className:o,defaultMode:l}=e,c=l===void 0?"preview":l,[u,f]=te.useState(c),[p,d]=te.useState(!1),m=te.useRef(c),b=r?`${r.kind}:${r.id}`:"",[A,E]=te.useState(b);let y;t[1]!==i||t[2]!==a||t[3]!==r?(y={resource:r,onApplied:i,onDirtyChange:a},t[1]=i,t[2]=a,t[3]=r,t[4]=y):y=t[4];const I=sf(y),{session:T,error:_,dirty:j,editing:w,saving:N,loading:H}=I;A!==b&&(E(b),d(!1),f(c));const[U,S]=te.useState(n);U!==n&&(S(n),p&&d(!1));const Z=te.useId(),$=`${Z}-tab-preview`,z=`${Z}-tab-source`,M=`${Z}-panel`,F=te.useRef(c),q=te.useRef(null),Y=te.useRef(null);let se;t[5]===Symbol.for("react.memo_cache_sentinel")?(se=ie=>{F.current=ie,q.current&&(q.current.tabIndex=ie==="preview"?0:-1),Y.current&&(Y.current.tabIndex=ie==="source"?0:-1),(ie==="preview"?q:Y).current?.focus()},t[5]=se):se=t[5];const Ce=se;let k;t[6]===Symbol.for("react.memo_cache_sentinel")?(k=ie=>{F.current=ie,f(ie)},t[6]=k):k=t[6];const ae=k;let he;t[7]===Symbol.for("react.memo_cache_sentinel")?(he=ie=>{const wt=uf(F.current,ie.key);wt!==null&&(ie.preventDefault(),Ce(wt))},t[7]=he):he=t[7];const x=he,ue=te.useRef(void 0);let ve,Be;t[8]===Symbol.for("react.memo_cache_sentinel")?(ve=()=>()=>{clearTimeout(ue.current)},Be=[],t[8]=ve,t[9]=Be):(ve=t[8],Be=t[9]),te.useEffect(ve,Be);let Ne;t[10]!==c?(Ne=()=>{F.current=c},t[10]=c,t[11]=Ne):Ne=t[11];let ne;t[12]!==c||t[13]!==b?(ne=[b,c],t[12]=c,t[13]=b,t[14]=ne):ne=t[14],te.useLayoutEffect(Ne,ne);let Te;t[15]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{q.current&&(q.current.tabIndex=F.current==="preview"?0:-1),Y.current&&(Y.current.tabIndex=F.current==="source"?0:-1)},t[15]=Te):Te=t[15],te.useLayoutEffect(Te);const ee=I.editing?I.session?.draft??"":typeof n=="string"?n:"";let de;if(t[16]!==I.editing||t[17]!==ee){e:{if(!I.editing){de=ee;break e}const ie=ee.split(/\r?\n/);if(ie[0]!=="---"){de=ee;break e}const wt=ie.findIndex(cf);de=wt<0?ee:ie.slice(wt+1).join(`
|
|
44
|
-
`).replace(/^\n/,"")}t[16]=I.editing,t[17]=ee,t[18]=de}else de=t[18];const De=de;let _e;t[19]!==ee?(_e=ee.trim(),t[19]=ee,t[20]=_e):_e=t[20];const Ae=_e.length>0;let Oe;t[21]!==De?(Oe=B.jsxDEV(Ru,{remarkPlugins:pf,components:ff,children:De},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:232,columnNumber:11},this),t[21]=De,t[22]=Oe):Oe=t[22];const Ye=Oe;let Ve;t[23]!==Ae||t[24]!==ee?(Ve=async()=>{if(Ae)try{await navigator.clipboard.writeText(ee),clearTimeout(ue.current),d(!0),ue.current=window.setTimeout(()=>d(!1),1500)}catch{}},t[23]=Ae,t[24]=ee,t[25]=Ve):Ve=t[25];const xt=Ve;let qe;t[26]!==u||t[27]!==I?(qe=async()=>{m.current=u,ae("source"),await I.beginEdit()||ae(m.current)},t[26]=u,t[27]=I,t[28]=qe):qe=t[28];const Ke=qe;let Je;t[29]!==I?(Je=()=>{I.discard(),ae(m.current)},t[29]=I,t[30]=Je):Je=t[30];const bt=Je;let Ze;t[31]!==I?(Ze=async()=>{await I.save()&&ae("preview")},t[31]=I,t[32]=Ze):Ze=t[32];const yt=Ze;let et;t[33]===Symbol.for("react.memo_cache_sentinel")?(et={display:"flex",gap:4},t[33]=et):et=t[33];const C=u==="preview",v=u==="preview"?0:-1;let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P=()=>ae("preview"),t[34]=P):P=t[34];let O;t[35]!==u?(O=u==="preview"?Yr:{},t[35]=u,t[36]=O):O=t[36];let G;t[37]!==O?(G={...Qr,...O},t[37]=O,t[38]=G):G=t[38];let le;t[39]===Symbol.for("react.memo_cache_sentinel")?(le=B.jsxDEV(uo,{size:12,style:{marginRight:5},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:340,columnNumber:11},this),t[39]=le):le=t[39];let me;t[40]!==M||t[41]!==$||t[42]!==C||t[43]!==v||t[44]!==G?(me=B.jsxDEV("button",{type:"button",role:"tab",id:$,ref:q,"aria-selected":C,"aria-controls":M,tabIndex:v,onClick:P,onKeyDown:x,style:G,children:[le,"Preview"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:349,columnNumber:11},this),t[40]=M,t[41]=$,t[42]=C,t[43]=v,t[44]=G,t[45]=me):me=t[45];const be=u==="source",Pe=u==="source"?0:-1;let Me;t[46]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>ae("source"),t[46]=Me):Me=t[46];let re;t[47]!==u?(re=u==="source"?Yr:{},t[47]=u,t[48]=re):re=t[48];let ye;t[49]!==re?(ye={...Qr,...re},t[49]=re,t[50]=ye):ye=t[50];let ge;t[51]===Symbol.for("react.memo_cache_sentinel")?(ge=B.jsxDEV(xo,{size:12,style:{marginRight:5},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:389,columnNumber:11},this),t[51]=ge):ge=t[51];let tt;t[52]!==M||t[53]!==z||t[54]!==be||t[55]!==Pe||t[56]!==ye?(tt=B.jsxDEV("button",{type:"button",role:"tab",id:z,ref:Y,"aria-selected":be,"aria-controls":M,tabIndex:Pe,onClick:Me,onKeyDown:x,style:ye,children:[ge,"Source"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:398,columnNumber:11},this),t[52]=M,t[53]=z,t[54]=be,t[55]=Pe,t[56]=ye,t[57]=tt):tt=t[57];let nt;t[58]!==me||t[59]!==tt?(nt=B.jsxDEV("div",{style:et,role:"tablist","aria-label":"Content view mode",children:[me,tt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:410,columnNumber:11},this),t[58]=me,t[59]=tt,t[60]=nt):nt=t[60];let Nt;t[61]===Symbol.for("react.memo_cache_sentinel")?(Nt={display:"flex",alignItems:"center",gap:6},t[61]=Nt):Nt=t[61];let rt;t[62]!==p||t[63]!==xt||t[64]!==Ae?(rt=Ae&&B.jsxDEV("button",{type:"button",onClick:()=>{xt()},style:dt,title:"Copy raw content",children:p?B.jsxDEV(B.Fragment,{children:[B.jsxDEV(tr,{size:12,color:"#3fb950",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:139},this),B.jsxDEV("span",{style:{color:"#3fb950",fontSize:11},children:"Copied"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:432,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:137},this):B.jsxDEV(B.Fragment,{children:[B.jsxDEV(po,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:435,columnNumber:33},this),B.jsxDEV("span",{style:{fontSize:11},children:"Copy"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:437,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:435,columnNumber:31},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:25},this),t[62]=p,t[63]=xt,t[64]=Ae,t[65]=rt):rt=t[65];let it;t[66]!==w||t[67]!==Ke||t[68]!==H||t[69]!==r?(it=r&&!w&&!H?B.jsxDEV("button",{type:"button",onClick:()=>{Ke()},style:dt,children:[B.jsxDEV(fo,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:449,columnNumber:123},this),"Edit"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:449,columnNumber:46},this):null,t[66]=w,t[67]=Ke,t[68]=H,t[69]=r,t[70]=it):it=t[70];let ot;t[71]!==H?(ot=H?B.jsxDEV("button",{type:"button",disabled:!0,style:{...dt,opacity:.65},children:[B.jsxDEV(er,{size:12,className:"animate-spin",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:465,columnNumber:8},this),"Loading…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:462,columnNumber:21},this):null,t[71]=H,t[72]=ot):ot=t[72];let at;t[73]!==j||t[74]!==w||t[75]!==yt||t[76]!==bt||t[77]!==N?(at=w?B.jsxDEV(B.Fragment,{children:[B.jsxDEV("button",{type:"button",onClick:bt,disabled:N,style:dt,children:[B.jsxDEV(ho,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:107},this),"Cancel"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:23},this),B.jsxDEV("button",{type:"button",onClick:()=>{yt()},disabled:N||!j,title:j?void 0:"Make a change before applying",style:{...mf,opacity:N||!j?.55:1},children:[N?B.jsxDEV(er,{size:12,className:"animate-spin",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:480,columnNumber:20},this):B.jsxDEV(tr,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:482,columnNumber:36},this),N?"Applying…":"Apply"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:477,columnNumber:48},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:21},this):null,t[73]=j,t[74]=w,t[75]=yt,t[76]=bt,t[77]=N,t[78]=at):at=t[78];let lt;t[79]!==rt||t[80]!==it||t[81]!==ot||t[82]!==at?(lt=B.jsxDEV("div",{style:Nt,children:[rt,it,ot,at]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:496,columnNumber:11},this),t[79]=rt,t[80]=it,t[81]=ot,t[82]=at,t[83]=lt):lt=t[83];let st;t[84]!==nt||t[85]!==lt?(st=B.jsxDEV("div",{style:df,children:[nt,lt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:507,columnNumber:11},this),t[84]=nt,t[85]=lt,t[86]=st):st=t[86];let ut;t[87]!==I||t[88]!==_?(ut=_?B.jsxDEV("div",{id:"markdown-editor-error",role:"alert",style:gf,children:[B.jsxDEV("span",{children:_.message},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:83},this),_.kind==="conflict"?B.jsxDEV("button",{type:"button",onClick:()=>{I.reloadLatest()},style:kf,children:[B.jsxDEV(co,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:230},this),"Reload latest"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:140},this):null]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:19},this):null,t[87]=I,t[88]=_,t[89]=ut):ut=t[89];const Jt=u==="preview"?$:z,Zt=N||H;let ct;t[90]!==u||t[91]!==w||t[92]!==I||t[93]!==_||t[94]!==Ae||t[95]!==ee||t[96]!==Ye||t[97]!==N||t[98]!==T?.draft?(ct=u==="source"&&w?B.jsxDEV("textarea",{"aria-label":"Markdown source","aria-describedby":_?"markdown-editor-error":void 0,"aria-invalid":_?.kind==="validation"||void 0,value:T?.draft??"",onChange:ie=>I.changeDraft(ie.target.value),disabled:N,spellCheck:!1,style:bf},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:48},this):Ae?u==="source"?B.jsxDEV("pre",{style:wf,children:B.jsxDEV("code",{style:Sf,children:ee},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:501},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:473},this):B.jsxDEV("div",{style:Cf,children:Ye},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:559},this):B.jsxDEV("div",{style:yf,children:"No content available for this node."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:375},this),t[90]=u,t[91]=w,t[92]=I,t[93]=_,t[94]=Ae,t[95]=ee,t[96]=Ye,t[97]=N,t[98]=T?.draft,t[99]=ct):ct=t[99];let pt;t[100]!==M||t[101]!==Jt||t[102]!==Zt||t[103]!==ct?(pt=B.jsxDEV("div",{role:"tabpanel",id:M,"aria-labelledby":Jt,"aria-busy":Zt,tabIndex:0,style:xf,children:ct},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:545,columnNumber:11},this),t[100]=M,t[101]=Jt,t[102]=Zt,t[103]=ct,t[104]=pt):pt=t[104];let Pt;return t[105]!==o||t[106]!==st||t[107]!==ut||t[108]!==pt?(Pt=B.jsxDEV("div",{className:o,style:hf,children:[st,ut,pt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:556,columnNumber:11},this),t[105]=o,t[106]=st,t[107]=ut,t[108]=pt,t[109]=Pt):Pt=t[109],Pt}function cf(e,t){return t>0&&e==="---"}const pf=[Qp],ff={a:({href:e,children:t,title:n,node:r,...i})=>{if(!Yp(e))return B.jsxDEV("span",{style:{color:Q.ui.text.muted,textDecoration:"line-through"},children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:605,columnNumber:14},void 0);const a=e??"";return a.startsWith("#")?B.jsxDEV("a",{href:a,title:n,style:Kr,...i,children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:617,columnNumber:14},void 0):B.jsxDEV("a",{href:a,title:n,target:"_blank",rel:"noopener noreferrer",style:Kr,...i,children:[t,B.jsxDEV(mo,{size:10,style:{marginLeft:3,verticalAlign:"middle",display:"inline"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:623,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:621,columnNumber:12},void 0)},img:({src:e,alt:t})=>B.jsxDEV("span",{style:Df,title:e||"Image",children:[B.jsxDEV(yo,{size:12,style:{marginRight:5}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:634,columnNumber:7},void 0),B.jsxDEV("span",{children:["Image: ",t||e||"unlabeled"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:637,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:633,columnNumber:9},void 0),h1:({children:e})=>B.jsxDEV("h1",{style:vf,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:641,columnNumber:9},void 0),h2:({children:e})=>B.jsxDEV("h2",{style:Ef,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:644,columnNumber:9},void 0),h3:({children:e})=>B.jsxDEV("h3",{style:Af,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:647,columnNumber:9},void 0),h4:({children:e})=>B.jsxDEV("h4",{style:If,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:650,columnNumber:9},void 0),p:({children:e})=>B.jsxDEV("p",{style:{margin:"0 0 8px 0"},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:653,columnNumber:9},void 0),ul:({children:e})=>B.jsxDEV("ul",{style:{margin:"0 0 8px 0",paddingLeft:18},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:658,columnNumber:9},void 0),ol:({children:e})=>B.jsxDEV("ol",{style:{margin:"0 0 8px 0",paddingLeft:18},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:664,columnNumber:9},void 0),li:({children:e})=>B.jsxDEV("li",{style:{marginBottom:3},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:670,columnNumber:9},void 0),blockquote:({children:e})=>B.jsxDEV("blockquote",{style:Tf,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:675,columnNumber:9},void 0),hr:()=>B.jsxDEV("hr",{style:{border:"none",borderTop:`1px solid ${Q.ui.surface.panelBorder}`,margin:"10px 0"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:676,columnNumber:13},void 0),table:({children:e})=>B.jsxDEV("div",{style:{width:"100%",overflowX:"auto",margin:"8px 0",borderRadius:6,border:`1px solid ${Q.ui.surface.panelBorder}`},children:B.jsxDEV("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:690,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:683,columnNumber:9},void 0),thead:({children:e})=>B.jsxDEV("thead",{style:{background:"rgba(255, 255, 255, 0.04)"},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:698,columnNumber:9},void 0),tbody:({children:e})=>B.jsxDEV("tbody",{children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:703,columnNumber:9},void 0),tr:({children:e})=>B.jsxDEV("tr",{style:{borderBottom:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:706,columnNumber:9},void 0),th:({children:e})=>B.jsxDEV("th",{style:{padding:"6px 8px",textAlign:"left",fontWeight:700,color:Q.ui.text.strong,borderRight:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:711,columnNumber:9},void 0),td:({children:e})=>B.jsxDEV("td",{style:{padding:"6px 8px",color:Q.ui.text.body,borderRight:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:720,columnNumber:9},void 0),pre:({children:e})=>B.jsxDEV("pre",{style:Ff,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:727,columnNumber:9},void 0),code:({className:e,children:t})=>{const n=!e&&typeof t=="string"&&!t.includes(`
|
|
45
|
-
`);return B.jsxDEV("code",{style:n?Mf:Lf,children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:735,columnNumber:12},void 0)}},hf={display:"flex",flexDirection:"column",background:"rgba(
|
|
43
|
+
`))}function c(m,b,A,E){const y=A.enter("tableCell"),I=A.enter("phrasing"),T=A.containerPhrasing(m,{...E,before:a,after:a});return I(),y(),T}function u(m,b){return Cc(m,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(m,b,A){const E=m.children;let y=-1;const I=[],T=b.enter("table");for(;++y<E.length;)I[y]=p(E[y],b,A);return T(),I}function p(m,b,A){const E=m.children;let y=-1;const I=[],T=b.enter("tableRow");for(;++y<E.length;)I[y]=c(E[y],m,b,A);return T(),I}function d(m,b,A){let E=Yi.inlineCode(m,b,A);return A.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function cp(){return{exit:{taskListCheckValueChecked:$r,taskListCheckValueUnchecked:$r,paragraph:fp}}}function pp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hp}}}function $r(e){const t=this.stack[this.stack.length-2];g(t.type==="listItem"),t.checked=e.type==="taskListCheckValueChecked"}function fp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];g(n.type==="paragraph");const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function hp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=Yi.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+o}}function dp(){return[$u(),hc(),kc(),rp(),cp()]}function mp(e){return{extensions:[Gu(),dc(e),xc(),up(e),pp()]}}const gp={tokenize:Sp,partial:!0},Ki={tokenize:Cp,partial:!0},Ji={tokenize:vp,partial:!0},Zi={tokenize:Ep,partial:!0},kp={tokenize:Ap,partial:!0},eo={name:"wwwAutolink",tokenize:yp,previous:no},to={name:"protocolAutolink",tokenize:wp,previous:ro},Re={name:"emailAutolink",tokenize:bp,previous:io},ze={};function xp(){return{text:ze}}let We=s.digit0;for(;We<s.leftCurlyBrace;)ze[We]=Re,We++,We===s.colon?We=s.uppercaseA:We===s.leftSquareBracket&&(We=s.lowercaseA);ze[s.plusSign]=Re;ze[s.dash]=Re;ze[s.dot]=Re;ze[s.underscore]=Re;ze[s.uppercaseH]=[Re,to];ze[s.lowercaseH]=[Re,to];ze[s.uppercaseW]=[Re,eo];ze[s.lowercaseW]=[Re,eo];function bp(e,t,n){const r=this;let i,a;return o;function o(p){return!zn(p)||!io.call(r,r.previous)||Zn(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return zn(p)?(e.consume(p),l):p===s.atSign?(e.consume(p),c):n(p)}function c(p){return p===s.dot?e.check(kp,f,u)(p):p===s.dash||p===s.underscore||ce(p)?(a=!0,e.consume(p),c):f(p)}function u(p){return e.consume(p),i=!0,c}function f(p){return a&&i&&fe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function yp(e,t,n){const r=this;return i;function i(o){return o!==s.uppercaseW&&o!==s.lowercaseW||!no.call(r,r.previous)||Zn(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gp,e.attempt(Ki,e.attempt(Ji,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function wp(e,t,n){const r=this;let i="",a=!1;return o;function o(p){return(p===s.uppercaseH||p===s.lowercaseH)&&ro.call(r,r.previous)&&!Zn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(fe(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),l;if(p===s.colon){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(p),c}return n(p)}function c(p){return p===s.slash?(e.consume(p),a?u:(a=!0,c)):n(p)}function u(p){return p===s.eof||Vt(p)||J(p)||Xe(p)||Gt(p)?n(p):e.attempt(Ki,e.attempt(Ji,f),n)(p)}function f(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Sp(e,t,n){let r=0;return i;function i(o){return(o===s.uppercaseW||o===s.lowercaseW)&&r<3?(r++,e.consume(o),i):o===s.dot&&r===3?(e.consume(o),a):n(o)}function a(o){return o===s.eof?n(o):t(o)}}function Cp(e,t,n){let r,i,a;return o;function o(u){return u===s.dot||u===s.underscore?e.check(Zi,c,l)(u):u===s.eof||J(u)||Xe(u)||u!==s.dash&&Gt(u)?c(u):(a=!0,e.consume(u),o)}function l(u){return u===s.underscore?r=!0:(i=r,r=void 0),e.consume(u),o}function c(u){return i||r||!a?n(u):t(u)}}function vp(e,t){let n=0,r=0;return i;function i(o){return o===s.leftParenthesis?(n++,e.consume(o),i):o===s.rightParenthesis&&r<n?a(o):o===s.exclamationMark||o===s.quotationMark||o===s.ampersand||o===s.apostrophe||o===s.rightParenthesis||o===s.asterisk||o===s.comma||o===s.dot||o===s.colon||o===s.semicolon||o===s.lessThan||o===s.questionMark||o===s.rightSquareBracket||o===s.underscore||o===s.tilde?e.check(Zi,t,a)(o):o===s.eof||J(o)||Xe(o)?t(o):(e.consume(o),i)}function a(o){return o===s.rightParenthesis&&r++,e.consume(o),i}}function Ep(e,t,n){return r;function r(l){return l===s.exclamationMark||l===s.quotationMark||l===s.apostrophe||l===s.rightParenthesis||l===s.asterisk||l===s.comma||l===s.dot||l===s.colon||l===s.semicolon||l===s.questionMark||l===s.underscore||l===s.tilde?(e.consume(l),r):l===s.ampersand?(e.consume(l),a):l===s.rightSquareBracket?(e.consume(l),i):l===s.lessThan||l===s.eof||J(l)||Xe(l)?t(l):n(l)}function i(l){return l===s.eof||l===s.leftParenthesis||l===s.leftSquareBracket||J(l)||Xe(l)?t(l):r(l)}function a(l){return fe(l)?o(l):n(l)}function o(l){return l===s.semicolon?(e.consume(l),r):fe(l)?(e.consume(l),o):n(l)}}function Ap(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ce(a)?n(a):t(a)}}function no(e){return e===s.eof||e===s.leftParenthesis||e===s.asterisk||e===s.underscore||e===s.leftSquareBracket||e===s.rightSquareBracket||e===s.tilde||J(e)}function ro(e){return!fe(e)}function io(e){return!(e===s.slash||zn(e))}function zn(e){return e===s.plusSign||e===s.dash||e===s.dot||e===s.underscore||ce(e)}function Zn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ip={tokenize:Pp,partial:!0};function Tp(){return{document:{[s.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:Lp,continuation:{tokenize:zp},exit:Np}},text:{[s.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:Fp},[s.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Dp,resolveTo:Mp}}}}function Dp(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type===h.labelImage){o=c;break}if(c.type==="gfmFootnoteCall"||c.type===h.labelLink||c.type===h.label||c.type===h.image||c.type===h.link)break}return l;function l(c){if(g(c===s.rightSquareBracket,"expected `]`"),!o||!o._balanced)return n(c);const u=Ie(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==s.caret||!a.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Mp(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type===h.labelImage&&e[n][0]==="enter"){r=e[n][1];break}g(r,"expected `labelStart` to resolve"),e[n+1][1].type=h.data,e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:h.chunkString,contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function Fp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(p){return g(p===s.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==s.caret?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(a>L.linkReferenceSizeMax||p===s.rightSquareBracket&&!o||p===s.eof||p===s.leftSquareBracket||J(p))return n(p);if(p===s.rightSquareBracket){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Ie(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return J(p)||(o=!0),a++,e.consume(p),p===s.backslash?f:u}function f(p){return p===s.leftSquareBracket||p===s.backslash||p===s.rightSquareBracket?(e.consume(p),a++,u):u(p)}}function Lp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(b){return g(b===s.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===s.caret?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(o>L.linkReferenceSizeMax||b===s.rightSquareBracket&&!l||b===s.eof||b===s.leftSquareBracket||J(b))return n(b);if(b===s.rightSquareBracket){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=Ie(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return J(b)||(l=!0),o++,e.consume(b),b===s.backslash?p:f}function p(b){return b===s.leftSquareBracket||b===s.backslash||b===s.rightSquareBracket?(e.consume(b),o++,f):f(b)}function d(b){return b===s.colon?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),X(e,m,"gfmFootnoteDefinitionWhitespace")):n(b)}function m(b){return t(b)}}function zp(e,t,n){return e.check(Lt,t,e.attempt(Ip,t,n))}function Np(e){e.exit("gfmFootnoteDefinition")}function Pp(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",L.tabSize+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===L.tabSize?t(a):n(a)}}function Rp(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{[s.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[s.tilde]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},d=[["enter",f,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",p,l]],m=l.parser.constructs.insideSpan.null;m&&Se(d,d.length,0,Xt(m,o.slice(u+1,c),l)),Se(d,d.length,0,[["exit",p,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",f,l]]),Se(o,u-1,c-u+3,d),c=u+d.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type=h.data);return o}function a(o,l,c){const u=this.previous,f=this.events;let p=0;return d;function d(b){return g(b===s.tilde,"expected `~`"),u===s.tilde&&f[f.length-1][1].type!==h.characterEscape?c(b):(o.enter("strikethroughSequenceTemporary"),m(b))}function m(b){const A=mt(u);if(b===s.tilde)return p>1?c(b):(o.consume(b),p++,m);if(p<2&&!n)return c(b);const E=o.exit("strikethroughSequenceTemporary"),y=mt(b);return E._open=!y||y===L.attentionSideAfter&&!!A,E._close=!A||A===L.attentionSideAfter&&!!y,l(b)}}}class Bp{constructor(){this.map=[]}add(t,n,r){_p(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function _p(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jp(e,t){g(e[t][1].type==="table","expected table");let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Hp(){return{flow:{null:{name:"table",tokenize:Op,resolveAll:Vp}}}}function Op(e,t,n){const r=this;let i=0,a=0,o;return l;function l(S){let Z=r.events.length-1;for(;Z>-1;){const M=r.events[Z][1].type;if(M===h.lineEnding||M===h.linePrefix)Z--;else break}const $=Z>-1?r.events[Z][1].type:null,z=$==="tableHead"||$==="tableRow"?w:c;return z===w&&r.parser.lazy[r.now().line]?n(S):z(S)}function c(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===s.verticalBar||(o=!0,a+=1),f(S)}function f(S){return S===s.eof?n(S):R(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter(h.lineEnding),e.consume(S),e.exit(h.lineEnding),m):n(S):W(S)?X(e,f,h.whitespace)(S):(a+=1,o&&(o=!1,i+=1),S===s.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,f):(e.enter(h.data),p(S)))}function p(S){return S===s.eof||S===s.verticalBar||J(S)?(e.exit(h.data),f(S)):(e.consume(S),S===s.backslash?d:p)}function d(S){return S===s.backslash||S===s.verticalBar?(e.consume(S),p):p(S)}function m(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,W(S)?(g(r.parser.constructs.disable.null,"expected `disabled.null`"),X(e,b,h.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:L.tabSize)(S)):b(S))}function b(S){return S===s.dash||S===s.colon?E(S):S===s.verticalBar?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),A):j(S)}function A(S){return W(S)?X(e,E,h.whitespace)(S):E(S)}function E(S){return S===s.colon?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):S===s.dash?(a+=1,y(S)):S===s.eof||R(S)?_(S):j(S)}function y(S){return S===s.dash?(e.enter("tableDelimiterFiller"),I(S)):j(S)}function I(S){return S===s.dash?(e.consume(S),I):S===s.colon?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(S))}function T(S){return W(S)?X(e,_,h.whitespace)(S):_(S)}function _(S){return S===s.verticalBar?b(S):S===s.eof||R(S)?!o||i!==a?j(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):j(S)}function j(S){return n(S)}function w(S){return e.enter("tableRow"),N(S)}function N(S){return S===s.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),N):S===s.eof||R(S)?(e.exit("tableRow"),t(S)):W(S)?X(e,N,h.whitespace)(S):(e.enter(h.data),H(S))}function H(S){return S===s.eof||S===s.verticalBar||J(S)?(e.exit(h.data),N(S)):(e.consume(S),S===s.backslash?U:H)}function U(S){return S===s.backslash||S===s.verticalBar?(e.consume(S),H):H(S)}}function Vp(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,f,p;const d=new Bp;for(;++n<e.length;){const m=e[n],b=m[1];m[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(g(u,"there should be a table opening"),Gr(d,t,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},d.add(n,0,[["enter",u,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},d.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type===h.data||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],p=Ht(d,t,a,i,void 0,p),a=[0,0,0,0]),o[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],p=Ht(d,t,a,i,void 0,p)),a=o,o=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],p=Ht(d,t,a,i,n,p)):o[1]!==0&&(p=Ht(d,t,o,i,n,p)),i=0):i&&(b.type===h.data||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&(g(u,"expected table opening"),Gr(d,t,c,u,f)),d.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=jp(t.events,n))}return e}function Ht(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(g(a,"expected previous cell enter"),a.end=Object.assign({},ht(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=ht(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=ht(t.events,n[2]),f=ht(t.events,n[3]),p={type:l,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",p,t]]),g(n[3]!==0),r!==2){const d=t.events[n[2]],m=t.events[n[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type=h.chunkText,d[1].contentType=L.contentTypeText,n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(a.end=Object.assign({},ht(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Gr(e,t,n,r,i){const a=[],o=ht(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ht(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const qp={name:"tasklistCheck",tokenize:Wp};function Up(){return{text:{[s.leftSquareBracket]:qp}}}function Wp(e,t,n){const r=this;return i;function i(c){return g(c===s.leftSquareBracket,"expected `[`"),r.previous!==s.eof||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return J(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===s.uppercaseX||c===s.lowercaseX?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===s.rightSquareBracket?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return R(c)?t(c):W(c)?e.check({tokenize:$p},t,n)(c):n(c)}}function $p(e,t,n){return X(e,r,h.whitespace);function r(i){return i===s.eof?n(i):t(i)}}function Gp(e){return hi([xp(),Tp(),Rp(e),Hp(),Up()])}const Xp={};function Qp(e){const t=this,n=e||Xp,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gp(n)),a.push(dp()),o.push(mp(n))}function Yp(e){if(!e)return!1;const t=e.trim();if(!t||t.startsWith("//"))return!1;if(t.startsWith("#")||t.startsWith("/"))return!0;try{const n=new URL(t,"http://localhost");return["http:","https:","mailto:"].includes(n.protocol)}catch{return!1}}class $t extends Error{kind;field;currentRevision;constructor(t){super(t.message),this.name="MarkdownClientError",this.kind=t.kind,this.field=t.field,this.currentRevision=t.currentRevision}}function oo(e){return`/api/markdown/${e.kind}/${encodeURIComponent(e.id)}`}async function Kp(e){let t={};try{const r=await e.json();r.detail&&typeof r.detail=="object"&&(t=r.detail)}catch{}const n=e.status===422?"validation":e.status===409?"conflict":"save";return new $t({kind:n,message:t.message||`Markdown request failed (${e.status}).`,field:t.field,currentRevision:t.current_revision})}async function ao(e,t){try{const n=await fetch(e,t);if(!n.ok)throw await Kp(n);return await n.json()}catch(n){throw n instanceof $t?n:new $t({kind:"network",message:"The Markdown service could not be reached. Your draft was kept."})}}function Jp(e){return ao(oo(e))}function Zp(e,t,n){return ao(oo(e),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({markdown:t,expected_revision:n})})}function ef(e){return{resource:e,baseSource:"",baseRevision:"",draft:"",status:"loading-document",error:null}}function tf(e,t){return{resource:e,baseSource:t.source,baseRevision:t.revision,draft:t.source,status:"editing",error:null}}function nf(e,t){return{...e,draft:t,status:"editing",error:null}}function lo(e){return e!==null&&e.draft!==e.baseSource}function rf(e){return lo(e)?{...e,status:"saving",error:null}:e}function of(e,t){return{...e,baseSource:t.source,baseRevision:t.revision,draft:t.source,status:"viewing",error:null}}function af(e,t){const n=t.kind==="validation"?"validation-error":t.kind==="conflict"?"conflict":"save-error";return{...e,status:n,error:t}}function lf(){return null}function wn(e){return e?`${e.kind}:${e.id}`:""}function Xr(e){return e instanceof $t?e:{kind:"network",message:"The Markdown service could not be reached. Your draft was kept."}}function sf({resource:e,onApplied:t,onDirtyChange:n}){const r=wn(e),[i,a]=te.useState(null),[o,l]=te.useState(null),[c,u]=te.useState(r),f=te.useRef(0);c!==r&&(u(r),a(null),l(null)),te.useLayoutEffect(()=>{f.current+=1},[r]);const p=i&&wn(i.resource)===r?i:null,d=lo(p),m=p!==null&&p.status!=="viewing"&&p.status!=="loading-document",b=p?.status==="saving",A=p?.status==="loading-document",E=p?.error??(o?.resourceKey===r?o.error:null);te.useEffect(()=>(n?.(d),()=>{d&&n?.(!1)}),[d,n]),te.useEffect(()=>{if(!d)return;const w=N=>{N.preventDefault(),N.returnValue=""};return window.addEventListener("beforeunload",w),()=>window.removeEventListener("beforeunload",w)},[d]);const y=te.useCallback(async()=>{if(!e)return!1;const w=++f.current;l(null),a(ef(e));try{const N=await Jp(e);return w!==f.current?!1:(a(tf(e,N)),!0)}catch(N){return w!==f.current||(a(null),l({resourceKey:r,error:Xr(N)})),!1}},[e,r]),I=te.useCallback(()=>{!p||b||(a(lf()),l(null))},[p,b]),T=te.useCallback(async()=>{if(!p||b||!d)return!1;const w=f.current,N=rf(p);a(N);try{const H=await Zp(N.resource,N.draft,N.baseRevision);return w!==f.current?!1:(a(of(N,H)),t?.(H),!0)}catch(H){return w!==f.current||a(af(N,Xr(H))),!1}},[p,d,t,b]),_=te.useCallback(async()=>{!e||b||d&&!window.confirm("Discard this draft and reload the latest applied version?")||await y()},[y,d,e,b]),j=te.useCallback(w=>{a(N=>N&&wn(N.resource)===r?nf(N,w):N)},[r]);return{session:p,error:E,dirty:d,editing:m,saving:b,loading:A,beginEdit:y,discard:I,save:T,reloadLatest:_,changeDraft:j}}function uf(e,t){const n=["preview","source"],r=n.indexOf(e);switch(t){case"ArrowRight":return n[(r+1)%n.length];case"ArrowLeft":return n[(r-1+n.length)%n.length];case"Home":return n[0];case"End":return n[n.length-1];default:return null}}function Vf(e){const t=so.c(110);if(t[0]!=="3a1e04319e4fb5bbc77d6bc4b17bba3de03a9ac766fe9fea6cc3f3fe462bde78"){for(let ie=0;ie<110;ie+=1)t[ie]=Symbol.for("react.memo_cache_sentinel");t[0]="3a1e04319e4fb5bbc77d6bc4b17bba3de03a9ac766fe9fea6cc3f3fe462bde78"}const{content:n,resource:r,onApplied:i,onDirtyChange:a,className:o,defaultMode:l}=e,c=l===void 0?"preview":l,[u,f]=te.useState(c),[p,d]=te.useState(!1),m=te.useRef(c),b=r?`${r.kind}:${r.id}`:"",[A,E]=te.useState(b);let y;t[1]!==i||t[2]!==a||t[3]!==r?(y={resource:r,onApplied:i,onDirtyChange:a},t[1]=i,t[2]=a,t[3]=r,t[4]=y):y=t[4];const I=sf(y),{session:T,error:_,dirty:j,editing:w,saving:N,loading:H}=I;A!==b&&(E(b),d(!1),f(c));const[U,S]=te.useState(n);U!==n&&(S(n),p&&d(!1));const Z=te.useId(),$=`${Z}-tab-preview`,z=`${Z}-tab-source`,M=`${Z}-panel`,F=te.useRef(c),q=te.useRef(null),Y=te.useRef(null);let se;t[5]===Symbol.for("react.memo_cache_sentinel")?(se=ie=>{F.current=ie,q.current&&(q.current.tabIndex=ie==="preview"?0:-1),Y.current&&(Y.current.tabIndex=ie==="source"?0:-1),(ie==="preview"?q:Y).current?.focus()},t[5]=se):se=t[5];const Ce=se;let k;t[6]===Symbol.for("react.memo_cache_sentinel")?(k=ie=>{F.current=ie,f(ie)},t[6]=k):k=t[6];const ae=k;let he;t[7]===Symbol.for("react.memo_cache_sentinel")?(he=ie=>{const wt=uf(F.current,ie.key);wt!==null&&(ie.preventDefault(),Ce(wt))},t[7]=he):he=t[7];const x=he,ue=te.useRef(void 0);let ve,Be;t[8]===Symbol.for("react.memo_cache_sentinel")?(ve=()=>()=>{clearTimeout(ue.current)},Be=[],t[8]=ve,t[9]=Be):(ve=t[8],Be=t[9]),te.useEffect(ve,Be);let Ne;t[10]!==c?(Ne=()=>{F.current=c},t[10]=c,t[11]=Ne):Ne=t[11];let ne;t[12]!==c||t[13]!==b?(ne=[b,c],t[12]=c,t[13]=b,t[14]=ne):ne=t[14],te.useLayoutEffect(Ne,ne);let Te;t[15]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{q.current&&(q.current.tabIndex=F.current==="preview"?0:-1),Y.current&&(Y.current.tabIndex=F.current==="source"?0:-1)},t[15]=Te):Te=t[15],te.useLayoutEffect(Te);const ee=I.editing?I.session?.draft??"":typeof n=="string"?n:"";let de;if(t[16]!==I.editing||t[17]!==ee){e:{if(!I.editing){de=ee;break e}const ie=ee.split(/\r?\n/);if(ie[0]!=="---"){de=ee;break e}const wt=ie.findIndex(cf);de=wt<0?ee:ie.slice(wt+1).join(`
|
|
44
|
+
`).replace(/^\n/,"")}t[16]=I.editing,t[17]=ee,t[18]=de}else de=t[18];const De=de;let _e;t[19]!==ee?(_e=ee.trim(),t[19]=ee,t[20]=_e):_e=t[20];const Ae=_e.length>0;let Oe;t[21]!==De?(Oe=B.jsxDEV(Ru,{remarkPlugins:pf,components:ff,children:De},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:232,columnNumber:11},this),t[21]=De,t[22]=Oe):Oe=t[22];const Ye=Oe;let Ve;t[23]!==Ae||t[24]!==ee?(Ve=async()=>{if(Ae)try{await navigator.clipboard.writeText(ee),clearTimeout(ue.current),d(!0),ue.current=window.setTimeout(()=>d(!1),1500)}catch{}},t[23]=Ae,t[24]=ee,t[25]=Ve):Ve=t[25];const xt=Ve;let qe;t[26]!==u||t[27]!==I?(qe=async()=>{m.current=u,ae("source"),await I.beginEdit()||ae(m.current)},t[26]=u,t[27]=I,t[28]=qe):qe=t[28];const Ke=qe;let Je;t[29]!==I?(Je=()=>{I.discard(),ae(m.current)},t[29]=I,t[30]=Je):Je=t[30];const bt=Je;let Ze;t[31]!==I?(Ze=async()=>{await I.save()&&ae("preview")},t[31]=I,t[32]=Ze):Ze=t[32];const yt=Ze;let et;t[33]===Symbol.for("react.memo_cache_sentinel")?(et={display:"flex",gap:4},t[33]=et):et=t[33];const C=u==="preview",v=u==="preview"?0:-1;let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P=()=>ae("preview"),t[34]=P):P=t[34];let O;t[35]!==u?(O=u==="preview"?Yr:{},t[35]=u,t[36]=O):O=t[36];let G;t[37]!==O?(G={...Qr,...O},t[37]=O,t[38]=G):G=t[38];let le;t[39]===Symbol.for("react.memo_cache_sentinel")?(le=B.jsxDEV(uo,{size:12,style:{marginRight:5},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:340,columnNumber:11},this),t[39]=le):le=t[39];let me;t[40]!==M||t[41]!==$||t[42]!==C||t[43]!==v||t[44]!==G?(me=B.jsxDEV("button",{type:"button",role:"tab",id:$,ref:q,"aria-selected":C,"aria-controls":M,tabIndex:v,onClick:P,onKeyDown:x,style:G,children:[le,"Preview"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:349,columnNumber:11},this),t[40]=M,t[41]=$,t[42]=C,t[43]=v,t[44]=G,t[45]=me):me=t[45];const be=u==="source",Pe=u==="source"?0:-1;let Me;t[46]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>ae("source"),t[46]=Me):Me=t[46];let re;t[47]!==u?(re=u==="source"?Yr:{},t[47]=u,t[48]=re):re=t[48];let ye;t[49]!==re?(ye={...Qr,...re},t[49]=re,t[50]=ye):ye=t[50];let ge;t[51]===Symbol.for("react.memo_cache_sentinel")?(ge=B.jsxDEV(xo,{size:12,style:{marginRight:5},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:389,columnNumber:11},this),t[51]=ge):ge=t[51];let tt;t[52]!==M||t[53]!==z||t[54]!==be||t[55]!==Pe||t[56]!==ye?(tt=B.jsxDEV("button",{type:"button",role:"tab",id:z,ref:Y,"aria-selected":be,"aria-controls":M,tabIndex:Pe,onClick:Me,onKeyDown:x,style:ye,children:[ge,"Source"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:398,columnNumber:11},this),t[52]=M,t[53]=z,t[54]=be,t[55]=Pe,t[56]=ye,t[57]=tt):tt=t[57];let nt;t[58]!==me||t[59]!==tt?(nt=B.jsxDEV("div",{style:et,role:"tablist","aria-label":"Content view mode",children:[me,tt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:410,columnNumber:11},this),t[58]=me,t[59]=tt,t[60]=nt):nt=t[60];let Nt;t[61]===Symbol.for("react.memo_cache_sentinel")?(Nt={display:"flex",alignItems:"center",gap:6},t[61]=Nt):Nt=t[61];let rt;t[62]!==p||t[63]!==xt||t[64]!==Ae?(rt=Ae&&B.jsxDEV("button",{type:"button",onClick:()=>{xt()},style:dt,title:"Copy raw content",children:p?B.jsxDEV(B.Fragment,{children:[B.jsxDEV(tr,{size:12,color:"#22863a",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:139},this),B.jsxDEV("span",{style:{color:"#22863a",fontSize:11},children:"Copied"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:432,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:137},this):B.jsxDEV(B.Fragment,{children:[B.jsxDEV(po,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:435,columnNumber:33},this),B.jsxDEV("span",{style:{fontSize:11},children:"Copy"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:437,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:435,columnNumber:31},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:430,columnNumber:25},this),t[62]=p,t[63]=xt,t[64]=Ae,t[65]=rt):rt=t[65];let it;t[66]!==w||t[67]!==Ke||t[68]!==H||t[69]!==r?(it=r&&!w&&!H?B.jsxDEV("button",{type:"button",onClick:()=>{Ke()},style:dt,children:[B.jsxDEV(fo,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:449,columnNumber:123},this),"Edit"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:449,columnNumber:46},this):null,t[66]=w,t[67]=Ke,t[68]=H,t[69]=r,t[70]=it):it=t[70];let ot;t[71]!==H?(ot=H?B.jsxDEV("button",{type:"button",disabled:!0,style:{...dt,opacity:.65},children:[B.jsxDEV(er,{size:12,className:"animate-spin",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:465,columnNumber:8},this),"Loading…"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:462,columnNumber:21},this):null,t[71]=H,t[72]=ot):ot=t[72];let at;t[73]!==j||t[74]!==w||t[75]!==yt||t[76]!==bt||t[77]!==N?(at=w?B.jsxDEV(B.Fragment,{children:[B.jsxDEV("button",{type:"button",onClick:bt,disabled:N,style:dt,children:[B.jsxDEV(ho,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:107},this),"Cancel"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:23},this),B.jsxDEV("button",{type:"button",onClick:()=>{yt()},disabled:N||!j,title:j?void 0:"Make a change before applying",style:{...mf,opacity:N||!j?.55:1},children:[N?B.jsxDEV(er,{size:12,className:"animate-spin",style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:480,columnNumber:20},this):B.jsxDEV(tr,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:482,columnNumber:36},this),N?"Applying…":"Apply"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:477,columnNumber:48},this)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:475,columnNumber:21},this):null,t[73]=j,t[74]=w,t[75]=yt,t[76]=bt,t[77]=N,t[78]=at):at=t[78];let lt;t[79]!==rt||t[80]!==it||t[81]!==ot||t[82]!==at?(lt=B.jsxDEV("div",{style:Nt,children:[rt,it,ot,at]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:496,columnNumber:11},this),t[79]=rt,t[80]=it,t[81]=ot,t[82]=at,t[83]=lt):lt=t[83];let st;t[84]!==nt||t[85]!==lt?(st=B.jsxDEV("div",{style:df,children:[nt,lt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:507,columnNumber:11},this),t[84]=nt,t[85]=lt,t[86]=st):st=t[86];let ut;t[87]!==I||t[88]!==_?(ut=_?B.jsxDEV("div",{id:"markdown-editor-error",role:"alert",style:gf,children:[B.jsxDEV("span",{children:_.message},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:83},this),_.kind==="conflict"?B.jsxDEV("button",{type:"button",onClick:()=>{I.reloadLatest()},style:kf,children:[B.jsxDEV(co,{size:12,style:{marginRight:4},"aria-hidden":"true"},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:230},this),"Reload latest"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:140},this):null]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:516,columnNumber:19},this):null,t[87]=I,t[88]=_,t[89]=ut):ut=t[89];const Jt=u==="preview"?$:z,Zt=N||H;let ct;t[90]!==u||t[91]!==w||t[92]!==I||t[93]!==_||t[94]!==Ae||t[95]!==ee||t[96]!==Ye||t[97]!==N||t[98]!==T?.draft?(ct=u==="source"&&w?B.jsxDEV("textarea",{"aria-label":"Markdown source","aria-describedby":_?"markdown-editor-error":void 0,"aria-invalid":_?.kind==="validation"||void 0,value:T?.draft??"",onChange:ie=>I.changeDraft(ie.target.value),disabled:N,spellCheck:!1,style:bf},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:48},this):Ae?u==="source"?B.jsxDEV("pre",{style:wf,children:B.jsxDEV("code",{style:Sf,children:ee},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:501},this)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:473},this):B.jsxDEV("div",{style:Cf,children:Ye},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:559},this):B.jsxDEV("div",{style:yf,children:"No content available for this node."},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:529,columnNumber:375},this),t[90]=u,t[91]=w,t[92]=I,t[93]=_,t[94]=Ae,t[95]=ee,t[96]=Ye,t[97]=N,t[98]=T?.draft,t[99]=ct):ct=t[99];let pt;t[100]!==M||t[101]!==Jt||t[102]!==Zt||t[103]!==ct?(pt=B.jsxDEV("div",{role:"tabpanel",id:M,"aria-labelledby":Jt,"aria-busy":Zt,tabIndex:0,style:xf,children:ct},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:545,columnNumber:11},this),t[100]=M,t[101]=Jt,t[102]=Zt,t[103]=ct,t[104]=pt):pt=t[104];let Pt;return t[105]!==o||t[106]!==st||t[107]!==ut||t[108]!==pt?(Pt=B.jsxDEV("div",{className:o,style:hf,children:[st,ut,pt]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:556,columnNumber:11},this),t[105]=o,t[106]=st,t[107]=ut,t[108]=pt,t[109]=Pt):Pt=t[109],Pt}function cf(e,t){return t>0&&e==="---"}const pf=[Qp],ff={a:({href:e,children:t,title:n,node:r,...i})=>{if(!Yp(e))return B.jsxDEV("span",{style:{color:Q.ui.text.muted,textDecoration:"line-through"},children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:605,columnNumber:14},void 0);const a=e??"";return a.startsWith("#")?B.jsxDEV("a",{href:a,title:n,style:Kr,...i,children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:617,columnNumber:14},void 0):B.jsxDEV("a",{href:a,title:n,target:"_blank",rel:"noopener noreferrer",style:Kr,...i,children:[t,B.jsxDEV(mo,{size:10,style:{marginLeft:3,verticalAlign:"middle",display:"inline"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:623,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:621,columnNumber:12},void 0)},img:({src:e,alt:t})=>B.jsxDEV("span",{style:Df,title:e||"Image",children:[B.jsxDEV(yo,{size:12,style:{marginRight:5}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:634,columnNumber:7},void 0),B.jsxDEV("span",{children:["Image: ",t||e||"unlabeled"]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:637,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:633,columnNumber:9},void 0),h1:({children:e})=>B.jsxDEV("h1",{style:vf,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:641,columnNumber:9},void 0),h2:({children:e})=>B.jsxDEV("h2",{style:Ef,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:644,columnNumber:9},void 0),h3:({children:e})=>B.jsxDEV("h3",{style:Af,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:647,columnNumber:9},void 0),h4:({children:e})=>B.jsxDEV("h4",{style:If,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:650,columnNumber:9},void 0),p:({children:e})=>B.jsxDEV("p",{style:{margin:"0 0 8px 0"},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:653,columnNumber:9},void 0),ul:({children:e})=>B.jsxDEV("ul",{style:{margin:"0 0 8px 0",paddingLeft:18},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:658,columnNumber:9},void 0),ol:({children:e})=>B.jsxDEV("ol",{style:{margin:"0 0 8px 0",paddingLeft:18},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:664,columnNumber:9},void 0),li:({children:e})=>B.jsxDEV("li",{style:{marginBottom:3},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:670,columnNumber:9},void 0),blockquote:({children:e})=>B.jsxDEV("blockquote",{style:Tf,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:675,columnNumber:9},void 0),hr:()=>B.jsxDEV("hr",{style:{border:"none",borderTop:`1px solid ${Q.ui.surface.panelBorder}`,margin:"10px 0"}},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:676,columnNumber:13},void 0),table:({children:e})=>B.jsxDEV("div",{style:{width:"100%",overflowX:"auto",margin:"8px 0",borderRadius:6,border:`1px solid ${Q.ui.surface.panelBorder}`},children:B.jsxDEV("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:690,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:683,columnNumber:9},void 0),thead:({children:e})=>B.jsxDEV("thead",{style:{background:"rgba(28, 20, 24, 0.04)"},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:698,columnNumber:9},void 0),tbody:({children:e})=>B.jsxDEV("tbody",{children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:703,columnNumber:9},void 0),tr:({children:e})=>B.jsxDEV("tr",{style:{borderBottom:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:706,columnNumber:9},void 0),th:({children:e})=>B.jsxDEV("th",{style:{padding:"6px 8px",textAlign:"left",fontWeight:700,color:Q.ui.text.strong,borderRight:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:711,columnNumber:9},void 0),td:({children:e})=>B.jsxDEV("td",{style:{padding:"6px 8px",color:Q.ui.text.body,borderRight:`1px solid ${Q.ui.surface.panelBorder}`},children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:720,columnNumber:9},void 0),pre:({children:e})=>B.jsxDEV("pre",{style:Ff,children:e},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:727,columnNumber:9},void 0),code:({className:e,children:t})=>{const n=!e&&typeof t=="string"&&!t.includes(`
|
|
45
|
+
`);return B.jsxDEV("code",{style:n?Mf:Lf,children:t},void 0,!1,{fileName:"/Users/deepjoy/Documents/Alpha Semantic Hub/Alpha Semantic Hub Logo and Icon/explorer/src/workspaces/GraphWorkspace/MarkdownContentViewer.tsx",lineNumber:735,columnNumber:12},void 0)}},hf={display:"flex",flexDirection:"column",background:"rgba(28, 20, 24, 0.025)",border:`1px solid ${Q.ui.surface.panelBorder}`,borderRadius:12,overflow:"hidden"},df={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,flexWrap:"wrap",padding:"6px 10px",background:"rgba(0, 0, 0, 0.2)",borderBottom:`1px solid ${Q.ui.surface.panelBorder}`},Qr={display:"inline-flex",alignItems:"center",padding:"4px 9px",borderRadius:6,border:"1px solid transparent",background:"transparent",color:Q.ui.text.muted,fontSize:12,fontWeight:600,cursor:"pointer",transition:"all 150ms ease"},Yr={background:Q.ui.timeline.playheadSoft,border:`1px solid ${Q.ui.control.activeBorder}`,color:Q.ui.timeline.playhead},dt={display:"inline-flex",alignItems:"center",padding:"3px 8px",borderRadius:6,border:`1px solid ${Q.ui.surface.panelBorder}`,background:"rgba(28, 20, 24, 0.04)",color:Q.ui.text.subtle,fontSize:11,cursor:"pointer"},mf={...dt,background:Q.ui.control.primaryBg,border:`1px solid ${Q.ui.control.primaryBorder}`,color:Q.ui.control.primaryText,fontWeight:700},gf={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 12px",color:"#552925",background:"rgba(248, 81, 73, 0.1)",borderBottom:"1px solid rgba(248, 81, 73, 0.25)",fontSize:12,lineHeight:1.5},kf={...dt,flexShrink:0,color:"#552925",border:"1px solid rgba(248, 81, 73, 0.32)"},xf={padding:12,maxHeight:380,overflowY:"auto"},bf={display:"block",boxSizing:"border-box",width:"100%",minHeight:280,resize:"vertical",padding:10,borderRadius:8,border:`1px solid ${Q.ui.control.activeBorder}`,background:"rgba(0, 0, 0, 0.3)",color:Q.ui.text.strong,fontFamily:"'JetBrains Mono', 'Fira Code', monospace",fontSize:12,lineHeight:1.6},yf={color:Q.ui.text.muted,fontSize:12,lineHeight:1.5,fontStyle:"italic"},wf={margin:0,padding:10,borderRadius:8,background:"rgba(0, 0, 0, 0.3)",border:"1px solid rgba(28, 20, 24, 0.05)",overflowX:"auto"},Sf={fontFamily:"'JetBrains Mono', 'Fira Code', monospace",fontSize:12,lineHeight:1.6,color:Q.ui.text.strong,whiteSpace:"pre-wrap",wordBreak:"break-word",userSelect:"text"},Cf={color:Q.ui.text.body,fontSize:13,lineHeight:1.6,wordBreak:"break-word"},vf={fontSize:16,fontWeight:700,color:Q.ui.text.strong,marginTop:8,marginBottom:6,paddingBottom:3,borderBottom:`1px solid ${Q.ui.surface.panelBorder}`},Ef={fontSize:14,fontWeight:700,color:Q.ui.text.strong,marginTop:8,marginBottom:4},Af={fontSize:13,fontWeight:600,color:Q.ui.text.strong,marginTop:6,marginBottom:4},If={fontSize:12,fontWeight:600,color:Q.ui.text.strong,marginTop:4,marginBottom:2},Tf={margin:"8px 0",padding:"6px 12px",borderLeft:`3px solid ${Q.ui.timeline.playhead}`,background:"rgba(98, 226, 205, 0.05)",borderRadius:"0 6px 6px 0",color:Q.ui.text.body,fontStyle:"italic"},Kr={color:"#d9455e",textDecoration:"underline",textUnderlineOffset:"3px",wordBreak:"break-all"},Df={display:"inline-flex",alignItems:"center",padding:"3px 7px",background:"rgba(28, 20, 24, 0.04)",border:`1px solid ${Q.ui.surface.panelBorder}`,borderRadius:6,color:Q.ui.text.muted,fontSize:11,margin:"3px 0"},Mf={fontFamily:"'JetBrains Mono', monospace",fontSize:12,padding:"2px 5px",borderRadius:4,background:"rgba(28, 20, 24, 0.07)",color:"#2d1619",border:"1px solid rgba(28, 20, 24, 0.08)"},Ff={margin:"8px 0",padding:10,borderRadius:8,background:"rgba(0, 0, 0, 0.35)",border:"1px solid rgba(28, 20, 24, 0.08)",overflowX:"auto"},Lf={fontFamily:"'JetBrains Mono', monospace",fontSize:12,lineHeight:1.5,color:"#2d1619"};export{Vf as M,Jp as r};
|