1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{20624:function(e,n,t){"use strict";t.r(n),t.d(n,{Graph:function(){return Xt},GraphPage:function(){return Gt},default:function(){return qt},getThemeColor:function(){return Kt},hexToRGBA:function(){return $t},normalizeLinkEnds:function(){return Qt}});var r=t(30266),o=t(83789),i=t(92809),l=t(80318),s=t(809),c=t.n(s),a=t(97375),u=t(68527),d=t(47398),h=t(68921),g=t(105),f=t(27549),p=t(74376),x=t(52596),j=t(9008),b=t(67294),v=t(32802),m=t.n(v),y=t(47516),C=t(63750),O=t(22003),w=t(31122),k=t(7520),S=t(36194),N=[],I={};for(var P in S.oY)for(var D in S.oY[P]){var B=P+D;"LinearNone"===B&&(B="Linear"),N.push(B),I[B]=S.oY[P][D]}var L=I,T={enabled:!0,charge:-700,collision:!0,collisionStrength:20,centering:!0,centeringStrength:.2,linkStrength:.3,linkIts:1,alphaDecay:.05,alphaTarget:0,alphaMin:0,velocityDecay:.25,gravity:.3,gravityOn:!0,gravityLocal:!1},z={orphans:!1,dailies:!1,parent:"heading",filelessCites:!1,tagsBlacklist:[],tagsWhitelist:[],dirsBlocklist:[],dirsAllowlist:[],bad:!0,nodes:[],links:[],date:[],noter:!0},F={method:"degree"},E={particles:!1,particlesNumber:0,particlesWidth:4,arrows:!1,arrowsLength:1,arrowsPos:.5,arrowsColor:"",linkOpacity:.8,linkWidth:1,nodeRel:3,nodeOpacity:1,nodeResolution:12,labels:2,labelScale:1.5,labelFontSize:10,labelLength:40,labelWordWrap:25,labelLineSpace:1,labelDynamicDegree:8,labelDynamicStrength:.5,highlight:!0,highlightNodeSize:1.1,highlightLinkSize:.7,highlightFade:.8,highlightAnim:!0,animationSpeed:360,algorithmOptions:N,algorithmName:"CircularOut",linkColorScheme:"gray.500",nodeColorScheme:["red.500","gray.600","yellow.500","green.500","cyan.500","blue.500","pink.500","purple.500","orange.500"],nodeHighlight:"purple.500",linkHighlight:"purple.500",backgroundColor:"white",emacsNodeColor:"gray.800",labelTextColor:"black",labelBackgroundColor:"",labelBackgroundOpacity:.7,citeDashes:!0,citeDashLength:35,citeGapLength:15,citeLinkColor:"gray.700",citeLinkHighlightColor:"",citeNodeColor:"black",refDashes:!0,refDashLength:35,refGapLength:15,refLinkColor:"gray.700",refLinkHighlightColor:"",refNodeColor:"black",nodeSizeLinks:.5,nodeZoomSize:1.2},R={follow:"zoom",localSame:"add",zoomPadding:200,zoomSpeed:2e3},Z={highlight:"hover",local:"double",follow:"never",context:"right",preview:"click",backgroundExitsLocal:!1},H={neighbors:1},W=["red.500","orange.500","yellow.500","green.500","cyan.500","blue.500","pink.500","purple.500","white","gray.100","gray.200","gray.300","gray.400","gray.500","gray.600","gray.700","gray.800","gray.900","black"],A=t(57324),M=t(90232),V=t(52072);function _(e,n,t){t.send(JSON.stringify({command:e,data:n}))}function U(e,n){_("open",{id:e.id},n)}var q=t(10219),G=t(44592),X=t(38554),J=t.n(X),Q=t(53869),K=t(99860);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]};var ne=function(e,n){return Y(Y({},e),{},{delay:(0,G.hj)(n)?n:null===n||void 0===n?void 0:n.enter})},te=function(e,n){return Y(Y({},e),{},{delay:(0,G.hj)(n)?n:null===n||void 0===n?void 0:n.exit})},re=t(85893),oe=["in","unmountOnExit","animateOpacity","startingSize","endingSize","dimension","style","className","transition","transitionEnd"];function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se=function(e){return null!=e&&parseInt(e.toString(),10)>0},ce={exit:{size:{duration:.2,ease:ee.ease},opacity:{duration:.3,ease:ee.ease}},enter:{size:{duration:.3,ease:ee.ease},opacity:{duration:.4,ease:ee.ease}}},ae={exit:function(e){var n,t,r=e.animateOpacity,o=e.startingSize,l=e.transition,s=e.transitionEnd,c=e.delay,a=e.dimension;return le(le({},r&&{opacity:se(o)?1:0}),{},(t={overflow:"hidden"},(0,i.Z)(t,a,o),(0,i.Z)(t,"transitionEnd",null===s||void 0===s?void 0:s.exit),(0,i.Z)(t,"transition",null!==(n=null===l||void 0===l?void 0:l.exit)&&void 0!==n?n:te(ce.exit,c)),t))},enter:function(e){var n,t,r=e.animateOpacity,o=e.endingSize,l=e.transition,s=e.transitionEnd,c=e.delay,a=e.dimension;return le(le({},r&&{opacity:1}),{},(t={},(0,i.Z)(t,a,o),(0,i.Z)(t,"transitionEnd",null===s||void 0===s?void 0:s.enter),(0,i.Z)(t,"transition",null!==(n=null===l||void 0===l?void 0:l.enter)&&void 0!==n?n:ne(ce.enter,c)),t))}},ue=b.forwardRef((function(e,n){var t=e.in,r=e.unmountOnExit,o=e.animateOpacity,i=void 0===o||o,s=e.startingSize,c=void 0===s?0:s,a=e.endingSize,u=void 0===a?"auto":a,d=e.dimension,h=void 0===d?"height":d,g=e.style,f=e.className,p=e.transition,x=e.transitionEnd,j=(0,q.Z)(e,oe),v=b.useState(!1),m=(0,l.Z)(v,2),y=m[0],C=m[1];b.useEffect((function(){var e=setTimeout((function(){C(!0)}));return function(){return clearTimeout(e)}}),[]),(0,G.ZK)({condition:Boolean(c>0&&r),message:"startingSize and unmountOnExit are mutually exclusive. You can't use them together"});var O=parseFloat(c.toString())>0,w={startingSize:c,endingSize:u,animateOpacity:i,dimension:h,transition:y?p:{enter:{duration:0}},transitionEnd:J()(x,{enter:{overflow:"initial"},exit:r?void 0:{display:O?"block":"none"}})},k=!r||t,S=t||r?"enter":"exit";return(0,re.jsx)(Q.M,{initial:!1,custom:w,children:k&&(0,re.jsx)(K.E.div,le(le({ref:n},j),{},{className:(0,G.cx)("chakra-collapse",f),style:le({overflow:"hidden",display:"block"},g),custom:w,variants:ae,initial:!!r&&"exit",animate:S,exit:"exit"}))})}));function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function he(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}G.Ts&&(ue.displayName="Collapse");var ge=function(e){var n=e.setTagColors,t=e.setFilter,r=e.filter,l=e.tagColors,s=e.target,c=r.tagsBlacklist,d=r.tagsWhitelist,h=c.indexOf(s)>-1,g=d.indexOf(s)>-1,f=(0,a.qY)();return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(A.sN,{icon:(0,re.jsx)(u.Box,{bgColor:l[s],borderRadius:"sm",height:3,width:3,borderColor:l[s]||"gray.600",borderWidth:1}),closeOnSelect:!1,onClick:f.onToggle,children:(0,re.jsx)(u.Text,{children:"Change color"})}),(0,re.jsx)(ue,{in:f.isOpen,children:(0,re.jsxs)(u.Flex,{ml:2,mt:2,flexWrap:"wrap",children:[(0,re.jsx)(u.Box,{children:(0,re.jsx)(u.Box,{tabIndex:0,cursor:"pointer",onClick:function(){return n((function(e){return Object.fromEntries(Object.keys(e).filter((function(e){return e!==s})).map((function(n){return[n,e[n]]})))}))},bgColor:"",m:1,borderRadius:"sm",borderColor:"gray.600",borderWidth:1,height:3,width:3})},"empty"),W.map((function(e){return(0,re.jsx)(u.Box,{children:(0,re.jsx)(u.Box,{tabIndex:0,cursor:"pointer",onClick:function(){return n(he(he({},l),{},(0,i.Z)({},s,e)))},bgColor:e,m:1,borderRadius:"sm",height:3,width:3})},e)}))]})}),!g&&(0,re.jsx)(A.sN,{onClick:function(){t(h?function(e){return he(he({},e),{},{tagsBlacklist:e.tagsBlacklist.filter((function(e){return e!==s}))})}:function(e){return he(he({},e),{},{tagsBlacklist:[].concat((0,o.Z)(e.tagsBlacklist),[s])})})},icon:h?(0,re.jsx)(V.MinusIcon,{}):(0,re.jsx)(V.ViewOffIcon,{}),children:h?"Remove from blocklist":"Add to blocklist"}),!h&&(0,re.jsx)(A.sN,{onClick:function(){t(g?function(e){return he(he({},e),{},{tagsWhitelist:e.tagsWhitelist.filter((function(e){return e!==s}))})}:function(e){return he(he({},e),{},{tagsWhitelist:[].concat((0,o.Z)(e.tagsWhitelist),[s])})})},icon:g?(0,re.jsx)(V.MinusIcon,{}):(0,re.jsx)(V.ViewIcon,{}),children:g?"Remove from allowlist":"Add to allowlist"})]})},fe=function(e){e.background;var n,t,r=e.target,o=(e.nodeType,e.coordinates),i=e.handleLocal,l=e.menuClose,s=e.scope,c=e.webSocket,d=e.setPreviewNode,g=e.setTagColors,f=e.tagColors,p=e.setFilter,x=e.filter,j=(0,a.qY)(),v=j.isOpen,m=j.onOpen,C=j.onClose;(0,b.useRef)();return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(A.v2,{defaultIsOpen:!0,closeOnBlur:!1,onClose:function(){return l()},children:(0,re.jsx)(A.qy,{zIndex:"overlay",bgColor:"white",color:"black",position:"absolute",left:o.left,top:o.top,right:o.right,bottom:o.bottom,fontSize:"xs",boxShadow:"xl",children:"string"!==typeof r?(0,re.jsxs)(re.Fragment,{children:[r&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(u.Heading,{size:"xs",isTruncated:!0,px:3,py:1,children:r.title}),(0,re.jsx)(A.R,{borderColor:"gray.500"})]}),0!==s.nodeIds.length&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(A.sN,{onClick:function(){return i(r,"add")},icon:(0,re.jsx)(V.PlusSquareIcon,{}),children:"Expand local graph at node"}),(0,re.jsx)(A.sN,{onClick:function(){return i(r,"replace")},icon:(0,re.jsx)(y.DvO,{}),children:"Open local graph for this node"}),(0,re.jsx)(A.sN,{onClick:function(){return i(r,"remove")},icon:(0,re.jsx)(V.MinusIcon,{}),children:"Exclude node from local graph"})]}),null!==r&&void 0!==r&&null!==(n=r.properties)&&void 0!==n&&n.FILELESS?(0,re.jsx)(A.sN,{icon:(0,re.jsx)(V.AddIcon,{}),onClick:function(){return function(e,n){_("create",{id:e.id,title:e.title,ref:e.properties.ROAM_REFS},n)}(r,c)},children:"Create node"}):(0,re.jsx)(A.sN,{icon:(0,re.jsx)(V.EditIcon,{}),onClick:function(){return U(r,c)},children:"Open in Emacs"}),(null===r||void 0===r||null===(t=r.properties)||void 0===t?void 0:t.ROAM_REFS)&&(0,re.jsx)(A.sN,{icon:(0,re.jsx)(V.ExternalLinkIcon,{}),children:"Open in Zotero"}),0===s.nodeIds.length&&(0,re.jsx)(A.sN,{icon:(0,re.jsx)(y.DvO,{}),onClick:function(){return i(r,"replace")},children:"Open local graph"}),(0,re.jsx)(A.sN,{icon:(0,re.jsx)(V.ViewIcon,{}),onClick:function(){d(r)},children:"Preview"}),0===(null===r||void 0===r?void 0:r.level)&&(0,re.jsx)(A.sN,{closeOnSelect:!1,icon:(0,re.jsx)(V.DeleteIcon,{color:"red.500"}),color:"red.500",onClick:m,children:"Permanently delete note"})]}):(0,re.jsx)(ge,{target:r,tagColors:f,filter:x,setTagColors:g,setFilter:p})})}),"string"!==typeof r&&(0,re.jsxs)(M.u_,{isCentered:!0,isOpen:v,onClose:C,children:[(0,re.jsx)(M.ZA,{}),(0,re.jsxs)(M.hz,{zIndex:"popover",children:[(0,re.jsx)(M.xB,{children:"Delete node?"}),(0,re.jsx)(M.ol,{}),(0,re.jsx)(M.fe,{children:(0,re.jsxs)(u.VStack,{spacing:4,display:"flex",alignItems:"flex-start",children:[(0,re.jsx)(u.Text,{children:"This will permanently delete your note:"}),(0,re.jsx)(u.Text,{fontWeight:"bold",children:null===r||void 0===r?void 0:r.title}),0!==(null===r||void 0===r?void 0:r.level)&&(0,re.jsx)(u.Text,{children:"This will only delete the from this heading until but not including the next node. Your parent file and all other nodes will not be deleted."}),(0,re.jsx)(u.Text,{children:"Are you sure you want to do continue?"})]})}),(0,re.jsxs)(M.mz,{children:[(0,re.jsx)(h.Button,{mr:3,onClick:function(){console.log("closing"),C(),l()},children:"Cancel"}),(0,re.jsx)(h.Button,{variant:"link",colorScheme:"red",ml:3,onClick:function(){console.log("aaaaa"),function(e,n){0===e.level&&_("delete",{id:e.id,file:e.file},n)}(r,c),C(),l()},children:"Delete node"})]})]})]})]})},pe=t(5434),xe=t(51649),je=function(e){var n=e.setJustification,t=(e.setIndent,e.setFont,e.justification),r=(e.setPreviewNode,e.canUndo),o=e.canRedo,i=(e.resetPreviewNode,e.previousPreviewNode),l=e.nextPreviewNode,s=e.outline,c=e.setOutline,a=e.collapse,g=e.setCollapse;return(0,re.jsxs)(u.Flex,{flex:"0 1 40px",pb:3,alignItems:"center",justifyContent:"space-between",pr:1,children:[(0,re.jsx)(u.Flex,{children:(0,re.jsxs)(h.ButtonGroup,{isAttached:!0,children:[(0,re.jsx)(d.u,{label:"Go backward",children:(0,re.jsx)(h.IconButton,{_focus:{},variant:"subtle",icon:(0,re.jsx)(V.ChevronLeftIcon,{}),"aria-label":"Previous node",disabled:!r,onClick:function(){return i()}})}),(0,re.jsx)(d.u,{label:"Go forward",children:(0,re.jsx)(h.IconButton,{_focus:{},variant:"subtle",icon:(0,re.jsx)(V.ChevronRightIcon,{}),"aria-label":"Next node",disabled:!o,onClick:function(){return l()}})})]})}),(0,re.jsxs)(u.Flex,{children:[(0,re.jsx)(d.u,{label:"Justify content",children:(0,re.jsx)(h.IconButton,{variant:"subtle","aria-label":"Justify content",icon:[(0,re.jsx)(y.v9V,{},"justify"),(0,re.jsx)(y.YSr,{},"left"),(0,re.jsx)(y.RXA,{},"right"),(0,re.jsx)(y.tr_,{},"center")][t],onClick:function(){return n((function(e){return(e+1)%4}))}})}),(0,re.jsx)(d.u,{label:"Toggle outline view",children:(0,re.jsx)(h.IconButton,{variant:"subtle","aria-label":"Justify content",icon:s?(0,re.jsx)(xe.XQM,{}):(0,re.jsx)(xe.JfF,{}),onClick:function(){return c((function(e){return!e}))}})}),(0,re.jsx)(d.u,{label:"Toggle headers",children:(0,re.jsx)(h.IconButton,{variant:"subtle","aria-label":"Toggle headers",icon:a?(0,re.jsx)(pe.omV,{}):(0,re.jsx)(pe.egf,{}),onClick:function(){return g((function(e){return!e}))}})})]})]})},be=t(96356);function ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ye=function(e){var n,t,r,i=e.filter,l=e.setFilter,s=e.tagColors,c=(e.setTagColors,e.openContextMenu),a=e.previewNode;return null!==a&&void 0!==a&&a.tags&&null!==(null===a||void 0===a||null===(n=a.tags)||void 0===n?void 0:n[0])?(0,re.jsx)(u.Flex,{mb:2,flexWrap:"wrap",children:null===a||void 0===a||null===(t=a.tags)||void 0===t||null===(r=t.map)||void 0===r?void 0:r.call(t,(function(e){var n,t,r,a=null!==(n=i.tagsBlacklist)&&void 0!==n?n:[],u=null!==(t=i.tagsWhitelist)&&void 0!==t?t:[],d=a.includes(e),h=u.includes(e);return(0,re.jsxs)(be.Tag,{tabIndex:0,mr:2,mt:2,onContextMenu:function(n){n.preventDefault(),c(e,n)},cursor:"pointer",onClick:function(){l(d?function(n){return me(me({},n),{},{tagsBlacklist:n.tagsBlacklist.filter((function(n){return n!==e})),tagsWhitelist:[].concat((0,o.Z)(n.tagsWhitelist),[e])})}:h?function(n){return me(me({},n),{},{tagsWhitelist:n.tagsWhitelist.filter((function(n){return n!==e}))})}:function(n){return me(me({},n),{},{tagsBlacklist:[].concat((0,o.Z)(n.tagsBlacklist),[e])})})},size:"sm",variant:"outline",colorScheme:(null===(r=s[e])||void 0===r?void 0:r.replaceAll(/(.*?)\..*/g,"$1"))||void 0,children:[(0,re.jsx)(be.TagLabel,{children:e}),d?(0,re.jsx)(be.TagRightIcon,{as:V.ViewOffIcon}):h?(0,re.jsx)(be.TagRightIcon,{as:V.ViewIcon}):null]},e)}))}):null},Ce=t(18835),Oe=t.n(Ce),we=t(13816),ke=t.n(we),Se=t(42728),Ne=t.n(Se),Ie=t(77890),Pe=t.n(Ie),De=t(94986),Be=t.n(De),Le=t(88541),Te=t.n(Le),ze=t(71167),Fe=t.n(ze),Ee=(t(85062),t(27431)),Re=t.n(Ee),Ze=t(12861),He=t.n(Ze),We=t(10043),Ae=t.n(We),Me=t(80816),Ve=t(93545),_e=t.n(Ve),Ue=t(15941),qe=t.n(Ue),Ge=t(67597),Xe=t.n(Ge),Je=t(44549),Qe=t.n(Je),Ke=t(78818),$e=t.n(Ke),Ye=t(32095),en=t(46871),nn=t(29356),tn={".headingFlex":{flexDirection:"row-reverse",justifyContent:"flex-end"},".outlineHeadingButton":{display:"none"},h1:{color:"black",lineHeight:"1.2",fontSize:"16",fontWeight:"bold",paddingTop:2},h2:{fontSize:"14",color:"black",fontWeight:"bold",fontStyle:"bold italic",paddingTop:2},h3:{fontSize:"13",color:"black",paddingTop:2},h4:{fontSize:"12",fontStyle:"italic",color:"black",paddingTop:2},".sectionContent":{paddingTop:2}},rn={".headingFlex":{flexDirection:"row",justifyContent:"flex-start"},".viewerHeadingButton":{display:"none"},".sectionContent":{mt:3,paddingLeft:4,ml:"11px",borderLeftWidth:"1px",borderLeftColor:"gray.500"},".preHeadingContent":{},"h1,h2,h3,h4,h5,h6,h7,h8":{pl:1,lineHeight:"1.25",color:"black",fontSize:15,fontWeight:700},".sec":{pt:1},".wrapClass > div > p":{mb:2},p:{fontWeight:500,fontSize:14,pb:2}},on={".katex":{overflowX:"scroll"},ol:{paddingLeft:4,py:1},"li::marker":{fontSize:12,fontWeight:"bold"},li:{pt:1},ul:{paddingLeft:"5"},p:{fontSize:"14",fontWeight:"500 !important",pb:2},div:{hyphens:"auto !important"},".title":{textAlign:"center",marginBottom:".2em"},".subtitle":{textAlign:"center",fontSize:"medium",fontWeight:"bold",marginTop:0},".TODO":{color:"red.500"},".equationContainer":{display:"table",textAlign:"center",width:"100%"},".equation":{verticalAlign:"middle"},".equation-label":{display:"tableCell",textAlign:"right",verticalAlign:"middle"},".inlinetask":{padding:"10px",border:"2px solid gray",margin:"10px",background:"#ffffcc"},"#org-div-home-and-up":{textAlign:"right",fontSize:"70 % ",whiteSpace:"nowrap"},textarea:{overflowX:"auto"},".linenr":{fontSize:"smaller"},".org-info-js_info-navigation":{borderStyle:"none"},"#org-info-js_console-label":{fontSize:"10px",fontWeight:"bold",whiteSpace:"nowrap"},".org-info-js_search-highlight":{backgroundColor:"#ffff00",color:"#000000",fontWeight:"bold"},".org-svg":{width:"90%"},".DONE":{color:"green"},".priority":{fontFamily:"monospace",color:"orange"},".tag":{backgroundColor:"white",fontFamily:"monospace",padding:"2px",fontSize:"80%",fontWeight:"normal"},".timestamp":{color:"#bebebe"},".timestamp-kwd":{color:"#5f9ea0"},".org-right":{marginLeft:"auto",marginRight:"0px",textAlign:"right"},".org-left":{marginLeft:"0px",marginRight:"auto",textAlign:"left"},".org-center":{marginLeft:"auto",marginRight:"auto",textAlign:"center"},".underline":{textDecoration:"underline"},"#postamble p":{fontSize:"90%",margin:".2em"},"#preamble p":{fontSize:"90%",margin:".2em"},"p.verse":{marginLeft:"3%"},pre:{borderRadius:"3px",backgroundColor:"white",padding:"8pt",fontFamily:"monospace",overflow:"auto",margin:"1.2em"},"pre.src":{position:"relative",overflow:"auto"},"pre.src:before":{display:"none",position:"absolute",top:"-8px",right:"12px",padding:"3px",backgroundColor:"white"},"caption.t-above":{captionSide:"top"},"caption.t-bottom":{captionSide:"bottom"},"th.org-right":{textAlign:"center"},"th.org-left":{textAlign:"center"},"th.org-center":{textAlign:"center"},"td.org-right":{textAlign:"right"},"td.org-left":{textAlign:"left"},"td.org-center":{textAlign:"center"},".footpara":{display:"inline"},".footdef":{marginBottom:"1em"},".figure":{padding:"1em"},".figure p":{textAlign:"center"}},ln=t(86658),sn=["style"];function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function an(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var un=function(e){var n=e.noUnderline,t=e.id,r=e.setSidebarHighlightedNode,o=e.setPreviewNode,i=e.nodeById,l=e.openContextMenu,s=e.href,c=e.children,a=e.isWiki,d=(0,b.useContext)(nn.N).highlightColor,h=Kt(d,(0,g.Fg)()),f=(s.replaceAll(/(.*?)\:?.*/g,"$1"),s.replaceAll(/.*?\:(.*)/g,"$1")),p=null!==t&&void 0!==t?t:f,x=a?"[[".concat(c,"]]"):c;return(0,re.jsx)(u.Text,{as:"a",onMouseEnter:function(){return r(i[p])},onMouseLeave:function(){return r({})},tabIndex:0,display:"inline",overflow:"hidden",fontWeight:500,color:d,textDecoration:n?void 0:"underline",onContextMenu:function(e){e.preventDefault(),l(i[f],e)},onClick:function(){return o(i[f])},_hover:{textDecoration:"none",cursor:"pointer",bgColor:h+"22"},_focus:{outlineColor:d},children:x})},dn=function(e){var n=e.href,t=e.children,r=(0,b.useContext)(nn.N).highlightColor;return(0,re.jsxs)(u.Link,{color:r,isExternal:!0,href:n,children:[t,(0,re.jsx)(V.ExternalLinkIcon,{mx:"1px",pb:"2px"})]})},hn=function(e){var n,t=e.href,r=e.children,o=e.nodeById,i=e.setSidebarHighlightedNode,l=e.previewNode,s=e.setPreviewNode,c=e.nodeByCite,a=e.openContextMenu,d=e.outline,h=e.noUnderline,g=e.linksByNodeId,f=e.isWiki,p=e.macros,x=e.attachDir,j=(0,b.useState)(null),v=j[0],m=j[1],y=(0,b.useState)(!1),C=y[0],O=y[1],w=t.replaceAll(/(.*?)\:.*/g,"$1"),k=d?rn:tn;console.log(l);if((0,b.useEffect)((function(){w.replaceAll(/(http)?.*/g,"$1")||v||C&&fetch("http://localhost:35901/node/".concat(B)).then((function(e){return e.text()})).then((function(e){"error"===e||m(e)})).catch((function(e){return console.log(e),"Could not fetch the text for some reason, sorry!\n\n This can happen because you have an id with forward slashes (/) in it."}))}),[C,v]),!w)return(0,re.jsx)(u.Text,{color:"gray.700",children:r});if(w.replaceAll(/(http)?.*/g,"$1"))return(0,re.jsx)(dn,{href:t,children:r});var S,N,I,P,D=t.replaceAll(/.*?\:(.*)/g,"$1"),B=function(e,n){if("id"===e)return n;if(e.includes("cite")){var t,r=null!==(t=c[n])&&void 0!==t&&t;return r?null!==r&&void 0!==r&&r.properties.FILELESS?"":null===r||void 0===r?void 0:r.id:""}return""}(w,D);encodeURIComponent(encodeURIComponent(null===(n=o[B])||void 0===n?void 0:n.file));return B?(0,re.jsx)(re.Fragment,{children:(0,re.jsxs)(Ye.J2,{gutter:12,trigger:"hover",placement:"top-start",children:[(0,re.jsx)(Ye.xo,{children:(0,re.jsx)(u.Box,{display:"inline",onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},children:(0,re.jsx)(un,{id:B,setSidebarHighlightedNode:i,setPreviewNode:s,nodeById:o,href:t,children:r,nodeByCite:c,openContextMenu:a,noUnderline:h,isWiki:f},null!==(S=null===(N=o[B])||void 0===N?void 0:N.title)&&void 0!==S?S:B)})}),(0,re.jsx)(en.h_,{children:(0,re.jsxs)(Ye.yk,{transform:"scale(1)",boxShadow:"xl",position:"relative",zIndex:"tooltip",onMouseEnter:function(){var e;i(null!==(e=o[B])&&void 0!==e?e:{})},onMouseLeave:function(){i({})},children:[(0,re.jsx)(Ye.QH,{}),(0,re.jsx)(Ye.b,{pb:5,fontSize:"xs",position:"relative",zIndex:"tooltip",transform:"scale(1)",width:"100%",children:(0,re.jsx)(ln.$B,{autoHeight:!0,autoHeightMax:300,autoHide:!0,renderThumbVertical:function(e){var n=e.style,t=(0,q.Z)(e,sn);return(0,re.jsx)(u.Box,an({style:an(an({},n),{},{borderRadius:0})},t))},children:(0,re.jsx)(u.Box,{w:"100%",color:"black",px:3,sx:an(an({},on),k),children:(0,re.jsx)(Cn,{previewText:v,nodeById:o,setSidebarHighlightedNode:i,setPreviewNode:s,nodeByCite:c,openContextMenu:a,outline:d,linksByNodeId:g,macros:p,attachDir:x,previewNode:o[B],collapse:!1})})})})]},null!==(I=null===(P=o[B])||void 0===P?void 0:P.title)&&void 0!==I?I:B)})]})}):(0,re.jsx)(u.Text,{as:"span",display:"inline",className:t,color:"base.700",cursor:"not-allowed",children:r})},gn=t(25675),fn=t(62520),pn=t.n(fn),xn=function(e){var n=e.src,t=e.file,r=(0,b.useState)(null);r[0],r[1];if(n.replaceAll(/(http)?.*/g,"$1"))return console.log(n.replaceAll(/(http)?.*/g,"$1")),(0,re.jsx)(gn.default,{layout:"responsive",loader:function(e){var n=e.src;return e.width,e.quality,"".concat(n)},src:n,alt:"",width:"auto",height:"auto"});var o=n.replaceAll(/file:/g,""),i=pn().dirname(t),l=pn().isAbsolute(o)||"~"===o.slice(0,1)?o:pn().join(i,o),s=encodeURIComponent(encodeURIComponent(l));return(0,re.jsx)(u.Container,{my:4,position:"relative",children:(0,re.jsx)("img",{alt:"Wow, an image.",src:"http://localhost:35901/img/".concat(s)})})},jn=t(14578),bn=(0,b.createContext)({outline:!1,collapse:!0}),vn=function(e){var n=e.children,t=e.className,r=(0,b.useState)(!0),o=r[0],i=r[1],l=(0,b.useContext)(bn).collapse;if((0,b.useEffect)((function(){i(!l)}),[l]),"h0Wrapper headingWrapper"===t)return(0,re.jsxs)(u.Box,{className:"preHeadingContent",children:[" ",n]});var s=n;return(0,re.jsxs)(u.Box,{className:"sec",children:[(0,re.jsx)(u.Box,{display:"block",children:(0,re.jsxs)(u.Flex,{className:"headingFlex",alignItems:"baseline",children:[o&&s.length>0?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.IconButton,{className:"viewerHeadingButton",_focus:{},_active:{},"aria-label":"Expand heading",size:"xs",variant:"subtle",icon:(0,re.jsx)(V.ChevronUpIcon,{}),onClick:function(){return i(!o)},height:2,width:2}),(0,re.jsx)(h.IconButton,{className:"outlineHeadingButton",_focus:{},_active:{},"aria-label":"Expand heading",size:"xs",variant:"subtle",icon:(0,re.jsx)(jn.zOz,{}),onClick:function(){return i(!o)},height:2,width:2})]}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.IconButton,{className:"viewerHeadingButton",_active:{},_focus:{},"aria-label":"Collapse heading",height:2,width:2,size:"xs",variant:"subtle",icon:(0,re.jsx)(V.ChevronDownIcon,{}),onClick:function(){return i(!o)}}),(0,re.jsx)(h.IconButton,{className:"outlineHeadingButton",_active:{},_focus:{},"aria-label":"Collapse heading",height:2,width:2,size:"xs",variant:"subtle",icon:(0,re.jsx)(jn.O6Y,{}),onClick:function(){return i(!o)}})]}),s[0]]})}),o&&(0,re.jsx)(u.Box,{className:"sectionContent",children:s.slice(1)})]})};function mn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function yn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Cn=function(e){var n,t,r=e.nodeById,o=e.setSidebarHighlightedNode,l=e.setPreviewNode,s=e.previewText,c=e.nodeByCite,a=e.previewNode,d=e.openContextMenu,h=e.outline,f=e.collapse,p=e.linksByNodeId,x=e.macros,j=e.attachDir;if(!a||!p)return null;var v=Oe()().use(ke()).use(Be()).use(Te(),{idDir:j||void 0}).use(Pe()).use(Ne(),{useSections:!0}),m=(null===(n=p[null===a||void 0===a?void 0:a.id])||void 0===n?void 0:n.reduce((function(e,n){var t=Qt(n).filter((function(e){return e!==a.id})).join("");return yn(yn({},e),{},(0,i.Z)({},t,r[t]))}),{}))||{},y=Object.entries(m),C=Oe()().use(He()).use(qe(),["yaml"]).use(Xe()).use(Me.Z,{permaLinks:Object.keys(m),pageResolver:function(e){var n,t=y.find((function(n){var t;return(null===n||void 0===n||null===(t=n[1])||void 0===t?void 0:t.title)===e}));return[null!==(n=null===t||void 0===t?void 0:t[0])&&void 0!==n?n:""]},hrefTemplate:function(e){return"id:".concat(e)}}).use(Qe()).use(_e()).use(Ae()).use($e()),O=".md"===(null===a||void 0===a||null===(t=a.file)||void 0===t?void 0:t.slice(-3)),w=O?C:v;console.log(x);var k=(0,b.useMemo)((function(){return w.use(Fe(),{trust:function(e){return["\\htmlId","\\href"].includes(e.command)},macros:yn({"\\eqref":"\\href{###1}{(\\text{#1})}","\\ref":"\\href{###1}{\\text{#1}}","\\label":"\\htmlId{#1}{}"},x)}).use(Re(),{createElement:b.createElement,components:{a:function(e){var n=e.children,t=e.href;return(0,re.jsx)(hn,{nodeByCite:c,setSidebarHighlightedNode:o,href:"".concat(t),nodeById:r,linksByNodeId:p,setPreviewNode:l,openContextMenu:d,outline:h,previewNode:a,isWiki:O,macros:x,attachDir:j,children:n})},img:function(e){var n=e.src;return(0,re.jsx)(xn,{src:n,file:null===a||void 0===a?void 0:a.file})},section:function(e){var n=e.children,t=e.className;return t&&t.slice(-1)==="".concat(a.level)?(0,re.jsx)(u.Box,{children:n.slice(1)}):(0,re.jsx)(vn,{outline:h,collapse:f,className:t,children:n})},blockquote:function(e){var n=e.children;return(0,re.jsx)(g.m$.blockquote,{color:"gray.800",bgColor:"gray.300",pt:4,pb:2,mb:4,mt:3,pl:4,borderLeftWidth:4,borderLeftColor:"gray.700",children:n})},p:function(e){var n=e.children;return(0,re.jsx)("p",{lang:"en",children:n})}}})}),[null===a||void 0===a?void 0:a.id]),S=(0,b.useMemo)((function(){return k.processSync(s).result}),[s]);return(0,re.jsx)(bn.Provider,{value:{collapse:f,outline:h},children:S})},On=function(e){var n=e.openContextMenu,t=e.setSidebarHighlightedNode,r=e.nodeById,o=e.nodeByCite,i=e.previewNode,l=e.setPreviewNode,s=e.outline,c=e.collapse,a=e.linksByNodeId,u=e.macros,d=e.attachDir,h=(0,b.useState)(""),g=h[0],f=h[1],p=encodeURIComponent(encodeURIComponent(i.id));return(0,b.useEffect)((function(){fetch("http://localhost:35901/node/".concat(p)).then((function(e){return e.text()})).then((function(e){if(""===e)return"(empty node)";"error"!==e&&(console.log(e),f(e))})).catch((function(e){return f("(could not find node)"),console.log(e),"Could not fetch the text for some reason, sorry!\n\n This can happen because you have an id with forward slashes (/) in it."}))}),[i.id]),(0,re.jsx)(re.Fragment,{children:g&&i&&(0,re.jsx)(Cn,{nodeById:r,previewNode:i,setPreviewNode:l,previewText:g,nodeByCite:o,setSidebarHighlightedNode:t,openContextMenu:n,outline:s,collapse:c,linksByNodeId:a,attachDir:d,macros:u||{}})})},wn=function(e){var n,t=e.previewNode,r=e.setPreviewNode,o=e.setSidebarHighlightedNode,i=e.nodeById,s=e.linksByNodeId,c=e.nodeByCite,a=e.openContextMenu,d=e.outline,h=e.macros,g=e.attachDir,f=(null!==(n=s[null===t||void 0===t?void 0:t.id])&&void 0!==n?n:[]).filter((function(e){var n=Qt(e),r=(0,l.Z)(n,2),o=r[0];r[1];return o!==(null===t||void 0===t?void 0:t.id)})).map((function(e){return e.source}));return(0,re.jsxs)(u.Box,{className:"backlinks",borderRadius:"sm",mt:6,p:4,bg:"white",mb:10,children:[(0,re.jsx)("p",{style:{fontSize:16,fontWeight:600},children:"Linked references (".concat(f.length,")")}),(0,re.jsx)(u.VStack,{py:2,spacing:3,alignItems:"start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:(null===t||void 0===t?void 0:t.id)&&f.map((function(e){var n,l,f;n=null===(l=i[e])||void 0===l?void 0:l.title;return(0,re.jsx)(u.Box,{overflow:"hidden",py:1,borderRadius:"sm",width:"100%",children:(0,re.jsx)(hn,{linksByNodeId:s,nodeByCite:c,setSidebarHighlightedNode:o,href:"id:".concat(e),nodeById:i,previewNode:t,setPreviewNode:r,openContextMenu:a,outline:d,noUnderline:!0,attachDir:g,macros:h,children:null===(f=i[e])||void 0===f?void 0:f.title})},e)}))})]})};function kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Sn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Nn=function(e){var n=e.setPreviewNode,t=e.justificationList,r=e.justification,o=e.previewNode,i=e.nodeById,l=e.nodeByCite,s=e.setSidebarHighlightedNode,c=e.linksByNodeId,a=e.openContextMenu,d=e.outline,h=e.collapse,g=e.macros,f=e.attachDir,p=d?rn:tn;return(0,re.jsx)(u.Box,{pr:8,pt:2,height:"100%",className:"org",sx:Sn(Sn(Sn({},on),p),{},{textAlign:t[r]}),children:(null===o||void 0===o?void 0:o.id)&&(0,re.jsxs)(u.Flex,{className:"wrapClass",height:"100%",flexDirection:"column",justifyContent:"space-between",children:[(0,re.jsx)(On,{setPreviewNode:n,previewNode:o,nodeByCite:l,setSidebarHighlightedNode:s,openContextMenu:a,outline:d,collapse:h,nodeById:i,linksByNodeId:c,macros:g,attachDir:f}),(0,re.jsx)(wn,{setPreviewNode:n,previewNode:o,nodeById:i,linksByNodeId:c,nodeByCite:l,setSidebarHighlightedNode:s,openContextMenu:a,outline:d,attachDir:f,macros:g||{}})]})})},In=function(e){var n=e.previewNode;return(0,re.jsx)(u.Flex,{maxW:"90%",children:(0,re.jsx)(u.Heading,{lineHeight:1.2,size:"md",fontWeight:600,pt:4,children:null===n||void 0===n?void 0:n.title})})},Pn=t(29119);function Dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Bn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ln(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Tn(e,null!==(t=r.storage)&&void 0!==t?t:localStorage),i=o.get(),l=void 0!==i?i:n,s=null!=i&&"object"===typeof i&&!1===Array.isArray(i)?Bn(Bn({},n),i):l;s!==i&&o.update(s);var c=(0,b.useState)(s),a=c[0],u=c[1];(0,b.useEffect)((function(){a!==s&&u(s)}),[e]);var d=function(e){e instanceof Function?u((function(n){var t=e(n);return o.update(t),t})):(u(e),o.update(e))};return[a,d]}function Tn(e,n){return{get:function(){var t=n.getItem(e);if(t&&"undefined"!==t)return JSON.parse(t)},update:function(t){n.setItem(e,JSON.stringify(t))},remove:function(){n.removeItem(e)}}}var zn=["style"];function Fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Rn=function(e){var n=e.isOpen,t=e.onOpen,r=e.onClose,o=e.previewNode,i=e.setPreviewNode,s=e.nodeById,c=e.linksByNodeId,a=e.nodeByCite,d=e.setSidebarHighlightedNode,g=e.canUndo,f=e.canRedo,p=e.resetPreviewNode,x=e.previousPreviewNode,j=e.nextPreviewNode,v=e.openContextMenu,m=(e.scope,e.setScope,e.windowWidth),C=e.filter,O=e.setFilter,w=e.tagColors,k=e.setTagColors,S=e.macros,N=e.attachDir,I=((0,b.useContext)(nn.N).highlightColor,(0,b.useState)()),P=I[0],D=I[1],B=Ln("sidebarWidth",400),L=(0,l.Z)(B,2),T=L[0],z=L[1];(0,b.useEffect)((function(){null!==o&&void 0!==o&&o.id?(t(),D(o)):r()}),[null===o||void 0===o?void 0:o.id]);var F=Ln("justification",1),E=(0,l.Z)(F,2),R=E[0],Z=E[1],H=Ln("outline",!1),W=(0,l.Z)(H,2),A=W[0],M=W[1],V=(0,b.useState)("sans serif"),_=(V[0],V[1]),U=(0,b.useState)(0),G=(U[0],U[1]),X=(0,b.useState)(!1),J=X[0],Q=X[1];return(0,re.jsx)(ue,{animateOpacity:!1,dimension:"width",in:n,unmountOnExit:!0,startingSize:0,style:{height:"100vh"},children:(0,re.jsx)(Pn.e,{size:{height:"100vh",width:T},onResizeStop:function(e,n,t,r){z((function(e){return e+r.width}))},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},minWidth:"220px",maxWidth:m-200,children:(0,re.jsxs)(u.Flex,{flexDir:"column",h:"100vh",pl:2,color:"black",bg:"alt.100",width:"100%",children:[(0,re.jsxs)(u.Flex,{pl:2,alignItems:"center",color:"black",width:"100%",children:[(0,re.jsx)(u.Flex,{pt:1,flexShrink:0,children:(0,re.jsx)(je,{setJustification:Z,setIndent:G,setFont:_,justification:R,setPreviewNode:i,canUndo:g,canRedo:f,resetPreviewNode:p,previousPreviewNode:x,nextPreviewNode:j,outline:A,setOutline:M,collapse:J,setCollapse:Q})}),(0,re.jsx)(u.Flex,{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",onContextMenu:function(e){e.preventDefault(),v(o,e)}}),(0,re.jsx)(u.Flex,{flexDir:"row",ml:"auto",children:(0,re.jsx)(h.IconButton,{m:1,icon:(0,re.jsx)(y.T41,{}),"aria-label":"Options",variant:"subtle",onClick:function(e){v(o,e,{left:void 0,top:12,right:20-m,bottom:void 0})}})})]}),(0,re.jsx)(ln.$B,{autoHide:!0,renderThumbVertical:function(e){var n=e.style,t=(0,q.Z)(e,zn);return(0,re.jsx)(u.Box,En({style:En(En({},n),{},{borderRadius:0})},t))},children:P&&(0,re.jsxs)(u.VStack,{flexGrow:1,alignItems:"left",bg:"alt.100",paddingLeft:4,children:[(0,re.jsx)(In,{previewNode:P}),(0,re.jsx)(ye,{filter:C,setFilter:O,tagColors:w,setTagColors:k,openContextMenu:v,previewNode:o}),(0,re.jsx)(Nn,{setPreviewNode:i,previewNode:o,nodeById:s,nodeByCite:a,setSidebarHighlightedNode:d,justification:R,justificationList:["justify","start","end","center"],linksByNodeId:c,openContextMenu:v,outline:A,setOutline:M,collapse:J,macros:S,attachDir:N})]})})]})})})},Zn=t(94090),Hn=t(88696),Wn=t(47647);function An(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?An(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):An(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Vn=function(e){var n,t=e.filter,r=e.listName,o=e.labelFilter,l=e.displayName,s=e.setFilter,c=e.options,a=void 0===c?[]:c,u=(0,b.useContext)(nn.N).highlightColor,d=(null===a||void 0===a?void 0:a.map((function(e){return{value:e,label:o?e.replace(o,""):e}})))||[],h=(0,b.useState)((null===(n=t[r])||void 0===n?void 0:n.map((function(e){return{value:e,label:o?null===e||void 0===e?void 0:e.replace(o,""):e}})))||[]),g=h[0],f=h[1];return(0,re.jsx)(Wn.CUIAutoComplete,{labelStyleProps:{fontWeight:300,fontSize:14},items:d,label:"Add tag to ".concat(l),placeholder:" ",onCreateItem:function(e){return null},disableCreateItem:!0,selectedItems:g,onSelectedItemsChange:function(e){e.selectedItems&&(f(e.selectedItems),s(Mn(Mn({},t),{},(0,i.Z)({},r,e.selectedItems.map((function(e){return e.value}))))))},listItemStyleProps:{overflow:"hidden"},highlightItemBg:"gray.400",toggleButtonStyleProps:{variant:"outline"},inputStyleProps:{mt:2,height:8,focusBorderColor:u,color:"gray.800",borderColor:"gray.500"},tagStyleProps:{justifyContent:"flex-start",fontSize:10,borderColor:u,borderWidth:1,borderRadius:"md",color:u,bg:"",height:4,mb:2},hideToggleButton:!0,itemRenderer:function(e){return e.label}})};function _n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Un(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_n(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_n(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var qn=function(e){var n=e.colorList,t=e.tagColors,r=e.setTagColors,o=e.highlightColor,l=e.tags.map((function(e){return{value:e,label:e}})),s=(0,b.useState)(Object.keys(t).map((function(e){return{value:e,label:e}}))),c=s[0],a=s[1];return(0,re.jsxs)(u.Box,{children:[(0,re.jsx)(Wn.CUIAutoComplete,{items:l,labelStyleProps:{fontWeight:300,fontSize:14},label:"Add tag to color",placeholder:" ",disableCreateItem:!0,selectedItems:c,onSelectedItemsChange:function(e){e.selectedItems&&(a(Array.from(new Set(e.selectedItems))),r(Object.fromEntries(Array.from(new Set(e.selectedItems)).map((function(e){var n;return[e.label,null!==(n=t[e.label])&&void 0!==n?n:"gray.600"]})))))},listItemStyleProps:{overflow:"hidden"},highlightItemBg:"gray.400",toggleButtonStyleProps:{variant:"outline"},inputStyleProps:{height:8,focusBorderColor:o,color:"gray.800",borderColor:"gray.500"},tagStyleProps:{display:"none",rounded:"full",bg:o,height:8,paddingLeft:4,fontWeight:"bold"},hideToggleButton:!0,itemRenderer:function(e){return e.label}}),(0,re.jsx)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:Object.keys(t).map((function(e){return(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",width:"100%",pl:2,children:[(0,re.jsx)(u.Box,{width:"100%",children:(0,re.jsx)(u.Text,{children:e})}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,colorScheme:"",color:"black",children:(0,re.jsx)(u.Box,{bgColor:t[e],borderRadius:"sm",height:6,width:6})}),(0,re.jsx)(en.h_,{children:(0,re.jsx)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:n.map((function(n){return(0,re.jsx)(A.sN,{onClick:function(){return r(Un(Un({},t),{},(0,i.Z)({},e,n)))},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{bgColor:n,borderRadius:"sm",height:6,width:6})},n)}))})})]}),(0,re.jsx)(h.IconButton,{"aria-label":"Delete tag color",variant:"ghost",icon:(0,re.jsx)(V.DeleteIcon,{}),onClick:function(){r(Object.fromEntries(Array.from(new Set(c)).map((function(e){var n;return[e.label,null!==(n=t[e.label])&&void 0!==n?n:"gray.600"]})))),a(c.filter((function(n){return n.value!==e})))}})]},e)}))})]})},Gn=t(80918),Xn=function(e){var n=e.infoText;return(0,re.jsx)(u.Box,{paddingLeft:"1",children:(0,re.jsx)(d.u,{label:n,placement:"top",color:"gray.100",bg:"gray.800",hasArrow:!0,children:(0,re.jsx)(V.InfoOutlineIcon,{})})})},Jn=["min","max","step","value"],Qn=function(e){var n=e.min,t=void 0===n?0:n,r=e.max,o=void 0===r?10:r,i=e.step,l=void 0===i?.1:i,s=e.value,c=void 0===s?1:s,a=(0,q.Z)(e,Jn),h=a.onChange,g=a.label,f=a.infoText,p=(0,b.useContext)(nn.N).highlightColor;return(0,re.jsxs)(u.Box,{pt:1,pb:2,children:[(0,re.jsxs)(u.Box,{display:"flex",alignItems:"flex-end",mb:2,children:[(0,re.jsx)(u.Text,{children:g}),f&&(0,re.jsx)(Xn,{infoText:f})]}),(0,re.jsxs)(Gn.iR,{value:c,onChange:h,min:t,max:o,step:l,children:[(0,re.jsx)(Gn.Uj,{children:(0,re.jsx)(Gn.Ms,{})}),(0,re.jsx)(d.u,{bg:p,label:c.toFixed(1),children:(0,re.jsx)(Gn.gs,{bg:"white"})})]})]},g)},Kn=(0,b.createContext)({subDirs:["dailies",".attach"],attachDir:".attach",roamDir:"~/org",dailyDir:"dailies"});function $n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Yn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$n(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$n(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var et=function(e){var n=e.filter,t=e.setFilter,r=e.local,o=e.setLocal,i=e.tagColors,l=e.setTagColors,s=e.highlightColor,c=e.colorList,a=e.tags,d=(0,b.useContext)(Kn),g=d.roamDir,f=d.subDirs;return(0,re.jsxs)(u.Box,{children:[(0,re.jsxs)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",paddingLeft:7,color:"gray.800",children:[(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Link children to"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",size:"sm",children:function(){switch(n.parent){case"parent":return(0,re.jsx)(u.Text,{children:"File"});case"heading":return(0,re.jsx)(u.Text,{children:"Heading"});default:return(0,re.jsx)(u.Text,{children:"Nothing"})}}()}),(0,re.jsx)(en.h_,{children:(0,re.jsxs)(A.qy,{bgColor:"gray.200",zIndex:"popover",children:[(0,re.jsx)(A.sN,{onClick:function(){return t((function(e){return Yn(Yn({},e),{},{parent:""})}))},children:"Nothing"}),(0,re.jsx)(A.sN,{onClick:function(){return t((function(e){return Yn(Yn({},e),{},{parent:"parent"})}))},children:"Parent file node"}),(0,re.jsx)(A.sN,{onClick:function(){return t((function(e){return Yn(Yn({},e),{},{parent:"heading"})}))},children:"Next highest heading node"})]})})]})]}),(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Orphans"}),(0,re.jsx)(Hn.r,{onChange:function(){t((function(e){return Yn(Yn({},e),{},{orphans:!e.orphans})}))},isChecked:n.orphans})]}),(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Dailies"}),(0,re.jsx)(Hn.r,{onChange:function(){t((function(e){return Yn(Yn({},e),{},{dailies:!e.dailies})}))},isChecked:n.dailies})]}),(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Org-noter pages"}),(0,re.jsx)(Hn.r,{onChange:function(){t((function(e){return Yn(Yn({},e),{},{noter:!e.noter})}))},isChecked:n.noter})]}),(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Citations without note files"}),(0,re.jsx)(Hn.r,{onChange:function(){t(Yn(Yn({},n),{},{filelessCites:!n.filelessCites}))},isChecked:n.filelessCites})]}),(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Non-existent nodes"}),(0,re.jsx)(Hn.r,{onChange:function(){l(Yn(Yn({},i),{},{bad:"white"})),t(Yn(Yn({},n),{},{bad:!n.bad}))},isChecked:n.bad})]}),(0,re.jsx)(Qn,{label:"Number of neighbors in local graph",value:r.neighbors,onChange:function(e){return o(Yn(Yn({},r),{},{neighbors:e}))},min:1,max:5,step:1})]}),(0,re.jsxs)(Zn.UQ,{padding:0,allowToggle:!0,allowMultiple:!0,paddingLeft:3,children:[(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:["Directory filters",(0,re.jsx)(Zn.XE,{})]}),(0,re.jsxs)(Zn.Hk,{pr:0,mr:0,children:[(0,re.jsx)(Vn,{filter:n,setFilter:t,options:f,displayName:"directory blocklist",listName:"dirsBlocklist",labelFilter:g}),(0,re.jsx)(Vn,{filter:n,setFilter:t,options:f,displayName:"directory allowlist",listName:"dirsAllowlist",labelFilter:g})]})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:["Tag filters",(0,re.jsx)(Zn.XE,{})]}),(0,re.jsxs)(Zn.Hk,{pr:0,mr:0,children:[(0,re.jsx)(Vn,{filter:n,setFilter:t,options:a,displayName:"tag blocklist",listName:"tagsBlacklist"}),(0,re.jsx)(Vn,{filter:n,setFilter:t,options:a,displayName:"tag allowlist",listName:"tagsWhitelist"})]})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:["Tag colors",(0,re.jsx)(Zn.XE,{})]}),(0,re.jsx)(Zn.Hk,{pr:0,mr:0,children:(0,re.jsx)(qn,{tags:a,colorList:c,tagColors:i,setTagColors:l,highlightColor:s})})]})]})]})},nt=t(37496),tt=function(e){var n=e.value,t=e.onChange,r=e.label,o=e.infoText,i=e.children;return(0,re.jsxs)(u.Box,{paddingTop:2,children:[(0,re.jsxs)(u.Box,{display:"flex",justifyContent:"space-between",paddingBottom:2,children:[(0,re.jsxs)(u.Box,{display:"flex",alignItems:"center",children:[(0,re.jsx)(u.Text,{children:r}),o&&(0,re.jsx)(Xn,{infoText:o})]}),(0,re.jsx)(Hn.r,{isChecked:!!n,onChange:t})]}),(0,re.jsx)(nt.UO,{in:!!n,animateOpacity:!0,children:(0,re.jsx)(u.Box,{paddingLeft:4,paddingTop:2,paddingBottom:2,children:i})})]},r)};function rt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ot(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var it=function(e){var n=e.physics,t=e.setPhysics,r=(0,b.useCallback)((function(e,n,r){t((function(t){return ot(ot({},t),{},(0,i.Z)({},n,e/r))}))}),[]);return(0,re.jsxs)(u.Box,{children:[(0,re.jsxs)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",paddingLeft:7,color:"gray.800",children:[(0,re.jsxs)(tt,{label:"Gravity",value:n.gravityOn,onChange:function(){return t(ot(ot({},n),{},{gravityOn:!n.gravityOn}))},children:[(0,re.jsxs)(u.Flex,{justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Also in local"}),(0,re.jsx)(Hn.r,{onChange:function(){t((function(e){return ot(ot({},e),{},{gravityLocal:!e.gravityLocal})}))},isChecked:n.gravityLocal})]}),(0,re.jsx)(Qn,{label:"Strength",value:10*n.gravity,onChange:function(e){return r(e,"gravity",10)}})]}),(0,re.jsx)(Qn,{value:-n.charge/100,onChange:function(e){return r(e,"charge",-.01)},label:"Repulsive Force"}),(0,re.jsx)(Qn,{value:5*n.linkStrength,onChange:function(e){return r(e,"linkStrength",5)},label:"Link Force"}),(0,re.jsx)(Qn,{label:"Stabilization rate",value:50*n.alphaDecay,onChange:function(e){return r(e,"alphaDecay",50)}})]}),(0,re.jsx)(u.Box,{children:(0,re.jsx)(Zn.UQ,{paddingLeft:3,allowToggle:!0,children:(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:[(0,re.jsx)(u.Text,{children:"Advanced"}),(0,re.jsx)(Zn.XE,{marginRight:2})]}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsxs)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",paddingLeft:3,color:"gray.800",children:[(0,re.jsx)(tt,{label:"Collision",infoText:"Perfomance sap, disable if slow",value:n.collision,onChange:function(){return t(ot(ot({},n),{},{collision:!n.collision}))},children:(0,re.jsx)(Qn,{value:n.collisionStrength/5,onChange:function(e){return r(e,"collisionStrength",.2)},label:"Collision Radius",infoText:"Easy with this one, high values can lead to a real jiggly mess"})}),(0,re.jsx)(Qn,{label:"Link iterations",value:n.linkIts,onChange:function(e){return r(e,"linkIts",1)},min:0,max:6,step:1,infoText:"How many links down the line the physics of a single node affects (Slow)"}),(0,re.jsx)(Qn,{label:"Viscosity",value:10*n.velocityDecay,onChange:function(e){return r(e,"velocityDecay",10)}}),(0,re.jsx)(tt,{label:"Center nodes",value:n.centering,onChange:function(){return t(ot(ot({},n),{},{centering:!n.centering}))},infoText:"Keeps the nodes in the center of the viewport. If disabled you can drag the nodes anywhere you want.",children:(0,re.jsx)(Qn,{label:"Centering Strength",value:n.centeringStrength,max:2,step:.01,onChange:function(e){return r(e,"centeringStrength",1)}})})]})})]})})})]})};function lt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function st(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ct=function(e){var n=e.behavior,t=e.setBehavior,r=e.mouse,o=e.setMouse;return(0,re.jsxs)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",paddingLeft:7,color:"gray.800",children:[(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Preview node"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",children:(0,re.jsx)(u.Text,{children:r.preview?r.preview[0].toUpperCase()+r.preview.slice(1):"Never"})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{bgColor:"gray.200",zIndex:"popover",children:[(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{preview:""}))},children:"Never"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{preview:"click"}))},children:"Click"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{preview:"double"}))},children:"Double Click"})]})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsxs)(u.Flex,{children:[(0,re.jsx)(u.Text,{children:"Expand Node"}),(0,re.jsx)(Xn,{infoText:"View only the node and its direct neighbors"})]}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",children:(0,re.jsx)(u.Text,{children:r.local?r.local[0].toUpperCase()+r.local.slice(1):"Never"})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{zIndex:"popover",bgColor:"gray.200",children:[(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{local:""}))},children:"Never"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{local:"click"}))},children:"Click"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{local:"double"}))},children:"Double Click"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{local:"right"}))},children:"Right Click"})]})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Open in Emacs"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",children:(0,re.jsx)(u.Text,{children:r.follow?r.follow[0].toUpperCase()+r.follow.slice(1):"Never"})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{bgColor:"gray.200",zIndex:"popover",children:[(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{follow:""}))},children:"Never"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{follow:"click"}))},children:"Click"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{follow:"double"}))},children:"Double Click"}),(0,re.jsx)(A.sN,{onClick:function(){return o(st(st({},r),{},{follow:"right"}))},children:"Right Click"})]})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Follow Emacs by..."}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",children:(0,re.jsx)(u.Text,{children:n.follow[0].toUpperCase()+n.follow.slice(1)})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{bgColor:"gray.200",zIndex:"popover",children:[(0,re.jsx)(A.sN,{onClick:function(){return t(st(st({},n),{},{follow:"color"}))},children:"Just coloring the currently opened node"}),(0,re.jsx)(A.sN,{onClick:function(){return t(st(st({},n),{},{follow:"local"}))},children:"Opening the local graph"}),(0,re.jsx)(A.sN,{onClick:function(){return t(st(st({},n),{},{follow:"zoom"}))},children:"Zooming to the current node"})]})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsxs)(u.Flex,{children:[(0,re.jsx)(u.Text,{children:"Local graph"}),(0,re.jsx)(Xn,{infoText:"When in local mode and clicking a new node, should I add that node's local graph or open the new one?"})]}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),colorScheme:"",color:"black",children:(0,re.jsx)(u.Text,{children:"add"===n.localSame?"Add":"Replace"})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{bgColor:"gray.200",zIndex:"popover",children:[(0,re.jsx)(A.sN,{onClick:function(){return t(st(st({},n),{},{localSame:"replace"}))},children:"Open that nodes graph"}),(0,re.jsx)(A.sN,{onClick:function(){return t(st(st({},n),{},{localSame:"add"}))},children:"Add node to local graph"})]})]})]})]}),(0,re.jsx)(Qn,{label:"Zoom speed",value:n.zoomSpeed,min:0,max:4e3,step:100,onChange:function(e){return t(st(st({},n),{},{zoomSpeed:e}))}}),(0,re.jsx)(Qn,{label:"Zoom padding",value:n.zoomPadding,min:0,max:400,step:1,onChange:function(e){return t(st(st({},n),{},{zoomPadding:e}))},infoText:"How much to zoom out to accomodate all nodes when changing the view."})]})},at=t(11391);function ut(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function dt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ut(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ht=function(e){var n=e.visuals,t=e.setVisuals;return(0,re.jsx)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:(0,re.jsx)(u.Box,{children:(0,re.jsx)(tt,{label:"Highlight",onChange:function(){return t((function(e){return dt(dt({},e),{},{highlight:!e.highlight})}))},value:n.highlight,children:(0,re.jsxs)(u.VStack,{spacing:1,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.400"}),align:"stretch",paddingLeft:0,children:[(0,re.jsx)(Qn,{label:"Highlight Link Thickness",value:n.highlightLinkSize,onChange:function(e){return t((function(n){return dt(dt({},n),{},{highlightLinkSize:e})}))}}),(0,re.jsx)(Qn,{label:"Highlight Node Size",value:n.highlightNodeSize,onChange:function(e){return t((function(n){return dt(dt({},n),{},{highlightNodeSize:e})}))}}),(0,re.jsx)(Qn,{min:0,max:1,label:"Highlight Fade",value:n.highlightFade,onChange:function(e){return t((function(n){return dt(dt({},n),{},{highlightFade:e})}))}}),(0,re.jsxs)(tt,{label:"Highlight Animation",onChange:function(){t((function(e){return dt(dt({},e),{},{highlightAnim:!e.highlightAnim})}))},value:n.highlightAnim,children:[(0,re.jsx)(Qn,{label:"Animation speed",onChange:function(e){return t((function(n){return dt(dt({},n),{},{animationSpeed:e})}))},value:n.animationSpeed,infoText:"Slower speed has a chance of being buggy",min:50,max:1e3,step:10}),(0,re.jsx)(at.Ph,{placeholder:n.algorithmName,onChange:function(e){t((function(n){return dt(dt({},n),{},{algorithmName:e.target.value})}))},children:n.algorithmOptions.map((function(e){return(0,re.jsx)("option",{value:e,children:e},e)}))})]})]})})})})};function gt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pt=function(e){var n=e.label,t=e.colorList,r=e.value,o=e.visValue,l=e.setVisuals,s=e.noEmpty,c=(0,b.useCallback)((function(e){return l((function(n){return ft(ft({},n),{},(0,i.Z)({},r,e))}))}),[]);return(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:n}),(0,re.jsxs)(Ye.J2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(Ye.xo,{children:(0,re.jsx)(h.Button,{colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:(0,re.jsx)(u.Box,{bgColor:o,borderRadius:"sm",height:6,width:6})})}),(0,re.jsx)(en.h_,{children:(0,re.jsx)(Ye.yk,{zIndex:"tooltip",maxW:36,position:"relative",children:(0,re.jsxs)(u.Flex,{flexWrap:"wrap",bgColor:"gray.200",children:[!s&&(0,re.jsx)(u.Box,{onClick:function(){return c("")},justifyContent:"space-between",alignItems:"center",display:"flex",m:1,children:(0,re.jsx)(u.Box,{height:6,width:6,borderColor:"gray.600",borderRadius:"xl",borderWidth:1})}),t.map((function(e){return(0,re.jsx)(u.Box,{m:1,onClick:function(){return c(e)},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{bgColor:e,borderRadius:"xl",height:6,width:6})},e)}))]})})})]})]})};function xt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function jt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var bt=function(e){var n=e.visuals,t=e.setVisualsCallback,r=e.highlightColor,i=e.setHighlightColor;return(0,re.jsx)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:(0,re.jsxs)(u.Box,{children:[(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Nodes"}),(0,re.jsx)(d.u,{label:"Shuffle node colors",children:(0,re.jsx)(h.IconButton,{"aria-label":"Shuffle node colors",size:"sm",icon:(0,re.jsx)(V.RepeatIcon,{}),variant:"ghost",onClick:function(){var e,r=null!==(e=n.nodeColorScheme)&&void 0!==e?e:[];t(jt(jt({},n),{},{nodeColorScheme:r.map((function(e){return[Math.random(),e]})).sort((function(e,n){return(0,l.Z)(e,1)[0]-(0,l.Z)(n,1)[0]})).map((function(e){var n=(0,l.Z)(e,2);n[0];return n[1]}))}))}})}),(0,re.jsx)(d.u,{label:"Cycle node colors",children:(0,re.jsx)(h.IconButton,{"aria-label":"Shift node colors",icon:(0,re.jsx)(V.ArrowRightIcon,{}),size:"sm",variant:"ghost",onClick:function(){var e,r=null!==(e=n.nodeColorScheme)&&void 0!==e?e:[];t(jt(jt({},n),{},{nodeColorScheme:[].concat((0,o.Z)(r.slice(1,r.length)),[r[0]])}))}})}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",closeOnSelect:!1,matchWidth:!0,children:[(0,re.jsx)(A.j2,{width:20,as:h.Button,colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:(0,re.jsx)(u.Flex,{height:6,width:6,flexDirection:"column",flexWrap:"wrap",children:n.nodeColorScheme.map((function(e){return(0,re.jsx)(u.Box,{bgColor:e,flex:"1 1 8px",borderRadius:"2xl"},e)}))})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsx)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:(0,re.jsx)(A.__,{width:500,type:"checkbox",defaultValue:n.nodeColorScheme,onChange:function(e){e.length&&t(jt(jt({},n),{},{nodeColorScheme:e}))},children:W.map((function(e){return(0,re.jsx)(A.ii,{isChecked:n.nodeColorScheme.some((function(n){return n===e})),value:e,isDisabled:1===n.nodeColorScheme.length&&n.nodeColorScheme[0]===e,children:(0,re.jsx)(u.Box,{justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{bgColor:e,borderRadius:"sm",height:6,width:6})})},e)}))})})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Links"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:(0,re.jsx)(u.Box,{children:n.linkColorScheme?(0,re.jsx)(u.Box,{bgColor:n.linkColorScheme,borderRadius:"sm",height:6,width:6}):(0,re.jsx)(u.Flex,{height:6,width:6,flexDirection:"column",flexWrap:"wrap",children:n.nodeColorScheme.map((function(e){return(0,re.jsx)(u.Box,{bgColor:e,flex:"1 1 8px",borderRadius:"2xl"},e)}))})})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:[(0,re.jsx)(A.sN,{onClick:function(){return t(jt(jt({},n),{},{linkColorScheme:""}))},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Flex,{height:6,width:6,flexDirection:"column",flexWrap:"wrap",children:n.nodeColorScheme.map((function(e){return(0,re.jsx)(u.Box,{bgColor:e,flex:"1 1 8px",borderRadius:"2xl"},e)}))})}),W.map((function(e){return(0,re.jsx)(A.sN,{onClick:function(){return t(jt(jt({},n),{},{linkColorScheme:e}))},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{bgColor:e,borderRadius:"sm",height:6,width:6})},e)}))]})]})]})]}),(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Accent"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:(0,re.jsx)(u.Box,{bgColor:r,borderRadius:"sm",height:6,width:6})}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsx)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:W.map((function(e){return(0,re.jsx)(A.sN,{onClick:function(){return i(e)},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{bgColor:e,borderRadius:"sm",height:6,width:6})},e)}))})]})]})]}),(0,re.jsx)(pt,{colorList:W,label:"Link highlight",setVisuals:t,value:"linkHighlight",visValue:n.linkHighlight}),(0,re.jsx)(pt,{colorList:W,label:"Node highlight",setVisuals:t,value:"nodeHighlight",visValue:n.nodeHighlight}),(0,re.jsx)(pt,{colorList:W,label:"Background",setVisuals:t,value:"backgroundColor",visValue:n.backgroundColor}),(0,re.jsx)(pt,{colorList:W,label:"Emacs node",setVisuals:t,value:"emacsNodeColor",visValue:n.emacsNodeColor})]})})};function vt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function mt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var yt=function(e){var n=e.visuals,t=e.setVisuals,r=e.threeDim;return(0,re.jsx)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:(0,re.jsxs)(u.Box,{children:[(0,re.jsx)(Qn,{label:"Node size",value:n.nodeRel,onChange:function(e){return t(mt(mt({},n),{},{nodeRel:e}))}}),(0,re.jsx)(Qn,{label:"Node degree size multiplier",value:n.nodeSizeLinks,min:0,max:2,onChange:function(e){return t(mt(mt({},n),{},{nodeSizeLinks:e}))}}),(0,re.jsx)(Qn,{label:"Node zoom invariance",value:n.nodeZoomSize,min:0,max:2,infoText:"How much the graph will try to keep the nodesize consistent across zoom scales. 0 is no consistency, node will always be their true size, 1 is linear, 2 is quadratic.",onChange:function(e){return t((function(n){return mt(mt({},n),{},{nodeZoomSize:e})}))}}),r&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Qn,{label:"Node opacity",value:n.nodeOpacity,min:0,max:1,onChange:function(e){return t(mt(mt({},n),{},{nodeOpacity:e}))}}),(0,re.jsx)(Qn,{label:"Node resolution",value:n.nodeResolution,min:5,max:32,step:1,onChange:function(e){return t(mt(mt({},n),{},{nodeResolution:e}))}})]}),(0,re.jsx)(Qn,{label:"Link width",value:n.linkWidth,onChange:function(e){return t(mt(mt({},n),{},{linkWidth:e}))}}),r&&(0,re.jsx)(Qn,{label:"Link opacity",min:0,max:1,value:n.linkOpacity,onChange:function(e){return t(mt(mt({},n),{},{linkOpacity:e}))}}),(0,re.jsxs)(tt,{label:"Link arrows",value:n.arrows,onChange:function(){return t(mt(mt({},n),{},{arrows:!n.arrows}))},children:[(0,re.jsx)(Qn,{label:"Arrow size",value:n.arrowsLength/10,onChange:function(e){return t(mt(mt({},n),{},{arrowsLength:10*e}))}}),(0,re.jsx)(Qn,{label:"Arrow Position",value:n.arrowsPos,min:0,max:1,step:.01,onChange:function(e){return t(mt(mt({},n),{},{arrowsPos:e}))}}),(0,re.jsx)(pt,{colorList:W,label:"Arrow Color",setVisuals:t,value:"arrowsColor",visValue:n.arrowsColor},"arrow")]}),(0,re.jsxs)(tt,{label:"Directional Particles",value:n.particles,onChange:function(){return t(mt(mt({},n),{},{particles:!n.particles}))},children:[(0,re.jsx)(Qn,{label:"Particle Number",value:n.particlesNumber,max:5,step:1,onChange:function(e){return t(mt(mt({},n),{},{particlesNumber:e}))}}),(0,re.jsx)(Qn,{label:"Particle Size",value:n.particlesWidth,onChange:function(e){return t(mt(mt({},n),{},{particlesWidth:e}))}})]})]})})};function Ct(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ot(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ct(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ct(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var wt=function(e){var n=e.visuals,t=e.setVisuals;return(0,re.jsxs)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.400"}),align:"stretch",color:"gray.800",children:[(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,re.jsx)(u.Text,{children:"Show labels"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:n.labels?n.labels<2?"On Highlight":"Always":"Never"}),(0,re.jsxs)(en.h_,{children:[" ",(0,re.jsxs)(A.qy,{zIndex:"popover",bgColor:"gray.200",children:[(0,re.jsx)(A.sN,{onClick:function(){return t(Ot(Ot({},n),{},{labels:0}))},children:"Never"}),(0,re.jsx)(A.sN,{onClick:function(){return t(Ot(Ot({},n),{},{labels:1}))},children:"On Highlight"}),(0,re.jsx)(A.sN,{onClick:function(){return t(Ot(Ot({},n),{},{labels:2}))},children:"Always"}),(0,re.jsx)(A.sN,{onClick:function(){return t(Ot(Ot({},n),{},{labels:3}))},children:"Always (even in 3D)"})]})]})]})]}),(0,re.jsxs)(nt.UO,{in:n.labels>1,animateOpacity:!0,children:[(0,re.jsx)(u.Box,{paddingTop:2,children:(0,re.jsx)(Qn,{label:"Label Appearance Scale",value:2*n.labelScale,onChange:function(e){return t(Ot(Ot({},n),{},{labelScale:e/2}))}})}),(0,re.jsxs)(u.Box,{paddingTop:2,children:[(0,re.jsx)(Qn,{label:"Label dynamicity",infoText:"By default, labels of nodes with more links will appear earlier than those with fewer. This slider changes the strength of this effect, put it at zero to disable it.",value:n.labelDynamicStrength,min:0,max:1,step:.05,onChange:function(e){return t((function(n){return Ot(Ot({},n),{},{labelDynamicStrength:e})}))}}),(0,re.jsx)(nt.UO,{in:n.labelDynamicStrength>0,children:(0,re.jsx)(Qn,{label:"Dynamic zoom degree cap",infoText:"The maximum number of links that is considered for the 'dynamic zoom effect'. Past this number all number of links are treated the same.",value:n.labelDynamicDegree,min:1,max:15,step:1,onChange:function(e){return t((function(n){return Ot(Ot({},n),{},{labelDynamicDegree:e})}))}})})]})]}),(0,re.jsx)(pt,{colorList:W,label:"Text",setVisuals:t,value:"labelTextColor",visValue:n.labelTextColor}),(0,re.jsxs)(u.Box,{children:[(0,re.jsx)(pt,{colorList:W,label:"Background",setVisuals:t,value:"labelBackgroundColor",visValue:n.labelBackgroundColor}),(0,re.jsx)(nt.UO,{in:!!n.labelBackgroundColor,animateOpacity:!0,children:(0,re.jsx)(u.Box,{paddingTop:2,children:(0,re.jsx)(Qn,{label:"Background opacity",value:n.labelBackgroundOpacity,onChange:function(e){console.log(n.labelBackgroundOpacity),t(Ot(Ot({},n),{},{labelBackgroundOpacity:e}))},min:0,max:1,step:.01})})})]}),(0,re.jsx)(Qn,{label:"Label font size",value:n.labelFontSize,min:5,max:20,step:.5,onChange:function(e){return t(Ot(Ot({},n),{},{labelFontSize:e}))}}),(0,re.jsx)(Qn,{label:"Max. label characters",value:n.labelLength,min:10,max:100,step:1,onChange:function(e){return t(Ot(Ot({},n),{},{labelLength:e}))}}),(0,re.jsx)(Qn,{label:"Max. label line length",value:n.labelWordWrap,min:10,max:100,step:1,onChange:function(e){return t(Ot(Ot({},n),{},{labelWordWrap:e}))}}),(0,re.jsx)(Qn,{label:"Space between label lines",value:n.labelLineSpace,min:.2,max:3,step:.1,onChange:function(e){return t(Ot(Ot({},n),{},{labelLineSpace:e}))}})]})},kt=t(67690),St=function(){var e=(0,b.useContext)(nn.N),n=e.emacsTheme,t=e.setEmacsTheme;e.highlightColor;return(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",pl:7,pr:2,children:[(0,re.jsx)(u.Text,{children:"Theme"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"bottom",closeOnSelect:!1,children:[(0,re.jsx)(A.j2,{as:h.Button,size:"sm",colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:n[0]}),(0,re.jsxs)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:[(0,re.jsx)(A.sN,{onClick:function(){return""},justifyContent:"space-between",alignItems:"center",display:"flex",children:(0,re.jsx)(u.Box,{height:6,width:6})}),Object.keys(kt.n).map((function(e,n){return(0,re.jsxs)(A.sN,{onClick:function(){return t([e,kt.n[e]])},justifyContent:"space-between",alignItems:"center",display:"flex",children:[(0,re.jsx)(u.Text,{children:e}),(0,re.jsx)(u.Flex,{height:6,width:20,flexDirection:"column",flexWrap:"wrap",children:Object.values(kt.n[e]).map((function(e){return(0,re.jsx)(u.Box,{bgColor:e,flex:"1 1 8px"},e)}))})]},e)}))]})]})]})};function Nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function It(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Nt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Pt=function(e){var n=e.visuals,t=e.setVisuals;return(0,re.jsx)(u.VStack,{spacing:2,justifyContent:"flex-start",divider:(0,re.jsx)(u.StackDivider,{borderColor:"gray.500"}),align:"stretch",color:"gray.800",children:(0,re.jsxs)(u.Box,{children:[(0,re.jsxs)(tt,{label:"Dash cite links",infoText:"Add dashes to citation links made with org-roam-bibtex",value:n.citeDashes,onChange:function(){return t(It(It({},n),{},{citeDashes:!n.citeDashes}))},children:[(0,re.jsx)(Qn,{label:"Dash length",value:n.citeDashLength/10,onChange:function(e){return t(It(It({},n),{},{citeDashLength:10*e}))}}),(0,re.jsx)(Qn,{label:"Gap length",value:n.citeGapLength/5,onChange:function(e){return t(It(It({},n),{},{citeGapLength:5*e}))}})]}),(0,re.jsx)(pt,{colorList:W,label:"Citation node color",setVisuals:t,value:"citeNodeColor",visValue:n.citeNodeColor}),(0,re.jsx)(pt,{colorList:W,label:"Citation link color",setVisuals:t,value:"citeLinkColor",visValue:n.citeLinkColor}),(0,re.jsx)(pt,{colorList:W,label:"Reference link highlight",setVisuals:t,value:"citeLinkHighlightColor",visValue:n.citeLinkHighlightColor}),(0,re.jsxs)(tt,{label:"Dash ref links",infoText:"Add dashes to citation links, whose target has a note, made with org-roam-bibtex",value:n.refDashes,onChange:function(){return t(It(It({},n),{},{refDashes:!n.refDashes}))},children:[(0,re.jsx)(Qn,{label:"Dash length",value:n.refDashLength/10,onChange:function(e){return t(It(It({},n),{},{refDashLength:10*e}))}}),(0,re.jsx)(Qn,{label:"Gap length",value:n.refGapLength/5,onChange:function(e){return t(It(It({},n),{},{refGapLength:5*e}))}})]}),(0,re.jsx)(pt,{colorList:W,label:"Reference node color",setVisuals:t,value:"refNodeColor",visValue:n.refNodeColor}),(0,re.jsx)(pt,{colorList:W,label:"Reference link color",setVisuals:t,value:"refLinkColor",visValue:n.refLinkColor}),(0,re.jsx)(pt,{colorList:W,label:"Reference link highlight",setVisuals:t,value:"refLinkHighlightColor",visValue:n.refLinkHighlightColor})]})})};function Dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Bt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Lt=function(e){var n=e.coloring,t=e.setColoring;return(0,re.jsxs)(u.Flex,{alignItems:"center",justifyContent:"space-between",pl:7,pr:2,children:[(0,re.jsx)(u.Text,{children:"Graph coloring"}),(0,re.jsxs)(A.v2,{isLazy:!0,placement:"right",children:[(0,re.jsx)(A.j2,{as:h.Button,size:"sm",colorScheme:"",color:"black",rightIcon:(0,re.jsx)(V.ChevronDownIcon,{}),children:"degree"===n.method?"Links":"Communities"}),(0,re.jsx)(en.h_,{children:(0,re.jsxs)(A.qy,{minW:10,zIndex:"popover",bgColor:"gray.200",children:[(0,re.jsx)(A.sN,{onClick:function(){return t((function(e){return Bt(Bt({},e),{},{method:"degree"})}))},justifyContent:"space-between",alignItems:"center",display:"flex",children:"Number of links"}),(0,re.jsx)(A.sN,{onClick:function(){return t((function(e){return Bt(Bt({},e),{},{method:"community"})}))},justifyContent:"space-between",alignItems:"center",display:"flex",children:"Communities"})]})})]})]})},Tt=function(e){var n=e.coloring,t=e.setColoring,r=e.visuals,o=e.setVisuals,i=e.highlightColor,l=e.setHighlightColor,s=e.threeDim,c=(0,b.useCallback)((function(e){return o(e)}),[]);return(0,re.jsxs)(u.VStack,{justifyContent:"flex-start",align:"stretch",children:[(0,re.jsx)(St,{}),(0,re.jsx)(Lt,{coloring:n,setColoring:t}),(0,re.jsxs)(Zn.UQ,{allowToggle:!0,defaultIndex:[0],paddingLeft:3,children:[(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{children:(0,re.jsxs)(u.Flex,{justifyContent:"space-between",w:"100%",children:[(0,re.jsx)(u.Text,{children:"Colors"}),(0,re.jsx)(Zn.XE,{marginRight:2})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(bt,{visuals:r,setVisualsCallback:c,highlightColor:i,setHighlightColor:l})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{children:(0,re.jsxs)(u.Flex,{justifyContent:"space-between",w:"100%",children:[(0,re.jsx)(u.Text,{children:"Nodes & Links"}),(0,re.jsx)(Zn.XE,{marginRight:2})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(yt,{visuals:r,setVisuals:c,threeDim:s})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{children:(0,re.jsxs)(u.Flex,{justifyContent:"space-between",w:"100%",children:[(0,re.jsx)(u.Text,{children:"Labels"}),(0,re.jsx)(Zn.XE,{marginRight:2})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(wt,{visuals:r,setVisuals:c})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{children:(0,re.jsxs)(u.Flex,{justifyContent:"space-between",w:"100%",children:[(0,re.jsx)(u.Text,{children:"Highlighting"}),(0,re.jsx)(Zn.XE,{marginRight:2})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(ht,{visuals:r,setVisuals:c})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{children:(0,re.jsxs)(u.Flex,{justifyContent:"space-between",w:"100%",children:[(0,re.jsx)(u.Text,{children:"Citations"}),(0,re.jsx)(Zn.XE,{marginRight:2})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(Pt,{visuals:r,setVisuals:c})})]})]})]})},zt=["style"];function Ft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Et(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ft(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ft(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Rt=function(e){var n=e.physics,t=e.setPhysics,r=e.threeDim,o=e.setThreeDim,i=e.filter,s=e.setFilter,c=e.visuals,a=e.setVisuals,g=e.mouse,f=e.setMouse,p=e.behavior,x=e.setBehavior,j=e.tags,v=e.tagColors,m=e.setTagColors,y=e.coloring,C=e.setColoring,O=e.local,w=e.setLocal,k=Ln("showTweaks",!1),S=(0,l.Z)(k,2),N=S[0],I=S[1],P=(0,b.useContext)(nn.N),D=P.highlightColor,B=P.setHighlightColor;return N?(0,re.jsxs)(u.Box,{position:"absolute",bg:"alt.100",w:"xs",marginTop:2,marginLeft:2,borderRadius:"lg",paddingBottom:5,zIndex:10,boxShadow:"xl",maxH:"95vh",fontSize:"sm",children:[(0,re.jsxs)(u.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:2,paddingTop:1,children:[(0,re.jsx)(d.u,{label:"2D",children:(0,re.jsx)(h.Button,{onClick:function(){return o(!r)},variant:"subtle",zIndex:"overlay",children:r?"3D":"2D"})}),(0,re.jsxs)(u.Box,{display:"flex",alignItems:"center",children:[(0,re.jsx)(d.u,{label:"Reset settings to defaults",children:(0,re.jsx)(h.IconButton,{"aria-label":"Reset Defaults",icon:(0,re.jsx)(V.RepeatClockIcon,{}),onClick:function(){a(E),s(z),f(Z),t(T),x(R),C(F),B("purple.500"),w(H)},variant:"subtle",size:"sm"})}),(0,re.jsx)(h.IconButton,{size:"sm",icon:(0,re.jsx)(V.CloseIcon,{}),"aria-label":"Close Tweak Panel",variant:"subtle",onClick:function(){return I(!1)}})]})]}),(0,re.jsx)(ln.ZP,{autoHeight:!0,autoHeightMax:.85*globalThis.innerHeight,autoHide:!0,renderThumbVertical:function(e){var n=e.style,t=(0,q.Z)(e,zt);return(0,re.jsx)(u.Box,Et(Et({},t),{},{style:Et(Et({},n),{},{borderRadius:10}),bg:D}))},children:(0,re.jsxs)(Zn.UQ,{allowMultiple:!0,allowToggle:!0,color:"black",children:[(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:[(0,re.jsx)(Zn.XE,{marginRight:2}),(0,re.jsx)(u.Heading,{size:"sm",children:"Filter"})]}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(et,{filter:i,setFilter:s,tagColors:v,setTagColors:m,highlightColor:D,colorList:W,tags:j,local:O,setLocal:w})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsx)(Zn.KF,{display:"flex",justifyContent:"space-between",children:(0,re.jsxs)(u.Box,{display:"flex",children:[(0,re.jsx)(Zn.XE,{marginRight:2}),(0,re.jsx)(u.Heading,{size:"sm",children:"Physics"})]})}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(it,{physics:n,setPhysics:t})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:[(0,re.jsx)(Zn.XE,{marginRight:2}),(0,re.jsx)(u.Heading,{size:"sm",children:"Visual"})]}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(Tt,{visuals:c,setVisuals:a,highlightColor:D,setHighlightColor:B,threeDim:r,coloring:y,setColoring:C})})]}),(0,re.jsxs)(Zn.Qd,{children:[(0,re.jsxs)(Zn.KF,{children:[(0,re.jsx)(Zn.XE,{marginRight:2}),(0,re.jsx)(u.Heading,{size:"sm",children:"Behavior"})]}),(0,re.jsx)(Zn.Hk,{children:(0,re.jsx)(ct,{behavior:p,setBehavior:x,mouse:g,setMouse:f})})]})]})})]}):(0,re.jsx)(u.Box,{position:"absolute",zIndex:"overlay",marginTop:1,marginLeft:0,display:N?"none":"block",children:(0,re.jsx)(h.IconButton,{variant:"subtle","aria-label":"Settings",icon:(0,re.jsx)(V.SettingsIcon,{}),onClick:function(){return I(!0)}})})},Zt=t(22663),Ht=t.n(Zt);function Wt(e){var n,t,r,i,l=e.labelBackgroundColor,s=e.labelTextColor,c=e.node,a=e.ctx,u=e.globalScale,d=e.highlightedNodes,h=e.previouslyHighlightedNodes,g=e.visuals,f=e.opacity,p=e.nodeSize,x=e.filteredLinksByNodeId,j=(e.nodeRel,e.hoverNode),b=e.lastHoverNode;if(c&&g.labels){var v=null!==(n=null===j||void 0===j?void 0:j.id)&&void 0!==n?n:"",m=null!==(t=null===b||void 0===b?void 0:b.id)&&void 0!==t?t:"",y=null!==(r=x[c.id])&&void 0!==r?r:[],C=!(!d[c.id]&&!h[c.id]),O=Math.min(5*(u-g.labelScale)+2*Math.pow(Math.min(y.length,g.labelDynamicDegree),g.labelDynamicStrength),1);if(!(O<.01)||C){var w=null!==(i=c.title)&&void 0!==i?i:"",k=w.substring(0,g.labelLength),S=Math.cbrt(g.nodeRel*p(c)/Math.pow(u,g.nodeZoomSize)),N=g.labelFontSize/Math.cbrt(Math.pow(u,g.nodeZoomSize)),I=[1.1*a.measureText(k).width,N].map((function(e){return e+.5*N})),P=function(e,n,t,r,o){return o?Math.max(e,r):1*e*(-1*(n.highlightFade*r-1))}(O,g,0,f,C);if(g.labelBackgroundColor&&g.labelBackgroundOpacity){var D=$t(l,P*g.labelBackgroundOpacity);a.fillStyle=D,a.fillRect.apply(a,[c.x-I[0]/2,c.y-I[1]/2+S].concat((0,o.Z)(I)))}a.textAlign="center",a.textBaseline="middle";var B=$t(s,P);a.fillStyle=B,a.font="".concat(N,"px Sans-Serif");var L=Ht()(k,{width:g.labelWordWrap}).split("\n"),T=w.length>g.labelLength?[].concat((0,o.Z)(L.slice(0,-1)),["".concat(L.slice(-1),"...")]):L,z=[v,m].includes(c.id)?1+.3*f:1;T.forEach((function(e,n){a.fillText(e,c.x,c.y+z*S*8+g.labelLineSpace*N*n)}))}}}function At(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Mt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?At(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):At(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Vt=t.e(907).then(t.bind(t,99907)),_t=t.g.window?t(24878).f$:null,Ut=t.g.window?t(24878).s6:null;function qt(){var e=(0,b.useState)(!1),n=e[0],t=e[1];return(0,b.useEffect)((function(){t(!0)}),[]),n?(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(j.default,{children:(0,re.jsx)("title",{children:"ORUI"})}),(0,re.jsx)(Gt,{})]}):null}function Gt(){var e=Ln("3d",!1),n=(0,l.Z)(e,2),t=n[0],r=n[1],s=Ln("tagCols",{}),c=(0,l.Z)(s,2),g=c[0],f=c[1],x=(0,b.useState)({nodeIds:[],excludedNodeIds:[]}),j=x[0],v=x[1],m=Ln("physics",T),w=(0,l.Z)(m,2),S=w[0],N=w[1],I=Ln("filter",z),P=(0,l.Z)(I,2),D=P[0],B=P[1],L=Ln("visuals",E),W=(0,l.Z)(L,2),A=W[0],M=W[1],V=(0,b.useState)(null),_=V[0],U=V[1],q=(0,b.useState)(null),G=q[0],X=q[1],J=Ln("behavior",R),Q=(0,l.Z)(J,2),K=Q[0],$=Q[1],Y=Ln("mouse",Z),ee=(0,l.Z)(Y,2),ne=ee[0],te=ee[1],oe=Ln("coloring",F),ie=(0,l.Z)(oe,2),le=ie[0],se=ie[1],ce=Ln("local",H),ae=(0,l.Z)(ce,2),ue=ae[0],de=ae[1],he=(0,k.Z)({}),ge=(0,l.Z)(he,2),pe=ge[0],xe=ge[1],je=xe.set,be=xe.reset,ve=xe.undo,me=xe.redo,ye=xe.canUndo,Ce=xe.canRedo,Oe=(pe.past,pe.present),we=(pe.future,(0,b.useState)(null)),ke=we[0],Se=we[1],Ne=(0,a.qY)(),Ie=Ne.isOpen,Pe=Ne.onOpen,De=Ne.onClose,Be=(0,b.useRef)({}),Le=(0,b.useRef)({}),Te=(0,b.useRef)({}),ze=(0,b.useRef)([]),Fe=(0,b.useRef)(null),Ee=(0,b.useState)({}),Re=Ee[0],Ze=Ee[1],He=(0,b.useRef)({}),We=(0,b.useRef)({nodes:[],links:[]});(0,b.useEffect)((function(){_&&(We.current=_)}),[_]);var Ae=(0,b.useContext)(nn.N).setEmacsTheme,Me=(0,b.useRef)({nodeIds:[],excludedNodeIds:[]}),Ve=(0,b.useRef)(R);Ve.current=K;var _e=(0,b.useRef)(null);Me.current=j;var Ue=function(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:200;if("color"!==e){var l=Fe.current,s=Me.current,c=Ve.current,a=null!==(t=Le.current[n])&&void 0!==t?t:[],u=Object.fromEntries([n].concat((0,o.Z)(a.flatMap((function(e){return[e.source,e.target]})))).map((function(e){return[e,{}]})));if("zoom"===e)return s.nodeIds.length&&v({nodeIds:[],excludedNodeIds:[]}),void setTimeout((function(){return l.zoomToFit(r,i,(function(e){return u[e.id]}))}),50);if(!s.nodeIds.length)return v((function(e){return Mt(Mt({},e),{},{nodeIds:[n]})})),void setTimeout((function(){l.centerAt(0,0,10),l.zoomToFit(1,i)}),50);if("add"!==c.localSame)return v((function(e){return Mt(Mt({},e),{},{nodeIds:[n]})})),void setTimeout((function(){l.centerAt(0,0,10),l.zoomToFit(1,i)}),50);if(!s.nodeIds.includes(n)||!s.nodeIds.some((function(e){return u[e]})))return v((function(e){return Mt(Mt({},e),{},{nodeIds:[n]})})),void setTimeout((function(){l.centerAt(0,0,10),l.zoomToFit(1,i)}),50);v((function(e){return Mt(Mt({},e),{},{nodeIds:[].concat((0,o.Z)(e.nodeIds),[n])})})),setTimeout((function(){l.centerAt(0,0,10),l.zoomToFit(1,i)}),50)}};(0,b.useEffect)((function(){_e.current=new O.Z("ws://localhost:35903"),_e.current.addEventListener("open",(function(){console.log("Connection with Emacs established")})),_e.current.addEventListener("message",(function(e){var n=Ve.current,t=JSON.parse(e.data);switch(t.type){case"graphdata":return function(e){var n,t,r,s=Be.current;ze.current=null!==(n=e.tags)&&void 0!==n?n:[];var c=null!==(t=e.nodes)&&void 0!==t?t:[],a=null!==(r=e.links)&&void 0!==r?r:[],u=c.reduce((function(e,n){var t;return Mt(Mt({},e),{},(0,i.Z)({},n.file,[].concat((0,o.Z)(null!==(t=e[n.file])&&void 0!==t?t:[]),[n])))}),{}),d=Object.keys(u).flatMap((function(e){var n,t=null!==(n=u[e])&&void 0!==n?n:[],r=t.find((function(e){return 0===e.level})),o=t.filter((function(e){return 0!==e.level}));return r?o.map((function(e){var n=t.filter((function(n){var t,r;return!(n.level>=e.level||n.pos>=e.pos||null===(t=e.olp)||void 0===t||!t.includes(null===(r=n.title)||void 0===r?void 0:r.replace(/ *\[\d*\/\d*\] */g,"")))})).reduce((function(e,n){return n.level>e.level&&(e=n),e}),r);return{source:e.id,target:(null===n||void 0===n?void 0:n.id)||r.id,type:"heading"}})):[]})),h=Object.keys(u).flatMap((function(e){var n,t=null!==(n=u[e])&&void 0!==n?n:[],r=t.find((function(e){return 0===e.level})),o=t.filter((function(e){return 0!==e.level}));return r?o.map((function(e){return{source:e.id,target:r.id,type:"parent"}})):[]}));Be.current=Object.fromEntries(c.map((function(e){return[e.id,e]})));var g=[].concat((0,o.Z)(a),(0,o.Z)(d),(0,o.Z)(h)),f=[],p=g.map((function(e){var n=e.source,t=e.target;return Be.current[n]?Be.current[t]?e:(f.push({id:t,tags:["bad"],properties:{FILELESS:"yes",bad:"yes"},file:"",title:t,level:0,pos:0,olp:null}),Mt(Mt({},e),{},{type:"bad"})):(f.push({id:n,tags:["bad"],properties:{FILELESS:"yes",bad:"yes"},file:"",title:n,level:0,pos:0,olp:null}),Mt(Mt({},e),{},{type:"bad"}))}));Be.current=Mt(Mt({},Be.current),Object.fromEntries(f.map((function(e){return[e.id,e]})))),Le.current=p.reduce((function(e,n){var t,r,l;return Mt(Mt({},e),{},(l={},(0,i.Z)(l,n.source,[].concat((0,o.Z)(null!==(t=e[n.source])&&void 0!==t?t:[]),[n])),(0,i.Z)(l,n.target,[].concat((0,o.Z)(null!==(r=e[n.target])&&void 0!==r?r:[]),[n])),l))}),{});var x=[].concat((0,o.Z)(c),f);Te.current=x.reduce((function(e,n){var t,r=null===(t=n.properties)||void 0===t?void 0:t.ROAM_REFS;if(null===r||void 0===r||!r.includes("cite"))return e;var o=r.replaceAll(/cite:(.*)/g,"$1");return o?Mt(Mt({},e),{},(0,i.Z)({},o,n)):e}),{});var j={nodes:x,links:p},b=We.current;if(0===b.nodes.length){var v=JSON.parse(JSON.stringify(j));return We.current=v,void U(v)}var m=[].concat((0,o.Z)(b.nodes.flatMap((function(e){var n,t=null!==(n=Be.current[null===e||void 0===e?void 0:e.id])&&void 0!==n&&n;return t?[Mt(Mt({},e),t)]:[]}))),(0,o.Z)(Object.keys(Be.current).filter((function(e){return!s[e]})).map((function(e){return Be.current[e]})))),y=m.reduce((function(e,n,t){var r=null===n||void 0===n?void 0:n.id;return Mt(Mt({},e),{},(0,i.Z)({},r,t))}),{}),C=p.map((function(e){var n=Qt(e),t=(0,l.Z)(n,2),r=t[0],o=t[1];return Mt(Mt({},e),{},{source:m[y[r]],target:m[y[o]]})}));U({nodes:m,links:C})}(t.data);case"variables":return Ze(t.data),void console.log(t);case"theme":return Ae(["custom",t.data]);case"command":switch(t.data.commandName){case"local":var r=K.zoomSpeed,s=K.zoomPadding;Ue("local",t.data.id,r,s),X(t.data.id);break;case"zoom":var c,a,u=(null===t||void 0===t||null===(c=t.data)||void 0===c?void 0:c.speed)||n.zoomSpeed,d=(null===t||void 0===t||null===(a=t.data)||void 0===a?void 0:a.padding)||n.zoomPadding;Ue("zoom",t.data.id,u,d),X(t.data.id);break;case"follow":Ue(n.follow,t.data.id,n.zoomSpeed,n.zoomPadding),X(t.data.id);break;default:return console.error("unknown message type",t.type)}}}))}),[]),(0,b.useEffect)((function(){var e=Fe.current;!e||j.nodeIds.length>1||(j.nodeIds.length||!S.gravityOn?setTimeout((function(){e.zoomToFit(5,200)}),50):e.zoomToFit())}),[j.nodeIds]);var qe=(0,p.iP)(),Ge=(0,l.Z)(qe,2),Xe=Ge[0],Je=Ge[1],Qe=(0,b.useRef)(),Ke=(0,b.useState)(null),$e=Ke[0],Ye=Ke[1],en=(0,b.useState)({left:0,top:0,right:void 0,bottom:void 0}),tn=en[0],rn=en[1],on=(0,a.qY)();(0,a.O3)({ref:Qe,handler:function(){on.onClose()}});var ln=function(e,n,t){rn(t||{left:n.pageX,top:n.pageY,right:void 0,bottom:void 0}),Ye(e),on.onOpen()},sn=function(e,n){"remove"!==n?"replace"!==n?j.nodeIds.includes(e.id)||v((function(n){return Mt(Mt({},n),{},{nodeIds:[].concat((0,o.Z)(n.nodeIds),[e.id])})})):v({nodeIds:[e.id],excludedNodeIds:[]}):v((function(n){return Mt(Mt({},n),{},{excludedNodeIds:[].concat((0,o.Z)(n.excludedNodeIds),[e.id])})}))},cn=(0,b.useState)({type:"Graph",title:"Graph",icon:(0,re.jsx)(y.DvO,{})}),an=(cn[0],cn[1],Ln("mainWindowWidth",Xe)),un=(0,l.Z)(an,2),dn=un[0],hn=un[1];return console.log(Re),(0,re.jsx)(Kn.Provider,{value:Mt({},Re),children:(0,re.jsxs)(u.Box,{display:"flex",alignItems:"flex-start",flexDirection:"row",height:"100vh",overflow:"clip",children:[(0,re.jsx)(Rt,{physics:S,setPhysics:N,threeDim:t,setThreeDim:r,filter:D,setFilter:B,visuals:A,setVisuals:M,mouse:ne,setMouse:te,behavior:K,setBehavior:$,tagColors:g,setTagColors:f,coloring:le,setColoring:se,local:ue,setLocal:de,tags:ze.current}),(0,re.jsx)(u.Box,{position:"absolute",children:_&&(0,re.jsx)(Xt,{nodeById:Be.current,linksByNodeId:Le.current,webSocket:_e.current,variables:Re,physics:S,graphData:_,threeDim:t,emacsNodeId:G,filter:D,visuals:A,behavior:K,mouse:ne,scope:j,setScope:v,tagColors:g,setPreviewNode:je,sidebarHighlightedNode:ke,windowWidth:Xe,windowHeight:Je,openContextMenu:ln,contextMenu:on,handleLocal:sn,mainWindowWidth:dn,setMainWindowWidth:hn,setContextMenuTarget:Ye,graphRef:Fe,clusterRef:He,coloring:le,local:ue})}),(0,re.jsx)(u.Box,{position:"relative",zIndex:4,width:"100%",children:(0,re.jsx)(u.Flex,{className:"headerBar",h:10,flexDir:"column",children:(0,re.jsx)(u.Flex,{alignItems:"center",h:10,justifyContent:"flex-end",children:(0,re.jsxs)(u.Flex,{height:"100%",flexDirection:"row",children:[j.nodeIds.length>0&&(0,re.jsx)(d.u,{label:"Return to main graph",children:(0,re.jsx)(h.IconButton,{m:1,icon:(0,re.jsx)(y.DvO,{}),"aria-label":"Exit local mode",onClick:function(){return v((function(e){return Mt(Mt({},e),{},{nodeIds:[]})}))},variant:"subtle"})}),(0,re.jsx)(d.u,{label:Ie?"Close sidebar":"Open sidebar",children:(0,re.jsx)(h.IconButton,{m:1,icon:(0,re.jsx)(C.iBV,{}),"aria-label":"Close file-viewer",variant:"subtle",onClick:Ie?De:Pe})})]})})})}),(0,re.jsx)(u.Box,{position:"relative",zIndex:4,children:(0,re.jsx)(Rn,{isOpen:Ie,onOpen:Pe,onClose:De,previewNode:Oe,setPreviewNode:je,canUndo:ye,canRedo:Ce,previousPreviewNode:ve,nextPreviewNode:me,resetPreviewNode:be,setSidebarHighlightedNode:Se,openContextMenu:ln,scope:j,setScope:v,windowWidth:Xe,tagColors:g,setTagColors:f,filter:D,setFilter:B,macros:Re.katexMacros,attachDir:Re.attachDir||"",nodeById:Be.current,linksByNodeId:Le.current,nodeByCite:Te.current})}),on.isOpen&&(0,re.jsx)("div",{ref:Qe,children:(0,re.jsx)(fe,{scope:j,target:$e,background:!1,coordinates:tn,handleLocal:sn,menuClose:on.onClose.bind(on),webSocket:_e.current,setPreviewNode:je,setFilter:B,filter:D,setTagColors:f,tagColors:g})})]})})}var Xt=function(e){var n=e.graphRef,t=e.physics,s=e.graphData,a=e.threeDim,d=e.linksByNodeId,h=e.filter,p=e.emacsNodeId,j=e.nodeById,v=e.visuals,y=e.behavior,C=e.mouse,O=e.scope,k=e.local,S=(e.setScope,e.webSocket),N=e.tagColors,I=e.setPreviewNode,P=e.sidebarHighlightedNode,D=e.windowWidth,B=e.windowHeight,T=(e.setContextMenuTarget,e.openContextMenu),z=e.contextMenu,F=e.handleLocal,E=e.variables,R=e.clusterRef,Z=e.coloring,H=E.dailyDir,A=(E.roamDir,(0,b.useState)(null)),M=A[0],V=A[1],_=(0,g.Fg)(),q=(0,b.useContext)(nn.N).emacsTheme,G=function(e,n,t){switch(e){case C.preview:I(n);break;case C.local:F(n,y.localSame);break;case C.follow:U(n,S);break;case C.context:T(n,t)}},X=(0,b.useRef)(null);(0,b.useEffect)((function(){p&&V(j[p])}),[p]);var J=(0,b.useRef)({}),Q=(0,b.useRef)({}),K=(0,b.useMemo)((function(){var e;Q.current={};var n=null===s||void 0===s||null===(e=s.nodes)||void 0===e?void 0:e.filter((function(e){var n,t,r,o,l=e;return h.dirsBlocklist.length&&h.dirsBlocklist.some((function(e){var n;return null===l||void 0===l||null===(n=l.file)||void 0===n?void 0:n.includes(e)}))||h.dirsAllowlist.length>0&&!h.dirsAllowlist.some((function(e){var n;return null===l||void 0===l||null===(n=l.file)||void 0===n?void 0:n.includes(e)}))||h.tagsBlacklist.length&&h.tagsBlacklist.some((function(e){var n;return(null===l||void 0===l||null===(n=l.tags)||void 0===n?void 0:n.indexOf(e))>-1}))||h.tagsWhitelist.length>0&&!h.tagsWhitelist.some((function(e){var n;return(null===l||void 0===l||null===(n=l.tags)||void 0===n?void 0:n.indexOf(e))>-1}))||h.filelessCites&&null!==l&&void 0!==l&&null!==(n=l.properties)&&void 0!==n&&n.FILELESS||null!==h&&void 0!==h&&h.bad&&null!==l&&void 0!==l&&null!==(t=l.properties)&&void 0!==t&&t.bad||h.dailies&&H&&null!==(r=l.file)&&void 0!==r&&r.includes(H)?(Q.current=Mt(Mt({},Q.current),{},(0,i.Z)({},l.id,l)),!1):!h.noter||null===(o=l.properties)||void 0===o||!o.NOTER_PAGE||(Q.current=Mt(Mt({},Q.current),{},(0,i.Z)({},l.id,l)),!1)})).filter((function(e){var n,t=(null!==(n=d[null===e||void 0===e?void 0:e.id])&&void 0!==n?n:[]).filter((function(e){return!Q.current[e.source]&&!Q.current[e.target]}));return!h.orphans||(h.parent?0!==t.length:0!==t.length&&t.some((function(e){return!["parent","heading"].includes(e.type)})))})),t=n.map((function(e){return e.id})),r=s.links.filter((function(e){var n=Qt(e),r=(0,l.Z)(n,2),o=r[0],i=r[1];if(!t.includes(o)||!t.includes(i))return!1;var s=e;return h.parent?"heading"===h.parent?"parent"!==s.type:"heading"!==s.type:!["parent","heading"].includes(s.type)}));J.current=r.reduce((function(e,n){var t,r,s,c=n,a=Qt(c),u=(0,l.Z)(a,2),d=u[0],h=u[1];return Mt(Mt({},e),{},(s={},(0,i.Z)(s,d,[].concat((0,o.Z)(null!==(t=e[d])&&void 0!==t?t:[]),[c])),(0,i.Z)(s,h,[].concat((0,o.Z)(null!==(r=e[h])&&void 0!==r?r:[]),[c])),s))}),{});var c=r.map((function(e){var n=Qt(e),t=(0,l.Z)(n,2);return{target:t[0],source:t[1],weight:"cite"===e.type?1:2}}));if("community"===Z.method){var a=m()().nodes(t).edges(c);R.current=a()}return{nodes:n,links:r}}),[h,s,Z.method]),$=(0,b.useState)({nodes:[],links:[]}),Y=$[0],ee=$[1];(0,b.useEffect)((function(){if(O.nodeIds.length){var e=O.nodeIds.length>1?Y.nodes.filter((function(e){return!O.excludedNodeIds.includes(e.id)})):[],n=e.map((function(e){return e.id})),t=function(e,n,t){var r=[e[0]],o=[],i=[e[0]];return Array.from({length:t},(function(){r.forEach((function(e){var t;(null!==(t=J.current[e])&&void 0!==t?t:[]).forEach((function(e){var t=Qt(e),r=(0,l.Z)(t,2),s=r[0],c=r[1];n.some((function(e){return[s,c].includes(e)}))||(i.includes(s)?i.includes(c)||o.push(c):o.push(s))}))})),r=o,o.forEach((function(e){return e&&i.push(e)})),o=[]})),i}(O.nodeIds,O.excludedNodeIds,k.neighbors),r=K.nodes.filter((function(r){var o;return e.length?!n.includes(r.id)&&(null!==(o=J.current[r.id])&&void 0!==o?o:[]).some((function(e){var n=Qt(e),t=(0,l.Z)(n,2),r=t[0],o=t[1];return O.nodeIds.includes(r)||O.nodeIds.includes(o)})):t.includes(r.id)})).map((function(e){return Mt(Mt({},e),{},{x:0,y:0,vy:0,vx:0})})),i=[].concat((0,o.Z)(e),(0,o.Z)(r)),s=i.map((function(e){return e.id})),c=(O.nodeIds.length>1?Y.links:[]).filter((function(e){O.excludedNodeIds.some((function(n){return Qt(e).includes(n)}))})),a=K.links.filter((function(e){var t=Qt(e),r=(0,l.Z)(t,2),o=r[0],i=r[1];return!(c.length&&n.includes(i)&&n.includes(o))&&(s.includes(o)&&s.includes(i))})).map((function(e){var n=Qt(e),t=(0,l.Z)(n,2);return{source:t[0],target:t[1]}})),u=[].concat((0,o.Z)(c),(0,o.Z)(a));ee({nodes:i,links:u})}}),[k.neighbors,h,JSON.stringify(O),JSON.stringify(s),K.links,K.nodes]),(0,b.useEffect)((function(){(0,r.Z)(c().mark((function e(){var r,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.current,e.next=3,Vt;case 3:o=e.sent,!t.gravityOn||O.nodeIds.length&&!t.gravityLocal?(r.d3Force("x",null),r.d3Force("y",null),a&&r.d3Force("z",null)):(r.d3Force("x",o.forceX().strength(t.gravity)),r.d3Force("y",o.forceY().strength(t.gravity)),a&&r.d3Force("z",o.forceZ().strength(t.gravity))),t.centering?r.d3Force("center",o.forceCenter().strength(t.centeringStrength)):r.d3Force("center",null),t.linkStrength&&r.d3Force("link").strength(t.linkStrength),t.linkIts&&r.d3Force("link").iterations(t.linkIts),t.charge&&r.d3Force("charge").strength(t.charge),r.d3Force("collide",t.collision?o.forceCollide().radius(t.collisionStrength):null);case 10:case"end":return e.stop()}}),e)})))()}),[t,a,O]),(0,b.useEffect)((function(){var e;null===(e=n.current)||void 0===e||e.d3ReheatSimulation()}),[t,O.nodeIds.length]);var ne=(0,b.useRef)(0),te=(0,b.useState)(1),oe=te[0],ie=te[1],le=(0,f._7)((function(e){return ie(e)}),{duration:v.animationSpeed,algorithm:L[v.algorithmName]}),se=(0,l.Z)(le,2),ce=se[0],ae=se[1],ue=(0,f._7)((function(e){return ie(Math.min(oe,-1*(e-1)))}),{duration:v.animationSpeed,algorithm:L[v.algorithmName]}),de=(0,l.Z)(ue,2),he=de[0],ge=de[1],fe=(0,b.useMemo)((function(){var e;if(!X.current)return{};var n=J.current[X.current.id];return n?Object.fromEntries([null===(e=X.current)||void 0===e?void 0:e.id].concat((0,o.Z)(n.flatMap((function(e){return[e.source,e.target]})))).map((function(e){return[e,{}]}))):{}}),[JSON.stringify(X.current),JSON.stringify(J.current)]);(0,b.useEffect)((function(){null!==P&&void 0!==P&&P.id?V(P):V(null)}),[P]);var pe=(0,b.useRef)(null);(0,b.useEffect)((function(){if(X.current=M,M&&(pe.current=M),!v.highlightAnim)return ie(M?1:0);M?ce():(ae(),oe>.5?he():ie(0))}),[M]);var xe=(0,b.useMemo)((function(){return Object.fromEntries(W.map((function(e){var n=Kt(e,_),t=W.map((function(e){return[e,x.Z(n,Kt(e,_))]}));return[e,Object.fromEntries(t)]})))}),[q]),je=(0,b.useMemo)((function(){var e,n,t,r=null!==(e=J.current[null===(n=pe.current)||void 0===n?void 0:n.id])&&void 0!==e?e:[];return Object.fromEntries([null===(t=pe.current)||void 0===t?void 0:t.id].concat((0,o.Z)(r.flatMap((function(e){return Qt(e)})))).map((function(e){return[e,{}]})))}),[JSON.stringify(M),pe.current,J.current]),be=function(e){var n,t,r,o,i,l=null!==(n=null===(t=J.current[e])||void 0===t?void 0:t.length)&&void 0!==n?n:0;return"degree"===Z.method?v.nodeColorScheme[(r=l,o=0,i=v.nodeColorScheme.length-1,Math.min(Math.max(r,o),i))]:v.nodeColorScheme[l&&R.current[e]%v.nodeColorScheme.length]},ve=function(e,n){return J.current[e].length>J.current[n].length?be(e):be(n)},me=(0,b.useMemo)((function(){return Kt(v.labelTextColor,_)}),[v.labelTextColor,q]),ye=(0,b.useMemo)((function(){return Kt(v.labelBackgroundColor,_)}),[v.labelBackgroundColor,q]),Ce=function(e){var n,t=null!==(n=J.current[e.id])&&void 0!==n?n:[],r=t.length?t.filter((function(e){return"parent"===e.type})).length:0,o=3+t.length*v.nodeSizeLinks-(h.parent?0:r);return 1===v.highlightNodeSize?o:o*(fe[e.id]||je[e.id]?1+oe*(v.highlightNodeSize-1):1)},Oe=(0,b.useState)(!1),we=Oe[0],ke=Oe[1],Se=(0,b.useRef)(1),Ne={graphData:O.nodeIds.length?Y:K,width:D,height:B,backgroundColor:Kt(v.backgroundColor,_),warmupTicks:1===O.nodeIds.length?100:O.nodeIds.length>1?20:0,onZoom:function(e){var n=e.k;e.x,e.y;return Se.current=n},nodeColor:function(e){return function(e,n){var t,r,o=fe[e.id]||je[e.id];if(v.emacsNodeColor&&e.id===p)return Kt(v.emacsNodeColor,n);if(N&&null!==e&&void 0!==e&&e.tags.some((function(e){return N[e]}))){var i=N[null===e||void 0===e?void 0:e.tags.filter((function(e){return N[e]}))[0]];return o?xe[i][i](v.highlightFade*oe):xe[i][v.backgroundColor](v.highlightFade*oe)}return v.citeNodeColor&&null!==e&&void 0!==e&&null!==(t=e.properties)&&void 0!==t&&t.ROAM_REFS&&null!==e&&void 0!==e&&null!==(r=e.properties)&&void 0!==r&&r.FILELESS?o?Kt(v.citeNodeColor,n):xe[v.citeNodeColor][v.backgroundColor](v.highlightFade*oe):v.refNodeColor&&e.properties.ROAM_REFS?o?Kt(v.refNodeColor,n):xe[v.refNodeColor][v.backgroundColor](v.highlightFade*oe):o?v.nodeHighlight?xe[be(e.id)][v.nodeHighlight](oe):Kt(be(e.id),n):xe[be(e.id)][v.backgroundColor](v.highlightFade*oe)}(e,_)},nodeRelSize:v.nodeRel,nodeVal:function(e){return Ce(e)/Math.pow(Se.current,v.nodeZoomSize)},nodeCanvasObject:function(e,n,t){Wt(Mt({nodeRel:v.nodeRel,filteredLinksByNodeId:J.current,lastHoverNode:pe.current},{node:e,ctx:n,globalScale:t,highlightedNodes:fe,previouslyHighlightedNodes:je,visuals:v,opacity:oe,nodeSize:Ce,labelTextColor:me,labelBackgroundColor:ye,hoverNode:M}))},nodeCanvasObjectMode:function(){return"after"},linkDirectionalParticles:v.particles?v.particlesNumber:void 0,linkDirectionalArrowLength:v.arrows?v.arrowsLength:void 0,linkDirectionalArrowRelPos:v.arrowsPos,linkDirectionalArrowColor:v.arrowsColor?function(){return Kt(v.arrowsColor,_)}:void 0,linkColor:function(e){var n,t="object"===typeof e.source?e.source.id:e.source,r="object"===typeof e.target?e.target.id:e.target,o=Jt(e,X.current),i=Jt(e,pe.current),l=o||i,s=e;return v.refLinkColor&&"ref"===s.type?l&&(v.refLinkHighlightColor||v.linkHighlight)?xe[v.refLinkColor][v.refLinkHighlightColor||v.linkHighlight](oe):xe[v.refLinkColor][v.backgroundColor](v.highlightFade*oe):v.citeLinkColor&&null!==(n=s.type)&&void 0!==n&&n.includes("cite")?l&&(v.citeLinkHighlightColor||v.linkHighlight)?xe[v.citeLinkColor][v.citeLinkHighlightColor||v.linkHighlight](oe):xe[v.citeLinkColor][v.backgroundColor](v.highlightFade*oe):function(e,n,t,r){if(!v.linkHighlight&&!v.linkColorScheme&&!t)return Kt(ve(e,n),r);if(!t&&!v.linkColorScheme){var o=ve(e,n);return xe[o][v.backgroundColor](v.highlightFade*oe)}return t?v.linkHighlight||v.linkColorScheme?v.linkHighlight?v.linkColorScheme?xe[v.linkColorScheme][v.linkHighlight](oe):xe[ve(e,n)][v.linkHighlight](oe):Kt(v.linkColorScheme,r):Kt(ve(e,n),r):xe[v.linkColorScheme][v.backgroundColor](v.highlightFade*oe)}(t,r,l,_)},linkWidth:function(e){if(1===v.highlightLinkSize)return v.linkWidth;var n=Jt(e,X.current),t=Jt(e,pe.current);return n||t?v.linkWidth*(1+oe*(v.highlightLinkSize-1)):v.linkWidth},linkDirectionalParticleWidth:v.particlesWidth,d3AlphaDecay:t.alphaDecay,d3AlphaMin:t.alphaMin,d3VelocityDecay:t.velocityDecay,onNodeClick:function(e,n){var t=e,r=n.timeStamp-ne.current<200;if(ne.current=n.timeStamp,r)return G("double",t,n);var o=ne.current;return setTimeout((function(){if(ne.current===o)return G("click",t,n)}),200)},onNodeHover:function(e){v.highlight&&(we||(M||(ge(),ie(0)),V(e)))},onNodeRightClick:function(e,n){G("right",e,n)},onNodeDrag:function(e){V(e),ke(!0)},onNodeDragEnd:function(){V(null),ke(!1)}};return(0,re.jsx)(u.Box,{overflow:"hidden",onClick:z.onClose,children:a?(0,re.jsx)(Ut,Mt(Mt({ref:n},Ne),{},{nodeThreeObjectExtend:!0,nodeOpacity:v.nodeOpacity,nodeResolution:v.nodeResolution,linkOpacity:v.linkOpacity,nodeThreeObject:function(e){if(v.labels&&(!(v.labels<3)||fe[e.id])){var n=new w.Z(e.title.substring(0,40));return n.color=Kt(v.labelTextColor,_),n.backgroundColor=Kt(v.labelBackgroundColor,_),n.padding=2,n.textHeight=8,n}}})):(0,re.jsx)(_t,Mt(Mt({ref:n},Ne),{},{linkLineDash:function(e){var n,t=e;return v.citeDashes&&null!==(n=t.type)&&void 0!==n&&n.includes("cite")?[v.citeDashLength,v.citeGapLength]:v.refDashes&&"ref"==t.type?[v.refDashLength,v.refGapLength]:null}}))})};function Jt(e,n){var t,r;return(null===(t=e.source)||void 0===t?void 0:t.id)===(null===n||void 0===n?void 0:n.id)||(null===(r=e.target)||void 0===r?void 0:r.id)===(null===n||void 0===n?void 0:n.id)}function Qt(e){return["object"===typeof e.source?e.source.id:e.source,"object"===typeof e.target?e.target.id:e.target]}function Kt(e,n){return e.split(".").reduce((function(e,n){return e[n]}),n.colors)}function $t(e,n){return"rgba("+(e=e.replace("#","")).match(new RegExp("(.{"+e.length/3+"})","g")).map((function(n){return parseInt(e.length%2?n+n:n,16)})).concat(isFinite(n)?n:1).join(",")+")"}},45301:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(20624)}])}},function(e){e.O(0,[774,737,876,228,866,13,874,573,446,879,888,179],(function(){return n=45301,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|