11 lines
346 KiB
JavaScript
11 lines
346 KiB
JavaScript
|
|
import{r as dB,g as yB,a as DB}from"./react.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))Q(o);new MutationObserver(o=>{for(const B of o)if(B.type==="childList")for(const y of B.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&Q(y)}).observe(document,{childList:!0,subtree:!0});function c(o){const B={};return o.integrity&&(B.integrity=o.integrity),o.referrerPolicy&&(B.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?B.credentials="include":o.crossOrigin==="anonymous"?B.credentials="omit":B.credentials="same-origin",B}function Q(o){if(o.ep)return;o.ep=!0;const B=c(o);fetch(o.href,B)}})();var je;je={__e:function(i,e,c,Q){for(var o,B,y;e=e.__;)if((o=e.__c)&&!o.__)try{if((B=o.constructor)&&B.getDerivedStateFromError!=null&&(o.setState(B.getDerivedStateFromError(i)),y=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(i,Q||{}),y=o.__d),y)return o.__E=o}catch(r){i=r}throw i}},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var Ko=0;function $(i,e,c,Q,o,B){e||(e={});var y,r,G=e;if("ref"in G)for(r in G={},e)r=="ref"?y=e[r]:G[r]=e[r];var k={type:i,props:G,key:c,ref:y,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ko,__i:-1,__u:0,__source:o,__self:B};if(typeof i=="function"&&(y=i.defaultProps))for(r in y)G[r]===void 0&&(G[r]=y[r]);return je.vnode&&je.vnode(k),k}var QA=dB();const wA=yB(QA);var Xo=DB(),Ke={exports:{}},la={},Xe={exports:{}},qe={};var Vu;function qo(){return Vu||(Vu=1,(function(i){function e(m,U){var X=m.length;m.push(U);A:for(;0<X;){var nA=X-1>>>1,uA=m[nA];if(0<o(uA,U))m[nA]=U,m[X]=uA,X=nA;else break A}}function c(m){return m.length===0?null:m[0]}function Q(m){if(m.length===0)return null;var U=m[0],X=m.pop();if(X!==U){m[0]=X;A:for(var nA=0,uA=m.length,pA=uA>>>1;nA<pA;){var yA=2*(nA+1)-1,tA=m[yA],T=yA+1,Qg=m[T];if(0>o(tA,X))T<uA&&0>o(Qg,tA)?(m[nA]=Qg,m[T]=X,nA=T):(m[nA]=tA,m[yA]=X,nA=yA);else if(T<uA&&0>o(Qg,X))m[nA]=Qg,m[T]=X,nA=T;else break A}}return U}function o(m,U){var X=m.sortIndex-U.sortIndex;return X!==0?X:m.id-U.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var B=performance;i.unstable_now=function(){return B.now()}}else{var y=Date,r=y.now();i.unstable_now=function(){return y.now()-r}}var G=[],k=[],b=1,w=null,p=3,V=!1,F=!1,O=!1,oA=!1,v=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function L(m){for(var U=c(k);U!==null;){if(U.callback===null)Q(k);else if(U.startTime<=m)Q(k),U.sortIndex=U.expirationTime,e(G,U);else break;U=c(k)}}function iA(m){if(O=!1,L(m),!F)if(c(G)!==null)F=!0,IA||(IA=!0,HA());else{var U=c(k);U!==null&&ng(iA,U.startTime-m)}}var IA=!1,GA=-1,zA=5,eg=-1;function K(){return oA?!0:!(i.unstable_now()-eg<zA)}function tg(){if(oA=!1,IA){var m=i.unstable_now();eg=m;var U=!0;try{A:{F=!1,O&&(O=!1,j(GA),GA=-1),V=!0;var X=p;try{g:{for(L(m),w=c(G);w!==null&&!(w.expirationTime>m&&K());){var nA=w.callback;if(typeof nA=="function"){w.callback=null,p=w.priorityLevel;var uA=nA(w.expirationTime<=m);if(m=i.unstable_now(),typeof uA=="function"){w.callback=uA,L(m),U=!0;break g}w===c(G)&&Q(G),L(m)}else Q(G);w=c(G)}if(w!==null)U=!0;else{var pA=c(k);pA!==null&&ng(iA,pA.startTime-m),U=!1}}break A}finally{w=null,p=X,V=!1}U=void 0}}finally{U?HA():IA=!1}}}var HA;if(typeof H=="function")HA=function(){H(tg)};else if(typeof MessageChannel<"u"){var CA=new MessageChannel,cA=CA.port2;CA.port1.onmessage=tg,HA=function(){cA.postMessage(null)}}else HA=function(){v(tg,0)};function ng(m,U){GA=v(function(){m(i.unstable_now())},U)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(m){m.callback=null},i.unstable_forceFrameRate=function(m){0>m||125<m?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame r
|
|||
|
|
at`)?" (<anonymous>)":-1<I.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|||
|
|
`+ug+A+mI}var $g=!1;function tt(A,g){if(!A||$g)return"";$g=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var t={DetermineComponentFrameRoot:function(){try{if(g){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(D){var d=D}Reflect.construct(A,[],M)}else{try{M.call()}catch(D){d=D}A.call(M.prototype)}}else{try{throw Error()}catch(D){d=D}(M=A())&&typeof M.catch=="function"&&M.catch(function(){})}}catch(D){if(D&&d&&typeof D.stack=="string")return[D.stack,d.stack]}return[null,null]}};t.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(t.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(t.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=t.DetermineComponentFrameRoot(),C=a[0],n=a[1];if(C&&n){var u=C.split(`
|
|||
|
|
`),h=n.split(`
|
|||
|
|
`);for(l=t=0;t<u.length&&!u[t].includes("DetermineComponentFrameRoot");)t++;for(;l<h.length&&!h[l].includes("DetermineComponentFrameRoot");)l++;if(t===u.length||l===h.length)for(t=u.length-1,l=h.length-1;1<=t&&0<=l&&u[t]!==h[l];)l--;for(;1<=t&&0<=l;t--,l--)if(u[t]!==h[l]){if(t!==1||l!==1)do if(t--,l--,0>l||u[t]!==h[l]){var S=`
|
|||
|
|
`+u[t].replace(" at new "," at ");return A.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",A.displayName)),S}while(1<=t&&0<=l);break}}}finally{$g=!1,Error.prepareStackTrace=I}return(I=A?A.displayName||A.name:"")?xg(I):""}function UA(A,g){switch(A.tag){case 26:case 27:case 5:return xg(A.type);case 16:return xg("Lazy");case 13:return A.child!==g&&g!==null?xg("Suspense Fallback"):xg("Suspense");case 19:return xg("SuspenseList");case 0:case 15:return tt(A.type,!1);case 11:return tt(A.type.render,!1);case 1:return tt(A.type,!0);case 31:return xg("Activity");default:return""}}function na(A){try{var g="",I=null;do g+=UA(A,I),I=A,A=A.return;while(A);return g}catch(t){return`
|
|||
|
|
Error generating stack: `+t.message+`
|
|||
|
|
`+t.stack}}var RI=Object.prototype.hasOwnProperty,ul=i.unstable_scheduleCallback,AI=i.unstable_cancelCallback,ki=i.unstable_shouldYield,lt=i.unstable_requestPaint,bA=i.unstable_now,Bl=i.unstable_getCurrentPriorityLevel,MA=i.unstable_ImmediatePriority,gI=i.unstable_UserBlockingPriority,El=i.unstable_NormalPriority,OA=i.unstable_LowPriority,Gt=i.unstable_IdlePriority,II=i.log,Ji=i.unstable_setDisableYieldValue,tI=null,ag=null;function Zg(A){if(typeof II=="function"&&Ji(A),ag&&typeof ag.setStrictMode=="function")try{ag.setStrictMode(tI,A)}catch{}}var _A=Math.clz32?Math.clz32:P,J=Math.log,q=Math.LN2;function P(A){return A>>>=0,A===0?32:31-(J(A)/q|0)|0}var sA=256,kA=262144,Bg=4194304;function ig(A){var g=A&42;if(g!==0)return g;switch(A&-A){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return A&261888;case 262144:case 524288:case 1048576:case 2097152:return A&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return A&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return A}}function kg(A,g,I){var t=A.pendingLanes;if(t===0)return 0;var l=0,a=A.suspendedLanes,C=A.pingedLanes;A=A.warmLanes;var n=t&134217727;return n!==0?(t=n&~a,t!==0?l=ig(t):(C&=n,C!==0?l=ig(C):I||(I=n&~A,I!==0&&(l=ig(I))))):(n=t&~a,n!==0?l=ig(n):C!==0?l=ig(C):I||(I=t&~A,I!==0&&(l=ig(I)))),l===0?0:g!==0&&g!==l&&(g&a)===0&&(a=l&-l,I=g&-g,a>=I||a===32&&(I&4194048)!==0)?g:l}function Og(A,g){return(A.pendingLanes&~(A.suspendedLanes&~A.pingedLanes)&g)===0}function lI(A,g){switch(A){case 1:case 2:case 4:case 8:case 64:return g+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kg(){var A=Bg;return Bg<<=1,(Bg&62914560)===0&&(Bg=4194304),A}function aI(A){for(var g=[],I=0;31>I;I++)g.push(A);return g}function at(A,g){A.pendingLanes|=g,g!==268435456&&(A.suspendedLanes=0,A.pingedLanes=0,A.warmLanes=0)}function VA(A,g,I,t,l,a){var C=A.pendingLanes;A.pendingLanes=I,A.suspendedLanes=0,A.pingedLanes=0,A.warmLanes=0,A.expiredLanes&=I,A.entangledLanes&=I,A.errorRecoveryDisabledLanes&=I,A.shellSuspendCounter=0;var n=A.entanglements,u=A.expirationTimes,h=A.hiddenUpdates;for(I=C&~I;0<I;){var S=31-_A(I),M=1<<S;n[S]=0,u[S]=-1;var d=h[S];if(d!==null)for(h[S]=null,S=0;S<d.length;S++){var D=d[S];D!==null&&(D.lane&=-536870913)}I&=~M}t!==0&&Pe(A,t,0),a!==0&&l===0&&A.tag!==0&&(A.suspendedLanes|=a&~(C&~g))}function Pe(A,g,I){A.pendingLanes|=g,A.suspendedLanes&=~g;var t=31-_A(g);A.entangledLanes|=g,A.entanglements[t]=A.entanglements[t]|1073741824|I&261930}function $e(A,g){var I=A.entangledLanes|=g;for(A=A.entanglements;I;){var t=31-_A(I),l=1<<t;l&g|A[t]&g&&(A[t]|=g),I&=~l}}function An(A,g){var I=g&-g;return I=(I&42)!==0?1:wi(I),(I&(A.suspendedLanes|g))!==0?0:I}function wi(A){switch(A){case 2:A=1;break;case 8:A=4;break;case 32:A=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:A=128;break;case 268435456:A=134217728;break;default:A=0}return A}function Ui(A){return A&=-A,2<A?8<A?(A&134217727)!==0?32:268435456:8:2}function gn(){var A=U.p;return A!==0?A:(A=window.event,A===void 0?32:xu(A.type))}function In(A,g){var I=U.p;try{return U.p=A,g()}finally{U.p=I}}var MI=Math.random().toString(36).slice(2),PA="__reactFiber$"+MI,Eg="__reactProps$"+MI,mt="__reactContainer$"+MI,bi="__reactEvents$"+MI,JB="__reactListeners$"+MI,wB="__reactHandles$"+MI,tn="__reactResources$"+MI,ol="__reactMarker$"+MI;function Fi(A)
|
|||
|
|
`).replace(no,"")}function ou(A,g){return g=Eu(g),Eu(A)===g}function rA(A,g,I,t,l,a){switch(I){case"children":typeof t=="string"?g==="body"||g==="textarea"&&t===""||Ut(A,t):(typeof t=="number"||typeof t=="bigint")&&g!=="body"&&Ut(A,""+t);break;case"className":ca(A,"class",t);break;case"tabIndex":ca(A,"tabindex",t);break;case"dir":case"role":case"viewBox":case"width":case"height":ca(A,I,t);break;case"style":on(A,t,a);break;case"data":if(g!=="object"){ca(A,"data",t);break}case"src":case"href":if(t===""&&(g!=="a"||I!=="href")){A.removeAttribute(I);break}if(t==null||typeof t=="function"||typeof t=="symbol"||typeof t=="boolean"){A.removeAttribute(I);break}t=Ba(""+t),A.setAttribute(I,t);break;case"action":case"formAction":if(typeof t=="function"){A.setAttribute(I,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(I==="formAction"?(g!=="input"&&rA(A,g,"name",l.name,l,null),rA(A,g,"formEncType",l.formEncType,l,null),rA(A,g,"formMethod",l.formMethod,l,null),rA(A,g,"formTarget",l.formTarget,l,null)):(rA(A,g,"encType",l.encType,l,null),rA(A,g,"method",l.method,l,null),rA(A,g,"target",l.target,l,null)));if(t==null||typeof t=="symbol"||typeof t=="boolean"){A.removeAttribute(I);break}t=Ba(""+t),A.setAttribute(I,t);break;case"onClick":t!=null&&(A.onclick=CI);break;case"onScroll":t!=null&&gA("scroll",A);break;case"onScrollEnd":t!=null&&gA("scrollend",A);break;case"dangerouslySetInnerHTML":if(t!=null){if(typeof t!="object"||!("__html"in t))throw Error(Q(61));if(I=t.__html,I!=null){if(l.children!=null)throw Error(Q(60));A.innerHTML=I}}break;case"multiple":A.multiple=t&&typeof t!="function"&&typeof t!="symbol";break;case"muted":A.muted=t&&typeof t!="function"&&typeof t!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(t==null||typeof t=="function"||typeof t=="boolean"||typeof t=="symbol"){A.removeAttribute("xlink:href");break}I=Ba(""+t),A.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",I);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":t!=null&&typeof t!="function"&&typeof t!="symbol"?A.setAttribute(I,""+t):A.removeAttribute(I);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":t&&typeof t!="function"&&typeof t!="symbol"?A.setAttribute(I,""):A.removeAttribute(I);break;case"capture":case"download":t===!0?A.setAttribute(I,""):t!==!1&&t!=null&&typeof t!="function"&&typeof t!="symbol"?A.setAttribute(I,t):A.removeAttribute(I);break;case"cols":case"rows":case"size":case"span":t!=null&&typeof t!="function"&&typeof t!="symbol"&&!isNaN(t)&&1<=t?A.setAttribute(I,t):A.removeAttribute(I);break;case"rowSpan":case"start":t==null||typeof t=="function"||typeof t=="symbol"||isNaN(t)?A.removeAttribute(I):A.setAttribute(I,t);break;case"popover":gA("beforetoggle",A),gA("toggle",A),Qa(A,"popover",t);break;case"xlinkActuate":iI(A,"http://www.w3.org/1999/xlink","xlink:actuate",t);break;case"xlinkArcrole":iI(A,"http://www.w3.org/1999/xlink","xlink:arcrole",t);break;case"xlinkRole":iI(A,"http://www.w3.org/1999/xlink","xlink:role",t);break;case"xlinkShow":iI(A,"http://www.w3.org/1999/xlink","xlink:show",t);break;case"xlinkTitle":iI(A,"http://www.w3.org/1999/xlink","xlink:title",t);break;case"xlinkType":iI(A,"http://www.w3.org/1999/xlink","xlink:type",t);break;case"xmlBase":iI(A,"http://www.w3.org/XML/1998/namespace","xml:ba
|
|||
|
|
`,this.state.error.stack]}):this.props.children}}const mi=["World","Ecology","Species","Civilizations","Technologies","Conflicts","Themes","Root"];function PI(i,e){return e?.title?e.title:i.split("/").at(-1).replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())}function gt(i){return i.endsWith("/")?`${i.slice(0,-1)}/index`:i}function SI(i){return i.includes("/")?i.split("/")[0]:"Root"}function sB(i){return i==="index"?"/index.html":`/${i.split("/").map(encodeURIComponent).join("/")}.html`}function uf(i,e){const c=new URL(i,window.location.href);if(c.origin!==window.location.origin)return null;const Q=decodeURIComponent(c.pathname).replace(/^\//,"").replace(/\.html$/,"").replace(/\/$/,"/index"),o=gt(Q||"index");return e.has(o)?o:null}function fB(i){const e=window.location.hash.match(/^#note=(.+)$/);if(!e)return null;const c=gt(decodeURIComponent(e[1]));return i.has(c)?{kind:"node",graphKey:"architecture",nodeId:c}:null}function Bf(i){const e=document.body.dataset.slug,c=decodeURIComponent(window.location.pathname).replace(/^\//,"").replace(/\.html$/,"").replace(/\/$/,"/index"),Q=gt(e||c||"index");return i.has(Q)?{kind:"node",graphKey:"architecture",nodeId:Q}:null}function Ef(i,e){const c=mi.indexOf(i),Q=mi.indexOf(e);if(c!==-1||Q!==-1){const o=c===-1?mi.length:c,B=Q===-1?mi.length:Q;return o-B}return i.localeCompare(e)}function kB(i){const e=(i.content??"").replace(/\s+/g," ").replace(/^Table of contents\s*/i,"").trim();if(!e)return`Vault note at ${i.filePath??i.slug}.`;const c=e.search(/[.!?](\s|$)/),Q=c>=0?e.slice(0,c+1):e;return Q.length<=220?Q:`${Q.slice(0,217).trim()}...`}function cl(i,e){return(i.links??[]).map(gt).filter((c,Q,o)=>e.has(c)&&o.indexOf(c)===Q)}function of(i,e){const c=new Map;for(const[Q]of i)c.set(Q,[]);for(const[Q,o]of i)for(const B of cl(o,e))c.get(B)?.push(Q);return c}function sf(i,e){const c=new Map;for(const[Q,o]of i){const B=SI(Q);for(const y of cl(o,e)){const r=SI(y),G=`${B}->${r}`;c.set(G,(c.get(G)??0)+1)}}return Array.from(c.entries()).map(([Q,o])=>{const[B,y]=Q.split("->");return{id:`section:${Q}`,source_id:`section:${B}`,target_id:`section:${y}`,kind:B===y?"internal_links":"cross_links",label:`${o} ${o===1?"link":"links"}`,mechanism:B===y?`${o} wiki ${o===1?"link stays":"links stay"} inside ${B}.`:`${o} wiki ${o===1?"link runs":"links run"} from ${B} into ${y}.`}})}function ff(i){const e=Object.entries(i).map(([k,b])=>{const w=gt(b.slug||k);return[w,{...b,slug:w}]}).filter(([k])=>!k.startsWith("Inspirations/")).sort(([k],[b])=>k.localeCompare(b)),c=new Map(e),Q=new Set(e.map(([k])=>k)),o=of(e,Q),B=e.map(([k,b])=>{const w=cl(b,Q).length,p=o.get(k)?.length??0;return{id:k,title:PI(k,b),status:p>0?"linked":"source",purpose:kB(b),mechanism:`${w} outgoing wiki ${w===1?"link":"links"}; ${p} incoming ${p===1?"backlink":"backlinks"}. Folder: ${SI(k)}.`,metaphor:b.filePath??k}}),y=e.flatMap(([k,b])=>cl(b,Q).map((w,p)=>({id:`${k}->${w}:${p}`,source_id:k,target_id:w,kind:"wiki_link",label:"links to",mechanism:`${PI(k,b)} links to ${PI(w,c.get(w))}.`}))),G=Array.from(new Set(e.map(([k])=>SI(k)))).sort(Ef).map(k=>{const b=e.filter(([F])=>SI(F)===k),w=new Set(b.map(([F])=>F)),p=b.reduce((F,[,O])=>F+cl(O,Q).filter(oA=>!w.has(oA)).length,0),V=e.reduce((F,[O,oA])=>SI(O)===k?F:F+cl(oA,Q).filter(v=>w.has(v)).length,0);return{id:`section:${k}`,title:k,status:"active",purpose:`${b.length} ${b.length===1?"note":"notes"} in this vault section.`,mechanism:`${p} outgoing cross-section ${p===1?"link":"links"}; ${V} incoming cross-section ${V===1?"backlink":"backlinks"}.`,metaphor:"Quartz backlink cluster"}});return{architecture:{nodes:B,edges:y},dataflow:{nodes:G,edges:sf(e,Q)},links:e.map(([k])=>({architecture_node_id:k,dataflow_node_id:`section:${SI(k)}`,relationship:"section membership"}))}}async function hf(){const i=window.fetchData?await window.fetchData:await fetch("/static/contentIndex.json").then(e=>e.json());return{contentIndex:i,graphState:ff(i)}}async function df(i){const e=await fetch(sB(i));if(!e.ok)throw new Error(`Could not load ${i}: ${e.status}`);const c=await e.text(),o=new DOMParser().parseFromS
|
|||
|
|
`,b.stack]}):i?$("main",{className:"gamecult-epiphany-graph-app",children:$(cf,{children:$(ds,{state:i,title:"GameCult Knowledge Graph",selection:o,viewportTarget:y,onViewportTargetComplete:j,onSelectionChange:B,overlayPanels:!0,className:"gamecult-graph-shell",showSidebar:!1,focusSelection:!0,selectionFocusMode:"article",onExpandedNodeClick:H,nodeArticle:{className:"gamecult-expanded-article-node",ariaLabel:L=>`${L.title} article node`,content:L=>$(rf,{node:L,articleCache:G,contentIndex:c,ensureArticle:oA,onSelectNote:v,onArticleLinkClick:H})},graphLabels:{architecture:"Notes",dataflow:"Sections"},graphDescriptions:{architecture:"Notes are individual vault pages from the gamecult knowledge base. Their edges are Quartz wiki links, with incoming backlinks counted into each node.",dataflow:"Sections are folder-level clusters. Their edges summarize how links and backlinks move between regions of the vault."},layoutMode:{architecture:"combined-force",dataflow:"combined-force"}})})}):$("main",{className:"gamecult-epiphany-graph-app",children:$("div",{className:"gamecult-graph-loading",children:"Loading Quartz backlink graph..."})})}function rf({node:i,articleCache:e,contentIndex:c,ensureArticle:Q,onSelectNote:o,onArticleLinkClick:B}){const y=i.graphKey==="architecture"?i.id:null,r=i.graphKey==="dataflow"?i.id.replace(/^section:/,""):null;return wA.useEffect(()=>{y&&Q(y)},[Q,y]),$(Nf,{articleState:y?e[y]??{status:"idle",html:null}:{status:"idle",html:null},contentIndex:c,noteSlug:y,section:r,onSelectNote:o,onArticleLinkClick:B})}function Nf({articleState:i,contentIndex:e,noteSlug:c,section:Q,onSelectNote:o,onArticleLinkClick:B}){const y=c&&e?e[c]:null,r=wA.useMemo(()=>!Q||!e?[]:Object.entries(e).map(([G,k])=>[gt(k.slug||G),k]).filter(([G])=>SI(G)===Q).sort(([G,k],[b,w])=>PI(G,k).localeCompare(PI(b,w))),[e,Q]);return Q?$("article",{className:"gamecult-spa-panel",children:[$("header",{className:"gamecult-spa-article-header",children:[$("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:hB(Q)}),$("span",{className:"gamecult-spa-title-cluster",children:[$("p",{className:"gamecult-spa-kicker",children:"Section Cluster"}),$("h1",{children:Q})]})]}),$("p",{className:"gamecult-spa-summary",children:[r.length," notes live in this section. Pick one and the graph becomes the table of contents it was clearly auditioning to be."]}),$("div",{className:"gamecult-spa-note-list",children:r.map(([G,k])=>$("button",{type:"button",onClick:()=>o(G),children:[$("strong",{children:PI(G,k)}),$("span",{children:kB(k)})]},G))})]}):!c||!y?$("article",{className:"gamecult-spa-panel",children:[$("header",{className:"gamecult-spa-article-header",children:[$("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:"GC"}),$("span",{className:"gamecult-spa-title-cluster",children:[$("p",{className:"gamecult-spa-kicker",children:"Graph Atlas"}),$("h1",{children:"gamecult"})]})]}),$("p",{className:"gamecult-spa-summary",children:"Select a note to read it here. The graph is the site map now, which is probably what it was trying to confess."})]}):$("article",{className:"gamecult-spa-panel",children:[$("header",{className:"gamecult-spa-article-header",children:[$("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:hB(PI(c,y))}),$("span",{className:"gamecult-spa-title-cluster",children:[$("p",{className:"gamecult-spa-kicker",children:SI(c)}),$("h1",{children:PI(c,y)})]})]}),i.status==="loading"&&$("div",{className:"gamecult-spa-status",children:"Loading article..."}),i.status==="error"&&$("div",{className:"gamecult-spa-status gamecult-spa-status-error",children:i.message}),i.status==="ready"&&$("div",{className:"gamecult-spa-article","data-epiphany-article-content":!0,onClick:B,dangerouslySetInnerHTML:{__html:i.html}}),i.status!=="ready"&&i.html&&$("div",{className:"gamecult-spa-article","data-epiphany-article-content":!0,onClick:B,dangerouslySetInnerHTML:{__html:i.html}})]})}function hB(i){const e=i.replace(/['’]/g,"").split(/[^A-Za-z0-9]+/).filter(Boolean);return e.length===0?"GC":e.slice(0,2).map(c
|